From 53a16613baab59a0aa0914d40db0a1175737f317 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 12:45:58 +0800 Subject: [PATCH 01/20] feat(docs): register uni-app SDK documentation contract --- app/sitemap.ts | 9 +- data/structure/chat-pages.json | 1330 +- data/structure/uniapp-api-ownership.json | 7267 ++++++ data/structure/uniapp-content-audit.json | 7012 ++++++ data/structure/uniapp-navigation-labels.json | 358 + data/structure/uniapp-sdk-doc-manifest.json | 18831 ++++++++++++++++ data/structure/uniapp-sidebar.json | 827 + data/structure/uniapp-type-ownership.json | 3302 +++ package.json | 12 +- scripts/__tests__/build-search-index.test.mjs | 20 + .../check-client-sdk-content-audit.test.mjs | 61 + .../__tests__/client-sdk-publication.test.mjs | 2 + scripts/__tests__/client-sdk-sidebar.test.mjs | 15 +- .../sync-client-sdk-route-skeletons.test.mjs | 40 + .../sync-client-sdk-structure.test.mjs | 32 + scripts/__tests__/uniapp-commercial.test.mjs | 35 + .../uniapp-sdk-doc-manifest.test.mjs | 85 + .../__tests__/uniapp-sdk-ownership.test.mjs | 78 + scripts/build-client-sdk-zh-content.mjs | 10 +- scripts/check-client-sdk-content-audit.mjs | 49 +- scripts/lib/client-sdk-platforms.mjs | 13 + scripts/lib/uniapp-sdk-doc-manifest.mjs | 94 + scripts/lib/uniapp-sdk-ownership.mjs | 82 + scripts/sync-client-sdk-route-skeletons.mjs | 111 +- scripts/sync-client-sdk-structure.mjs | 111 +- scripts/sync-uniapp-sdk-ownership.mjs | 240 + src/components/docs/documentation-page.tsx | 1 + src/components/docs/sdk-overview-page.tsx | 50 +- src/generated/navigation.json | 1991 +- src/generated/routes.json | 3000 ++- src/generated/uniapp-sdk-zh-content.json | 1927 ++ src/lib/client-sdk-commercial.ts | 74 +- src/lib/client-sdk-publication.ts | 9 +- src/lib/localized-docs.ts | 2 + 34 files changed, 47016 insertions(+), 64 deletions(-) create mode 100644 data/structure/uniapp-api-ownership.json create mode 100644 data/structure/uniapp-content-audit.json create mode 100644 data/structure/uniapp-navigation-labels.json create mode 100644 data/structure/uniapp-sdk-doc-manifest.json create mode 100644 data/structure/uniapp-sidebar.json create mode 100644 data/structure/uniapp-type-ownership.json create mode 100644 scripts/__tests__/uniapp-commercial.test.mjs create mode 100644 scripts/__tests__/uniapp-sdk-doc-manifest.test.mjs create mode 100644 scripts/__tests__/uniapp-sdk-ownership.test.mjs create mode 100644 scripts/lib/uniapp-sdk-doc-manifest.mjs create mode 100644 scripts/lib/uniapp-sdk-ownership.mjs create mode 100644 scripts/sync-uniapp-sdk-ownership.mjs create mode 100644 src/generated/uniapp-sdk-zh-content.json diff --git a/app/sitemap.ts b/app/sitemap.ts index 4a91cee6b3..6085065e80 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -3,7 +3,10 @@ import { getAllRoutes } from '@/src/lib/routes'; import { isSdkPlatformVisible } from '@/src/config/docs'; import { siteConfig } from '@/src/config/site'; import { toLocalizedPath } from '@/src/lib/i18n'; -import { getPublishedWasmLocales, isWasmRoute } from '@/src/lib/wasm-publication'; +import { + getPublishedClientSdkLocales, + isClientSdkRoute, +} from '@/src/lib/client-sdk-publication'; import { getGuidePagePaths } from '@/src/components/docs/guides-page'; export default function sitemap(): MetadataRoute.Sitemap { @@ -22,8 +25,8 @@ export default function sitemap(): MetadataRoute.Sitemap { ) .flatMap((route) => { const changeFrequency = 'monthly' as const; - const locales = isWasmRoute(route.path) - ? getPublishedWasmLocales(route.path) + const locales = isClientSdkRoute(route.path) + ? getPublishedClientSdkLocales(route.path) : (['en', 'zh'] as const); return locales.map((locale) => ({ url: new URL(toLocalizedPath(route.path, locale), siteConfig.siteUrl).toString(), diff --git a/data/structure/chat-pages.json b/data/structure/chat-pages.json index 4d2df20a9f..c14c59762d 100644 --- a/data/structure/chat-pages.json +++ b/data/structure/chat-pages.json @@ -3602,11 +3602,1339 @@ { "sourcePath": "/sdk/uniapp/overview", "openimPath": "/sdk/uniapp/overview", - "title": "OpenIM SDK for uni-app", + "title": "OpenIM SDK for uni-app / uni-app x", "context": "chat/sdk/uniapp", "template": "overview", "contentFile": "content/docs/chat/sdk/uniapp/overview.mdx" }, + { + "sourcePath": "/sdk/uniapp/getting-started/before-you-start", + "openimPath": "/sdk/uniapp/getting-started/before-you-start", + "title": "Before you start", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "openimPath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "title": "Environment-specific implementation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "openimPath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/send-first-message", + "openimPath": "/sdk/uniapp/getting-started/send-first-message", + "title": "Send your first message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "openimPath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "title": "Install, initialize, and inspect the SDK", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "openimPath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "title": "Handle App lifecycle and device state", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx" + }, + { + "sourcePath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "openimPath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "title": "Update tokens and observe SDK sessions", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/overview-user", + "openimPath": "/sdk/uniapp/user/overview-user", + "title": "User overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/overview-user.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/profile/get-users-info", + "openimPath": "/sdk/uniapp/user/profile/get-users-info", + "title": "Get user profiles", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/profile/get-self-user-info", + "openimPath": "/sdk/uniapp/user/profile/get-self-user-info", + "title": "Get your profile", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/profile/set-self-info", + "openimPath": "/sdk/uniapp/user/profile/set-self-info", + "title": "Update your profile", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", + "openimPath": "/sdk/uniapp/user/profile/set-global-message-reception", + "title": "Set global message reception", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "openimPath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "openimPath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "openimPath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "openimPath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", + "openimPath": "/sdk/uniapp/user/friends/get-friend-list-page", + "title": "Get the friend list", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/search-friends", + "openimPath": "/sdk/uniapp/user/friends/search-friends", + "title": "Search friends", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "openimPath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/check-friend", + "openimPath": "/sdk/uniapp/user/friends/check-friend", + "title": "Check friendship status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/update-friends", + "openimPath": "/sdk/uniapp/user/friends/update-friends", + "title": "Update friend information", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friends/delete-friend", + "openimPath": "/sdk/uniapp/user/friends/delete-friend", + "title": "Delete a friend", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/add-friend", + "openimPath": "/sdk/uniapp/user/friend-applications/add-friend", + "title": "Send a friend application", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "openimPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "openimPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "openimPath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "openimPath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "openimPath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "openimPath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/blacklist/get-black-list", + "openimPath": "/sdk/uniapp/user/blacklist/get-black-list", + "title": "Get the blacklist", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/blacklist/add-black", + "openimPath": "/sdk/uniapp/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx" + }, + { + "sourcePath": "/sdk/uniapp/user/blacklist/remove-black", + "openimPath": "/sdk/uniapp/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/overview-conversation", + "openimPath": "/sdk/uniapp/conversation/overview-conversation", + "title": "Conversation overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "openimPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "openimPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "openimPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "openimPath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Get the conversation list", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "openimPath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "title": "Search conversations", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "title": "Mark all conversations as read", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "title": "Delete a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "openimPath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "title": "getConversationGroupByConversationID", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx" + }, + { + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "openimPath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/overview-group", + "openimPath": "/sdk/uniapp/group/overview-group", + "title": "Group overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/overview-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/create-group", + "openimPath": "/sdk/uniapp/group/create-group", + "title": "Create a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/create-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/update-group-profile", + "openimPath": "/sdk/uniapp/group/update-group-profile", + "title": "Update group profile", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/update-group-profile.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/set-group-announcement", + "openimPath": "/sdk/uniapp/group/set-group-announcement", + "title": "Publish a group announcement", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/set-group-extension", + "openimPath": "/sdk/uniapp/group/set-group-extension", + "title": "Set group extra data", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-extension.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/set-group-join-verification", + "openimPath": "/sdk/uniapp/group/set-group-join-verification", + "title": "Set group join verification", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/set-group-member-profile-access", + "openimPath": "/sdk/uniapp/group/set-group-member-profile-access", + "title": "Set member profile access", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/set-group-member-friend-permission", + "openimPath": "/sdk/uniapp/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/change-group-mute", + "openimPath": "/sdk/uniapp/group/change-group-mute", + "title": "Change group mute status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/change-group-mute.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/join-group", + "openimPath": "/sdk/uniapp/group/join-group", + "title": "Apply to join a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/join-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/quit-group", + "openimPath": "/sdk/uniapp/group/quit-group", + "title": "Leave a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/quit-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/dismiss-group", + "openimPath": "/sdk/uniapp/group/dismiss-group", + "title": "Dismiss a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/dismiss-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "openimPath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "openimPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "openimPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "openimPath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "openimPath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "title": "Search groups", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "openimPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "openimPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "openimPath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "title": "Get the pending group application count", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "openimPath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "title": "Get the group application badge count", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/accept-group-application", + "openimPath": "/sdk/uniapp/group/group-applications/accept-group-application", + "title": "Accept a group application", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "openimPath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "openimPath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "openimPath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "title": "List group members", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "openimPath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get specified group member profiles", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "openimPath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "title": "Check group membership", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "openimPath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "openimPath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "openimPath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "openimPath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "title": "Update a member’s group nickname", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "openimPath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "openimPath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member’s avatar", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "openimPath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "title": "Set a group member extension", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "openimPath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "openimPath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx" + }, + { + "sourcePath": "/sdk/uniapp/group/check-full-sync-state", + "openimPath": "/sdk/uniapp/group/check-full-sync-state", + "title": "Check group full-sync state", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/overview-message", + "openimPath": "/sdk/uniapp/message/overview-message", + "title": "Message overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/overview-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-text-message", + "title": "Create a text message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "openimPath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "title": "Create an image message from a file", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "openimPath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "openimPath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "title": "Create an audio message from a file", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "openimPath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "openimPath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "title": "Create a video message from files", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "openimPath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "openimPath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "title": "Create a file message from a file", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "openimPath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-card-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-location-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-location-message", + "title": "Create a location message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-face-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "openimPath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message", + "openimPath": "/sdk/uniapp/message/sending-messages/send-message", + "title": "Send a message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "openimPath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "openimPath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "title": "Receive messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "openimPath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "openimPath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "openimPath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "openimPath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "title": "Load message context", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/searching-messages/search-messages", + "openimPath": "/sdk/uniapp/message/searching-messages/search-messages", + "title": "Search messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "openimPath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "title": "Report typing status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "openimPath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "title": "Get typing status", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "openimPath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "openimPath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "openimPath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "openimPath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "title": "Translate text and messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "openimPath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "openimPath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "openimPath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "openimPath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "openimPath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "title": "Modify a message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "openimPath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "title": "Get pinned messages in a conversation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "openimPath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "title": "Pin or unpin a message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "openimPath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "openimPath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "openimPath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "openimPath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "openimPath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "openimPath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx" + }, + { + "sourcePath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "openimPath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx" + }, + { + "sourcePath": "/sdk/uniapp/file-uploads/upload-file", + "openimPath": "/sdk/uniapp/file-uploads/upload-file", + "title": "Upload a file", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/overview-calling", + "openimPath": "/sdk/uniapp/calling/overview-calling", + "title": "Audio and video calling overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/overview-calling.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "title": "Start a group call", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/accept-call", + "title": "Accept a call", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/reject-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/reject-call", + "title": "Reject a call", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "openimPath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "title": "End a call", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "openimPath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "openimPath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending call invitation", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "openimPath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "openimPath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get a call room token", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx" + }, + { + "sourcePath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "openimPath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx" + }, + { + "sourcePath": "/sdk/uniapp/events/overview-events", + "openimPath": "/sdk/uniapp/events/overview-events", + "title": "Events overview", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/events/overview-events.mdx" + }, + { + "sourcePath": "/sdk/uniapp/events/handle-data-migration-events", + "openimPath": "/sdk/uniapp/events/handle-data-migration-events", + "title": "Handle data migration events", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx" + }, + { + "sourcePath": "/sdk/uniapp/logger", + "openimPath": "/sdk/uniapp/logger", + "title": "Logging", + "context": "chat/sdk/uniapp", + "template": "guide", + "contentFile": "content/docs/chat/sdk/uniapp/logger.mdx" + }, { "sourcePath": "/sdk/electron/overview", "openimPath": "/sdk/electron/overview", diff --git a/data/structure/uniapp-api-ownership.json b/data/structure/uniapp-api-ownership.json new file mode 100644 index 0000000000..404e844b14 --- /dev/null +++ b/data/structure/uniapp-api-ownership.json @@ -0,0 +1,7267 @@ +{ + "schemaVersion": 1, + "manifestSha256": "37b21a68b6dd008e73d4ee4e23d0d1e0bd25f3a06f8f629ddba72fc91b647b54", + "callables": [ + { + "id": 2001, + "name": "off", + "signature": "off(subscription:OpenIMSDKEventSubscription):void", + "role": "event-control", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2002, + "name": "offAll", + "signature": "offAll(eventName:OpenIMSDKEventName):void", + "role": "event-control", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2003, + "name": "onConnecting", + "signature": "onConnecting(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2004, + "name": "onConnectSuccess", + "signature": "onConnectSuccess(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2005, + "name": "onConnectFailed", + "signature": "onConnectFailed(handler:OpenIMErrorEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2006, + "name": "onKickedOffline", + "signature": "onKickedOffline(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2007, + "name": "onUserTokenExpired", + "signature": "onUserTokenExpired(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2008, + "name": "onUserTokenInvalid", + "signature": "onUserTokenInvalid(handler:OpenIMErrorEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2009, + "name": "onRecvNewMessage", + "signature": "onRecvNewMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented" + }, + { + "id": 2010, + "name": "onRecvOfflineNewMessage", + "signature": "onRecvOfflineNewMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented" + }, + { + "id": 2011, + "name": "onRecvOnlineOnlyMessage", + "signature": "onRecvOnlineOnlyMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented" + }, + { + "id": 2012, + "name": "onMsgDeleted", + "signature": "onMsgDeleted(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "disposition": "documented" + }, + { + "id": 2013, + "name": "onNewRecvMessageRevoked", + "signature": "onNewRecvMessageRevoked(handler:OpenIMMessageRevokedEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "disposition": "documented" + }, + { + "id": 2014, + "name": "onRecvC2CReadReceipt", + "signature": "onRecvC2CReadReceipt(handler:OpenIMMessageReceiptListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "disposition": "documented" + }, + { + "id": 2015, + "name": "onRecvNewMessages", + "signature": "onRecvNewMessages(handler:OpenIMMessageListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented" + }, + { + "id": 2016, + "name": "onRecvOfflineNewMessages", + "signature": "onRecvOfflineNewMessages(handler:OpenIMMessageListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented" + }, + { + "id": 2017, + "name": "onConversationChanged", + "signature": "onConversationChanged(handler:OpenIMConversationListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented" + }, + { + "id": 2018, + "name": "onConversationUserInputStatusChanged", + "signature": "onConversationUserInputStatusChanged(handler:OpenIMConversationInputStatusEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/update-typing-status", + "disposition": "documented" + }, + { + "id": 2019, + "name": "onNewConversation", + "signature": "onNewConversation(handler:OpenIMConversationListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented" + }, + { + "id": 2020, + "name": "onSyncServerFailed", + "signature": "onSyncServerFailed(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2021, + "name": "onSyncServerFinish", + "signature": "onSyncServerFinish(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2022, + "name": "onSyncServerProgress", + "signature": "onSyncServerProgress(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2023, + "name": "onSyncServerStart", + "signature": "onSyncServerStart(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented" + }, + { + "id": 2024, + "name": "onSendMessageProgress", + "signature": "onSendMessageProgress(handler:OpenIMSendMessageProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 2025, + "name": "onUploadFileProgress", + "signature": "onUploadFileProgress(handler:OpenIMUploadFileProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 2026, + "name": "onUploadLogsProgress", + "signature": "onUploadLogsProgress(handler:OpenIMUploadLogsProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 2027, + "name": "onTotalUnreadMessageCountChanged", + "signature": "onTotalUnreadMessageCountChanged(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "disposition": "documented" + }, + { + "id": 2028, + "name": "onRecvCustomBusinessMessage", + "signature": "onRecvCustomBusinessMessage(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented" + }, + { + "id": 2029, + "name": "onBlackAdded", + "signature": "onBlackAdded(handler:OpenIMBlackUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented" + }, + { + "id": 2030, + "name": "onBlackDeleted", + "signature": "onBlackDeleted(handler:OpenIMBlackUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented" + }, + { + "id": 2031, + "name": "onFriendAdded", + "signature": "onFriendAdded(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented" + }, + { + "id": 2032, + "name": "onFriendApplicationAccepted", + "signature": "onFriendApplicationAccepted(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2033, + "name": "onFriendApplicationAdded", + "signature": "onFriendApplicationAdded(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2034, + "name": "onFriendApplicationDeleted", + "signature": "onFriendApplicationDeleted(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2035, + "name": "onFriendApplicationRejected", + "signature": "onFriendApplicationRejected(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2036, + "name": "onFriendDeleted", + "signature": "onFriendDeleted(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented" + }, + { + "id": 2037, + "name": "onFriendInfoChanged", + "signature": "onFriendInfoChanged(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented" + }, + { + "id": 2038, + "name": "onGroupApplicationAccepted", + "signature": "onGroupApplicationAccepted(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2039, + "name": "onGroupApplicationAdded", + "signature": "onGroupApplicationAdded(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2040, + "name": "onGroupApplicationDeleted", + "signature": "onGroupApplicationDeleted(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2041, + "name": "onGroupApplicationRejected", + "signature": "onGroupApplicationRejected(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2042, + "name": "onGroupDismissed", + "signature": "onGroupDismissed(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 2043, + "name": "onGroupInfoChanged", + "signature": "onGroupInfoChanged(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 2044, + "name": "onGroupMemberAdded", + "signature": "onGroupMemberAdded(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented" + }, + { + "id": 2045, + "name": "onGroupMemberDeleted", + "signature": "onGroupMemberDeleted(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented" + }, + { + "id": 2046, + "name": "onGroupMemberInfoChanged", + "signature": "onGroupMemberInfoChanged(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented" + }, + { + "id": 2047, + "name": "onJoinedGroupAdded", + "signature": "onJoinedGroupAdded(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 2048, + "name": "onJoinedGroupDeleted", + "signature": "onJoinedGroupDeleted(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 2049, + "name": "onSelfInfoUpdated", + "signature": "onSelfInfoUpdated(handler:OpenIMUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/profile/set-self-info", + "disposition": "documented" + }, + { + "id": 2050, + "name": "onUserStatusChanged", + "signature": "onUserStatusChanged(handler:OpenIMUserStatusListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/online-status/subscribe-users-status", + "disposition": "documented" + }, + { + "id": 2051, + "name": "initSDK", + "signature": "initSDK(config:OpenIMInitConfig,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "boolean", + "responseSchema": { + "kind": "boolean" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "disposition": "documented" + }, + { + "id": 2052, + "name": "login", + "signature": "login(userID:string,token:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2053, + "name": "logout", + "signature": "logout(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2054, + "name": "getLoginStatus", + "signature": "getLoginStatus(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMLoginStatus", + "responseSchema": { + "kind": "reference", + "name": "OpenIMLoginStatus" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2055, + "name": "getLoginUserID", + "signature": "getLoginUserID(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2056, + "name": "getSdkVersion", + "signature": "getSdkVersion():string", + "role": "operation", + "completion": "sync", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "disposition": "documented" + }, + { + "id": 2057, + "name": "getOpenIMDataPath", + "signature": "getOpenIMDataPath():string", + "role": "operation", + "completion": "sync", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "disposition": "documented" + }, + { + "id": 2058, + "name": "unInitSDK", + "signature": "unInitSDK(operationID?:string|null):void", + "role": "operation", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "disposition": "documented" + }, + { + "id": 2059, + "name": "getAllConversationList", + "signature": "getAllConversationList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented" + }, + { + "id": 2060, + "name": "getOneConversation", + "signature": "getOneConversation(params:OpenIMGetOneConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "disposition": "documented" + }, + { + "id": 2061, + "name": "getAdvancedHistoryMessageList", + "signature": "getAdvancedHistoryMessageList(params:OpenIMGetAdvancedHistoryMessageListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAdvancedHistoryMessageListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAdvancedHistoryMessageListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "disposition": "documented" + }, + { + "id": 2062, + "name": "getSpecifiedGroupsInfo", + "signature": "getSpecifiedGroupsInfo(params:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "disposition": "documented" + }, + { + "id": 2063, + "name": "deleteConversationAndDeleteAllMsg", + "signature": "deleteConversationAndDeleteAllMsg(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "disposition": "documented" + }, + { + "id": 2064, + "name": "markConversationMessageAsRead", + "signature": "markConversationMessageAsRead(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "disposition": "documented" + }, + { + "id": 2065, + "name": "getGroupMemberList", + "signature": "getGroupMemberList(params:OpenIMGetGroupMemberListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented" + }, + { + "id": 2066, + "name": "setMessageLocalEx", + "signature": "setMessageLocalEx(params:OpenIMSetMessageLocalExParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "disposition": "documented" + }, + { + "id": 2067, + "name": "revokeMessage", + "signature": "revokeMessage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "disposition": "documented" + }, + { + "id": 2068, + "name": "setConversation", + "signature": "setConversation(params:OpenIMSetConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "disposition": "documented" + }, + { + "id": 2069, + "name": "setAppBackgroundStatus", + "signature": "setAppBackgroundStatus(data:boolean,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2070, + "name": "setAppBadge", + "signature": "setAppBadge(appUnreadCount:number,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "disposition": "documented" + }, + { + "id": 2071, + "name": "networkStatusChanged", + "signature": "networkStatusChanged(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 2072, + "name": "getSelfUserInfo", + "signature": "getSelfUserInfo(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserInfo|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserInfo" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/profile/get-self-user-info", + "disposition": "documented" + }, + { + "id": 2073, + "name": "getUsersInfo", + "signature": "getUsersInfo(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/profile/get-users-info", + "disposition": "documented" + }, + { + "id": 2074, + "name": "setSelfInfo", + "signature": "setSelfInfo(data:OpenIMSetSelfInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/profile/set-self-info", + "disposition": "documented" + }, + { + "id": 2075, + "name": "deleteMessageFromLocalStorage", + "signature": "deleteMessageFromLocalStorage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-local-message", + "disposition": "documented" + }, + { + "id": 2076, + "name": "deleteMessage", + "signature": "deleteMessage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-local-message", + "disposition": "documented" + }, + { + "id": 2077, + "name": "deleteAllMsgFromLocal", + "signature": "deleteAllMsgFromLocal(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "disposition": "documented" + }, + { + "id": 2078, + "name": "deleteAllMsgFromLocalAndSvr", + "signature": "deleteAllMsgFromLocalAndSvr(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "disposition": "documented" + }, + { + "id": 2079, + "name": "insertSingleMessageToLocalStorage", + "signature": "insertSingleMessageToLocalStorage(params:OpenIMInsertSingleMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "disposition": "documented" + }, + { + "id": 2080, + "name": "insertGroupMessageToLocalStorage", + "signature": "insertGroupMessageToLocalStorage(params:OpenIMInsertGroupMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "disposition": "documented" + }, + { + "id": 2081, + "name": "changeInputStates", + "signature": "changeInputStates(params:OpenIMInputStateParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/update-typing-status", + "disposition": "documented" + }, + { + "id": 2082, + "name": "clearConversationAndDeleteAllMsg", + "signature": "clearConversationAndDeleteAllMsg(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "disposition": "documented" + }, + { + "id": 2083, + "name": "hideConversation", + "signature": "hideConversation(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "disposition": "documented" + }, + { + "id": 2084, + "name": "hideAllConversations", + "signature": "hideAllConversations(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "disposition": "documented" + }, + { + "id": 2085, + "name": "markAllConversationMessageAsRead", + "signature": "markAllConversationMessageAsRead(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "disposition": "documented" + }, + { + "id": 2086, + "name": "searchConversation", + "signature": "searchConversation(searchParam:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "disposition": "documented" + }, + { + "id": 2087, + "name": "getConversationListSplit", + "signature": "getConversationListSplit(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented" + }, + { + "id": 2088, + "name": "getConversationIDBySessionType", + "signature": "getConversationIDBySessionType(params:OpenIMGetOneConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "disposition": "documented" + }, + { + "id": 2089, + "name": "getMultipleConversation", + "signature": "getMultipleConversation(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "disposition": "documented" + }, + { + "id": 2090, + "name": "deleteConversation", + "signature": "deleteConversation(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "disposition": "documented" + }, + { + "id": 2091, + "name": "setConversationDraft", + "signature": "setConversationDraft(params:OpenIMSetConversationDraftParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "disposition": "documented" + }, + { + "id": 2092, + "name": "getTotalUnreadMsgCount", + "signature": "getTotalUnreadMsgCount(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "disposition": "documented" + }, + { + "id": 2093, + "name": "searchLocalMessages", + "signature": "searchLocalMessages(params:OpenIMSearchLocalMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSearchMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSearchMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/searching-messages/search-messages", + "disposition": "documented" + }, + { + "id": 2094, + "name": "addFriend", + "signature": "addFriend(params:OpenIMAddFriendParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/add-friend", + "disposition": "documented" + }, + { + "id": 2095, + "name": "searchFriends", + "signature": "searchFriends(params:OpenIMSearchFriendsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/search-friends", + "disposition": "documented" + }, + { + "id": 2096, + "name": "getSpecifiedFriendsInfo", + "signature": "getSpecifiedFriendsInfo(params:OpenIMGetSpecifiedFriendsInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-specified-friends-info", + "disposition": "documented" + }, + { + "id": 2097, + "name": "getFriendApplicationListAsRecipient", + "signature": "getFriendApplicationListAsRecipient(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2098, + "name": "getFriendApplicationListAsApplicant", + "signature": "getFriendApplicationListAsApplicant(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "disposition": "documented" + }, + { + "id": 2099, + "name": "getFriendApplicationUnhandledCount", + "signature": "getFriendApplicationUnhandledCount(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "disposition": "documented" + }, + { + "id": 2100, + "name": "getFriendList", + "signature": "getFriendList(filterBlack?:boolean|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented" + }, + { + "id": 2101, + "name": "getFriendListPage", + "signature": "getFriendListPage(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented" + }, + { + "id": 2102, + "name": "updateFriends", + "signature": "updateFriends(params:OpenIMUpdateFriendsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/update-friends", + "disposition": "documented" + }, + { + "id": 2103, + "name": "checkFriend", + "signature": "checkFriend(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMCheckFriendResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCheckFriendResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/check-friend", + "disposition": "documented" + }, + { + "id": 2104, + "name": "acceptFriendApplication", + "signature": "acceptFriendApplication(params:OpenIMFriendApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "disposition": "documented" + }, + { + "id": 2105, + "name": "refuseFriendApplication", + "signature": "refuseFriendApplication(params:OpenIMFriendApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "disposition": "documented" + }, + { + "id": 2106, + "name": "deleteFriend", + "signature": "deleteFriend(userID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/delete-friend", + "disposition": "documented" + }, + { + "id": 2107, + "name": "addBlack", + "signature": "addBlack(params:OpenIMAddBlackParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/add-black", + "disposition": "documented" + }, + { + "id": 2108, + "name": "removeBlack", + "signature": "removeBlack(userID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/remove-black", + "disposition": "documented" + }, + { + "id": 2109, + "name": "getBlackList", + "signature": "getBlackList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMBlackListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMBlackListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented" + }, + { + "id": 2110, + "name": "inviteUserToGroup", + "signature": "inviteUserToGroup(params:OpenIMGroupInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "disposition": "documented" + }, + { + "id": 2111, + "name": "kickGroupMember", + "signature": "kickGroupMember(params:OpenIMGroupInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "disposition": "documented" + }, + { + "id": 2112, + "name": "isJoinGroup", + "signature": "isJoinGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "boolean", + "responseSchema": { + "kind": "boolean" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "disposition": "documented" + }, + { + "id": 2113, + "name": "getSpecifiedGroupMembersInfo", + "signature": "getSpecifiedGroupMembersInfo(params:OpenIMGroupUserListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "disposition": "documented" + }, + { + "id": 2114, + "name": "getUsersInGroup", + "signature": "getUsersInGroup(params:OpenIMGroupUserListParams,operationID?:string|null):Promise|null>", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:Array|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "disposition": "documented" + }, + { + "id": 2115, + "name": "searchGroupMembers", + "signature": "searchGroupMembers(params:OpenIMSearchGroupMembersParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "disposition": "documented" + }, + { + "id": 2116, + "name": "getJoinedGroupList", + "signature": "getJoinedGroupList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "disposition": "documented" + }, + { + "id": 2117, + "name": "getJoinedGroupListPage", + "signature": "getJoinedGroupListPage(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "disposition": "documented" + }, + { + "id": 2118, + "name": "createGroup", + "signature": "createGroup(params:OpenIMCreateGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/create-group", + "disposition": "documented" + }, + { + "id": 2119, + "name": "setGroupInfo", + "signature": "setGroupInfo(params:OpenIMSetGroupInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/update-group-profile", + "disposition": "documented" + }, + { + "id": 2120, + "name": "setGroupMemberInfo", + "signature": "setGroupMemberInfo(params:OpenIMSetGroupMemberInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "disposition": "documented" + }, + { + "id": 2121, + "name": "joinGroup", + "signature": "joinGroup(params:OpenIMJoinGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/join-group", + "disposition": "documented" + }, + { + "id": 2122, + "name": "searchGroups", + "signature": "searchGroups(params:OpenIMSearchGroupsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/retrieving-groups/search-groups", + "disposition": "documented" + }, + { + "id": 2123, + "name": "quitGroup", + "signature": "quitGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/quit-group", + "disposition": "documented" + }, + { + "id": 2124, + "name": "dismissGroup", + "signature": "dismissGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/dismiss-group", + "disposition": "documented" + }, + { + "id": 2125, + "name": "changeGroupMute", + "signature": "changeGroupMute(params:OpenIMChangeGroupMuteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/change-group-mute", + "disposition": "documented" + }, + { + "id": 2126, + "name": "changeGroupMemberMute", + "signature": "changeGroupMemberMute(params:OpenIMChangeGroupMemberMuteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "disposition": "documented" + }, + { + "id": 2127, + "name": "transferGroupOwner", + "signature": "transferGroupOwner(params:OpenIMTransferGroupOwnerParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "disposition": "documented" + }, + { + "id": 2128, + "name": "getGroupApplicationListAsApplicant", + "signature": "getGroupApplicationListAsApplicant(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "disposition": "documented" + }, + { + "id": 2129, + "name": "getGroupApplicationListAsRecipient", + "signature": "getGroupApplicationListAsRecipient(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented" + }, + { + "id": 2130, + "name": "getGroupApplicationUnhandledCount", + "signature": "getGroupApplicationUnhandledCount(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "disposition": "documented" + }, + { + "id": 2131, + "name": "acceptGroupApplication", + "signature": "acceptGroupApplication(params:OpenIMGroupApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/accept-group-application", + "disposition": "documented" + }, + { + "id": 2132, + "name": "refuseGroupApplication", + "signature": "refuseGroupApplication(params:OpenIMGroupApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/refuse-group-application", + "disposition": "documented" + }, + { + "id": 2133, + "name": "findMessageList", + "signature": "findMessageList(params:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFindMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFindMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "disposition": "documented" + }, + { + "id": 2134, + "name": "updateFcmToken", + "signature": "updateFcmToken(params:OpenIMUpdateFcmTokenParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "disposition": "documented" + }, + { + "id": 2135, + "name": "subscribeUsersStatus", + "signature": "subscribeUsersStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/online-status/subscribe-users-status", + "disposition": "documented" + }, + { + "id": 2136, + "name": "unsubscribeUsersStatus", + "signature": "unsubscribeUsersStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "disposition": "documented" + }, + { + "id": 2137, + "name": "getUserStatus", + "signature": "getUserStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserStatusListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserStatusListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/online-status/subscribe-users-status", + "disposition": "documented" + }, + { + "id": 2138, + "name": "getSubscribeUsersStatus", + "signature": "getSubscribeUsersStatus(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserStatusListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserStatusListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "disposition": "documented" + }, + { + "id": 2139, + "name": "createTextMessage", + "signature": "createTextMessage(text:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-text-message", + "disposition": "documented" + }, + { + "id": 2140, + "name": "createImageMessageFromFullPath", + "signature": "createImageMessageFromFullPath(imageFullPath:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "disposition": "documented" + }, + { + "id": 2141, + "name": "createImageMessageByURL", + "signature": "createImageMessageByURL(params:OpenIMPictureElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "disposition": "documented" + }, + { + "id": 2142, + "name": "createCustomMessage", + "signature": "createCustomMessage(params:OpenIMCreateCustomMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-custom-message", + "disposition": "documented" + }, + { + "id": 2143, + "name": "createQuoteMessage", + "signature": "createQuoteMessage(params:OpenIMCreateQuoteMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-quote-message", + "disposition": "documented" + }, + { + "id": 2144, + "name": "createAdvancedQuoteMessage", + "signature": "createAdvancedQuoteMessage(params:OpenIMCreateAdvancedQuoteMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-quote-message", + "disposition": "documented" + }, + { + "id": 2145, + "name": "createAdvancedTextMessage", + "signature": "createAdvancedTextMessage(params:OpenIMCreateAdvancedTextMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-custom-message", + "disposition": "documented" + }, + { + "id": 2146, + "name": "createTextAtMessage", + "signature": "createTextAtMessage(params:OpenIMCreateTextAtMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "disposition": "documented" + }, + { + "id": 2147, + "name": "createSoundMessageFromFullPath", + "signature": "createSoundMessageFromFullPath(params:OpenIMCreateSoundMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "disposition": "documented" + }, + { + "id": 2148, + "name": "createSoundMessageByURL", + "signature": "createSoundMessageByURL(params:OpenIMSoundElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "disposition": "documented" + }, + { + "id": 2149, + "name": "createVideoMessageFromFullPath", + "signature": "createVideoMessageFromFullPath(params:OpenIMCreateVideoMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "disposition": "documented" + }, + { + "id": 2150, + "name": "createVideoMessageByURL", + "signature": "createVideoMessageByURL(params:OpenIMVideoElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "disposition": "documented" + }, + { + "id": 2151, + "name": "createFileMessageFromFullPath", + "signature": "createFileMessageFromFullPath(params:OpenIMCreateFileMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "disposition": "documented" + }, + { + "id": 2152, + "name": "createFileMessageByURL", + "signature": "createFileMessageByURL(params:OpenIMFileElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "disposition": "documented" + }, + { + "id": 2153, + "name": "createMergerMessage", + "signature": "createMergerMessage(params:OpenIMCreateMergerMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-merger-message", + "disposition": "documented" + }, + { + "id": 2154, + "name": "createForwardMessage", + "signature": "createForwardMessage(message:OpenIMMessageItem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-forward-message", + "disposition": "documented" + }, + { + "id": 2155, + "name": "createFaceMessage", + "signature": "createFaceMessage(params:OpenIMCreateFaceMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-face-message", + "disposition": "documented" + }, + { + "id": 2156, + "name": "createLocationMessage", + "signature": "createLocationMessage(params:OpenIMCreateLocationMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-location-message", + "disposition": "documented" + }, + { + "id": 2157, + "name": "createCardMessage", + "signature": "createCardMessage(card:OpenIMCardElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-card-message", + "disposition": "documented" + }, + { + "id": 2158, + "name": "sendMessage", + "signature": "sendMessage(options:OpenIMSendMessageOptions):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem", + "responseSchema": { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/sending-messages/send-message", + "disposition": "documented" + }, + { + "id": 2159, + "name": "sendMessageNotOss", + "signature": "sendMessageNotOss(options:OpenIMSendMessageOptions):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem", + "responseSchema": { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "disposition": "documented" + }, + { + "id": 2160, + "name": "uploadFile", + "signature": "uploadFile(params:OpenIMUploadFileParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUploadFileResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUploadFileResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/file-uploads/upload-file", + "disposition": "documented" + }, + { + "id": 2161, + "name": "uploadLogs", + "signature": "uploadLogs(params:OpenIMUploadLogsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/logger", + "disposition": "documented" + }, + { + "id": 200002, + "name": "onChangedPinnedMsg", + "signature": "onChangedPinnedMsg(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "disposition": "documented" + }, + { + "id": 200003, + "name": "onDeleteUserAllMsgsInConv", + "signature": "onDeleteUserAllMsgsInConv(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "disposition": "documented" + }, + { + "id": 200004, + "name": "onMessageModified", + "signature": "onMessageModified(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/modify-a-message", + "disposition": "documented" + }, + { + "id": 200005, + "name": "onMessageEdited", + "signature": "onMessageEdited(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/modify-a-message", + "disposition": "documented" + }, + { + "id": 200006, + "name": "onRecvGroupReadReceipt", + "signature": "onRecvGroupReadReceipt(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "disposition": "documented" + }, + { + "id": 200007, + "name": "onRecvMessageExtensionsAdded", + "signature": "onRecvMessageExtensionsAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented" + }, + { + "id": 200008, + "name": "onRecvMessageExtensionsChanged", + "signature": "onRecvMessageExtensionsChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented" + }, + { + "id": 200009, + "name": "onRecvMessageExtensionsDeleted", + "signature": "onRecvMessageExtensionsDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented" + }, + { + "id": 200010, + "name": "onConversationGroupAdded", + "signature": "onConversationGroupAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented" + }, + { + "id": 200011, + "name": "onConversationGroupChanged", + "signature": "onConversationGroupChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented" + }, + { + "id": 200012, + "name": "onConversationGroupDeleted", + "signature": "onConversationGroupDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented" + }, + { + "id": 200013, + "name": "onConversationGroupMemberAdded", + "signature": "onConversationGroupMemberAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented" + }, + { + "id": 200014, + "name": "onConversationGroupMemberDeleted", + "signature": "onConversationGroupMemberDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented" + }, + { + "id": 200015, + "name": "onGroupApplicationBadgeCountChanged", + "signature": "onGroupApplicationBadgeCountChanged(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "disposition": "documented" + }, + { + "id": 200016, + "name": "onReceiveNewInvitation", + "signature": "onReceiveNewInvitation(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200017, + "name": "onInviteeAccepted", + "signature": "onInviteeAccepted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200018, + "name": "onInviteeAcceptedByOtherDevice", + "signature": "onInviteeAcceptedByOtherDevice(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200019, + "name": "onInviteeRejected", + "signature": "onInviteeRejected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200020, + "name": "onInviteeRejectedByOtherDevice", + "signature": "onInviteeRejectedByOtherDevice(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200021, + "name": "onInvitationCancelled", + "signature": "onInvitationCancelled(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200022, + "name": "onInvitationTimeout", + "signature": "onInvitationTimeout(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200023, + "name": "onHangUp", + "signature": "onHangUp(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200024, + "name": "onRoomParticipantConnected", + "signature": "onRoomParticipantConnected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200025, + "name": "onRoomParticipantDisconnected", + "signature": "onRoomParticipantDisconnected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200026, + "name": "onReceiveCustomSignaling", + "signature": "onReceiveCustomSignaling(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "disposition": "documented" + }, + { + "id": 200027, + "name": "onReceiveCustomSignal", + "signature": "onReceiveCustomSignal(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "disposition": "documented" + }, + { + "id": 200028, + "name": "onStreamChange", + "signature": "onStreamChange(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented" + }, + { + "id": 200029, + "name": "onMessageKvInfoChanged", + "signature": "onMessageKvInfoChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented" + }, + { + "id": 200030, + "name": "onMigrationStart", + "signature": "onMigrationStart(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented" + }, + { + "id": 200031, + "name": "onMigrationProgress", + "signature": "onMigrationProgress(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented" + }, + { + "id": 200032, + "name": "onMigrationFailed", + "signature": "onMigrationFailed(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented" + }, + { + "id": 200033, + "name": "onMigrationFinished", + "signature": "onMigrationFinished(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented" + }, + { + "id": 200086, + "name": "onSDKSessionChanged", + "signature": "onSDKSessionChanged(handler:SDKSessionChangedHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": true, + "page": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "disposition": "documented" + }, + { + "id": 200034, + "name": "cancelUpload", + "signature": "cancelUpload(params:OpenIMCancelUploadParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/file-uploads/upload-file", + "disposition": "documented" + }, + { + "id": 200035, + "name": "speechToText", + "signature": "speechToText(params:OpenIMSpeechToTextParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSpeechToTextResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSpeechToTextResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "disposition": "documented" + }, + { + "id": 200036, + "name": "getSpeechToTextCapabilities", + "signature": "getSpeechToTextCapabilities(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSpeechToTextCapabilitiesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSpeechToTextCapabilitiesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "disposition": "documented" + }, + { + "id": 200081, + "name": "updateToken", + "signature": "updateToken(params:OpenIMUpdateTokenParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "disposition": "documented" + }, + { + "id": 200082, + "name": "translateText", + "signature": "translateText(params:OpenIMTranslateTextParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMTranslateTextResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMTranslateTextResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "disposition": "documented" + }, + { + "id": 200037, + "name": "getInputStates", + "signature": "getInputStates(params:OpenIMGetInputStatesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetInputStatesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetInputStatesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/get-typing-status", + "disposition": "documented" + }, + { + "id": 200038, + "name": "resetConversationUnread", + "signature": "resetConversationUnread(params:OpenIMResetConversationUnreadParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "disposition": "documented" + }, + { + "id": 200039, + "name": "createConversationGroup", + "signature": "createConversationGroup(params:OpenIMCreateConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMCreateConversationGroupResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCreateConversationGroupResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "disposition": "documented" + }, + { + "id": 200040, + "name": "updateConversationGroup", + "signature": "updateConversationGroup(params:OpenIMUpdateConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUpdateConversationGroupResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUpdateConversationGroupResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "disposition": "documented" + }, + { + "id": 200041, + "name": "deleteConversationGroup", + "signature": "deleteConversationGroup(params:OpenIMDeleteConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "disposition": "documented" + }, + { + "id": 200042, + "name": "getConversationGroups", + "signature": "getConversationGroups(params:OpenIMGetConversationGroupsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupsResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupsResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "disposition": "documented" + }, + { + "id": 200043, + "name": "setConversationGroupOrder", + "signature": "setConversationGroupOrder(params:OpenIMSetConversationGroupOrderParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "disposition": "documented" + }, + { + "id": 200044, + "name": "addConversationsToGroups", + "signature": "addConversationsToGroups(params:OpenIMConversationGroupMembershipParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "disposition": "documented" + }, + { + "id": 200045, + "name": "removeConversationsFromGroups", + "signature": "removeConversationsFromGroups(params:OpenIMConversationGroupMembershipParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "disposition": "documented" + }, + { + "id": 200046, + "name": "getConversationGroupByConversationID", + "signature": "getConversationGroupByConversationID(params:OpenIMGetConversationGroupByConversationIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupByConversationIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupByConversationIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "disposition": "documented" + }, + { + "id": 200047, + "name": "getConversationGroupInfoWithConversations", + "signature": "getConversationGroupInfoWithConversations(params:OpenIMGetConversationGroupInfoWithConversationsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupInfoWithConversationsResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupInfoWithConversationsResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "disposition": "documented" + }, + { + "id": 200048, + "name": "updateFriend", + "signature": "updateFriend(params:OpenIMUpdateFriendParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friends/update-friends", + "disposition": "documented" + }, + { + "id": 200049, + "name": "deleteFriendRequests", + "signature": "deleteFriendRequests(params:OpenIMDeleteFriendRequestsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "disposition": "documented" + }, + { + "id": 200050, + "name": "getBlacks", + "signature": "getBlacks(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetBlacksResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetBlacksResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented" + }, + { + "id": 200051, + "name": "deleteGroupRequests", + "signature": "deleteGroupRequests(params:OpenIMDeleteGroupRequestsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/group-applications/delete-group-requests", + "disposition": "documented" + }, + { + "id": 200052, + "name": "checkLocalGroupFullSync", + "signature": "checkLocalGroupFullSync(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFullSyncResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFullSyncResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/check-full-sync-state", + "disposition": "documented" + }, + { + "id": 200053, + "name": "checkGroupMemberFullSync", + "signature": "checkGroupMemberFullSync(params:OpenIMCheckGroupMemberFullSyncParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFullSyncResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFullSyncResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/group/check-full-sync-state", + "disposition": "documented" + }, + { + "id": 200054, + "name": "getAtAllTag", + "signature": "getAtAllTag(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAtAllTagResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAtAllTagResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "disposition": "documented" + }, + { + "id": 200055, + "name": "sendGroupMessageReadReceipt", + "signature": "sendGroupMessageReadReceipt(params:OpenIMSendGroupMessageReadReceiptParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "disposition": "documented" + }, + { + "id": 200056, + "name": "getGroupMessageReaderList", + "signature": "getGroupMessageReaderList(params:OpenIMGetGroupMessageReaderListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetGroupMessageReaderListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetGroupMessageReaderListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "disposition": "documented" + }, + { + "id": 200057, + "name": "fetchSurroundingMessages", + "signature": "fetchSurroundingMessages(params:OpenIMFetchSurroundingMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFetchSurroundingMessagesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFetchSurroundingMessagesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "disposition": "documented" + }, + { + "id": 200058, + "name": "modifyMessage", + "signature": "modifyMessage(params:OpenIMModifyMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMModifyMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMModifyMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/modify-a-message", + "disposition": "documented" + }, + { + "id": 200084, + "name": "translateMessage", + "signature": "translateMessage(params:OpenIMTranslateMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "disposition": "documented" + }, + { + "id": 200059, + "name": "setConversationPinnedMsg", + "signature": "setConversationPinnedMsg(params:OpenIMSetConversationPinnedMsgParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "disposition": "documented" + }, + { + "id": 200060, + "name": "getConversationPinnedMsg", + "signature": "getConversationPinnedMsg(params:OpenIMGetConversationPinnedMsgParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationPinnedMsgResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationPinnedMsgResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "disposition": "documented" + }, + { + "id": 200061, + "name": "setMessageLocalContent", + "signature": "setMessageLocalContent(params:OpenIMSetMessageLocalContentParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "disposition": "documented" + }, + { + "id": 200062, + "name": "getHistoryMessageList", + "signature": "getHistoryMessageList(params:OpenIMGetHistoryMessageListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAdvancedHistoryMessageListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAdvancedHistoryMessageListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "disposition": "documented" + }, + { + "id": 200063, + "name": "typingStatusUpdate", + "signature": "typingStatusUpdate(params:OpenIMTypingStatusUpdateParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/composing-messages/update-typing-status", + "disposition": "documented" + }, + { + "id": 200064, + "name": "deleteMessages", + "signature": "deleteMessages(params:OpenIMDeleteMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "disposition": "documented" + }, + { + "id": 200065, + "name": "deleteUserAllMessagesInConv", + "signature": "deleteUserAllMessagesInConv(params:OpenIMDeleteUserAllMessagesInConvParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "disposition": "documented" + }, + { + "id": 200066, + "name": "createMarkdownMessage", + "signature": "createMarkdownMessage(params:OpenIMCreateMarkdownMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "disposition": "documented" + }, + { + "id": 200067, + "name": "createImageMessage", + "signature": "createImageMessage(params:OpenIMCreateImageMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "disposition": "documented" + }, + { + "id": 200068, + "name": "createSoundMessage", + "signature": "createSoundMessage(params:OpenIMCreateSoundMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "disposition": "documented" + }, + { + "id": 200069, + "name": "createVideoMessage", + "signature": "createVideoMessage(params:OpenIMCreateVideoMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "disposition": "documented" + }, + { + "id": 200070, + "name": "createFileMessage", + "signature": "createFileMessage(params:OpenIMCreateFileMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "disposition": "documented" + }, + { + "id": 200071, + "name": "signalingInvite", + "signature": "signalingInvite(params:OpenIMSignalingInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingInviteResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInviteResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/start-single-call", + "disposition": "documented" + }, + { + "id": 200072, + "name": "signalingInviteInGroup", + "signature": "signalingInviteInGroup(params:OpenIMSignalingInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingInviteResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInviteResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/start-group-call", + "disposition": "documented" + }, + { + "id": 200073, + "name": "signalingAccept", + "signature": "signalingAccept(params:OpenIMSignalingAcceptParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingAcceptResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingAcceptResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/accept-call", + "disposition": "documented" + }, + { + "id": 200074, + "name": "signalingReject", + "signature": "signalingReject(params:OpenIMSignalingRejectParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/reject-call", + "disposition": "documented" + }, + { + "id": 200075, + "name": "signalingCancel", + "signature": "signalingCancel(params:OpenIMSignalingCancelParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/cancel-call", + "disposition": "documented" + }, + { + "id": 200076, + "name": "signalingHungUp", + "signature": "signalingHungUp(params:OpenIMSignalingHungUpParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "disposition": "documented" + }, + { + "id": 200077, + "name": "signalingGetTokenByRoomID", + "signature": "signalingGetTokenByRoomID(params:OpenIMSignalingGetTokenByRoomIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetTokenByRoomIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetTokenByRoomIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "disposition": "documented" + }, + { + "id": 200078, + "name": "signalingGetRoomByGroupID", + "signature": "signalingGetRoomByGroupID(params:OpenIMSignalingGetRoomByGroupIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetRoomByGroupIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetRoomByGroupIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "disposition": "documented" + }, + { + "id": 200079, + "name": "signalingGetInvitationInfoStartApp", + "signature": "signalingGetInvitationInfoStartApp(params?:OpenIMSignalingGetInvitationInfoStartAppParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetInvitationInfoStartAppResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetInvitationInfoStartAppResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "disposition": "documented" + }, + { + "id": 200080, + "name": "signalingSendCustomSignaling", + "signature": "signalingSendCustomSignaling(params:OpenIMSignalingSendCustomSignalingParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false, + "page": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "disposition": "documented" + }, + { + "id": 200085, + "name": "getSDKSessionSnapshot", + "signature": "getSDKSessionSnapshot():Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSDKSessionSnapshot", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKSessionSnapshot" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": true, + "synthetic": false, + "page": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "disposition": "documented" + } + ], + "events": [ + { + "name": "onConnecting", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onConnectSuccess", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onConnectFailed", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onKickedOffline", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onUserTokenExpired", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onUserTokenInvalid", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onRecvNewMessage", + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onRecvOfflineNewMessage", + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onRecvOnlineOnlyMessage", + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onMsgDeleted", + "page": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onNewRecvMessageRevoked", + "page": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onRecvC2CReadReceipt", + "page": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onRecvNewMessages", + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onRecvOfflineNewMessages", + "page": "/sdk/uniapp/message/receiving-messages/receive-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onConversationChanged", + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onConversationUserInputStatusChanged", + "page": "/sdk/uniapp/message/composing-messages/update-typing-status", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onNewConversation", + "page": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onSyncServerFailed", + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onSyncServerFinish", + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onSyncServerProgress", + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onSyncServerStart", + "page": "/sdk/uniapp/events/overview-events", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onSendMessageProgress", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onUploadFileProgress", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onUploadLogsProgress", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onTotalUnreadMessageCountChanged", + "page": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onRecvCustomBusinessMessage", + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onBlackAdded", + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onBlackDeleted", + "page": "/sdk/uniapp/user/blacklist/get-black-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendAdded", + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendApplicationAccepted", + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendApplicationAdded", + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendApplicationDeleted", + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendApplicationRejected", + "page": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendDeleted", + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onFriendInfoChanged", + "page": "/sdk/uniapp/user/friends/get-friend-list-page", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupApplicationAccepted", + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupApplicationAdded", + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupApplicationDeleted", + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupApplicationRejected", + "page": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupDismissed", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupInfoChanged", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupMemberAdded", + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupMemberDeleted", + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onGroupMemberInfoChanged", + "page": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onJoinedGroupAdded", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onJoinedGroupDeleted", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onSelfInfoUpdated", + "page": "/sdk/uniapp/user/profile/set-self-info", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onUserStatusChanged", + "page": "/sdk/uniapp/user/online-status/subscribe-users-status", + "disposition": "documented", + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": false + }, + { + "name": "onChangedPinnedMsg", + "page": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onDeleteUserAllMsgsInConv", + "page": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMessageModified", + "page": "/sdk/uniapp/message/managing-messages/modify-a-message", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMessageEdited", + "page": "/sdk/uniapp/message/managing-messages/modify-a-message", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRecvGroupReadReceipt", + "page": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRecvMessageExtensionsAdded", + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRecvMessageExtensionsChanged", + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRecvMessageExtensionsDeleted", + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onConversationGroupAdded", + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onConversationGroupChanged", + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onConversationGroupDeleted", + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onConversationGroupMemberAdded", + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onConversationGroupMemberDeleted", + "page": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onGroupApplicationBadgeCountChanged", + "page": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "scalar", + "synthetic": false + }, + { + "name": "onReceiveNewInvitation", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInviteeAccepted", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInviteeAcceptedByOtherDevice", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInviteeRejected", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInviteeRejectedByOtherDevice", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInvitationCancelled", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onInvitationTimeout", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onHangUp", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRoomParticipantConnected", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onRoomParticipantDisconnected", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onReceiveCustomSignaling", + "page": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onReceiveCustomSignal", + "page": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onStreamChange", + "page": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMessageKvInfoChanged", + "page": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMigrationStart", + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onMigrationProgress", + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMigrationFailed", + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "opaque-string", + "synthetic": false + }, + { + "name": "onMigrationFinished", + "page": "/sdk/uniapp/events/handle-data-migration-events", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "payloadProfile": "void", + "synthetic": false + }, + { + "name": "onSDKSessionChanged", + "page": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "disposition": "documented", + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "payloadProfile": "typed", + "synthetic": true + } + ] +} diff --git a/data/structure/uniapp-content-audit.json b/data/structure/uniapp-content-audit.json new file mode 100644 index 0000000000..d9b803bb18 --- /dev/null +++ b/data/structure/uniapp-content-audit.json @@ -0,0 +1,7012 @@ +{ + "schemaVersion": 1, + "sources": { + "openimDocs": { + "repository": "https://github.com/openimsdk/docs", + "commit": "efd0f251b288167e1ca617504b10dd73986429f0" + }, + "uniappSdk": { + "manifest": "data/structure/uniapp-sdk-doc-manifest.json", + "tag": "0.2.0-rc.3", + "commit": "e71e3f68827f9f7af354526fecbaded25dc14de9", + "interfaceSha256": "acbe16c69ba4ddfa2e7bbdcf35a119c88801e93d960520db50de082c2e4234df", + "responseSchemaSha256": "a6a73ab3e368812cbe9b6355fed3edbe59b890aa6e8f73c69e3d06fd23a6c6e5" + } + }, + "pages": [ + { + "currentPath": "/sdk/uniapp/overview", + "targetPath": "/sdk/uniapp/overview", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-08-13:已锁定 Private 0.2.0-rc.3 脱敏文档合同;正文待完整迁移后发布。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/before-you-start", + "targetPath": "/sdk/uniapp/getting-started/before-you-start", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "targetPath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "targetPath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getLoginStatus", + "getLoginUserID", + "login", + "logout", + "networkStatusChanged", + "onConnectFailed", + "onConnectSuccess", + "onConnecting", + "onKickedOffline", + "onUserTokenExpired", + "onUserTokenInvalid", + "setAppBackgroundStatus" + ], + "sdkEvents": [ + "onConnectFailed", + "onConnectSuccess", + "onConnecting", + "onKickedOffline", + "onUserTokenExpired", + "onUserTokenInvalid" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/send-first-message", + "targetPath": "/sdk/uniapp/getting-started/send-first-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "targetPath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getOpenIMDataPath", + "getSdkVersion", + "initSDK", + "unInitSDK" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "targetPath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setAppBadge", + "updateFcmToken" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "targetPath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSDKSessionSnapshot", + "onSDKSessionChanged", + "updateToken" + ], + "sdkEvents": [ + "onSDKSessionChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/overview-user", + "targetPath": "/sdk/uniapp/user/overview-user", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/profile/get-users-info", + "targetPath": "/sdk/uniapp/user/profile/get-users-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getUsersInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/profile/get-self-user-info", + "targetPath": "/sdk/uniapp/user/profile/get-self-user-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSelfUserInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/profile/set-self-info", + "targetPath": "/sdk/uniapp/user/profile/set-self-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onSelfInfoUpdated", + "setSelfInfo" + ], + "sdkEvents": [ + "onSelfInfoUpdated" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/profile/set-global-message-reception", + "targetPath": "/sdk/uniapp/user/profile/set-global-message-reception", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "targetPath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "targetPath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getUserStatus", + "onUserStatusChanged", + "subscribeUsersStatus" + ], + "sdkEvents": [ + "onUserStatusChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "targetPath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSubscribeUsersStatus" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "targetPath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "unsubscribeUsersStatus" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/get-friend-list-page", + "targetPath": "/sdk/uniapp/user/friends/get-friend-list-page", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getFriendList", + "getFriendListPage", + "onFriendAdded", + "onFriendDeleted", + "onFriendInfoChanged" + ], + "sdkEvents": [ + "onFriendAdded", + "onFriendDeleted", + "onFriendInfoChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/search-friends", + "targetPath": "/sdk/uniapp/user/friends/search-friends", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "searchFriends" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "targetPath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSpecifiedFriendsInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/check-friend", + "targetPath": "/sdk/uniapp/user/friends/check-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "checkFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/update-friends", + "targetPath": "/sdk/uniapp/user/friends/update-friends", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "updateFriend", + "updateFriends" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friends/delete-friend", + "targetPath": "/sdk/uniapp/user/friends/delete-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/add-friend", + "targetPath": "/sdk/uniapp/user/friend-applications/add-friend", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "addFriend" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "targetPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getFriendApplicationListAsRecipient", + "onFriendApplicationAccepted", + "onFriendApplicationAdded", + "onFriendApplicationDeleted", + "onFriendApplicationRejected" + ], + "sdkEvents": [ + "onFriendApplicationAccepted", + "onFriendApplicationAdded", + "onFriendApplicationDeleted", + "onFriendApplicationRejected" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "targetPath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getFriendApplicationListAsApplicant" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "targetPath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getFriendApplicationUnhandledCount" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "targetPath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "acceptFriendApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "targetPath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "refuseFriendApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "targetPath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteFriendRequests" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/blacklist/get-black-list", + "targetPath": "/sdk/uniapp/user/blacklist/get-black-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getBlackList", + "getBlacks", + "onBlackAdded", + "onBlackDeleted" + ], + "sdkEvents": [ + "onBlackAdded", + "onBlackDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/blacklist/add-black", + "targetPath": "/sdk/uniapp/user/blacklist/add-black", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "addBlack" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/user/blacklist/remove-black", + "targetPath": "/sdk/uniapp/user/blacklist/remove-black", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "removeBlack" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/overview-conversation", + "targetPath": "/sdk/uniapp/conversation/overview-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "targetPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getOneConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "targetPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getConversationIDBySessionType" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "targetPath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getMultipleConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "targetPath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getAllConversationList", + "getConversationListSplit", + "onConversationChanged", + "onNewConversation" + ], + "sdkEvents": [ + "onConversationChanged", + "onNewConversation" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "targetPath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "searchConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setConversationDraft" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "markConversationMessageAsRead", + "onRecvC2CReadReceipt", + "resetConversationUnread" + ], + "sdkEvents": [ + "onRecvC2CReadReceipt" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "markAllConversationMessageAsRead" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getTotalUnreadMsgCount", + "onTotalUnreadMessageCountChanged" + ], + "sdkEvents": [ + "onTotalUnreadMessageCountChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "hideConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "hideAllConversations" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteConversation" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteConversationAndDeleteAllMsg" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "clearConversationAndDeleteAllMsg" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onConversationGroupAdded", + "onConversationGroupChanged", + "onConversationGroupDeleted", + "onConversationGroupMemberAdded", + "onConversationGroupMemberDeleted" + ], + "sdkEvents": [ + "onConversationGroupAdded", + "onConversationGroupChanged", + "onConversationGroupDeleted", + "onConversationGroupMemberAdded", + "onConversationGroupMemberDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createConversationGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getConversationGroups" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getConversationGroupInfoWithConversations" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getConversationGroupByConversationID" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "updateConversationGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setConversationGroupOrder" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "addConversationsToGroups" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "removeConversationsFromGroups" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "targetPath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteConversationGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/overview-group", + "targetPath": "/sdk/uniapp/group/overview-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onGroupDismissed", + "onGroupInfoChanged", + "onJoinedGroupAdded", + "onJoinedGroupDeleted" + ], + "sdkEvents": [ + "onGroupDismissed", + "onGroupInfoChanged", + "onJoinedGroupAdded", + "onJoinedGroupDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/create-group", + "targetPath": "/sdk/uniapp/group/create-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/update-group-profile", + "targetPath": "/sdk/uniapp/group/update-group-profile", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setGroupInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/set-group-announcement", + "targetPath": "/sdk/uniapp/group/set-group-announcement", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/set-group-extension", + "targetPath": "/sdk/uniapp/group/set-group-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/set-group-join-verification", + "targetPath": "/sdk/uniapp/group/set-group-join-verification", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/set-group-member-profile-access", + "targetPath": "/sdk/uniapp/group/set-group-member-profile-access", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/set-group-member-friend-permission", + "targetPath": "/sdk/uniapp/group/set-group-member-friend-permission", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/change-group-mute", + "targetPath": "/sdk/uniapp/group/change-group-mute", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "changeGroupMute" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/join-group", + "targetPath": "/sdk/uniapp/group/join-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "joinGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/quit-group", + "targetPath": "/sdk/uniapp/group/quit-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "quitGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/dismiss-group", + "targetPath": "/sdk/uniapp/group/dismiss-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "dismissGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "targetPath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSpecifiedGroupsInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "targetPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getJoinedGroupList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "targetPath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getJoinedGroupListPage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "targetPath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "isJoinGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "targetPath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "searchGroups" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "targetPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getGroupApplicationListAsRecipient", + "onGroupApplicationAccepted", + "onGroupApplicationAdded", + "onGroupApplicationDeleted", + "onGroupApplicationRejected" + ], + "sdkEvents": [ + "onGroupApplicationAccepted", + "onGroupApplicationAdded", + "onGroupApplicationDeleted", + "onGroupApplicationRejected" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "targetPath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getGroupApplicationListAsApplicant" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "targetPath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getGroupApplicationUnhandledCount" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "targetPath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onGroupApplicationBadgeCountChanged" + ], + "sdkEvents": [ + "onGroupApplicationBadgeCountChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/accept-group-application", + "targetPath": "/sdk/uniapp/group/group-applications/accept-group-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "acceptGroupApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "targetPath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "refuseGroupApplication" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "targetPath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteGroupRequests" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "targetPath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getGroupMemberList", + "onGroupMemberAdded", + "onGroupMemberDeleted", + "onGroupMemberInfoChanged" + ], + "sdkEvents": [ + "onGroupMemberAdded", + "onGroupMemberDeleted", + "onGroupMemberInfoChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "targetPath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSpecifiedGroupMembersInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "targetPath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getUsersInGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "targetPath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "searchGroupMembers" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "targetPath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "inviteUserToGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "targetPath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "kickGroupMember" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "targetPath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setGroupMemberInfo" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "targetPath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "targetPath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "targetPath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "targetPath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "transferGroupOwner" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "targetPath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "changeGroupMemberMute" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/group/check-full-sync-state", + "targetPath": "/sdk/uniapp/group/check-full-sync-state", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "checkGroupMemberFullSync", + "checkLocalGroupFullSync" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/overview-message", + "targetPath": "/sdk/uniapp/message/overview-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onSendMessageProgress", + "onUploadFileProgress", + "onUploadLogsProgress" + ], + "sdkEvents": [ + "onSendMessageProgress", + "onUploadFileProgress", + "onUploadLogsProgress" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-text-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-text-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createTextMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createTextAtMessage", + "getAtAllTag" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createAdvancedTextMessage", + "createCustomMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "targetPath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createImageMessage", + "createImageMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "targetPath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createImageMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "targetPath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createSoundMessage", + "createSoundMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "targetPath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createSoundMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "targetPath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createVideoMessage", + "createVideoMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "targetPath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createVideoMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "targetPath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createFileMessage", + "createFileMessageFromFullPath" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "targetPath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createFileMessageByURL" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-card-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-card-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createCardMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-location-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-location-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createLocationMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-face-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-face-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createFaceMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createAdvancedQuoteMessage", + "createQuoteMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createMarkdownMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createForwardMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "targetPath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "createMergerMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/sending-messages/send-message", + "targetPath": "/sdk/uniapp/message/sending-messages/send-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "sendMessage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "targetPath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "sendMessageNotOss" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "targetPath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onRecvNewMessage", + "onRecvNewMessages", + "onRecvOfflineNewMessage", + "onRecvOfflineNewMessages", + "onRecvOnlineOnlyMessage" + ], + "sdkEvents": [ + "onRecvNewMessage", + "onRecvNewMessages", + "onRecvOfflineNewMessage", + "onRecvOfflineNewMessages", + "onRecvOnlineOnlyMessage" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "targetPath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onMessageKvInfoChanged", + "onRecvCustomBusinessMessage", + "onRecvMessageExtensionsAdded", + "onRecvMessageExtensionsChanged", + "onRecvMessageExtensionsDeleted" + ], + "sdkEvents": [ + "onMessageKvInfoChanged", + "onRecvCustomBusinessMessage", + "onRecvMessageExtensionsAdded", + "onRecvMessageExtensionsChanged", + "onRecvMessageExtensionsDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "targetPath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getAdvancedHistoryMessageList", + "getHistoryMessageList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "targetPath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "findMessageList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "targetPath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "fetchSurroundingMessages" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/searching-messages/search-messages", + "targetPath": "/sdk/uniapp/message/searching-messages/search-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "searchLocalMessages" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "targetPath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "changeInputStates", + "onConversationUserInputStatusChanged", + "typingStatusUpdate" + ], + "sdkEvents": [ + "onConversationUserInputStatusChanged" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "targetPath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getInputStates" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "targetPath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getSpeechToTextCapabilities" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "targetPath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "speechToText" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "targetPath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setMessageLocalContent" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "targetPath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "translateMessage", + "translateText" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "targetPath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteMessage", + "deleteMessageFromLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "targetPath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteMessages", + "onMsgDeleted" + ], + "sdkEvents": [ + "onMsgDeleted" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "targetPath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteUserAllMessagesInConv", + "onDeleteUserAllMsgsInConv" + ], + "sdkEvents": [ + "onDeleteUserAllMsgsInConv" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "targetPath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onNewRecvMessageRevoked", + "revokeMessage" + ], + "sdkEvents": [ + "onNewRecvMessageRevoked" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "targetPath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "modifyMessage", + "onMessageEdited", + "onMessageModified" + ], + "sdkEvents": [ + "onMessageEdited", + "onMessageModified" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "targetPath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getConversationPinnedMsg" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "targetPath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onChangedPinnedMsg", + "setConversationPinnedMsg" + ], + "sdkEvents": [ + "onChangedPinnedMsg" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "targetPath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "insertSingleMessageToLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "targetPath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "insertGroupMessageToLocalStorage" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "targetPath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteAllMsgFromLocal" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "targetPath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "deleteAllMsgFromLocalAndSvr" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "targetPath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "setMessageLocalEx" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "targetPath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onRecvGroupReadReceipt", + "sendGroupMessageReadReceipt" + ], + "sdkEvents": [ + "onRecvGroupReadReceipt" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "targetPath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "getGroupMessageReaderList" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/file-uploads/upload-file", + "targetPath": "/sdk/uniapp/file-uploads/upload-file", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "cancelUpload", + "uploadFile" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/overview-calling", + "targetPath": "/sdk/uniapp/calling/overview-calling", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingInvite" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingInviteInGroup" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/accept-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/accept-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingAccept" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/reject-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/reject-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingReject" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingCancel" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "targetPath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingHungUp" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "targetPath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onHangUp", + "onInvitationCancelled", + "onInvitationTimeout", + "onInviteeAccepted", + "onInviteeAcceptedByOtherDevice", + "onInviteeRejected", + "onInviteeRejectedByOtherDevice", + "onReceiveNewInvitation", + "onRoomParticipantConnected", + "onRoomParticipantDisconnected", + "onStreamChange" + ], + "sdkEvents": [ + "onHangUp", + "onInvitationCancelled", + "onInvitationTimeout", + "onInviteeAccepted", + "onInviteeAcceptedByOtherDevice", + "onInviteeRejected", + "onInviteeRejectedByOtherDevice", + "onReceiveNewInvitation", + "onRoomParticipantConnected", + "onRoomParticipantDisconnected", + "onStreamChange" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "targetPath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingGetInvitationInfoStartApp" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "targetPath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingGetRoomByGroupID" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "targetPath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "signalingGetTokenByRoomID" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "targetPath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onReceiveCustomSignal", + "onReceiveCustomSignaling", + "signalingSendCustomSignaling" + ], + "sdkEvents": [ + "onReceiveCustomSignal", + "onReceiveCustomSignaling" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/events/overview-events", + "targetPath": "/sdk/uniapp/events/overview-events", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "off", + "offAll", + "onSyncServerFailed", + "onSyncServerFinish", + "onSyncServerProgress", + "onSyncServerStart" + ], + "sdkEvents": [ + "onSyncServerFailed", + "onSyncServerFinish", + "onSyncServerProgress", + "onSyncServerStart" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/events/handle-data-migration-events", + "targetPath": "/sdk/uniapp/events/handle-data-migration-events", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "onMigrationFailed", + "onMigrationFinished", + "onMigrationProgress", + "onMigrationStart" + ], + "sdkEvents": [ + "onMigrationFailed", + "onMigrationFinished", + "onMigrationProgress", + "onMigrationStart" + ], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/logger", + "targetPath": "/sdk/uniapp/logger", + "sourceKind": "openim-specific", + "disposition": "adapt", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [ + "uploadLogs" + ], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "api-verified", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:已依最新 WASM 文档路径建立结构记录;正文仍待逐页人工核对。" + ] + }, + { + "currentPath": "/sdk/uniapp/conversation/managing-conversations/clear-local-conversations", + "targetPath": "/sdk/uniapp/conversation/managing-conversations/clear-local-conversations", + "sourceKind": "openim-specific", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "structure-only", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:固定 Dart SDK 宣告没有该页面的公开能力;不纳入导航且不得编造替代 API。" + ], + "disposition": "omit" + }, + { + "currentPath": "/sdk/uniapp/group/group-applications/clear-group-application-badge-count", + "targetPath": "/sdk/uniapp/group/group-applications/clear-group-application-badge-count", + "sourceKind": "openim-specific", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "structure-only", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:固定 Dart SDK 宣告没有该页面的公开能力;不纳入导航且不得编造替代 API。" + ], + "disposition": "omit" + }, + { + "currentPath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-owner-and-admin", + "targetPath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-owner-and-admin", + "sourceKind": "openim-specific", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "structure-only", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:固定 Dart SDK 宣告没有该页面的公开能力;不纳入导航且不得编造替代 API。" + ], + "disposition": "omit" + }, + { + "currentPath": "/sdk/uniapp/message/retrieving-messages/load-newer-messages", + "targetPath": "/sdk/uniapp/message/retrieving-messages/load-newer-messages", + "sourceKind": "openim-specific", + "openimSources": [ + "https://github.com/openimsdk/docs/tree/efd0f251b288167e1ca617504b10dd73986429f0/docs/sdks", + "data/structure/uniapp-sdk-doc-manifest.json#e71e3f68827f9f7af354526fecbaded25dc14de9" + ], + "sdkMethods": [], + "sdkEvents": [], + "locales": { + "zh": { + "reviewStatus": "structure-only", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + }, + "en": { + "reviewStatus": "deferred", + "reviewer": null, + "reviewedAt": null, + "exampleVerification": { + "status": "pending", + "evidence": [], + "reason": null + } + } + }, + "redirectTo": null, + "notes": [ + "2026-07-20:固定 Dart SDK 宣告没有该页面的公开能力;不纳入导航且不得编造替代 API。" + ], + "disposition": "omit" + } + ] +} diff --git a/data/structure/uniapp-navigation-labels.json b/data/structure/uniapp-navigation-labels.json new file mode 100644 index 0000000000..21c4f46f2f --- /dev/null +++ b/data/structure/uniapp-navigation-labels.json @@ -0,0 +1,358 @@ +{ + "Accept a call": "接受通话", + "Accept a friend application": "接受好友申请", + "Accept a group application": "接受入群申请", + "Add a user to the blacklist": "将用户加入黑名单", + "Add conversations to groups": "添加会话到分组", + "Add extra data to a message": "为消息添加扩展数据", + "addConversationsToGroups": "添加会话到分组", + "Apply to join a group": "申请加入群组", + "Audio and video calling overview": "音视频通话概览", + "Authenticate and manage a session": "认证与管理登录会话", + "authenticate-and-manage-session": "认证与管理登录会话", + "Before you start": "开始之前", + "before-you-start": "开始之前", + "Blacklist": "黑名单", + "Blacklist overview": "黑名单概览", + "Block or unblock users": "拉黑或取消拉黑用户", + "calling": "音视频通话", + "Calling": "音视频通话", + "Calling overview": "音视频通话概览", + "Cancel a call invitation": "取消通话邀请", + "Change group mute status": "设置群组全员禁言", + "Check friendship status": "检查好友关系", + "Check group membership": "检查是否已加入群组", + "Check speech recognition support": "检查语音识别能力", + "Check users in a group": "查询用户入群状态", + "Clear all local conversations": "清理全部本地会话", + "Clear all local messages": "清理全部本地消息", + "Clear all saved messages": "清理本地与服务端消息", + "Clear message history": "清理消息历史", + "Clear messages in a conversation": "清空会话消息", + "Clear the group application badge": "清除入群申请角标", + "Composing messages": "输入状态与语音转写", + "composing-messages": "输入状态与语音转写", + "Configure a conversation": "设置会话属性", + "conversation": "会话", + "Conversation": "会话", + "Conversation group overview": "会话分组概览", + "Conversation groups": "会话分组", + "Conversation organization": "会话整理", + "Conversation overview": "会话概览", + "Create a contact card message": "创建名片消息", + "Create a conversation group": "创建会话分组", + "Create a custom message": "创建自定义消息", + "Create a file message": "创建文件消息", + "Create a file message from a file": "使用文件创建文件消息", + "Create a file message from a path": "使用本地路径创建文件消息", + "Create a file message from a URL": "使用 URL 创建文件消息", + "Create a forwarded message": "创建转发消息", + "Create a group": "创建群组", + "Create a location message": "创建位置消息", + "Create a Markdown message": "创建 Markdown 消息", + "Create a mention message": "创建 @ 消息", + "Create a merged message": "创建合并消息", + "Create a reply message": "创建回复消息", + "Create a rich reply": "创建富文本回复", + "Create a text message": "创建文本消息", + "Create a video message": "创建视频消息", + "Create a video message from a file": "使用文件创建视频消息", + "Create a video message from a path": "使用本地路径创建视频消息", + "Create a video message from a URL": "使用 URL 创建视频消息", + "Create an @all marker": "创建 @所有人 标记", + "Create an @all message": "创建 @所有人 消息", + "Create an audio message": "创建音频消息", + "Create an audio message from a file": "使用文件创建音频消息", + "Create an audio message from a path": "使用本地路径创建音频消息", + "Create an audio message from a URL": "使用 URL 创建音频消息", + "Create an emoji message": "创建表情消息", + "Create an image message": "创建图片消息", + "Create an image message from a file": "使用文件创建图片消息", + "Create an image message from a path": "使用本地路径创建图片消息", + "Create an image message from a URL": "使用 URL 创建图片消息", + "Create media and rich messages": "创建媒体与富消息", + "Create or update a group": "创建或更新群组", + "Create rich text": "创建富文本消息", + "createConversationGroup": "创建会话分组", + "Creating and updating groups": "创建和更新群组", + "Creating messages": "创建消息", + "Creating messages overview": "创建消息概览", + "creating-and-updating-groups": "创建和更新群组", + "Custom message and extra data": "自定义消息与扩展数据", + "Delete a conversation": "删除会话", + "Delete a conversation and its messages": "删除会话及消息", + "Delete a conversation group": "删除会话分组", + "Delete a friend": "删除好友", + "Delete a local message": "删除本地消息", + "Delete a message": "删除消息", + "Delete friend applications": "删除好友申请", + "Delete group applications": "删除入群申请", + "Delete messages from a user": "删除群聊中指定用户的全部消息", + "Delete or clear a conversation": "删除或清空会话", + "Delete or revoke a message": "删除或撤回消息", + "Delete saved messages": "批量删除消息", + "deleteConversationGroup": "删除会话分组", + "Dismiss a group": "解散群组", + "Enable or disable burn after reading": "开启或关闭阅后即焚", + "Environment-specific implementation": "按运行环境接入", + "environment-specific-implementation": "按运行环境接入", + "events": "事件", + "Events": "事件", + "Events overview": "事件概览", + "File upload overview": "文件上传概览", + "Find messages by ID": "按 ID 查找消息", + "Forward or merge a message": "转发或合并消息", + "Friend applications": "好友申请", + "Friend applications overview": "好友申请概览", + "Friends": "好友", + "Friends overview": "好友概览", + "Get a group call room": "查询群组通话房间", + "Get conversation groups": "查询会话分组列表", + "Get conversations by ID": "按 ID 批量获取会话", + "Get conversations in a group": "查询分组内会话", + "Get friend profiles": "查询指定好友资料", + "Get group application badge count": "获取入群申请角标数", + "Get group information": "查询指定群组资料", + "Get group member profiles": "查询指定群成员资料", + "Get group members": "分页查询群成员", + "Get group owners and admins": "获取群主和管理员", + "Get groups for a conversation": "查询会话所属分组", + "Get joined groups": "获取已加入群组", + "Get joined groups by page": "分页获取已加入群组", + "Get pending application count": "获取未处理好友申请数", + "Get pending group application count": "获取未处理入群申请数", + "Get received friend applications": "获取收到的好友申请", + "Get received group applications": "获取收到的入群申请", + "Get room credentials": "获取通话房间 Token", + "Get sent friend applications": "获取发出的好友申请", + "Get sent group applications": "获取发出的入群申请", + "Get subscribed user status": "查询已订阅用户状态", + "Get the @all tag": "获取 @所有人 标签", + "Get the blacklist": "获取黑名单", + "Get the conversation list": "获取会话列表", + "Get the friend list": "分页获取好友列表", + "Get typing status": "查询输入状态", + "Get user profiles": "获取用户资料", + "Get your profile": "获取当前用户资料", + "getConversationGroupIDsByConversationID": "查询会话所属的分组", + "getConversationGroupInfoWithConversations": "查询分组内的会话", + "getConversationGroups": "查询会话分组", + "Getting started": "快速开始", + "getting-started": "快速开始", + "group": "群组", + "Group": "群组", + "Group applications": "入群申请", + "Group applications overview": "入群申请概览", + "Group message read status": "群聊消息已读", + "Group member management overview": "群成员管理概览", + "Group member queries overview": "群成员查询概览", + "Group overview": "群组概览", + "Group permissions": "群权限与管理", + "Group profile and settings": "群资料与设置", + "Group queries overview": "群组查询概览", + "Handle call events": "处理通话事件", + "Hang up a call": "挂断通话", + "Hide a conversation": "隐藏会话", + "Hide all conversations": "隐藏全部会话", + "hide-a-conversation": "隐藏会话", + "Hiding and deleting conversations": "隐藏与删除会话", + "Insert a local direct message": "插入本地单聊消息", + "Insert a local group message": "插入本地群聊消息", + "Insert a local message": "插入本地消息", + "Invite or remove group members": "邀请或移除群成员", + "Invite users to a group": "邀请用户加入群组", + "Join, leave, or dismiss a group": "加入、退出或解散群组", + "Joining and leaving groups": "加入、退出与解散群组", + "joining-and-leaving-groups": "加入和退出群组", + "Leave a group": "退出群组", + "Load message context": "读取消息上下文", + "Load newer messages": "反向加载历史消息", + "Logging": "日志", + "Load older messages": "加载历史消息", + "Locate messages by ID": "按 ID 定位消息", + "logger": "日志", + "Logger": "日志", + "Manage conversation read status": "管理会话已读状态", + "Manage friend requests": "处理好友申请", + "Manage group administrators": "设置管理员", + "Manage group applications": "处理入群申请", + "Manage group message read receipts": "管理消息已读回执", + "Manage message read receipts": "管理消息已读回执", + "Manage typing status": "管理输入状态", + "Managing calls": "管理通话", + "Managing conversation groups": "管理会话分组", + "Managing conversations": "管理会话", + "Managing friends": "管理好友", + "Managing group applications": "管理入群申请", + "Managing group members": "管理群成员", + "Managing messages": "管理消息", + "Managing read status": "管理已读状态", + "managing-calls": "管理通话", + "managing-conversation-groups": "管理会话分组", + "managing-conversations": "管理会话", + "managing-friends": "管理好友", + "managing-group-applications": "管理入群申请", + "managing-group-members": "管理群成员", + "managing-messages": "管理消息", + "managing-read-status": "管理已读状态", + "Mark a conversation as read": "标记会话已读", + "Mark all conversations as read": "将全部会话标为已读", + "Mark or unmark a conversation": "标记或取消标记会话", + "Mention users in a message": "在消息中提及用户", + "message": "消息", + "Message": "消息", + "Message overview": "消息概览", + "Unread status and notifications": "未读与消息提醒", + "Message retention and privacy": "消息保留与隐私", + "Moderating groups": "群组管控", + "Moderating users": "用户黑名单", + "moderating-a-user": "用户黑名单", + "moderating-groups": "群组管控", + "Modify a message": "修改消息", + "modify-a-message": "修改消息", + "Mute a group or member": "禁言群组或群成员", + "Mute or unmute a group member": "设置群成员禁言", + "Online status": "在线状态", + "Online status overview": "在线状态概览", + "Open a conversation": "查询指定会话", + "Overview": "概览", + "overview-calling": "音视频通话概览", + "overview-conversation": "会话概览", + "overview-message": "消息概览", + "overview-user": "用户概览", + "Pin conversation messages": "置顶会话中的消息", + "Pin or unpin a conversation": "置顶或取消置顶会话", + "Pin or unpin a message": "置顶或取消置顶消息", + "Publish a group announcement": "发布或更新群公告", + "Receive custom business messages": "接收自定义业务消息", + "Receive messages": "接收消息", + "receive-messages": "接收消息", + "Receiving messages": "接收消息", + "receiving-messages": "接收消息", + "Reject a call": "拒绝通话", + "Reject a friend application": "拒绝好友申请", + "Reject a group application": "拒绝入群申请", + "Remove a user from the blacklist": "将用户移出黑名单", + "Remove conversations from groups": "从分组移除会话", + "Remove group members": "移除群成员", + "removeConversationsFromGroups": "从分组移除会话", + "Reorder conversation groups": "调整会话分组顺序", + "Relationships": "关系链", + "Reset group mention status": "重置群聊 @ 状态", + "Resolve a conversation ID": "获取会话 ID", + "Restore a pending invitation": "恢复待处理的通话邀请", + "Retrieve a conversation": "获取指定会话", + "Retrieve a conversation list": "获取会话列表", + "Retrieve a list of blocked users": "获取黑名单列表", + "Retrieve a list of friends": "获取好友列表", + "Retrieve a message list": "获取消息列表", + "Retrieve and search groups": "获取和搜索群组", + "Retrieve and update the current user profile": "获取和更新当前用户资料", + "Retrieve call information": "获取通话信息", + "Retrieve conversations": "获取会话", + "Retrieve group members": "获取群成员", + "Retrieve message history": "获取消息历史", + "Retrieve messages": "获取指定消息", + "Retrieve specified friend information": "获取指定好友信息", + "Retrieve specified messages": "按 ID 定位消息", + "Retrieve user online status": "获取用户在线状态", + "Retrieve users": "获取指定用户资料", + "retrieve-conversation-list": "获取会话列表", + "Retrieving and updating user information": "获取和更新用户资料", + "Retrieving call information": "通话恢复与房间信息", + "Retrieving conversations": "查询会话", + "Retrieving group members": "查询群成员", + "Retrieving groups": "查询群组", + "Retrieving messages": "查询消息", + "Retrieving users": "获取用户", + "retrieving-and-updating-user-information": "获取和更新用户资料", + "retrieving-call-information": "获取通话信息", + "retrieving-conversations": "获取会话", + "retrieving-group-members": "获取群成员", + "retrieving-groups": "获取群组", + "retrieving-messages": "获取消息", + "retrieving-users": "获取用户", + "Revoke a message": "撤回消息", + "revoke-a-message": "撤回消息", + "Save a local transcript": "保存本地转写结果", + "Schedule server message deletion": "定期删除服务端消息", + "Search friends": "搜索好友", + "Search conversations": "搜索会话", + "Search group members": "搜索群成员", + "Search groups": "搜索群组", + "Search messages": "搜索消息", + "search-messages": "搜索消息", + "Searching messages": "搜索消息", + "searching-messages": "搜索消息", + "Send a custom signal": "发送自定义信令", + "Send a friend application": "发送好友申请", + "Send a message": "发送消息", + "Send a message without OSS": "发送已上传的媒体消息", + "Send group read receipts": "上报群消息已读", + "Send your first message": "发送第一条消息", + "send-a-custom-signal": "发送自定义信令", + "send-first-message": "发送第一条消息", + "Sending custom signals": "发送自定义信令", + "Sending messages": "发送消息", + "sending-custom-signals": "发送自定义信令", + "sending-messages": "发送消息", + "Set a conversation": "设置会话", + "Set a conversation draft": "设置会话草稿", + "Set a conversation remark": "设置会话备注", + "Set conversation extra data": "设置会话扩展字段", + "Set conversation message reception": "设置会话消息接收方式", + "Set conversation settings": "设置会话属性", + "Set global message reception": "设置全局消息接收方式", + "Set friend request permissions": "设置好友添加权限", + "Set group extra data": "设置群组扩展字段", + "Set group join verification": "设置入群验证方式", + "Set group member extra data": "设置群成员扩展字段", + "Set local message extensions": "设置消息本地扩展", + "Set member friend request permission": "设置群内添加好友权限", + "Set member profile access": "设置成员资料查看权限", + "Set the burn duration": "设置阅后即焚时长", + "set-conversation-draft": "设置会话草稿", + "setConversationGroupOrder": "设置会话分组顺序", + "Start a group call": "发起群聊通话", + "Start a one-to-one call": "发起单聊通话", + "Start or handle a call": "发起或处理通话", + "Subscribe to online status": "订阅用户在线状态", + "Track file upload progress": "监听文件上传进度", + "Track message sending progress": "监听消息发送进度", + "Track the total unread count": "获取消息总未读数", + "Transcribe an audio file": "识别音频文字", + "Transcribe audio": "将音频转为文字", + "Transfer group owner": "转让群主", + "Transfer group ownership": "转让群主", + "Unsubscribe from online status": "取消订阅用户状态", + "Update a conversation group": "更新会话分组", + "Update a group member avatar": "更新群成员头像", + "Update a group nickname": "修改群内昵称", + "Update friend information": "更新好友资料", + "Update group fields": "更新群组字段", + "Update group information": "更新群组资料", + "Update group member information": "更新群成员资料", + "Update group profile": "更新群名称、简介和头像", + "Update or delete friends": "更新或删除好友", + "Update the user profile": "更新用户资料", + "Update typing status": "上报输入状态", + "Update your profile": "更新当前用户资料", + "updateConversationGroup": "更新会话分组", + "Upload a file": "上传文件", + "Upload files and track progress": "上传文件并跟踪进度", + "user": "用户", + "User": "用户", + "User overview": "用户概览", + "User profile": "用户资料", + "User profile overview": "用户资料概览", + "View group message readers": "查询群消息已读成员", + "View pinned messages": "查询会话置顶消息", + "OpenIM SDK for uni-app / uni-app x": "OpenIM uni-app / uni-app x SDK 概览", + "getConversationGroupByConversationID": "查询会话所属的分组", + "Install, initialize, and inspect the SDK": "安装、初始化并检查 SDK", + "Handle App lifecycle and device state": "处理 App 生命周期与设备状态", + "Update tokens and observe SDK sessions": "更新 Token 并观察 SDK 会话", + "Check group full-sync state": "检查群组全量同步状态", + "Translate text and messages": "翻译文本与消息", + "Handle data migration events": "处理数据迁移事件" +} diff --git a/data/structure/uniapp-sdk-doc-manifest.json b/data/structure/uniapp-sdk-doc-manifest.json new file mode 100644 index 0000000000..1cf2931235 --- /dev/null +++ b/data/structure/uniapp-sdk-doc-manifest.json @@ -0,0 +1,18831 @@ +{ + "schemaVersion": 1, + "sdkVersion": "0.2.0-rc.3", + "baseline": { + "privateCommit": "e71e3f68827f9f7af354526fecbaded25dc14de9", + "interfaceSha256": "acbe16c69ba4ddfa2e7bbdcf35a119c88801e93d960520db50de082c2e4234df", + "responseSchemaSha256": "a6a73ab3e368812cbe9b6355fed3edbe59b890aa6e8f73c69e3d06fd23a6c6e5" + }, + "counts": { + "constants": 109, + "types": 237, + "operations": 162, + "eventSubscriptions": 81, + "eventControls": 2, + "events": 81 + }, + "constants": [ + { + "id": 1, + "name": "OpenIMMessageStatusNotExist", + "type": "OpenIMMessageStatus", + "value": "0", + "signatureHash": "2a4b381a80b67e1204ce1408e1c9716d76bd127abb51b6e38bb412eb4ac2b281", + "edition": "public" + }, + { + "id": 2, + "name": "OpenIMMessageStatusSending", + "type": "OpenIMMessageStatus", + "value": "1", + "signatureHash": "070e728a9a77022fe21a407bbe20cd4b5563db65d7eba0c96d4013d6a21c7c15", + "edition": "public" + }, + { + "id": 3, + "name": "OpenIMMessageStatusSucceed", + "type": "OpenIMMessageStatus", + "value": "2", + "signatureHash": "4d57b2f3a1229cc4076674e4f6efe40266f6f4914d36828b56f3a6327af95dbd", + "edition": "public" + }, + { + "id": 4, + "name": "OpenIMMessageStatusFailed", + "type": "OpenIMMessageStatus", + "value": "3", + "signatureHash": "32072ad37fba2c7eb5d8e8aea0db4c9c64c0b531c12f9e6cddf8cdf555b27f99", + "edition": "public" + }, + { + "id": 5, + "name": "OpenIMMessageStatusDeleted", + "type": "OpenIMMessageStatus", + "value": "4", + "signatureHash": "194d15beeaefb3cda73b2259ac4e00757cc25bb5a63ae50c5052affdc38dd1de", + "edition": "public" + }, + { + "id": 6, + "name": "OpenIMMessageStatusFiltered", + "type": "OpenIMMessageStatus", + "value": "5", + "signatureHash": "7012a2915edc26d1988dd663a3d30c4b2ed5b8e22a1dd0f077e74c7937508098", + "edition": "public" + }, + { + "id": 7, + "name": "OpenIMPlatformIOS", + "type": "OpenIMPlatform", + "value": "1", + "signatureHash": "e6e38b8de87db7b61c243148707ecdfdeb061ae861c5f648d17c0aa8c7106539", + "edition": "public" + }, + { + "id": 8, + "name": "OpenIMPlatformAndroid", + "type": "OpenIMPlatform", + "value": "2", + "signatureHash": "d4a78094e10c034f911c5673351e432e483c31b78816ab2fecc62512ef0ac57b", + "edition": "public" + }, + { + "id": 9, + "name": "OpenIMPlatformWindows", + "type": "OpenIMPlatform", + "value": "3", + "signatureHash": "b41afae1e8edeeafde20ae166a139e47053e7eb4c0def7c984ceac67ddbdf206", + "edition": "public" + }, + { + "id": 10, + "name": "OpenIMPlatformMacOSX", + "type": "OpenIMPlatform", + "value": "4", + "signatureHash": "90816949b6b443ef2496b58eebb6091afa35050a3400d4fb94da32d431b55ae7", + "edition": "public" + }, + { + "id": 11, + "name": "OpenIMPlatformWeb", + "type": "OpenIMPlatform", + "value": "5", + "signatureHash": "f5376e51c3784fbbbf99e841924ec8888b018772799dde5c8162035adce7093f", + "edition": "public" + }, + { + "id": 12, + "name": "OpenIMPlatformMiniWeb", + "type": "OpenIMPlatform", + "value": "6", + "signatureHash": "cb850fe970c49f30459c3106e1c94fd91d21d089c14dd5a72f7550b0738fbb0f", + "edition": "public" + }, + { + "id": 13, + "name": "OpenIMPlatformLinux", + "type": "OpenIMPlatform", + "value": "7", + "signatureHash": "4e0bbbb9c862eaaff848bdeae582242b0c42091058a2f442da707d137f02079d", + "edition": "public" + }, + { + "id": 14, + "name": "OpenIMPlatformAndroidPad", + "type": "OpenIMPlatform", + "value": "8", + "signatureHash": "060296c24e70b3c35c56c8a541e712c5be1818538c0fb3870d733d2a00cd2e4d", + "edition": "public" + }, + { + "id": 15, + "name": "OpenIMPlatformIPad", + "type": "OpenIMPlatform", + "value": "9", + "signatureHash": "a65f7f7127fc25fee8d1a30d4ba3c27245bea17b5c162492f0ea9e06e06cfd49", + "edition": "public" + }, + { + "id": 16, + "name": "OpenIMPlatformAdmin", + "type": "OpenIMPlatform", + "value": "10", + "signatureHash": "88769580d90807f6b33a082b6280a63c75513610306473852679d469492bd8d7", + "edition": "public" + }, + { + "id": 17, + "name": "OpenIMPlatformHarmony", + "type": "OpenIMPlatform", + "value": "11", + "signatureHash": "d4d286cb1276a7e9ebe85b55dd6e6b0f4a8c49009e780f37e557338c10acedc4", + "edition": "public" + }, + { + "id": 18, + "name": "OpenIMLogLevelPanic", + "type": "OpenIMLogLevel", + "value": "0", + "signatureHash": "c0a8c5932fe32bcf89c963a2159e7d1c7795204b16b550de80d39253f8b2d7ed", + "edition": "public" + }, + { + "id": 19, + "name": "OpenIMLogLevelFatal", + "type": "OpenIMLogLevel", + "value": "1", + "signatureHash": "8e0068bb3abe2ba62268a777aa5cb304d06bb2f2655c22c43e8b044ddf5405e3", + "edition": "public" + }, + { + "id": 20, + "name": "OpenIMLogLevelError", + "type": "OpenIMLogLevel", + "value": "2", + "signatureHash": "b90392e54565f0a3b45ca83979173727804d8b4dc84fb3152af1b0b186ff2d8b", + "edition": "public" + }, + { + "id": 21, + "name": "OpenIMLogLevelWarn", + "type": "OpenIMLogLevel", + "value": "3", + "signatureHash": "4e98ffd53d102275b511c53fd32dc3ec14000d0b5c96c2fb7954da5cd1cefa99", + "edition": "public" + }, + { + "id": 22, + "name": "OpenIMLogLevelInfo", + "type": "OpenIMLogLevel", + "value": "4", + "signatureHash": "feac04d582af5d99464224e52e576c9780f22538363164c3208dc1a59a317122", + "edition": "public" + }, + { + "id": 23, + "name": "OpenIMLogLevelDebug", + "type": "OpenIMLogLevel", + "value": "5", + "signatureHash": "ec21ea478d6357ef935f4070688e3d1075965325c75d9725d94539c517697229", + "edition": "public" + }, + { + "id": 24, + "name": "OpenIMLogLevelVerbose", + "type": "OpenIMLogLevel", + "value": "6", + "signatureHash": "7b8aac06c6557b7dfc445ef97babc4fc5ff240c7d3db31a4af5a2474601f9fbf", + "edition": "public" + }, + { + "id": 25, + "name": "OpenIMMessageTypeText", + "type": "OpenIMMessageType", + "value": "101", + "signatureHash": "e59ced7cb303c70e55a67099cbdd00fe688ea0c0648bba8b319be58e14ed71f9", + "edition": "public" + }, + { + "id": 26, + "name": "OpenIMMessageTypePicture", + "type": "OpenIMMessageType", + "value": "102", + "signatureHash": "e5c2fe4cba1366314eb30b4b4cfd2acba61284a2d4958bc52e5ea07a86cf3a32", + "edition": "public" + }, + { + "id": 27, + "name": "OpenIMMessageTypeVoice", + "type": "OpenIMMessageType", + "value": "103", + "signatureHash": "e0adce21bb0e9b8bc66f1770d774aa64517c3cae10531ddb6568f65b6edbe83f", + "edition": "public" + }, + { + "id": 28, + "name": "OpenIMMessageTypeVideo", + "type": "OpenIMMessageType", + "value": "104", + "signatureHash": "96a8ec045bec323a2af3a707aba03f95c68332fc5cd106aaa0cc1b3cf98c67b5", + "edition": "public" + }, + { + "id": 29, + "name": "OpenIMMessageTypeFile", + "type": "OpenIMMessageType", + "value": "105", + "signatureHash": "d46a65a1d61a164d70d68bb4df0c986feb89385251dac68e1003e57612045242", + "edition": "public" + }, + { + "id": 30, + "name": "OpenIMMessageTypeAtText", + "type": "OpenIMMessageType", + "value": "106", + "signatureHash": "7b76708a3e80ae11759af633b060abc2cad41b9736fc7f72bdbeee876e55f775", + "edition": "public" + }, + { + "id": 31, + "name": "OpenIMMessageTypeMerge", + "type": "OpenIMMessageType", + "value": "107", + "signatureHash": "7ef0baf1e0b66a32ba28842ea3b474f5c045648de6d11cbde85cde4746540473", + "edition": "public" + }, + { + "id": 32, + "name": "OpenIMMessageTypeCard", + "type": "OpenIMMessageType", + "value": "108", + "signatureHash": "87446dbf6c07eee050f3677be1bf8f8af8c48431d64059574ce94bd131ab2dff", + "edition": "public" + }, + { + "id": 33, + "name": "OpenIMMessageTypeLocation", + "type": "OpenIMMessageType", + "value": "109", + "signatureHash": "180aa305e0e9a3541fcb46f1756c0789b8cea3fbee27d10ca369d59feccf2e4e", + "edition": "public" + }, + { + "id": 34, + "name": "OpenIMMessageTypeCustom", + "type": "OpenIMMessageType", + "value": "110", + "signatureHash": "184c7c18e9d595c7b3bebca29d519869407fd459603a0453df6d9bbb6d3965d6", + "edition": "public" + }, + { + "id": 35, + "name": "OpenIMMessageTypeRevoke", + "type": "OpenIMMessageType", + "value": "111", + "signatureHash": "73e358e0e75eec7fd893ff532d13ccef60effa8c621f751e8706f04816fa575f", + "edition": "public" + }, + { + "id": 36, + "name": "OpenIMMessageTypeTyping", + "type": "OpenIMMessageType", + "value": "113", + "signatureHash": "a699dd4ac56aab9a14dbdde4dc26f9033fefe3c9c92c6efc5a835c269bd299f4", + "edition": "public" + }, + { + "id": 37, + "name": "OpenIMMessageTypeQuote", + "type": "OpenIMMessageType", + "value": "114", + "signatureHash": "f034d2eb36576016b460885877e0c6a8caeeaa4bb0e9a4c416947eefc20ad8e2", + "edition": "public" + }, + { + "id": 38, + "name": "OpenIMMessageTypeFace", + "type": "OpenIMMessageType", + "value": "115", + "signatureHash": "6fac65dc2a469f74ef365769a110e5384543defd0a4abbc8187e7c5720671ae4", + "edition": "public" + }, + { + "id": 39, + "name": "OpenIMMessageTypeAdvancedText", + "type": "OpenIMMessageType", + "value": "117", + "signatureHash": "3a35eb1fe16a5888890844e6e747270e9df67a7b8238ffc267ec1d1b8d203b0f", + "edition": "public" + }, + { + "id": 40, + "name": "OpenIMMessageTypeMarkdownText", + "type": "OpenIMMessageType", + "value": "118", + "signatureHash": "df5d043f97af2aa804122585527dab19c7e23da0b92291174c9f5cedfd5cc93f", + "edition": "public" + }, + { + "id": 41, + "name": "OpenIMMessageTypeCustomNotTriggerConversation", + "type": "OpenIMMessageType", + "value": "119", + "signatureHash": "4cec7fa964ead6b7dd79ea8ca27ab13dcb288672776f1715b704a8c45b6d276c", + "edition": "public" + }, + { + "id": 42, + "name": "OpenIMMessageTypeCustomOnlineOnly", + "type": "OpenIMMessageType", + "value": "120", + "signatureHash": "f073abc70384000b818510f4ff94e72283ae053fdfce4a3a642edd35a9b68525", + "edition": "public" + }, + { + "id": 43, + "name": "OpenIMMessageTypeReactionModifier", + "type": "OpenIMMessageType", + "value": "121", + "signatureHash": "1409dcead0595e33e1f2d89d6bb0022052effee02fd702a2aa5db60700e5ffe4", + "edition": "public" + }, + { + "id": 44, + "name": "OpenIMMessageTypeReactionDeleter", + "type": "OpenIMMessageType", + "value": "122", + "signatureHash": "4ac105d88abe582979595f9e4f88549b8a27670b586d39e75a96d7988086f1a5", + "edition": "public" + }, + { + "id": 45, + "name": "OpenIMMessageTypeStream", + "type": "OpenIMMessageType", + "value": "143", + "signatureHash": "08831b08629d84dfed0f81b8d824321b1738f4808af02766e585f05b9aab678d", + "edition": "public" + }, + { + "id": 46, + "name": "OpenIMMessageTypeCommon", + "type": "OpenIMMessageType", + "value": "200", + "signatureHash": "72fd4e17dc1564f0462b2c673fac4346f40e090e198751f8c167ebfab01107db", + "edition": "public" + }, + { + "id": 47, + "name": "OpenIMMessageTypeGroupMsg", + "type": "OpenIMMessageType", + "value": "201", + "signatureHash": "479d65c81f9487fadd882dc9b7207a20581b026b3cf809adae7b11dbea367b66", + "edition": "public" + }, + { + "id": 48, + "name": "OpenIMMessageTypeSignalMsg", + "type": "OpenIMMessageType", + "value": "202", + "signatureHash": "0633498bf4aa0cebabc10c5a02c11d78b9b774e087813e663c75e49a33fc03c8", + "edition": "public" + }, + { + "id": 49, + "name": "OpenIMMessageTypeCustomNotification", + "type": "OpenIMMessageType", + "value": "203", + "signatureHash": "294ae910cc0dae841faff0c22dfda6c16b212f224a5faa6fb67c17b6882b349b", + "edition": "public" + }, + { + "id": 50, + "name": "OpenIMMessageTypeFriendApplicationApproved", + "type": "OpenIMMessageType", + "value": "1201", + "signatureHash": "e917437a1bf81159bd18139502aa54fd1723dc57f6517c1a901d9982ba0ddb85", + "edition": "public" + }, + { + "id": 51, + "name": "OpenIMMessageTypeFriendApplicationRejected", + "type": "OpenIMMessageType", + "value": "1202", + "signatureHash": "d9c885eab0e64b8d8ba4664111b5995833a373f285027865d897b4bfe62398c0", + "edition": "public" + }, + { + "id": 52, + "name": "OpenIMMessageTypeFriendApplication", + "type": "OpenIMMessageType", + "value": "1203", + "signatureHash": "6bb4694b38d8d7154b74f5cdcd1005737951fc2566e482a1214b0af0252390ad", + "edition": "public" + }, + { + "id": 53, + "name": "OpenIMMessageTypeFriendAdded", + "type": "OpenIMMessageType", + "value": "1204", + "signatureHash": "f81e08c5fe98bebebe6191b221066e06951e27c459a03a11f285fa01e99e741a", + "edition": "public" + }, + { + "id": 54, + "name": "OpenIMMessageTypeFriendDeleted", + "type": "OpenIMMessageType", + "value": "1205", + "signatureHash": "9bbb020ec836e0261231ba2e667fa8c71512cb61467c370c5e0e077acd98097a", + "edition": "public" + }, + { + "id": 55, + "name": "OpenIMMessageTypeFriendRemarkSet", + "type": "OpenIMMessageType", + "value": "1206", + "signatureHash": "b2ab8dee0430fced5f0ab29cd18e8918a2a55103fc9cf4c7d6e7731de7af7271", + "edition": "public" + }, + { + "id": 56, + "name": "OpenIMMessageTypeBlackAdded", + "type": "OpenIMMessageType", + "value": "1207", + "signatureHash": "e7d92f8ca77eb51d6cc1f02ba38b07f586b5990afaa0c2d4038c08f4ee49297e", + "edition": "public" + }, + { + "id": 57, + "name": "OpenIMMessageTypeBlackDeleted", + "type": "OpenIMMessageType", + "value": "1208", + "signatureHash": "29edb1aed1677b93f3927b6d6d717ee9b5e4cd6fd81dab632e0c44e92cfb866e", + "edition": "public" + }, + { + "id": 58, + "name": "OpenIMMessageTypeFriendInfoUpdated", + "type": "OpenIMMessageType", + "value": "1209", + "signatureHash": "4a50fd797c30391e94840ed101f5be09f3ff2884e8f362e7c77ec82c969470e2", + "edition": "public" + }, + { + "id": 59, + "name": "OpenIMMessageTypeFriendsInfoUpdated", + "type": "OpenIMMessageType", + "value": "1210", + "signatureHash": "7b871aead5bb83feae308459e09b5f1c38f41126cb19c138fe2c67d1c6ef5578", + "edition": "public" + }, + { + "id": 60, + "name": "OpenIMMessageTypeConversationChanged", + "type": "OpenIMMessageType", + "value": "1300", + "signatureHash": "3efa94bfecd5a9fc8904e5c7b66f2f994b6855a442e446b8503b77bb7d02a159", + "edition": "public" + }, + { + "id": 61, + "name": "OpenIMMessageTypeUserInfoUpdated", + "type": "OpenIMMessageType", + "value": "1303", + "signatureHash": "7dd1b75a310cfdd8b01b6306af9756ba21a7dc03463a518ba063b94348ed1897", + "edition": "public" + }, + { + "id": 62, + "name": "OpenIMMessageTypeUserStatusChanged", + "type": "OpenIMMessageType", + "value": "1304", + "signatureHash": "158f2115e8c1b8ff6da7ca4e023408e525a12d7d3d165214001cd12940b20322", + "edition": "public" + }, + { + "id": 63, + "name": "OpenIMMessageTypeUserSubscribeOnlineStatus", + "type": "OpenIMMessageType", + "value": "1308", + "signatureHash": "8ae42b719541a04b42bcafa017f1f3fe318df82ab8a230b993966f01e2d445ca", + "edition": "public" + }, + { + "id": 64, + "name": "OpenIMMessageTypeOANotification", + "type": "OpenIMMessageType", + "value": "1400", + "signatureHash": "56c83fb8f874a6f18ebddebb8583a1e61d3872c3f159705a6d063e4c2ba56ecd", + "edition": "public" + }, + { + "id": 65, + "name": "OpenIMMessageTypeGroupCreated", + "type": "OpenIMMessageType", + "value": "1501", + "signatureHash": "bd1b1a645a92dbe313e457b961c01d012e55b2cc20e126cdd06cbf5622e7c9eb", + "edition": "public" + }, + { + "id": 66, + "name": "OpenIMMessageTypeGroupInfoUpdated", + "type": "OpenIMMessageType", + "value": "1502", + "signatureHash": "80c9fb644fba0c4cbdf9dd3d2195c696ba41aa7b64cda45ee14e5a0450732f2c", + "edition": "public" + }, + { + "id": 67, + "name": "OpenIMMessageTypeJoinGroupApplication", + "type": "OpenIMMessageType", + "value": "1503", + "signatureHash": "484a7c4eecb280e27333f4b80f7831ebb4b7f1d1f25764abec56633afe66060f", + "edition": "public" + }, + { + "id": 68, + "name": "OpenIMMessageTypeMemberQuit", + "type": "OpenIMMessageType", + "value": "1504", + "signatureHash": "ba0ffeefdf7ff09645fbcec9a4c0ec06c4507c90768e2410e3e4d236e8ebe0d2", + "edition": "public" + }, + { + "id": 69, + "name": "OpenIMMessageTypeGroupApplicationAccepted", + "type": "OpenIMMessageType", + "value": "1505", + "signatureHash": "a281ff8f075f64313f182378715eabbd502bf6e187b43170c0594f383f55e8a4", + "edition": "public" + }, + { + "id": 70, + "name": "OpenIMMessageTypeGroupApplicationRejected", + "type": "OpenIMMessageType", + "value": "1506", + "signatureHash": "465ff14d67e0cd9ef9376f36e1584e7de775aa5211fca1097158254926dc18c0", + "edition": "public" + }, + { + "id": 71, + "name": "OpenIMMessageTypeGroupOwnerTransferred", + "type": "OpenIMMessageType", + "value": "1507", + "signatureHash": "2e3568f962310719898e8c49fe4c6f24825b6e71e00dd10cd80e56052bdcb5b9", + "edition": "public" + }, + { + "id": 72, + "name": "OpenIMMessageTypeMemberKicked", + "type": "OpenIMMessageType", + "value": "1508", + "signatureHash": "eb7f8288a4921d76622f749e49927baefe1127511d025f7319216058434b6149", + "edition": "public" + }, + { + "id": 73, + "name": "OpenIMMessageTypeMemberInvited", + "type": "OpenIMMessageType", + "value": "1509", + "signatureHash": "cd9e309b187ff3166aa66aff02d39798bb4da9a0728ac2e71e83b784bbf12c88", + "edition": "public" + }, + { + "id": 74, + "name": "OpenIMMessageTypeMemberEnter", + "type": "OpenIMMessageType", + "value": "1510", + "signatureHash": "5ccccee453e561c6a1c7c22236049d85b7c7cac4f1f878e56ebc77626da334d6", + "edition": "public" + }, + { + "id": 75, + "name": "OpenIMMessageTypeGroupDismissed", + "type": "OpenIMMessageType", + "value": "1511", + "signatureHash": "9b99cb57cce0e84205459f5cb4db94eda23e7563a8f5d51b6386c9dc76671bb8", + "edition": "public" + }, + { + "id": 76, + "name": "OpenIMMessageTypeGroupMemberMuted", + "type": "OpenIMMessageType", + "value": "1512", + "signatureHash": "c0d5d8de0202e47af2b8ac939362a225e7de4af12ae2b9669f15a0c6d01d63a7", + "edition": "public" + }, + { + "id": 77, + "name": "OpenIMMessageTypeGroupMemberCancelMuted", + "type": "OpenIMMessageType", + "value": "1513", + "signatureHash": "ae0fab64c6dcdebd2a70c961ccb57b4776278bbc3abf221a5870cba7621a42e6", + "edition": "public" + }, + { + "id": 78, + "name": "OpenIMMessageTypeGroupMuted", + "type": "OpenIMMessageType", + "value": "1514", + "signatureHash": "ed1982e496801073ae7d26867cabee6fccd4a3c3ba4a0fc143417f808b801640", + "edition": "public" + }, + { + "id": 79, + "name": "OpenIMMessageTypeGroupCancelMuted", + "type": "OpenIMMessageType", + "value": "1515", + "signatureHash": "f6bac2a5eb233123fbd5e8802edeb8894fb70e4922860de34253ad1c216a8ef2", + "edition": "public" + }, + { + "id": 80, + "name": "OpenIMMessageTypeGroupMemberInfoUpdated", + "type": "OpenIMMessageType", + "value": "1516", + "signatureHash": "5c045cbc1cc24ef75bd867265860cf05f160df31d539a1a184e2c72e7a805215", + "edition": "public" + }, + { + "id": 81, + "name": "OpenIMMessageTypeGroupMemberSetToAdmin", + "type": "OpenIMMessageType", + "value": "1517", + "signatureHash": "e5b2c2407efa9abb7b8ba646f81ea075595e854d91eec0a9d84516b514c291f7", + "edition": "public" + }, + { + "id": 82, + "name": "OpenIMMessageTypeGroupMemberSetToOrdinaryUser", + "type": "OpenIMMessageType", + "value": "1518", + "signatureHash": "b743e9afb175eb6c2d7e2a28ddc883144eb4be3da70b34b7bdc82d618f35ac08", + "edition": "public" + }, + { + "id": 83, + "name": "OpenIMMessageTypeGroupAnnouncementUpdated", + "type": "OpenIMMessageType", + "value": "1519", + "signatureHash": "c0a5857216c66ed71859cfa5cfae3892717db278596ae6fd56f038f93452aeb9", + "edition": "public" + }, + { + "id": 84, + "name": "OpenIMMessageTypeGroupNameUpdated", + "type": "OpenIMMessageType", + "value": "1520", + "signatureHash": "c1b6e4c0a8a99c8d24e125fd9def524a4d4bb5de6f25ba640286f95cbc3f83e0", + "edition": "public" + }, + { + "id": 85, + "name": "OpenIMMessageTypeSuperGroupUpdated", + "type": "OpenIMMessageType", + "value": "1651", + "signatureHash": "42a3e7a5324c3eea35a9b960988ecfeda75906e698ed4bea846c275945eec3f3", + "edition": "public" + }, + { + "id": 86, + "name": "OpenIMMessageTypeMsgDeleted", + "type": "OpenIMMessageType", + "value": "1652", + "signatureHash": "496eae88bdd81bf7040a4eaedb13340dc690b2f8179328b8a51d731440ffe071", + "edition": "public" + }, + { + "id": 87, + "name": "OpenIMMessageTypeBurnMessageChange", + "type": "OpenIMMessageType", + "value": "1701", + "signatureHash": "07f3b0fd30bab3a763ea9c2bbc7582c8a7168e5a3bdd5d5a680f82de2d724b00", + "edition": "public" + }, + { + "id": 88, + "name": "OpenIMMessageTypeConversationPrivateChat", + "type": "OpenIMMessageType", + "value": "1701", + "signatureHash": "41302b1649327e5b43328bbbc928e0229f2f27878b4b3cf37cc173924f6db317", + "edition": "public" + }, + { + "id": 89, + "name": "OpenIMMessageTypeConversationUnread", + "type": "OpenIMMessageType", + "value": "1702", + "signatureHash": "2554e6b9a8e42a9713008b325d8161e24f6397202150aec964153ad60d305203", + "edition": "public" + }, + { + "id": 90, + "name": "OpenIMMessageTypeClearConversation", + "type": "OpenIMMessageType", + "value": "1703", + "signatureHash": "9b03e7b7d33ea062af3be9ab6b11295fdda136e8b1e9e6933613267971c5d028", + "edition": "public" + }, + { + "id": 91, + "name": "OpenIMMessageTypeConversationGroupChanged", + "type": "OpenIMMessageType", + "value": "1704", + "signatureHash": "11fd2db040c40c59f28425dbaabb7effd1c535c056862c8cbe710a5856741450", + "edition": "public" + }, + { + "id": 92, + "name": "OpenIMMessageTypeBusinessNotification", + "type": "OpenIMMessageType", + "value": "2001", + "signatureHash": "2e090397c74a4a655ac236f1fb8bff5560205adb8a8ebfb8b3262217461a5ca7", + "edition": "public" + }, + { + "id": 93, + "name": "OpenIMMessageTypeRevokeMessage", + "type": "OpenIMMessageType", + "value": "2101", + "signatureHash": "dfb60feb5232a1303a4a5aa3391e94e53678974a214cbd65980dbe9e06469418", + "edition": "public" + }, + { + "id": 94, + "name": "OpenIMMessageTypeDeleteMessages", + "type": "OpenIMMessageType", + "value": "2102", + "signatureHash": "1a021e3a15c68b570ac2c2bb28f3338b5003f925e0638e609716301d9604a8e1", + "edition": "public" + }, + { + "id": 95, + "name": "OpenIMMessageTypeModifyMessage", + "type": "OpenIMMessageType", + "value": "2103", + "signatureHash": "e9f254a20508cd856176a287a18261996c7ffbd0d86b5adcefea1b676bdde0d2", + "edition": "public" + }, + { + "id": 96, + "name": "OpenIMMessageTypeDeleteUserAllMessagesInConversation", + "type": "OpenIMMessageType", + "value": "2150", + "signatureHash": "212c96d6b66c26acf56219978140a8e9923df51902da9111234969e14103df21", + "edition": "public" + }, + { + "id": 97, + "name": "OpenIMMessageTypeHasReadReceipt", + "type": "OpenIMMessageType", + "value": "2200", + "signatureHash": "16dc95633a698fc1af48f1d1208418f2cf26a09595260fd73aa5ca2f15de79fc", + "edition": "public" + }, + { + "id": 98, + "name": "OpenIMMessageTypeHasResetUnreadReceipt", + "type": "OpenIMMessageType", + "value": "2210", + "signatureHash": "eba37f5670dd25c39aca09240f9e2e0829419b2b0fb8bcea18047da65ab2760f", + "edition": "public" + }, + { + "id": 99, + "name": "OpenIMMessageTypeHasGroupReadReceipt", + "type": "OpenIMMessageType", + "value": "2300", + "signatureHash": "bf64c05ff943cf993073771fc7325410f51077b919b8fc2142f28197005767a2", + "edition": "public" + }, + { + "id": 100, + "name": "OpenIMMessageTypePinned", + "type": "OpenIMMessageType", + "value": "2400", + "signatureHash": "c10057828a57a53d32efeefa64280f84c49fe9f584031a9b19f24e42d7d8aea5", + "edition": "public" + }, + { + "id": 101, + "name": "OpenIMMessageTypePinnedRead", + "type": "OpenIMMessageType", + "value": "2401", + "signatureHash": "df316b0c18a9cc4abb85fdc9c0ecc9b19f11a7022fdcbd5f6481099cc4c6e11c", + "edition": "public" + }, + { + "id": 102, + "name": "OpenIMMessageTypeStreamNotification", + "type": "OpenIMMessageType", + "value": "2500", + "signatureHash": "777e3161b61a07a8f97bd4468b47fb9150b36ce50a22416929fc9b00bd6b4fef", + "edition": "public" + }, + { + "id": 103, + "name": "OpenIMSessionTypeSingle", + "type": "OpenIMSessionType", + "value": "1", + "signatureHash": "68748002bd1f8251ec2268aaacf2518bc5cc40b14490fe02fc46fc39cec9e707", + "edition": "public" + }, + { + "id": 104, + "name": "OpenIMSessionTypeWriteGroup", + "type": "OpenIMSessionType", + "value": "2", + "signatureHash": "61496eeda0e9535aae6221dabcf64dde69037008568b24a07bbf941cd79105e2", + "edition": "public" + }, + { + "id": 105, + "name": "OpenIMSessionTypeGroup", + "type": "OpenIMSessionType", + "value": "3", + "signatureHash": "7f21ec4de72cc512a81855fdd6641d93f62303df49ff39f5cda2c6f63ca86ee7", + "edition": "public" + }, + { + "id": 106, + "name": "OpenIMSessionTypeNotification", + "type": "OpenIMSessionType", + "value": "4", + "signatureHash": "ba39713f1abecc80e5a23cb582148bf460a41cd00c3ae0947772d212274b0b73", + "edition": "public" + }, + { + "id": 107, + "name": "OpenIMLoginStatusLogout", + "type": "OpenIMLoginStatus", + "value": "1", + "signatureHash": "7c91f0aad42da1f3066a53034ce7e660fb6149904d880c73050c465301a326ec", + "edition": "public" + }, + { + "id": 108, + "name": "OpenIMLoginStatusLogging", + "type": "OpenIMLoginStatus", + "value": "2", + "signatureHash": "a6df080b6db816fd30b632a66132e6dff4e7b3085ff3f276bb1408d406647e76", + "edition": "public" + }, + { + "id": 109, + "name": "OpenIMLoginStatusLogged", + "type": "OpenIMLoginStatus", + "value": "3", + "signatureHash": "83d5ad7e02193fd11100ab63e2e9f5382d7c244807aa01156f24f11d129c00f5", + "edition": "public" + } + ], + "types": [ + { + "id": 1001, + "name": "OpenIMMessageStatus", + "declaration": "export type OpenIMMessageStatus = 0 | 1 | 2 | 3 | 4 | 5", + "signatureHash": "b2f9f6298304e038fd8b54d90b728663fe36c3f9a9aa258f1fcfdd87644a5048", + "edition": "public" + }, + { + "id": 1002, + "name": "OpenIMPlatform", + "declaration": "export type OpenIMPlatform = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11", + "signatureHash": "c7ecca9d16336958a9f6cf5d43d33585b9b70f8884255a1b7ee5cfa99511a700", + "edition": "public" + }, + { + "id": 1003, + "name": "OpenIMLogLevel", + "declaration": "export type OpenIMLogLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6", + "signatureHash": "8f418680b6af67c6d8c0221fc8d0d18d3f058b45d7ada4eabf8a200cfb714425", + "edition": "public" + }, + { + "id": 1004, + "name": "OpenIMMessageType", + "declaration": "export type OpenIMMessageType =\n 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 |\n 111 | 113 | 114 | 115 | 117 | 118 | 119 | 120 | 121 | 122 |\n 143 | 200 | 201 | 202 | 203 | 1201 | 1202 | 1203 | 1204 |\n 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1300 | 1303 |\n 1304 | 1305 | 1306 | 1307 | 1308 | 1400 | 1501 | 1502 |\n 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 |\n 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 |\n 1519 | 1520 | 1651 | 1652 | 1701 | 1702 | 1703 | 1704 |\n 2001 | 2101 | 2102 | 2103 | 2150 | 2200 | 2210 | 2300 |\n 2400 | 2401 | 2500", + "signatureHash": "a896503a3dacf7674d5f9d9ceb3e70390cfc0551a99654263940bd1a21873807", + "edition": "public" + }, + { + "id": 1005, + "name": "OpenIMSessionType", + "declaration": "export type OpenIMSessionType = 0 | 1 | 2 | 3 | 4", + "signatureHash": "3be98e61dd3e572f04aed92c518998a285b66af8308b999fc8f475d9a63d880c", + "edition": "public" + }, + { + "id": 1006, + "name": "OpenIMLoginStatus", + "declaration": "export type OpenIMLoginStatus = 1 | 2 | 3", + "signatureHash": "64720e63372998e9bf1fd37bbe417e169a94c7a7207a92ce16f0df133acf30dc", + "edition": "public" + }, + { + "id": 1007, + "name": "OpenIMSendMessageOptions", + "declaration": "export type OpenIMSendMessageOptions = {\n operationID ?: string | null\n message : OpenIMMessageItem\n recvID : string\n groupID : string\n offlinePushInfo ?: OpenIMOfflinePush | null\n isOnlineOnly ?: boolean | null\n}", + "signatureHash": "eac3f9993534e25873c5e326527e4f4a1ae84186d2fd74527af4d32b5952bdc2", + "edition": "public" + }, + { + "id": 1008, + "name": "OpenIMUploadFileParams", + "declaration": "export type OpenIMUploadFileParams = {\n filepath : string\n name : string\n contentType : string\n uuid : string\n cancelID ?: string | null\n cause ?: string | null\n}", + "signatureHash": "84f7a2754e348014514f24217ff84759ee2c955d7e7d97ce990528771ae9b677", + "edition": "public" + }, + { + "id": 1009, + "name": "OpenIMCreateSoundMessageParams", + "declaration": "export type OpenIMCreateSoundMessageParams = {\n soundPath : string\n duration : number\n}", + "signatureHash": "1ea28b2936efc33dfdbdbdbb9897f5d88efda5e8e04d71a6bd49bf5c049017ff", + "edition": "public" + }, + { + "id": 1010, + "name": "OpenIMCreateVideoMessageParams", + "declaration": "export type OpenIMCreateVideoMessageParams = {\n videoPath : string\n videoType : string\n duration : number\n snapshotPath : string\n videoSourcePath ?: string | null\n snapshotSourcePath ?: string | null\n}", + "signatureHash": "751521ec6af7db95420faf899fbc8a6339c609596f349240c701259b6fb2f8d0", + "edition": "public" + }, + { + "id": 1011, + "name": "OpenIMCreateFileMessageParams", + "declaration": "export type OpenIMCreateFileMessageParams = {\n filePath : string\n fileName : string\n fileSourcePath ?: string | null\n}", + "signatureHash": "56d15e22c2280cbfa593874d3bcbb8eb47af794592974d23a60666f498a94606", + "edition": "public" + }, + { + "id": 1012, + "name": "OpenIMUploadFileResult", + "declaration": "export type OpenIMUploadFileResult = {\n url ?: string | null\n uri ?: string | null\n uuid ?: string | null\n size ?: number | null\n typ ?: number | null\n mediaID ?: string | null\n}", + "signatureHash": "219e6a0fb0566ea50ae525a28cf6e11336b700358aed3b587c483cbcd93af23e", + "edition": "public" + }, + { + "id": 1013, + "name": "OpenIMUpdateFcmTokenParams", + "declaration": "export type OpenIMUpdateFcmTokenParams = {\n fcmToken : string\n expireTime : number\n}", + "signatureHash": "1857fade55acc23759b0efb9fb2178a606c2323615eeb7739352fc7632c2b449", + "edition": "public" + }, + { + "id": 1014, + "name": "OpenIMUploadLogsParams", + "declaration": "export type OpenIMUploadLogsParams = {\n line : number\n ex : string\n}", + "signatureHash": "9114ee1d599165b3d41a2add587b07f71622c5c85e09629cdbf5bf930fe2578b", + "edition": "public" + }, + { + "id": 1015, + "name": "OpenIMUploadFileProgressEvent", + "declaration": "export type OpenIMUploadFileProgressEvent = {\n progress : number\n}", + "signatureHash": "dfa7bf7e3fba9d430783547ec82ee7f59152712b7517bbc2696ae4c209ecf4c9", + "edition": "public" + }, + { + "id": 1016, + "name": "OpenIMUploadLogsProgressEvent", + "declaration": "export type OpenIMUploadLogsProgressEvent = {\n progress : number\n}", + "signatureHash": "8c5ef7c1358d92260f092f6ed4ff2b809d11059568c819c3656ce91336513c69", + "edition": "public" + }, + { + "id": 1017, + "name": "OpenIMSendMessageProgressEvent", + "declaration": "export type OpenIMSendMessageProgressEvent = {\n clientMsgID : string\n progress : number\n}", + "signatureHash": "54f0625244e81275e8a24272a0fac424ecac74448eaed729455eacfad5357abc", + "edition": "public" + }, + { + "id": 1018, + "name": "OpenIMMessageKeyParams", + "declaration": "export type OpenIMMessageKeyParams = {\n conversationID : string\n clientMsgID : string\n}", + "signatureHash": "a4b08926a883fa47f808c5871818ea398db243fd9e29c36322edab8257b325e4", + "edition": "public" + }, + { + "id": 1019, + "name": "OpenIMSetMessageLocalExParams", + "declaration": "export type OpenIMSetMessageLocalExParams = {\n conversationID : string\n clientMsgID : string\n localEx : string\n}", + "signatureHash": "5f827fd476e965160edb48de70da0bf7041fa6819a06f478c88da01acbe7323a", + "edition": "public" + }, + { + "id": 1020, + "name": "OpenIMSetConversationBoolean", + "declaration": "export type OpenIMSetConversationBoolean = true | false", + "signatureHash": "9789e69ec980a591ffbc69d7e212af26c4096dffc73d0466144326b36202dde4", + "edition": "public" + }, + { + "id": 1021, + "name": "OpenIMSetSelfInfoRecvMsgOpt", + "declaration": "export type OpenIMSetSelfInfoRecvMsgOpt = 0 | 1 | 2", + "signatureHash": "6af170121ec89812d978317f6308580bf371f923eefa0f5faf556da8aa8533fb", + "edition": "public" + }, + { + "id": 1022, + "name": "OpenIMUpdateFriendBoolean", + "declaration": "export type OpenIMUpdateFriendBoolean = true | false", + "signatureHash": "6d90068c2baca1528f40ceeea5f210c04502688bfb31a09364cc6cd730bc109d", + "edition": "public" + }, + { + "id": 1023, + "name": "OpenIMGroupNeedVerification", + "declaration": "export type OpenIMGroupNeedVerification = 0 | 1 | 2", + "signatureHash": "d917f362aa627f1c48128ac20cea7f394ff9ff5cd3e8ff285cffa55cd485bb0b", + "edition": "public" + }, + { + "id": 1024, + "name": "OpenIMGroupOption", + "declaration": "export type OpenIMGroupOption = 0 | 1", + "signatureHash": "5cfc8db4d763fb4968c159241605ccc795eba8ccbe1b60630692b83389e350f8", + "edition": "public" + }, + { + "id": 1025, + "name": "OpenIMGroupDisplayIsRead", + "declaration": "export type OpenIMGroupDisplayIsRead = true | false", + "signatureHash": "9fb3166f1208f9598d34f4a95da376a5e7cacf11d7740588262b702646daaa34", + "edition": "public" + }, + { + "id": 1026, + "name": "OpenIMGroupMemberRoleLevel", + "declaration": "export type OpenIMGroupMemberRoleLevel = 20 | 60 | 100", + "signatureHash": "6dfeb17bdc44ec09d528b134e753009b308f897302792ff60be0dbc2e535d475", + "edition": "public" + }, + { + "id": 1027, + "name": "OpenIMSetConversationParams", + "declaration": "export type OpenIMSetConversationParams = {\n conversationID : string\n recvMsgOpt ?: number | null\n isPinned ?: OpenIMSetConversationBoolean | null\n isPrivateChat ?: OpenIMSetConversationBoolean | null\n burnDuration ?: number | null\n groupAtType ?: number | null\n ex ?: string | null\n}", + "signatureHash": "be0ad0433ae82d7088f8330cb25a8c18a36827d55355d5f776be36635ede1506", + "edition": "public" + }, + { + "id": 1028, + "name": "OpenIMSetSelfInfoParams", + "declaration": "export type OpenIMSetSelfInfoParams = {\n nickname ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n globalRecvMsgOpt ?: OpenIMSetSelfInfoRecvMsgOpt | null\n}", + "signatureHash": "4923c4d16dcc83f754cb8bf299fe9f91b21f9771d071c0564d3a276bec48e34c", + "edition": "public" + }, + { + "id": 1029, + "name": "OpenIMUpdateFriendsParams", + "declaration": "export type OpenIMUpdateFriendsParams = {\n friendUserIDs : Array\n isPinned ?: OpenIMUpdateFriendBoolean | null\n remark ?: string | null\n ex ?: string | null\n}", + "signatureHash": "3083b26e53a16884f99b4784e2cd30f4aaa2b4c76676f57499e47256abfa5cfc", + "edition": "public" + }, + { + "id": 1030, + "name": "OpenIMCheckFriendResultItem", + "declaration": "export type OpenIMCheckFriendResultItem = {\n userID : string\n result : number\n}", + "signatureHash": "e50bf85d703cdd288d84161a79082ca94e204929fd3a30720b0a7fe820f3ce37", + "edition": "public" + }, + { + "id": 1031, + "name": "OpenIMCheckFriendResult", + "declaration": "export type OpenIMCheckFriendResult = {\n result : Array\n}", + "signatureHash": "9fb50399497985a1dda92c6c2e00d1f986cf72192fcea3f1d8ba4bcaf247c951", + "edition": "public" + }, + { + "id": 1032, + "name": "OpenIMInsertSingleMessageParams", + "declaration": "export type OpenIMInsertSingleMessageParams = {\n message : OpenIMMessageItem\n recvID : string\n sendID : string\n}", + "signatureHash": "d4501725cd0b5d85e03dc9496e70d48568294b0e99385fc054274302d1e1db34", + "edition": "public" + }, + { + "id": 1033, + "name": "OpenIMInsertGroupMessageParams", + "declaration": "export type OpenIMInsertGroupMessageParams = {\n message : OpenIMMessageItem\n groupID : string\n sendID : string\n}", + "signatureHash": "1f8d36212c539d38926b6097d1883148dfe567a3ba740544dd6f9f9c3ec523ce", + "edition": "public" + }, + { + "id": 1034, + "name": "OpenIMInputStateParams", + "declaration": "export type OpenIMInputStateParams = {\n conversationID : string\n userID ?: string | null\n focus : boolean\n}", + "signatureHash": "87257e63994511261c554c08716a18ae95cdddd77052833d79298ea99b0a5b20", + "edition": "public" + }, + { + "id": 1035, + "name": "OpenIMSetConversationDraftParams", + "declaration": "export type OpenIMSetConversationDraftParams = {\n conversationID : string\n draftText : string\n}", + "signatureHash": "f2fb1522043f4c8ef413d03f484a205640c3da7a42150089cb223a6c5f6bda04", + "edition": "public" + }, + { + "id": 1036, + "name": "OpenIMAddFriendParams", + "declaration": "export type OpenIMAddFriendParams = {\n toUserID : string\n reqMsg : string\n ex ?: string | null\n}", + "signatureHash": "a16116e0fbfedeada13e8398a485423ce91bef47eb67aa58f664df0ebafda6ef", + "edition": "public" + }, + { + "id": 1037, + "name": "OpenIMSearchFriendsParams", + "declaration": "export type OpenIMSearchFriendsParams = {\n keywordList : Array\n isSearchUserID : boolean\n isSearchNickname : boolean\n isSearchRemark : boolean\n}", + "signatureHash": "588996d616658863839c01da93dfd76a1758ee19e10984ae3f6c2ec7c1f8b6af", + "edition": "public" + }, + { + "id": 1038, + "name": "OpenIMGetSpecifiedFriendsInfoParams", + "declaration": "export type OpenIMGetSpecifiedFriendsInfoParams = {\n userIDList : Array\n filterBlack : boolean\n}", + "signatureHash": "63062033bb6ff8f863312012ea915095b4fb1dc55526b9b41a1fb2dc86b6333e", + "edition": "public" + }, + { + "id": 1039, + "name": "OpenIMFriendApplicationHandleParams", + "declaration": "export type OpenIMFriendApplicationHandleParams = {\n toUserID : string\n handleMsg : string\n}", + "signatureHash": "0acb9df4416bb0c17ea5b80af18130e1f874c4b936301dd209dc20baa30330f5", + "edition": "public" + }, + { + "id": 1040, + "name": "OpenIMAddBlackParams", + "declaration": "export type OpenIMAddBlackParams = {\n toUserID : string\n ex ?: string | null\n}", + "signatureHash": "a032838d52c66b5e1063228eb2ae81398a1d1bb3feead727f4c4f8d77d2be6b3", + "edition": "public" + }, + { + "id": 1041, + "name": "OpenIMGroupUserListParams", + "declaration": "export type OpenIMGroupUserListParams = {\n groupID : string\n userIDList : Array\n}", + "signatureHash": "ac3d0f15f98f91af596c6d7d4e2a31e0b8efd35d6c8312473c2b899172ce0d68", + "edition": "public" + }, + { + "id": 1042, + "name": "OpenIMGroupInviteParams", + "declaration": "export type OpenIMGroupInviteParams = {\n groupID : string\n reason : string\n userIDList : Array\n}", + "signatureHash": "aabedb02fbcb2eecdb9ca8cbad9551b4b9320c65938183e2bcf354f125951fd0", + "edition": "public" + }, + { + "id": 1043, + "name": "OpenIMSearchGroupMembersParams", + "declaration": "export type OpenIMSearchGroupMembersParams = {\n groupID : string\n keywordList : Array\n isSearchUserID : boolean\n isSearchMemberNickname : boolean\n}", + "signatureHash": "6b849bfb059cd39e3a022e5f3d4c564c58c5778edff7ffa28e828442b4d2d6f0", + "edition": "public" + }, + { + "id": 1044, + "name": "OpenIMCreateGroupInfo", + "declaration": "export type OpenIMCreateGroupInfo = {\n groupName : string\n groupType : 2\n notification ?: string | null\n introduction ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n}", + "signatureHash": "ffec54165e4c12239b73917e333ffe16126376c86068de95f3ab36ec87a1c64b", + "edition": "public" + }, + { + "id": 1045, + "name": "OpenIMCreateGroupParams", + "declaration": "export type OpenIMCreateGroupParams = {\n groupInfo : OpenIMCreateGroupInfo\n memberUserIDs : Array\n adminUserIDs ?: Array | null\n}", + "signatureHash": "b1109c4277ee0b7ac1d7fcb5a7b52706e821a2660d79b4ffbe28fc9b2905cb47", + "edition": "public" + }, + { + "id": 1046, + "name": "OpenIMSetGroupInfoParams", + "declaration": "export type OpenIMSetGroupInfoParams = {\n groupID : string\n groupName ?: string | null\n notification ?: string | null\n introduction ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n needVerification ?: OpenIMGroupNeedVerification | null\n lookMemberInfo ?: OpenIMGroupOption | null\n applyMemberFriend ?: OpenIMGroupOption | null\n displayIsRead ?: OpenIMGroupDisplayIsRead | null\n}", + "signatureHash": "b6da4a10753ad1184c55ab4f7f6f64d5fa20b4aa143879b730d1e163a21f4dfb", + "edition": "public" + }, + { + "id": 1047, + "name": "OpenIMSetGroupMemberInfoParams", + "declaration": "export type OpenIMSetGroupMemberInfoParams = {\n groupID : string\n userID : string\n nickname ?: string | null\n faceURL ?: string | null\n roleLevel ?: OpenIMGroupMemberRoleLevel | null\n ex ?: string | null\n}", + "signatureHash": "be5a45a607a834119a540dd426b154a0f542eb1822ef8df4c704bc60e9e327e7", + "edition": "public" + }, + { + "id": 1048, + "name": "OpenIMJoinGroupParams", + "declaration": "export type OpenIMJoinGroupParams = {\n groupID : string\n reqMsg : string\n joinSource : number\n ex ?: string | null\n}", + "signatureHash": "04d375b93c6de64b3b6a5bfe36ddaccd0f07f5f02c6c622a646f36d3c2c07eb5", + "edition": "public" + }, + { + "id": 1049, + "name": "OpenIMSearchGroupsParams", + "declaration": "export type OpenIMSearchGroupsParams = {\n keywordList : Array\n isSearchGroupID : boolean\n isSearchGroupName : boolean\n}", + "signatureHash": "ffa28e5f24c96d16a54914ffc4a3701cab1f61437fc62121a6c4e76d43b726b2", + "edition": "public" + }, + { + "id": 1050, + "name": "OpenIMChangeGroupMuteParams", + "declaration": "export type OpenIMChangeGroupMuteParams = {\n groupID : string\n isMute : boolean\n}", + "signatureHash": "aa17171474e80fd1e6a36a7dbe304166c234c3cfa6eeab576195946f52cc0256", + "edition": "public" + }, + { + "id": 1051, + "name": "OpenIMChangeGroupMemberMuteParams", + "declaration": "export type OpenIMChangeGroupMemberMuteParams = {\n groupID : string\n userID : string\n mutedSeconds : number\n}", + "signatureHash": "6697ba759a76a4403895ac2dbf7de0a9368321cd2a8294ec92b11fec2a58cf2e", + "edition": "public" + }, + { + "id": 1052, + "name": "OpenIMTransferGroupOwnerParams", + "declaration": "export type OpenIMTransferGroupOwnerParams = {\n groupID : string\n newOwnerUserID : string\n}", + "signatureHash": "9f7c7aee7ecdeed54731c5ad4ef0cf95a1c4923db8671b3f6727f6f9bf4e1d3e", + "edition": "public" + }, + { + "id": 1053, + "name": "OpenIMGroupApplicationHandleParams", + "declaration": "export type OpenIMGroupApplicationHandleParams = {\n groupID : string\n fromUserID : string\n handleMsg : string\n}", + "signatureHash": "8ba30188c3e3cd4695c4793a7f8fc7bd32529b232b2c987db7111a9d308776d6", + "edition": "public" + }, + { + "id": 1054, + "name": "OpenIMFindMessageParams", + "declaration": "export type OpenIMFindMessageParams = {\n conversationID : string\n clientMsgIDList : Array\n}", + "signatureHash": "d5a6e9e2e19d5dd2241a33a10da6aef942485b87af823429495e33f6873bf903", + "edition": "public" + }, + { + "id": 1055, + "name": "OpenIMCreateCustomMessageParams", + "declaration": "export type OpenIMCreateCustomMessageParams = {\n data : string\n extension : string\n descriptionText : string\n}", + "signatureHash": "9bd7a01198c96058cb52d6fffa3d059b14082e4eab3b59f9c26b7370eb38be98", + "edition": "public" + }, + { + "id": 1056, + "name": "OpenIMCreateQuoteMessageParams", + "declaration": "export type OpenIMCreateQuoteMessageParams = {\n text : string\n message : string\n}", + "signatureHash": "63f428d077669061ebb78118e8bcb19a413ad24872bb520e644650e239c214eb", + "edition": "public" + }, + { + "id": 1057, + "name": "OpenIMCreateAdvancedQuoteMessageParams", + "declaration": "export type OpenIMCreateAdvancedQuoteMessageParams = {\n text : string\n message : string\n messageEntityList : Array\n}", + "signatureHash": "21b9c8457dc0ab691f098ed81c93908ee611c2f61e3b0db6df186dd8a7644f51", + "edition": "public" + }, + { + "id": 1058, + "name": "OpenIMCreateAdvancedTextMessageParams", + "declaration": "export type OpenIMCreateAdvancedTextMessageParams = {\n text : string\n messageEntityList : Array\n}", + "signatureHash": "160e42977b232d732945b544b434124976ca12f5159b8c1a776acbc746a86641", + "edition": "public" + }, + { + "id": 1059, + "name": "OpenIMCreateTextAtMessageParams", + "declaration": "export type OpenIMCreateTextAtMessageParams = {\n text : string\n atUserIDList : Array\n atUsersInfo ?: Array | null\n quoteMessage ?: OpenIMMessageItem | null\n}", + "signatureHash": "805f4869c2be9695182db1ae1bd542df39943f243f7b3bc45d61bb0b10b83d78", + "edition": "public" + }, + { + "id": 1060, + "name": "OpenIMCreateMergerMessageParams", + "declaration": "export type OpenIMCreateMergerMessageParams = {\n messageList : Array\n title : string\n abstractList : Array\n}", + "signatureHash": "53f569e81369fd7ea141af0c1ff31dabcb8073e813cca1a201100509f202ba3e", + "edition": "public" + }, + { + "id": 1061, + "name": "OpenIMCreateFaceMessageParams", + "declaration": "export type OpenIMCreateFaceMessageParams = {\n index : number\n data : string\n}", + "signatureHash": "bf4a90e528812c64c24c8a1cfe052bfe62eae542622cc3455a81e41c1dbb4c2a", + "edition": "public" + }, + { + "id": 1062, + "name": "OpenIMCreateLocationMessageParams", + "declaration": "export type OpenIMCreateLocationMessageParams = {\n descriptionText : string\n longitude : number\n latitude : number\n}", + "signatureHash": "2b3dfb06f155a776b629519e9acea98e67b0806b5da142acd524295d4878ab6f", + "edition": "public" + }, + { + "id": 1063, + "name": "OpenIMMessageEntity", + "declaration": "export type OpenIMMessageEntity = {\n type ?: string | null\n offset ?: number | null\n length ?: number | null\n url ?: string | null\n ex ?: string | null\n info ?: string | null\n}", + "signatureHash": "a1c002f8741dbb614ab2d9d48a75f9055fb3f7a7634608bbba329b4ac663e553", + "edition": "public" + }, + { + "id": 1064, + "name": "OpenIMTextElem", + "declaration": "export type OpenIMTextElem = {\n content ?: string | null\n}", + "signatureHash": "0f49b7b5160434661322667b9cec3bb31799c5a767eb1fd3171a8e66e1287045", + "edition": "public" + }, + { + "id": 1065, + "name": "OpenIMCardElem", + "declaration": "export type OpenIMCardElem = {\n userID ?: string | null\n nickname ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n}", + "signatureHash": "a3368b7e2eda8f0248d03cb5555ff0ae5335817452c8ec49c9a038c21eb9ba43", + "edition": "public" + }, + { + "id": 1066, + "name": "OpenIMAtUsersInfoItem", + "declaration": "export type OpenIMAtUsersInfoItem = {\n atUserID ?: string | null\n groupNickname ?: string | null\n}", + "signatureHash": "aed660c51226b8723b69c65bfb1b5d3382efc2a2e333a74135b4946521c1f8ab", + "edition": "public" + }, + { + "id": 1067, + "name": "OpenIMAtTextElem", + "declaration": "export type OpenIMAtTextElem = {\n text ?: string | null\n atUserList ?: Array | null\n atUsersInfo ?: Array | null\n quoteMessage ?: OpenIMMessageItemRef | null\n isAtSelf ?: boolean | null\n}", + "signatureHash": "75efddfb740bffb13e16d424b7e34b025bf07362cb46860d6065c1f3438d9350", + "edition": "public" + }, + { + "id": 1068, + "name": "OpenIMNotificationElem", + "declaration": "export type OpenIMNotificationElem = {\n detail ?: string | null\n}", + "signatureHash": "8ed1ab19f3af3ffbd158d394c27908b7e09d71f7b14e5c74f9b17241538b5199", + "edition": "public" + }, + { + "id": 1069, + "name": "OpenIMAdvancedTextElem", + "declaration": "export type OpenIMAdvancedTextElem = {\n text ?: string | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "ee82bd73672c4dcb3258d33df5ba72a01ad4dd378785d229f464e1c8478e7055", + "edition": "public" + }, + { + "id": 1070, + "name": "OpenIMTypingElem", + "declaration": "export type OpenIMTypingElem = {\n msgTips ?: string | null\n}", + "signatureHash": "be42daaaead94a9138309b444aa9a63ce0150fc377dd29295365e0d471c2e0db", + "edition": "public" + }, + { + "id": 1071, + "name": "OpenIMFileElem", + "declaration": "export type OpenIMFileElem = {\n filePath ?: string | null\n uuid ?: string | null\n sourceUrl ?: string | null\n fileName ?: string | null\n fileSize ?: number | null\n}", + "signatureHash": "71f34c3511c7edadf3ef9116effcca1d6f2bf0f1d4efe2d9ed5a14be23849ced", + "edition": "public" + }, + { + "id": 1072, + "name": "OpenIMFaceElem", + "declaration": "export type OpenIMFaceElem = {\n index ?: number | null\n data ?: string | null\n}", + "signatureHash": "d1a016aef3afaade3a7eb4445cc7bf6c1adf289dedf01e313a4c9b74c6953b19", + "edition": "public" + }, + { + "id": 1073, + "name": "OpenIMLocationElem", + "declaration": "export type OpenIMLocationElem = {\n descriptionText ?: string | null\n longitude ?: number | null\n latitude ?: number | null\n}", + "signatureHash": "e9c0c035a0c9820eae383005e7674f565909e3c047e0f20de51c9669b8a0e46c", + "edition": "public" + }, + { + "id": 1074, + "name": "OpenIMCustomElem", + "declaration": "export type OpenIMCustomElem = {\n data ?: string | null\n descriptionText ?: string | null\n extensionText ?: string | null\n}", + "signatureHash": "a4d3376f2c455c65f34afd0bee12da76f53ba1b662ad40b57a7ca13dd3b328b1", + "edition": "public" + }, + { + "id": 1075, + "name": "OpenIMMergeElem", + "declaration": "export type OpenIMMergeElem = {\n title ?: string | null\n abstractList ?: Array | null\n multiMessage ?: Array | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "23fb44975d05b1105f0b158bb4d1ea7faa86a867c953dc6599a6625ea2aef659", + "edition": "public" + }, + { + "id": 1076, + "name": "OpenIMOfflinePush", + "declaration": "export type OpenIMOfflinePush = {\n title ?: string | null\n desc ?: string | null\n ex ?: string | null\n iOSPushSound ?: string | null\n iOSBadgeCount ?: boolean | null\n}", + "signatureHash": "9b90be2a0c61ef7b0c249c26b30e687e3b184e250a3cb4a5866dc693321a5fda", + "edition": "public" + }, + { + "id": 1077, + "name": "OpenIMPicture", + "declaration": "export type OpenIMPicture = {\n uuid ?: string | null\n type ?: string | null\n size ?: number | null\n width ?: number | null\n height ?: number | null\n url ?: string | null\n}", + "signatureHash": "f04bdadf101bb6ebc3ff41ac57a89d32e522763ca0f0be711b3ce9d4e3a53b25", + "edition": "public" + }, + { + "id": 1078, + "name": "OpenIMPictureElem", + "declaration": "export type OpenIMPictureElem = {\n sourcePath ?: string | null\n sourcePicture ?: OpenIMPicture | null\n bigPicture ?: OpenIMPicture | null\n snapshotPicture ?: OpenIMPicture | null\n}", + "signatureHash": "70fbb702fb0804466b1924df67ffcd7ffe3568e52f8364867f40481044dd70ad", + "edition": "public" + }, + { + "id": 1079, + "name": "OpenIMAttachedGroupHasReadInfo", + "declaration": "export type OpenIMAttachedGroupHasReadInfo = {\n hasReadCount ?: number | null\n unreadCount ?: number | null\n hasReadUserIDList ?: Array | null\n groupMemberCount ?: number | null\n}", + "signatureHash": "c03da824911cb525bb53693ae7bb1579cb5014febcb1f130d0b452447d4a76bd", + "edition": "public" + }, + { + "id": 1080, + "name": "OpenIMUploadProgress", + "declaration": "export type OpenIMUploadProgress = {\n total ?: number | null\n save ?: number | null\n current ?: number | null\n uploadID ?: string | null\n}", + "signatureHash": "b52193934a41200dc2a4d272b12ffc53936dddf30170efc1b1eb7a12ce907ac6", + "edition": "public" + }, + { + "id": 1081, + "name": "OpenIMAttachedInfoElem", + "declaration": "export type OpenIMAttachedInfoElem = {\n groupHasReadInfo ?: OpenIMAttachedGroupHasReadInfo | null\n isPrivateChat ?: boolean | null\n isEncryption ?: boolean | null\n inEncryptStatus ?: boolean | null\n burnDuration ?: number | null\n hasReadTime ?: number | null\n messageEntityList ?: Array | null\n uploadProgress ?: OpenIMUploadProgress | null\n}", + "signatureHash": "9ba2f2535b1577151196a45f0bb26866b48067bfd451085fa620e6ce9111e0d1", + "edition": "public" + }, + { + "id": 1082, + "name": "OpenIMQuoteElem", + "declaration": "export type OpenIMQuoteElem = {\n text ?: string | null\n quoteMessage ?: OpenIMMessageItemRef | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "31af4d22fa4fe24496e61fbda8ecd10b5b961c860ea7ceeb29cdda3a0e5ce7da", + "edition": "public" + }, + { + "id": 1083, + "name": "OpenIMSoundElem", + "declaration": "export type OpenIMSoundElem = {\n uuid ?: string | null\n soundPath ?: string | null\n sourceUrl ?: string | null\n dataSize ?: number | null\n duration ?: number | null\n}", + "signatureHash": "50de258e4269a9118635019c551ab2b04703e423b7188d8dc668353fcbd0c8c7", + "edition": "public" + }, + { + "id": 1084, + "name": "OpenIMVideoElem", + "declaration": "export type OpenIMVideoElem = {\n videoPath ?: string | null\n videoUUID ?: string | null\n videoUrl ?: string | null\n videoType ?: string | null\n videoSize ?: number | null\n duration ?: number | null\n snapshotPath ?: string | null\n snapshotUUID ?: string | null\n snapshotSize ?: number | null\n snapshotUrl ?: string | null\n snapshotWidth ?: number | null\n snapshotHeight ?: number | null\n}", + "signatureHash": "aa263f920958c6d75d1d3254f6c18e904248901bc49a832c5e70a5d7bf52678e", + "edition": "public" + }, + { + "id": 1085, + "name": "OpenIMMessageItemRef", + "declaration": "export type OpenIMMessageItemRef = {\n clientMsgID ?: string | null\n serverMsgID ?: string | null\n createTime : number\n sendTime : number\n sessionType : OpenIMSessionType\n sendID ?: string | null\n recvID ?: string | null\n msgFrom : number\n contentType : OpenIMMessageType\n senderPlatformID : OpenIMPlatform\n senderNickname ?: string | null\n senderFaceUrl ?: string | null\n groupID ?: string | null\n content ?: string | null\n seq : number\n isRead : boolean\n status : OpenIMMessageStatus\n attachedInfo ?: string | null\n ex ?: string | null\n localEx ?: string | null\n textElem ?: OpenIMTextElem | null\n cardElem ?: OpenIMCardElem | null\n pictureElem ?: OpenIMPictureElem | null\n soundElem ?: OpenIMSoundElem | null\n videoElem ?: OpenIMVideoElem | null\n fileElem ?: OpenIMFileElem | null\n faceElem ?: OpenIMFaceElem | null\n locationElem ?: OpenIMLocationElem | null\n customElem ?: OpenIMCustomElem | null\n}", + "signatureHash": "1ac0f0db5fdc73648e4e5739aa1ea4cbd8542877e48ace677a90bbd5c6ea1e81", + "edition": "public" + }, + { + "id": 1086, + "name": "OpenIMMessageItem", + "declaration": "export type OpenIMMessageItem = {\n clientMsgID ?: string | null\n serverMsgID ?: string | null\n createTime : number\n sendTime : number\n sessionType : OpenIMSessionType\n sendID ?: string | null\n recvID ?: string | null\n msgFrom : number\n contentType : OpenIMMessageType\n senderPlatformID : OpenIMPlatform\n senderNickname ?: string | null\n senderFaceUrl ?: string | null\n groupID ?: string | null\n content ?: string | null\n seq : number\n isRead : boolean\n status : OpenIMMessageStatus\n offlinePush ?: OpenIMOfflinePush | null\n attachedInfo ?: string | null\n ex ?: string | null\n localEx ?: string | null\n textElem ?: OpenIMTextElem | null\n cardElem ?: OpenIMCardElem | null\n pictureElem ?: OpenIMPictureElem | null\n soundElem ?: OpenIMSoundElem | null\n videoElem ?: OpenIMVideoElem | null\n fileElem ?: OpenIMFileElem | null\n mergeElem ?: OpenIMMergeElem | null\n atTextElem ?: OpenIMAtTextElem | null\n faceElem ?: OpenIMFaceElem | null\n locationElem ?: OpenIMLocationElem | null\n customElem ?: OpenIMCustomElem | null\n quoteElem ?: OpenIMQuoteElem | null\n notificationElem ?: OpenIMNotificationElem | null\n advancedTextElem ?: OpenIMAdvancedTextElem | null\n typingElem ?: OpenIMTypingElem | null\n attachedInfoElem ?: OpenIMAttachedInfoElem | null\n}", + "signatureHash": "5aec8cb3a7963f19d9f39e7f3d383620ff62e8748994ebb89f81b1bf15b3f141", + "edition": "public" + }, + { + "id": 1087, + "name": "OpenIMConversationItem", + "declaration": "export type OpenIMConversationItem = {\n conversationID : string\n conversationType : OpenIMSessionType\n userID ?: string | null\n groupID ?: string | null\n showName : string\n faceURL : string\n recvMsgOpt : number\n unreadCount : number\n latestMsg ?: string | null\n latestMsgSendTime : number\n draftText : string\n draftTextTime : number\n isPinned : boolean\n isPrivateChat : boolean\n attachedInfo : string\n ex : string\n burnDuration : number\n minSeq : number\n maxSeq : number\n msgDestructTime : number\n groupAtType : number\n isMsgDestruct : boolean\n isNotInGroup : boolean\n updateUnreadCountTime : number\n}", + "signatureHash": "598414c4c588fa99562775080bb8d17daa4cbb793dd6b15aea42afb478f6ddd0", + "edition": "public" + }, + { + "id": 1088, + "name": "OpenIMConversationListResult", + "declaration": "export type OpenIMConversationListResult = {\n conversations : Array\n}", + "signatureHash": "fd65acc4e6f32e7fb0e9e4c1f0feb1e0c5ed89b137a4507ca4ac87815b4b50ed", + "edition": "public" + }, + { + "id": 1089, + "name": "OpenIMUserListResult", + "declaration": "export type OpenIMUserListResult = {\n users : Array\n}", + "signatureHash": "403313cbd3c36d50f047d193977c7a401a6d62d1680a149e4e1f2839e3b06fff", + "edition": "public" + }, + { + "id": 1090, + "name": "OpenIMUserStatusItem", + "declaration": "export type OpenIMUserStatusItem = {\n userID : string\n status : number\n platformIDs : Array\n}", + "signatureHash": "a8d28054689489918abd8332b6339a2cb5cb28ad0941b0f7290e676fc46dda8d", + "edition": "public" + }, + { + "id": 1091, + "name": "OpenIMUserStatusListResult", + "declaration": "export type OpenIMUserStatusListResult = {\n statuses : Array\n}", + "signatureHash": "80948b1e7f541d4a52cd9bed55cce5bb78017128f96988173be79a78b63cb66a", + "edition": "public" + }, + { + "id": 1092, + "name": "OpenIMFriendListResult", + "declaration": "export type OpenIMFriendListResult = {\n friends : Array\n}", + "signatureHash": "95441a05fa85bd1d953d068544a351ec342404fe264e6ec6af553749e875341d", + "edition": "public" + }, + { + "id": 1093, + "name": "OpenIMBlackListResult", + "declaration": "export type OpenIMBlackListResult = {\n blackUsers : Array\n}", + "signatureHash": "ad014afc58f1cc960ebd231eb7e347c6857a5a81806785080b3e375a9a5fc725", + "edition": "public" + }, + { + "id": 1094, + "name": "OpenIMGroupListResult", + "declaration": "export type OpenIMGroupListResult = {\n groups : Array\n}", + "signatureHash": "e5c01b3fc76eeca5804c9383b089886e48467767603574caa3f9ae29a36a36ed", + "edition": "public" + }, + { + "id": 1095, + "name": "OpenIMGroupMemberListResult", + "declaration": "export type OpenIMGroupMemberListResult = {\n members : Array\n}", + "signatureHash": "ce8e5c716e5aef111ba89bdaa67e2d26524320a59920aa9f40f241f8d875f58e", + "edition": "public" + }, + { + "id": 1096, + "name": "OpenIMFriendApplicationListResult", + "declaration": "export type OpenIMFriendApplicationListResult = {\n applications : Array\n}", + "signatureHash": "e232583f1151817ca1fb1cf7886a9fcb471a4fd6fe84eb970bbf570c1c41e785", + "edition": "public" + }, + { + "id": 1097, + "name": "OpenIMGroupApplicationListResult", + "declaration": "export type OpenIMGroupApplicationListResult = {\n applications : Array\n}", + "signatureHash": "46db95eab29b381521911d02a613bd6dcc54aed40a3d10117bd88fc3f25c2a95", + "edition": "public" + }, + { + "id": 1098, + "name": "OpenIMMessageListResult", + "declaration": "export type OpenIMMessageListResult = {\n messages : Array\n}", + "signatureHash": "8e6e1f89a0fb403f7a2a3daddacfcd8c5a7e4cc53d9031d2f0a31b2500cd965a", + "edition": "public" + }, + { + "id": 1099, + "name": "OpenIMUserInfo", + "declaration": "export type OpenIMUserInfo = {\n userID : string\n nickname : string\n faceURL : string\n ex : string\n createTime ?: number | null\n attachedInfo ?: string | null\n globalRecvMsgOpt ?: number | null\n}", + "signatureHash": "ce8160a04596bf7e963750e430746f3c09f8c8904972036030426300000b3f39", + "edition": "public" + }, + { + "id": 1100, + "name": "OpenIMPublicUserItem", + "declaration": "export type OpenIMPublicUserItem = OpenIMUserInfo", + "signatureHash": "87765e398f97f0789dbdc4ba62eddeea11d36573d497bd42d31a196585d72e62", + "edition": "public" + }, + { + "id": 1101, + "name": "OpenIMFriendUserItem", + "declaration": "export type OpenIMFriendUserItem = {\n ownerUserID : string\n userID : string\n nickname : string\n faceURL : string\n remark : string\n createTime : number\n addSource : number\n operatorUserID : string\n ex : string\n attachedInfo : string\n isPinned : boolean\n}", + "signatureHash": "3aab4773462c2927d59d3be09888222b758abd0bd95b11fcf1978fa39b7527c2", + "edition": "public" + }, + { + "id": 1102, + "name": "OpenIMBlackUserItem", + "declaration": "export type OpenIMBlackUserItem = {\n ownerUserID : string\n userID : string\n nickname : string\n faceURL : string\n createTime : number\n addSource : number\n operatorUserID : string\n ex : string\n attachedInfo : string\n}", + "signatureHash": "713c267f837a34d9ba48d3a2fa5090dda8d058c131491b546b8480f7cbe9c237", + "edition": "public" + }, + { + "id": 1103, + "name": "OpenIMGroupItem", + "declaration": "export type OpenIMGroupItem = {\n groupID : string\n groupName : string\n notification : string\n introduction : string\n faceURL : string\n ownerUserID : string\n createTime : number\n memberCount : number\n status : number\n creatorUserID : string\n groupType : number\n needVerification : number\n lookMemberInfo : number\n applyMemberFriend : number\n notificationUpdateTime : number\n notificationUserID : string\n ex : string\n attachedInfo : string\n}", + "signatureHash": "7a3c765d2938ab26d72e645d65f89483e94c0404c7dcf3e3210aa7b0d579aca7", + "edition": "public" + }, + { + "id": 1104, + "name": "OpenIMGroupMemberItem", + "declaration": "export type OpenIMGroupMemberItem = {\n groupID : string\n userID : string\n nickname : string\n faceURL : string\n roleLevel : number\n joinTime : number\n joinSource : number\n operatorUserID : string\n ex : string\n muteEndTime : number\n inviterUserID : string\n attachedInfo : string\n}", + "signatureHash": "81ad1090935d1bb275b174f79bfb9c9a96939f692971de1c2481fb01e3e3234d", + "edition": "public" + }, + { + "id": 1105, + "name": "OpenIMFriendApplicationItem", + "declaration": "export type OpenIMFriendApplicationItem = {\n fromUserID : string\n fromNickname : string\n fromFaceURL : string\n toUserID : string\n toNickname : string\n toFaceURL : string\n handleResult : number\n reqMsg : string\n createTime : number\n handlerUserID : string\n handleMsg : string\n handleTime : number\n ex : string\n attachedInfo : string\n}", + "signatureHash": "366f3242235b8dcb611776ececab41acfe647ae1ea7b9b97d36cc5c80e62fc8d", + "edition": "public" + }, + { + "id": 1106, + "name": "OpenIMGroupApplicationItem", + "declaration": "export type OpenIMGroupApplicationItem = {\n groupID : string\n groupName : string\n notification : string\n introduction : string\n groupFaceURL : string\n ownerUserID : string\n createTime : number\n status : number\n creatorUserID : string\n groupType ?: number | null\n memberCount : number\n userID : string\n nickname : string\n userFaceURL : string\n handleResult : number\n reqMsg : string\n handledMsg : string\n reqTime : number\n joinSource : number\n inviterUserID : string\n handleUserID : string\n handledTime : number\n ex : string\n attachedInfo : string\n}", + "signatureHash": "7b33f7fe84a3f268f96ea23446c4ca9334624827f7c1607de708fd3ad6ed4e86", + "edition": "public" + }, + { + "id": 1107, + "name": "OpenIMMessageRevokedItem", + "declaration": "export type OpenIMMessageRevokedItem = {\n revokerID : string\n revokerRole : number\n clientMsgID : string\n revokerNickname : string\n revokeTime : number\n sourceMessageSendTime : number\n sourceMessageSendID : string\n sourceMessageSenderNickname : string\n sessionType : OpenIMSessionType\n seq : number\n ex : string\n isAdminRevoke : boolean\n}", + "signatureHash": "b6ddba526c9690a96f36deebc7804168b8ccc8e017db7b96076797fed505758c", + "edition": "public" + }, + { + "id": 1108, + "name": "OpenIMMessageReceiptItem", + "declaration": "export type OpenIMMessageReceiptItem = {\n groupID : string\n userID : string\n msgIDList : Array\n readTime : number\n msgFrom : number\n contentType : OpenIMMessageType | 0\n sessionType : OpenIMSessionType\n}", + "signatureHash": "2eb37aa8fa133a4be81504cb3882de71c4e9babf2b70eabaa3eae2d2bc4cb8da", + "edition": "public" + }, + { + "id": 1109, + "name": "OpenIMMessageReceiptListResult", + "declaration": "export type OpenIMMessageReceiptListResult = {\n receipts : Array\n}", + "signatureHash": "de29548e1d2deb766bcb1d81a918f40baa12ffaecc3f5ab395c1c13e9fcc3b2e", + "edition": "public" + }, + { + "id": 1110, + "name": "OpenIMConversationInputStatusItem", + "declaration": "export type OpenIMConversationInputStatusItem = {\n conversationID : string\n userID : string\n platformIDs : Array\n}", + "signatureHash": "ea0d22504dd2734a2f02cbea762beb04d681440d3d8ebe46f4951fee83856b7a", + "edition": "public" + }, + { + "id": 1111, + "name": "OpenIMGetOneConversationParams", + "declaration": "export type OpenIMGetOneConversationParams = {\n sourceID : string\n sessionType : OpenIMSessionType\n}", + "signatureHash": "6bb7b29d59bcf4d675d5f5216addd62b5e9e63a95b18dd9455d0b34755ad0573", + "edition": "public" + }, + { + "id": 1112, + "name": "OpenIMPageParams", + "declaration": "export type OpenIMPageParams = {\n offset : number\n count : number\n}", + "signatureHash": "f5ecdf631ff9ebc8595ebf4635d14c10c6ba15283e629da31c6784b1b67c6076", + "edition": "public" + }, + { + "id": 1113, + "name": "OpenIMGetGroupMemberListParams", + "declaration": "export type OpenIMGetGroupMemberListParams = {\n groupID : string\n filter : number\n offset : number\n count : number\n}", + "signatureHash": "06c82731d2e593ca418de1a0866a245b71a2be01ddeb3c02277edae1e84ec4f0", + "edition": "public" + }, + { + "id": 1114, + "name": "OpenIMGetAdvancedHistoryMessageListParams", + "declaration": "export type OpenIMGetAdvancedHistoryMessageListParams = {\n conversationID : string\n startClientMsgID : string\n count : number\n lastMinSeq ?: number | null\n}", + "signatureHash": "b521938a9052e5499ecbc005550e44e6abacf2e815092ec5e496a3dbc90774cc", + "edition": "public" + }, + { + "id": 1115, + "name": "OpenIMAdvancedHistoryMessageListResult", + "declaration": "export type OpenIMAdvancedHistoryMessageListResult = {\n messageList : Array\n lastMinSeq : number\n isEnd : boolean\n errCode : number\n errMsg : string\n}", + "signatureHash": "02a6f480de44a33716123127bcec9de5615609d9fc54fcd5abc66b3e9dd5bf06", + "edition": "public" + }, + { + "id": 1116, + "name": "OpenIMSearchLocalMessagesParams", + "declaration": "export type OpenIMSearchLocalMessagesParams = {\n conversationID ?: string | null\n keywordList : Array\n keywordListMatchType : number\n senderUserIDList : Array\n messageTypeList : Array\n searchTimePosition : number\n searchTimePeriod : number\n pageIndex : number\n count : number\n}", + "signatureHash": "0bde1c182740b5537146b79e2d10ae65bdc9cc4b2c6d62b41d8a2311c938b4a5", + "edition": "public" + }, + { + "id": 1117, + "name": "OpenIMApplicationListParams", + "declaration": "export type OpenIMApplicationListParams = {\n offset ?: number | null\n count ?: number | null\n}", + "signatureHash": "0bec3ff5c5bc96e5b42d183209b936658e96d6fc2cacc2ff9b0dc16b84d90d27", + "edition": "public" + }, + { + "id": 1118, + "name": "OpenIMSearchMessageResultItem", + "declaration": "export type OpenIMSearchMessageResultItem = {\n conversationID : string\n conversationType : OpenIMSessionType\n showName : string\n faceURL : string\n latestMsgSendTime ?: number | null\n messageCount : number\n messageList : Array\n}", + "signatureHash": "99e8c2726231bddc4908b7e7eddf469cbfaeec2ba704c6f4a44870da18ebe83e", + "edition": "public" + }, + { + "id": 1119, + "name": "OpenIMFindMessageResultItem", + "declaration": "export type OpenIMFindMessageResultItem = OpenIMSearchMessageResultItem", + "signatureHash": "8bc5514ea67060fa41e5341d6803ae4dbb06847ac4ef290cba907621b978f5d3", + "edition": "public" + }, + { + "id": 1120, + "name": "OpenIMSearchMessageResult", + "declaration": "export type OpenIMSearchMessageResult = {\n totalCount : number\n searchResultItems : Array\n}", + "signatureHash": "7d78f39157a9b03b4476e05b221ae8d0c211de0ab4e5db089cf1955064607afc", + "edition": "public" + }, + { + "id": 1121, + "name": "OpenIMFindMessageResult", + "declaration": "export type OpenIMFindMessageResult = {\n totalCount : number\n findResultItems : Array\n}", + "signatureHash": "b32c26060524c7fecb0554641ac3be5adff9c8e308c1e486652ce529b13dfac8", + "edition": "public" + }, + { + "id": 1122, + "name": "OpenIMError", + "declaration": "export type OpenIMError = {\n errCode : number\n errMsg : string\n}", + "signatureHash": "478f2ffc6a418fe49bb1723358d86dbcbf40e9073138eb7adade0808a3118100", + "edition": "public" + }, + { + "id": 1123, + "name": "OpenIMInitConfig", + "declaration": "export type OpenIMInitConfig = {\n platformID : OpenIMPlatform\n apiAddr : string\n wsAddr : string\n dataDir ?: string | null\n logFilePath ?: string | null\n logLevel : OpenIMLogLevel\n isLogStandardOutput : boolean\n systemType : string\n}", + "signatureHash": "69fa6f811bac82a49cf579ff1632381d4681eae0ee45d7032c4a4631864a7777", + "edition": "public" + }, + { + "id": 1124, + "name": "OpenIMSDKEventName", + "declaration": "export type OpenIMSDKEventName =\n 'onConnecting' |\n 'onConnectSuccess' |\n 'onConnectFailed' |\n 'onKickedOffline' |\n 'onUserTokenExpired' |\n 'onUserTokenInvalid' |\n 'onRecvNewMessage' |\n 'onRecvOfflineNewMessage' |\n 'onRecvOnlineOnlyMessage' |\n 'onMsgDeleted' |\n 'onNewRecvMessageRevoked' |\n 'onRecvC2CReadReceipt' |\n 'onRecvNewMessages' |\n 'onRecvOfflineNewMessages' |\n 'onConversationChanged' |\n 'onConversationUserInputStatusChanged' |\n 'onNewConversation' |\n 'onSyncServerFailed' |\n 'onSyncServerFinish' |\n 'onSyncServerProgress' |\n 'onSyncServerStart' |\n 'onSendMessageProgress' |\n 'onUploadFileProgress' |\n 'onUploadLogsProgress' |\n 'onTotalUnreadMessageCountChanged' |\n 'onRecvCustomBusinessMessage' |\n 'onBlackAdded' |\n 'onBlackDeleted' |\n 'onFriendAdded' |\n 'onFriendApplicationAccepted' |\n 'onFriendApplicationAdded' |\n 'onFriendApplicationDeleted' |\n 'onFriendApplicationRejected' |\n 'onFriendDeleted' |\n 'onFriendInfoChanged' |\n 'onGroupApplicationAccepted' |\n 'onGroupApplicationAdded' |\n 'onGroupApplicationDeleted' |\n 'onGroupApplicationRejected' |\n 'onGroupDismissed' |\n 'onGroupInfoChanged' |\n 'onGroupMemberAdded' |\n 'onGroupMemberDeleted' |\n 'onGroupMemberInfoChanged' |\n 'onJoinedGroupAdded' |\n 'onJoinedGroupDeleted' |\n 'onSelfInfoUpdated' |\n 'onUserStatusChanged' |\n 'onChangedPinnedMsg' |\n 'onDeleteUserAllMsgsInConv' |\n 'onMessageModified' |\n 'onMessageEdited' |\n 'onRecvGroupReadReceipt' |\n 'onRecvMessageExtensionsAdded' |\n 'onRecvMessageExtensionsChanged' |\n 'onRecvMessageExtensionsDeleted' |\n 'onConversationGroupAdded' |\n 'onConversationGroupChanged' |\n 'onConversationGroupDeleted' |\n 'onConversationGroupMemberAdded' |\n 'onConversationGroupMemberDeleted' |\n 'onGroupApplicationBadgeCountChanged' |\n 'onReceiveNewInvitation' |\n 'onInviteeAccepted' |\n 'onInviteeAcceptedByOtherDevice' |\n 'onInviteeRejected' |\n 'onInviteeRejectedByOtherDevice' |\n 'onInvitationCancelled' |\n 'onInvitationTimeout' |\n 'onHangUp' |\n 'onRoomParticipantConnected' |\n 'onRoomParticipantDisconnected' |\n 'onReceiveCustomSignaling' |\n 'onReceiveCustomSignal' |\n 'onStreamChange' |\n 'onMessageKvInfoChanged' |\n 'onMigrationStart' |\n 'onMigrationProgress' |\n 'onMigrationFailed' |\n 'onMigrationFinished' |\n 'onSDKSessionChanged'", + "signatureHash": "9e5ea6ea56bceef44bef3fc2009ed98fbcfe34804794ee2a1543fbfd0dc3783e", + "edition": "public" + }, + { + "id": 1125, + "name": "OpenIMSDKEvent", + "declaration": "export type OpenIMSDKEvent = {\n eventName : OpenIMSDKEventName\n payload : string\n errCode : number\n errMsg : string\n}", + "signatureHash": "e5e9143dc06c8aa13eafb05fdb8e21d36b9c4f28adcdaada75eb76734cceeda9", + "edition": "public" + }, + { + "id": 1126, + "name": "OpenIMSDKRawEventHandler", + "declaration": "export type OpenIMSDKRawEventHandler = (event : OpenIMSDKEvent) => void", + "signatureHash": "3f289b82198d4dbe45788c499bac189efe66fa057b43f4129e8ab018b9003dec", + "edition": "public" + }, + { + "id": 1127, + "name": "OpenIMVoidEventHandler", + "declaration": "export type OpenIMVoidEventHandler = () => void", + "signatureHash": "48a97d3e392f62df40855612d6d54073c807881812dc7d431305dedabc49c4ad", + "edition": "public" + }, + { + "id": 1128, + "name": "OpenIMErrorEventHandler", + "declaration": "export type OpenIMErrorEventHandler = (errCode : number, errMsg : string) => void", + "signatureHash": "3e62a50c91e1a2061d1bd5a36ebdcbea657f50dc37c7be266dd4907c79493719", + "edition": "public" + }, + { + "id": 1129, + "name": "OpenIMStringEventHandler", + "declaration": "export type OpenIMStringEventHandler = (payload : string) => void", + "signatureHash": "f870d165332d98817acaf3826aa69daa29be5e76ed8132be05d3b0e82415d025", + "edition": "public" + }, + { + "id": 1130, + "name": "OpenIMBooleanEventHandler", + "declaration": "export type OpenIMBooleanEventHandler = (value : boolean) => void", + "signatureHash": "bde386d92783485892101af27eb658d4dfe0565890c6b393cfedc1630d39fd5d", + "edition": "public" + }, + { + "id": 1131, + "name": "OpenIMNumberEventHandler", + "declaration": "export type OpenIMNumberEventHandler = (value : number) => void", + "signatureHash": "dd13d2cbcded18d7f66aea0e333e89ddede124042da30694bb8533e0bc953546", + "edition": "public" + }, + { + "id": 1132, + "name": "OpenIMMessageEventHandler", + "declaration": "export type OpenIMMessageEventHandler = (message : OpenIMMessageItem | null) => void", + "signatureHash": "6a57ccf1b6b18662cffa213a97c1fdea1b6249db78644989ec452e0ba01e373a", + "edition": "public" + }, + { + "id": 1133, + "name": "OpenIMMessageListEventHandler", + "declaration": "export type OpenIMMessageListEventHandler = (result : OpenIMMessageListResult | null) => void", + "signatureHash": "fe41c43860b84789f428bd4a1ba99199c5850a30abd6b7b89a444afa012fc767", + "edition": "public" + }, + { + "id": 1134, + "name": "OpenIMMessageRevokedEventHandler", + "declaration": "export type OpenIMMessageRevokedEventHandler = (revoked : OpenIMMessageRevokedItem | null) => void", + "signatureHash": "2569484c6de8cdf2c32329350b81cdcc1050230ff0b48a3e7aea69cf7e6b3b3d", + "edition": "public" + }, + { + "id": 1135, + "name": "OpenIMMessageReceiptListEventHandler", + "declaration": "export type OpenIMMessageReceiptListEventHandler = (result : OpenIMMessageReceiptListResult | null) => void", + "signatureHash": "021e91ed7fbfb6226d659c74ce08659fdedf58a296b5fd8a708098ce9fe60ab7", + "edition": "public" + }, + { + "id": 1136, + "name": "OpenIMConversationListEventHandler", + "declaration": "export type OpenIMConversationListEventHandler = (result : OpenIMConversationListResult | null) => void", + "signatureHash": "06af96d04d931226f9808baffcffc9679bad648db4ac5254ff6ce05d42a64d0b", + "edition": "public" + }, + { + "id": 1137, + "name": "OpenIMConversationInputStatusEventHandler", + "declaration": "export type OpenIMConversationInputStatusEventHandler = (status : OpenIMConversationInputStatusItem | null) => void", + "signatureHash": "d33d1d4895c125fb7ced51a93a681b60f52c405199fe50373e16737482c14c92", + "edition": "public" + }, + { + "id": 1138, + "name": "OpenIMFriendEventHandler", + "declaration": "export type OpenIMFriendEventHandler = (friend : OpenIMFriendUserItem | null) => void", + "signatureHash": "f94fc891670192afe3bdbd22b9a35266c85ac508e9b6695195c23d1e1dfc8f8e", + "edition": "public" + }, + { + "id": 1139, + "name": "OpenIMBlackUserEventHandler", + "declaration": "export type OpenIMBlackUserEventHandler = (blackUser : OpenIMBlackUserItem | null) => void", + "signatureHash": "3da436e1e4fe4d66bca36c0d5cd74bc5be027ff0c2630664ece23fd49cc49b78", + "edition": "public" + }, + { + "id": 1140, + "name": "OpenIMFriendApplicationEventHandler", + "declaration": "export type OpenIMFriendApplicationEventHandler = (application : OpenIMFriendApplicationItem | null) => void", + "signatureHash": "a3331b84bb3414e118e078803c649bcbc67123196c61f4522a25eaa1ff549e79", + "edition": "public" + }, + { + "id": 1141, + "name": "OpenIMGroupEventHandler", + "declaration": "export type OpenIMGroupEventHandler = (group : OpenIMGroupItem | null) => void", + "signatureHash": "2f15d91f365de9c2096aeca7fbb2d848a3da7b36e04c1c5db38ca195221ff19e", + "edition": "public" + }, + { + "id": 1142, + "name": "OpenIMGroupMemberEventHandler", + "declaration": "export type OpenIMGroupMemberEventHandler = (member : OpenIMGroupMemberItem | null) => void", + "signatureHash": "bf674055e818325bfad60d00bccaea2f0ab63b3558e2312b9e0999999fccc37e", + "edition": "public" + }, + { + "id": 1143, + "name": "OpenIMGroupApplicationEventHandler", + "declaration": "export type OpenIMGroupApplicationEventHandler = (application : OpenIMGroupApplicationItem | null) => void", + "signatureHash": "cffa01101c8a9cd200aceacebac33a3985a021311fc4e297efac3da72f860b5c", + "edition": "public" + }, + { + "id": 1144, + "name": "OpenIMUserEventHandler", + "declaration": "export type OpenIMUserEventHandler = (user : OpenIMUserInfo | null) => void", + "signatureHash": "03b54da5270343a77c0158aca0878863e8580123aba43025ebefe0919e256acd", + "edition": "public" + }, + { + "id": 1145, + "name": "OpenIMUserStatusListEventHandler", + "declaration": "export type OpenIMUserStatusListEventHandler = (result : OpenIMUserStatusListResult | null) => void", + "signatureHash": "9d03e4deb5e807363258985e22ce51ac80155cf77ec851d42130a5c15ab40cd3", + "edition": "public" + }, + { + "id": 1146, + "name": "OpenIMSendMessageProgressEventHandler", + "declaration": "export type OpenIMSendMessageProgressEventHandler = (progress : OpenIMSendMessageProgressEvent | null) => void", + "signatureHash": "a33288bae0f33d2a59f709d74b1c919fe08f29b04b639eff6955b288abf07ee8", + "edition": "public" + }, + { + "id": 1147, + "name": "OpenIMUploadFileProgressEventHandler", + "declaration": "export type OpenIMUploadFileProgressEventHandler = (progress : OpenIMUploadFileProgressEvent | null) => void", + "signatureHash": "f435a7ed1f7694850009e934dd7e58af3dcdc021ff4ff7472151d33edb2928b0", + "edition": "public" + }, + { + "id": 1148, + "name": "OpenIMUploadLogsProgressEventHandler", + "declaration": "export type OpenIMUploadLogsProgressEventHandler = (progress : OpenIMUploadLogsProgressEvent | null) => void", + "signatureHash": "c6ffa8ec174b16230e476be4539e7b5b5b7d4a2957ceaa728504b6ddc9a2b620", + "edition": "public" + }, + { + "id": 1149, + "name": "OpenIMSDKEventSubscription", + "declaration": "export type OpenIMSDKEventSubscription = {\n id : string\n eventName : OpenIMSDKEventName\n}", + "signatureHash": "6c3ec62c48e51e10ba3c0f565a2697bf12946f86874562ce3eca9db5c1709d75", + "edition": "public" + }, + { + "id": 1150, + "name": "OpenIMSDKEventHandlerSubscription", + "declaration": "export type OpenIMSDKEventHandlerSubscription = {\n id : string\n eventName : OpenIMSDKEventName\n handler : OpenIMSDKRawEventHandler\n}", + "signatureHash": "a00d5d5c3a68f2a2465ef91915d955638b45d8e188bd0dd0547c46184585d9e4", + "edition": "public" + }, + { + "id": 1151, + "name": "OffSDKEventName", + "declaration": "export type OffSDKEventName = (eventName : OpenIMSDKEventName) => void", + "signatureHash": "fb35d17cda3711451ae48dae991b8ef8784fc797459b00534d80385c0cdc27f5", + "edition": "public" + }, + { + "id": 1152, + "name": "InitSDK", + "declaration": "export type InitSDK = (config : OpenIMInitConfig, operationID ?: string | null) => Promise", + "signatureHash": "5c201130e8065147e6561c859af8e574b8b4aa1fb0db512c9c48a9023073f2ea", + "edition": "public" + }, + { + "id": 1153, + "name": "Login", + "declaration": "export type Login = (userID : string, token : string, operationID ?: string | null) => Promise", + "signatureHash": "890d88bc5fac876fe0a79c991da57a1aa88a659f1170fdd4e251e3f04f69d366", + "edition": "public" + }, + { + "id": 1154, + "name": "Logout", + "declaration": "export type Logout = (operationID ?: string | null) => Promise", + "signatureHash": "1145164a27244218680bcc5ee0dd30bb664716d4aa49bb124a4af0396e27d999", + "edition": "public" + }, + { + "id": 1155, + "name": "GetLoginStatus", + "declaration": "export type GetLoginStatus = (operationID ?: string | null) => Promise", + "signatureHash": "1ef052c6a4844d72f5abd8096bbe2d00f2ef867da168dd048deb204a0ce158c8", + "edition": "public" + }, + { + "id": 1156, + "name": "GetLoginUserID", + "declaration": "export type GetLoginUserID = (operationID ?: string | null) => Promise", + "signatureHash": "af7623df1b8b1fd4a0ad5511cf56fc55685460be85d4fe26b8ff7c7b4c54ee5a", + "edition": "public" + }, + { + "id": 1157, + "name": "CreateTextMessage", + "declaration": "export type CreateTextMessage = (text : string, operationID ?: string | null) => Promise", + "signatureHash": "a636155e9a0ee2ed4f324589d97b4941c34558ea5ea78253ad17e2848d88abad", + "edition": "public" + }, + { + "id": 1158, + "name": "SendMessage", + "declaration": "export type SendMessage = (options : OpenIMSendMessageOptions) => Promise", + "signatureHash": "928a3238e64fa3d366e8129103d928731214e2e66761a9d36ec946a7a81d5cc6", + "edition": "public" + }, + { + "id": 1159, + "name": "UploadFile", + "declaration": "export type UploadFile = (params : OpenIMUploadFileParams, operationID ?: string | null) => Promise", + "signatureHash": "3e615d261070c7689fe37123ee7e538315e63683cc75ab72c35cc2d3ca16c7c5", + "edition": "public" + }, + { + "id": 1160, + "name": "OpenIMSDKInstance", + "declaration": "export type OpenIMSDKInstance = {\n initSDK : InitSDK\n login : Login\n logout : Logout\n getLoginStatus : GetLoginStatus\n getLoginUserID : GetLoginUserID\n createTextMessage : CreateTextMessage\n sendMessage : SendMessage\n uploadFile : UploadFile\n}", + "signatureHash": "b825f5e5894ba29931c5c212158214ef7b50058e72e52e08e9d3a35204d53118", + "edition": "public" + }, + { + "id": 100001, + "name": "OpenIMCreateImageMessageParams", + "declaration": "export type OpenIMCreateImageMessageParams = {\n sourcePath : string\n}", + "signatureHash": "63591b00e304445a755734bd946e0db5dca2ff03592a156d1c815ff4dc2d593d", + "edition": "commercial" + }, + { + "id": 100002, + "name": "OpenIMCancelUploadParams", + "declaration": "export type OpenIMCancelUploadParams = {\n cancelID : string\n}", + "signatureHash": "edb2d48782c3529b897ecd34bcdd745d9a3ad2db998afb4b31e1803abdf67fb2", + "edition": "commercial" + }, + { + "id": 100003, + "name": "OpenIMSpeechToTextParams", + "declaration": "export type OpenIMSpeechToTextParams = {\n filename : string\n data : string\n}", + "signatureHash": "ddad1ba22e3e3f22f4b83521cab68190f249180cfc930067c994c9d54b64cf46", + "edition": "commercial" + }, + { + "id": 100070, + "name": "OpenIMUpdateTokenParams", + "declaration": "export type OpenIMUpdateTokenParams = {\n token : string\n}", + "signatureHash": "f1d8cf40463868f7dc57bbd8b0368df5f4677b954d9f4b8f9098ae55d0c40d74", + "edition": "commercial" + }, + { + "id": 100071, + "name": "OpenIMTranslateTextParams", + "declaration": "export type OpenIMTranslateTextParams = {\n content : string\n sourceLanguageCode : string\n targetLanguageCode : string\n}", + "signatureHash": "562ffc5ee913bce8dd933315f711ff964ff37aa9b3a53122f4e0765eecd7ab35", + "edition": "commercial" + }, + { + "id": 100072, + "name": "OpenIMTranslateTextResult", + "declaration": "export type OpenIMTranslateTextResult = {\n translatedText : string\n detectedLanguageCode : string\n}", + "signatureHash": "885eeaeef115e2a8ea77d8d2253e1fb7a3537db1794b87aeacc18c6cec68886f", + "edition": "commercial" + }, + { + "id": 100073, + "name": "OpenIMTranslateMessageParams", + "declaration": "export type OpenIMTranslateMessageParams = {\n conversationID : string\n clientMsgID : string\n sourceLanguageCode : string\n targetLanguageCode : string\n}", + "signatureHash": "e3d7e28002e0eaa18d02e5389a3b89d335352690427a81fcd3c6e5c417d3c413", + "edition": "commercial" + }, + { + "id": 100004, + "name": "OpenIMSpeechToTextResult", + "declaration": "export type OpenIMSpeechToTextResult = {\n text ?: string | null\n}", + "signatureHash": "c2c9c93d1cd1d45ca6fcd54c4d5128c56cfc15c3a9acb8352cd4fdcea48d1871", + "edition": "commercial" + }, + { + "id": 100005, + "name": "OpenIMSpeechToTextCapabilitiesResult", + "declaration": "export type OpenIMSpeechToTextCapabilitiesResult = {\n format ?: Array | null\n sampleRateHz ?: Array | null\n maxRecordTimeMs ?: number | null\n maxFileSize ?: number | null\n provider ?: string | null\n requestType ?: string | null\n crossDomain ?: boolean | null\n}", + "signatureHash": "9885a13d601386732149adec92424e1533bb74f8c99e88b42109223eeb852814", + "edition": "commercial" + }, + { + "id": 100006, + "name": "OpenIMUpdateFriendParams", + "declaration": "export type OpenIMUpdateFriendParams = {\n userID : string\n pinned ?: OpenIMUpdateFriendBoolean | null\n remark ?: string | null\n ex ?: string | null\n}", + "signatureHash": "d33d8f9c2e00af5c5c70904676aed7729a71f3e5517ed89b2cdd811a89cff093", + "edition": "commercial" + }, + { + "id": 100007, + "name": "OpenIMGetInputStatesParams", + "declaration": "export type OpenIMGetInputStatesParams = {\n conversationID : string\n userID : string\n}", + "signatureHash": "018ab95e297711761162104984aea0d36acb67389a365ee9f31ef233956d7ee3", + "edition": "commercial" + }, + { + "id": 100008, + "name": "OpenIMGetInputStatesResult", + "declaration": "export type OpenIMGetInputStatesResult = {\n platforms : Array\n}", + "signatureHash": "b294f43a1c470d990cb29877da3503333c70525acccc8126f02ca313f85f5237", + "edition": "commercial" + }, + { + "id": 100009, + "name": "OpenIMSimpleGroupRequest", + "declaration": "export type OpenIMSimpleGroupRequest = {\n groupID : string\n fromUserID : string\n}", + "signatureHash": "7304ede14c1a9cd087445cdfd8da26024d4c225cc6bc7325a3adc03700103047", + "edition": "commercial" + }, + { + "id": 100010, + "name": "OpenIMDeleteGroupRequestsParams", + "declaration": "export type OpenIMDeleteGroupRequestsParams = {\n groupRequests : Array\n}", + "signatureHash": "3390b10cdde1fa0721ba81f478c9264c4c02d62c9efd83416ad2b59647cd44b2", + "edition": "commercial" + }, + { + "id": 100011, + "name": "OpenIMSimpleFriendRequest", + "declaration": "export type OpenIMSimpleFriendRequest = {\n fromUserID : string\n toUserID : string\n}", + "signatureHash": "89da513c6d43feb27b3bcf104ede83ec0ba7e2efe31139a9bc4389dcb12805d0", + "edition": "commercial" + }, + { + "id": 100012, + "name": "OpenIMDeleteFriendRequestsParams", + "declaration": "export type OpenIMDeleteFriendRequestsParams = {\n friendRequests : Array\n}", + "signatureHash": "1574aaedf6eae57f4396d339a7e109b0b99d02fca37e7966ae805cf45579a1c6", + "edition": "commercial" + }, + { + "id": 100013, + "name": "OpenIMFullSyncResult", + "declaration": "export type OpenIMFullSyncResult = {\n IsFullSync ?: boolean | null\n}", + "signatureHash": "01f85c39ce5f7edcb0b09d7ccf79314248a7ad52e499bf7fc0d6c611bcda48a1", + "edition": "commercial" + }, + { + "id": 100014, + "name": "OpenIMCheckGroupMemberFullSyncParams", + "declaration": "export type OpenIMCheckGroupMemberFullSyncParams = {\n groupID : string\n}", + "signatureHash": "f96346420760ef5d344ccc226bde651b8c78f69b4d883b8a05ff93db6ac6740b", + "edition": "commercial" + }, + { + "id": 100015, + "name": "OpenIMGetBlacksResult", + "declaration": "export type OpenIMGetBlacksResult = {\n blacks : Array\n}", + "signatureHash": "f92620eeffc54dcf29b32f1b3dd22db61645644716a730f100f4c7bf70c8180b", + "edition": "commercial" + }, + { + "id": 100016, + "name": "OpenIMAtAllTagResult", + "declaration": "export type OpenIMAtAllTagResult = {\n tag : string\n}", + "signatureHash": "759ab39e0c8b40e9980c0fd091a31c6be2ed6fbfe304cebc443e59276e1a8299", + "edition": "commercial" + }, + { + "id": 100017, + "name": "OpenIMSendGroupMessageReadReceiptParams", + "declaration": "export type OpenIMSendGroupMessageReadReceiptParams = {\n conversationID : string\n clientMsgIDs : Array\n}", + "signatureHash": "427b2c340ffb1d9442970ca538cdd9b92554885b75e75bb29d194b175a9faf72", + "edition": "commercial" + }, + { + "id": 100018, + "name": "OpenIMGetGroupMessageReaderListParams", + "declaration": "export type OpenIMGetGroupMessageReaderListParams = {\n conversationID : string\n clientMsgID : string\n filter : number\n offset : number\n count : number\n}", + "signatureHash": "2115a19b5d41a288e1db21265d1051fa4eca851d555b93ffd5f208d23a3d81a1", + "edition": "commercial" + }, + { + "id": 100019, + "name": "OpenIMGetGroupMessageReaderListResult", + "declaration": "export type OpenIMGetGroupMessageReaderListResult = {\n readers : Array\n}", + "signatureHash": "7b41515c8c8de636a7b5add1de5988bc446e61fd103bd72b4a3bea0ceac3ceb4", + "edition": "commercial" + }, + { + "id": 100020, + "name": "OpenIMFetchSurroundingMessagesParams", + "declaration": "export type OpenIMFetchSurroundingMessagesParams = {\n startMessage : OpenIMMessageItem\n viewType : number\n before : number\n after : number\n}", + "signatureHash": "deca37cb445184c555abee481d150aee1a075b11e36d43df3dc8333f64da6262", + "edition": "commercial" + }, + { + "id": 100021, + "name": "OpenIMFetchSurroundingMessagesResult", + "declaration": "export type OpenIMFetchSurroundingMessagesResult = {\n messages : Array\n}", + "signatureHash": "df616258153af8c79886749c8dc594e291923d53681649e73dc5c8f6b70ef923", + "edition": "commercial" + }, + { + "id": 100022, + "name": "OpenIMModifyMessageParams", + "declaration": "export type OpenIMModifyMessageParams = {\n conversationID : string\n message : OpenIMMessageItem\n}", + "signatureHash": "92d82c5b20194b3eabc2ee24287e85a87de64b1d86874d9ef1b95a3b1796da6e", + "edition": "commercial" + }, + { + "id": 100023, + "name": "OpenIMModifyMessageResult", + "declaration": "export type OpenIMModifyMessageResult = {\n message : OpenIMMessageItem | null\n}", + "signatureHash": "706f79239f3d1626c912a2ce06caaa28e45786127f2355770fe03ac3b9f2c1b3", + "edition": "commercial" + }, + { + "id": 100024, + "name": "OpenIMSetConversationPinnedMsgParams", + "declaration": "export type OpenIMSetConversationPinnedMsgParams = {\n conversationID : string\n clientMsgID : string\n pinned : boolean\n}", + "signatureHash": "0a94f2dac27a3fc41ae63b5f8ccad2d4265153c8318ea31eab0d6dbb71d88ab3", + "edition": "commercial" + }, + { + "id": 100025, + "name": "OpenIMGetConversationPinnedMsgParams", + "declaration": "export type OpenIMGetConversationPinnedMsgParams = {\n conversationID : string\n}", + "signatureHash": "8d01f6a49f7b47f38f69358fb70efd09340316ee67da22ab46c16208f1177b4b", + "edition": "commercial" + }, + { + "id": 100026, + "name": "OpenIMGetConversationPinnedMsgResult", + "declaration": "export type OpenIMGetConversationPinnedMsgResult = {\n message : Array\n}", + "signatureHash": "f0f68ea537aef27605b758ca2502425ff8e09d5e03ca2bb165eae583f975419f", + "edition": "commercial" + }, + { + "id": 100027, + "name": "OpenIMSetMessageLocalContentParams", + "declaration": "export type OpenIMSetMessageLocalContentParams = {\n conversationID : string\n message : OpenIMMessageItem\n}", + "signatureHash": "9fdc77b1e20075633b78f0d51e05caee6ef425eaa0e64f746ff28bbc038c185d", + "edition": "commercial" + }, + { + "id": 100028, + "name": "OpenIMResetConversationUnreadParams", + "declaration": "export type OpenIMResetConversationUnreadParams = {\n conversationIDs : Array\n num : number\n}", + "signatureHash": "4cc3b79b541f3d842966c649651b11a7c80fd3b92b82d25bfa177443caee9408", + "edition": "commercial" + }, + { + "id": 100029, + "name": "OpenIMGetHistoryMessageListParams", + "declaration": "export type OpenIMGetHistoryMessageListParams = {\n conversationID : string\n startClientMsgID : string\n count : number\n isReverse : boolean\n viewType ?: number | null\n lastMinSeq ?: number | null\n}", + "signatureHash": "0129e8c345d74fd4c8803ac1d06699a30668f1d90c3fedceedb1df2dc81cb916", + "edition": "commercial" + }, + { + "id": 100030, + "name": "OpenIMDeleteMessagesParams", + "declaration": "export type OpenIMDeleteMessagesParams = {\n conversationID : string\n clientMsgIDs : Array\n IsSync : boolean\n}", + "signatureHash": "5ce5352a69f77e5fb8361a1bf7cc25bf90cbc20441cd9571b08abd3073ca6fde", + "edition": "commercial" + }, + { + "id": 100031, + "name": "OpenIMDeleteUserAllMessagesInConvParams", + "declaration": "export type OpenIMDeleteUserAllMessagesInConvParams = {\n conversationID : string\n userID : string\n}", + "signatureHash": "196e3d0eca32ec4c2e548191970769899c0723d4bd4bbfb6b5d396186631b7ab", + "edition": "commercial" + }, + { + "id": 100032, + "name": "OpenIMCreateMarkdownMessageParams", + "declaration": "export type OpenIMCreateMarkdownMessageParams = {\n content : string\n}", + "signatureHash": "6e235d0354f5ae44ea1a3ef9912c3f7ad46c5fb6278dc8f3966da43794e1e626", + "edition": "commercial" + }, + { + "id": 100033, + "name": "OpenIMTypingStatusUpdateParams", + "declaration": "export type OpenIMTypingStatusUpdateParams = {\n recvID : string\n msgTip : string\n}", + "signatureHash": "8ba111614ef5e8bb1fff8ab520959e326219907c111d00cba16a296a67706596", + "edition": "commercial" + }, + { + "id": 100034, + "name": "OpenIMConversationGroupType", + "declaration": "export type OpenIMConversationGroupType = 0 | 1", + "signatureHash": "12ff863bed0a626814dc612a70ae9c3b7fb8dcc5857b69aa734a8bb7bd57fc5b", + "edition": "commercial" + }, + { + "id": 100035, + "name": "OpenIMConversationGroupQueryType", + "declaration": "export type OpenIMConversationGroupQueryType = 0 | 1 | 2", + "signatureHash": "1eb99a36a3bdf8886ed101ea2b298b489091ebe2151d6e55332b9a24a966d1bf", + "edition": "commercial" + }, + { + "id": 100036, + "name": "OpenIMConversationGroupItem", + "declaration": "export type OpenIMConversationGroupItem = {\n conversationGroupID ?: string | null\n name ?: string | null\n order ?: number | null\n ex ?: string | null\n conversationGroupType ?: number | null\n hidden ?: boolean | null\n unreadCount ?: number | null\n conversationIDs ?: Array | null\n}", + "signatureHash": "fa966f5caca554653e5f05e0eb6c00b66ec3910d44372060573b6026a0bea8f5", + "edition": "commercial" + }, + { + "id": 100037, + "name": "OpenIMCreateConversationGroupParams", + "declaration": "export type OpenIMCreateConversationGroupParams = {\n name : string\n order : number\n conversationGroupType : OpenIMConversationGroupType\n conversationID ?: string | null\n ex ?: string | null\n}", + "signatureHash": "9c7249bfe72e4ce1d737b2a87f3d264fc40a9be141761726206d613bf037fcbe", + "edition": "commercial" + }, + { + "id": 100038, + "name": "OpenIMCreateConversationGroupResult", + "declaration": "export type OpenIMCreateConversationGroupResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n}", + "signatureHash": "e51364d58215c21d42a58e6ca65c9a4406e8f6173a5d1724bb7572966187fd80", + "edition": "commercial" + }, + { + "id": 100039, + "name": "OpenIMUpdateConversationGroupParams", + "declaration": "export type OpenIMUpdateConversationGroupParams = {\n conversationGroupID : string\n name ?: string | null\n ex ?: string | null\n hidden ?: boolean | null\n}", + "signatureHash": "325d63d9e731c8138dd71b4d838299d6bde8ac72709764affad8c7e7b7b2ac5f", + "edition": "commercial" + }, + { + "id": 100040, + "name": "OpenIMUpdateConversationGroupResult", + "declaration": "export type OpenIMUpdateConversationGroupResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n}", + "signatureHash": "4132132dbf4fb0803b0d019c408f232d2b51c36096ee08dc2f1ddab40ce3f0f9", + "edition": "commercial" + }, + { + "id": 100041, + "name": "OpenIMDeleteConversationGroupParams", + "declaration": "export type OpenIMDeleteConversationGroupParams = {\n conversationGroupID : string\n}", + "signatureHash": "ba0141d23b7f355c850b555869ceee41af309046e6eba132b4b0ad6ef4da550a", + "edition": "commercial" + }, + { + "id": 100042, + "name": "OpenIMGetConversationGroupsParams", + "declaration": "export type OpenIMGetConversationGroupsParams = {\n conversationGroupType : OpenIMConversationGroupQueryType\n}", + "signatureHash": "9247600af4524460c750120143a67502be490b8f73cea0559a0dbf88c10b18b8", + "edition": "commercial" + }, + { + "id": 100043, + "name": "OpenIMGetConversationGroupsResult", + "declaration": "export type OpenIMGetConversationGroupsResult = {\n conversationGroups : Array\n}", + "signatureHash": "a209d93276d37a81656da3a08f242d54f8595264995476ad0cd48e145833a35f", + "edition": "commercial" + }, + { + "id": 100044, + "name": "OpenIMConversationGroupOrder", + "declaration": "export type OpenIMConversationGroupOrder = {\n conversationGroupID : string\n order : number\n}", + "signatureHash": "dd5be62c5c64eb525b58e9c2b67797995872dec10282478b69d439b94ad35dea", + "edition": "commercial" + }, + { + "id": 100045, + "name": "OpenIMSetConversationGroupOrderParams", + "declaration": "export type OpenIMSetConversationGroupOrderParams = {\n conversationGroupOrders : Array\n}", + "signatureHash": "eb1927feb3f1f9d8d1a1cae677a9ac2c3fa6dd7ee2d0b0b6677cc50c32d0ae68", + "edition": "commercial" + }, + { + "id": 100046, + "name": "OpenIMConversationGroupMembershipParams", + "declaration": "export type OpenIMConversationGroupMembershipParams = {\n conversationIDs : Array\n conversationGroupIDs : Array\n}", + "signatureHash": "464a1b078d7ae4b07fc1fbc97ca27964b8c862ab3e1a2bdb2bcfe6a0045813b4", + "edition": "commercial" + }, + { + "id": 100047, + "name": "OpenIMGetConversationGroupByConversationIDParams", + "declaration": "export type OpenIMGetConversationGroupByConversationIDParams = {\n conversationID : string\n}", + "signatureHash": "c7f0df27931b915b979cea557b67afbc2a11cd586b031aabfca472f0a36b475d", + "edition": "commercial" + }, + { + "id": 100048, + "name": "OpenIMGetConversationGroupByConversationIDResult", + "declaration": "export type OpenIMGetConversationGroupByConversationIDResult = {\n conversationGroups : Array\n}", + "signatureHash": "de14da9c0a7f5cd8e3ff732df453f2b77632ff1e8bac003fc822cb65b24b3399", + "edition": "commercial" + }, + { + "id": 100049, + "name": "OpenIMRequestPagination", + "declaration": "export type OpenIMRequestPagination = {\n pageNumber : number\n showNumber : number\n}", + "signatureHash": "4752afcfa9749a4b1e879b1a95634fce9282d4a5b4d64c72f29d88aab4a2a663", + "edition": "commercial" + }, + { + "id": 100050, + "name": "OpenIMGetConversationGroupInfoWithConversationsParams", + "declaration": "export type OpenIMGetConversationGroupInfoWithConversationsParams = {\n conversationGroupID : string\n pagination : OpenIMRequestPagination\n}", + "signatureHash": "ae351f2340003c46e00e18d038e22465ed7170bb08fc40dd6d737d951e917fc0", + "edition": "commercial" + }, + { + "id": 100051, + "name": "OpenIMGetConversationGroupInfoWithConversationsResult", + "declaration": "export type OpenIMGetConversationGroupInfoWithConversationsResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n ConversationTotal ?: number | null\n conversations : Array\n}", + "signatureHash": "88a475af41b7c6fb5fcda42f1471fea22a89ef22bfa1f0adb0254608fd03b420", + "edition": "commercial" + }, + { + "id": 100052, + "name": "OpenIMSignalingParticipantMetaData", + "declaration": "export type OpenIMSignalingParticipantMetaData = {\n user : OpenIMUserInfo\n}", + "signatureHash": "7f82cc06c4b94db3723b6a15374eeea5c0e264d01dcda6c1029e9e182f4cec8f", + "edition": "commercial" + }, + { + "id": 100053, + "name": "OpenIMSignalingOfflinePushInfo", + "declaration": "export type OpenIMSignalingOfflinePushInfo = {\n title ?: string | null\n desc ?: string | null\n ex ?: string | null\n iOSPushSound ?: string | null\n iOSBadgeCount ?: boolean | null\n SignalingInfo ?: string | null\n}", + "signatureHash": "227d07d1ca8ed4e516aa77e803d50cfc95d7b838b38fed5538f346d871191479", + "edition": "commercial" + }, + { + "id": 100054, + "name": "OpenIMSignalingInvitationInfo", + "declaration": "export type OpenIMSignalingInvitationInfo = {\n inviterUserID ?: string | null\n inviteeUserIDList ?: Array | null\n customData ?: string | null\n groupID ?: string | null\n roomID ?: string | null\n timeout ?: number | null\n mediaType ?: string | null\n platformID ?: number | null\n sessionType ?: number | null\n initiateTime ?: number | null\n busyLineUserIDList ?: Array | null\n}", + "signatureHash": "2a2cd6bbfece9f0d52a1fac33f543ffa6377ca79d719ffbd9c442ef536035016", + "edition": "commercial" + }, + { + "id": 100055, + "name": "OpenIMSignalingInviteParams", + "declaration": "export type OpenIMSignalingInviteParams = {\n invitation : OpenIMSignalingInvitationInfo\n offlinePushInfo ?: OpenIMSignalingOfflinePushInfo | null\n}", + "signatureHash": "a7ca4012035864408140448756d5afab592dd38efa28f065152c23abfc9b67a2", + "edition": "commercial" + }, + { + "id": 100056, + "name": "OpenIMSignalingInviteInGroupParams", + "declaration": "export type OpenIMSignalingInviteInGroupParams = OpenIMSignalingInviteParams", + "signatureHash": "8216c8af986c5a8d44d08506247f64ff7563580e0155b65c48fc8e5d91d3ccba", + "edition": "commercial" + }, + { + "id": 100057, + "name": "OpenIMSignalingInviteResult", + "declaration": "export type OpenIMSignalingInviteResult = {\n invitation ?: OpenIMSignalingInvitationInfo | null\n token ?: string | null\n roomID ?: string | null\n liveURL ?: string | null\n busyLineUserIDList ?: Array | null\n}", + "signatureHash": "bd9991f759d344632974696dea5ea6d78cabda4d603333037512c261981ca413", + "edition": "commercial" + }, + { + "id": 100058, + "name": "OpenIMSignalingAcceptParams", + "declaration": "export type OpenIMSignalingAcceptParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "b1144308a0c5854bc5d5b4c2e61a1453775ae6d0b12752eccb6f21c41f999b6c", + "edition": "commercial" + }, + { + "id": 100059, + "name": "OpenIMSignalingAcceptResult", + "declaration": "export type OpenIMSignalingAcceptResult = {\n invitation ?: OpenIMSignalingInvitationInfo | null\n token ?: string | null\n roomID ?: string | null\n liveURL ?: string | null\n}", + "signatureHash": "f4e18ac1e9e1b2a67a034c8297af24dd8d768ec6ba9440a1c04f0fcb412449ce", + "edition": "commercial" + }, + { + "id": 100060, + "name": "OpenIMSignalingRejectParams", + "declaration": "export type OpenIMSignalingRejectParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "9bd2bbd4f7b2cbb560507cb697990ee68b048b11678c48582f7d5c84790acfb5", + "edition": "commercial" + }, + { + "id": 100061, + "name": "OpenIMSignalingCancelParams", + "declaration": "export type OpenIMSignalingCancelParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "e9cbc97764d15bba061d8f48f586b31aeaa26a1345b510273054d0c3c5ac8624", + "edition": "commercial" + }, + { + "id": 100062, + "name": "OpenIMSignalingHungUpParams", + "declaration": "export type OpenIMSignalingHungUpParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "604f16df72d44957462b43eae073959e41801c92e933051494d6d1c58c24047c", + "edition": "commercial" + }, + { + "id": 100063, + "name": "OpenIMSignalingGetTokenByRoomIDParams", + "declaration": "export type OpenIMSignalingGetTokenByRoomIDParams = {\n roomID : string\n}", + "signatureHash": "8e9b8308c24ba9d534d2dedeb85aad6158a5ad8325e6410d82c7da1ff7be102e", + "edition": "commercial" + }, + { + "id": 100064, + "name": "OpenIMSignalingGetTokenByRoomIDResult", + "declaration": "export type OpenIMSignalingGetTokenByRoomIDResult = {\n token ?: string | null\n liveURL ?: string | null\n}", + "signatureHash": "5cbe0aa3024b8871e95d623851a8b9fa7b0a26c1e9528b9f93862f3eb4278dc4", + "edition": "commercial" + }, + { + "id": 100065, + "name": "OpenIMSignalingGetRoomByGroupIDParams", + "declaration": "export type OpenIMSignalingGetRoomByGroupIDParams = {\n groupID : string\n}", + "signatureHash": "2ece2d21c944c9d8cff02201512002ddc58d4998342dca589c19dc94c51a5d5c", + "edition": "commercial" + }, + { + "id": 100066, + "name": "OpenIMSignalingGetRoomByGroupIDResult", + "declaration": "export type OpenIMSignalingGetRoomByGroupIDResult = {\n roomID ?: string | null\n invitation ?: OpenIMSignalingInvitationInfo | null\n}", + "signatureHash": "f855fc74145371b26b56054ec77e242c74a9351d28dede9ab433615f99afdffb", + "edition": "commercial" + }, + { + "id": 100067, + "name": "OpenIMSignalingGetInvitationInfoStartAppParams", + "declaration": "export type OpenIMSignalingGetInvitationInfoStartAppParams = {\n userID ?: string | null\n}", + "signatureHash": "1729a31b4c181aee1c21c4a9c5030a75bc4b9256095352ba4f23b07b2675ae10", + "edition": "commercial" + }, + { + "id": 100068, + "name": "OpenIMSignalingGetInvitationInfoStartAppResult", + "declaration": "export type OpenIMSignalingGetInvitationInfoStartAppResult = {\n invitation : OpenIMSignalingInvitationInfo | null\n}", + "signatureHash": "214cf70f06f12517fb27b8d940bd1677c83e3c3402c5719ec2b91706023039e1", + "edition": "commercial" + }, + { + "id": 100069, + "name": "OpenIMSignalingSendCustomSignalingParams", + "declaration": "export type OpenIMSignalingSendCustomSignalingParams = {\n roomID : string\n customInfo : string\n}", + "signatureHash": "f06a8670dabc25fdb5490dd12d84d2bbc063611bf51f760ad14a972881872637", + "edition": "commercial" + }, + { + "id": 100074, + "name": "OpenIMSDKSessionSnapshot", + "declaration": "export type OpenIMSDKSessionSnapshot = {\n loginStatus : OpenIMLoginStatus\n userID : string | null\n sdkSessionEpoch : number\n sdkVersion : string\n}", + "signatureHash": "715fc3449def9ad437e4538a725cd49bd7e2a35d6931b7950e1271b8cba2027b", + "edition": "commercial" + }, + { + "id": 100075, + "name": "SDKSessionChangedHandler", + "declaration": "export type SDKSessionChangedHandler = (snapshot : OpenIMSDKSessionSnapshot) => void", + "signatureHash": "93c38c8d519816c3d517f1fb867e6003e256cec1cb46efdc664db3de998b8c9b", + "edition": "commercial" + }, + { + "id": 100076, + "name": "GetSDKSessionSnapshot", + "declaration": "export type GetSDKSessionSnapshot = () => Promise", + "signatureHash": "11589bab4789e101cca7343b7a95e06ed664ac057c64aaac64e2071796191d0e", + "edition": "commercial" + }, + { + "id": 100077, + "name": "OnSDKSessionChanged", + "declaration": "export type OnSDKSessionChanged = (handler : SDKSessionChangedHandler) => OpenIMSDKEventSubscription", + "signatureHash": "8f8b60d0c42a38b1d9b450613a5bbf0e54a8c28c446bab8f9cf6f4f7fb19f91d", + "edition": "commercial" + } + ], + "typeExtensions": [ + { + "id": 150001, + "target": "OpenIMCreateVideoMessageParams", + "kind": "optional-object-members", + "addedMembers": [ + "videoSourcePath ?: string | null", + "snapshotSourcePath ?: string | null" + ], + "privateSignatureHash": "10e8608ccdc7d87c9d2cda19ae6f45081d580b31d754ff5828113a7e97d67063", + "edition": "commercial" + }, + { + "id": 150002, + "target": "OpenIMCreateFileMessageParams", + "kind": "optional-object-members", + "addedMembers": [ + "fileSourcePath ?: string | null" + ], + "privateSignatureHash": "0d01041fce19a84a294000a6b29103df81bfe2c1a618e4d6cd63f8a845375bae", + "edition": "commercial" + }, + { + "id": 150003, + "target": "OpenIMSDKEventName", + "kind": "string-union-members", + "addedMembers": [ + "'onChangedPinnedMsg'", + "'onDeleteUserAllMsgsInConv'", + "'onMessageModified'", + "'onMessageEdited'", + "'onRecvGroupReadReceipt'", + "'onRecvMessageExtensionsAdded'", + "'onRecvMessageExtensionsChanged'", + "'onRecvMessageExtensionsDeleted'", + "'onConversationGroupAdded'", + "'onConversationGroupChanged'", + "'onConversationGroupDeleted'", + "'onConversationGroupMemberAdded'", + "'onConversationGroupMemberDeleted'", + "'onGroupApplicationBadgeCountChanged'", + "'onReceiveNewInvitation'", + "'onInviteeAccepted'", + "'onInviteeAcceptedByOtherDevice'", + "'onInviteeRejected'", + "'onInviteeRejectedByOtherDevice'", + "'onInvitationCancelled'", + "'onInvitationTimeout'", + "'onHangUp'", + "'onRoomParticipantConnected'", + "'onRoomParticipantDisconnected'", + "'onReceiveCustomSignaling'", + "'onReceiveCustomSignal'", + "'onStreamChange'", + "'onMessageKvInfoChanged'", + "'onMigrationStart'", + "'onMigrationProgress'", + "'onMigrationFailed'", + "'onMigrationFinished'", + "'onSDKSessionChanged'" + ], + "privateSignatureHash": "9d30981804a4737273bda82e723956eb1e47679101bea9261ba2fb9f5b4b2c87", + "edition": "commercial" + } + ], + "callables": [ + { + "id": 2001, + "name": "off", + "signature": "off(subscription:OpenIMSDKEventSubscription):void", + "role": "event-control", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2002, + "name": "offAll", + "signature": "offAll(eventName:OpenIMSDKEventName):void", + "role": "event-control", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2003, + "name": "onConnecting", + "signature": "onConnecting(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2004, + "name": "onConnectSuccess", + "signature": "onConnectSuccess(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2005, + "name": "onConnectFailed", + "signature": "onConnectFailed(handler:OpenIMErrorEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2006, + "name": "onKickedOffline", + "signature": "onKickedOffline(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2007, + "name": "onUserTokenExpired", + "signature": "onUserTokenExpired(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2008, + "name": "onUserTokenInvalid", + "signature": "onUserTokenInvalid(handler:OpenIMErrorEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2009, + "name": "onRecvNewMessage", + "signature": "onRecvNewMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2010, + "name": "onRecvOfflineNewMessage", + "signature": "onRecvOfflineNewMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2011, + "name": "onRecvOnlineOnlyMessage", + "signature": "onRecvOnlineOnlyMessage(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2012, + "name": "onMsgDeleted", + "signature": "onMsgDeleted(handler:OpenIMMessageEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2013, + "name": "onNewRecvMessageRevoked", + "signature": "onNewRecvMessageRevoked(handler:OpenIMMessageRevokedEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2014, + "name": "onRecvC2CReadReceipt", + "signature": "onRecvC2CReadReceipt(handler:OpenIMMessageReceiptListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2015, + "name": "onRecvNewMessages", + "signature": "onRecvNewMessages(handler:OpenIMMessageListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2016, + "name": "onRecvOfflineNewMessages", + "signature": "onRecvOfflineNewMessages(handler:OpenIMMessageListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2017, + "name": "onConversationChanged", + "signature": "onConversationChanged(handler:OpenIMConversationListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2018, + "name": "onConversationUserInputStatusChanged", + "signature": "onConversationUserInputStatusChanged(handler:OpenIMConversationInputStatusEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2019, + "name": "onNewConversation", + "signature": "onNewConversation(handler:OpenIMConversationListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2020, + "name": "onSyncServerFailed", + "signature": "onSyncServerFailed(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2021, + "name": "onSyncServerFinish", + "signature": "onSyncServerFinish(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2022, + "name": "onSyncServerProgress", + "signature": "onSyncServerProgress(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2023, + "name": "onSyncServerStart", + "signature": "onSyncServerStart(handler:OpenIMBooleanEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2024, + "name": "onSendMessageProgress", + "signature": "onSendMessageProgress(handler:OpenIMSendMessageProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2025, + "name": "onUploadFileProgress", + "signature": "onUploadFileProgress(handler:OpenIMUploadFileProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2026, + "name": "onUploadLogsProgress", + "signature": "onUploadLogsProgress(handler:OpenIMUploadLogsProgressEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2027, + "name": "onTotalUnreadMessageCountChanged", + "signature": "onTotalUnreadMessageCountChanged(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2028, + "name": "onRecvCustomBusinessMessage", + "signature": "onRecvCustomBusinessMessage(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2029, + "name": "onBlackAdded", + "signature": "onBlackAdded(handler:OpenIMBlackUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2030, + "name": "onBlackDeleted", + "signature": "onBlackDeleted(handler:OpenIMBlackUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2031, + "name": "onFriendAdded", + "signature": "onFriendAdded(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2032, + "name": "onFriendApplicationAccepted", + "signature": "onFriendApplicationAccepted(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2033, + "name": "onFriendApplicationAdded", + "signature": "onFriendApplicationAdded(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2034, + "name": "onFriendApplicationDeleted", + "signature": "onFriendApplicationDeleted(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2035, + "name": "onFriendApplicationRejected", + "signature": "onFriendApplicationRejected(handler:OpenIMFriendApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2036, + "name": "onFriendDeleted", + "signature": "onFriendDeleted(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2037, + "name": "onFriendInfoChanged", + "signature": "onFriendInfoChanged(handler:OpenIMFriendEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2038, + "name": "onGroupApplicationAccepted", + "signature": "onGroupApplicationAccepted(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2039, + "name": "onGroupApplicationAdded", + "signature": "onGroupApplicationAdded(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2040, + "name": "onGroupApplicationDeleted", + "signature": "onGroupApplicationDeleted(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2041, + "name": "onGroupApplicationRejected", + "signature": "onGroupApplicationRejected(handler:OpenIMGroupApplicationEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2042, + "name": "onGroupDismissed", + "signature": "onGroupDismissed(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2043, + "name": "onGroupInfoChanged", + "signature": "onGroupInfoChanged(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2044, + "name": "onGroupMemberAdded", + "signature": "onGroupMemberAdded(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2045, + "name": "onGroupMemberDeleted", + "signature": "onGroupMemberDeleted(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2046, + "name": "onGroupMemberInfoChanged", + "signature": "onGroupMemberInfoChanged(handler:OpenIMGroupMemberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2047, + "name": "onJoinedGroupAdded", + "signature": "onJoinedGroupAdded(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2048, + "name": "onJoinedGroupDeleted", + "signature": "onJoinedGroupDeleted(handler:OpenIMGroupEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2049, + "name": "onSelfInfoUpdated", + "signature": "onSelfInfoUpdated(handler:OpenIMUserEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2050, + "name": "onUserStatusChanged", + "signature": "onUserStatusChanged(handler:OpenIMUserStatusListEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2051, + "name": "initSDK", + "signature": "initSDK(config:OpenIMInitConfig,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "boolean", + "responseSchema": { + "kind": "boolean" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2052, + "name": "login", + "signature": "login(userID:string,token:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2053, + "name": "logout", + "signature": "logout(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2054, + "name": "getLoginStatus", + "signature": "getLoginStatus(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMLoginStatus", + "responseSchema": { + "kind": "reference", + "name": "OpenIMLoginStatus" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2055, + "name": "getLoginUserID", + "signature": "getLoginUserID(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2056, + "name": "getSdkVersion", + "signature": "getSdkVersion():string", + "role": "operation", + "completion": "sync", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2057, + "name": "getOpenIMDataPath", + "signature": "getOpenIMDataPath():string", + "role": "operation", + "completion": "sync", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2058, + "name": "unInitSDK", + "signature": "unInitSDK(operationID?:string|null):void", + "role": "operation", + "completion": "void", + "responseCodec": "void", + "responseSchema": { + "kind": "void" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2059, + "name": "getAllConversationList", + "signature": "getAllConversationList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2060, + "name": "getOneConversation", + "signature": "getOneConversation(params:OpenIMGetOneConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2061, + "name": "getAdvancedHistoryMessageList", + "signature": "getAdvancedHistoryMessageList(params:OpenIMGetAdvancedHistoryMessageListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAdvancedHistoryMessageListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAdvancedHistoryMessageListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2062, + "name": "getSpecifiedGroupsInfo", + "signature": "getSpecifiedGroupsInfo(params:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2063, + "name": "deleteConversationAndDeleteAllMsg", + "signature": "deleteConversationAndDeleteAllMsg(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2064, + "name": "markConversationMessageAsRead", + "signature": "markConversationMessageAsRead(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2065, + "name": "getGroupMemberList", + "signature": "getGroupMemberList(params:OpenIMGetGroupMemberListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2066, + "name": "setMessageLocalEx", + "signature": "setMessageLocalEx(params:OpenIMSetMessageLocalExParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2067, + "name": "revokeMessage", + "signature": "revokeMessage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2068, + "name": "setConversation", + "signature": "setConversation(params:OpenIMSetConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2069, + "name": "setAppBackgroundStatus", + "signature": "setAppBackgroundStatus(data:boolean,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2070, + "name": "setAppBadge", + "signature": "setAppBadge(appUnreadCount:number,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2071, + "name": "networkStatusChanged", + "signature": "networkStatusChanged(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2072, + "name": "getSelfUserInfo", + "signature": "getSelfUserInfo(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserInfo|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserInfo" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2073, + "name": "getUsersInfo", + "signature": "getUsersInfo(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2074, + "name": "setSelfInfo", + "signature": "setSelfInfo(data:OpenIMSetSelfInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2075, + "name": "deleteMessageFromLocalStorage", + "signature": "deleteMessageFromLocalStorage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2076, + "name": "deleteMessage", + "signature": "deleteMessage(params:OpenIMMessageKeyParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2077, + "name": "deleteAllMsgFromLocal", + "signature": "deleteAllMsgFromLocal(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2078, + "name": "deleteAllMsgFromLocalAndSvr", + "signature": "deleteAllMsgFromLocalAndSvr(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2079, + "name": "insertSingleMessageToLocalStorage", + "signature": "insertSingleMessageToLocalStorage(params:OpenIMInsertSingleMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2080, + "name": "insertGroupMessageToLocalStorage", + "signature": "insertGroupMessageToLocalStorage(params:OpenIMInsertGroupMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2081, + "name": "changeInputStates", + "signature": "changeInputStates(params:OpenIMInputStateParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2082, + "name": "clearConversationAndDeleteAllMsg", + "signature": "clearConversationAndDeleteAllMsg(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2083, + "name": "hideConversation", + "signature": "hideConversation(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2084, + "name": "hideAllConversations", + "signature": "hideAllConversations(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2085, + "name": "markAllConversationMessageAsRead", + "signature": "markAllConversationMessageAsRead(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2086, + "name": "searchConversation", + "signature": "searchConversation(searchParam:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2087, + "name": "getConversationListSplit", + "signature": "getConversationListSplit(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2088, + "name": "getConversationIDBySessionType", + "signature": "getConversationIDBySessionType(params:OpenIMGetOneConversationParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2089, + "name": "getMultipleConversation", + "signature": "getMultipleConversation(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMConversationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2090, + "name": "deleteConversation", + "signature": "deleteConversation(conversationID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2091, + "name": "setConversationDraft", + "signature": "setConversationDraft(params:OpenIMSetConversationDraftParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2092, + "name": "getTotalUnreadMsgCount", + "signature": "getTotalUnreadMsgCount(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2093, + "name": "searchLocalMessages", + "signature": "searchLocalMessages(params:OpenIMSearchLocalMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSearchMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSearchMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2094, + "name": "addFriend", + "signature": "addFriend(params:OpenIMAddFriendParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2095, + "name": "searchFriends", + "signature": "searchFriends(params:OpenIMSearchFriendsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2096, + "name": "getSpecifiedFriendsInfo", + "signature": "getSpecifiedFriendsInfo(params:OpenIMGetSpecifiedFriendsInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2097, + "name": "getFriendApplicationListAsRecipient", + "signature": "getFriendApplicationListAsRecipient(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2098, + "name": "getFriendApplicationListAsApplicant", + "signature": "getFriendApplicationListAsApplicant(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2099, + "name": "getFriendApplicationUnhandledCount", + "signature": "getFriendApplicationUnhandledCount(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2100, + "name": "getFriendList", + "signature": "getFriendList(filterBlack?:boolean|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2101, + "name": "getFriendListPage", + "signature": "getFriendListPage(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFriendListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2102, + "name": "updateFriends", + "signature": "updateFriends(params:OpenIMUpdateFriendsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2103, + "name": "checkFriend", + "signature": "checkFriend(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMCheckFriendResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCheckFriendResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2104, + "name": "acceptFriendApplication", + "signature": "acceptFriendApplication(params:OpenIMFriendApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2105, + "name": "refuseFriendApplication", + "signature": "refuseFriendApplication(params:OpenIMFriendApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2106, + "name": "deleteFriend", + "signature": "deleteFriend(userID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2107, + "name": "addBlack", + "signature": "addBlack(params:OpenIMAddBlackParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2108, + "name": "removeBlack", + "signature": "removeBlack(userID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2109, + "name": "getBlackList", + "signature": "getBlackList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMBlackListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMBlackListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2110, + "name": "inviteUserToGroup", + "signature": "inviteUserToGroup(params:OpenIMGroupInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2111, + "name": "kickGroupMember", + "signature": "kickGroupMember(params:OpenIMGroupInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2112, + "name": "isJoinGroup", + "signature": "isJoinGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "boolean", + "responseSchema": { + "kind": "boolean" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2113, + "name": "getSpecifiedGroupMembersInfo", + "signature": "getSpecifiedGroupMembersInfo(params:OpenIMGroupUserListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2114, + "name": "getUsersInGroup", + "signature": "getUsersInGroup(params:OpenIMGroupUserListParams,operationID?:string|null):Promise|null>", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:Array|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2115, + "name": "searchGroupMembers", + "signature": "searchGroupMembers(params:OpenIMSearchGroupMembersParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupMemberListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2116, + "name": "getJoinedGroupList", + "signature": "getJoinedGroupList(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2117, + "name": "getJoinedGroupListPage", + "signature": "getJoinedGroupListPage(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2118, + "name": "createGroup", + "signature": "createGroup(params:OpenIMCreateGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2119, + "name": "setGroupInfo", + "signature": "setGroupInfo(params:OpenIMSetGroupInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2120, + "name": "setGroupMemberInfo", + "signature": "setGroupMemberInfo(params:OpenIMSetGroupMemberInfoParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2121, + "name": "joinGroup", + "signature": "joinGroup(params:OpenIMJoinGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2122, + "name": "searchGroups", + "signature": "searchGroups(params:OpenIMSearchGroupsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2123, + "name": "quitGroup", + "signature": "quitGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2124, + "name": "dismissGroup", + "signature": "dismissGroup(groupID:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2125, + "name": "changeGroupMute", + "signature": "changeGroupMute(params:OpenIMChangeGroupMuteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2126, + "name": "changeGroupMemberMute", + "signature": "changeGroupMemberMute(params:OpenIMChangeGroupMemberMuteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2127, + "name": "transferGroupOwner", + "signature": "transferGroupOwner(params:OpenIMTransferGroupOwnerParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2128, + "name": "getGroupApplicationListAsApplicant", + "signature": "getGroupApplicationListAsApplicant(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2129, + "name": "getGroupApplicationListAsRecipient", + "signature": "getGroupApplicationListAsRecipient(params?:OpenIMApplicationListParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGroupApplicationListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2130, + "name": "getGroupApplicationUnhandledCount", + "signature": "getGroupApplicationUnhandledCount(params:OpenIMPageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "number", + "responseSchema": { + "kind": "number" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2131, + "name": "acceptGroupApplication", + "signature": "acceptGroupApplication(params:OpenIMGroupApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2132, + "name": "refuseGroupApplication", + "signature": "refuseGroupApplication(params:OpenIMGroupApplicationHandleParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2133, + "name": "findMessageList", + "signature": "findMessageList(params:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFindMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFindMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2134, + "name": "updateFcmToken", + "signature": "updateFcmToken(params:OpenIMUpdateFcmTokenParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2135, + "name": "subscribeUsersStatus", + "signature": "subscribeUsersStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2136, + "name": "unsubscribeUsersStatus", + "signature": "unsubscribeUsersStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2137, + "name": "getUserStatus", + "signature": "getUserStatus(data:Array,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserStatusListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserStatusListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2138, + "name": "getSubscribeUsersStatus", + "signature": "getSubscribeUsersStatus(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUserStatusListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserStatusListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2139, + "name": "createTextMessage", + "signature": "createTextMessage(text:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2140, + "name": "createImageMessageFromFullPath", + "signature": "createImageMessageFromFullPath(imageFullPath:string,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2141, + "name": "createImageMessageByURL", + "signature": "createImageMessageByURL(params:OpenIMPictureElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2142, + "name": "createCustomMessage", + "signature": "createCustomMessage(params:OpenIMCreateCustomMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2143, + "name": "createQuoteMessage", + "signature": "createQuoteMessage(params:OpenIMCreateQuoteMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2144, + "name": "createAdvancedQuoteMessage", + "signature": "createAdvancedQuoteMessage(params:OpenIMCreateAdvancedQuoteMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2145, + "name": "createAdvancedTextMessage", + "signature": "createAdvancedTextMessage(params:OpenIMCreateAdvancedTextMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2146, + "name": "createTextAtMessage", + "signature": "createTextAtMessage(params:OpenIMCreateTextAtMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2147, + "name": "createSoundMessageFromFullPath", + "signature": "createSoundMessageFromFullPath(params:OpenIMCreateSoundMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2148, + "name": "createSoundMessageByURL", + "signature": "createSoundMessageByURL(params:OpenIMSoundElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2149, + "name": "createVideoMessageFromFullPath", + "signature": "createVideoMessageFromFullPath(params:OpenIMCreateVideoMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2150, + "name": "createVideoMessageByURL", + "signature": "createVideoMessageByURL(params:OpenIMVideoElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2151, + "name": "createFileMessageFromFullPath", + "signature": "createFileMessageFromFullPath(params:OpenIMCreateFileMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2152, + "name": "createFileMessageByURL", + "signature": "createFileMessageByURL(params:OpenIMFileElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2153, + "name": "createMergerMessage", + "signature": "createMergerMessage(params:OpenIMCreateMergerMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2154, + "name": "createForwardMessage", + "signature": "createForwardMessage(message:OpenIMMessageItem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2155, + "name": "createFaceMessage", + "signature": "createFaceMessage(params:OpenIMCreateFaceMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2156, + "name": "createLocationMessage", + "signature": "createLocationMessage(params:OpenIMCreateLocationMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2157, + "name": "createCardMessage", + "signature": "createCardMessage(card:OpenIMCardElem,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2158, + "name": "sendMessage", + "signature": "sendMessage(options:OpenIMSendMessageOptions):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem", + "responseSchema": { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2159, + "name": "sendMessageNotOss", + "signature": "sendMessageNotOss(options:OpenIMSendMessageOptions):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem", + "responseSchema": { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2160, + "name": "uploadFile", + "signature": "uploadFile(params:OpenIMUploadFileParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUploadFileResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUploadFileResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 2161, + "name": "uploadLogs", + "signature": "uploadLogs(params:OpenIMUploadLogsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200002, + "name": "onChangedPinnedMsg", + "signature": "onChangedPinnedMsg(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200003, + "name": "onDeleteUserAllMsgsInConv", + "signature": "onDeleteUserAllMsgsInConv(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200004, + "name": "onMessageModified", + "signature": "onMessageModified(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200005, + "name": "onMessageEdited", + "signature": "onMessageEdited(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200006, + "name": "onRecvGroupReadReceipt", + "signature": "onRecvGroupReadReceipt(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200007, + "name": "onRecvMessageExtensionsAdded", + "signature": "onRecvMessageExtensionsAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200008, + "name": "onRecvMessageExtensionsChanged", + "signature": "onRecvMessageExtensionsChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200009, + "name": "onRecvMessageExtensionsDeleted", + "signature": "onRecvMessageExtensionsDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200010, + "name": "onConversationGroupAdded", + "signature": "onConversationGroupAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200011, + "name": "onConversationGroupChanged", + "signature": "onConversationGroupChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200012, + "name": "onConversationGroupDeleted", + "signature": "onConversationGroupDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200013, + "name": "onConversationGroupMemberAdded", + "signature": "onConversationGroupMemberAdded(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200014, + "name": "onConversationGroupMemberDeleted", + "signature": "onConversationGroupMemberDeleted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200015, + "name": "onGroupApplicationBadgeCountChanged", + "signature": "onGroupApplicationBadgeCountChanged(handler:OpenIMNumberEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200016, + "name": "onReceiveNewInvitation", + "signature": "onReceiveNewInvitation(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200017, + "name": "onInviteeAccepted", + "signature": "onInviteeAccepted(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200018, + "name": "onInviteeAcceptedByOtherDevice", + "signature": "onInviteeAcceptedByOtherDevice(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200019, + "name": "onInviteeRejected", + "signature": "onInviteeRejected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200020, + "name": "onInviteeRejectedByOtherDevice", + "signature": "onInviteeRejectedByOtherDevice(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200021, + "name": "onInvitationCancelled", + "signature": "onInvitationCancelled(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200022, + "name": "onInvitationTimeout", + "signature": "onInvitationTimeout(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200023, + "name": "onHangUp", + "signature": "onHangUp(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200024, + "name": "onRoomParticipantConnected", + "signature": "onRoomParticipantConnected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200025, + "name": "onRoomParticipantDisconnected", + "signature": "onRoomParticipantDisconnected(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200026, + "name": "onReceiveCustomSignaling", + "signature": "onReceiveCustomSignaling(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200027, + "name": "onReceiveCustomSignal", + "signature": "onReceiveCustomSignal(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200028, + "name": "onStreamChange", + "signature": "onStreamChange(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200029, + "name": "onMessageKvInfoChanged", + "signature": "onMessageKvInfoChanged(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200030, + "name": "onMigrationStart", + "signature": "onMigrationStart(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200031, + "name": "onMigrationProgress", + "signature": "onMigrationProgress(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200032, + "name": "onMigrationFailed", + "signature": "onMigrationFailed(handler:OpenIMStringEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200033, + "name": "onMigrationFinished", + "signature": "onMigrationFinished(handler:OpenIMVoidEventHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200086, + "name": "onSDKSessionChanged", + "signature": "onSDKSessionChanged(handler:SDKSessionChangedHandler):OpenIMSDKEventSubscription", + "role": "event-subscription", + "completion": "sync", + "responseCodec": "event-handler", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKEventSubscription" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": true + }, + { + "id": 200034, + "name": "cancelUpload", + "signature": "cancelUpload(params:OpenIMCancelUploadParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200035, + "name": "speechToText", + "signature": "speechToText(params:OpenIMSpeechToTextParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSpeechToTextResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSpeechToTextResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200036, + "name": "getSpeechToTextCapabilities", + "signature": "getSpeechToTextCapabilities(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSpeechToTextCapabilitiesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSpeechToTextCapabilitiesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200081, + "name": "updateToken", + "signature": "updateToken(params:OpenIMUpdateTokenParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200082, + "name": "translateText", + "signature": "translateText(params:OpenIMTranslateTextParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMTranslateTextResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMTranslateTextResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200037, + "name": "getInputStates", + "signature": "getInputStates(params:OpenIMGetInputStatesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetInputStatesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetInputStatesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200038, + "name": "resetConversationUnread", + "signature": "resetConversationUnread(params:OpenIMResetConversationUnreadParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200039, + "name": "createConversationGroup", + "signature": "createConversationGroup(params:OpenIMCreateConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMCreateConversationGroupResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCreateConversationGroupResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200040, + "name": "updateConversationGroup", + "signature": "updateConversationGroup(params:OpenIMUpdateConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMUpdateConversationGroupResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUpdateConversationGroupResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200041, + "name": "deleteConversationGroup", + "signature": "deleteConversationGroup(params:OpenIMDeleteConversationGroupParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200042, + "name": "getConversationGroups", + "signature": "getConversationGroups(params:OpenIMGetConversationGroupsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupsResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupsResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200043, + "name": "setConversationGroupOrder", + "signature": "setConversationGroupOrder(params:OpenIMSetConversationGroupOrderParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200044, + "name": "addConversationsToGroups", + "signature": "addConversationsToGroups(params:OpenIMConversationGroupMembershipParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200045, + "name": "removeConversationsFromGroups", + "signature": "removeConversationsFromGroups(params:OpenIMConversationGroupMembershipParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200046, + "name": "getConversationGroupByConversationID", + "signature": "getConversationGroupByConversationID(params:OpenIMGetConversationGroupByConversationIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupByConversationIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupByConversationIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200047, + "name": "getConversationGroupInfoWithConversations", + "signature": "getConversationGroupInfoWithConversations(params:OpenIMGetConversationGroupInfoWithConversationsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationGroupInfoWithConversationsResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationGroupInfoWithConversationsResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200048, + "name": "updateFriend", + "signature": "updateFriend(params:OpenIMUpdateFriendParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200049, + "name": "deleteFriendRequests", + "signature": "deleteFriendRequests(params:OpenIMDeleteFriendRequestsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200050, + "name": "getBlacks", + "signature": "getBlacks(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetBlacksResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetBlacksResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200051, + "name": "deleteGroupRequests", + "signature": "deleteGroupRequests(params:OpenIMDeleteGroupRequestsParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200052, + "name": "checkLocalGroupFullSync", + "signature": "checkLocalGroupFullSync(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFullSyncResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFullSyncResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200053, + "name": "checkGroupMemberFullSync", + "signature": "checkGroupMemberFullSync(params:OpenIMCheckGroupMemberFullSyncParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFullSyncResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFullSyncResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200054, + "name": "getAtAllTag", + "signature": "getAtAllTag(operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAtAllTagResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAtAllTagResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200055, + "name": "sendGroupMessageReadReceipt", + "signature": "sendGroupMessageReadReceipt(params:OpenIMSendGroupMessageReadReceiptParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200056, + "name": "getGroupMessageReaderList", + "signature": "getGroupMessageReaderList(params:OpenIMGetGroupMessageReaderListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetGroupMessageReaderListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetGroupMessageReaderListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200057, + "name": "fetchSurroundingMessages", + "signature": "fetchSurroundingMessages(params:OpenIMFetchSurroundingMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMFetchSurroundingMessagesResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFetchSurroundingMessagesResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200058, + "name": "modifyMessage", + "signature": "modifyMessage(params:OpenIMModifyMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMModifyMessageResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMModifyMessageResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200084, + "name": "translateMessage", + "signature": "translateMessage(params:OpenIMTranslateMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200059, + "name": "setConversationPinnedMsg", + "signature": "setConversationPinnedMsg(params:OpenIMSetConversationPinnedMsgParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200060, + "name": "getConversationPinnedMsg", + "signature": "getConversationPinnedMsg(params:OpenIMGetConversationPinnedMsgParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMGetConversationPinnedMsgResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGetConversationPinnedMsgResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200061, + "name": "setMessageLocalContent", + "signature": "setMessageLocalContent(params:OpenIMSetMessageLocalContentParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200062, + "name": "getHistoryMessageList", + "signature": "getHistoryMessageList(params:OpenIMGetHistoryMessageListParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMAdvancedHistoryMessageListResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAdvancedHistoryMessageListResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200063, + "name": "typingStatusUpdate", + "signature": "typingStatusUpdate(params:OpenIMTypingStatusUpdateParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200064, + "name": "deleteMessages", + "signature": "deleteMessages(params:OpenIMDeleteMessagesParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200065, + "name": "deleteUserAllMessagesInConv", + "signature": "deleteUserAllMessagesInConv(params:OpenIMDeleteUserAllMessagesInConvParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200066, + "name": "createMarkdownMessage", + "signature": "createMarkdownMessage(params:OpenIMCreateMarkdownMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200067, + "name": "createImageMessage", + "signature": "createImageMessage(params:OpenIMCreateImageMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200068, + "name": "createSoundMessage", + "signature": "createSoundMessage(params:OpenIMCreateSoundMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200069, + "name": "createVideoMessage", + "signature": "createVideoMessage(params:OpenIMCreateVideoMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200070, + "name": "createFileMessage", + "signature": "createFileMessage(params:OpenIMCreateFileMessageParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMMessageItem|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200071, + "name": "signalingInvite", + "signature": "signalingInvite(params:OpenIMSignalingInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingInviteResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInviteResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200072, + "name": "signalingInviteInGroup", + "signature": "signalingInviteInGroup(params:OpenIMSignalingInviteParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingInviteResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInviteResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200073, + "name": "signalingAccept", + "signature": "signalingAccept(params:OpenIMSignalingAcceptParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingAcceptResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingAcceptResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200074, + "name": "signalingReject", + "signature": "signalingReject(params:OpenIMSignalingRejectParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200075, + "name": "signalingCancel", + "signature": "signalingCancel(params:OpenIMSignalingCancelParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200076, + "name": "signalingHungUp", + "signature": "signalingHungUp(params:OpenIMSignalingHungUpParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200077, + "name": "signalingGetTokenByRoomID", + "signature": "signalingGetTokenByRoomID(params:OpenIMSignalingGetTokenByRoomIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetTokenByRoomIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetTokenByRoomIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200078, + "name": "signalingGetRoomByGroupID", + "signature": "signalingGetRoomByGroupID(params:OpenIMSignalingGetRoomByGroupIDParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetRoomByGroupIDResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetRoomByGroupIDResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200079, + "name": "signalingGetInvitationInfoStartApp", + "signature": "signalingGetInvitationInfoStartApp(params?:OpenIMSignalingGetInvitationInfoStartAppParams|null,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSignalingGetInvitationInfoStartAppResult|null", + "responseSchema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingGetInvitationInfoStartAppResult" + }, + { + "kind": "null" + } + ] + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200080, + "name": "signalingSendCustomSignaling", + "signature": "signalingSendCustomSignaling(params:OpenIMSignalingSendCustomSignalingParams,operationID?:string|null):Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "raw-string", + "responseSchema": { + "kind": "string" + }, + "rawString": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": false, + "synthetic": false + }, + { + "id": 200085, + "name": "getSDKSessionSnapshot", + "signature": "getSDKSessionSnapshot():Promise", + "role": "operation", + "completion": "promise", + "responseCodec": "typed:OpenIMSDKSessionSnapshot", + "responseSchema": { + "kind": "reference", + "name": "OpenIMSDKSessionSnapshot" + }, + "rawString": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "localOperation": true, + "synthetic": false + } + ], + "events": [ + { + "id": 3001, + "name": "onConnecting", + "callable": "onConnecting", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3002, + "name": "onConnectSuccess", + "callable": "onConnectSuccess", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3003, + "name": "onConnectFailed", + "callable": "onConnectFailed", + "handlerType": "OpenIMErrorEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "number" + }, + { + "kind": "string" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3004, + "name": "onKickedOffline", + "callable": "onKickedOffline", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3005, + "name": "onUserTokenExpired", + "callable": "onUserTokenExpired", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3006, + "name": "onUserTokenInvalid", + "callable": "onUserTokenInvalid", + "handlerType": "OpenIMErrorEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "number" + }, + { + "kind": "string" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3007, + "name": "onRecvNewMessage", + "callable": "onRecvNewMessage", + "handlerType": "OpenIMMessageEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3008, + "name": "onRecvOfflineNewMessage", + "callable": "onRecvOfflineNewMessage", + "handlerType": "OpenIMMessageEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3009, + "name": "onRecvOnlineOnlyMessage", + "callable": "onRecvOnlineOnlyMessage", + "handlerType": "OpenIMMessageEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3010, + "name": "onMsgDeleted", + "callable": "onMsgDeleted", + "handlerType": "OpenIMMessageEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3011, + "name": "onNewRecvMessageRevoked", + "callable": "onNewRecvMessageRevoked", + "handlerType": "OpenIMMessageRevokedEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageRevokedItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3012, + "name": "onRecvC2CReadReceipt", + "callable": "onRecvC2CReadReceipt", + "handlerType": "OpenIMMessageReceiptListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageReceiptListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3013, + "name": "onRecvNewMessages", + "callable": "onRecvNewMessages", + "handlerType": "OpenIMMessageListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3014, + "name": "onRecvOfflineNewMessages", + "callable": "onRecvOfflineNewMessages", + "handlerType": "OpenIMMessageListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3015, + "name": "onConversationChanged", + "callable": "onConversationChanged", + "handlerType": "OpenIMConversationListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3016, + "name": "onConversationUserInputStatusChanged", + "callable": "onConversationUserInputStatusChanged", + "handlerType": "OpenIMConversationInputStatusEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationInputStatusItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3017, + "name": "onNewConversation", + "callable": "onNewConversation", + "handlerType": "OpenIMConversationListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3018, + "name": "onSyncServerFailed", + "callable": "onSyncServerFailed", + "handlerType": "OpenIMBooleanEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "boolean" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3019, + "name": "onSyncServerFinish", + "callable": "onSyncServerFinish", + "handlerType": "OpenIMBooleanEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "boolean" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3020, + "name": "onSyncServerProgress", + "callable": "onSyncServerProgress", + "handlerType": "OpenIMNumberEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "number" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3021, + "name": "onSyncServerStart", + "callable": "onSyncServerStart", + "handlerType": "OpenIMBooleanEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "boolean" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3022, + "name": "onSendMessageProgress", + "callable": "onSendMessageProgress", + "handlerType": "OpenIMSendMessageProgressEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSendMessageProgressEvent" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3023, + "name": "onUploadFileProgress", + "callable": "onUploadFileProgress", + "handlerType": "OpenIMUploadFileProgressEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUploadFileProgressEvent" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3024, + "name": "onUploadLogsProgress", + "callable": "onUploadLogsProgress", + "handlerType": "OpenIMUploadLogsProgressEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUploadLogsProgressEvent" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3025, + "name": "onTotalUnreadMessageCountChanged", + "callable": "onTotalUnreadMessageCountChanged", + "handlerType": "OpenIMNumberEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "number" + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3026, + "name": "onRecvCustomBusinessMessage", + "callable": "onRecvCustomBusinessMessage", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3027, + "name": "onBlackAdded", + "callable": "onBlackAdded", + "handlerType": "OpenIMBlackUserEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMBlackUserItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3028, + "name": "onBlackDeleted", + "callable": "onBlackDeleted", + "handlerType": "OpenIMBlackUserEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMBlackUserItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3029, + "name": "onFriendAdded", + "callable": "onFriendAdded", + "handlerType": "OpenIMFriendEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendUserItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3030, + "name": "onFriendApplicationAccepted", + "callable": "onFriendApplicationAccepted", + "handlerType": "OpenIMFriendApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3031, + "name": "onFriendApplicationAdded", + "callable": "onFriendApplicationAdded", + "handlerType": "OpenIMFriendApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3032, + "name": "onFriendApplicationDeleted", + "callable": "onFriendApplicationDeleted", + "handlerType": "OpenIMFriendApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3033, + "name": "onFriendApplicationRejected", + "callable": "onFriendApplicationRejected", + "handlerType": "OpenIMFriendApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3034, + "name": "onFriendDeleted", + "callable": "onFriendDeleted", + "handlerType": "OpenIMFriendEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendUserItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3035, + "name": "onFriendInfoChanged", + "callable": "onFriendInfoChanged", + "handlerType": "OpenIMFriendEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFriendUserItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3036, + "name": "onGroupApplicationAccepted", + "callable": "onGroupApplicationAccepted", + "handlerType": "OpenIMGroupApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3037, + "name": "onGroupApplicationAdded", + "callable": "onGroupApplicationAdded", + "handlerType": "OpenIMGroupApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3038, + "name": "onGroupApplicationDeleted", + "callable": "onGroupApplicationDeleted", + "handlerType": "OpenIMGroupApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3039, + "name": "onGroupApplicationRejected", + "callable": "onGroupApplicationRejected", + "handlerType": "OpenIMGroupApplicationEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupApplicationItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3040, + "name": "onGroupDismissed", + "callable": "onGroupDismissed", + "handlerType": "OpenIMGroupEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3041, + "name": "onGroupInfoChanged", + "callable": "onGroupInfoChanged", + "handlerType": "OpenIMGroupEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3042, + "name": "onGroupMemberAdded", + "callable": "onGroupMemberAdded", + "handlerType": "OpenIMGroupMemberEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3043, + "name": "onGroupMemberDeleted", + "callable": "onGroupMemberDeleted", + "handlerType": "OpenIMGroupMemberEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3044, + "name": "onGroupMemberInfoChanged", + "callable": "onGroupMemberInfoChanged", + "handlerType": "OpenIMGroupMemberEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3045, + "name": "onJoinedGroupAdded", + "callable": "onJoinedGroupAdded", + "handlerType": "OpenIMGroupEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3046, + "name": "onJoinedGroupDeleted", + "callable": "onJoinedGroupDeleted", + "handlerType": "OpenIMGroupEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupItem" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3047, + "name": "onSelfInfoUpdated", + "callable": "onSelfInfoUpdated", + "handlerType": "OpenIMUserEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserInfo" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 3048, + "name": "onUserStatusChanged", + "callable": "onUserStatusChanged", + "handlerType": "OpenIMUserStatusListEventHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUserStatusListResult" + }, + { + "kind": "null" + } + ] + } + ], + "rawPayload": false, + "edition": "public", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300001, + "name": "onChangedPinnedMsg", + "callable": "onChangedPinnedMsg", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300002, + "name": "onDeleteUserAllMsgsInConv", + "callable": "onDeleteUserAllMsgsInConv", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300003, + "name": "onMessageModified", + "callable": "onMessageModified", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300004, + "name": "onMessageEdited", + "callable": "onMessageEdited", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300005, + "name": "onRecvGroupReadReceipt", + "callable": "onRecvGroupReadReceipt", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300006, + "name": "onRecvMessageExtensionsAdded", + "callable": "onRecvMessageExtensionsAdded", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300007, + "name": "onRecvMessageExtensionsChanged", + "callable": "onRecvMessageExtensionsChanged", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300008, + "name": "onRecvMessageExtensionsDeleted", + "callable": "onRecvMessageExtensionsDeleted", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300009, + "name": "onConversationGroupAdded", + "callable": "onConversationGroupAdded", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300010, + "name": "onConversationGroupChanged", + "callable": "onConversationGroupChanged", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300011, + "name": "onConversationGroupDeleted", + "callable": "onConversationGroupDeleted", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300012, + "name": "onConversationGroupMemberAdded", + "callable": "onConversationGroupMemberAdded", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300013, + "name": "onConversationGroupMemberDeleted", + "callable": "onConversationGroupMemberDeleted", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300014, + "name": "onGroupApplicationBadgeCountChanged", + "callable": "onGroupApplicationBadgeCountChanged", + "handlerType": "OpenIMNumberEventHandler", + "payloadProfile": "scalar", + "arguments": [ + { + "kind": "number" + } + ], + "rawPayload": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300015, + "name": "onReceiveNewInvitation", + "callable": "onReceiveNewInvitation", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300016, + "name": "onInviteeAccepted", + "callable": "onInviteeAccepted", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300017, + "name": "onInviteeAcceptedByOtherDevice", + "callable": "onInviteeAcceptedByOtherDevice", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300018, + "name": "onInviteeRejected", + "callable": "onInviteeRejected", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300019, + "name": "onInviteeRejectedByOtherDevice", + "callable": "onInviteeRejectedByOtherDevice", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300020, + "name": "onInvitationCancelled", + "callable": "onInvitationCancelled", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300021, + "name": "onInvitationTimeout", + "callable": "onInvitationTimeout", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300022, + "name": "onHangUp", + "callable": "onHangUp", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300023, + "name": "onRoomParticipantConnected", + "callable": "onRoomParticipantConnected", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300024, + "name": "onRoomParticipantDisconnected", + "callable": "onRoomParticipantDisconnected", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300025, + "name": "onReceiveCustomSignaling", + "callable": "onReceiveCustomSignaling", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300026, + "name": "onReceiveCustomSignal", + "callable": "onReceiveCustomSignal", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": false + }, + { + "id": 300027, + "name": "onStreamChange", + "callable": "onStreamChange", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300028, + "name": "onMessageKvInfoChanged", + "callable": "onMessageKvInfoChanged", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300029, + "name": "onMigrationStart", + "callable": "onMigrationStart", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300030, + "name": "onMigrationProgress", + "callable": "onMigrationProgress", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300031, + "name": "onMigrationFailed", + "callable": "onMigrationFailed", + "handlerType": "OpenIMStringEventHandler", + "payloadProfile": "opaque-string", + "arguments": [ + { + "kind": "string" + } + ], + "rawPayload": true, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300032, + "name": "onMigrationFinished", + "callable": "onMigrationFinished", + "handlerType": "OpenIMVoidEventHandler", + "payloadProfile": "void", + "arguments": [], + "rawPayload": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "platform-unsupported" + }, + "synthetic": false + }, + { + "id": 300033, + "name": "onSDKSessionChanged", + "callable": "onSDKSessionChanged", + "handlerType": "SDKSessionChangedHandler", + "payloadProfile": "typed", + "arguments": [ + { + "kind": "reference", + "name": "OpenIMSDKSessionSnapshot" + } + ], + "rawPayload": false, + "edition": "commercial", + "platforms": { + "android": "required", + "ios": "required", + "harmony": "required" + }, + "synthetic": true + } + ], + "schemas": { + "OpenIMMessageStatus": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + }, + { + "kind": "literal", + "value": 3 + }, + { + "kind": "literal", + "value": 4 + }, + { + "kind": "literal", + "value": 5 + } + ] + }, + "OpenIMPlatform": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + }, + { + "kind": "literal", + "value": 3 + }, + { + "kind": "literal", + "value": 4 + }, + { + "kind": "literal", + "value": 5 + }, + { + "kind": "literal", + "value": 6 + }, + { + "kind": "literal", + "value": 7 + }, + { + "kind": "literal", + "value": 8 + }, + { + "kind": "literal", + "value": 9 + }, + { + "kind": "literal", + "value": 10 + }, + { + "kind": "literal", + "value": 11 + } + ] + }, + "OpenIMLogLevel": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + }, + { + "kind": "literal", + "value": 3 + }, + { + "kind": "literal", + "value": 4 + }, + { + "kind": "literal", + "value": 5 + }, + { + "kind": "literal", + "value": 6 + } + ] + }, + "OpenIMMessageType": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 101 + }, + { + "kind": "literal", + "value": 102 + }, + { + "kind": "literal", + "value": 103 + }, + { + "kind": "literal", + "value": 104 + }, + { + "kind": "literal", + "value": 105 + }, + { + "kind": "literal", + "value": 106 + }, + { + "kind": "literal", + "value": 107 + }, + { + "kind": "literal", + "value": 108 + }, + { + "kind": "literal", + "value": 109 + }, + { + "kind": "literal", + "value": 110 + }, + { + "kind": "literal", + "value": 111 + }, + { + "kind": "literal", + "value": 113 + }, + { + "kind": "literal", + "value": 114 + }, + { + "kind": "literal", + "value": 115 + }, + { + "kind": "literal", + "value": 117 + }, + { + "kind": "literal", + "value": 118 + }, + { + "kind": "literal", + "value": 119 + }, + { + "kind": "literal", + "value": 120 + }, + { + "kind": "literal", + "value": 121 + }, + { + "kind": "literal", + "value": 122 + }, + { + "kind": "literal", + "value": 143 + }, + { + "kind": "literal", + "value": 200 + }, + { + "kind": "literal", + "value": 201 + }, + { + "kind": "literal", + "value": 202 + }, + { + "kind": "literal", + "value": 203 + }, + { + "kind": "literal", + "value": 1201 + }, + { + "kind": "literal", + "value": 1202 + }, + { + "kind": "literal", + "value": 1203 + }, + { + "kind": "literal", + "value": 1204 + }, + { + "kind": "literal", + "value": 1205 + }, + { + "kind": "literal", + "value": 1206 + }, + { + "kind": "literal", + "value": 1207 + }, + { + "kind": "literal", + "value": 1208 + }, + { + "kind": "literal", + "value": 1209 + }, + { + "kind": "literal", + "value": 1210 + }, + { + "kind": "literal", + "value": 1300 + }, + { + "kind": "literal", + "value": 1303 + }, + { + "kind": "literal", + "value": 1304 + }, + { + "kind": "literal", + "value": 1305 + }, + { + "kind": "literal", + "value": 1306 + }, + { + "kind": "literal", + "value": 1307 + }, + { + "kind": "literal", + "value": 1308 + }, + { + "kind": "literal", + "value": 1400 + }, + { + "kind": "literal", + "value": 1501 + }, + { + "kind": "literal", + "value": 1502 + }, + { + "kind": "literal", + "value": 1503 + }, + { + "kind": "literal", + "value": 1504 + }, + { + "kind": "literal", + "value": 1505 + }, + { + "kind": "literal", + "value": 1506 + }, + { + "kind": "literal", + "value": 1507 + }, + { + "kind": "literal", + "value": 1508 + }, + { + "kind": "literal", + "value": 1509 + }, + { + "kind": "literal", + "value": 1510 + }, + { + "kind": "literal", + "value": 1511 + }, + { + "kind": "literal", + "value": 1512 + }, + { + "kind": "literal", + "value": 1513 + }, + { + "kind": "literal", + "value": 1514 + }, + { + "kind": "literal", + "value": 1515 + }, + { + "kind": "literal", + "value": 1516 + }, + { + "kind": "literal", + "value": 1517 + }, + { + "kind": "literal", + "value": 1518 + }, + { + "kind": "literal", + "value": 1519 + }, + { + "kind": "literal", + "value": 1520 + }, + { + "kind": "literal", + "value": 1651 + }, + { + "kind": "literal", + "value": 1652 + }, + { + "kind": "literal", + "value": 1701 + }, + { + "kind": "literal", + "value": 1702 + }, + { + "kind": "literal", + "value": 1703 + }, + { + "kind": "literal", + "value": 1704 + }, + { + "kind": "literal", + "value": 2001 + }, + { + "kind": "literal", + "value": 2101 + }, + { + "kind": "literal", + "value": 2102 + }, + { + "kind": "literal", + "value": 2103 + }, + { + "kind": "literal", + "value": 2150 + }, + { + "kind": "literal", + "value": 2200 + }, + { + "kind": "literal", + "value": 2210 + }, + { + "kind": "literal", + "value": 2300 + }, + { + "kind": "literal", + "value": 2400 + }, + { + "kind": "literal", + "value": 2401 + }, + { + "kind": "literal", + "value": 2500 + } + ] + }, + "OpenIMSessionType": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + }, + { + "kind": "literal", + "value": 3 + }, + { + "kind": "literal", + "value": 4 + } + ] + }, + "OpenIMLoginStatus": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + }, + { + "kind": "literal", + "value": 3 + } + ] + }, + "OpenIMSendMessageOptions": { + "kind": "object", + "fields": { + "operationID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "message": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + }, + "recvID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "offlinePushInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMOfflinePush" + }, + { + "kind": "null" + } + ] + } + }, + "isOnlineOnly": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUploadFileParams": { + "kind": "object", + "fields": { + "filepath": { + "required": true, + "schema": { + "kind": "string" + } + }, + "name": { + "required": true, + "schema": { + "kind": "string" + } + }, + "contentType": { + "required": true, + "schema": { + "kind": "string" + } + }, + "uuid": { + "required": true, + "schema": { + "kind": "string" + } + }, + "cancelID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "cause": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateSoundMessageParams": { + "kind": "object", + "fields": { + "soundPath": { + "required": true, + "schema": { + "kind": "string" + } + }, + "duration": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMCreateVideoMessageParams": { + "kind": "object", + "fields": { + "videoPath": { + "required": true, + "schema": { + "kind": "string" + } + }, + "videoType": { + "required": true, + "schema": { + "kind": "string" + } + }, + "duration": { + "required": true, + "schema": { + "kind": "number" + } + }, + "snapshotPath": { + "required": true, + "schema": { + "kind": "string" + } + }, + "videoSourcePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotSourcePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateFileMessageParams": { + "kind": "object", + "fields": { + "filePath": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fileName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fileSourcePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUploadFileResult": { + "kind": "object", + "fields": { + "url": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "uri": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "uuid": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "size": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "typ": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "mediaID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUpdateFcmTokenParams": { + "kind": "object", + "fields": { + "fcmToken": { + "required": true, + "schema": { + "kind": "string" + } + }, + "expireTime": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMUploadLogsParams": { + "kind": "object", + "fields": { + "line": { + "required": true, + "schema": { + "kind": "number" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMUploadFileProgressEvent": { + "kind": "object", + "fields": { + "progress": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMUploadLogsProgressEvent": { + "kind": "object", + "fields": { + "progress": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMSendMessageProgressEvent": { + "kind": "object", + "fields": { + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "progress": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMMessageKeyParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSetMessageLocalExParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "localEx": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSetConversationBoolean": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": false + } + ] + }, + "OpenIMSetSelfInfoRecvMsgOpt": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + } + ] + }, + "OpenIMUpdateFriendBoolean": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": false + } + ] + }, + "OpenIMGroupNeedVerification": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + } + ] + }, + "OpenIMGroupOption": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + } + ] + }, + "OpenIMGroupDisplayIsRead": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": false + } + ] + }, + "OpenIMGroupMemberRoleLevel": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 20 + }, + { + "kind": "literal", + "value": 60 + }, + { + "kind": "literal", + "value": 100 + } + ] + }, + "OpenIMSetConversationParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "recvMsgOpt": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "isPinned": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSetConversationBoolean" + }, + { + "kind": "null" + } + ] + } + }, + "isPrivateChat": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSetConversationBoolean" + }, + { + "kind": "null" + } + ] + } + }, + "burnDuration": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "groupAtType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSetSelfInfoParams": { + "kind": "object", + "fields": { + "nickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "faceURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "globalRecvMsgOpt": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSetSelfInfoRecvMsgOpt" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUpdateFriendsParams": { + "kind": "object", + "fields": { + "friendUserIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "isPinned": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUpdateFriendBoolean" + }, + { + "kind": "null" + } + ] + } + }, + "remark": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCheckFriendResultItem": { + "kind": "object", + "fields": { + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "result": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMCheckFriendResult": { + "kind": "object", + "fields": { + "result": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMCheckFriendResultItem" + } + } + } + } + }, + "OpenIMInsertSingleMessageParams": { + "kind": "object", + "fields": { + "message": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + }, + "recvID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sendID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMInsertGroupMessageParams": { + "kind": "object", + "fields": { + "message": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + }, + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sendID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMInputStateParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "focus": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMSetConversationDraftParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "draftText": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMAddFriendParams": { + "kind": "object", + "fields": { + "toUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "reqMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSearchFriendsParams": { + "kind": "object", + "fields": { + "keywordList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "isSearchUserID": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isSearchNickname": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isSearchRemark": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMGetSpecifiedFriendsInfoParams": { + "kind": "object", + "fields": { + "userIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "filterBlack": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMFriendApplicationHandleParams": { + "kind": "object", + "fields": { + "toUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleMsg": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMAddBlackParams": { + "kind": "object", + "fields": { + "toUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMGroupUserListParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMGroupInviteParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "reason": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMSearchGroupMembersParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "keywordList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "isSearchUserID": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isSearchMemberNickname": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMCreateGroupInfo": { + "kind": "object", + "fields": { + "groupName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupType": { + "required": true, + "schema": { + "kind": "literal", + "value": 2 + } + }, + "notification": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "introduction": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "faceURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateGroupParams": { + "kind": "object", + "fields": { + "groupInfo": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMCreateGroupInfo" + } + }, + "memberUserIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "adminUserIDs": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSetGroupInfoParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupName": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "notification": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "introduction": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "faceURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "needVerification": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupNeedVerification" + }, + { + "kind": "null" + } + ] + } + }, + "lookMemberInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupOption" + }, + { + "kind": "null" + } + ] + } + }, + "applyMemberFriend": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupOption" + }, + { + "kind": "null" + } + ] + } + }, + "displayIsRead": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupDisplayIsRead" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSetGroupMemberInfoParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "faceURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "roleLevel": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMGroupMemberRoleLevel" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMJoinGroupParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "reqMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "joinSource": { + "required": true, + "schema": { + "kind": "number" + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSearchGroupsParams": { + "kind": "object", + "fields": { + "keywordList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "isSearchGroupID": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isSearchGroupName": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMChangeGroupMuteParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "isMute": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMChangeGroupMemberMuteParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "mutedSeconds": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMTransferGroupOwnerParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "newOwnerUserID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGroupApplicationHandleParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fromUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleMsg": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMFindMessageParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMCreateCustomMessageParams": { + "kind": "object", + "fields": { + "data": { + "required": true, + "schema": { + "kind": "string" + } + }, + "extension": { + "required": true, + "schema": { + "kind": "string" + } + }, + "descriptionText": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMCreateQuoteMessageParams": { + "kind": "object", + "fields": { + "text": { + "required": true, + "schema": { + "kind": "string" + } + }, + "message": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMCreateAdvancedQuoteMessageParams": { + "kind": "object", + "fields": { + "text": { + "required": true, + "schema": { + "kind": "string" + } + }, + "message": { + "required": true, + "schema": { + "kind": "string" + } + }, + "messageEntityList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + } + } + } + }, + "OpenIMCreateAdvancedTextMessageParams": { + "kind": "object", + "fields": { + "text": { + "required": true, + "schema": { + "kind": "string" + } + }, + "messageEntityList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + } + } + } + }, + "OpenIMCreateTextAtMessageParams": { + "kind": "object", + "fields": { + "text": { + "required": true, + "schema": { + "kind": "string" + } + }, + "atUserIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "atUsersInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMAtUsersInfoItem" + } + }, + { + "kind": "null" + } + ] + } + }, + "quoteMessage": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateMergerMessageParams": { + "kind": "object", + "fields": { + "messageList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + }, + "title": { + "required": true, + "schema": { + "kind": "string" + } + }, + "abstractList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMCreateFaceMessageParams": { + "kind": "object", + "fields": { + "index": { + "required": true, + "schema": { + "kind": "number" + } + }, + "data": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMCreateLocationMessageParams": { + "kind": "object", + "fields": { + "descriptionText": { + "required": true, + "schema": { + "kind": "string" + } + }, + "longitude": { + "required": true, + "schema": { + "kind": "number" + } + }, + "latitude": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMMessageEntity": { + "kind": "object", + "fields": { + "type": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "offset": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "length": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "url": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "info": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMTextElem": { + "kind": "object", + "fields": { + "content": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCardElem": { + "kind": "object", + "fields": { + "userID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "nickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "faceURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAtUsersInfoItem": { + "kind": "object", + "fields": { + "atUserID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "groupNickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAtTextElem": { + "kind": "object", + "fields": { + "text": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "atUserList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + }, + "atUsersInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMAtUsersInfoItem" + } + }, + { + "kind": "null" + } + ] + } + }, + "quoteMessage": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItemRef" + }, + { + "kind": "null" + } + ] + } + }, + "isAtSelf": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMNotificationElem": { + "kind": "object", + "fields": { + "detail": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAdvancedTextElem": { + "kind": "object", + "fields": { + "text": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "messageEntityList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMTypingElem": { + "kind": "object", + "fields": { + "msgTips": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMFileElem": { + "kind": "object", + "fields": { + "filePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "uuid": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "sourceUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "fileName": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "fileSize": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMFaceElem": { + "kind": "object", + "fields": { + "index": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "data": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMLocationElem": { + "kind": "object", + "fields": { + "descriptionText": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "longitude": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "latitude": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCustomElem": { + "kind": "object", + "fields": { + "data": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "descriptionText": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "extensionText": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMMergeElem": { + "kind": "object", + "fields": { + "title": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "abstractList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + }, + "multiMessage": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItemRef" + } + }, + { + "kind": "null" + } + ] + } + }, + "messageEntityList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMOfflinePush": { + "kind": "object", + "fields": { + "title": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "desc": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "iOSPushSound": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "iOSBadgeCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMPicture": { + "kind": "object", + "fields": { + "uuid": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "type": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "size": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "width": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "height": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "url": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMPictureElem": { + "kind": "object", + "fields": { + "sourcePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "sourcePicture": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMPicture" + }, + { + "kind": "null" + } + ] + } + }, + "bigPicture": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMPicture" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotPicture": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMPicture" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAttachedGroupHasReadInfo": { + "kind": "object", + "fields": { + "hasReadCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "unreadCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "hasReadUserIDList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + }, + "groupMemberCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUploadProgress": { + "kind": "object", + "fields": { + "total": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "save": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "current": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "uploadID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAttachedInfoElem": { + "kind": "object", + "fields": { + "groupHasReadInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAttachedGroupHasReadInfo" + }, + { + "kind": "null" + } + ] + } + }, + "isPrivateChat": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + }, + "isEncryption": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + }, + "inEncryptStatus": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + }, + "burnDuration": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "hasReadTime": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "messageEntityList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + }, + { + "kind": "null" + } + ] + } + }, + "uploadProgress": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUploadProgress" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMQuoteElem": { + "kind": "object", + "fields": { + "text": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "quoteMessage": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItemRef" + }, + { + "kind": "null" + } + ] + } + }, + "messageEntityList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageEntity" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSoundElem": { + "kind": "object", + "fields": { + "uuid": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "soundPath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "sourceUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "dataSize": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "duration": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMVideoElem": { + "kind": "object", + "fields": { + "videoPath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "videoUUID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "videoUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "videoType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "videoSize": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "duration": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotPath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotUUID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotSize": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotWidth": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "snapshotHeight": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMMessageItemRef": { + "kind": "object", + "fields": { + "clientMsgID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "serverMsgID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sendTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sessionType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + }, + "sendID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "recvID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "msgFrom": { + "required": true, + "schema": { + "kind": "number" + } + }, + "contentType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageType" + } + }, + "senderPlatformID": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMPlatform" + } + }, + "senderNickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "senderFaceUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "groupID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "content": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "seq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isRead": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "status": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageStatus" + } + }, + "attachedInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "localEx": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "textElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMTextElem" + }, + { + "kind": "null" + } + ] + } + }, + "cardElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCardElem" + }, + { + "kind": "null" + } + ] + } + }, + "pictureElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMPictureElem" + }, + { + "kind": "null" + } + ] + } + }, + "soundElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSoundElem" + }, + { + "kind": "null" + } + ] + } + }, + "videoElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMVideoElem" + }, + { + "kind": "null" + } + ] + } + }, + "fileElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFileElem" + }, + { + "kind": "null" + } + ] + } + }, + "faceElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFaceElem" + }, + { + "kind": "null" + } + ] + } + }, + "locationElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMLocationElem" + }, + { + "kind": "null" + } + ] + } + }, + "customElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCustomElem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMMessageItem": { + "kind": "object", + "fields": { + "clientMsgID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "serverMsgID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sendTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sessionType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + }, + "sendID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "recvID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "msgFrom": { + "required": true, + "schema": { + "kind": "number" + } + }, + "contentType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageType" + } + }, + "senderPlatformID": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMPlatform" + } + }, + "senderNickname": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "senderFaceUrl": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "groupID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "content": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "seq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isRead": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "status": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageStatus" + } + }, + "offlinePush": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMOfflinePush" + }, + { + "kind": "null" + } + ] + } + }, + "attachedInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "localEx": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "textElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMTextElem" + }, + { + "kind": "null" + } + ] + } + }, + "cardElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCardElem" + }, + { + "kind": "null" + } + ] + } + }, + "pictureElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMPictureElem" + }, + { + "kind": "null" + } + ] + } + }, + "soundElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSoundElem" + }, + { + "kind": "null" + } + ] + } + }, + "videoElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMVideoElem" + }, + { + "kind": "null" + } + ] + } + }, + "fileElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFileElem" + }, + { + "kind": "null" + } + ] + } + }, + "mergeElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMergeElem" + }, + { + "kind": "null" + } + ] + } + }, + "atTextElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAtTextElem" + }, + { + "kind": "null" + } + ] + } + }, + "faceElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMFaceElem" + }, + { + "kind": "null" + } + ] + } + }, + "locationElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMLocationElem" + }, + { + "kind": "null" + } + ] + } + }, + "customElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMCustomElem" + }, + { + "kind": "null" + } + ] + } + }, + "quoteElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMQuoteElem" + }, + { + "kind": "null" + } + ] + } + }, + "notificationElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMNotificationElem" + }, + { + "kind": "null" + } + ] + } + }, + "advancedTextElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAdvancedTextElem" + }, + { + "kind": "null" + } + ] + } + }, + "typingElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMTypingElem" + }, + { + "kind": "null" + } + ] + } + }, + "attachedInfoElem": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMAttachedInfoElem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMConversationItem": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "conversationType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + }, + "userID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "groupID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "showName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "recvMsgOpt": { + "required": true, + "schema": { + "kind": "number" + } + }, + "unreadCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "latestMsg": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "latestMsgSendTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "draftText": { + "required": true, + "schema": { + "kind": "string" + } + }, + "draftTextTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isPinned": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isPrivateChat": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "burnDuration": { + "required": true, + "schema": { + "kind": "number" + } + }, + "minSeq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "maxSeq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "msgDestructTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "groupAtType": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isMsgDestruct": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "isNotInGroup": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "updateUnreadCountTime": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMConversationListResult": { + "kind": "object", + "fields": { + "conversations": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMConversationItem" + } + } + } + } + }, + "OpenIMUserListResult": { + "kind": "object", + "fields": { + "users": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMUserInfo" + } + } + } + } + }, + "OpenIMUserStatusItem": { + "kind": "object", + "fields": { + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "status": { + "required": true, + "schema": { + "kind": "number" + } + }, + "platformIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "number" + } + } + } + } + }, + "OpenIMUserStatusListResult": { + "kind": "object", + "fields": { + "statuses": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMUserStatusItem" + } + } + } + } + }, + "OpenIMFriendListResult": { + "kind": "object", + "fields": { + "friends": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMFriendUserItem" + } + } + } + } + }, + "OpenIMBlackListResult": { + "kind": "object", + "fields": { + "blackUsers": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMBlackUserItem" + } + } + } + } + }, + "OpenIMGroupListResult": { + "kind": "object", + "fields": { + "groups": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMGroupItem" + } + } + } + } + }, + "OpenIMGroupMemberListResult": { + "kind": "object", + "fields": { + "members": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMGroupMemberItem" + } + } + } + } + }, + "OpenIMFriendApplicationListResult": { + "kind": "object", + "fields": { + "applications": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMFriendApplicationItem" + } + } + } + } + }, + "OpenIMGroupApplicationListResult": { + "kind": "object", + "fields": { + "applications": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMGroupApplicationItem" + } + } + } + } + }, + "OpenIMMessageListResult": { + "kind": "object", + "fields": { + "messages": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + } + }, + "OpenIMUserInfo": { + "kind": "object", + "fields": { + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "attachedInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "globalRecvMsgOpt": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMPublicUserItem": { + "kind": "reference", + "name": "OpenIMUserInfo" + }, + "OpenIMFriendUserItem": { + "kind": "object", + "fields": { + "ownerUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "remark": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "addSource": { + "required": true, + "schema": { + "kind": "number" + } + }, + "operatorUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + }, + "isPinned": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMBlackUserItem": { + "kind": "object", + "fields": { + "ownerUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "addSource": { + "required": true, + "schema": { + "kind": "number" + } + }, + "operatorUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGroupItem": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "notification": { + "required": true, + "schema": { + "kind": "string" + } + }, + "introduction": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ownerUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "memberCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "status": { + "required": true, + "schema": { + "kind": "number" + } + }, + "creatorUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupType": { + "required": true, + "schema": { + "kind": "number" + } + }, + "needVerification": { + "required": true, + "schema": { + "kind": "number" + } + }, + "lookMemberInfo": { + "required": true, + "schema": { + "kind": "number" + } + }, + "applyMemberFriend": { + "required": true, + "schema": { + "kind": "number" + } + }, + "notificationUpdateTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "notificationUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGroupMemberItem": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "roleLevel": { + "required": true, + "schema": { + "kind": "number" + } + }, + "joinTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "joinSource": { + "required": true, + "schema": { + "kind": "number" + } + }, + "operatorUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "muteEndTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "inviterUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMFriendApplicationItem": { + "kind": "object", + "fields": { + "fromUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fromNickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fromFaceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "toUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "toNickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "toFaceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleResult": { + "required": true, + "schema": { + "kind": "number" + } + }, + "reqMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "handlerUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGroupApplicationItem": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "notification": { + "required": true, + "schema": { + "kind": "string" + } + }, + "introduction": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupFaceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "ownerUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "createTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "status": { + "required": true, + "schema": { + "kind": "number" + } + }, + "creatorUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "groupType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "memberCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "nickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userFaceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleResult": { + "required": true, + "schema": { + "kind": "number" + } + }, + "reqMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handledMsg": { + "required": true, + "schema": { + "kind": "string" + } + }, + "reqTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "joinSource": { + "required": true, + "schema": { + "kind": "number" + } + }, + "inviterUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handleUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "handledTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "attachedInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMMessageRevokedItem": { + "kind": "object", + "fields": { + "revokerID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "revokerRole": { + "required": true, + "schema": { + "kind": "number" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "revokerNickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "revokeTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sourceMessageSendTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sourceMessageSendID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sourceMessageSenderNickname": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sessionType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + }, + "seq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "ex": { + "required": true, + "schema": { + "kind": "string" + } + }, + "isAdminRevoke": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMMessageReceiptItem": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "msgIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "readTime": { + "required": true, + "schema": { + "kind": "number" + } + }, + "msgFrom": { + "required": true, + "schema": { + "kind": "number" + } + }, + "contentType": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageType" + }, + { + "kind": "literal", + "value": 0 + } + ] + } + }, + "sessionType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + } + } + }, + "OpenIMMessageReceiptListResult": { + "kind": "object", + "fields": { + "receipts": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageReceiptItem" + } + } + } + } + }, + "OpenIMConversationInputStatusItem": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "platformIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "number" + } + } + } + } + }, + "OpenIMGetOneConversationParams": { + "kind": "object", + "fields": { + "sourceID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sessionType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + } + } + }, + "OpenIMPageParams": { + "kind": "object", + "fields": { + "offset": { + "required": true, + "schema": { + "kind": "number" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMGetGroupMemberListParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "filter": { + "required": true, + "schema": { + "kind": "number" + } + }, + "offset": { + "required": true, + "schema": { + "kind": "number" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMGetAdvancedHistoryMessageListParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "startClientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + }, + "lastMinSeq": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMAdvancedHistoryMessageListResult": { + "kind": "object", + "fields": { + "messageList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + }, + "lastMinSeq": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isEnd": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "errCode": { + "required": true, + "schema": { + "kind": "number" + } + }, + "errMsg": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSearchLocalMessagesParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "keywordList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "keywordListMatchType": { + "required": true, + "schema": { + "kind": "number" + } + }, + "senderUserIDList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "messageTypeList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageType" + } + } + }, + "searchTimePosition": { + "required": true, + "schema": { + "kind": "number" + } + }, + "searchTimePeriod": { + "required": true, + "schema": { + "kind": "number" + } + }, + "pageIndex": { + "required": true, + "schema": { + "kind": "number" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMApplicationListParams": { + "kind": "object", + "fields": { + "offset": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "count": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSearchMessageResultItem": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "conversationType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSessionType" + } + }, + "showName": { + "required": true, + "schema": { + "kind": "string" + } + }, + "faceURL": { + "required": true, + "schema": { + "kind": "string" + } + }, + "latestMsgSendTime": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "messageCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "messageList": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + } + }, + "OpenIMFindMessageResultItem": { + "kind": "reference", + "name": "OpenIMSearchMessageResultItem" + }, + "OpenIMSearchMessageResult": { + "kind": "object", + "fields": { + "totalCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "searchResultItems": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMSearchMessageResultItem" + } + } + } + } + }, + "OpenIMFindMessageResult": { + "kind": "object", + "fields": { + "totalCount": { + "required": true, + "schema": { + "kind": "number" + } + }, + "findResultItems": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMFindMessageResultItem" + } + } + } + } + }, + "OpenIMError": { + "kind": "object", + "fields": { + "errCode": { + "required": true, + "schema": { + "kind": "number" + } + }, + "errMsg": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMInitConfig": { + "kind": "object", + "fields": { + "platformID": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMPlatform" + } + }, + "apiAddr": { + "required": true, + "schema": { + "kind": "string" + } + }, + "wsAddr": { + "required": true, + "schema": { + "kind": "string" + } + }, + "dataDir": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "logFilePath": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "logLevel": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMLogLevel" + } + }, + "isLogStandardOutput": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "systemType": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSDKEventName": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": "onConnecting" + }, + { + "kind": "literal", + "value": "onConnectSuccess" + }, + { + "kind": "literal", + "value": "onConnectFailed" + }, + { + "kind": "literal", + "value": "onKickedOffline" + }, + { + "kind": "literal", + "value": "onUserTokenExpired" + }, + { + "kind": "literal", + "value": "onUserTokenInvalid" + }, + { + "kind": "literal", + "value": "onRecvNewMessage" + }, + { + "kind": "literal", + "value": "onRecvOfflineNewMessage" + }, + { + "kind": "literal", + "value": "onRecvOnlineOnlyMessage" + }, + { + "kind": "literal", + "value": "onMsgDeleted" + }, + { + "kind": "literal", + "value": "onNewRecvMessageRevoked" + }, + { + "kind": "literal", + "value": "onRecvC2CReadReceipt" + }, + { + "kind": "literal", + "value": "onRecvNewMessages" + }, + { + "kind": "literal", + "value": "onRecvOfflineNewMessages" + }, + { + "kind": "literal", + "value": "onConversationChanged" + }, + { + "kind": "literal", + "value": "onConversationUserInputStatusChanged" + }, + { + "kind": "literal", + "value": "onNewConversation" + }, + { + "kind": "literal", + "value": "onSyncServerFailed" + }, + { + "kind": "literal", + "value": "onSyncServerFinish" + }, + { + "kind": "literal", + "value": "onSyncServerProgress" + }, + { + "kind": "literal", + "value": "onSyncServerStart" + }, + { + "kind": "literal", + "value": "onSendMessageProgress" + }, + { + "kind": "literal", + "value": "onUploadFileProgress" + }, + { + "kind": "literal", + "value": "onUploadLogsProgress" + }, + { + "kind": "literal", + "value": "onTotalUnreadMessageCountChanged" + }, + { + "kind": "literal", + "value": "onRecvCustomBusinessMessage" + }, + { + "kind": "literal", + "value": "onBlackAdded" + }, + { + "kind": "literal", + "value": "onBlackDeleted" + }, + { + "kind": "literal", + "value": "onFriendAdded" + }, + { + "kind": "literal", + "value": "onFriendApplicationAccepted" + }, + { + "kind": "literal", + "value": "onFriendApplicationAdded" + }, + { + "kind": "literal", + "value": "onFriendApplicationDeleted" + }, + { + "kind": "literal", + "value": "onFriendApplicationRejected" + }, + { + "kind": "literal", + "value": "onFriendDeleted" + }, + { + "kind": "literal", + "value": "onFriendInfoChanged" + }, + { + "kind": "literal", + "value": "onGroupApplicationAccepted" + }, + { + "kind": "literal", + "value": "onGroupApplicationAdded" + }, + { + "kind": "literal", + "value": "onGroupApplicationDeleted" + }, + { + "kind": "literal", + "value": "onGroupApplicationRejected" + }, + { + "kind": "literal", + "value": "onGroupDismissed" + }, + { + "kind": "literal", + "value": "onGroupInfoChanged" + }, + { + "kind": "literal", + "value": "onGroupMemberAdded" + }, + { + "kind": "literal", + "value": "onGroupMemberDeleted" + }, + { + "kind": "literal", + "value": "onGroupMemberInfoChanged" + }, + { + "kind": "literal", + "value": "onJoinedGroupAdded" + }, + { + "kind": "literal", + "value": "onJoinedGroupDeleted" + }, + { + "kind": "literal", + "value": "onSelfInfoUpdated" + }, + { + "kind": "literal", + "value": "onUserStatusChanged" + }, + { + "kind": "literal", + "value": "onChangedPinnedMsg" + }, + { + "kind": "literal", + "value": "onDeleteUserAllMsgsInConv" + }, + { + "kind": "literal", + "value": "onMessageModified" + }, + { + "kind": "literal", + "value": "onMessageEdited" + }, + { + "kind": "literal", + "value": "onRecvGroupReadReceipt" + }, + { + "kind": "literal", + "value": "onRecvMessageExtensionsAdded" + }, + { + "kind": "literal", + "value": "onRecvMessageExtensionsChanged" + }, + { + "kind": "literal", + "value": "onRecvMessageExtensionsDeleted" + }, + { + "kind": "literal", + "value": "onConversationGroupAdded" + }, + { + "kind": "literal", + "value": "onConversationGroupChanged" + }, + { + "kind": "literal", + "value": "onConversationGroupDeleted" + }, + { + "kind": "literal", + "value": "onConversationGroupMemberAdded" + }, + { + "kind": "literal", + "value": "onConversationGroupMemberDeleted" + }, + { + "kind": "literal", + "value": "onGroupApplicationBadgeCountChanged" + }, + { + "kind": "literal", + "value": "onReceiveNewInvitation" + }, + { + "kind": "literal", + "value": "onInviteeAccepted" + }, + { + "kind": "literal", + "value": "onInviteeAcceptedByOtherDevice" + }, + { + "kind": "literal", + "value": "onInviteeRejected" + }, + { + "kind": "literal", + "value": "onInviteeRejectedByOtherDevice" + }, + { + "kind": "literal", + "value": "onInvitationCancelled" + }, + { + "kind": "literal", + "value": "onInvitationTimeout" + }, + { + "kind": "literal", + "value": "onHangUp" + }, + { + "kind": "literal", + "value": "onRoomParticipantConnected" + }, + { + "kind": "literal", + "value": "onRoomParticipantDisconnected" + }, + { + "kind": "literal", + "value": "onReceiveCustomSignaling" + }, + { + "kind": "literal", + "value": "onReceiveCustomSignal" + }, + { + "kind": "literal", + "value": "onStreamChange" + }, + { + "kind": "literal", + "value": "onMessageKvInfoChanged" + }, + { + "kind": "literal", + "value": "onMigrationStart" + }, + { + "kind": "literal", + "value": "onMigrationProgress" + }, + { + "kind": "literal", + "value": "onMigrationFailed" + }, + { + "kind": "literal", + "value": "onMigrationFinished" + }, + { + "kind": "literal", + "value": "onSDKSessionChanged" + } + ] + }, + "OpenIMSDKEvent": { + "kind": "object", + "fields": { + "eventName": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSDKEventName" + } + }, + "payload": { + "required": true, + "schema": { + "kind": "string" + } + }, + "errCode": { + "required": true, + "schema": { + "kind": "number" + } + }, + "errMsg": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSDKEventSubscription": { + "kind": "object", + "fields": { + "id": { + "required": true, + "schema": { + "kind": "string" + } + }, + "eventName": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSDKEventName" + } + } + } + }, + "OpenIMSDKEventHandlerSubscription": { + "kind": "object", + "fields": { + "id": { + "required": true, + "schema": { + "kind": "string" + } + }, + "eventName": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSDKEventName" + } + }, + "handler": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSDKRawEventHandler" + } + } + } + }, + "OpenIMSDKInstance": { + "kind": "object", + "fields": { + "initSDK": { + "required": true, + "schema": { + "kind": "reference", + "name": "InitSDK" + } + }, + "login": { + "required": true, + "schema": { + "kind": "reference", + "name": "Login" + } + }, + "logout": { + "required": true, + "schema": { + "kind": "reference", + "name": "Logout" + } + }, + "getLoginStatus": { + "required": true, + "schema": { + "kind": "reference", + "name": "GetLoginStatus" + } + }, + "getLoginUserID": { + "required": true, + "schema": { + "kind": "reference", + "name": "GetLoginUserID" + } + }, + "createTextMessage": { + "required": true, + "schema": { + "kind": "reference", + "name": "CreateTextMessage" + } + }, + "sendMessage": { + "required": true, + "schema": { + "kind": "reference", + "name": "SendMessage" + } + }, + "uploadFile": { + "required": true, + "schema": { + "kind": "reference", + "name": "UploadFile" + } + } + } + }, + "OpenIMCreateImageMessageParams": { + "kind": "object", + "fields": { + "sourcePath": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMCancelUploadParams": { + "kind": "object", + "fields": { + "cancelID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSpeechToTextParams": { + "kind": "object", + "fields": { + "filename": { + "required": true, + "schema": { + "kind": "string" + } + }, + "data": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMUpdateTokenParams": { + "kind": "object", + "fields": { + "token": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMTranslateTextParams": { + "kind": "object", + "fields": { + "content": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sourceLanguageCode": { + "required": true, + "schema": { + "kind": "string" + } + }, + "targetLanguageCode": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMTranslateTextResult": { + "kind": "object", + "fields": { + "translatedText": { + "required": true, + "schema": { + "kind": "string" + } + }, + "detectedLanguageCode": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMTranslateMessageParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "sourceLanguageCode": { + "required": true, + "schema": { + "kind": "string" + } + }, + "targetLanguageCode": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSpeechToTextResult": { + "kind": "object", + "fields": { + "text": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSpeechToTextCapabilitiesResult": { + "kind": "object", + "fields": { + "format": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + }, + "sampleRateHz": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "number" + } + }, + { + "kind": "null" + } + ] + } + }, + "maxRecordTimeMs": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "maxFileSize": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "provider": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "requestType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "crossDomain": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUpdateFriendParams": { + "kind": "object", + "fields": { + "userID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "pinned": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMUpdateFriendBoolean" + }, + { + "kind": "null" + } + ] + } + }, + "remark": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMGetInputStatesParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGetInputStatesResult": { + "kind": "object", + "fields": { + "platforms": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMPlatform" + } + } + } + } + }, + "OpenIMSimpleGroupRequest": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "fromUserID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMDeleteGroupRequestsParams": { + "kind": "object", + "fields": { + "groupRequests": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMSimpleGroupRequest" + } + } + } + } + }, + "OpenIMSimpleFriendRequest": { + "kind": "object", + "fields": { + "fromUserID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "toUserID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMDeleteFriendRequestsParams": { + "kind": "object", + "fields": { + "friendRequests": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMSimpleFriendRequest" + } + } + } + } + }, + "OpenIMFullSyncResult": { + "kind": "object", + "fields": { + "IsFullSync": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCheckGroupMemberFullSyncParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGetBlacksResult": { + "kind": "object", + "fields": { + "blacks": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMBlackUserItem" + } + } + } + } + }, + "OpenIMAtAllTagResult": { + "kind": "object", + "fields": { + "tag": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSendGroupMessageReadReceiptParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMGetGroupMessageReaderListParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "filter": { + "required": true, + "schema": { + "kind": "number" + } + }, + "offset": { + "required": true, + "schema": { + "kind": "number" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMGetGroupMessageReaderListResult": { + "kind": "object", + "fields": { + "readers": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMGroupMemberItem" + } + } + } + } + }, + "OpenIMFetchSurroundingMessagesParams": { + "kind": "object", + "fields": { + "startMessage": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + }, + "viewType": { + "required": true, + "schema": { + "kind": "number" + } + }, + "before": { + "required": true, + "schema": { + "kind": "number" + } + }, + "after": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMFetchSurroundingMessagesResult": { + "kind": "object", + "fields": { + "messages": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + } + }, + "OpenIMModifyMessageParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "message": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + }, + "OpenIMModifyMessageResult": { + "kind": "object", + "fields": { + "message": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMMessageItem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSetConversationPinnedMsgParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "pinned": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMGetConversationPinnedMsgParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGetConversationPinnedMsgResult": { + "kind": "object", + "fields": { + "message": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + } + }, + "OpenIMSetMessageLocalContentParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "message": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMMessageItem" + } + } + } + }, + "OpenIMResetConversationUnreadParams": { + "kind": "object", + "fields": { + "conversationIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "num": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMGetHistoryMessageListParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "startClientMsgID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "count": { + "required": true, + "schema": { + "kind": "number" + } + }, + "isReverse": { + "required": true, + "schema": { + "kind": "boolean" + } + }, + "viewType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "lastMinSeq": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMDeleteMessagesParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "clientMsgIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "IsSync": { + "required": true, + "schema": { + "kind": "boolean" + } + } + } + }, + "OpenIMDeleteUserAllMessagesInConvParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMCreateMarkdownMessageParams": { + "kind": "object", + "fields": { + "content": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMTypingStatusUpdateParams": { + "kind": "object", + "fields": { + "recvID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "msgTip": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMConversationGroupType": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + } + ] + }, + "OpenIMConversationGroupQueryType": { + "kind": "union", + "options": [ + { + "kind": "literal", + "value": 0 + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "literal", + "value": 2 + } + ] + }, + "OpenIMConversationGroupItem": { + "kind": "object", + "fields": { + "conversationGroupID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "name": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "order": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "conversationGroupType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "hidden": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + }, + "unreadCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "conversationIDs": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateConversationGroupParams": { + "kind": "object", + "fields": { + "name": { + "required": true, + "schema": { + "kind": "string" + } + }, + "order": { + "required": true, + "schema": { + "kind": "number" + } + }, + "conversationGroupType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMConversationGroupType" + } + }, + "conversationID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMCreateConversationGroupResult": { + "kind": "object", + "fields": { + "conversationGroup": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationGroupItem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUpdateConversationGroupParams": { + "kind": "object", + "fields": { + "conversationGroupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "name": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "hidden": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMUpdateConversationGroupResult": { + "kind": "object", + "fields": { + "conversationGroup": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationGroupItem" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMDeleteConversationGroupParams": { + "kind": "object", + "fields": { + "conversationGroupID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGetConversationGroupsParams": { + "kind": "object", + "fields": { + "conversationGroupType": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMConversationGroupQueryType" + } + } + } + }, + "OpenIMGetConversationGroupsResult": { + "kind": "object", + "fields": { + "conversationGroups": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMConversationGroupItem" + } + } + } + } + }, + "OpenIMConversationGroupOrder": { + "kind": "object", + "fields": { + "conversationGroupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "order": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMSetConversationGroupOrderParams": { + "kind": "object", + "fields": { + "conversationGroupOrders": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMConversationGroupOrder" + } + } + } + } + }, + "OpenIMConversationGroupMembershipParams": { + "kind": "object", + "fields": { + "conversationIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + }, + "conversationGroupIDs": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "string" + } + } + } + } + }, + "OpenIMGetConversationGroupByConversationIDParams": { + "kind": "object", + "fields": { + "conversationID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMGetConversationGroupByConversationIDResult": { + "kind": "object", + "fields": { + "conversationGroups": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMConversationGroupItem" + } + } + } + } + }, + "OpenIMRequestPagination": { + "kind": "object", + "fields": { + "pageNumber": { + "required": true, + "schema": { + "kind": "number" + } + }, + "showNumber": { + "required": true, + "schema": { + "kind": "number" + } + } + } + }, + "OpenIMGetConversationGroupInfoWithConversationsParams": { + "kind": "object", + "fields": { + "conversationGroupID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "pagination": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMRequestPagination" + } + } + } + }, + "OpenIMGetConversationGroupInfoWithConversationsResult": { + "kind": "object", + "fields": { + "conversationGroup": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMConversationGroupItem" + }, + { + "kind": "null" + } + ] + } + }, + "ConversationTotal": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "conversations": { + "required": true, + "schema": { + "kind": "array", + "items": { + "kind": "reference", + "name": "OpenIMConversationItem" + } + } + } + } + }, + "OpenIMSignalingParticipantMetaData": { + "kind": "object", + "fields": { + "user": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMUserInfo" + } + } + } + }, + "OpenIMSignalingOfflinePushInfo": { + "kind": "object", + "fields": { + "title": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "desc": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "ex": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "iOSPushSound": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "iOSBadgeCount": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "boolean" + }, + { + "kind": "null" + } + ] + } + }, + "SignalingInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingInvitationInfo": { + "kind": "object", + "fields": { + "inviterUserID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "inviteeUserIDList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + }, + "customData": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "groupID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "roomID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "timeout": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "mediaType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "platformID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "sessionType": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "initiateTime": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "number" + }, + { + "kind": "null" + } + ] + } + }, + "busyLineUserIDList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingInviteParams": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + } + }, + "offlinePushInfo": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingOfflinePushInfo" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingInviteInGroupParams": { + "kind": "reference", + "name": "OpenIMSignalingInviteParams" + }, + "OpenIMSignalingInviteResult": { + "kind": "object", + "fields": { + "invitation": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + }, + { + "kind": "null" + } + ] + } + }, + "token": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "roomID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "liveURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "busyLineUserIDList": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "array", + "items": { + "kind": "string" + } + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingAcceptParams": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + } + } + } + }, + "OpenIMSignalingAcceptResult": { + "kind": "object", + "fields": { + "invitation": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + }, + { + "kind": "null" + } + ] + } + }, + "token": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "roomID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "liveURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingRejectParams": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + } + } + } + }, + "OpenIMSignalingCancelParams": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + } + } + } + }, + "OpenIMSignalingHungUpParams": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + } + } + } + }, + "OpenIMSignalingGetTokenByRoomIDParams": { + "kind": "object", + "fields": { + "roomID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSignalingGetTokenByRoomIDResult": { + "kind": "object", + "fields": { + "token": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "liveURL": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingGetRoomByGroupIDParams": { + "kind": "object", + "fields": { + "groupID": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSignalingGetRoomByGroupIDResult": { + "kind": "object", + "fields": { + "roomID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "invitation": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingGetInvitationInfoStartAppParams": { + "kind": "object", + "fields": { + "userID": { + "required": false, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingGetInvitationInfoStartAppResult": { + "kind": "object", + "fields": { + "invitation": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "reference", + "name": "OpenIMSignalingInvitationInfo" + }, + { + "kind": "null" + } + ] + } + } + } + }, + "OpenIMSignalingSendCustomSignalingParams": { + "kind": "object", + "fields": { + "roomID": { + "required": true, + "schema": { + "kind": "string" + } + }, + "customInfo": { + "required": true, + "schema": { + "kind": "string" + } + } + } + }, + "OpenIMSDKSessionSnapshot": { + "kind": "object", + "fields": { + "loginStatus": { + "required": true, + "schema": { + "kind": "reference", + "name": "OpenIMLoginStatus" + } + }, + "userID": { + "required": true, + "schema": { + "kind": "union", + "options": [ + { + "kind": "string" + }, + { + "kind": "null" + } + ] + } + }, + "sdkSessionEpoch": { + "required": true, + "schema": { + "kind": "number" + } + }, + "sdkVersion": { + "required": true, + "schema": { + "kind": "string" + } + } + } + } + }, + "retiredCallables": [ + { + "id": 200083, + "name": "getArchivedConversationList" + } + ] +} diff --git a/data/structure/uniapp-sidebar.json b/data/structure/uniapp-sidebar.json new file mode 100644 index 0000000000..b5c09d61ff --- /dev/null +++ b/data/structure/uniapp-sidebar.json @@ -0,0 +1,827 @@ +{ + "sidebarExpansion": "active-path", + "nodes": [ + { + "path": "/sdk/uniapp/overview", + "navigationTitle": "Overview" + }, + { + "id": "getting-started", + "title": "Getting started", + "children": [ + "/sdk/uniapp/getting-started/before-you-start", + "/sdk/uniapp/getting-started/environment-specific-implementation", + "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "/sdk/uniapp/getting-started/send-first-message", + { + "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "navigationTitle": "Install, initialize, and inspect the SDK" + }, + { + "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "navigationTitle": "Handle App lifecycle and device state" + }, + { + "path": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "navigationTitle": "Update tokens and observe SDK sessions" + } + ] + }, + { + "id": "user", + "title": "User", + "children": [ + "/sdk/uniapp/user/overview-user", + { + "id": "user/user-profile", + "title": "User profile", + "children": [ + { + "path": "/sdk/uniapp/user/profile/get-users-info", + "navigationTitle": "Get user profiles" + }, + { + "path": "/sdk/uniapp/user/profile/get-self-user-info", + "navigationTitle": "Get your profile" + }, + { + "path": "/sdk/uniapp/user/profile/set-self-info", + "navigationTitle": "Update your profile" + } + ] + }, + { + "path": "/sdk/uniapp/user/profile/set-global-message-reception", + "navigationTitle": "Set global message reception" + }, + { + "path": "/sdk/uniapp/user/profile/set-friend-add-permission", + "navigationTitle": "Set friend request permissions" + }, + { + "id": "user/online-status", + "title": "Online status", + "children": [ + { + "path": "/sdk/uniapp/user/online-status/subscribe-users-status", + "navigationTitle": "Subscribe to online status" + }, + { + "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "navigationTitle": "Get subscribed user status" + }, + { + "path": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "navigationTitle": "Unsubscribe from online status" + } + ] + } + ] + }, + { + "id": "relationships", + "title": "Relationships", + "children": [ + { + "id": "user/friends", + "title": "Friends", + "children": [ + { + "path": "/sdk/uniapp/user/friends/get-friend-list-page", + "navigationTitle": "Get the friend list" + }, + { + "path": "/sdk/uniapp/user/friends/search-friends", + "navigationTitle": "Search friends" + }, + { + "path": "/sdk/uniapp/user/friends/get-specified-friends-info", + "navigationTitle": "Get friend profiles" + }, + { + "path": "/sdk/uniapp/user/friends/check-friend", + "navigationTitle": "Check friendship status" + }, + { + "path": "/sdk/uniapp/user/friends/update-friends", + "navigationTitle": "Update friend information" + }, + { + "path": "/sdk/uniapp/user/friends/delete-friend", + "navigationTitle": "Delete a friend" + }, + { + "id": "user/friend-applications", + "title": "Friend applications", + "children": [ + { + "path": "/sdk/uniapp/user/friend-applications/add-friend", + "navigationTitle": "Send a friend application" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "navigationTitle": "Get received friend applications" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "navigationTitle": "Get sent friend applications" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "navigationTitle": "Get pending application count" + }, + { + "path": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "navigationTitle": "Accept a friend application" + }, + { + "path": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "navigationTitle": "Reject a friend application" + }, + { + "path": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "navigationTitle": "Delete friend applications" + } + ] + } + ] + }, + { + "id": "user/blacklist", + "title": "Blacklist", + "children": [ + { + "path": "/sdk/uniapp/user/blacklist/get-black-list", + "navigationTitle": "Get the blacklist" + }, + { + "path": "/sdk/uniapp/user/blacklist/add-black", + "navigationTitle": "Add a user to the blacklist" + }, + { + "path": "/sdk/uniapp/user/blacklist/remove-black", + "navigationTitle": "Remove a user from the blacklist" + } + ] + } + ] + }, + { + "id": "conversation", + "title": "Conversation", + "children": [ + "/sdk/uniapp/conversation/overview-conversation", + { + "id": "conversation/retrieving-conversations", + "title": "Retrieving conversations", + "children": [ + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "navigationTitle": "Open a conversation" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "navigationTitle": "Resolve a conversation ID" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "navigationTitle": "Get conversations by ID" + }, + "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "navigationTitle": "Search conversations" + } + ] + }, + { + "id": "conversation/conversation-list-and-drafts", + "title": "Conversation organization", + "children": [ + { + "path": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "navigationTitle": "Pin or unpin a conversation" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "navigationTitle": "Mark or unmark a conversation" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "navigationTitle": "Set a conversation remark" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "navigationTitle": "Set conversation extra data" + }, + "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft" + ] + }, + { + "id": "conversation/message-reception-and-reminders", + "title": "Unread status and notifications", + "children": [ + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "navigationTitle": "Set conversation message reception" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "navigationTitle": "Reset group mention status" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "navigationTitle": "Mark a conversation as read" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "navigationTitle": "Mark all conversations as read" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "navigationTitle": "Track the total unread count" + } + ] + }, + { + "id": "conversation/message-retention-and-privacy", + "title": "Message retention and privacy", + "children": [ + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "navigationTitle": "Enable or disable burn after reading" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "navigationTitle": "Set the burn duration" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "navigationTitle": "Schedule server message deletion" + } + ] + }, + { + "id": "conversation/hiding-and-deleting-conversations", + "title": "Hiding and deleting conversations", + "children": [ + "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + { + "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "navigationTitle": "Hide all conversations" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "navigationTitle": "Delete a conversation" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "navigationTitle": "Delete a conversation and its messages" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "navigationTitle": "Clear messages in a conversation" + } + ] + }, + { + "id": "conversation/conversation-groups", + "title": "Conversation groups", + "children": [ + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "navigationTitle": "Conversation group overview" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "navigationTitle": "Create a conversation group" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "navigationTitle": "Get conversation groups" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "navigationTitle": "Get conversations in a group" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "navigationTitle": "Get groups for a conversation" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "navigationTitle": "Update a conversation group" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "navigationTitle": "Reorder conversation groups" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "navigationTitle": "Add conversations to groups" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "navigationTitle": "Remove conversations from groups" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "navigationTitle": "Delete a conversation group" + } + ] + } + ] + }, + { + "id": "group", + "title": "Group", + "children": [ + { + "path": "/sdk/uniapp/group/overview-group", + "navigationTitle": "Group overview" + }, + { + "id": "group/profile-and-settings", + "title": "Group profile and settings", + "children": [ + { + "path": "/sdk/uniapp/group/create-group", + "navigationTitle": "Create a group" + }, + { + "path": "/sdk/uniapp/group/update-group-profile", + "navigationTitle": "Update group profile" + }, + { + "path": "/sdk/uniapp/group/set-group-announcement", + "navigationTitle": "Publish a group announcement" + }, + { + "path": "/sdk/uniapp/group/set-group-extension", + "navigationTitle": "Set group extra data" + } + ] + }, + { + "id": "group/permissions", + "title": "Group permissions", + "children": [ + { + "path": "/sdk/uniapp/group/set-group-join-verification", + "navigationTitle": "Set group join verification" + }, + { + "path": "/sdk/uniapp/group/set-group-member-profile-access", + "navigationTitle": "Set member profile access" + }, + { + "path": "/sdk/uniapp/group/set-group-member-friend-permission", + "navigationTitle": "Set member friend request permission" + }, + { + "path": "/sdk/uniapp/group/change-group-mute", + "navigationTitle": "Change group mute status" + } + ] + }, + { + "id": "group/joining-and-leaving", + "title": "Joining and leaving groups", + "children": [ + { + "path": "/sdk/uniapp/group/join-group", + "navigationTitle": "Apply to join a group" + }, + { + "path": "/sdk/uniapp/group/quit-group", + "navigationTitle": "Leave a group" + }, + { + "path": "/sdk/uniapp/group/dismiss-group", + "navigationTitle": "Dismiss a group" + } + ] + }, + { + "id": "group/retrieving-groups", + "title": "Retrieving groups", + "children": [ + { + "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "navigationTitle": "Get group information" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "navigationTitle": "Get joined groups" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "navigationTitle": "Get joined groups by page" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "navigationTitle": "Check group membership" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/search-groups", + "navigationTitle": "Search groups" + } + ] + }, + { + "id": "group/group-applications", + "title": "Group applications", + "children": [ + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "navigationTitle": "Get received group applications" + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "navigationTitle": "Get sent group applications" + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "navigationTitle": "Get pending group application count" + }, + { + "path": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "navigationTitle": "Observe group application badge count" + }, + { + "path": "/sdk/uniapp/group/group-applications/accept-group-application", + "navigationTitle": "Accept a group application" + }, + { + "path": "/sdk/uniapp/group/group-applications/refuse-group-application", + "navigationTitle": "Reject a group application" + }, + { + "path": "/sdk/uniapp/group/group-applications/delete-group-requests", + "navigationTitle": "Delete group applications" + } + ] + }, + { + "id": "group/retrieving-group-members", + "title": "Retrieving group members", + "children": [ + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "navigationTitle": "Get group members" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "navigationTitle": "Get group member profiles" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "navigationTitle": "Check users in a group" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "navigationTitle": "Search group members" + } + ] + }, + { + "id": "group/managing-group-members", + "title": "Managing group members", + "children": [ + { + "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "navigationTitle": "Invite users to a group" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "navigationTitle": "Remove group members" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "navigationTitle": "Update a group nickname" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "navigationTitle": "Manage group administrators" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "navigationTitle": "Update a group member avatar" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "navigationTitle": "Set group member extra data" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "navigationTitle": "Transfer group ownership" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "navigationTitle": "Mute or unmute a group member" + } + ] + }, + { + "path": "/sdk/uniapp/group/check-full-sync-state", + "navigationTitle": "Check group full-sync state" + } + ] + }, + { + "id": "message", + "title": "Message", + "children": [ + "/sdk/uniapp/message/overview-message", + { + "id": "message/creating-messages", + "title": "Creating messages", + "children": [ + { + "path": "/sdk/uniapp/message/creating-messages/create-text-message", + "navigationTitle": "Create a text message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "navigationTitle": "Create a mention message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-custom-message", + "navigationTitle": "Create a custom message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "navigationTitle": "Create an image message from a file" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "navigationTitle": "Create an image message from a URL" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "navigationTitle": "Create an audio message from a file" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "navigationTitle": "Create an audio message from a URL" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "navigationTitle": "Create a video message from a file" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "navigationTitle": "Create a video message from a URL" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "navigationTitle": "Create a file message from a file" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "navigationTitle": "Create a file message from a URL" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-card-message", + "navigationTitle": "Create a contact card message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-location-message", + "navigationTitle": "Create a location message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-face-message", + "navigationTitle": "Create an emoji message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-quote-message", + "navigationTitle": "Create a reply message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "navigationTitle": "Create a Markdown message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-forward-message", + "navigationTitle": "Create a forwarded message" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-merger-message", + "navigationTitle": "Create a merged message" + } + ] + }, + { + "id": "message/sending-messages", + "title": "Sending messages", + "children": [ + { + "path": "/sdk/uniapp/message/sending-messages/send-message", + "navigationTitle": "Send a message" + }, + { + "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "navigationTitle": "Send a message without OSS" + } + ] + }, + "/sdk/uniapp/message/receiving-messages/receive-messages", + { + "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "navigationTitle": "Receive custom business messages" + }, + { + "id": "message/retrieving-messages", + "title": "Retrieving messages", + "children": [ + { + "path": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "navigationTitle": "Load older messages" + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "navigationTitle": "Find messages by ID" + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "navigationTitle": "Load message context" + }, + "/sdk/uniapp/message/searching-messages/search-messages" + ] + }, + { + "id": "message/composing-messages", + "title": "Composing messages", + "children": [ + { + "path": "/sdk/uniapp/message/composing-messages/update-typing-status", + "navigationTitle": "Update typing status" + }, + { + "path": "/sdk/uniapp/message/composing-messages/get-typing-status", + "navigationTitle": "Get typing status" + }, + { + "path": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "navigationTitle": "Check speech recognition support" + }, + { + "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "navigationTitle": "Transcribe an audio file" + }, + { + "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "navigationTitle": "Save a local transcript" + }, + { + "path": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "navigationTitle": "Translate text and messages" + } + ] + }, + { + "id": "message/managing-messages", + "title": "Managing messages", + "children": [ + { + "path": "/sdk/uniapp/message/managing-messages/delete-local-message", + "navigationTitle": "Delete a local message" + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "navigationTitle": "Delete saved messages" + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "navigationTitle": "Delete messages from a user" + }, + "/sdk/uniapp/message/managing-messages/revoke-a-message", + "/sdk/uniapp/message/managing-messages/modify-a-message", + { + "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "navigationTitle": "View pinned messages" + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "navigationTitle": "Pin or unpin a message" + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "navigationTitle": "Insert a local direct message" + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "navigationTitle": "Insert a local group message" + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "navigationTitle": "Clear all local messages" + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "navigationTitle": "Clear all saved messages" + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "navigationTitle": "Set local message extensions" + } + ] + }, + { + "id": "message/group-message-read-status", + "title": "Group message read status", + "children": [ + { + "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "navigationTitle": "Send group read receipts" + }, + { + "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "navigationTitle": "View group message readers" + } + ] + } + ] + }, + { + "path": "/sdk/uniapp/file-uploads/upload-file", + "navigationTitle": "Upload a file" + }, + { + "id": "calling", + "title": "Calling", + "children": [ + "/sdk/uniapp/calling/overview-calling", + { + "id": "calling/managing-calls", + "title": "Managing calls", + "children": [ + { + "path": "/sdk/uniapp/calling/managing-calls/start-single-call", + "navigationTitle": "Start a one-to-one call" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/start-group-call", + "navigationTitle": "Start a group call" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/accept-call", + "navigationTitle": "Accept a call" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/reject-call", + "navigationTitle": "Reject a call" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/cancel-call", + "navigationTitle": "Cancel a call invitation" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "navigationTitle": "Hang up a call" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "navigationTitle": "Handle call events" + } + ] + }, + { + "id": "calling/retrieving-call-information", + "title": "Retrieving call information", + "children": [ + { + "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "navigationTitle": "Restore a pending invitation" + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "navigationTitle": "Get a group call room" + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "navigationTitle": "Get room credentials" + } + ] + }, + "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal" + ] + }, + { + "id": "events", + "title": "Events", + "children": [ + { + "path": "/sdk/uniapp/events/overview-events", + "navigationTitle": "Event overview" + }, + { + "path": "/sdk/uniapp/events/handle-data-migration-events", + "navigationTitle": "Handle data migration events" + } + ] + }, + "/sdk/uniapp/logger" + ], + "platform": "uniapp" +} diff --git a/data/structure/uniapp-type-ownership.json b/data/structure/uniapp-type-ownership.json new file mode 100644 index 0000000000..cda74104f0 --- /dev/null +++ b/data/structure/uniapp-type-ownership.json @@ -0,0 +1,3302 @@ +{ + "schemaVersion": 1, + "manifestSha256": "37b21a68b6dd008e73d4ee4e23d0d1e0bd25f3a06f8f629ddba72fc91b647b54", + "types": [ + { + "id": 1001, + "name": "OpenIMMessageStatus", + "declaration": "export type OpenIMMessageStatus = 0 | 1 | 2 | 3 | 4 | 5", + "signatureHash": "b2f9f6298304e038fd8b54d90b728663fe36c3f9a9aa258f1fcfdd87644a5048", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1002, + "name": "OpenIMPlatform", + "declaration": "export type OpenIMPlatform = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11", + "signatureHash": "c7ecca9d16336958a9f6cf5d43d33585b9b70f8884255a1b7ee5cfa99511a700", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1003, + "name": "OpenIMLogLevel", + "declaration": "export type OpenIMLogLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6", + "signatureHash": "8f418680b6af67c6d8c0221fc8d0d18d3f058b45d7ada4eabf8a200cfb714425", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1004, + "name": "OpenIMMessageType", + "declaration": "export type OpenIMMessageType =\n 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 |\n 111 | 113 | 114 | 115 | 117 | 118 | 119 | 120 | 121 | 122 |\n 143 | 200 | 201 | 202 | 203 | 1201 | 1202 | 1203 | 1204 |\n 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1300 | 1303 |\n 1304 | 1305 | 1306 | 1307 | 1308 | 1400 | 1501 | 1502 |\n 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 |\n 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 |\n 1519 | 1520 | 1651 | 1652 | 1701 | 1702 | 1703 | 1704 |\n 2001 | 2101 | 2102 | 2103 | 2150 | 2200 | 2210 | 2300 |\n 2400 | 2401 | 2500", + "signatureHash": "a896503a3dacf7674d5f9d9ceb3e70390cfc0551a99654263940bd1a21873807", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1005, + "name": "OpenIMSessionType", + "declaration": "export type OpenIMSessionType = 0 | 1 | 2 | 3 | 4", + "signatureHash": "3be98e61dd3e572f04aed92c518998a285b66af8308b999fc8f475d9a63d880c", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1006, + "name": "OpenIMLoginStatus", + "declaration": "export type OpenIMLoginStatus = 1 | 2 | 3", + "signatureHash": "64720e63372998e9bf1fd37bbe417e169a94c7a7207a92ce16f0df133acf30dc", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1007, + "name": "OpenIMSendMessageOptions", + "declaration": "export type OpenIMSendMessageOptions = {\n operationID ?: string | null\n message : OpenIMMessageItem\n recvID : string\n groupID : string\n offlinePushInfo ?: OpenIMOfflinePush | null\n isOnlineOnly ?: boolean | null\n}", + "signatureHash": "eac3f9993534e25873c5e326527e4f4a1ae84186d2fd74527af4d32b5952bdc2", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1008, + "name": "OpenIMUploadFileParams", + "declaration": "export type OpenIMUploadFileParams = {\n filepath : string\n name : string\n contentType : string\n uuid : string\n cancelID ?: string | null\n cause ?: string | null\n}", + "signatureHash": "84f7a2754e348014514f24217ff84759ee2c955d7e7d97ce990528771ae9b677", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1009, + "name": "OpenIMCreateSoundMessageParams", + "declaration": "export type OpenIMCreateSoundMessageParams = {\n soundPath : string\n duration : number\n}", + "signatureHash": "1ea28b2936efc33dfdbdbdbb9897f5d88efda5e8e04d71a6bd49bf5c049017ff", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1010, + "name": "OpenIMCreateVideoMessageParams", + "declaration": "export type OpenIMCreateVideoMessageParams = {\n videoPath : string\n videoType : string\n duration : number\n snapshotPath : string\n videoSourcePath ?: string | null\n snapshotSourcePath ?: string | null\n}", + "signatureHash": "751521ec6af7db95420faf899fbc8a6339c609596f349240c701259b6fb2f8d0", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1011, + "name": "OpenIMCreateFileMessageParams", + "declaration": "export type OpenIMCreateFileMessageParams = {\n filePath : string\n fileName : string\n fileSourcePath ?: string | null\n}", + "signatureHash": "56d15e22c2280cbfa593874d3bcbb8eb47af794592974d23a60666f498a94606", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1012, + "name": "OpenIMUploadFileResult", + "declaration": "export type OpenIMUploadFileResult = {\n url ?: string | null\n uri ?: string | null\n uuid ?: string | null\n size ?: number | null\n typ ?: number | null\n mediaID ?: string | null\n}", + "signatureHash": "219e6a0fb0566ea50ae525a28cf6e11336b700358aed3b587c483cbcd93af23e", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1013, + "name": "OpenIMUpdateFcmTokenParams", + "declaration": "export type OpenIMUpdateFcmTokenParams = {\n fcmToken : string\n expireTime : number\n}", + "signatureHash": "1857fade55acc23759b0efb9fb2178a606c2323615eeb7739352fc7632c2b449", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1014, + "name": "OpenIMUploadLogsParams", + "declaration": "export type OpenIMUploadLogsParams = {\n line : number\n ex : string\n}", + "signatureHash": "9114ee1d599165b3d41a2add587b07f71622c5c85e09629cdbf5bf930fe2578b", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1015, + "name": "OpenIMUploadFileProgressEvent", + "declaration": "export type OpenIMUploadFileProgressEvent = {\n progress : number\n}", + "signatureHash": "dfa7bf7e3fba9d430783547ec82ee7f59152712b7517bbc2696ae4c209ecf4c9", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1016, + "name": "OpenIMUploadLogsProgressEvent", + "declaration": "export type OpenIMUploadLogsProgressEvent = {\n progress : number\n}", + "signatureHash": "8c5ef7c1358d92260f092f6ed4ff2b809d11059568c819c3656ce91336513c69", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1017, + "name": "OpenIMSendMessageProgressEvent", + "declaration": "export type OpenIMSendMessageProgressEvent = {\n clientMsgID : string\n progress : number\n}", + "signatureHash": "54f0625244e81275e8a24272a0fac424ecac74448eaed729455eacfad5357abc", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1018, + "name": "OpenIMMessageKeyParams", + "declaration": "export type OpenIMMessageKeyParams = {\n conversationID : string\n clientMsgID : string\n}", + "signatureHash": "a4b08926a883fa47f808c5871818ea398db243fd9e29c36322edab8257b325e4", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1019, + "name": "OpenIMSetMessageLocalExParams", + "declaration": "export type OpenIMSetMessageLocalExParams = {\n conversationID : string\n clientMsgID : string\n localEx : string\n}", + "signatureHash": "5f827fd476e965160edb48de70da0bf7041fa6819a06f478c88da01acbe7323a", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1020, + "name": "OpenIMSetConversationBoolean", + "declaration": "export type OpenIMSetConversationBoolean = true | false", + "signatureHash": "9789e69ec980a591ffbc69d7e212af26c4096dffc73d0466144326b36202dde4", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1021, + "name": "OpenIMSetSelfInfoRecvMsgOpt", + "declaration": "export type OpenIMSetSelfInfoRecvMsgOpt = 0 | 1 | 2", + "signatureHash": "6af170121ec89812d978317f6308580bf371f923eefa0f5faf556da8aa8533fb", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1022, + "name": "OpenIMUpdateFriendBoolean", + "declaration": "export type OpenIMUpdateFriendBoolean = true | false", + "signatureHash": "6d90068c2baca1528f40ceeea5f210c04502688bfb31a09364cc6cd730bc109d", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1023, + "name": "OpenIMGroupNeedVerification", + "declaration": "export type OpenIMGroupNeedVerification = 0 | 1 | 2", + "signatureHash": "d917f362aa627f1c48128ac20cea7f394ff9ff5cd3e8ff285cffa55cd485bb0b", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1024, + "name": "OpenIMGroupOption", + "declaration": "export type OpenIMGroupOption = 0 | 1", + "signatureHash": "5cfc8db4d763fb4968c159241605ccc795eba8ccbe1b60630692b83389e350f8", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1025, + "name": "OpenIMGroupDisplayIsRead", + "declaration": "export type OpenIMGroupDisplayIsRead = true | false", + "signatureHash": "9fb3166f1208f9598d34f4a95da376a5e7cacf11d7740588262b702646daaa34", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1026, + "name": "OpenIMGroupMemberRoleLevel", + "declaration": "export type OpenIMGroupMemberRoleLevel = 20 | 60 | 100", + "signatureHash": "6dfeb17bdc44ec09d528b134e753009b308f897302792ff60be0dbc2e535d475", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1027, + "name": "OpenIMSetConversationParams", + "declaration": "export type OpenIMSetConversationParams = {\n conversationID : string\n recvMsgOpt ?: number | null\n isPinned ?: OpenIMSetConversationBoolean | null\n isPrivateChat ?: OpenIMSetConversationBoolean | null\n burnDuration ?: number | null\n groupAtType ?: number | null\n ex ?: string | null\n}", + "signatureHash": "be0ad0433ae82d7088f8330cb25a8c18a36827d55355d5f776be36635ede1506", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1028, + "name": "OpenIMSetSelfInfoParams", + "declaration": "export type OpenIMSetSelfInfoParams = {\n nickname ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n globalRecvMsgOpt ?: OpenIMSetSelfInfoRecvMsgOpt | null\n}", + "signatureHash": "4923c4d16dcc83f754cb8bf299fe9f91b21f9771d071c0564d3a276bec48e34c", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1029, + "name": "OpenIMUpdateFriendsParams", + "declaration": "export type OpenIMUpdateFriendsParams = {\n friendUserIDs : Array\n isPinned ?: OpenIMUpdateFriendBoolean | null\n remark ?: string | null\n ex ?: string | null\n}", + "signatureHash": "3083b26e53a16884f99b4784e2cd30f4aaa2b4c76676f57499e47256abfa5cfc", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1030, + "name": "OpenIMCheckFriendResultItem", + "declaration": "export type OpenIMCheckFriendResultItem = {\n userID : string\n result : number\n}", + "signatureHash": "e50bf85d703cdd288d84161a79082ca94e204929fd3a30720b0a7fe820f3ce37", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1031, + "name": "OpenIMCheckFriendResult", + "declaration": "export type OpenIMCheckFriendResult = {\n result : Array\n}", + "signatureHash": "9fb50399497985a1dda92c6c2e00d1f986cf72192fcea3f1d8ba4bcaf247c951", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1032, + "name": "OpenIMInsertSingleMessageParams", + "declaration": "export type OpenIMInsertSingleMessageParams = {\n message : OpenIMMessageItem\n recvID : string\n sendID : string\n}", + "signatureHash": "d4501725cd0b5d85e03dc9496e70d48568294b0e99385fc054274302d1e1db34", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1033, + "name": "OpenIMInsertGroupMessageParams", + "declaration": "export type OpenIMInsertGroupMessageParams = {\n message : OpenIMMessageItem\n groupID : string\n sendID : string\n}", + "signatureHash": "1f8d36212c539d38926b6097d1883148dfe567a3ba740544dd6f9f9c3ec523ce", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1034, + "name": "OpenIMInputStateParams", + "declaration": "export type OpenIMInputStateParams = {\n conversationID : string\n userID ?: string | null\n focus : boolean\n}", + "signatureHash": "87257e63994511261c554c08716a18ae95cdddd77052833d79298ea99b0a5b20", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1035, + "name": "OpenIMSetConversationDraftParams", + "declaration": "export type OpenIMSetConversationDraftParams = {\n conversationID : string\n draftText : string\n}", + "signatureHash": "f2fb1522043f4c8ef413d03f484a205640c3da7a42150089cb223a6c5f6bda04", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1036, + "name": "OpenIMAddFriendParams", + "declaration": "export type OpenIMAddFriendParams = {\n toUserID : string\n reqMsg : string\n ex ?: string | null\n}", + "signatureHash": "a16116e0fbfedeada13e8398a485423ce91bef47eb67aa58f664df0ebafda6ef", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1037, + "name": "OpenIMSearchFriendsParams", + "declaration": "export type OpenIMSearchFriendsParams = {\n keywordList : Array\n isSearchUserID : boolean\n isSearchNickname : boolean\n isSearchRemark : boolean\n}", + "signatureHash": "588996d616658863839c01da93dfd76a1758ee19e10984ae3f6c2ec7c1f8b6af", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1038, + "name": "OpenIMGetSpecifiedFriendsInfoParams", + "declaration": "export type OpenIMGetSpecifiedFriendsInfoParams = {\n userIDList : Array\n filterBlack : boolean\n}", + "signatureHash": "63062033bb6ff8f863312012ea915095b4fb1dc55526b9b41a1fb2dc86b6333e", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1039, + "name": "OpenIMFriendApplicationHandleParams", + "declaration": "export type OpenIMFriendApplicationHandleParams = {\n toUserID : string\n handleMsg : string\n}", + "signatureHash": "0acb9df4416bb0c17ea5b80af18130e1f874c4b936301dd209dc20baa30330f5", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1040, + "name": "OpenIMAddBlackParams", + "declaration": "export type OpenIMAddBlackParams = {\n toUserID : string\n ex ?: string | null\n}", + "signatureHash": "a032838d52c66b5e1063228eb2ae81398a1d1bb3feead727f4c4f8d77d2be6b3", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1041, + "name": "OpenIMGroupUserListParams", + "declaration": "export type OpenIMGroupUserListParams = {\n groupID : string\n userIDList : Array\n}", + "signatureHash": "ac3d0f15f98f91af596c6d7d4e2a31e0b8efd35d6c8312473c2b899172ce0d68", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1042, + "name": "OpenIMGroupInviteParams", + "declaration": "export type OpenIMGroupInviteParams = {\n groupID : string\n reason : string\n userIDList : Array\n}", + "signatureHash": "aabedb02fbcb2eecdb9ca8cbad9551b4b9320c65938183e2bcf354f125951fd0", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1043, + "name": "OpenIMSearchGroupMembersParams", + "declaration": "export type OpenIMSearchGroupMembersParams = {\n groupID : string\n keywordList : Array\n isSearchUserID : boolean\n isSearchMemberNickname : boolean\n}", + "signatureHash": "6b849bfb059cd39e3a022e5f3d4c564c58c5778edff7ffa28e828442b4d2d6f0", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1044, + "name": "OpenIMCreateGroupInfo", + "declaration": "export type OpenIMCreateGroupInfo = {\n groupName : string\n groupType : 2\n notification ?: string | null\n introduction ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n}", + "signatureHash": "ffec54165e4c12239b73917e333ffe16126376c86068de95f3ab36ec87a1c64b", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1045, + "name": "OpenIMCreateGroupParams", + "declaration": "export type OpenIMCreateGroupParams = {\n groupInfo : OpenIMCreateGroupInfo\n memberUserIDs : Array\n adminUserIDs ?: Array | null\n}", + "signatureHash": "b1109c4277ee0b7ac1d7fcb5a7b52706e821a2660d79b4ffbe28fc9b2905cb47", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1046, + "name": "OpenIMSetGroupInfoParams", + "declaration": "export type OpenIMSetGroupInfoParams = {\n groupID : string\n groupName ?: string | null\n notification ?: string | null\n introduction ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n needVerification ?: OpenIMGroupNeedVerification | null\n lookMemberInfo ?: OpenIMGroupOption | null\n applyMemberFriend ?: OpenIMGroupOption | null\n displayIsRead ?: OpenIMGroupDisplayIsRead | null\n}", + "signatureHash": "b6da4a10753ad1184c55ab4f7f6f64d5fa20b4aa143879b730d1e163a21f4dfb", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1047, + "name": "OpenIMSetGroupMemberInfoParams", + "declaration": "export type OpenIMSetGroupMemberInfoParams = {\n groupID : string\n userID : string\n nickname ?: string | null\n faceURL ?: string | null\n roleLevel ?: OpenIMGroupMemberRoleLevel | null\n ex ?: string | null\n}", + "signatureHash": "be5a45a607a834119a540dd426b154a0f542eb1822ef8df4c704bc60e9e327e7", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1048, + "name": "OpenIMJoinGroupParams", + "declaration": "export type OpenIMJoinGroupParams = {\n groupID : string\n reqMsg : string\n joinSource : number\n ex ?: string | null\n}", + "signatureHash": "04d375b93c6de64b3b6a5bfe36ddaccd0f07f5f02c6c622a646f36d3c2c07eb5", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1049, + "name": "OpenIMSearchGroupsParams", + "declaration": "export type OpenIMSearchGroupsParams = {\n keywordList : Array\n isSearchGroupID : boolean\n isSearchGroupName : boolean\n}", + "signatureHash": "ffa28e5f24c96d16a54914ffc4a3701cab1f61437fc62121a6c4e76d43b726b2", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1050, + "name": "OpenIMChangeGroupMuteParams", + "declaration": "export type OpenIMChangeGroupMuteParams = {\n groupID : string\n isMute : boolean\n}", + "signatureHash": "aa17171474e80fd1e6a36a7dbe304166c234c3cfa6eeab576195946f52cc0256", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1051, + "name": "OpenIMChangeGroupMemberMuteParams", + "declaration": "export type OpenIMChangeGroupMemberMuteParams = {\n groupID : string\n userID : string\n mutedSeconds : number\n}", + "signatureHash": "6697ba759a76a4403895ac2dbf7de0a9368321cd2a8294ec92b11fec2a58cf2e", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1052, + "name": "OpenIMTransferGroupOwnerParams", + "declaration": "export type OpenIMTransferGroupOwnerParams = {\n groupID : string\n newOwnerUserID : string\n}", + "signatureHash": "9f7c7aee7ecdeed54731c5ad4ef0cf95a1c4923db8671b3f6727f6f9bf4e1d3e", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1053, + "name": "OpenIMGroupApplicationHandleParams", + "declaration": "export type OpenIMGroupApplicationHandleParams = {\n groupID : string\n fromUserID : string\n handleMsg : string\n}", + "signatureHash": "8ba30188c3e3cd4695c4793a7f8fc7bd32529b232b2c987db7111a9d308776d6", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1054, + "name": "OpenIMFindMessageParams", + "declaration": "export type OpenIMFindMessageParams = {\n conversationID : string\n clientMsgIDList : Array\n}", + "signatureHash": "d5a6e9e2e19d5dd2241a33a10da6aef942485b87af823429495e33f6873bf903", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1055, + "name": "OpenIMCreateCustomMessageParams", + "declaration": "export type OpenIMCreateCustomMessageParams = {\n data : string\n extension : string\n descriptionText : string\n}", + "signatureHash": "9bd7a01198c96058cb52d6fffa3d059b14082e4eab3b59f9c26b7370eb38be98", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1056, + "name": "OpenIMCreateQuoteMessageParams", + "declaration": "export type OpenIMCreateQuoteMessageParams = {\n text : string\n message : string\n}", + "signatureHash": "63f428d077669061ebb78118e8bcb19a413ad24872bb520e644650e239c214eb", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1057, + "name": "OpenIMCreateAdvancedQuoteMessageParams", + "declaration": "export type OpenIMCreateAdvancedQuoteMessageParams = {\n text : string\n message : string\n messageEntityList : Array\n}", + "signatureHash": "21b9c8457dc0ab691f098ed81c93908ee611c2f61e3b0db6df186dd8a7644f51", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1058, + "name": "OpenIMCreateAdvancedTextMessageParams", + "declaration": "export type OpenIMCreateAdvancedTextMessageParams = {\n text : string\n messageEntityList : Array\n}", + "signatureHash": "160e42977b232d732945b544b434124976ca12f5159b8c1a776acbc746a86641", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1059, + "name": "OpenIMCreateTextAtMessageParams", + "declaration": "export type OpenIMCreateTextAtMessageParams = {\n text : string\n atUserIDList : Array\n atUsersInfo ?: Array | null\n quoteMessage ?: OpenIMMessageItem | null\n}", + "signatureHash": "805f4869c2be9695182db1ae1bd542df39943f243f7b3bc45d61bb0b10b83d78", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1060, + "name": "OpenIMCreateMergerMessageParams", + "declaration": "export type OpenIMCreateMergerMessageParams = {\n messageList : Array\n title : string\n abstractList : Array\n}", + "signatureHash": "53f569e81369fd7ea141af0c1ff31dabcb8073e813cca1a201100509f202ba3e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1061, + "name": "OpenIMCreateFaceMessageParams", + "declaration": "export type OpenIMCreateFaceMessageParams = {\n index : number\n data : string\n}", + "signatureHash": "bf4a90e528812c64c24c8a1cfe052bfe62eae542622cc3455a81e41c1dbb4c2a", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1062, + "name": "OpenIMCreateLocationMessageParams", + "declaration": "export type OpenIMCreateLocationMessageParams = {\n descriptionText : string\n longitude : number\n latitude : number\n}", + "signatureHash": "2b3dfb06f155a776b629519e9acea98e67b0806b5da142acd524295d4878ab6f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1063, + "name": "OpenIMMessageEntity", + "declaration": "export type OpenIMMessageEntity = {\n type ?: string | null\n offset ?: number | null\n length ?: number | null\n url ?: string | null\n ex ?: string | null\n info ?: string | null\n}", + "signatureHash": "a1c002f8741dbb614ab2d9d48a75f9055fb3f7a7634608bbba329b4ac663e553", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1064, + "name": "OpenIMTextElem", + "declaration": "export type OpenIMTextElem = {\n content ?: string | null\n}", + "signatureHash": "0f49b7b5160434661322667b9cec3bb31799c5a767eb1fd3171a8e66e1287045", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1065, + "name": "OpenIMCardElem", + "declaration": "export type OpenIMCardElem = {\n userID ?: string | null\n nickname ?: string | null\n faceURL ?: string | null\n ex ?: string | null\n}", + "signatureHash": "a3368b7e2eda8f0248d03cb5555ff0ae5335817452c8ec49c9a038c21eb9ba43", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1066, + "name": "OpenIMAtUsersInfoItem", + "declaration": "export type OpenIMAtUsersInfoItem = {\n atUserID ?: string | null\n groupNickname ?: string | null\n}", + "signatureHash": "aed660c51226b8723b69c65bfb1b5d3382efc2a2e333a74135b4946521c1f8ab", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1067, + "name": "OpenIMAtTextElem", + "declaration": "export type OpenIMAtTextElem = {\n text ?: string | null\n atUserList ?: Array | null\n atUsersInfo ?: Array | null\n quoteMessage ?: OpenIMMessageItemRef | null\n isAtSelf ?: boolean | null\n}", + "signatureHash": "75efddfb740bffb13e16d424b7e34b025bf07362cb46860d6065c1f3438d9350", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1068, + "name": "OpenIMNotificationElem", + "declaration": "export type OpenIMNotificationElem = {\n detail ?: string | null\n}", + "signatureHash": "8ed1ab19f3af3ffbd158d394c27908b7e09d71f7b14e5c74f9b17241538b5199", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1069, + "name": "OpenIMAdvancedTextElem", + "declaration": "export type OpenIMAdvancedTextElem = {\n text ?: string | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "ee82bd73672c4dcb3258d33df5ba72a01ad4dd378785d229f464e1c8478e7055", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1070, + "name": "OpenIMTypingElem", + "declaration": "export type OpenIMTypingElem = {\n msgTips ?: string | null\n}", + "signatureHash": "be42daaaead94a9138309b444aa9a63ce0150fc377dd29295365e0d471c2e0db", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1071, + "name": "OpenIMFileElem", + "declaration": "export type OpenIMFileElem = {\n filePath ?: string | null\n uuid ?: string | null\n sourceUrl ?: string | null\n fileName ?: string | null\n fileSize ?: number | null\n}", + "signatureHash": "71f34c3511c7edadf3ef9116effcca1d6f2bf0f1d4efe2d9ed5a14be23849ced", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1072, + "name": "OpenIMFaceElem", + "declaration": "export type OpenIMFaceElem = {\n index ?: number | null\n data ?: string | null\n}", + "signatureHash": "d1a016aef3afaade3a7eb4445cc7bf6c1adf289dedf01e313a4c9b74c6953b19", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1073, + "name": "OpenIMLocationElem", + "declaration": "export type OpenIMLocationElem = {\n descriptionText ?: string | null\n longitude ?: number | null\n latitude ?: number | null\n}", + "signatureHash": "e9c0c035a0c9820eae383005e7674f565909e3c047e0f20de51c9669b8a0e46c", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1074, + "name": "OpenIMCustomElem", + "declaration": "export type OpenIMCustomElem = {\n data ?: string | null\n descriptionText ?: string | null\n extensionText ?: string | null\n}", + "signatureHash": "a4d3376f2c455c65f34afd0bee12da76f53ba1b662ad40b57a7ca13dd3b328b1", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1075, + "name": "OpenIMMergeElem", + "declaration": "export type OpenIMMergeElem = {\n title ?: string | null\n abstractList ?: Array | null\n multiMessage ?: Array | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "23fb44975d05b1105f0b158bb4d1ea7faa86a867c953dc6599a6625ea2aef659", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1076, + "name": "OpenIMOfflinePush", + "declaration": "export type OpenIMOfflinePush = {\n title ?: string | null\n desc ?: string | null\n ex ?: string | null\n iOSPushSound ?: string | null\n iOSBadgeCount ?: boolean | null\n}", + "signatureHash": "9b90be2a0c61ef7b0c249c26b30e687e3b184e250a3cb4a5866dc693321a5fda", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1077, + "name": "OpenIMPicture", + "declaration": "export type OpenIMPicture = {\n uuid ?: string | null\n type ?: string | null\n size ?: number | null\n width ?: number | null\n height ?: number | null\n url ?: string | null\n}", + "signatureHash": "f04bdadf101bb6ebc3ff41ac57a89d32e522763ca0f0be711b3ce9d4e3a53b25", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1078, + "name": "OpenIMPictureElem", + "declaration": "export type OpenIMPictureElem = {\n sourcePath ?: string | null\n sourcePicture ?: OpenIMPicture | null\n bigPicture ?: OpenIMPicture | null\n snapshotPicture ?: OpenIMPicture | null\n}", + "signatureHash": "70fbb702fb0804466b1924df67ffcd7ffe3568e52f8364867f40481044dd70ad", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1079, + "name": "OpenIMAttachedGroupHasReadInfo", + "declaration": "export type OpenIMAttachedGroupHasReadInfo = {\n hasReadCount ?: number | null\n unreadCount ?: number | null\n hasReadUserIDList ?: Array | null\n groupMemberCount ?: number | null\n}", + "signatureHash": "c03da824911cb525bb53693ae7bb1579cb5014febcb1f130d0b452447d4a76bd", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1080, + "name": "OpenIMUploadProgress", + "declaration": "export type OpenIMUploadProgress = {\n total ?: number | null\n save ?: number | null\n current ?: number | null\n uploadID ?: string | null\n}", + "signatureHash": "b52193934a41200dc2a4d272b12ffc53936dddf30170efc1b1eb7a12ce907ac6", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1081, + "name": "OpenIMAttachedInfoElem", + "declaration": "export type OpenIMAttachedInfoElem = {\n groupHasReadInfo ?: OpenIMAttachedGroupHasReadInfo | null\n isPrivateChat ?: boolean | null\n isEncryption ?: boolean | null\n inEncryptStatus ?: boolean | null\n burnDuration ?: number | null\n hasReadTime ?: number | null\n messageEntityList ?: Array | null\n uploadProgress ?: OpenIMUploadProgress | null\n}", + "signatureHash": "9ba2f2535b1577151196a45f0bb26866b48067bfd451085fa620e6ce9111e0d1", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1082, + "name": "OpenIMQuoteElem", + "declaration": "export type OpenIMQuoteElem = {\n text ?: string | null\n quoteMessage ?: OpenIMMessageItemRef | null\n messageEntityList ?: Array | null\n}", + "signatureHash": "31af4d22fa4fe24496e61fbda8ecd10b5b961c860ea7ceeb29cdda3a0e5ce7da", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1083, + "name": "OpenIMSoundElem", + "declaration": "export type OpenIMSoundElem = {\n uuid ?: string | null\n soundPath ?: string | null\n sourceUrl ?: string | null\n dataSize ?: number | null\n duration ?: number | null\n}", + "signatureHash": "50de258e4269a9118635019c551ab2b04703e423b7188d8dc668353fcbd0c8c7", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1084, + "name": "OpenIMVideoElem", + "declaration": "export type OpenIMVideoElem = {\n videoPath ?: string | null\n videoUUID ?: string | null\n videoUrl ?: string | null\n videoType ?: string | null\n videoSize ?: number | null\n duration ?: number | null\n snapshotPath ?: string | null\n snapshotUUID ?: string | null\n snapshotSize ?: number | null\n snapshotUrl ?: string | null\n snapshotWidth ?: number | null\n snapshotHeight ?: number | null\n}", + "signatureHash": "aa263f920958c6d75d1d3254f6c18e904248901bc49a832c5e70a5d7bf52678e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1085, + "name": "OpenIMMessageItemRef", + "declaration": "export type OpenIMMessageItemRef = {\n clientMsgID ?: string | null\n serverMsgID ?: string | null\n createTime : number\n sendTime : number\n sessionType : OpenIMSessionType\n sendID ?: string | null\n recvID ?: string | null\n msgFrom : number\n contentType : OpenIMMessageType\n senderPlatformID : OpenIMPlatform\n senderNickname ?: string | null\n senderFaceUrl ?: string | null\n groupID ?: string | null\n content ?: string | null\n seq : number\n isRead : boolean\n status : OpenIMMessageStatus\n attachedInfo ?: string | null\n ex ?: string | null\n localEx ?: string | null\n textElem ?: OpenIMTextElem | null\n cardElem ?: OpenIMCardElem | null\n pictureElem ?: OpenIMPictureElem | null\n soundElem ?: OpenIMSoundElem | null\n videoElem ?: OpenIMVideoElem | null\n fileElem ?: OpenIMFileElem | null\n faceElem ?: OpenIMFaceElem | null\n locationElem ?: OpenIMLocationElem | null\n customElem ?: OpenIMCustomElem | null\n}", + "signatureHash": "1ac0f0db5fdc73648e4e5739aa1ea4cbd8542877e48ace677a90bbd5c6ea1e81", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1086, + "name": "OpenIMMessageItem", + "declaration": "export type OpenIMMessageItem = {\n clientMsgID ?: string | null\n serverMsgID ?: string | null\n createTime : number\n sendTime : number\n sessionType : OpenIMSessionType\n sendID ?: string | null\n recvID ?: string | null\n msgFrom : number\n contentType : OpenIMMessageType\n senderPlatformID : OpenIMPlatform\n senderNickname ?: string | null\n senderFaceUrl ?: string | null\n groupID ?: string | null\n content ?: string | null\n seq : number\n isRead : boolean\n status : OpenIMMessageStatus\n offlinePush ?: OpenIMOfflinePush | null\n attachedInfo ?: string | null\n ex ?: string | null\n localEx ?: string | null\n textElem ?: OpenIMTextElem | null\n cardElem ?: OpenIMCardElem | null\n pictureElem ?: OpenIMPictureElem | null\n soundElem ?: OpenIMSoundElem | null\n videoElem ?: OpenIMVideoElem | null\n fileElem ?: OpenIMFileElem | null\n mergeElem ?: OpenIMMergeElem | null\n atTextElem ?: OpenIMAtTextElem | null\n faceElem ?: OpenIMFaceElem | null\n locationElem ?: OpenIMLocationElem | null\n customElem ?: OpenIMCustomElem | null\n quoteElem ?: OpenIMQuoteElem | null\n notificationElem ?: OpenIMNotificationElem | null\n advancedTextElem ?: OpenIMAdvancedTextElem | null\n typingElem ?: OpenIMTypingElem | null\n attachedInfoElem ?: OpenIMAttachedInfoElem | null\n}", + "signatureHash": "5aec8cb3a7963f19d9f39e7f3d383620ff62e8748994ebb89f81b1bf15b3f141", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1087, + "name": "OpenIMConversationItem", + "declaration": "export type OpenIMConversationItem = {\n conversationID : string\n conversationType : OpenIMSessionType\n userID ?: string | null\n groupID ?: string | null\n showName : string\n faceURL : string\n recvMsgOpt : number\n unreadCount : number\n latestMsg ?: string | null\n latestMsgSendTime : number\n draftText : string\n draftTextTime : number\n isPinned : boolean\n isPrivateChat : boolean\n attachedInfo : string\n ex : string\n burnDuration : number\n minSeq : number\n maxSeq : number\n msgDestructTime : number\n groupAtType : number\n isMsgDestruct : boolean\n isNotInGroup : boolean\n updateUnreadCountTime : number\n}", + "signatureHash": "598414c4c588fa99562775080bb8d17daa4cbb793dd6b15aea42afb478f6ddd0", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1088, + "name": "OpenIMConversationListResult", + "declaration": "export type OpenIMConversationListResult = {\n conversations : Array\n}", + "signatureHash": "fd65acc4e6f32e7fb0e9e4c1f0feb1e0c5ed89b137a4507ca4ac87815b4b50ed", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1089, + "name": "OpenIMUserListResult", + "declaration": "export type OpenIMUserListResult = {\n users : Array\n}", + "signatureHash": "403313cbd3c36d50f047d193977c7a401a6d62d1680a149e4e1f2839e3b06fff", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1090, + "name": "OpenIMUserStatusItem", + "declaration": "export type OpenIMUserStatusItem = {\n userID : string\n status : number\n platformIDs : Array\n}", + "signatureHash": "a8d28054689489918abd8332b6339a2cb5cb28ad0941b0f7290e676fc46dda8d", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1091, + "name": "OpenIMUserStatusListResult", + "declaration": "export type OpenIMUserStatusListResult = {\n statuses : Array\n}", + "signatureHash": "80948b1e7f541d4a52cd9bed55cce5bb78017128f96988173be79a78b63cb66a", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1092, + "name": "OpenIMFriendListResult", + "declaration": "export type OpenIMFriendListResult = {\n friends : Array\n}", + "signatureHash": "95441a05fa85bd1d953d068544a351ec342404fe264e6ec6af553749e875341d", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1093, + "name": "OpenIMBlackListResult", + "declaration": "export type OpenIMBlackListResult = {\n blackUsers : Array\n}", + "signatureHash": "ad014afc58f1cc960ebd231eb7e347c6857a5a81806785080b3e375a9a5fc725", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1094, + "name": "OpenIMGroupListResult", + "declaration": "export type OpenIMGroupListResult = {\n groups : Array\n}", + "signatureHash": "e5c01b3fc76eeca5804c9383b089886e48467767603574caa3f9ae29a36a36ed", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1095, + "name": "OpenIMGroupMemberListResult", + "declaration": "export type OpenIMGroupMemberListResult = {\n members : Array\n}", + "signatureHash": "ce8e5c716e5aef111ba89bdaa67e2d26524320a59920aa9f40f241f8d875f58e", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1096, + "name": "OpenIMFriendApplicationListResult", + "declaration": "export type OpenIMFriendApplicationListResult = {\n applications : Array\n}", + "signatureHash": "e232583f1151817ca1fb1cf7886a9fcb471a4fd6fe84eb970bbf570c1c41e785", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1097, + "name": "OpenIMGroupApplicationListResult", + "declaration": "export type OpenIMGroupApplicationListResult = {\n applications : Array\n}", + "signatureHash": "46db95eab29b381521911d02a613bd6dcc54aed40a3d10117bd88fc3f25c2a95", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1098, + "name": "OpenIMMessageListResult", + "declaration": "export type OpenIMMessageListResult = {\n messages : Array\n}", + "signatureHash": "8e6e1f89a0fb403f7a2a3daddacfcd8c5a7e4cc53d9031d2f0a31b2500cd965a", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1099, + "name": "OpenIMUserInfo", + "declaration": "export type OpenIMUserInfo = {\n userID : string\n nickname : string\n faceURL : string\n ex : string\n createTime ?: number | null\n attachedInfo ?: string | null\n globalRecvMsgOpt ?: number | null\n}", + "signatureHash": "ce8160a04596bf7e963750e430746f3c09f8c8904972036030426300000b3f39", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1100, + "name": "OpenIMPublicUserItem", + "declaration": "export type OpenIMPublicUserItem = OpenIMUserInfo", + "signatureHash": "87765e398f97f0789dbdc4ba62eddeea11d36573d497bd42d31a196585d72e62", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1101, + "name": "OpenIMFriendUserItem", + "declaration": "export type OpenIMFriendUserItem = {\n ownerUserID : string\n userID : string\n nickname : string\n faceURL : string\n remark : string\n createTime : number\n addSource : number\n operatorUserID : string\n ex : string\n attachedInfo : string\n isPinned : boolean\n}", + "signatureHash": "3aab4773462c2927d59d3be09888222b758abd0bd95b11fcf1978fa39b7527c2", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1102, + "name": "OpenIMBlackUserItem", + "declaration": "export type OpenIMBlackUserItem = {\n ownerUserID : string\n userID : string\n nickname : string\n faceURL : string\n createTime : number\n addSource : number\n operatorUserID : string\n ex : string\n attachedInfo : string\n}", + "signatureHash": "713c267f837a34d9ba48d3a2fa5090dda8d058c131491b546b8480f7cbe9c237", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1103, + "name": "OpenIMGroupItem", + "declaration": "export type OpenIMGroupItem = {\n groupID : string\n groupName : string\n notification : string\n introduction : string\n faceURL : string\n ownerUserID : string\n createTime : number\n memberCount : number\n status : number\n creatorUserID : string\n groupType : number\n needVerification : number\n lookMemberInfo : number\n applyMemberFriend : number\n notificationUpdateTime : number\n notificationUserID : string\n ex : string\n attachedInfo : string\n}", + "signatureHash": "7a3c765d2938ab26d72e645d65f89483e94c0404c7dcf3e3210aa7b0d579aca7", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1104, + "name": "OpenIMGroupMemberItem", + "declaration": "export type OpenIMGroupMemberItem = {\n groupID : string\n userID : string\n nickname : string\n faceURL : string\n roleLevel : number\n joinTime : number\n joinSource : number\n operatorUserID : string\n ex : string\n muteEndTime : number\n inviterUserID : string\n attachedInfo : string\n}", + "signatureHash": "81ad1090935d1bb275b174f79bfb9c9a96939f692971de1c2481fb01e3e3234d", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1105, + "name": "OpenIMFriendApplicationItem", + "declaration": "export type OpenIMFriendApplicationItem = {\n fromUserID : string\n fromNickname : string\n fromFaceURL : string\n toUserID : string\n toNickname : string\n toFaceURL : string\n handleResult : number\n reqMsg : string\n createTime : number\n handlerUserID : string\n handleMsg : string\n handleTime : number\n ex : string\n attachedInfo : string\n}", + "signatureHash": "366f3242235b8dcb611776ececab41acfe647ae1ea7b9b97d36cc5c80e62fc8d", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1106, + "name": "OpenIMGroupApplicationItem", + "declaration": "export type OpenIMGroupApplicationItem = {\n groupID : string\n groupName : string\n notification : string\n introduction : string\n groupFaceURL : string\n ownerUserID : string\n createTime : number\n status : number\n creatorUserID : string\n groupType ?: number | null\n memberCount : number\n userID : string\n nickname : string\n userFaceURL : string\n handleResult : number\n reqMsg : string\n handledMsg : string\n reqTime : number\n joinSource : number\n inviterUserID : string\n handleUserID : string\n handledTime : number\n ex : string\n attachedInfo : string\n}", + "signatureHash": "7b33f7fe84a3f268f96ea23446c4ca9334624827f7c1607de708fd3ad6ed4e86", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1107, + "name": "OpenIMMessageRevokedItem", + "declaration": "export type OpenIMMessageRevokedItem = {\n revokerID : string\n revokerRole : number\n clientMsgID : string\n revokerNickname : string\n revokeTime : number\n sourceMessageSendTime : number\n sourceMessageSendID : string\n sourceMessageSenderNickname : string\n sessionType : OpenIMSessionType\n seq : number\n ex : string\n isAdminRevoke : boolean\n}", + "signatureHash": "b6ddba526c9690a96f36deebc7804168b8ccc8e017db7b96076797fed505758c", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1108, + "name": "OpenIMMessageReceiptItem", + "declaration": "export type OpenIMMessageReceiptItem = {\n groupID : string\n userID : string\n msgIDList : Array\n readTime : number\n msgFrom : number\n contentType : OpenIMMessageType | 0\n sessionType : OpenIMSessionType\n}", + "signatureHash": "2eb37aa8fa133a4be81504cb3882de71c4e9babf2b70eabaa3eae2d2bc4cb8da", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1109, + "name": "OpenIMMessageReceiptListResult", + "declaration": "export type OpenIMMessageReceiptListResult = {\n receipts : Array\n}", + "signatureHash": "de29548e1d2deb766bcb1d81a918f40baa12ffaecc3f5ab395c1c13e9fcc3b2e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1110, + "name": "OpenIMConversationInputStatusItem", + "declaration": "export type OpenIMConversationInputStatusItem = {\n conversationID : string\n userID : string\n platformIDs : Array\n}", + "signatureHash": "ea0d22504dd2734a2f02cbea762beb04d681440d3d8ebe46f4951fee83856b7a", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1111, + "name": "OpenIMGetOneConversationParams", + "declaration": "export type OpenIMGetOneConversationParams = {\n sourceID : string\n sessionType : OpenIMSessionType\n}", + "signatureHash": "6bb7b29d59bcf4d675d5f5216addd62b5e9e63a95b18dd9455d0b34755ad0573", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 1112, + "name": "OpenIMPageParams", + "declaration": "export type OpenIMPageParams = {\n offset : number\n count : number\n}", + "signatureHash": "f5ecdf631ff9ebc8595ebf4635d14c10c6ba15283e629da31c6784b1b67c6076", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1113, + "name": "OpenIMGetGroupMemberListParams", + "declaration": "export type OpenIMGetGroupMemberListParams = {\n groupID : string\n filter : number\n offset : number\n count : number\n}", + "signatureHash": "06c82731d2e593ca418de1a0866a245b71a2be01ddeb3c02277edae1e84ec4f0", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 1114, + "name": "OpenIMGetAdvancedHistoryMessageListParams", + "declaration": "export type OpenIMGetAdvancedHistoryMessageListParams = {\n conversationID : string\n startClientMsgID : string\n count : number\n lastMinSeq ?: number | null\n}", + "signatureHash": "b521938a9052e5499ecbc005550e44e6abacf2e815092ec5e496a3dbc90774cc", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1115, + "name": "OpenIMAdvancedHistoryMessageListResult", + "declaration": "export type OpenIMAdvancedHistoryMessageListResult = {\n messageList : Array\n lastMinSeq : number\n isEnd : boolean\n errCode : number\n errMsg : string\n}", + "signatureHash": "02a6f480de44a33716123127bcec9de5615609d9fc54fcd5abc66b3e9dd5bf06", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1116, + "name": "OpenIMSearchLocalMessagesParams", + "declaration": "export type OpenIMSearchLocalMessagesParams = {\n conversationID ?: string | null\n keywordList : Array\n keywordListMatchType : number\n senderUserIDList : Array\n messageTypeList : Array\n searchTimePosition : number\n searchTimePeriod : number\n pageIndex : number\n count : number\n}", + "signatureHash": "0bde1c182740b5537146b79e2d10ae65bdc9cc4b2c6d62b41d8a2311c938b4a5", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1117, + "name": "OpenIMApplicationListParams", + "declaration": "export type OpenIMApplicationListParams = {\n offset ?: number | null\n count ?: number | null\n}", + "signatureHash": "0bec3ff5c5bc96e5b42d183209b936658e96d6fc2cacc2ff9b0dc16b84d90d27", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1118, + "name": "OpenIMSearchMessageResultItem", + "declaration": "export type OpenIMSearchMessageResultItem = {\n conversationID : string\n conversationType : OpenIMSessionType\n showName : string\n faceURL : string\n latestMsgSendTime ?: number | null\n messageCount : number\n messageList : Array\n}", + "signatureHash": "99e8c2726231bddc4908b7e7eddf469cbfaeec2ba704c6f4a44870da18ebe83e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1119, + "name": "OpenIMFindMessageResultItem", + "declaration": "export type OpenIMFindMessageResultItem = OpenIMSearchMessageResultItem", + "signatureHash": "8bc5514ea67060fa41e5341d6803ae4dbb06847ac4ef290cba907621b978f5d3", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1120, + "name": "OpenIMSearchMessageResult", + "declaration": "export type OpenIMSearchMessageResult = {\n totalCount : number\n searchResultItems : Array\n}", + "signatureHash": "7d78f39157a9b03b4476e05b221ae8d0c211de0ab4e5db089cf1955064607afc", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1121, + "name": "OpenIMFindMessageResult", + "declaration": "export type OpenIMFindMessageResult = {\n totalCount : number\n findResultItems : Array\n}", + "signatureHash": "b32c26060524c7fecb0554641ac3be5adff9c8e308c1e486652ce529b13dfac8", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1122, + "name": "OpenIMError", + "declaration": "export type OpenIMError = {\n errCode : number\n errMsg : string\n}", + "signatureHash": "478f2ffc6a418fe49bb1723358d86dbcbf40e9073138eb7adade0808a3118100", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1123, + "name": "OpenIMInitConfig", + "declaration": "export type OpenIMInitConfig = {\n platformID : OpenIMPlatform\n apiAddr : string\n wsAddr : string\n dataDir ?: string | null\n logFilePath ?: string | null\n logLevel : OpenIMLogLevel\n isLogStandardOutput : boolean\n systemType : string\n}", + "signatureHash": "69fa6f811bac82a49cf579ff1632381d4681eae0ee45d7032c4a4631864a7777", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1124, + "name": "OpenIMSDKEventName", + "declaration": "export type OpenIMSDKEventName =\n 'onConnecting' |\n 'onConnectSuccess' |\n 'onConnectFailed' |\n 'onKickedOffline' |\n 'onUserTokenExpired' |\n 'onUserTokenInvalid' |\n 'onRecvNewMessage' |\n 'onRecvOfflineNewMessage' |\n 'onRecvOnlineOnlyMessage' |\n 'onMsgDeleted' |\n 'onNewRecvMessageRevoked' |\n 'onRecvC2CReadReceipt' |\n 'onRecvNewMessages' |\n 'onRecvOfflineNewMessages' |\n 'onConversationChanged' |\n 'onConversationUserInputStatusChanged' |\n 'onNewConversation' |\n 'onSyncServerFailed' |\n 'onSyncServerFinish' |\n 'onSyncServerProgress' |\n 'onSyncServerStart' |\n 'onSendMessageProgress' |\n 'onUploadFileProgress' |\n 'onUploadLogsProgress' |\n 'onTotalUnreadMessageCountChanged' |\n 'onRecvCustomBusinessMessage' |\n 'onBlackAdded' |\n 'onBlackDeleted' |\n 'onFriendAdded' |\n 'onFriendApplicationAccepted' |\n 'onFriendApplicationAdded' |\n 'onFriendApplicationDeleted' |\n 'onFriendApplicationRejected' |\n 'onFriendDeleted' |\n 'onFriendInfoChanged' |\n 'onGroupApplicationAccepted' |\n 'onGroupApplicationAdded' |\n 'onGroupApplicationDeleted' |\n 'onGroupApplicationRejected' |\n 'onGroupDismissed' |\n 'onGroupInfoChanged' |\n 'onGroupMemberAdded' |\n 'onGroupMemberDeleted' |\n 'onGroupMemberInfoChanged' |\n 'onJoinedGroupAdded' |\n 'onJoinedGroupDeleted' |\n 'onSelfInfoUpdated' |\n 'onUserStatusChanged' |\n 'onChangedPinnedMsg' |\n 'onDeleteUserAllMsgsInConv' |\n 'onMessageModified' |\n 'onMessageEdited' |\n 'onRecvGroupReadReceipt' |\n 'onRecvMessageExtensionsAdded' |\n 'onRecvMessageExtensionsChanged' |\n 'onRecvMessageExtensionsDeleted' |\n 'onConversationGroupAdded' |\n 'onConversationGroupChanged' |\n 'onConversationGroupDeleted' |\n 'onConversationGroupMemberAdded' |\n 'onConversationGroupMemberDeleted' |\n 'onGroupApplicationBadgeCountChanged' |\n 'onReceiveNewInvitation' |\n 'onInviteeAccepted' |\n 'onInviteeAcceptedByOtherDevice' |\n 'onInviteeRejected' |\n 'onInviteeRejectedByOtherDevice' |\n 'onInvitationCancelled' |\n 'onInvitationTimeout' |\n 'onHangUp' |\n 'onRoomParticipantConnected' |\n 'onRoomParticipantDisconnected' |\n 'onReceiveCustomSignaling' |\n 'onReceiveCustomSignal' |\n 'onStreamChange' |\n 'onMessageKvInfoChanged' |\n 'onMigrationStart' |\n 'onMigrationProgress' |\n 'onMigrationFailed' |\n 'onMigrationFinished' |\n 'onSDKSessionChanged'", + "signatureHash": "9e5ea6ea56bceef44bef3fc2009ed98fbcfe34804794ee2a1543fbfd0dc3783e", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1125, + "name": "OpenIMSDKEvent", + "declaration": "export type OpenIMSDKEvent = {\n eventName : OpenIMSDKEventName\n payload : string\n errCode : number\n errMsg : string\n}", + "signatureHash": "e5e9143dc06c8aa13eafb05fdb8e21d36b9c4f28adcdaada75eb76734cceeda9", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1126, + "name": "OpenIMSDKRawEventHandler", + "declaration": "export type OpenIMSDKRawEventHandler = (event : OpenIMSDKEvent) => void", + "signatureHash": "3f289b82198d4dbe45788c499bac189efe66fa057b43f4129e8ab018b9003dec", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1127, + "name": "OpenIMVoidEventHandler", + "declaration": "export type OpenIMVoidEventHandler = () => void", + "signatureHash": "48a97d3e392f62df40855612d6d54073c807881812dc7d431305dedabc49c4ad", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1128, + "name": "OpenIMErrorEventHandler", + "declaration": "export type OpenIMErrorEventHandler = (errCode : number, errMsg : string) => void", + "signatureHash": "3e62a50c91e1a2061d1bd5a36ebdcbea657f50dc37c7be266dd4907c79493719", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1129, + "name": "OpenIMStringEventHandler", + "declaration": "export type OpenIMStringEventHandler = (payload : string) => void", + "signatureHash": "f870d165332d98817acaf3826aa69daa29be5e76ed8132be05d3b0e82415d025", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1130, + "name": "OpenIMBooleanEventHandler", + "declaration": "export type OpenIMBooleanEventHandler = (value : boolean) => void", + "signatureHash": "bde386d92783485892101af27eb658d4dfe0565890c6b393cfedc1630d39fd5d", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1131, + "name": "OpenIMNumberEventHandler", + "declaration": "export type OpenIMNumberEventHandler = (value : number) => void", + "signatureHash": "dd13d2cbcded18d7f66aea0e333e89ddede124042da30694bb8533e0bc953546", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1132, + "name": "OpenIMMessageEventHandler", + "declaration": "export type OpenIMMessageEventHandler = (message : OpenIMMessageItem | null) => void", + "signatureHash": "6a57ccf1b6b18662cffa213a97c1fdea1b6249db78644989ec452e0ba01e373a", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1133, + "name": "OpenIMMessageListEventHandler", + "declaration": "export type OpenIMMessageListEventHandler = (result : OpenIMMessageListResult | null) => void", + "signatureHash": "fe41c43860b84789f428bd4a1ba99199c5850a30abd6b7b89a444afa012fc767", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1134, + "name": "OpenIMMessageRevokedEventHandler", + "declaration": "export type OpenIMMessageRevokedEventHandler = (revoked : OpenIMMessageRevokedItem | null) => void", + "signatureHash": "2569484c6de8cdf2c32329350b81cdcc1050230ff0b48a3e7aea69cf7e6b3b3d", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1135, + "name": "OpenIMMessageReceiptListEventHandler", + "declaration": "export type OpenIMMessageReceiptListEventHandler = (result : OpenIMMessageReceiptListResult | null) => void", + "signatureHash": "021e91ed7fbfb6226d659c74ce08659fdedf58a296b5fd8a708098ce9fe60ab7", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1136, + "name": "OpenIMConversationListEventHandler", + "declaration": "export type OpenIMConversationListEventHandler = (result : OpenIMConversationListResult | null) => void", + "signatureHash": "06af96d04d931226f9808baffcffc9679bad648db4ac5254ff6ce05d42a64d0b", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1137, + "name": "OpenIMConversationInputStatusEventHandler", + "declaration": "export type OpenIMConversationInputStatusEventHandler = (status : OpenIMConversationInputStatusItem | null) => void", + "signatureHash": "d33d1d4895c125fb7ced51a93a681b60f52c405199fe50373e16737482c14c92", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1138, + "name": "OpenIMFriendEventHandler", + "declaration": "export type OpenIMFriendEventHandler = (friend : OpenIMFriendUserItem | null) => void", + "signatureHash": "f94fc891670192afe3bdbd22b9a35266c85ac508e9b6695195c23d1e1dfc8f8e", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1139, + "name": "OpenIMBlackUserEventHandler", + "declaration": "export type OpenIMBlackUserEventHandler = (blackUser : OpenIMBlackUserItem | null) => void", + "signatureHash": "3da436e1e4fe4d66bca36c0d5cd74bc5be027ff0c2630664ece23fd49cc49b78", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1140, + "name": "OpenIMFriendApplicationEventHandler", + "declaration": "export type OpenIMFriendApplicationEventHandler = (application : OpenIMFriendApplicationItem | null) => void", + "signatureHash": "a3331b84bb3414e118e078803c649bcbc67123196c61f4522a25eaa1ff549e79", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1141, + "name": "OpenIMGroupEventHandler", + "declaration": "export type OpenIMGroupEventHandler = (group : OpenIMGroupItem | null) => void", + "signatureHash": "2f15d91f365de9c2096aeca7fbb2d848a3da7b36e04c1c5db38ca195221ff19e", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1142, + "name": "OpenIMGroupMemberEventHandler", + "declaration": "export type OpenIMGroupMemberEventHandler = (member : OpenIMGroupMemberItem | null) => void", + "signatureHash": "bf674055e818325bfad60d00bccaea2f0ab63b3558e2312b9e0999999fccc37e", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1143, + "name": "OpenIMGroupApplicationEventHandler", + "declaration": "export type OpenIMGroupApplicationEventHandler = (application : OpenIMGroupApplicationItem | null) => void", + "signatureHash": "cffa01101c8a9cd200aceacebac33a3985a021311fc4e297efac3da72f860b5c", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1144, + "name": "OpenIMUserEventHandler", + "declaration": "export type OpenIMUserEventHandler = (user : OpenIMUserInfo | null) => void", + "signatureHash": "03b54da5270343a77c0158aca0878863e8580123aba43025ebefe0919e256acd", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1145, + "name": "OpenIMUserStatusListEventHandler", + "declaration": "export type OpenIMUserStatusListEventHandler = (result : OpenIMUserStatusListResult | null) => void", + "signatureHash": "9d03e4deb5e807363258985e22ce51ac80155cf77ec851d42130a5c15ab40cd3", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1146, + "name": "OpenIMSendMessageProgressEventHandler", + "declaration": "export type OpenIMSendMessageProgressEventHandler = (progress : OpenIMSendMessageProgressEvent | null) => void", + "signatureHash": "a33288bae0f33d2a59f709d74b1c919fe08f29b04b639eff6955b288abf07ee8", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1147, + "name": "OpenIMUploadFileProgressEventHandler", + "declaration": "export type OpenIMUploadFileProgressEventHandler = (progress : OpenIMUploadFileProgressEvent | null) => void", + "signatureHash": "f435a7ed1f7694850009e934dd7e58af3dcdc021ff4ff7472151d33edb2928b0", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1148, + "name": "OpenIMUploadLogsProgressEventHandler", + "declaration": "export type OpenIMUploadLogsProgressEventHandler = (progress : OpenIMUploadLogsProgressEvent | null) => void", + "signatureHash": "c6ffa8ec174b16230e476be4539e7b5b5b7d4a2957ceaa728504b6ddc9a2b620", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1149, + "name": "OpenIMSDKEventSubscription", + "declaration": "export type OpenIMSDKEventSubscription = {\n id : string\n eventName : OpenIMSDKEventName\n}", + "signatureHash": "6c3ec62c48e51e10ba3c0f565a2697bf12946f86874562ce3eca9db5c1709d75", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1150, + "name": "OpenIMSDKEventHandlerSubscription", + "declaration": "export type OpenIMSDKEventHandlerSubscription = {\n id : string\n eventName : OpenIMSDKEventName\n handler : OpenIMSDKRawEventHandler\n}", + "signatureHash": "a00d5d5c3a68f2a2465ef91915d955638b45d8e188bd0dd0547c46184585d9e4", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1151, + "name": "OffSDKEventName", + "declaration": "export type OffSDKEventName = (eventName : OpenIMSDKEventName) => void", + "signatureHash": "fb35d17cda3711451ae48dae991b8ef8784fc797459b00534d80385c0cdc27f5", + "edition": "public", + "page": null, + "disposition": "signature-only" + }, + { + "id": 1152, + "name": "InitSDK", + "declaration": "export type InitSDK = (config : OpenIMInitConfig, operationID ?: string | null) => Promise", + "signatureHash": "5c201130e8065147e6561c859af8e574b8b4aa1fb0db512c9c48a9023073f2ea", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1153, + "name": "Login", + "declaration": "export type Login = (userID : string, token : string, operationID ?: string | null) => Promise", + "signatureHash": "890d88bc5fac876fe0a79c991da57a1aa88a659f1170fdd4e251e3f04f69d366", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1154, + "name": "Logout", + "declaration": "export type Logout = (operationID ?: string | null) => Promise", + "signatureHash": "1145164a27244218680bcc5ee0dd30bb664716d4aa49bb124a4af0396e27d999", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1155, + "name": "GetLoginStatus", + "declaration": "export type GetLoginStatus = (operationID ?: string | null) => Promise", + "signatureHash": "1ef052c6a4844d72f5abd8096bbe2d00f2ef867da168dd048deb204a0ce158c8", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1156, + "name": "GetLoginUserID", + "declaration": "export type GetLoginUserID = (operationID ?: string | null) => Promise", + "signatureHash": "af7623df1b8b1fd4a0ad5511cf56fc55685460be85d4fe26b8ff7c7b4c54ee5a", + "edition": "public", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 1157, + "name": "CreateTextMessage", + "declaration": "export type CreateTextMessage = (text : string, operationID ?: string | null) => Promise", + "signatureHash": "a636155e9a0ee2ed4f324589d97b4941c34558ea5ea78253ad17e2848d88abad", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1158, + "name": "SendMessage", + "declaration": "export type SendMessage = (options : OpenIMSendMessageOptions) => Promise", + "signatureHash": "928a3238e64fa3d366e8129103d928731214e2e66761a9d36ec946a7a81d5cc6", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 1159, + "name": "UploadFile", + "declaration": "export type UploadFile = (params : OpenIMUploadFileParams, operationID ?: string | null) => Promise", + "signatureHash": "3e615d261070c7689fe37123ee7e538315e63683cc75ab72c35cc2d3ca16c7c5", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 1160, + "name": "OpenIMSDKInstance", + "declaration": "export type OpenIMSDKInstance = {\n initSDK : InitSDK\n login : Login\n logout : Logout\n getLoginStatus : GetLoginStatus\n getLoginUserID : GetLoginUserID\n createTextMessage : CreateTextMessage\n sendMessage : SendMessage\n uploadFile : UploadFile\n}", + "signatureHash": "b825f5e5894ba29931c5c212158214ef7b50058e72e52e08e9d3a35204d53118", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100001, + "name": "OpenIMCreateImageMessageParams", + "declaration": "export type OpenIMCreateImageMessageParams = {\n sourcePath : string\n}", + "signatureHash": "63591b00e304445a755734bd946e0db5dca2ff03592a156d1c815ff4dc2d593d", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100002, + "name": "OpenIMCancelUploadParams", + "declaration": "export type OpenIMCancelUploadParams = {\n cancelID : string\n}", + "signatureHash": "edb2d48782c3529b897ecd34bcdd745d9a3ad2db998afb4b31e1803abdf67fb2", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100003, + "name": "OpenIMSpeechToTextParams", + "declaration": "export type OpenIMSpeechToTextParams = {\n filename : string\n data : string\n}", + "signatureHash": "ddad1ba22e3e3f22f4b83521cab68190f249180cfc930067c994c9d54b64cf46", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100070, + "name": "OpenIMUpdateTokenParams", + "declaration": "export type OpenIMUpdateTokenParams = {\n token : string\n}", + "signatureHash": "f1d8cf40463868f7dc57bbd8b0368df5f4677b954d9f4b8f9098ae55d0c40d74", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100071, + "name": "OpenIMTranslateTextParams", + "declaration": "export type OpenIMTranslateTextParams = {\n content : string\n sourceLanguageCode : string\n targetLanguageCode : string\n}", + "signatureHash": "562ffc5ee913bce8dd933315f711ff964ff37aa9b3a53122f4e0765eecd7ab35", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100072, + "name": "OpenIMTranslateTextResult", + "declaration": "export type OpenIMTranslateTextResult = {\n translatedText : string\n detectedLanguageCode : string\n}", + "signatureHash": "885eeaeef115e2a8ea77d8d2253e1fb7a3537db1794b87aeacc18c6cec68886f", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100073, + "name": "OpenIMTranslateMessageParams", + "declaration": "export type OpenIMTranslateMessageParams = {\n conversationID : string\n clientMsgID : string\n sourceLanguageCode : string\n targetLanguageCode : string\n}", + "signatureHash": "e3d7e28002e0eaa18d02e5389a3b89d335352690427a81fcd3c6e5c417d3c413", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100004, + "name": "OpenIMSpeechToTextResult", + "declaration": "export type OpenIMSpeechToTextResult = {\n text ?: string | null\n}", + "signatureHash": "c2c9c93d1cd1d45ca6fcd54c4d5128c56cfc15c3a9acb8352cd4fdcea48d1871", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100005, + "name": "OpenIMSpeechToTextCapabilitiesResult", + "declaration": "export type OpenIMSpeechToTextCapabilitiesResult = {\n format ?: Array | null\n sampleRateHz ?: Array | null\n maxRecordTimeMs ?: number | null\n maxFileSize ?: number | null\n provider ?: string | null\n requestType ?: string | null\n crossDomain ?: boolean | null\n}", + "signatureHash": "9885a13d601386732149adec92424e1533bb74f8c99e88b42109223eeb852814", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100006, + "name": "OpenIMUpdateFriendParams", + "declaration": "export type OpenIMUpdateFriendParams = {\n userID : string\n pinned ?: OpenIMUpdateFriendBoolean | null\n remark ?: string | null\n ex ?: string | null\n}", + "signatureHash": "d33d8f9c2e00af5c5c70904676aed7729a71f3e5517ed89b2cdd811a89cff093", + "edition": "commercial", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 100007, + "name": "OpenIMGetInputStatesParams", + "declaration": "export type OpenIMGetInputStatesParams = {\n conversationID : string\n userID : string\n}", + "signatureHash": "018ab95e297711761162104984aea0d36acb67389a365ee9f31ef233956d7ee3", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100008, + "name": "OpenIMGetInputStatesResult", + "declaration": "export type OpenIMGetInputStatesResult = {\n platforms : Array\n}", + "signatureHash": "b294f43a1c470d990cb29877da3503333c70525acccc8126f02ca313f85f5237", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100009, + "name": "OpenIMSimpleGroupRequest", + "declaration": "export type OpenIMSimpleGroupRequest = {\n groupID : string\n fromUserID : string\n}", + "signatureHash": "7304ede14c1a9cd087445cdfd8da26024d4c225cc6bc7325a3adc03700103047", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100010, + "name": "OpenIMDeleteGroupRequestsParams", + "declaration": "export type OpenIMDeleteGroupRequestsParams = {\n groupRequests : Array\n}", + "signatureHash": "3390b10cdde1fa0721ba81f478c9264c4c02d62c9efd83416ad2b59647cd44b2", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100011, + "name": "OpenIMSimpleFriendRequest", + "declaration": "export type OpenIMSimpleFriendRequest = {\n fromUserID : string\n toUserID : string\n}", + "signatureHash": "89da513c6d43feb27b3bcf104ede83ec0ba7e2efe31139a9bc4389dcb12805d0", + "edition": "commercial", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 100012, + "name": "OpenIMDeleteFriendRequestsParams", + "declaration": "export type OpenIMDeleteFriendRequestsParams = {\n friendRequests : Array\n}", + "signatureHash": "1574aaedf6eae57f4396d339a7e109b0b99d02fca37e7966ae805cf45579a1c6", + "edition": "commercial", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 100013, + "name": "OpenIMFullSyncResult", + "declaration": "export type OpenIMFullSyncResult = {\n IsFullSync ?: boolean | null\n}", + "signatureHash": "01f85c39ce5f7edcb0b09d7ccf79314248a7ad52e499bf7fc0d6c611bcda48a1", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100014, + "name": "OpenIMCheckGroupMemberFullSyncParams", + "declaration": "export type OpenIMCheckGroupMemberFullSyncParams = {\n groupID : string\n}", + "signatureHash": "f96346420760ef5d344ccc226bde651b8c78f69b4d883b8a05ff93db6ac6740b", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100015, + "name": "OpenIMGetBlacksResult", + "declaration": "export type OpenIMGetBlacksResult = {\n blacks : Array\n}", + "signatureHash": "f92620eeffc54dcf29b32f1b3dd22db61645644716a730f100f4c7bf70c8180b", + "edition": "commercial", + "page": "/sdk/uniapp/user/overview-user", + "disposition": "shared-model" + }, + { + "id": 100016, + "name": "OpenIMAtAllTagResult", + "declaration": "export type OpenIMAtAllTagResult = {\n tag : string\n}", + "signatureHash": "759ab39e0c8b40e9980c0fd091a31c6be2ed6fbfe304cebc443e59276e1a8299", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100017, + "name": "OpenIMSendGroupMessageReadReceiptParams", + "declaration": "export type OpenIMSendGroupMessageReadReceiptParams = {\n conversationID : string\n clientMsgIDs : Array\n}", + "signatureHash": "427b2c340ffb1d9442970ca538cdd9b92554885b75e75bb29d194b175a9faf72", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100018, + "name": "OpenIMGetGroupMessageReaderListParams", + "declaration": "export type OpenIMGetGroupMessageReaderListParams = {\n conversationID : string\n clientMsgID : string\n filter : number\n offset : number\n count : number\n}", + "signatureHash": "2115a19b5d41a288e1db21265d1051fa4eca851d555b93ffd5f208d23a3d81a1", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100019, + "name": "OpenIMGetGroupMessageReaderListResult", + "declaration": "export type OpenIMGetGroupMessageReaderListResult = {\n readers : Array\n}", + "signatureHash": "7b41515c8c8de636a7b5add1de5988bc446e61fd103bd72b4a3bea0ceac3ceb4", + "edition": "commercial", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "shared-model" + }, + { + "id": 100020, + "name": "OpenIMFetchSurroundingMessagesParams", + "declaration": "export type OpenIMFetchSurroundingMessagesParams = {\n startMessage : OpenIMMessageItem\n viewType : number\n before : number\n after : number\n}", + "signatureHash": "deca37cb445184c555abee481d150aee1a075b11e36d43df3dc8333f64da6262", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100021, + "name": "OpenIMFetchSurroundingMessagesResult", + "declaration": "export type OpenIMFetchSurroundingMessagesResult = {\n messages : Array\n}", + "signatureHash": "df616258153af8c79886749c8dc594e291923d53681649e73dc5c8f6b70ef923", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100022, + "name": "OpenIMModifyMessageParams", + "declaration": "export type OpenIMModifyMessageParams = {\n conversationID : string\n message : OpenIMMessageItem\n}", + "signatureHash": "92d82c5b20194b3eabc2ee24287e85a87de64b1d86874d9ef1b95a3b1796da6e", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100023, + "name": "OpenIMModifyMessageResult", + "declaration": "export type OpenIMModifyMessageResult = {\n message : OpenIMMessageItem | null\n}", + "signatureHash": "706f79239f3d1626c912a2ce06caaa28e45786127f2355770fe03ac3b9f2c1b3", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100024, + "name": "OpenIMSetConversationPinnedMsgParams", + "declaration": "export type OpenIMSetConversationPinnedMsgParams = {\n conversationID : string\n clientMsgID : string\n pinned : boolean\n}", + "signatureHash": "0a94f2dac27a3fc41ae63b5f8ccad2d4265153c8318ea31eab0d6dbb71d88ab3", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100025, + "name": "OpenIMGetConversationPinnedMsgParams", + "declaration": "export type OpenIMGetConversationPinnedMsgParams = {\n conversationID : string\n}", + "signatureHash": "8d01f6a49f7b47f38f69358fb70efd09340316ee67da22ab46c16208f1177b4b", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100026, + "name": "OpenIMGetConversationPinnedMsgResult", + "declaration": "export type OpenIMGetConversationPinnedMsgResult = {\n message : Array\n}", + "signatureHash": "f0f68ea537aef27605b758ca2502425ff8e09d5e03ca2bb165eae583f975419f", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100027, + "name": "OpenIMSetMessageLocalContentParams", + "declaration": "export type OpenIMSetMessageLocalContentParams = {\n conversationID : string\n message : OpenIMMessageItem\n}", + "signatureHash": "9fdc77b1e20075633b78f0d51e05caee6ef425eaa0e64f746ff28bbc038c185d", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100028, + "name": "OpenIMResetConversationUnreadParams", + "declaration": "export type OpenIMResetConversationUnreadParams = {\n conversationIDs : Array\n num : number\n}", + "signatureHash": "4cc3b79b541f3d842966c649651b11a7c80fd3b92b82d25bfa177443caee9408", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100029, + "name": "OpenIMGetHistoryMessageListParams", + "declaration": "export type OpenIMGetHistoryMessageListParams = {\n conversationID : string\n startClientMsgID : string\n count : number\n isReverse : boolean\n viewType ?: number | null\n lastMinSeq ?: number | null\n}", + "signatureHash": "0129e8c345d74fd4c8803ac1d06699a30668f1d90c3fedceedb1df2dc81cb916", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100030, + "name": "OpenIMDeleteMessagesParams", + "declaration": "export type OpenIMDeleteMessagesParams = {\n conversationID : string\n clientMsgIDs : Array\n IsSync : boolean\n}", + "signatureHash": "5ce5352a69f77e5fb8361a1bf7cc25bf90cbc20441cd9571b08abd3073ca6fde", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100031, + "name": "OpenIMDeleteUserAllMessagesInConvParams", + "declaration": "export type OpenIMDeleteUserAllMessagesInConvParams = {\n conversationID : string\n userID : string\n}", + "signatureHash": "196e3d0eca32ec4c2e548191970769899c0723d4bd4bbfb6b5d396186631b7ab", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100032, + "name": "OpenIMCreateMarkdownMessageParams", + "declaration": "export type OpenIMCreateMarkdownMessageParams = {\n content : string\n}", + "signatureHash": "6e235d0354f5ae44ea1a3ef9912c3f7ad46c5fb6278dc8f3966da43794e1e626", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "shared-model" + }, + { + "id": 100033, + "name": "OpenIMTypingStatusUpdateParams", + "declaration": "export type OpenIMTypingStatusUpdateParams = {\n recvID : string\n msgTip : string\n}", + "signatureHash": "8ba111614ef5e8bb1fff8ab520959e326219907c111d00cba16a296a67706596", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100034, + "name": "OpenIMConversationGroupType", + "declaration": "export type OpenIMConversationGroupType = 0 | 1", + "signatureHash": "12ff863bed0a626814dc612a70ae9c3b7fb8dcc5857b69aa734a8bb7bd57fc5b", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100035, + "name": "OpenIMConversationGroupQueryType", + "declaration": "export type OpenIMConversationGroupQueryType = 0 | 1 | 2", + "signatureHash": "1eb99a36a3bdf8886ed101ea2b298b489091ebe2151d6e55332b9a24a966d1bf", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100036, + "name": "OpenIMConversationGroupItem", + "declaration": "export type OpenIMConversationGroupItem = {\n conversationGroupID ?: string | null\n name ?: string | null\n order ?: number | null\n ex ?: string | null\n conversationGroupType ?: number | null\n hidden ?: boolean | null\n unreadCount ?: number | null\n conversationIDs ?: Array | null\n}", + "signatureHash": "fa966f5caca554653e5f05e0eb6c00b66ec3910d44372060573b6026a0bea8f5", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100037, + "name": "OpenIMCreateConversationGroupParams", + "declaration": "export type OpenIMCreateConversationGroupParams = {\n name : string\n order : number\n conversationGroupType : OpenIMConversationGroupType\n conversationID ?: string | null\n ex ?: string | null\n}", + "signatureHash": "9c7249bfe72e4ce1d737b2a87f3d264fc40a9be141761726206d613bf037fcbe", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100038, + "name": "OpenIMCreateConversationGroupResult", + "declaration": "export type OpenIMCreateConversationGroupResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n}", + "signatureHash": "e51364d58215c21d42a58e6ca65c9a4406e8f6173a5d1724bb7572966187fd80", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100039, + "name": "OpenIMUpdateConversationGroupParams", + "declaration": "export type OpenIMUpdateConversationGroupParams = {\n conversationGroupID : string\n name ?: string | null\n ex ?: string | null\n hidden ?: boolean | null\n}", + "signatureHash": "325d63d9e731c8138dd71b4d838299d6bde8ac72709764affad8c7e7b7b2ac5f", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100040, + "name": "OpenIMUpdateConversationGroupResult", + "declaration": "export type OpenIMUpdateConversationGroupResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n}", + "signatureHash": "4132132dbf4fb0803b0d019c408f232d2b51c36096ee08dc2f1ddab40ce3f0f9", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100041, + "name": "OpenIMDeleteConversationGroupParams", + "declaration": "export type OpenIMDeleteConversationGroupParams = {\n conversationGroupID : string\n}", + "signatureHash": "ba0141d23b7f355c850b555869ceee41af309046e6eba132b4b0ad6ef4da550a", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100042, + "name": "OpenIMGetConversationGroupsParams", + "declaration": "export type OpenIMGetConversationGroupsParams = {\n conversationGroupType : OpenIMConversationGroupQueryType\n}", + "signatureHash": "9247600af4524460c750120143a67502be490b8f73cea0559a0dbf88c10b18b8", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100043, + "name": "OpenIMGetConversationGroupsResult", + "declaration": "export type OpenIMGetConversationGroupsResult = {\n conversationGroups : Array\n}", + "signatureHash": "a209d93276d37a81656da3a08f242d54f8595264995476ad0cd48e145833a35f", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100044, + "name": "OpenIMConversationGroupOrder", + "declaration": "export type OpenIMConversationGroupOrder = {\n conversationGroupID : string\n order : number\n}", + "signatureHash": "dd5be62c5c64eb525b58e9c2b67797995872dec10282478b69d439b94ad35dea", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100045, + "name": "OpenIMSetConversationGroupOrderParams", + "declaration": "export type OpenIMSetConversationGroupOrderParams = {\n conversationGroupOrders : Array\n}", + "signatureHash": "eb1927feb3f1f9d8d1a1cae677a9ac2c3fa6dd7ee2d0b0b6677cc50c32d0ae68", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100046, + "name": "OpenIMConversationGroupMembershipParams", + "declaration": "export type OpenIMConversationGroupMembershipParams = {\n conversationIDs : Array\n conversationGroupIDs : Array\n}", + "signatureHash": "464a1b078d7ae4b07fc1fbc97ca27964b8c862ab3e1a2bdb2bcfe6a0045813b4", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100047, + "name": "OpenIMGetConversationGroupByConversationIDParams", + "declaration": "export type OpenIMGetConversationGroupByConversationIDParams = {\n conversationID : string\n}", + "signatureHash": "c7f0df27931b915b979cea557b67afbc2a11cd586b031aabfca472f0a36b475d", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100048, + "name": "OpenIMGetConversationGroupByConversationIDResult", + "declaration": "export type OpenIMGetConversationGroupByConversationIDResult = {\n conversationGroups : Array\n}", + "signatureHash": "de14da9c0a7f5cd8e3ff732df453f2b77632ff1e8bac003fc822cb65b24b3399", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100049, + "name": "OpenIMRequestPagination", + "declaration": "export type OpenIMRequestPagination = {\n pageNumber : number\n showNumber : number\n}", + "signatureHash": "4752afcfa9749a4b1e879b1a95634fce9282d4a5b4d64c72f29d88aab4a2a663", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100050, + "name": "OpenIMGetConversationGroupInfoWithConversationsParams", + "declaration": "export type OpenIMGetConversationGroupInfoWithConversationsParams = {\n conversationGroupID : string\n pagination : OpenIMRequestPagination\n}", + "signatureHash": "ae351f2340003c46e00e18d038e22465ed7170bb08fc40dd6d737d951e917fc0", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100051, + "name": "OpenIMGetConversationGroupInfoWithConversationsResult", + "declaration": "export type OpenIMGetConversationGroupInfoWithConversationsResult = {\n conversationGroup : OpenIMConversationGroupItem | null\n ConversationTotal ?: number | null\n conversations : Array\n}", + "signatureHash": "88a475af41b7c6fb5fcda42f1471fea22a89ef22bfa1f0adb0254608fd03b420", + "edition": "commercial", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "shared-model" + }, + { + "id": 100052, + "name": "OpenIMSignalingParticipantMetaData", + "declaration": "export type OpenIMSignalingParticipantMetaData = {\n user : OpenIMUserInfo\n}", + "signatureHash": "7f82cc06c4b94db3723b6a15374eeea5c0e264d01dcda6c1029e9e182f4cec8f", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100053, + "name": "OpenIMSignalingOfflinePushInfo", + "declaration": "export type OpenIMSignalingOfflinePushInfo = {\n title ?: string | null\n desc ?: string | null\n ex ?: string | null\n iOSPushSound ?: string | null\n iOSBadgeCount ?: boolean | null\n SignalingInfo ?: string | null\n}", + "signatureHash": "227d07d1ca8ed4e516aa77e803d50cfc95d7b838b38fed5538f346d871191479", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100054, + "name": "OpenIMSignalingInvitationInfo", + "declaration": "export type OpenIMSignalingInvitationInfo = {\n inviterUserID ?: string | null\n inviteeUserIDList ?: Array | null\n customData ?: string | null\n groupID ?: string | null\n roomID ?: string | null\n timeout ?: number | null\n mediaType ?: string | null\n platformID ?: number | null\n sessionType ?: number | null\n initiateTime ?: number | null\n busyLineUserIDList ?: Array | null\n}", + "signatureHash": "2a2cd6bbfece9f0d52a1fac33f543ffa6377ca79d719ffbd9c442ef536035016", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100055, + "name": "OpenIMSignalingInviteParams", + "declaration": "export type OpenIMSignalingInviteParams = {\n invitation : OpenIMSignalingInvitationInfo\n offlinePushInfo ?: OpenIMSignalingOfflinePushInfo | null\n}", + "signatureHash": "a7ca4012035864408140448756d5afab592dd38efa28f065152c23abfc9b67a2", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100056, + "name": "OpenIMSignalingInviteInGroupParams", + "declaration": "export type OpenIMSignalingInviteInGroupParams = OpenIMSignalingInviteParams", + "signatureHash": "8216c8af986c5a8d44d08506247f64ff7563580e0155b65c48fc8e5d91d3ccba", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100057, + "name": "OpenIMSignalingInviteResult", + "declaration": "export type OpenIMSignalingInviteResult = {\n invitation ?: OpenIMSignalingInvitationInfo | null\n token ?: string | null\n roomID ?: string | null\n liveURL ?: string | null\n busyLineUserIDList ?: Array | null\n}", + "signatureHash": "bd9991f759d344632974696dea5ea6d78cabda4d603333037512c261981ca413", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100058, + "name": "OpenIMSignalingAcceptParams", + "declaration": "export type OpenIMSignalingAcceptParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "b1144308a0c5854bc5d5b4c2e61a1453775ae6d0b12752eccb6f21c41f999b6c", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100059, + "name": "OpenIMSignalingAcceptResult", + "declaration": "export type OpenIMSignalingAcceptResult = {\n invitation ?: OpenIMSignalingInvitationInfo | null\n token ?: string | null\n roomID ?: string | null\n liveURL ?: string | null\n}", + "signatureHash": "f4e18ac1e9e1b2a67a034c8297af24dd8d768ec6ba9440a1c04f0fcb412449ce", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100060, + "name": "OpenIMSignalingRejectParams", + "declaration": "export type OpenIMSignalingRejectParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "9bd2bbd4f7b2cbb560507cb697990ee68b048b11678c48582f7d5c84790acfb5", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100061, + "name": "OpenIMSignalingCancelParams", + "declaration": "export type OpenIMSignalingCancelParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "e9cbc97764d15bba061d8f48f586b31aeaa26a1345b510273054d0c3c5ac8624", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100062, + "name": "OpenIMSignalingHungUpParams", + "declaration": "export type OpenIMSignalingHungUpParams = {\n invitation : OpenIMSignalingInvitationInfo\n}", + "signatureHash": "604f16df72d44957462b43eae073959e41801c92e933051494d6d1c58c24047c", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100063, + "name": "OpenIMSignalingGetTokenByRoomIDParams", + "declaration": "export type OpenIMSignalingGetTokenByRoomIDParams = {\n roomID : string\n}", + "signatureHash": "8e9b8308c24ba9d534d2dedeb85aad6158a5ad8325e6410d82c7da1ff7be102e", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100064, + "name": "OpenIMSignalingGetTokenByRoomIDResult", + "declaration": "export type OpenIMSignalingGetTokenByRoomIDResult = {\n token ?: string | null\n liveURL ?: string | null\n}", + "signatureHash": "5cbe0aa3024b8871e95d623851a8b9fa7b0a26c1e9528b9f93862f3eb4278dc4", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100065, + "name": "OpenIMSignalingGetRoomByGroupIDParams", + "declaration": "export type OpenIMSignalingGetRoomByGroupIDParams = {\n groupID : string\n}", + "signatureHash": "2ece2d21c944c9d8cff02201512002ddc58d4998342dca589c19dc94c51a5d5c", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100066, + "name": "OpenIMSignalingGetRoomByGroupIDResult", + "declaration": "export type OpenIMSignalingGetRoomByGroupIDResult = {\n roomID ?: string | null\n invitation ?: OpenIMSignalingInvitationInfo | null\n}", + "signatureHash": "f855fc74145371b26b56054ec77e242c74a9351d28dede9ab433615f99afdffb", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100067, + "name": "OpenIMSignalingGetInvitationInfoStartAppParams", + "declaration": "export type OpenIMSignalingGetInvitationInfoStartAppParams = {\n userID ?: string | null\n}", + "signatureHash": "1729a31b4c181aee1c21c4a9c5030a75bc4b9256095352ba4f23b07b2675ae10", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100068, + "name": "OpenIMSignalingGetInvitationInfoStartAppResult", + "declaration": "export type OpenIMSignalingGetInvitationInfoStartAppResult = {\n invitation : OpenIMSignalingInvitationInfo | null\n}", + "signatureHash": "214cf70f06f12517fb27b8d940bd1677c83e3c3402c5719ec2b91706023039e1", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100069, + "name": "OpenIMSignalingSendCustomSignalingParams", + "declaration": "export type OpenIMSignalingSendCustomSignalingParams = {\n roomID : string\n customInfo : string\n}", + "signatureHash": "f06a8670dabc25fdb5490dd12d84d2bbc063611bf51f760ad14a972881872637", + "edition": "commercial", + "page": "/sdk/uniapp/calling/overview-calling", + "disposition": "shared-model" + }, + { + "id": 100074, + "name": "OpenIMSDKSessionSnapshot", + "declaration": "export type OpenIMSDKSessionSnapshot = {\n loginStatus : OpenIMLoginStatus\n userID : string | null\n sdkSessionEpoch : number\n sdkVersion : string\n}", + "signatureHash": "715fc3449def9ad437e4538a725cd49bd7e2a35d6931b7950e1271b8cba2027b", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100075, + "name": "SDKSessionChangedHandler", + "declaration": "export type SDKSessionChangedHandler = (snapshot : OpenIMSDKSessionSnapshot) => void", + "signatureHash": "93c38c8d519816c3d517f1fb867e6003e256cec1cb46efdc664db3de998b8c9b", + "edition": "commercial", + "page": null, + "disposition": "signature-only" + }, + { + "id": 100076, + "name": "GetSDKSessionSnapshot", + "declaration": "export type GetSDKSessionSnapshot = () => Promise", + "signatureHash": "11589bab4789e101cca7343b7a95e06ed664ac057c64aaac64e2071796191d0e", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + }, + { + "id": 100077, + "name": "OnSDKSessionChanged", + "declaration": "export type OnSDKSessionChanged = (handler : SDKSessionChangedHandler) => OpenIMSDKEventSubscription", + "signatureHash": "8f8b60d0c42a38b1d9b450613a5bbf0e54a8c28c446bab8f9cf6f4f7fb19f91d", + "edition": "commercial", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "shared-model" + } + ], + "constants": [ + { + "id": 1, + "name": "OpenIMMessageStatusNotExist", + "type": "OpenIMMessageStatus", + "value": "0", + "signatureHash": "2a4b381a80b67e1204ce1408e1c9716d76bd127abb51b6e38bb412eb4ac2b281", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 2, + "name": "OpenIMMessageStatusSending", + "type": "OpenIMMessageStatus", + "value": "1", + "signatureHash": "070e728a9a77022fe21a407bbe20cd4b5563db65d7eba0c96d4013d6a21c7c15", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 3, + "name": "OpenIMMessageStatusSucceed", + "type": "OpenIMMessageStatus", + "value": "2", + "signatureHash": "4d57b2f3a1229cc4076674e4f6efe40266f6f4914d36828b56f3a6327af95dbd", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 4, + "name": "OpenIMMessageStatusFailed", + "type": "OpenIMMessageStatus", + "value": "3", + "signatureHash": "32072ad37fba2c7eb5d8e8aea0db4c9c64c0b531c12f9e6cddf8cdf555b27f99", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 5, + "name": "OpenIMMessageStatusDeleted", + "type": "OpenIMMessageStatus", + "value": "4", + "signatureHash": "194d15beeaefb3cda73b2259ac4e00757cc25bb5a63ae50c5052affdc38dd1de", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 6, + "name": "OpenIMMessageStatusFiltered", + "type": "OpenIMMessageStatus", + "value": "5", + "signatureHash": "7012a2915edc26d1988dd663a3d30c4b2ed5b8e22a1dd0f077e74c7937508098", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 7, + "name": "OpenIMPlatformIOS", + "type": "OpenIMPlatform", + "value": "1", + "signatureHash": "e6e38b8de87db7b61c243148707ecdfdeb061ae861c5f648d17c0aa8c7106539", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 8, + "name": "OpenIMPlatformAndroid", + "type": "OpenIMPlatform", + "value": "2", + "signatureHash": "d4a78094e10c034f911c5673351e432e483c31b78816ab2fecc62512ef0ac57b", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 9, + "name": "OpenIMPlatformWindows", + "type": "OpenIMPlatform", + "value": "3", + "signatureHash": "b41afae1e8edeeafde20ae166a139e47053e7eb4c0def7c984ceac67ddbdf206", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 10, + "name": "OpenIMPlatformMacOSX", + "type": "OpenIMPlatform", + "value": "4", + "signatureHash": "90816949b6b443ef2496b58eebb6091afa35050a3400d4fb94da32d431b55ae7", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 11, + "name": "OpenIMPlatformWeb", + "type": "OpenIMPlatform", + "value": "5", + "signatureHash": "f5376e51c3784fbbbf99e841924ec8888b018772799dde5c8162035adce7093f", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 12, + "name": "OpenIMPlatformMiniWeb", + "type": "OpenIMPlatform", + "value": "6", + "signatureHash": "cb850fe970c49f30459c3106e1c94fd91d21d089c14dd5a72f7550b0738fbb0f", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 13, + "name": "OpenIMPlatformLinux", + "type": "OpenIMPlatform", + "value": "7", + "signatureHash": "4e0bbbb9c862eaaff848bdeae582242b0c42091058a2f442da707d137f02079d", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 14, + "name": "OpenIMPlatformAndroidPad", + "type": "OpenIMPlatform", + "value": "8", + "signatureHash": "060296c24e70b3c35c56c8a541e712c5be1818538c0fb3870d733d2a00cd2e4d", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 15, + "name": "OpenIMPlatformIPad", + "type": "OpenIMPlatform", + "value": "9", + "signatureHash": "a65f7f7127fc25fee8d1a30d4ba3c27245bea17b5c162492f0ea9e06e06cfd49", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 16, + "name": "OpenIMPlatformAdmin", + "type": "OpenIMPlatform", + "value": "10", + "signatureHash": "88769580d90807f6b33a082b6280a63c75513610306473852679d469492bd8d7", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 17, + "name": "OpenIMPlatformHarmony", + "type": "OpenIMPlatform", + "value": "11", + "signatureHash": "d4d286cb1276a7e9ebe85b55dd6e6b0f4a8c49009e780f37e557338c10acedc4", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 18, + "name": "OpenIMLogLevelPanic", + "type": "OpenIMLogLevel", + "value": "0", + "signatureHash": "c0a8c5932fe32bcf89c963a2159e7d1c7795204b16b550de80d39253f8b2d7ed", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 19, + "name": "OpenIMLogLevelFatal", + "type": "OpenIMLogLevel", + "value": "1", + "signatureHash": "8e0068bb3abe2ba62268a777aa5cb304d06bb2f2655c22c43e8b044ddf5405e3", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 20, + "name": "OpenIMLogLevelError", + "type": "OpenIMLogLevel", + "value": "2", + "signatureHash": "b90392e54565f0a3b45ca83979173727804d8b4dc84fb3152af1b0b186ff2d8b", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 21, + "name": "OpenIMLogLevelWarn", + "type": "OpenIMLogLevel", + "value": "3", + "signatureHash": "4e98ffd53d102275b511c53fd32dc3ec14000d0b5c96c2fb7954da5cd1cefa99", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 22, + "name": "OpenIMLogLevelInfo", + "type": "OpenIMLogLevel", + "value": "4", + "signatureHash": "feac04d582af5d99464224e52e576c9780f22538363164c3208dc1a59a317122", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 23, + "name": "OpenIMLogLevelDebug", + "type": "OpenIMLogLevel", + "value": "5", + "signatureHash": "ec21ea478d6357ef935f4070688e3d1075965325c75d9725d94539c517697229", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 24, + "name": "OpenIMLogLevelVerbose", + "type": "OpenIMLogLevel", + "value": "6", + "signatureHash": "7b8aac06c6557b7dfc445ef97babc4fc5ff240c7d3db31a4af5a2474601f9fbf", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 25, + "name": "OpenIMMessageTypeText", + "type": "OpenIMMessageType", + "value": "101", + "signatureHash": "e59ced7cb303c70e55a67099cbdd00fe688ea0c0648bba8b319be58e14ed71f9", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 26, + "name": "OpenIMMessageTypePicture", + "type": "OpenIMMessageType", + "value": "102", + "signatureHash": "e5c2fe4cba1366314eb30b4b4cfd2acba61284a2d4958bc52e5ea07a86cf3a32", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 27, + "name": "OpenIMMessageTypeVoice", + "type": "OpenIMMessageType", + "value": "103", + "signatureHash": "e0adce21bb0e9b8bc66f1770d774aa64517c3cae10531ddb6568f65b6edbe83f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 28, + "name": "OpenIMMessageTypeVideo", + "type": "OpenIMMessageType", + "value": "104", + "signatureHash": "96a8ec045bec323a2af3a707aba03f95c68332fc5cd106aaa0cc1b3cf98c67b5", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 29, + "name": "OpenIMMessageTypeFile", + "type": "OpenIMMessageType", + "value": "105", + "signatureHash": "d46a65a1d61a164d70d68bb4df0c986feb89385251dac68e1003e57612045242", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 30, + "name": "OpenIMMessageTypeAtText", + "type": "OpenIMMessageType", + "value": "106", + "signatureHash": "7b76708a3e80ae11759af633b060abc2cad41b9736fc7f72bdbeee876e55f775", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 31, + "name": "OpenIMMessageTypeMerge", + "type": "OpenIMMessageType", + "value": "107", + "signatureHash": "7ef0baf1e0b66a32ba28842ea3b474f5c045648de6d11cbde85cde4746540473", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 32, + "name": "OpenIMMessageTypeCard", + "type": "OpenIMMessageType", + "value": "108", + "signatureHash": "87446dbf6c07eee050f3677be1bf8f8af8c48431d64059574ce94bd131ab2dff", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 33, + "name": "OpenIMMessageTypeLocation", + "type": "OpenIMMessageType", + "value": "109", + "signatureHash": "180aa305e0e9a3541fcb46f1756c0789b8cea3fbee27d10ca369d59feccf2e4e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 34, + "name": "OpenIMMessageTypeCustom", + "type": "OpenIMMessageType", + "value": "110", + "signatureHash": "184c7c18e9d595c7b3bebca29d519869407fd459603a0453df6d9bbb6d3965d6", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 35, + "name": "OpenIMMessageTypeRevoke", + "type": "OpenIMMessageType", + "value": "111", + "signatureHash": "73e358e0e75eec7fd893ff532d13ccef60effa8c621f751e8706f04816fa575f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 36, + "name": "OpenIMMessageTypeTyping", + "type": "OpenIMMessageType", + "value": "113", + "signatureHash": "a699dd4ac56aab9a14dbdde4dc26f9033fefe3c9c92c6efc5a835c269bd299f4", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 37, + "name": "OpenIMMessageTypeQuote", + "type": "OpenIMMessageType", + "value": "114", + "signatureHash": "f034d2eb36576016b460885877e0c6a8caeeaa4bb0e9a4c416947eefc20ad8e2", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 38, + "name": "OpenIMMessageTypeFace", + "type": "OpenIMMessageType", + "value": "115", + "signatureHash": "6fac65dc2a469f74ef365769a110e5384543defd0a4abbc8187e7c5720671ae4", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 39, + "name": "OpenIMMessageTypeAdvancedText", + "type": "OpenIMMessageType", + "value": "117", + "signatureHash": "3a35eb1fe16a5888890844e6e747270e9df67a7b8238ffc267ec1d1b8d203b0f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 40, + "name": "OpenIMMessageTypeMarkdownText", + "type": "OpenIMMessageType", + "value": "118", + "signatureHash": "df5d043f97af2aa804122585527dab19c7e23da0b92291174c9f5cedfd5cc93f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 41, + "name": "OpenIMMessageTypeCustomNotTriggerConversation", + "type": "OpenIMMessageType", + "value": "119", + "signatureHash": "4cec7fa964ead6b7dd79ea8ca27ab13dcb288672776f1715b704a8c45b6d276c", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 42, + "name": "OpenIMMessageTypeCustomOnlineOnly", + "type": "OpenIMMessageType", + "value": "120", + "signatureHash": "f073abc70384000b818510f4ff94e72283ae053fdfce4a3a642edd35a9b68525", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 43, + "name": "OpenIMMessageTypeReactionModifier", + "type": "OpenIMMessageType", + "value": "121", + "signatureHash": "1409dcead0595e33e1f2d89d6bb0022052effee02fd702a2aa5db60700e5ffe4", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 44, + "name": "OpenIMMessageTypeReactionDeleter", + "type": "OpenIMMessageType", + "value": "122", + "signatureHash": "4ac105d88abe582979595f9e4f88549b8a27670b586d39e75a96d7988086f1a5", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 45, + "name": "OpenIMMessageTypeStream", + "type": "OpenIMMessageType", + "value": "143", + "signatureHash": "08831b08629d84dfed0f81b8d824321b1738f4808af02766e585f05b9aab678d", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 46, + "name": "OpenIMMessageTypeCommon", + "type": "OpenIMMessageType", + "value": "200", + "signatureHash": "72fd4e17dc1564f0462b2c673fac4346f40e090e198751f8c167ebfab01107db", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 47, + "name": "OpenIMMessageTypeGroupMsg", + "type": "OpenIMMessageType", + "value": "201", + "signatureHash": "479d65c81f9487fadd882dc9b7207a20581b026b3cf809adae7b11dbea367b66", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 48, + "name": "OpenIMMessageTypeSignalMsg", + "type": "OpenIMMessageType", + "value": "202", + "signatureHash": "0633498bf4aa0cebabc10c5a02c11d78b9b774e087813e663c75e49a33fc03c8", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 49, + "name": "OpenIMMessageTypeCustomNotification", + "type": "OpenIMMessageType", + "value": "203", + "signatureHash": "294ae910cc0dae841faff0c22dfda6c16b212f224a5faa6fb67c17b6882b349b", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 50, + "name": "OpenIMMessageTypeFriendApplicationApproved", + "type": "OpenIMMessageType", + "value": "1201", + "signatureHash": "e917437a1bf81159bd18139502aa54fd1723dc57f6517c1a901d9982ba0ddb85", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 51, + "name": "OpenIMMessageTypeFriendApplicationRejected", + "type": "OpenIMMessageType", + "value": "1202", + "signatureHash": "d9c885eab0e64b8d8ba4664111b5995833a373f285027865d897b4bfe62398c0", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 52, + "name": "OpenIMMessageTypeFriendApplication", + "type": "OpenIMMessageType", + "value": "1203", + "signatureHash": "6bb4694b38d8d7154b74f5cdcd1005737951fc2566e482a1214b0af0252390ad", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 53, + "name": "OpenIMMessageTypeFriendAdded", + "type": "OpenIMMessageType", + "value": "1204", + "signatureHash": "f81e08c5fe98bebebe6191b221066e06951e27c459a03a11f285fa01e99e741a", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 54, + "name": "OpenIMMessageTypeFriendDeleted", + "type": "OpenIMMessageType", + "value": "1205", + "signatureHash": "9bbb020ec836e0261231ba2e667fa8c71512cb61467c370c5e0e077acd98097a", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 55, + "name": "OpenIMMessageTypeFriendRemarkSet", + "type": "OpenIMMessageType", + "value": "1206", + "signatureHash": "b2ab8dee0430fced5f0ab29cd18e8918a2a55103fc9cf4c7d6e7731de7af7271", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 56, + "name": "OpenIMMessageTypeBlackAdded", + "type": "OpenIMMessageType", + "value": "1207", + "signatureHash": "e7d92f8ca77eb51d6cc1f02ba38b07f586b5990afaa0c2d4038c08f4ee49297e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 57, + "name": "OpenIMMessageTypeBlackDeleted", + "type": "OpenIMMessageType", + "value": "1208", + "signatureHash": "29edb1aed1677b93f3927b6d6d717ee9b5e4cd6fd81dab632e0c44e92cfb866e", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 58, + "name": "OpenIMMessageTypeFriendInfoUpdated", + "type": "OpenIMMessageType", + "value": "1209", + "signatureHash": "4a50fd797c30391e94840ed101f5be09f3ff2884e8f362e7c77ec82c969470e2", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 59, + "name": "OpenIMMessageTypeFriendsInfoUpdated", + "type": "OpenIMMessageType", + "value": "1210", + "signatureHash": "7b871aead5bb83feae308459e09b5f1c38f41126cb19c138fe2c67d1c6ef5578", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 60, + "name": "OpenIMMessageTypeConversationChanged", + "type": "OpenIMMessageType", + "value": "1300", + "signatureHash": "3efa94bfecd5a9fc8904e5c7b66f2f994b6855a442e446b8503b77bb7d02a159", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 61, + "name": "OpenIMMessageTypeUserInfoUpdated", + "type": "OpenIMMessageType", + "value": "1303", + "signatureHash": "7dd1b75a310cfdd8b01b6306af9756ba21a7dc03463a518ba063b94348ed1897", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 62, + "name": "OpenIMMessageTypeUserStatusChanged", + "type": "OpenIMMessageType", + "value": "1304", + "signatureHash": "158f2115e8c1b8ff6da7ca4e023408e525a12d7d3d165214001cd12940b20322", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 63, + "name": "OpenIMMessageTypeUserSubscribeOnlineStatus", + "type": "OpenIMMessageType", + "value": "1308", + "signatureHash": "8ae42b719541a04b42bcafa017f1f3fe318df82ab8a230b993966f01e2d445ca", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 64, + "name": "OpenIMMessageTypeOANotification", + "type": "OpenIMMessageType", + "value": "1400", + "signatureHash": "56c83fb8f874a6f18ebddebb8583a1e61d3872c3f159705a6d063e4c2ba56ecd", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 65, + "name": "OpenIMMessageTypeGroupCreated", + "type": "OpenIMMessageType", + "value": "1501", + "signatureHash": "bd1b1a645a92dbe313e457b961c01d012e55b2cc20e126cdd06cbf5622e7c9eb", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 66, + "name": "OpenIMMessageTypeGroupInfoUpdated", + "type": "OpenIMMessageType", + "value": "1502", + "signatureHash": "80c9fb644fba0c4cbdf9dd3d2195c696ba41aa7b64cda45ee14e5a0450732f2c", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 67, + "name": "OpenIMMessageTypeJoinGroupApplication", + "type": "OpenIMMessageType", + "value": "1503", + "signatureHash": "484a7c4eecb280e27333f4b80f7831ebb4b7f1d1f25764abec56633afe66060f", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 68, + "name": "OpenIMMessageTypeMemberQuit", + "type": "OpenIMMessageType", + "value": "1504", + "signatureHash": "ba0ffeefdf7ff09645fbcec9a4c0ec06c4507c90768e2410e3e4d236e8ebe0d2", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 69, + "name": "OpenIMMessageTypeGroupApplicationAccepted", + "type": "OpenIMMessageType", + "value": "1505", + "signatureHash": "a281ff8f075f64313f182378715eabbd502bf6e187b43170c0594f383f55e8a4", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 70, + "name": "OpenIMMessageTypeGroupApplicationRejected", + "type": "OpenIMMessageType", + "value": "1506", + "signatureHash": "465ff14d67e0cd9ef9376f36e1584e7de775aa5211fca1097158254926dc18c0", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 71, + "name": "OpenIMMessageTypeGroupOwnerTransferred", + "type": "OpenIMMessageType", + "value": "1507", + "signatureHash": "2e3568f962310719898e8c49fe4c6f24825b6e71e00dd10cd80e56052bdcb5b9", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 72, + "name": "OpenIMMessageTypeMemberKicked", + "type": "OpenIMMessageType", + "value": "1508", + "signatureHash": "eb7f8288a4921d76622f749e49927baefe1127511d025f7319216058434b6149", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 73, + "name": "OpenIMMessageTypeMemberInvited", + "type": "OpenIMMessageType", + "value": "1509", + "signatureHash": "cd9e309b187ff3166aa66aff02d39798bb4da9a0728ac2e71e83b784bbf12c88", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 74, + "name": "OpenIMMessageTypeMemberEnter", + "type": "OpenIMMessageType", + "value": "1510", + "signatureHash": "5ccccee453e561c6a1c7c22236049d85b7c7cac4f1f878e56ebc77626da334d6", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 75, + "name": "OpenIMMessageTypeGroupDismissed", + "type": "OpenIMMessageType", + "value": "1511", + "signatureHash": "9b99cb57cce0e84205459f5cb4db94eda23e7563a8f5d51b6386c9dc76671bb8", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 76, + "name": "OpenIMMessageTypeGroupMemberMuted", + "type": "OpenIMMessageType", + "value": "1512", + "signatureHash": "c0d5d8de0202e47af2b8ac939362a225e7de4af12ae2b9669f15a0c6d01d63a7", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 77, + "name": "OpenIMMessageTypeGroupMemberCancelMuted", + "type": "OpenIMMessageType", + "value": "1513", + "signatureHash": "ae0fab64c6dcdebd2a70c961ccb57b4776278bbc3abf221a5870cba7621a42e6", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 78, + "name": "OpenIMMessageTypeGroupMuted", + "type": "OpenIMMessageType", + "value": "1514", + "signatureHash": "ed1982e496801073ae7d26867cabee6fccd4a3c3ba4a0fc143417f808b801640", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 79, + "name": "OpenIMMessageTypeGroupCancelMuted", + "type": "OpenIMMessageType", + "value": "1515", + "signatureHash": "f6bac2a5eb233123fbd5e8802edeb8894fb70e4922860de34253ad1c216a8ef2", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 80, + "name": "OpenIMMessageTypeGroupMemberInfoUpdated", + "type": "OpenIMMessageType", + "value": "1516", + "signatureHash": "5c045cbc1cc24ef75bd867265860cf05f160df31d539a1a184e2c72e7a805215", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 81, + "name": "OpenIMMessageTypeGroupMemberSetToAdmin", + "type": "OpenIMMessageType", + "value": "1517", + "signatureHash": "e5b2c2407efa9abb7b8ba646f81ea075595e854d91eec0a9d84516b514c291f7", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 82, + "name": "OpenIMMessageTypeGroupMemberSetToOrdinaryUser", + "type": "OpenIMMessageType", + "value": "1518", + "signatureHash": "b743e9afb175eb6c2d7e2a28ddc883144eb4be3da70b34b7bdc82d618f35ac08", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 83, + "name": "OpenIMMessageTypeGroupAnnouncementUpdated", + "type": "OpenIMMessageType", + "value": "1519", + "signatureHash": "c0a5857216c66ed71859cfa5cfae3892717db278596ae6fd56f038f93452aeb9", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 84, + "name": "OpenIMMessageTypeGroupNameUpdated", + "type": "OpenIMMessageType", + "value": "1520", + "signatureHash": "c1b6e4c0a8a99c8d24e125fd9def524a4d4bb5de6f25ba640286f95cbc3f83e0", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 85, + "name": "OpenIMMessageTypeSuperGroupUpdated", + "type": "OpenIMMessageType", + "value": "1651", + "signatureHash": "42a3e7a5324c3eea35a9b960988ecfeda75906e698ed4bea846c275945eec3f3", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 86, + "name": "OpenIMMessageTypeMsgDeleted", + "type": "OpenIMMessageType", + "value": "1652", + "signatureHash": "496eae88bdd81bf7040a4eaedb13340dc690b2f8179328b8a51d731440ffe071", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 87, + "name": "OpenIMMessageTypeBurnMessageChange", + "type": "OpenIMMessageType", + "value": "1701", + "signatureHash": "07f3b0fd30bab3a763ea9c2bbc7582c8a7168e5a3bdd5d5a680f82de2d724b00", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 88, + "name": "OpenIMMessageTypeConversationPrivateChat", + "type": "OpenIMMessageType", + "value": "1701", + "signatureHash": "41302b1649327e5b43328bbbc928e0229f2f27878b4b3cf37cc173924f6db317", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 89, + "name": "OpenIMMessageTypeConversationUnread", + "type": "OpenIMMessageType", + "value": "1702", + "signatureHash": "2554e6b9a8e42a9713008b325d8161e24f6397202150aec964153ad60d305203", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 90, + "name": "OpenIMMessageTypeClearConversation", + "type": "OpenIMMessageType", + "value": "1703", + "signatureHash": "9b03e7b7d33ea062af3be9ab6b11295fdda136e8b1e9e6933613267971c5d028", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 91, + "name": "OpenIMMessageTypeConversationGroupChanged", + "type": "OpenIMMessageType", + "value": "1704", + "signatureHash": "11fd2db040c40c59f28425dbaabb7effd1c535c056862c8cbe710a5856741450", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 92, + "name": "OpenIMMessageTypeBusinessNotification", + "type": "OpenIMMessageType", + "value": "2001", + "signatureHash": "2e090397c74a4a655ac236f1fb8bff5560205adb8a8ebfb8b3262217461a5ca7", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 93, + "name": "OpenIMMessageTypeRevokeMessage", + "type": "OpenIMMessageType", + "value": "2101", + "signatureHash": "dfb60feb5232a1303a4a5aa3391e94e53678974a214cbd65980dbe9e06469418", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 94, + "name": "OpenIMMessageTypeDeleteMessages", + "type": "OpenIMMessageType", + "value": "2102", + "signatureHash": "1a021e3a15c68b570ac2c2bb28f3338b5003f925e0638e609716301d9604a8e1", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 95, + "name": "OpenIMMessageTypeModifyMessage", + "type": "OpenIMMessageType", + "value": "2103", + "signatureHash": "e9f254a20508cd856176a287a18261996c7ffbd0d86b5adcefea1b676bdde0d2", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 96, + "name": "OpenIMMessageTypeDeleteUserAllMessagesInConversation", + "type": "OpenIMMessageType", + "value": "2150", + "signatureHash": "212c96d6b66c26acf56219978140a8e9923df51902da9111234969e14103df21", + "edition": "public", + "page": "/sdk/uniapp/conversation/overview-conversation", + "disposition": "documented" + }, + { + "id": 97, + "name": "OpenIMMessageTypeHasReadReceipt", + "type": "OpenIMMessageType", + "value": "2200", + "signatureHash": "16dc95633a698fc1af48f1d1208418f2cf26a09595260fd73aa5ca2f15de79fc", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 98, + "name": "OpenIMMessageTypeHasResetUnreadReceipt", + "type": "OpenIMMessageType", + "value": "2210", + "signatureHash": "eba37f5670dd25c39aca09240f9e2e0829419b2b0fb8bcea18047da65ab2760f", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 99, + "name": "OpenIMMessageTypeHasGroupReadReceipt", + "type": "OpenIMMessageType", + "value": "2300", + "signatureHash": "bf64c05ff943cf993073771fc7325410f51077b919b8fc2142f28197005767a2", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 100, + "name": "OpenIMMessageTypePinned", + "type": "OpenIMMessageType", + "value": "2400", + "signatureHash": "c10057828a57a53d32efeefa64280f84c49fe9f584031a9b19f24e42d7d8aea5", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 101, + "name": "OpenIMMessageTypePinnedRead", + "type": "OpenIMMessageType", + "value": "2401", + "signatureHash": "df316b0c18a9cc4abb85fdc9c0ecc9b19f11a7022fdcbd5f6481099cc4c6e11c", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 102, + "name": "OpenIMMessageTypeStreamNotification", + "type": "OpenIMMessageType", + "value": "2500", + "signatureHash": "777e3161b61a07a8f97bd4468b47fb9150b36ce50a22416929fc9b00bd6b4fef", + "edition": "public", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "documented" + }, + { + "id": 103, + "name": "OpenIMSessionTypeSingle", + "type": "OpenIMSessionType", + "value": "1", + "signatureHash": "68748002bd1f8251ec2268aaacf2518bc5cc40b14490fe02fc46fc39cec9e707", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 104, + "name": "OpenIMSessionTypeWriteGroup", + "type": "OpenIMSessionType", + "value": "2", + "signatureHash": "61496eeda0e9535aae6221dabcf64dde69037008568b24a07bbf941cd79105e2", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 105, + "name": "OpenIMSessionTypeGroup", + "type": "OpenIMSessionType", + "value": "3", + "signatureHash": "7f21ec4de72cc512a81855fdd6641d93f62303df49ff39f5cda2c6f63ca86ee7", + "edition": "public", + "page": "/sdk/uniapp/group/overview-group", + "disposition": "documented" + }, + { + "id": 106, + "name": "OpenIMSessionTypeNotification", + "type": "OpenIMSessionType", + "value": "4", + "signatureHash": "ba39713f1abecc80e5a23cb582148bf460a41cd00c3ae0947772d212274b0b73", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 107, + "name": "OpenIMLoginStatusLogout", + "type": "OpenIMLoginStatus", + "value": "1", + "signatureHash": "7c91f0aad42da1f3066a53034ce7e660fb6149904d880c73050c465301a326ec", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 108, + "name": "OpenIMLoginStatusLogging", + "type": "OpenIMLoginStatus", + "value": "2", + "signatureHash": "a6df080b6db816fd30b632a66132e6dff4e7b3085ff3f276bb1408d406647e76", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + }, + { + "id": 109, + "name": "OpenIMLoginStatusLogged", + "type": "OpenIMLoginStatus", + "value": "3", + "signatureHash": "83d5ad7e02193fd11100ab63e2e9f5382d7c244807aa01156f24f11d129c00f5", + "edition": "public", + "page": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "disposition": "documented" + } + ], + "typeExtensions": [ + { + "id": 150001, + "target": "OpenIMCreateVideoMessageParams", + "kind": "optional-object-members", + "addedMembers": [ + "videoSourcePath ?: string | null", + "snapshotSourcePath ?: string | null" + ], + "privateSignatureHash": "10e8608ccdc7d87c9d2cda19ae6f45081d580b31d754ff5828113a7e97d67063", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "field-level-commercial" + }, + { + "id": 150002, + "target": "OpenIMCreateFileMessageParams", + "kind": "optional-object-members", + "addedMembers": [ + "fileSourcePath ?: string | null" + ], + "privateSignatureHash": "0d01041fce19a84a294000a6b29103df81bfe2c1a618e4d6cd63f8a845375bae", + "edition": "commercial", + "page": "/sdk/uniapp/message/overview-message", + "disposition": "field-level-commercial" + }, + { + "id": 150003, + "target": "OpenIMSDKEventName", + "kind": "string-union-members", + "addedMembers": [ + "'onChangedPinnedMsg'", + "'onDeleteUserAllMsgsInConv'", + "'onMessageModified'", + "'onMessageEdited'", + "'onRecvGroupReadReceipt'", + "'onRecvMessageExtensionsAdded'", + "'onRecvMessageExtensionsChanged'", + "'onRecvMessageExtensionsDeleted'", + "'onConversationGroupAdded'", + "'onConversationGroupChanged'", + "'onConversationGroupDeleted'", + "'onConversationGroupMemberAdded'", + "'onConversationGroupMemberDeleted'", + "'onGroupApplicationBadgeCountChanged'", + "'onReceiveNewInvitation'", + "'onInviteeAccepted'", + "'onInviteeAcceptedByOtherDevice'", + "'onInviteeRejected'", + "'onInviteeRejectedByOtherDevice'", + "'onInvitationCancelled'", + "'onInvitationTimeout'", + "'onHangUp'", + "'onRoomParticipantConnected'", + "'onRoomParticipantDisconnected'", + "'onReceiveCustomSignaling'", + "'onReceiveCustomSignal'", + "'onStreamChange'", + "'onMessageKvInfoChanged'", + "'onMigrationStart'", + "'onMigrationProgress'", + "'onMigrationFailed'", + "'onMigrationFinished'", + "'onSDKSessionChanged'" + ], + "privateSignatureHash": "9d30981804a4737273bda82e723956eb1e47679101bea9261ba2fb9f5b4b2c87", + "edition": "commercial", + "page": null, + "disposition": "field-level-commercial" + } + ] +} diff --git a/package.json b/package.json index 5cfd03ac82..3d25ce1c0f 100644 --- a/package.json +++ b/package.json @@ -34,15 +34,17 @@ "content:metadata": "node scripts/sync-content-metadata.mjs", "sdk:zh": "node scripts/build-wasm-sdk-zh-content.mjs", "sdk:zh:check": "node scripts/check-localized-sdk-content.mjs", - "sdk:native:zh": "node scripts/build-client-sdk-zh-content.mjs ios flutter", - "sdk:native:zh:check": "node scripts/check-localized-sdk-content.mjs ios flutter", - "sdk:native:structure:sync": "node scripts/sync-client-sdk-structure.mjs ios flutter", - "sdk:native:routes:sync": "node scripts/sync-client-sdk-route-skeletons.mjs ios flutter && node scripts/sync-content-metadata.mjs", + "sdk:native:zh": "node scripts/build-client-sdk-zh-content.mjs ios flutter uniapp", + "sdk:native:zh:check": "node scripts/check-localized-sdk-content.mjs ios flutter uniapp", + "sdk:native:structure:sync": "node scripts/sync-client-sdk-structure.mjs ios flutter uniapp", + "sdk:native:routes:sync": "node scripts/sync-client-sdk-route-skeletons.mjs ios flutter uniapp && node scripts/sync-content-metadata.mjs", + "uniapp:ownership:sync": "node scripts/sync-uniapp-sdk-ownership.mjs", + "uniapp:audit:check": "node scripts/check-client-sdk-content-audit.mjs uniapp", "structure:sync": "node scripts/import-structure.mjs", "structure:report": "pnpm content:metadata && node scripts/structure-report.mjs && prettier --write docs/STRUCTURE_REPORT.md", "check": "eslint . && tsc --noEmit && pnpm test:audit && node scripts/check-content.mjs && node scripts/check-guides-content-audit.mjs && node scripts/check-wasm-content-audit.mjs && node scripts/check-localized-sdk-content.mjs && node scripts/check-client-sdk-content-audit.mjs && node scripts/check-wasm-sdk-examples.mjs && pnpm docsets-sync:lint-openapi && pnpm platform-api:test", "postbuild": "node scripts/prepare-standalone.mjs", - "content:sync": "node scripts/build-wasm-sdk-zh-content.mjs && node scripts/build-client-sdk-zh-content.mjs ios flutter && node scripts/build-search-index.mjs", + "content:sync": "node scripts/build-wasm-sdk-zh-content.mjs && node scripts/build-client-sdk-zh-content.mjs ios flutter uniapp && node scripts/build-search-index.mjs", "guides:sync": "node scripts/import-openim-guides.mjs", "platform-api:sync": "node scripts/import-openim-platform-api.mjs && node scripts/sync-openim-user-api.mjs && node scripts/sync-openim-friend-api.mjs && node scripts/sync-openim-group-api.mjs && node scripts/sync-openim-auth-api.mjs && node scripts/sync-openim-third-api.mjs && node scripts/sync-openim-msg-api.mjs && node scripts/sync-openim-conversation-api.mjs && node scripts/sync-openim-platform-api-order.mjs && node scripts/sync-openim-platform-api-english.mjs && node scripts/build-search-index.mjs", "user-api:sync": "node scripts/sync-openim-user-api.mjs", diff --git a/scripts/__tests__/build-search-index.test.mjs b/scripts/__tests__/build-search-index.test.mjs index ff54affccb..f1923834eb 100644 --- a/scripts/__tests__/build-search-index.test.mjs +++ b/scripts/__tests__/build-search-index.test.mjs @@ -188,6 +188,26 @@ test('applies publication audits to iOS and Flutter active routes', () => { ); }); +test('keeps a draft uni-app route out of both search indexes', () => { + const uniapp = route('/sdk/uniapp/overview', 'chat/sdk/uniapp'); + const scope = getClientSdkSidebarApplicationScope({ + routes: [uniapp], + sidebars: [{ platform: 'uniapp', config: { nodes: [uniapp.path] } }], + }); + const result = buildSearchIndexes({ + routes: [uniapp], + sourcePages: new Map([[uniapp.path, { body: 'English draft' }]]), + manualZhPages: new Map([[uniapp.path, { body: '中文草稿' }]]), + auditPages: new Map([ + [uniapp.path, auditPage(uniapp.path, 'api-verified', 'deferred')], + ]), + clientSdkActivePaths: scope.activePaths, + managedClientSdkContexts: scope.managedContexts, + }); + + assert.deepEqual(result, { en: [], zh: [] }); +}); + test('fails closed when a native route tree is incomplete', () => { const legacy = route('/sdk/ios/open-channel/overview', 'chat/sdk/ios'); const scope = getClientSdkSidebarApplicationScope({ diff --git a/scripts/__tests__/check-client-sdk-content-audit.test.mjs b/scripts/__tests__/check-client-sdk-content-audit.test.mjs index f7e7e6a050..056855f951 100644 --- a/scripts/__tests__/check-client-sdk-content-audit.test.mjs +++ b/scripts/__tests__/check-client-sdk-content-audit.test.mjs @@ -155,6 +155,67 @@ test('rejects conversationID on the Flutter Message model', () => { assert.ok(errors.some((error) => error.includes('does not expose conversationID'))); }); +test('accepts uni-app root imports, direct Promise results, and handle-based event cleanup', () => { + const platform = getClientSdkPlatform('uniapp'); + const path = '/sdk/uniapp/events/overview-events'; + const page = auditPage(path, platform.sdkCommit); + page.openimSources = [`data/structure/uniapp-sdk-doc-manifest.json#${platform.sdkCommit}`]; + page.sdkMethods = ['onRecvNewMessage', 'off']; + page.sdkEvents = ['onRecvNewMessage']; + const source = `\`\`\`uts +import { onRecvNewMessage, off } from '@/uni_modules/unix-openim-sdk' + +const subscription = onRecvNewMessage((message) => { + console.log(message.clientMsgID) +}) + +off(subscription) +\`\`\``; + const errors = validateClientSdkAudit({ + platform, + sidebar: { nodes: [path] }, + audit: { + schemaVersion: 1, + sources: { uniappSdk: { tag: platform.sdkTag, commit: platform.sdkCommit } }, + pages: [page], + }, + manualPages: new Map([[path, source]]), + }); + assert.deepEqual(errors, []); +}); + +test('rejects Wasm-style calls and unsafe uni-app initialization and listener examples', () => { + const platform = getClientSdkPlatform('uniapp'); + const path = '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk'; + const page = auditPage(path, platform.sdkCommit); + page.openimSources = [`data/structure/uniapp-sdk-doc-manifest.json#${platform.sdkCommit}`]; + page.sdkMethods = ['initSDK', 'onRecvNewMessage']; + page.sdkEvents = ['onRecvNewMessage']; + const source = `\`\`\`uts +import { initSDK } from 'unix-openim-sdk' +const sdk = openimsdk.initSDK({ apiAddr, wsAddr }) +const { data } = await sdk.login({ userID, token }) +OpenIM.on('onRecvNewMessage', handler) +OpenIM.off('onRecvNewMessage', handler) +\`\`\``; + const errors = validateClientSdkAudit({ + platform, + sidebar: { nodes: [path] }, + audit: { + schemaVersion: 1, + sources: { uniappSdk: { tag: platform.sdkTag, commit: platform.sdkCommit } }, + pages: [page], + }, + manualPages: new Map([[path, source]]), + }); + assert.ok(errors.some((error) => error.includes('absolute uni_modules import'))); + assert.ok(errors.some((error) => error.includes('WASM SDK instance'))); + assert.ok(errors.some((error) => error.includes('WsResponse.data'))); + assert.ok(errors.some((error) => error.includes('object-style login'))); + assert.ok(errors.some((error) => error.includes('systemType'))); + assert.ok(errors.some((error) => error.includes('subscription handle'))); +}); + function auditPage(path, commit) { return { currentPath: path, diff --git a/scripts/__tests__/client-sdk-publication.test.mjs b/scripts/__tests__/client-sdk-publication.test.mjs index c015fe5d07..59a934728c 100644 --- a/scripts/__tests__/client-sdk-publication.test.mjs +++ b/scripts/__tests__/client-sdk-publication.test.mjs @@ -15,6 +15,7 @@ test('detects all registered active SDK routes and excludes legacy native routes assert.equal(getClientSdkPlatform('/sdk/ios/overview'), 'ios'); assert.equal(getClientSdkPlatform('/sdk/flutter/overview/'), 'flutter'); assert.equal(getClientSdkPlatform('/sdk/wasm/overview'), 'wasm'); + assert.equal(getClientSdkPlatform('/sdk/uniapp/overview'), 'uniapp'); assert.equal(isClientSdkRoute('/sdk/ios/open-channel/overview'), false); }); @@ -23,6 +24,7 @@ test('reads locale publication state per platform audit', () => { assert.deepEqual(getPublishedClientSdkLocales('/sdk/flutter/overview'), ['en', 'zh']); assert.equal(isClientSdkLocalePublished('/sdk/flutter/overview', 'en'), true); assert.equal(isClientSdkLocalePublished('/sdk/wasm/overview', 'zh'), true); + assert.equal(isClientSdkLocalePublished('/sdk/uniapp/overview', 'zh'), false); }); test('lookup keeps active route detection independent from audit completeness', () => { diff --git a/scripts/__tests__/client-sdk-sidebar.test.mjs b/scripts/__tests__/client-sdk-sidebar.test.mjs index 33ada39c22..fb850335b2 100644 --- a/scripts/__tests__/client-sdk-sidebar.test.mjs +++ b/scripts/__tests__/client-sdk-sidebar.test.mjs @@ -12,7 +12,7 @@ import { const wasmSidebar = readJson('data/structure/wasm-sidebar.json'); test('registers the supported client SDK platforms and their structure paths', () => { - assert.deepEqual(clientSdkPlatformIds, ['ios', 'flutter', 'wasm']); + assert.deepEqual(clientSdkPlatformIds, ['ios', 'flutter', 'wasm', 'uniapp']); assert.deepEqual(getClientSdkPlatform('ios'), { id: 'ios', contextKey: 'chat/sdk/ios', @@ -28,6 +28,19 @@ test('registers the supported client SDK platforms and their structure paths', ( }); assert.equal(getClientSdkPlatform('flutter').contextKey, 'chat/sdk/flutter'); assert.equal(getClientSdkPlatform('wasm').contextKey, 'chat/sdk/wasm'); + assert.deepEqual(getClientSdkPlatform('uniapp'), { + id: 'uniapp', + contextKey: 'chat/sdk/uniapp', + routePrefix: '/sdk/uniapp', + manualRoot: 'content/zh/docs/chat/sdk/uniapp', + auditPath: 'data/structure/uniapp-content-audit.json', + labelsPath: 'data/structure/uniapp-navigation-labels.json', + sidebarPath: 'data/structure/uniapp-sidebar.json', + localizedOutputPath: 'src/generated/uniapp-sdk-zh-content.json', + sdkSourceKey: 'uniappSdk', + sdkTag: '0.2.0-rc.3', + sdkCommit: 'e71e3f68827f9f7af354526fecbaded25dc14de9', + }); assert.throws(() => getClientSdkPlatform('android'), /Unknown client SDK platform: android/); }); diff --git a/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs b/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs index 90b591dfa3..2a43f23d62 100644 --- a/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs +++ b/scripts/__tests__/sync-client-sdk-route-skeletons.test.mjs @@ -6,6 +6,7 @@ import { buildClientSdkSkeleton, isGeneratedClientSdkSkeleton, replaceClientSdkRouteRecords, + replaceClientSdkStructureRecords, resolveClientSdkRouteTitle, resolveClientSdkSkeletonRoutes, } from '../sync-client-sdk-route-skeletons.mjs'; @@ -93,6 +94,45 @@ test('uses each native SDK method name while preserving the shared WASM route su ); }); +test('resolves uni-app native extension routes without inventing WASM source pages', () => { + const routes = readJson('src/generated/routes.json'); + const sidebar = readJson('data/structure/uniapp-sidebar.json'); + const resolved = resolveClientSdkSkeletonRoutes({ platformId: 'uniapp', sidebar, routes }); + + assert.equal(resolved.length, 167); + assert.equal(resolved[0].title, 'OpenIM SDK for uni-app / uni-app x'); + assert.ok( + resolved.some( + (route) => route.path === '/sdk/uniapp/events/handle-data-migration-events', + ), + ); +}); + +test('keeps structure metadata aligned when replacing a client SDK route tree', () => { + const originalRoutes = readJson('src/generated/routes.json'); + const originalStructure = readJson('data/structure/chat-pages.json'); + const sidebar = readJson('data/structure/uniapp-sidebar.json'); + const routes = replaceClientSdkRouteRecords({ + platformId: 'uniapp', + sidebar, + routes: originalRoutes, + }); + const structure = replaceClientSdkStructureRecords({ + platformId: 'uniapp', + routes, + structure: originalStructure, + }); + const routePaths = routes + .filter((route) => route.contextKey === 'chat/sdk/uniapp') + .map((route) => route.path); + const structurePaths = structure + .filter((record) => record.context === 'chat/sdk/uniapp') + .map((record) => record.openimPath); + + assert.deepEqual(structurePaths, routePaths); + assert.equal(structure.length, routes.length); +}); + function getSidebarPathCount(sidebar) { const count = (nodes) => nodes.reduce( diff --git a/scripts/__tests__/sync-client-sdk-structure.test.mjs b/scripts/__tests__/sync-client-sdk-structure.test.mjs index d1c9df5307..9212e9f1f1 100644 --- a/scripts/__tests__/sync-client-sdk-structure.test.mjs +++ b/scripts/__tests__/sync-client-sdk-structure.test.mjs @@ -80,6 +80,38 @@ test('uses current WASM vocabulary with a platform-specific overview label', () assert.equal(labels['Retrieve message history'], wasmLabels['Retrieve message history']); }); +test('builds the uni-app task tree from WASM structure plus native contract differences', () => { + const sidebar = mirrorClientSdkSidebar(wasmSidebar, 'uniapp'); + const paths = getClientSdkSidebarPaths(sidebar); + const omitted = getOmittedClientSdkPaths(wasmSidebar, 'uniapp'); + + assert.equal(paths.length, 167); + assert.equal(omitted.length, 4); + assert.equal(new Set(paths).size, paths.length); + assert.ok(paths.every((path) => path.startsWith('/sdk/uniapp/'))); + for (const path of [ + '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk', + '/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state', + '/sdk/uniapp/getting-started/update-token-and-observe-sdk-session', + '/sdk/uniapp/group/check-full-sync-state', + '/sdk/uniapp/message/composing-messages/translate-text-and-messages', + '/sdk/uniapp/events/handle-data-migration-events', + '/sdk/uniapp/message/creating-messages/create-image-message-from-full-path', + '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id', + ]) { + assert.ok(paths.includes(path), path); + } + for (const path of [ + '/sdk/uniapp/conversation/managing-conversations/clear-local-conversations', + '/sdk/uniapp/group/group-applications/clear-group-application-badge-count', + '/sdk/uniapp/group/retrieving-group-members/get-group-member-owner-and-admin', + '/sdk/uniapp/message/retrieving-messages/load-newer-messages', + '/sdk/uniapp/message/creating-messages/create-image-message-by-file', + ]) { + assert.equal(paths.includes(path), false, path); + } +}); + function readJson(path) { return JSON.parse(readFileSync(path, 'utf8')); } diff --git a/scripts/__tests__/uniapp-commercial.test.mjs b/scripts/__tests__/uniapp-commercial.test.mjs new file mode 100644 index 0000000000..a4ea60d3f3 --- /dev/null +++ b/scripts/__tests__/uniapp-commercial.test.mjs @@ -0,0 +1,35 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; + +import { + getPageCommercialInfo, + getPageCommercialNames, +} from '../../src/lib/client-sdk-commercial.ts'; + +test('derives uni-app commercial pages from the Private documentation ownership manifest', () => { + assert.equal( + getPageCommercialInfo('/sdk/uniapp/calling/managing-calls/start-single-call').kind, + 'full', + ); + assert.equal( + getPageCommercialInfo('/sdk/uniapp/message/sending-messages/send-message').kind, + 'none', + ); + assert.equal( + getPageCommercialInfo('/sdk/uniapp/getting-started/update-token-and-observe-sdk-session').kind, + 'full', + ); + assert.ok( + getPageCommercialNames('/sdk/uniapp/message/composing-messages/translate-text-and-messages').has( + 'translateText', + ), + ); +}); + +test('keeps Public APIs with Harmony-only restrictions outside commercial classification', () => { + const info = getPageCommercialInfo( + '/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state', + ); + assert.ok(info.openSourceMethods.includes('updateFcmToken')); + assert.equal(info.methods.includes('updateFcmToken'), false); +}); diff --git a/scripts/__tests__/uniapp-sdk-doc-manifest.test.mjs b/scripts/__tests__/uniapp-sdk-doc-manifest.test.mjs new file mode 100644 index 0000000000..8045272c7e --- /dev/null +++ b/scripts/__tests__/uniapp-sdk-doc-manifest.test.mjs @@ -0,0 +1,85 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { readdirSync } from 'node:fs'; +import { join } from 'node:path'; +import test from 'node:test'; + +import { validateUniAppSdkDocManifest } from '../lib/uniapp-sdk-doc-manifest.mjs'; + +const manifest = JSON.parse( + readFileSync('data/structure/uniapp-sdk-doc-manifest.json', 'utf8'), +); + +test('accepts the frozen public-safe Private uni-app SDK documentation contract', () => { + const result = validateUniAppSdkDocManifest(manifest); + + assert.deepEqual(result.counts, { + constants: 109, + types: 237, + operations: 162, + eventSubscriptions: 81, + eventControls: 2, + events: 81, + }); + assert.equal(result.commercialOperations, 51); + assert.equal(result.commercialEventSubscriptions, 33); + assert.equal(result.commercialTypes, 77); + assert.deepEqual(result.unsupportedHarmonyOperations, [ + 'translateMessage', + 'translateText', + 'updateFcmToken', + 'updateToken', + ]); + assert.equal(result.unsupportedHarmonyEvents.length, 10); + assert.equal(result.syntheticEvents.includes('onSDKSessionChanged'), true); + assert.deepEqual(result.retiredCallables, [ + { id: 200083, name: 'getArchivedConversationList' }, + ]); +}); + +test('rejects consumer contract drift and private native provenance', () => { + assert.throws( + () => + validateUniAppSdkDocManifest({ + ...manifest, + baseline: { ...manifest.baseline, interfaceSha256: 'drifted' }, + }), + /interface baseline/i, + ); + assert.throws( + () => validateUniAppSdkDocManifest({ ...manifest, nativeArtifact: 'imsdk.har' }), + /private native provenance/i, + ); +}); + +test('keeps every uni-app code import on the frozen interface and retired APIs out of content', () => { + const allowedSymbols = new Set( + [...manifest.callables, ...manifest.types, ...manifest.constants].map((item) => item.name), + ); + const roots = [ + 'content/zh/docs/chat/sdk/uniapp', + 'content/docs/chat/sdk/uniapp', + ]; + + for (const root of roots) { + for (const file of listMdxFiles(root)) { + const source = readFileSync(file, 'utf8'); + assert.equal(source.includes('getArchivedConversationList'), false, file); + for (const match of source.matchAll( + /import\s*\{([\s\S]*?)\}\s*from\s*['"]@\/uni_modules\/unix-openim-sdk['"]/g, + )) { + for (const imported of match[1].split(',')) { + const name = imported.trim().replace(/^type\s+/, '').split(/\s+as\s+/)[0]; + if (name) assert.equal(allowedSymbols.has(name), true, `${file}: unknown import ${name}`); + } + } + } + } +}); + +function listMdxFiles(root) { + return readdirSync(root, { withFileTypes: true }).flatMap((entry) => { + const path = join(root, entry.name); + return entry.isDirectory() ? listMdxFiles(path) : entry.name.endsWith('.mdx') ? [path] : []; + }); +} diff --git a/scripts/__tests__/uniapp-sdk-ownership.test.mjs b/scripts/__tests__/uniapp-sdk-ownership.test.mjs new file mode 100644 index 0000000000..42abf1b074 --- /dev/null +++ b/scripts/__tests__/uniapp-sdk-ownership.test.mjs @@ -0,0 +1,78 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import test from 'node:test'; + +import { validateUniAppSdkOwnership } from '../lib/uniapp-sdk-ownership.mjs'; + +const manifest = readJson('data/structure/uniapp-sdk-doc-manifest.json'); +const ownership = readJson('data/structure/uniapp-api-ownership.json'); +const typeOwnership = readJson('data/structure/uniapp-type-ownership.json'); +const sidebar = readJson('data/structure/uniapp-sidebar.json'); +const audit = readJson('data/structure/uniapp-content-audit.json'); + +test('owns every uni-app operation, subscription, event control, event, type, and constant once', () => { + const result = validateUniAppSdkOwnership({ manifest, ownership, typeOwnership, sidebar }); + + assert.deepEqual(result, { + operations: 162, + eventSubscriptions: 81, + eventControls: 2, + events: 81, + types: 237, + constants: 109, + }); +}); + +test('keeps commercial and platform support metadata sourced from the frozen manifest', () => { + const commercialOperations = ownership.callables.filter( + (item) => item.role === 'operation' && item.edition === 'commercial', + ); + const commercialSubscriptions = ownership.callables.filter( + (item) => item.role === 'event-subscription' && item.edition === 'commercial', + ); + const commercialTypes = typeOwnership.types.filter((item) => item.edition === 'commercial'); + + assert.equal(commercialOperations.length, 51); + assert.equal(commercialSubscriptions.length, 33); + assert.equal(commercialTypes.length, 77); + assert.equal( + ownership.callables.find((item) => item.name === 'updateFcmToken').edition, + 'public', + ); + assert.equal( + ownership.events.find((item) => item.name === 'onSDKSessionChanged').synthetic, + true, + ); + assert.equal( + ownership.callables.some((item) => item.name === 'getArchivedConversationList'), + false, + ); +}); + +test('keeps every callable and event on the same unique owner page in the content audit', () => { + const auditByPath = new Map(audit.pages.map((page) => [page.currentPath, page])); + const expectedCallables = new Map(); + const expectedEvents = new Map(); + + for (const item of ownership.callables) { + const names = expectedCallables.get(item.page) ?? []; + names.push(item.name); + expectedCallables.set(item.page, names); + } + for (const item of ownership.events) { + const names = expectedEvents.get(item.page) ?? []; + names.push(item.name); + expectedEvents.set(item.page, names); + } + + for (const [page, names] of expectedCallables) { + assert.deepEqual(auditByPath.get(page)?.sdkMethods, names.sort()); + } + for (const [page, names] of expectedEvents) { + assert.deepEqual(auditByPath.get(page)?.sdkEvents, names.sort()); + } +}); + +function readJson(path) { + return JSON.parse(readFileSync(path, 'utf8')); +} diff --git a/scripts/build-client-sdk-zh-content.mjs b/scripts/build-client-sdk-zh-content.mjs index 79331aea48..2014eeadfe 100644 --- a/scripts/build-client-sdk-zh-content.mjs +++ b/scripts/build-client-sdk-zh-content.mjs @@ -142,7 +142,13 @@ export function resolvePlatformRoutes({ platform, routesData, sidebar }) { suffix === 'overview' ? platform.id === 'wasm' ? structuralRoute.title - : `OpenIM SDK for ${platform.id === 'ios' ? 'iOS' : 'Flutter'}` + : `OpenIM SDK for ${ + platform.id === 'ios' + ? 'iOS' + : platform.id === 'uniapp' + ? 'uni-app / uni-app x' + : 'Flutter' + }` : structuralRoute.title, }; }); @@ -150,7 +156,7 @@ export function resolvePlatformRoutes({ platform, routesData, sidebar }) { async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); - const platformIds = requested.length > 0 ? requested : ['ios', 'flutter', 'wasm']; + const platformIds = requested.length > 0 ? requested : ['ios', 'flutter', 'uniapp', 'wasm']; for (const platformId of platformIds) { const output = await buildClientSdkLocalizedFile(platformId); console.log( diff --git a/scripts/check-client-sdk-content-audit.mjs b/scripts/check-client-sdk-content-audit.mjs index 22be4be8eb..48a0821abf 100644 --- a/scripts/check-client-sdk-content-audit.mjs +++ b/scripts/check-client-sdk-content-audit.mjs @@ -169,6 +169,37 @@ function validateManualPage({ platform, page, path, source, errors }) { ) { errors.push(`${path}: content invents a Flutter listener removal API`); } + } else if (platform.id === 'uniapp') { + const examples = extractUniAppCodeBlocks(source).join('\n'); + if ( + (page.sdkMethods?.length ?? 0) > 0 && + !source.includes('```uts') && + !source.includes('```javascript') && + !source.includes('```js') + ) { + errors.push(`${path}: method page requires a UTS or JavaScript example`); + } + if ( + /from\s+['"]unix-openim-sdk['"]/.test(examples) || + /from\s+['"]@\/uni_modules\/unix-openim-sdk\/[^'"]+['"]/.test(examples) + ) { + errors.push(`${path}: examples must use the absolute uni_modules import`); + } + if (/\b(?:openimsdk|OpenIM)\.[A-Za-z_$][\w$]*\s*\(/.test(examples)) { + errors.push(`${path}: content must not create or call a WASM SDK instance`); + } + if (/\b(?:WsResponse\s*<|const\s*\{\s*data\s*\}\s*=)/.test(examples)) { + errors.push(`${path}: Promise results must not use a WsResponse.data wrapper`); + } + if (/\blogin\s*\(\s*\{/.test(examples)) { + errors.push(`${path}: login must not use an object-style login argument`); + } + if (/\binitSDK\s*\(/.test(examples) && !/\bsystemType\s*:/.test(examples)) { + errors.push(`${path}: initSDK examples must include systemType`); + } + if ((page.sdkEvents?.length ?? 0) > 0 && !hasSubscriptionCleanup(examples)) { + errors.push(`${path}: event examples must save and release a subscription handle`); + } } } @@ -190,9 +221,25 @@ function extractDartCodeBlocks(source) { return [...source.matchAll(/```dart\n([\s\S]*?)\n```/g)].map((match) => match[1]); } +function extractUniAppCodeBlocks(source) { + return [...source.matchAll(/```(?:uts|javascript|js)\n([\s\S]*?)\n```/g)].map( + (match) => match[1], + ); +} + +function hasSubscriptionCleanup(source) { + const assigned = source.match(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*on[A-Z]\w*\s*\(/); + if (assigned && new RegExp(`\\boff\\s*\\(\\s*${assigned[1]}\\s*\\)`).test(source)) { + return true; + } + return /\.forEach\s*\(\s*\(\s*([A-Za-z_$][\w$]*)\s*\)\s*=>\s*off\s*\(\s*\1\s*\)\s*\)/.test( + source, + ); +} + async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); - const platformIds = requested.length > 0 ? requested : ['ios', 'flutter']; + const platformIds = requested.length > 0 ? requested : ['ios', 'flutter', 'uniapp']; let failed = false; for (const platformId of platformIds) { const platform = getClientSdkPlatform(platformId); diff --git a/scripts/lib/client-sdk-platforms.mjs b/scripts/lib/client-sdk-platforms.mjs index b326948cdb..7e7ba73098 100644 --- a/scripts/lib/client-sdk-platforms.mjs +++ b/scripts/lib/client-sdk-platforms.mjs @@ -35,6 +35,19 @@ const clientSdkPlatforms = { sidebarPath: 'data/structure/wasm-sidebar.json', localizedOutputPath: 'src/generated/wasm-sdk-zh-content.json', }, + uniapp: { + id: 'uniapp', + contextKey: 'chat/sdk/uniapp', + routePrefix: '/sdk/uniapp', + manualRoot: 'content/zh/docs/chat/sdk/uniapp', + auditPath: 'data/structure/uniapp-content-audit.json', + labelsPath: 'data/structure/uniapp-navigation-labels.json', + sidebarPath: 'data/structure/uniapp-sidebar.json', + localizedOutputPath: 'src/generated/uniapp-sdk-zh-content.json', + sdkSourceKey: 'uniappSdk', + sdkTag: '0.2.0-rc.3', + sdkCommit: 'e71e3f68827f9f7af354526fecbaded25dc14de9', + }, }; export const clientSdkPlatformIds = Object.freeze(Object.keys(clientSdkPlatforms)); diff --git a/scripts/lib/uniapp-sdk-doc-manifest.mjs b/scripts/lib/uniapp-sdk-doc-manifest.mjs new file mode 100644 index 0000000000..235727b9c1 --- /dev/null +++ b/scripts/lib/uniapp-sdk-doc-manifest.mjs @@ -0,0 +1,94 @@ +const frozenBaseline = Object.freeze({ + privateCommit: 'e71e3f68827f9f7af354526fecbaded25dc14de9', + interfaceSha256: 'acbe16c69ba4ddfa2e7bbdcf35a119c88801e93d960520db50de082c2e4234df', + responseSchemaSha256: 'a6a73ab3e368812cbe9b6355fed3edbe59b890aa6e8f73c69e3d06fd23a6c6e5', +}); + +const expectedCounts = Object.freeze({ + constants: 109, + types: 237, + operations: 162, + eventSubscriptions: 81, + eventControls: 2, + events: 81, +}); + +const forbiddenProvenance = [ + 'openim-sdk-unix-harmony', + 'imsdk.har', + '.aar', + '.xcframework', + '/users/', + '/volumes/', +]; + +function assert(condition, message) { + if (!condition) throw new Error(message); +} + +export function validateUniAppSdkDocManifest(manifest) { + assert(manifest?.schemaVersion === 1, 'Unsupported uni-app documentation manifest schema'); + assert(manifest?.sdkVersion === '0.2.0-rc.3', 'Unexpected uni-app SDK documentation version'); + assert( + manifest?.baseline?.privateCommit === frozenBaseline.privateCommit, + 'Private commit baseline drifted', + ); + assert( + manifest?.baseline?.interfaceSha256 === frozenBaseline.interfaceSha256, + 'Consumer interface baseline drifted', + ); + assert( + manifest?.baseline?.responseSchemaSha256 === frozenBaseline.responseSchemaSha256, + 'Response schema baseline drifted', + ); + assert(JSON.stringify(manifest.counts) === JSON.stringify(expectedCounts), 'Surface counts drifted'); + + const serialized = JSON.stringify(manifest).toLowerCase(); + for (const forbidden of forbiddenProvenance) { + assert(!serialized.includes(forbidden), `Manifest contains private native provenance: ${forbidden}`); + } + + const commercialOperations = manifest.callables.filter( + (item) => item.edition === 'commercial' && item.role === 'operation', + ).length; + const commercialEventSubscriptions = manifest.callables.filter( + (item) => item.edition === 'commercial' && item.role === 'event-subscription', + ).length; + const commercialTypes = manifest.types.filter((item) => item.edition === 'commercial').length; + const unsupportedHarmonyOperations = manifest.callables + .filter((item) => item.role === 'operation' && item.platforms.harmony === 'platform-unsupported') + .map((item) => item.name) + .sort(); + const unsupportedHarmonyEvents = manifest.events + .filter((item) => item.platforms.harmony === 'platform-unsupported') + .map((item) => item.name) + .sort(); + const syntheticEvents = manifest.events + .filter((item) => item.synthetic) + .map((item) => item.name) + .sort(); + + assert(commercialOperations === 51, 'Commercial operation count drifted'); + assert(commercialEventSubscriptions === 33, 'Commercial event subscription count drifted'); + assert(commercialTypes === 77, 'Commercial type count drifted'); + assert(manifest.typeExtensions.length === 3, 'Commercial type extension count drifted'); + assert(unsupportedHarmonyOperations.length === 4, 'Harmony unsupported operation count drifted'); + assert(unsupportedHarmonyEvents.length === 10, 'Harmony unsupported event count drifted'); + assert( + !manifest.callables.some((item) => item.name === 'getArchivedConversationList'), + 'Retired getArchivedConversationList leaked into active documentation', + ); + + return { + counts: manifest.counts, + commercialOperations, + commercialEventSubscriptions, + commercialTypes, + unsupportedHarmonyOperations, + unsupportedHarmonyEvents, + syntheticEvents, + retiredCallables: manifest.retiredCallables, + }; +} + +export const uniAppSdkDocumentationBaseline = frozenBaseline; diff --git a/scripts/lib/uniapp-sdk-ownership.mjs b/scripts/lib/uniapp-sdk-ownership.mjs new file mode 100644 index 0000000000..e443930171 --- /dev/null +++ b/scripts/lib/uniapp-sdk-ownership.mjs @@ -0,0 +1,82 @@ +import { getClientSdkSidebarPaths } from './client-sdk-sidebar.mjs'; + +function assert(condition, message) { + if (!condition) throw new Error(message); +} + +function assertUniqueComplete({ actual, expected, label, activePaths }) { + assert(actual.length === expected.length, `${label} count differs from the documentation manifest`); + const byName = new Map(); + for (const item of actual) { + assert(!byName.has(item.name), `${label} ${item.name} has multiple owners`); + assert(item.page == null || activePaths.has(item.page), `${label} ${item.name} owns an inactive page`); + byName.set(item.name, item); + } + for (const item of expected) { + const owner = byName.get(item.name); + assert(owner != null, `${label} ${item.name} has no owner`); + assert(owner.page != null || owner.disposition != null, `${label} ${item.name} has no page or disposition`); + assert(owner.edition === item.edition, `${label} ${item.name} edition drifted`); + } +} + +export function validateUniAppSdkOwnership({ manifest, ownership, typeOwnership, sidebar }) { + const activePaths = new Set(getClientSdkSidebarPaths(sidebar)); + assert(ownership.schemaVersion === 1, 'Unsupported uni-app API ownership schema'); + assert(typeOwnership.schemaVersion === 1, 'Unsupported uni-app type ownership schema'); + assert( + ownership.manifestSha256 === typeOwnership.manifestSha256, + 'Uni-app ownership documents use different manifest baselines', + ); + + assertUniqueComplete({ + actual: ownership.callables, + expected: manifest.callables, + label: 'callable', + activePaths, + }); + assertUniqueComplete({ + actual: ownership.events, + expected: manifest.events, + label: 'event', + activePaths, + }); + assertUniqueComplete({ + actual: typeOwnership.types, + expected: manifest.types, + label: 'type', + activePaths, + }); + assertUniqueComplete({ + actual: typeOwnership.constants, + expected: manifest.constants, + label: 'constant', + activePaths, + }); + + for (const item of ownership.callables) { + const source = manifest.callables.find((candidate) => candidate.name === item.name); + assert(item.role === source.role, `callable ${item.name} role drifted`); + assert( + JSON.stringify(item.platforms) === JSON.stringify(source.platforms), + `callable ${item.name} platform support drifted`, + ); + } + for (const item of ownership.events) { + const source = manifest.events.find((candidate) => candidate.name === item.name); + assert(item.synthetic === source.synthetic, `event ${item.name} synthetic marker drifted`); + assert( + JSON.stringify(item.platforms) === JSON.stringify(source.platforms), + `event ${item.name} platform support drifted`, + ); + } + + return { + operations: ownership.callables.filter((item) => item.role === 'operation').length, + eventSubscriptions: ownership.callables.filter((item) => item.role === 'event-subscription').length, + eventControls: ownership.callables.filter((item) => item.role === 'event-control').length, + events: ownership.events.length, + types: typeOwnership.types.length, + constants: typeOwnership.constants.length, + }; +} diff --git a/scripts/sync-client-sdk-route-skeletons.mjs b/scripts/sync-client-sdk-route-skeletons.mjs index 3618d34c98..5e070614c0 100644 --- a/scripts/sync-client-sdk-route-skeletons.mjs +++ b/scripts/sync-client-sdk-route-skeletons.mjs @@ -52,20 +52,50 @@ const conversationGroupTitles = { 'conversation/managing-conversation-groups/delete-conversation-group': 'deleteConversationGroup', }, + uniapp: { + 'conversation/managing-conversation-groups/get-conversation-group-by-conversation-id': + 'getConversationGroupByConversationID', + }, }; +const uniappBaselineSuffixes = new Map([ + ['message/creating-messages/create-image-message-from-full-path', 'message/creating-messages/create-image-message-by-file'], + ['message/creating-messages/create-sound-message-from-full-path', 'message/creating-messages/create-sound-message-by-file'], + ['message/creating-messages/create-video-message-from-full-path', 'message/creating-messages/create-video-message-by-file'], + ['message/creating-messages/create-file-message-from-full-path', 'message/creating-messages/create-file-message-by-file'], + ['conversation/managing-conversation-groups/get-conversation-group-by-conversation-id', 'conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id'], + ['group/group-applications/observe-group-application-badge-count', 'group/group-applications/get-group-application-badge-count'], +]); + +const uniappExtensionTitles = new Map([ + ['getting-started/install-initialize-and-inspect-sdk', 'Install, initialize, and inspect the SDK'], + ['getting-started/handle-app-lifecycle-and-device-state', 'Handle App lifecycle and device state'], + ['getting-started/update-token-and-observe-sdk-session', 'Update tokens and observe SDK sessions'], + ['group/check-full-sync-state', 'Check group full-sync state'], + ['message/composing-messages/translate-text-and-messages', 'Translate text and messages'], + ['events/handle-data-migration-events', 'Handle data migration events'], +]); + +function platformName(platformId) { + if (platformId === 'ios') return 'iOS'; + if (platformId === 'uniapp') return 'uni-app / uni-app x'; + return 'Flutter'; +} + export function resolveClientSdkRouteTitle({ platformId, suffix, baselineTitle }) { - if (suffix === 'overview') - return `OpenIM SDK for ${platformId === 'ios' ? 'iOS' : 'Flutter'}`; + if (suffix === 'overview') return `OpenIM SDK for ${platformName(platformId)}`; + if (platformId === 'uniapp' && uniappExtensionTitles.has(suffix)) { + return uniappExtensionTitles.get(suffix); + } return conversationGroupTitles[platformId]?.[suffix] ?? baselineTitle; } export function buildClientSdkSkeleton({ path, platformId, title }) { - const platformName = platformId === 'ios' ? 'iOS' : 'Flutter'; + const displayName = platformName(platformId); const template = path === `/sdk/${platformId}/overview` ? 'overview' : 'guide'; return `--- title: '${escapeSingleQuote(title)}' -description: 'OpenIM ${platformName} SDK guide for ${escapeSingleQuote(title)}.' +description: 'OpenIM ${displayName} SDK guide for ${escapeSingleQuote(title)}.' product: 'sdk' context: 'chat/sdk/${platformId}' template: '${template}' @@ -79,7 +109,7 @@ generatedBy: 'sync-client-sdk-route-skeletons' ## Overview -The English version of this OpenIM ${platformName} SDK guide is deferred until the reviewed Chinese documentation is complete. +The English version of this OpenIM ${displayName} SDK guide is deferred until the reviewed Chinese documentation is complete. `; } @@ -87,8 +117,8 @@ export function isGeneratedClientSdkSkeleton(source) { return ( /generatedBy:\s*['"]sync-client-sdk-route-skeletons['"]/.test(source) || (/status:\s*['"]draft['"]/.test(source) && - /context:\s*['"]chat\/sdk\/(?:ios|flutter)['"]/.test(source) && - /The English version of this OpenIM (?:iOS|Flutter) SDK guide is deferred/.test(source)) + /context:\s*['"]chat\/sdk\/(?:ios|flutter|uniapp)['"]/.test(source) && + /The English version of this OpenIM (?:iOS|Flutter|uni-app \/ uni-app x) SDK guide is deferred/.test(source)) ); } @@ -101,16 +131,19 @@ export function resolveClientSdkSkeletonRoutes({ platformId, sidebar, routes }) ); return getClientSdkSidebarPaths(sidebar).map((path) => { const suffix = path.replace(`/sdk/${platformId}/`, ''); - const baseline = wasmBySuffix.get(suffix); + const baseline = wasmBySuffix.get( + platformId === 'uniapp' ? (uniappBaselineSuffixes.get(suffix) ?? suffix) : suffix, + ); const existing = routeByPath.get(path); - if (!baseline && !existing) + const extensionTitle = platformId === 'uniapp' ? uniappExtensionTitles.get(suffix) : undefined; + if (!baseline && !existing && !extensionTitle) throw new Error(`[${platformId}] missing WASM baseline or platform extension: ${suffix}`); return { path, title: resolveClientSdkRouteTitle({ platformId, suffix, - baselineTitle: existing?.title ?? baseline.title, + baselineTitle: existing?.title ?? baseline?.title ?? extensionTitle, }), }; }); @@ -125,7 +158,7 @@ export function replaceClientSdkRouteRecords({ platformId, sidebar, routes }) { const otherRoutes = routes.filter((route) => route.contextKey !== platform.contextKey); const baseId = Math.max(...otherRoutes.map((route) => route.id)) + 1; const baseSourceIndex = Math.max(...otherRoutes.map((route) => route.sourceIndex)) + 1; - const contextTitle = `SDKs · ${platformId === 'ios' ? 'iOS' : 'Flutter'} · v4`; + const contextTitle = `SDKs · ${platformName(platformId)} · v4`; const wasmBySuffix = new Map( routes .filter((route) => route.contextKey === 'chat/sdk/wasm') @@ -134,23 +167,29 @@ export function replaceClientSdkRouteRecords({ platformId, sidebar, routes }) { const existingByPath = new Map(current.map((route) => [route.path, route])); const nativeRoutes = getClientSdkSidebarPaths(sidebar).map((path, index) => { const suffix = path.replace(`${platform.routePrefix}/`, ''); - const baseline = wasmBySuffix.get(suffix); + const baseline = wasmBySuffix.get( + platformId === 'uniapp' ? (uniappBaselineSuffixes.get(suffix) ?? suffix) : suffix, + ); const template = baseline ?? existingByPath.get(path); - if (!template) + const extensionTitle = platformId === 'uniapp' ? uniappExtensionTitles.get(suffix) : undefined; + const fallbackTemplate = routes.find( + (route) => route.contextKey === 'chat/sdk/wasm' && route.template === 'guide', + ); + if (!template && !extensionTitle) throw new Error(`[${platformId}] missing WASM baseline or platform extension: ${suffix}`); const title = resolveClientSdkRouteTitle({ platformId, suffix, - baselineTitle: template.title, + baselineTitle: template?.title ?? extensionTitle, }); return { - ...template, + ...(template ?? fallbackTemplate), id: baseId + index, path, relativePath: `sdk/${platformId}/${suffix}`, sourcePath: path, title, - description: `OpenIM ${platformId === 'ios' ? 'iOS' : 'Flutter'} SDK guide for ${title}.`, + description: `OpenIM ${platformName(platformId)} SDK guide for ${title}.`, platform: platformId, contextKey: platform.contextKey, contextTitle, @@ -165,10 +204,32 @@ export function replaceClientSdkRouteRecords({ platformId, sidebar, routes }) { return withoutPlatform; } +export function replaceClientSdkStructureRecords({ platformId, routes, structure }) { + const platform = getClientSdkPlatform(platformId); + const current = structure.filter((record) => record.context === platform.contextKey); + if (current.length === 0) + throw new Error(`[${platformId}] cannot locate the existing structure range`); + const replacement = routes + .filter((route) => route.contextKey === platform.contextKey) + .map((route) => ({ + sourcePath: route.sourcePath, + openimPath: route.path, + title: route.title, + context: route.contextKey, + template: route.template, + contentFile: route.contentFile, + })); + const firstIndex = structure.findIndex((record) => record.context === platform.contextKey); + const withoutPlatform = structure.filter((record) => record.context !== platform.contextKey); + withoutPlatform.splice(firstIndex, 0, ...replacement); + return withoutPlatform; +} + async function main() { const requested = process.argv.slice(2).filter((value) => !value.startsWith('-')); const platformIds = requested.length > 0 ? requested : ['ios', 'flutter']; let routes = await readJson('src/generated/routes.json'); + let structure = await readJson('data/structure/chat-pages.json'); for (const platformId of platformIds) { const platform = getClientSdkPlatform(platformId); @@ -213,12 +274,20 @@ async function main() { `Synchronized ${platformId} English route skeletons (${skeletonRoutes.length} active, ${staleRemoved} stale removed, ${manualPreserved} manual preserved).`, ); routes = replaceClientSdkRouteRecords({ platformId, sidebar, routes }); + structure = replaceClientSdkStructureRecords({ platformId, routes, structure }); } - await writeFile( - resolve(root, 'src/generated/routes.json'), - `${JSON.stringify(routes, null, 2)}\n`, - 'utf8', - ); + await Promise.all([ + writeFile( + resolve(root, 'src/generated/routes.json'), + `${JSON.stringify(routes, null, 2)}\n`, + 'utf8', + ), + writeFile( + resolve(root, 'data/structure/chat-pages.json'), + `${JSON.stringify(structure, null, 2)}\n`, + 'utf8', + ), + ]); } async function listMdxFiles(directory) { diff --git a/scripts/sync-client-sdk-structure.mjs b/scripts/sync-client-sdk-structure.mjs index cc7b675b95..9c4dd43e23 100644 --- a/scripts/sync-client-sdk-structure.mjs +++ b/scripts/sync-client-sdk-structure.mjs @@ -20,6 +20,14 @@ const sourceContracts = { sdkTag: '3.8.3+hotfix.12', sdkCommit: '95889be7a26dce6fe896ef22096c9036cc25fc9b', }, + uniapp: { + sdkKey: 'uniappSdk', + sdkManifest: 'data/structure/uniapp-sdk-doc-manifest.json', + sdkTag: '0.2.0-rc.3', + sdkCommit: 'e71e3f68827f9f7af354526fecbaded25dc14de9', + interfaceSha256: 'acbe16c69ba4ddfa2e7bbdcf35a119c88801e93d960520db50de082c2e4234df', + responseSchemaSha256: 'a6a73ab3e368812cbe9b6355fed3edbe59b890aa6e8f73c69e3d06fd23a6c6e5', + }, }; const openimDocs = { @@ -30,12 +38,49 @@ const openimDocs = { const omittedSuffixesByPlatform = { flutter: new Set(), ios: new Set(), + uniapp: new Set([ + 'conversation/managing-conversations/clear-local-conversations', + 'group/group-applications/clear-group-application-badge-count', + 'group/retrieving-group-members/get-group-member-owner-and-admin', + 'message/retrieving-messages/load-newer-messages', + ]), +}; + +const renamedSuffixesByPlatform = { + ios: new Map(), + flutter: new Map(), + uniapp: new Map([ + ['message/creating-messages/create-image-message-by-file', 'message/creating-messages/create-image-message-from-full-path'], + ['message/creating-messages/create-sound-message-by-file', 'message/creating-messages/create-sound-message-from-full-path'], + ['message/creating-messages/create-video-message-by-file', 'message/creating-messages/create-video-message-from-full-path'], + ['message/creating-messages/create-file-message-by-file', 'message/creating-messages/create-file-message-from-full-path'], + ['conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id', 'conversation/managing-conversation-groups/get-conversation-group-by-conversation-id'], + ['group/group-applications/get-group-application-badge-count', 'group/group-applications/observe-group-application-badge-count'], + ]), }; +const uniappAdditionalEntries = new Map([ + ['getting-started', [ + { path: '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk', navigationTitle: 'Install, initialize, and inspect the SDK' }, + { path: '/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state', navigationTitle: 'Handle App lifecycle and device state' }, + { path: '/sdk/uniapp/getting-started/update-token-and-observe-sdk-session', navigationTitle: 'Update tokens and observe SDK sessions' }, + ]], + ['group', [ + { path: '/sdk/uniapp/group/check-full-sync-state', navigationTitle: 'Check group full-sync state' }, + ]], + ['message/composing-messages', [ + { path: '/sdk/uniapp/message/composing-messages/translate-text-and-messages', navigationTitle: 'Translate text and messages' }, + ]], +]); + export function mirrorClientSdkSidebar(wasmSidebar, platformId) { const omittedSuffixes = omittedSuffixesByPlatform[platformId]; if (!omittedSuffixes) throw new Error(`Unsupported native SDK platform: ${platformId}`); - const replacePath = (path) => path.replace('/sdk/wasm/', `/sdk/${platformId}/`); + const renamedSuffixes = renamedSuffixesByPlatform[platformId] ?? new Map(); + const replacePath = (path) => { + const suffix = path.replace('/sdk/wasm/', ''); + return `/sdk/${platformId}/${renamedSuffixes.get(suffix) ?? suffix}`; + }; const mirrorEntry = (entry) => { if (typeof entry === 'string') { return omittedSuffixes.has(entry.replace('/sdk/wasm/', '')) ? undefined : replacePath(entry); @@ -45,10 +90,36 @@ export function mirrorClientSdkSidebar(wasmSidebar, platformId) { ? undefined : { ...entry, path: replacePath(entry.path) }; } - const children = entry.children.map(mirrorEntry).filter(Boolean); + let children = entry.children.map(mirrorEntry).filter(Boolean); + if (platformId === 'uniapp') { + children = [...children, ...(uniappAdditionalEntries.get(entry.id) ?? [])]; + if (entry.id === 'group/group-applications') { + children = children.map((child) => + child?.path?.endsWith('/observe-group-application-badge-count') + ? { ...child, navigationTitle: 'Observe group application badge count' } + : child, + ); + } + } return children.length > 0 ? { ...entry, children } : undefined; }; - return { ...wasmSidebar, nodes: wasmSidebar.nodes.map(mirrorEntry).filter(Boolean) }; + let nodes = wasmSidebar.nodes.map(mirrorEntry).filter(Boolean); + if (platformId === 'uniapp') { + nodes = nodes.flatMap((node) => { + if (node?.path === '/sdk/uniapp/events/overview-events') { + return [{ + id: 'events', + title: 'Events', + children: [ + { ...node, navigationTitle: 'Event overview' }, + { path: '/sdk/uniapp/events/handle-data-migration-events', navigationTitle: 'Handle data migration events' }, + ], + }]; + } + return [node]; + }); + } + return { ...wasmSidebar, platform: platformId, nodes }; } export function getOmittedClientSdkPaths(wasmSidebar, platformId) { @@ -70,18 +141,28 @@ export function buildClientSdkAuditSeed({ const existingByPath = new Map(existingPages.map((page) => [page.currentPath, page])); const activePaths = getClientSdkSidebarPaths(sidebar); const currentPaths = new Set([...activePaths, ...omittedPaths]); - const sdkSource = `${contract.sdkRepository}/tree/${contract.sdkCommit}`; + const sdkSource = contract.sdkManifest + ? `${contract.sdkManifest}#${contract.sdkCommit}` + : `${contract.sdkRepository}/tree/${contract.sdkCommit}`; const docsSource = `${openimDocs.repository}/tree/${openimDocs.commit}/docs/sdks`; return { schemaVersion: 1, sources: { openimDocs, - [contract.sdkKey]: { - repository: contract.sdkRepository, - tag: contract.sdkTag, - commit: contract.sdkCommit, - }, + [contract.sdkKey]: contract.sdkManifest + ? { + manifest: contract.sdkManifest, + tag: contract.sdkTag, + commit: contract.sdkCommit, + interfaceSha256: contract.interfaceSha256, + responseSchemaSha256: contract.responseSchemaSha256, + } + : { + repository: contract.sdkRepository, + tag: contract.sdkTag, + commit: contract.sdkCommit, + }, }, pages: activePaths .map((path) => { @@ -155,7 +236,7 @@ function toOmittedAuditPage({ page, path, platformId, docsSource, sdkSource, his } export function buildClientSdkNavigationLabels(wasmLabels, platformId) { - const displayName = platformId === 'ios' ? 'iOS' : 'Flutter'; + const displayName = platformId === 'ios' ? 'iOS' : platformId === 'uniapp' ? 'uni-app / uni-app x' : 'Flutter'; const labels = { ...wasmLabels }; delete labels['OpenIM SDK for WASM']; labels[`OpenIM SDK for ${displayName}`] = `OpenIM ${displayName} SDK 概览`; @@ -177,6 +258,16 @@ export function buildClientSdkNavigationLabels(wasmLabels, platformId) { getConversationGroupByConversationID: '查询会话所属的分组', addConversationsToGroups: '添加会话到分组', removeConversationsFromGroups: '从分组移除会话', + ...(platformId === 'uniapp' + ? { + 'Install, initialize, and inspect the SDK': '安装、初始化并检查 SDK', + 'Handle App lifecycle and device state': '处理 App 生命周期与设备状态', + 'Update tokens and observe SDK sessions': '更新 Token 并观察 SDK 会话', + 'Check group full-sync state': '检查群组全量同步状态', + 'Translate text and messages': '翻译文本与消息', + 'Handle data migration events': '处理数据迁移事件', + } + : {}), }, ); return labels; diff --git a/scripts/sync-uniapp-sdk-ownership.mjs b/scripts/sync-uniapp-sdk-ownership.mjs new file mode 100644 index 0000000000..017a907a0f --- /dev/null +++ b/scripts/sync-uniapp-sdk-ownership.mjs @@ -0,0 +1,240 @@ +import { createHash } from 'node:crypto'; +import { readFile, writeFile } from 'node:fs/promises'; +import { resolve } from 'node:path'; + +const root = process.cwd(); + +const renamedSuffixes = new Map([ + ['message/creating-messages/create-image-message-by-file', 'message/creating-messages/create-image-message-from-full-path'], + ['message/creating-messages/create-sound-message-by-file', 'message/creating-messages/create-sound-message-from-full-path'], + ['message/creating-messages/create-video-message-by-file', 'message/creating-messages/create-video-message-from-full-path'], + ['message/creating-messages/create-file-message-by-file', 'message/creating-messages/create-file-message-from-full-path'], + ['conversation/managing-conversation-groups/get-conversation-group-ids-by-conversation-id', 'conversation/managing-conversation-groups/get-conversation-group-by-conversation-id'], + ['group/group-applications/get-group-application-badge-count', 'group/group-applications/observe-group-application-badge-count'], +]); + +const operationPages = { + cancelUpload: 'file-uploads/upload-file', + checkGroupMemberFullSync: 'group/check-full-sync-state', + checkLocalGroupFullSync: 'group/check-full-sync-state', + createFileMessage: 'message/creating-messages/create-file-message-from-full-path', + createFileMessageFromFullPath: 'message/creating-messages/create-file-message-from-full-path', + createImageMessage: 'message/creating-messages/create-image-message-from-full-path', + createImageMessageFromFullPath: 'message/creating-messages/create-image-message-from-full-path', + createSoundMessage: 'message/creating-messages/create-sound-message-from-full-path', + createSoundMessageFromFullPath: 'message/creating-messages/create-sound-message-from-full-path', + createVideoMessage: 'message/creating-messages/create-video-message-from-full-path', + createVideoMessageFromFullPath: 'message/creating-messages/create-video-message-from-full-path', + getBlacks: 'user/blacklist/get-black-list', + getConversationGroupByConversationID: 'conversation/managing-conversation-groups/get-conversation-group-by-conversation-id', + getHistoryMessageList: 'message/retrieving-messages/load-older-messages', + getOpenIMDataPath: 'getting-started/install-initialize-and-inspect-sdk', + getSDKSessionSnapshot: 'getting-started/update-token-and-observe-sdk-session', + getSdkVersion: 'getting-started/install-initialize-and-inspect-sdk', + getSpeechToTextCapabilities: 'message/composing-messages/check-speech-to-text', + initSDK: 'getting-started/install-initialize-and-inspect-sdk', + resetConversationUnread: 'conversation/managing-conversations/mark-conversation-read', + setAppBadge: 'getting-started/handle-app-lifecycle-and-device-state', + signalingGetInvitationInfoStartApp: 'calling/retrieving-call-information/restore-pending-invitation', + signalingSendCustomSignaling: 'calling/sending-custom-signals/send-a-custom-signal', + translateMessage: 'message/composing-messages/translate-text-and-messages', + translateText: 'message/composing-messages/translate-text-and-messages', + unInitSDK: 'getting-started/install-initialize-and-inspect-sdk', + updateFcmToken: 'getting-started/handle-app-lifecycle-and-device-state', + updateFriend: 'user/friends/update-friends', + updateToken: 'getting-started/update-token-and-observe-sdk-session', + uploadLogs: 'logger', +}; + +const eventPages = { + onChangedPinnedMsg: 'message/managing-messages/set-message-pinned', + onConversationGroupAdded: 'conversation/managing-conversation-groups/overview-conversation-groups', + onConversationGroupChanged: 'conversation/managing-conversation-groups/overview-conversation-groups', + onConversationGroupDeleted: 'conversation/managing-conversation-groups/overview-conversation-groups', + onConversationGroupMemberAdded: 'conversation/managing-conversation-groups/overview-conversation-groups', + onConversationGroupMemberDeleted: 'conversation/managing-conversation-groups/overview-conversation-groups', + onDeleteUserAllMsgsInConv: 'message/managing-messages/delete-user-messages', + onGroupApplicationBadgeCountChanged: 'group/group-applications/observe-group-application-badge-count', + onHangUp: 'calling/managing-calls/handle-call-events', + onInvitationCancelled: 'calling/managing-calls/handle-call-events', + onInvitationTimeout: 'calling/managing-calls/handle-call-events', + onInviteeAccepted: 'calling/managing-calls/handle-call-events', + onInviteeAcceptedByOtherDevice: 'calling/managing-calls/handle-call-events', + onInviteeRejected: 'calling/managing-calls/handle-call-events', + onInviteeRejectedByOtherDevice: 'calling/managing-calls/handle-call-events', + onMessageEdited: 'message/managing-messages/modify-a-message', + onMessageKvInfoChanged: 'message/receiving-messages/receive-custom-business-messages', + onMessageModified: 'message/managing-messages/modify-a-message', + onMigrationFailed: 'events/handle-data-migration-events', + onMigrationFinished: 'events/handle-data-migration-events', + onMigrationProgress: 'events/handle-data-migration-events', + onMigrationStart: 'events/handle-data-migration-events', + onReceiveCustomSignal: 'calling/sending-custom-signals/send-a-custom-signal', + onReceiveCustomSignaling: 'calling/sending-custom-signals/send-a-custom-signal', + onReceiveNewInvitation: 'calling/managing-calls/handle-call-events', + onRecvGroupReadReceipt: 'message/managing-read-status/send-group-read-receipts', + onRecvMessageExtensionsAdded: 'message/receiving-messages/receive-custom-business-messages', + onRecvMessageExtensionsChanged: 'message/receiving-messages/receive-custom-business-messages', + onRecvMessageExtensionsDeleted: 'message/receiving-messages/receive-custom-business-messages', + onRoomParticipantConnected: 'calling/managing-calls/handle-call-events', + onRoomParticipantDisconnected: 'calling/managing-calls/handle-call-events', + onSDKSessionChanged: 'getting-started/update-token-and-observe-sdk-session', + onStreamChange: 'calling/managing-calls/handle-call-events', +}; + +function sha256(value) { + return createHash('sha256').update(value).digest('hex'); +} + +function toUniAppPage(wasmPath) { + const suffix = wasmPath.replace('/sdk/wasm/', ''); + return `/sdk/uniapp/${renamedSuffixes.get(suffix) ?? suffix}`; +} + +function fallbackPage(name) { + if (/signaling|Invitation|Invitee|HangUp|RoomParticipant|CustomSignal|Stream/i.test(name)) return '/sdk/uniapp/calling/overview-calling'; + if (/Conversation/i.test(name)) return '/sdk/uniapp/conversation/overview-conversation'; + if (/Group/i.test(name)) return '/sdk/uniapp/group/overview-group'; + if (/Friend|Black/i.test(name)) return '/sdk/uniapp/user/overview-user'; + if (/Message|Typing|Input|Upload/i.test(name)) return '/sdk/uniapp/message/overview-message'; + return '/sdk/uniapp/getting-started/authenticate-and-manage-session'; +} + +function typeOwner(name) { + if (/(Handler|Callback|Listener|Subscription|SDKEventName|Resolve|Reject)$/.test(name)) { + return { page: null, disposition: 'signature-only' }; + } + if (/Signaling|Invitation|Invitee|Room|Participant|Certificate/i.test(name)) return { page: '/sdk/uniapp/calling/overview-calling', disposition: 'shared-model' }; + if (/Conversation/i.test(name)) return { page: '/sdk/uniapp/conversation/overview-conversation', disposition: 'shared-model' }; + if (/Group/i.test(name)) return { page: '/sdk/uniapp/group/overview-group', disposition: 'shared-model' }; + if (/Message|Elem|OfflinePush|SearchResult/i.test(name)) return { page: '/sdk/uniapp/message/overview-message', disposition: 'shared-model' }; + if (/Friend|Black|User/i.test(name)) return { page: '/sdk/uniapp/user/overview-user', disposition: 'shared-model' }; + return { page: '/sdk/uniapp/getting-started/authenticate-and-manage-session', disposition: 'shared-model' }; +} + +function constantOwner(name) { + if (/Conversation/i.test(name)) return '/sdk/uniapp/conversation/overview-conversation'; + if (/Group/i.test(name)) return '/sdk/uniapp/group/overview-group'; + if (/Message|Receipt|Content/i.test(name)) return '/sdk/uniapp/message/overview-message'; + if (/Friend|Black|User/i.test(name)) return '/sdk/uniapp/user/overview-user'; + return '/sdk/uniapp/getting-started/authenticate-and-manage-session'; +} + +export function buildUniAppSdkOwnership({ manifest, wasmOwnership, manifestSha256 }) { + const wasmMethods = new Map( + wasmOwnership.methods.filter((item) => item.page).map((item) => [item.name, item]), + ); + const wasmEvents = new Map( + wasmOwnership.events.filter((item) => item.page).map((item) => [item.name, item]), + ); + const eventsByName = new Map(manifest.events.map((item) => [item.name, item])); + + const events = manifest.events.map((item) => { + const wasmName = `On${item.name.slice(2)}`; + const wasmOwner = wasmEvents.get(wasmName); + const suffix = eventPages[item.name]; + return { + name: item.name, + page: suffix ? `/sdk/uniapp/${suffix}` : wasmOwner ? toUniAppPage(wasmOwner.page) : fallbackPage(item.name), + disposition: 'documented', + edition: item.edition, + platforms: item.platforms, + payloadProfile: item.payloadProfile, + synthetic: item.synthetic, + }; + }); + const eventOwnerByName = new Map(events.map((item) => [item.name, item.page])); + + const callables = manifest.callables.map((item) => { + if (item.role === 'event-control') { + return { ...item, page: '/sdk/uniapp/events/overview-events', disposition: 'documented' }; + } + if (item.role === 'event-subscription') { + const event = eventsByName.get(item.name); + return { + ...item, + page: event ? eventOwnerByName.get(event.name) : fallbackPage(item.name), + disposition: 'documented', + }; + } + const wasmOwner = wasmMethods.get(item.name); + const suffix = operationPages[item.name]; + return { + ...item, + page: suffix ? `/sdk/uniapp/${suffix}` : wasmOwner ? toUniAppPage(wasmOwner.page) : fallbackPage(item.name), + disposition: 'documented', + }; + }); + + return { + api: { + schemaVersion: 1, + manifestSha256, + callables, + events, + }, + types: { + schemaVersion: 1, + manifestSha256, + types: manifest.types.map((item) => ({ ...item, ...typeOwner(item.name) })), + constants: manifest.constants.map((item) => ({ + ...item, + page: constantOwner(item.name), + disposition: 'documented', + })), + typeExtensions: manifest.typeExtensions.map((item) => ({ + ...item, + page: typeOwner(item.target).page, + disposition: 'field-level-commercial', + })), + }, + }; +} + +export function applyOwnershipToAudit({ audit, ownership }) { + const methodsByPage = new Map(); + const eventsByPage = new Map(); + for (const item of ownership.callables) { + const values = methodsByPage.get(item.page) ?? []; + values.push(item.name); + methodsByPage.set(item.page, values); + } + for (const item of ownership.events) { + const values = eventsByPage.get(item.page) ?? []; + values.push(item.name); + eventsByPage.set(item.page, values); + } + return { + ...audit, + pages: audit.pages.map((page) => ({ + ...page, + sdkMethods: (methodsByPage.get(page.currentPath) ?? []).sort(), + sdkEvents: (eventsByPage.get(page.currentPath) ?? []).sort(), + })), + }; +} + +async function main() { + const manifestSource = await readFile(resolve(root, 'data/structure/uniapp-sdk-doc-manifest.json'), 'utf8'); + const manifest = JSON.parse(manifestSource); + const wasmOwnership = JSON.parse( + await readFile(resolve(root, 'data/structure/wasm-api-ownership.json'), 'utf8'), + ); + const audit = JSON.parse( + await readFile(resolve(root, 'data/structure/uniapp-content-audit.json'), 'utf8'), + ); + const output = buildUniAppSdkOwnership({ + manifest, + wasmOwnership, + manifestSha256: sha256(manifestSource), + }); + const auditedOwnership = applyOwnershipToAudit({ audit, ownership: output.api }); + await Promise.all([ + writeFile(resolve(root, 'data/structure/uniapp-api-ownership.json'), `${JSON.stringify(output.api, null, 2)}\n`), + writeFile(resolve(root, 'data/structure/uniapp-type-ownership.json'), `${JSON.stringify(output.types, null, 2)}\n`), + writeFile(resolve(root, 'data/structure/uniapp-content-audit.json'), `${JSON.stringify(auditedOwnership, null, 2)}\n`), + ]); + console.log(`Synchronized uni-app ownership (${output.api.callables.length} callables, ${output.api.events.length} events, ${output.types.types.length} types).`); +} + +if (resolve(process.argv[1] ?? '') === new URL(import.meta.url).pathname) await main(); diff --git a/src/components/docs/documentation-page.tsx b/src/components/docs/documentation-page.tsx index 460333bc88..a950b169f9 100644 --- a/src/components/docs/documentation-page.tsx +++ b/src/components/docs/documentation-page.tsx @@ -293,6 +293,7 @@ function getSdkOverviewPlatform(path: string): SdkOverviewPlatform | undefined { const overviewPaths: Record = { '/sdk/flutter/overview': 'flutter', '/sdk/ios/overview': 'ios', + '/sdk/uniapp/overview': 'uniapp', '/sdk/wasm/overview': 'wasm', }; diff --git a/src/components/docs/sdk-overview-page.tsx b/src/components/docs/sdk-overview-page.tsx index 8463905f94..01e2894093 100644 --- a/src/components/docs/sdk-overview-page.tsx +++ b/src/components/docs/sdk-overview-page.tsx @@ -24,7 +24,7 @@ type ResourceLink = { title: string; }; -export type SdkOverviewPlatform = 'flutter' | 'ios' | 'wasm'; +export type SdkOverviewPlatform = 'flutter' | 'ios' | 'uniapp' | 'wasm'; type OverviewCopy = { eyebrow: string; @@ -307,6 +307,54 @@ const mobileCopy = { }, ], }, + uniapp: { + eyebrow: 'unix-openim-sdk 0.2', + intro: + 'OpenIM uni-app / uni-app x SDK 通过 UTS 原生插件为 Android、iOS 和商业版 HarmonyOS 应用提供用户、会话、群组、消息、实时事件与本地存储能力。先安装插件并完成原生工程配置,再初始化、登录并通过类型化 API 与事件订阅接入业务状态。', + mostPopular: '热门主题', + recommended: '推荐功能', + resources: '资源', + popular: createMobilePopularCards('uniapp'), + features: [ + { + title: '用户认证', + description: '使用服务端签发的 Token 登录,并处理连接、Token 失效和被踢下线事件。', + href: '/sdk/uniapp/getting-started/authenticate-and-manage-session', + }, + { + title: '插件与生命周期', + description: '安装 UTS 插件,初始化唯一 SDK Core,并正确处理 App 生命周期。', + href: '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk', + }, + { + title: '事件', + description: '保存每个订阅句柄,并通过 off(subscription) 精确释放监听。', + href: '/sdk/uniapp/events/overview-events', + }, + ], + links: [ + { + title: '发送第一条消息', + description: '完成插件安装、初始化、登录、创建消息并发送。', + href: '/sdk/uniapp/getting-started/send-first-message', + }, + { + title: '平台与环境', + description: '核对 uni-app、uni-app x、Android、iOS 与 HarmonyOS 支持边界。', + href: '/sdk/uniapp/getting-started/environment-specific-implementation', + }, + { + title: '日志与诊断', + description: '配置 SDK 日志,并保留脱敏的错误码与 operationID 用于诊断。', + href: '/sdk/uniapp/logger', + }, + { + title: '客户端 SDK 错误码', + description: '查询通用错误码和 platform-unsupported 等平台错误。', + href: '/sdk/error-codes', + }, + ], + }, } satisfies Record, OverviewCopy>; function createMobilePopularCards( diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 82f0673107..e917058bbb 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -7893,7 +7893,7 @@ }, { "key": "chat/sdk/uniapp", - "title": "SDKs · uni-app · v4", + "title": "SDKs · uni-app / uni-app x · v4", "rootPath": "/sdk/uniapp", "overviewPath": "/sdk/uniapp/overview", "product": "sdk", @@ -7907,10 +7907,1995 @@ "href": "/sdk/uniapp/overview", "type": "page", "children": [], - "minIndex": 383 + "minIndex": 383, + "navigationTitle": "Overview" + }, + { + "id": "getting-started", + "segment": "getting-started", + "title": "Getting started", + "href": null, + "type": "folder", + "children": [ + { + "id": "getting-started/before-you-start", + "segment": "before-you-start", + "title": "Before you start", + "href": "/sdk/uniapp/getting-started/before-you-start", + "type": "page", + "children": [], + "minIndex": 384 + }, + { + "id": "getting-started/environment-specific-implementation", + "segment": "environment-specific-implementation", + "title": "Environment-specific implementation", + "href": "/sdk/uniapp/getting-started/environment-specific-implementation", + "type": "page", + "children": [], + "minIndex": 385 + }, + { + "id": "getting-started/authenticate-and-manage-session", + "segment": "authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "href": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "type": "page", + "children": [], + "minIndex": 386 + }, + { + "id": "getting-started/send-first-message", + "segment": "send-first-message", + "title": "Send your first message", + "href": "/sdk/uniapp/getting-started/send-first-message", + "type": "page", + "children": [], + "minIndex": 387 + }, + { + "id": "getting-started/install-initialize-and-inspect-sdk", + "segment": "install-initialize-and-inspect-sdk", + "title": "Install, initialize, and inspect the SDK", + "href": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "type": "page", + "children": [], + "minIndex": 388, + "navigationTitle": "Install, initialize, and inspect the SDK" + }, + { + "id": "getting-started/handle-app-lifecycle-and-device-state", + "segment": "handle-app-lifecycle-and-device-state", + "title": "Handle App lifecycle and device state", + "href": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "type": "page", + "children": [], + "minIndex": 389, + "navigationTitle": "Handle App lifecycle and device state" + }, + { + "id": "getting-started/update-token-and-observe-sdk-session", + "segment": "update-token-and-observe-sdk-session", + "title": "Update tokens and observe SDK sessions", + "href": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "type": "page", + "children": [], + "minIndex": 390, + "navigationTitle": "Update tokens and observe SDK sessions" + } + ], + "minIndex": 384 + }, + { + "id": "user", + "segment": "user", + "title": "User", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/overview-user", + "segment": "overview-user", + "title": "User overview", + "href": "/sdk/uniapp/user/overview-user", + "type": "page", + "children": [], + "minIndex": 391 + }, + { + "id": "user/user-profile", + "segment": "user-profile", + "title": "User profile", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/profile/get-users-info", + "segment": "get-users-info", + "title": "Get user profiles", + "href": "/sdk/uniapp/user/profile/get-users-info", + "type": "page", + "children": [], + "minIndex": 392, + "navigationTitle": "Get user profiles" + }, + { + "id": "user/profile/get-self-user-info", + "segment": "get-self-user-info", + "title": "Get your profile", + "href": "/sdk/uniapp/user/profile/get-self-user-info", + "type": "page", + "children": [], + "minIndex": 393, + "navigationTitle": "Get your profile" + }, + { + "id": "user/profile/set-self-info", + "segment": "set-self-info", + "title": "Update your profile", + "href": "/sdk/uniapp/user/profile/set-self-info", + "type": "page", + "children": [], + "minIndex": 394, + "navigationTitle": "Update your profile" + } + ], + "minIndex": 392 + }, + { + "id": "user/profile/set-global-message-reception", + "segment": "set-global-message-reception", + "title": "Set global message reception", + "href": "/sdk/uniapp/user/profile/set-global-message-reception", + "type": "page", + "children": [], + "minIndex": 395, + "navigationTitle": "Set global message reception" + }, + { + "id": "user/profile/set-friend-add-permission", + "segment": "set-friend-add-permission", + "title": "Set friend request permissions", + "href": "/sdk/uniapp/user/profile/set-friend-add-permission", + "type": "page", + "children": [], + "minIndex": 396, + "navigationTitle": "Set friend request permissions" + }, + { + "id": "user/online-status", + "segment": "online-status", + "title": "Online status", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/online-status/subscribe-users-status", + "segment": "subscribe-users-status", + "title": "Subscribe to online status", + "href": "/sdk/uniapp/user/online-status/subscribe-users-status", + "type": "page", + "children": [], + "minIndex": 397, + "navigationTitle": "Subscribe to online status" + }, + { + "id": "user/online-status/get-subscribe-users-status", + "segment": "get-subscribe-users-status", + "title": "Get subscribed user status", + "href": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "type": "page", + "children": [], + "minIndex": 398, + "navigationTitle": "Get subscribed user status" + }, + { + "id": "user/online-status/unsubscribe-users-status", + "segment": "unsubscribe-users-status", + "title": "Unsubscribe from online status", + "href": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "type": "page", + "children": [], + "minIndex": 399, + "navigationTitle": "Unsubscribe from online status" + } + ], + "minIndex": 397 + } + ], + "minIndex": 391 + }, + { + "id": "relationships", + "segment": "relationships", + "title": "Relationships", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/friends", + "segment": "friends", + "title": "Friends", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/friends/get-friend-list-page", + "segment": "get-friend-list-page", + "title": "Get the friend list", + "href": "/sdk/uniapp/user/friends/get-friend-list-page", + "type": "page", + "children": [], + "minIndex": 400, + "navigationTitle": "Get the friend list" + }, + { + "id": "user/friends/search-friends", + "segment": "search-friends", + "title": "Search friends", + "href": "/sdk/uniapp/user/friends/search-friends", + "type": "page", + "children": [], + "minIndex": 401, + "navigationTitle": "Search friends" + }, + { + "id": "user/friends/get-specified-friends-info", + "segment": "get-specified-friends-info", + "title": "Get friend profiles", + "href": "/sdk/uniapp/user/friends/get-specified-friends-info", + "type": "page", + "children": [], + "minIndex": 402, + "navigationTitle": "Get friend profiles" + }, + { + "id": "user/friends/check-friend", + "segment": "check-friend", + "title": "Check friendship status", + "href": "/sdk/uniapp/user/friends/check-friend", + "type": "page", + "children": [], + "minIndex": 403, + "navigationTitle": "Check friendship status" + }, + { + "id": "user/friends/update-friends", + "segment": "update-friends", + "title": "Update friend information", + "href": "/sdk/uniapp/user/friends/update-friends", + "type": "page", + "children": [], + "minIndex": 404, + "navigationTitle": "Update friend information" + }, + { + "id": "user/friends/delete-friend", + "segment": "delete-friend", + "title": "Delete a friend", + "href": "/sdk/uniapp/user/friends/delete-friend", + "type": "page", + "children": [], + "minIndex": 405, + "navigationTitle": "Delete a friend" + }, + { + "id": "user/friend-applications", + "segment": "friend-applications", + "title": "Friend applications", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/friend-applications/add-friend", + "segment": "add-friend", + "title": "Send a friend application", + "href": "/sdk/uniapp/user/friend-applications/add-friend", + "type": "page", + "children": [], + "minIndex": 406, + "navigationTitle": "Send a friend application" + }, + { + "id": "user/friend-applications/get-friend-application-list-as-recipient", + "segment": "get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "href": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "type": "page", + "children": [], + "minIndex": 407, + "navigationTitle": "Get received friend applications" + }, + { + "id": "user/friend-applications/get-friend-application-list-as-applicant", + "segment": "get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "href": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "type": "page", + "children": [], + "minIndex": 408, + "navigationTitle": "Get sent friend applications" + }, + { + "id": "user/friend-applications/get-friend-application-unhandled-count", + "segment": "get-friend-application-unhandled-count", + "title": "Get pending application count", + "href": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "type": "page", + "children": [], + "minIndex": 409, + "navigationTitle": "Get pending application count" + }, + { + "id": "user/friend-applications/accept-friend-application", + "segment": "accept-friend-application", + "title": "Accept a friend application", + "href": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "type": "page", + "children": [], + "minIndex": 410, + "navigationTitle": "Accept a friend application" + }, + { + "id": "user/friend-applications/refuse-friend-application", + "segment": "refuse-friend-application", + "title": "Reject a friend application", + "href": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "type": "page", + "children": [], + "minIndex": 411, + "navigationTitle": "Reject a friend application" + }, + { + "id": "user/friend-applications/delete-friend-requests", + "segment": "delete-friend-requests", + "title": "Delete friend applications", + "href": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "type": "page", + "children": [], + "minIndex": 412, + "navigationTitle": "Delete friend applications" + } + ], + "minIndex": 406 + } + ], + "minIndex": 400 + }, + { + "id": "user/blacklist", + "segment": "blacklist", + "title": "Blacklist", + "href": null, + "type": "folder", + "children": [ + { + "id": "user/blacklist/get-black-list", + "segment": "get-black-list", + "title": "Get the blacklist", + "href": "/sdk/uniapp/user/blacklist/get-black-list", + "type": "page", + "children": [], + "minIndex": 413, + "navigationTitle": "Get the blacklist" + }, + { + "id": "user/blacklist/add-black", + "segment": "add-black", + "title": "Add a user to the blacklist", + "href": "/sdk/uniapp/user/blacklist/add-black", + "type": "page", + "children": [], + "minIndex": 414, + "navigationTitle": "Add a user to the blacklist" + }, + { + "id": "user/blacklist/remove-black", + "segment": "remove-black", + "title": "Remove a user from the blacklist", + "href": "/sdk/uniapp/user/blacklist/remove-black", + "type": "page", + "children": [], + "minIndex": 415, + "navigationTitle": "Remove a user from the blacklist" + } + ], + "minIndex": 413 + } + ], + "minIndex": 400 + }, + { + "id": "conversation", + "segment": "conversation", + "title": "Conversation", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/overview-conversation", + "segment": "overview-conversation", + "title": "Conversation overview", + "href": "/sdk/uniapp/conversation/overview-conversation", + "type": "page", + "children": [], + "minIndex": 416 + }, + { + "id": "conversation/retrieving-conversations", + "segment": "retrieving-conversations", + "title": "Retrieving conversations", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/retrieving-conversations/get-conversation-by-target", + "segment": "get-conversation-by-target", + "title": "Open a conversation", + "href": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "type": "page", + "children": [], + "minIndex": 417, + "navigationTitle": "Open a conversation" + }, + { + "id": "conversation/retrieving-conversations/get-conversation-id", + "segment": "get-conversation-id", + "title": "Resolve a conversation ID", + "href": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "type": "page", + "children": [], + "minIndex": 418, + "navigationTitle": "Resolve a conversation ID" + }, + { + "id": "conversation/retrieving-conversations/get-conversations-by-id", + "segment": "get-conversations-by-id", + "title": "Get conversations by ID", + "href": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "type": "page", + "children": [], + "minIndex": 419, + "navigationTitle": "Get conversations by ID" + }, + { + "id": "conversation/retrieving-conversations/retrieve-conversation-list", + "segment": "retrieve-conversation-list", + "title": "Get the conversation list", + "href": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "type": "page", + "children": [], + "minIndex": 420 + }, + { + "id": "conversation/retrieving-conversations/search-conversations", + "segment": "search-conversations", + "title": "Search conversations", + "href": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "type": "page", + "children": [], + "minIndex": 421, + "navigationTitle": "Search conversations" + } + ], + "minIndex": 417 + }, + { + "id": "conversation/conversation-list-and-drafts", + "segment": "conversation-list-and-drafts", + "title": "Conversation organization", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/pin-conversation", + "segment": "pin-conversation", + "title": "Pin or unpin a conversation", + "href": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "type": "page", + "children": [], + "minIndex": 422, + "navigationTitle": "Pin or unpin a conversation" + }, + { + "id": "conversation/managing-conversations/mark-conversation", + "segment": "mark-conversation", + "title": "Mark or unmark a conversation", + "href": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "type": "page", + "children": [], + "minIndex": 423, + "navigationTitle": "Mark or unmark a conversation" + }, + { + "id": "conversation/managing-conversations/set-conversation-remark", + "segment": "set-conversation-remark", + "title": "Set a conversation remark", + "href": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "type": "page", + "children": [], + "minIndex": 424, + "navigationTitle": "Set a conversation remark" + }, + { + "id": "conversation/managing-conversations/set-conversation-extension", + "segment": "set-conversation-extension", + "title": "Set conversation extra data", + "href": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "type": "page", + "children": [], + "minIndex": 425, + "navigationTitle": "Set conversation extra data" + }, + { + "id": "conversation/managing-conversations/set-conversation-draft", + "segment": "set-conversation-draft", + "title": "Set a conversation draft", + "href": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "type": "page", + "children": [], + "minIndex": 426 + } + ], + "minIndex": 422 + }, + { + "id": "conversation/message-reception-and-reminders", + "segment": "message-reception-and-reminders", + "title": "Unread status and notifications", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/set-message-receive-option", + "segment": "set-message-receive-option", + "title": "Set conversation message reception", + "href": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "type": "page", + "children": [], + "minIndex": 427, + "navigationTitle": "Set conversation message reception" + }, + { + "id": "conversation/managing-conversations/clear-group-mentions", + "segment": "clear-group-mentions", + "title": "Reset group mention status", + "href": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "type": "page", + "children": [], + "minIndex": 428, + "navigationTitle": "Reset group mention status" + }, + { + "id": "conversation/managing-conversations/mark-conversation-read", + "segment": "mark-conversation-read", + "title": "Mark a conversation as read", + "href": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "type": "page", + "children": [], + "minIndex": 429, + "navigationTitle": "Mark a conversation as read" + }, + { + "id": "conversation/managing-conversations/mark-all-conversations-read", + "segment": "mark-all-conversations-read", + "title": "Mark all conversations as read", + "href": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "type": "page", + "children": [], + "minIndex": 430, + "navigationTitle": "Mark all conversations as read" + }, + { + "id": "conversation/managing-conversations/get-total-unread-count", + "segment": "get-total-unread-count", + "title": "Track the total unread count", + "href": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "type": "page", + "children": [], + "minIndex": 431, + "navigationTitle": "Track the total unread count" + } + ], + "minIndex": 427 + }, + { + "id": "conversation/message-retention-and-privacy", + "segment": "message-retention-and-privacy", + "title": "Message retention and privacy", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/set-private-chat", + "segment": "set-private-chat", + "title": "Enable or disable burn after reading", + "href": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "type": "page", + "children": [], + "minIndex": 432, + "navigationTitle": "Enable or disable burn after reading" + }, + { + "id": "conversation/managing-conversations/set-burn-duration", + "segment": "set-burn-duration", + "title": "Set the burn duration", + "href": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "type": "page", + "children": [], + "minIndex": 433, + "navigationTitle": "Set the burn duration" + }, + { + "id": "conversation/managing-conversations/set-message-destruct", + "segment": "set-message-destruct", + "title": "Schedule server message deletion", + "href": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "type": "page", + "children": [], + "minIndex": 434, + "navigationTitle": "Schedule server message deletion" + } + ], + "minIndex": 432 + }, + { + "id": "conversation/hiding-and-deleting-conversations", + "segment": "hiding-and-deleting-conversations", + "title": "Hiding and deleting conversations", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversations/hide-a-conversation", + "segment": "hide-a-conversation", + "title": "Hide a conversation", + "href": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "type": "page", + "children": [], + "minIndex": 435 + }, + { + "id": "conversation/managing-conversations/hide-all-conversations", + "segment": "hide-all-conversations", + "title": "Hide all conversations", + "href": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "type": "page", + "children": [], + "minIndex": 436, + "navigationTitle": "Hide all conversations" + }, + { + "id": "conversation/managing-conversations/delete-conversation", + "segment": "delete-conversation", + "title": "Delete a conversation", + "href": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "type": "page", + "children": [], + "minIndex": 437, + "navigationTitle": "Delete a conversation" + }, + { + "id": "conversation/managing-conversations/delete-conversation-with-messages", + "segment": "delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "href": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "type": "page", + "children": [], + "minIndex": 438, + "navigationTitle": "Delete a conversation and its messages" + }, + { + "id": "conversation/managing-conversations/clear-conversation-messages", + "segment": "clear-conversation-messages", + "title": "Clear messages in a conversation", + "href": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "type": "page", + "children": [], + "minIndex": 439, + "navigationTitle": "Clear messages in a conversation" + } + ], + "minIndex": 435 + }, + { + "id": "conversation/conversation-groups", + "segment": "conversation-groups", + "title": "Conversation groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "conversation/managing-conversation-groups/overview-conversation-groups", + "segment": "overview-conversation-groups", + "title": "Conversation group overview", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "type": "page", + "children": [], + "minIndex": 440, + "navigationTitle": "Conversation group overview" + }, + { + "id": "conversation/managing-conversation-groups/create-conversation-group", + "segment": "create-conversation-group", + "title": "Create a conversation group", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "type": "page", + "children": [], + "minIndex": 441, + "navigationTitle": "Create a conversation group" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-groups", + "segment": "get-conversation-groups", + "title": "Get conversation groups", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "type": "page", + "children": [], + "minIndex": 442, + "navigationTitle": "Get conversation groups" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "segment": "get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "type": "page", + "children": [], + "minIndex": 443, + "navigationTitle": "Get conversations in a group" + }, + { + "id": "conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "segment": "get-conversation-group-by-conversation-id", + "title": "getConversationGroupByConversationID", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "type": "page", + "children": [], + "minIndex": 444, + "navigationTitle": "Get groups for a conversation" + }, + { + "id": "conversation/managing-conversation-groups/update-conversation-group", + "segment": "update-conversation-group", + "title": "Update a conversation group", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "type": "page", + "children": [], + "minIndex": 445, + "navigationTitle": "Update a conversation group" + }, + { + "id": "conversation/managing-conversation-groups/set-conversation-group-order", + "segment": "set-conversation-group-order", + "title": "Reorder conversation groups", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "type": "page", + "children": [], + "minIndex": 446, + "navigationTitle": "Reorder conversation groups" + }, + { + "id": "conversation/managing-conversation-groups/add-conversations-to-groups", + "segment": "add-conversations-to-groups", + "title": "Add conversations to groups", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "type": "page", + "children": [], + "minIndex": 447, + "navigationTitle": "Add conversations to groups" + }, + { + "id": "conversation/managing-conversation-groups/remove-conversations-from-groups", + "segment": "remove-conversations-from-groups", + "title": "Remove conversations from groups", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "type": "page", + "children": [], + "minIndex": 448, + "navigationTitle": "Remove conversations from groups" + }, + { + "id": "conversation/managing-conversation-groups/delete-conversation-group", + "segment": "delete-conversation-group", + "title": "Delete a conversation group", + "href": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "type": "page", + "children": [], + "minIndex": 449, + "navigationTitle": "Delete a conversation group" + } + ], + "minIndex": 440 + } + ], + "minIndex": 416 + }, + { + "id": "group", + "segment": "group", + "title": "Group", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/overview-group", + "segment": "overview-group", + "title": "Group overview", + "href": "/sdk/uniapp/group/overview-group", + "type": "page", + "children": [], + "minIndex": 450, + "navigationTitle": "Group overview" + }, + { + "id": "group/profile-and-settings", + "segment": "profile-and-settings", + "title": "Group profile and settings", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/create-group", + "segment": "create-group", + "title": "Create a group", + "href": "/sdk/uniapp/group/create-group", + "type": "page", + "children": [], + "minIndex": 451, + "navigationTitle": "Create a group" + }, + { + "id": "group/update-group-profile", + "segment": "update-group-profile", + "title": "Update group profile", + "href": "/sdk/uniapp/group/update-group-profile", + "type": "page", + "children": [], + "minIndex": 452, + "navigationTitle": "Update group profile" + }, + { + "id": "group/set-group-announcement", + "segment": "set-group-announcement", + "title": "Publish a group announcement", + "href": "/sdk/uniapp/group/set-group-announcement", + "type": "page", + "children": [], + "minIndex": 453, + "navigationTitle": "Publish a group announcement" + }, + { + "id": "group/set-group-extension", + "segment": "set-group-extension", + "title": "Set group extra data", + "href": "/sdk/uniapp/group/set-group-extension", + "type": "page", + "children": [], + "minIndex": 454, + "navigationTitle": "Set group extra data" + } + ], + "minIndex": 451 + }, + { + "id": "group/permissions", + "segment": "permissions", + "title": "Group permissions", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/set-group-join-verification", + "segment": "set-group-join-verification", + "title": "Set group join verification", + "href": "/sdk/uniapp/group/set-group-join-verification", + "type": "page", + "children": [], + "minIndex": 455, + "navigationTitle": "Set group join verification" + }, + { + "id": "group/set-group-member-profile-access", + "segment": "set-group-member-profile-access", + "title": "Set member profile access", + "href": "/sdk/uniapp/group/set-group-member-profile-access", + "type": "page", + "children": [], + "minIndex": 456, + "navigationTitle": "Set member profile access" + }, + { + "id": "group/set-group-member-friend-permission", + "segment": "set-group-member-friend-permission", + "title": "Set member friend request permission", + "href": "/sdk/uniapp/group/set-group-member-friend-permission", + "type": "page", + "children": [], + "minIndex": 457, + "navigationTitle": "Set member friend request permission" + }, + { + "id": "group/change-group-mute", + "segment": "change-group-mute", + "title": "Change group mute status", + "href": "/sdk/uniapp/group/change-group-mute", + "type": "page", + "children": [], + "minIndex": 458, + "navigationTitle": "Change group mute status" + } + ], + "minIndex": 455 + }, + { + "id": "group/joining-and-leaving", + "segment": "joining-and-leaving", + "title": "Joining and leaving groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/join-group", + "segment": "join-group", + "title": "Apply to join a group", + "href": "/sdk/uniapp/group/join-group", + "type": "page", + "children": [], + "minIndex": 459, + "navigationTitle": "Apply to join a group" + }, + { + "id": "group/quit-group", + "segment": "quit-group", + "title": "Leave a group", + "href": "/sdk/uniapp/group/quit-group", + "type": "page", + "children": [], + "minIndex": 460, + "navigationTitle": "Leave a group" + }, + { + "id": "group/dismiss-group", + "segment": "dismiss-group", + "title": "Dismiss a group", + "href": "/sdk/uniapp/group/dismiss-group", + "type": "page", + "children": [], + "minIndex": 461, + "navigationTitle": "Dismiss a group" + } + ], + "minIndex": 459 + }, + { + "id": "group/retrieving-groups", + "segment": "retrieving-groups", + "title": "Retrieving groups", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/retrieving-groups/get-specified-groups-info", + "segment": "get-specified-groups-info", + "title": "Get group information", + "href": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "type": "page", + "children": [], + "minIndex": 462, + "navigationTitle": "Get group information" + }, + { + "id": "group/retrieving-groups/get-joined-group-list", + "segment": "get-joined-group-list", + "title": "Get joined groups", + "href": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "type": "page", + "children": [], + "minIndex": 463, + "navigationTitle": "Get joined groups" + }, + { + "id": "group/retrieving-groups/get-joined-group-list-page", + "segment": "get-joined-group-list-page", + "title": "Get joined groups by page", + "href": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "type": "page", + "children": [], + "minIndex": 464, + "navigationTitle": "Get joined groups by page" + }, + { + "id": "group/retrieving-groups/is-join-group", + "segment": "is-join-group", + "title": "Check group membership", + "href": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "type": "page", + "children": [], + "minIndex": 465, + "navigationTitle": "Check group membership" + }, + { + "id": "group/retrieving-groups/search-groups", + "segment": "search-groups", + "title": "Search groups", + "href": "/sdk/uniapp/group/retrieving-groups/search-groups", + "type": "page", + "children": [], + "minIndex": 466, + "navigationTitle": "Search groups" + } + ], + "minIndex": 462 + }, + { + "id": "group/group-applications", + "segment": "group-applications", + "title": "Group applications", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/group-applications/get-group-application-list-as-recipient", + "segment": "get-group-application-list-as-recipient", + "title": "Get received group applications", + "href": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "type": "page", + "children": [], + "minIndex": 467, + "navigationTitle": "Get received group applications" + }, + { + "id": "group/group-applications/get-group-application-list-as-applicant", + "segment": "get-group-application-list-as-applicant", + "title": "Get sent group applications", + "href": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "type": "page", + "children": [], + "minIndex": 468, + "navigationTitle": "Get sent group applications" + }, + { + "id": "group/group-applications/get-group-application-unhandled-count", + "segment": "get-group-application-unhandled-count", + "title": "Get the pending group application count", + "href": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "type": "page", + "children": [], + "minIndex": 469, + "navigationTitle": "Get pending group application count" + }, + { + "id": "group/group-applications/observe-group-application-badge-count", + "segment": "observe-group-application-badge-count", + "title": "Get the group application badge count", + "href": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "type": "page", + "children": [], + "minIndex": 470, + "navigationTitle": "Observe group application badge count" + }, + { + "id": "group/group-applications/accept-group-application", + "segment": "accept-group-application", + "title": "Accept a group application", + "href": "/sdk/uniapp/group/group-applications/accept-group-application", + "type": "page", + "children": [], + "minIndex": 471, + "navigationTitle": "Accept a group application" + }, + { + "id": "group/group-applications/refuse-group-application", + "segment": "refuse-group-application", + "title": "Reject a group application", + "href": "/sdk/uniapp/group/group-applications/refuse-group-application", + "type": "page", + "children": [], + "minIndex": 472, + "navigationTitle": "Reject a group application" + }, + { + "id": "group/group-applications/delete-group-requests", + "segment": "delete-group-requests", + "title": "Delete group applications", + "href": "/sdk/uniapp/group/group-applications/delete-group-requests", + "type": "page", + "children": [], + "minIndex": 473, + "navigationTitle": "Delete group applications" + } + ], + "minIndex": 467 + }, + { + "id": "group/retrieving-group-members", + "segment": "retrieving-group-members", + "title": "Retrieving group members", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/retrieving-group-members/get-group-member-list", + "segment": "get-group-member-list", + "title": "List group members", + "href": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "type": "page", + "children": [], + "minIndex": 474, + "navigationTitle": "Get group members" + }, + { + "id": "group/retrieving-group-members/get-specified-group-members-info", + "segment": "get-specified-group-members-info", + "title": "Get specified group member profiles", + "href": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "type": "page", + "children": [], + "minIndex": 475, + "navigationTitle": "Get group member profiles" + }, + { + "id": "group/retrieving-group-members/get-users-in-group", + "segment": "get-users-in-group", + "title": "Check group membership", + "href": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "type": "page", + "children": [], + "minIndex": 476, + "navigationTitle": "Check users in a group" + }, + { + "id": "group/retrieving-group-members/search-group-members", + "segment": "search-group-members", + "title": "Search group members", + "href": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "type": "page", + "children": [], + "minIndex": 477, + "navigationTitle": "Search group members" + } + ], + "minIndex": 474 + }, + { + "id": "group/managing-group-members", + "segment": "managing-group-members", + "title": "Managing group members", + "href": null, + "type": "folder", + "children": [ + { + "id": "group/managing-group-members/invite-user-to-group", + "segment": "invite-user-to-group", + "title": "Invite users to a group", + "href": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "type": "page", + "children": [], + "minIndex": 478, + "navigationTitle": "Invite users to a group" + }, + { + "id": "group/managing-group-members/kick-group-member", + "segment": "kick-group-member", + "title": "Remove group members", + "href": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "type": "page", + "children": [], + "minIndex": 479, + "navigationTitle": "Remove group members" + }, + { + "id": "group/managing-group-members/set-group-member-nickname", + "segment": "set-group-member-nickname", + "title": "Update a member’s group nickname", + "href": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "type": "page", + "children": [], + "minIndex": 480, + "navigationTitle": "Update a group nickname" + }, + { + "id": "group/managing-group-members/set-group-member-role-level", + "segment": "set-group-member-role-level", + "title": "Manage group administrators", + "href": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "type": "page", + "children": [], + "minIndex": 481, + "navigationTitle": "Manage group administrators" + }, + { + "id": "group/managing-group-members/set-group-member-avatar", + "segment": "set-group-member-avatar", + "title": "Update a group member’s avatar", + "href": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "type": "page", + "children": [], + "minIndex": 482, + "navigationTitle": "Update a group member avatar" + }, + { + "id": "group/managing-group-members/set-group-member-extension", + "segment": "set-group-member-extension", + "title": "Set a group member extension", + "href": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "type": "page", + "children": [], + "minIndex": 483, + "navigationTitle": "Set group member extra data" + }, + { + "id": "group/managing-group-members/transfer-group-owner", + "segment": "transfer-group-owner", + "title": "Transfer group ownership", + "href": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "type": "page", + "children": [], + "minIndex": 484, + "navigationTitle": "Transfer group ownership" + }, + { + "id": "group/managing-group-members/change-group-member-mute", + "segment": "change-group-member-mute", + "title": "Mute or unmute a group member", + "href": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "type": "page", + "children": [], + "minIndex": 485, + "navigationTitle": "Mute or unmute a group member" + } + ], + "minIndex": 478 + }, + { + "id": "group/check-full-sync-state", + "segment": "check-full-sync-state", + "title": "Check group full-sync state", + "href": "/sdk/uniapp/group/check-full-sync-state", + "type": "page", + "children": [], + "minIndex": 486, + "navigationTitle": "Check group full-sync state" + } + ], + "minIndex": 450 + }, + { + "id": "message", + "segment": "message", + "title": "Message", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/overview-message", + "segment": "overview-message", + "title": "Message overview", + "href": "/sdk/uniapp/message/overview-message", + "type": "page", + "children": [], + "minIndex": 487 + }, + { + "id": "message/creating-messages", + "segment": "creating-messages", + "title": "Creating messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/creating-messages/create-text-message", + "segment": "create-text-message", + "title": "Create a text message", + "href": "/sdk/uniapp/message/creating-messages/create-text-message", + "type": "page", + "children": [], + "minIndex": 488, + "navigationTitle": "Create a text message" + }, + { + "id": "message/creating-messages/create-text-at-message", + "segment": "create-text-at-message", + "title": "Create an @ message", + "href": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "type": "page", + "children": [], + "minIndex": 489, + "navigationTitle": "Create a mention message" + }, + { + "id": "message/creating-messages/create-custom-message", + "segment": "create-custom-message", + "title": "Create a custom message", + "href": "/sdk/uniapp/message/creating-messages/create-custom-message", + "type": "page", + "children": [], + "minIndex": 490, + "navigationTitle": "Create a custom message" + }, + { + "id": "message/creating-messages/create-image-message-from-full-path", + "segment": "create-image-message-from-full-path", + "title": "Create an image message from a file", + "href": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "type": "page", + "children": [], + "minIndex": 491, + "navigationTitle": "Create an image message from a file" + }, + { + "id": "message/creating-messages/create-image-message-by-url", + "segment": "create-image-message-by-url", + "title": "Create an image message from a URL", + "href": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "type": "page", + "children": [], + "minIndex": 492, + "navigationTitle": "Create an image message from a URL" + }, + { + "id": "message/creating-messages/create-sound-message-from-full-path", + "segment": "create-sound-message-from-full-path", + "title": "Create an audio message from a file", + "href": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "type": "page", + "children": [], + "minIndex": 493, + "navigationTitle": "Create an audio message from a file" + }, + { + "id": "message/creating-messages/create-sound-message-by-url", + "segment": "create-sound-message-by-url", + "title": "Create an audio message from a URL", + "href": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "type": "page", + "children": [], + "minIndex": 494, + "navigationTitle": "Create an audio message from a URL" + }, + { + "id": "message/creating-messages/create-video-message-from-full-path", + "segment": "create-video-message-from-full-path", + "title": "Create a video message from files", + "href": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "type": "page", + "children": [], + "minIndex": 495, + "navigationTitle": "Create a video message from a file" + }, + { + "id": "message/creating-messages/create-video-message-by-url", + "segment": "create-video-message-by-url", + "title": "Create a video message from URLs", + "href": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "type": "page", + "children": [], + "minIndex": 496, + "navigationTitle": "Create a video message from a URL" + }, + { + "id": "message/creating-messages/create-file-message-from-full-path", + "segment": "create-file-message-from-full-path", + "title": "Create a file message from a file", + "href": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "type": "page", + "children": [], + "minIndex": 497, + "navigationTitle": "Create a file message from a file" + }, + { + "id": "message/creating-messages/create-file-message-by-url", + "segment": "create-file-message-by-url", + "title": "Create a file message from a URL", + "href": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "type": "page", + "children": [], + "minIndex": 498, + "navigationTitle": "Create a file message from a URL" + }, + { + "id": "message/creating-messages/create-card-message", + "segment": "create-card-message", + "title": "Create a contact card message", + "href": "/sdk/uniapp/message/creating-messages/create-card-message", + "type": "page", + "children": [], + "minIndex": 499, + "navigationTitle": "Create a contact card message" + }, + { + "id": "message/creating-messages/create-location-message", + "segment": "create-location-message", + "title": "Create a location message", + "href": "/sdk/uniapp/message/creating-messages/create-location-message", + "type": "page", + "children": [], + "minIndex": 500, + "navigationTitle": "Create a location message" + }, + { + "id": "message/creating-messages/create-face-message", + "segment": "create-face-message", + "title": "Create an emoji message", + "href": "/sdk/uniapp/message/creating-messages/create-face-message", + "type": "page", + "children": [], + "minIndex": 501, + "navigationTitle": "Create an emoji message" + }, + { + "id": "message/creating-messages/create-quote-message", + "segment": "create-quote-message", + "title": "Create a reply message", + "href": "/sdk/uniapp/message/creating-messages/create-quote-message", + "type": "page", + "children": [], + "minIndex": 502, + "navigationTitle": "Create a reply message" + }, + { + "id": "message/creating-messages/create-markdown-message", + "segment": "create-markdown-message", + "title": "Create a Markdown message", + "href": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "type": "page", + "children": [], + "minIndex": 503, + "navigationTitle": "Create a Markdown message" + }, + { + "id": "message/creating-messages/create-forward-message", + "segment": "create-forward-message", + "title": "Create a forwarded message", + "href": "/sdk/uniapp/message/creating-messages/create-forward-message", + "type": "page", + "children": [], + "minIndex": 504, + "navigationTitle": "Create a forwarded message" + }, + { + "id": "message/creating-messages/create-merger-message", + "segment": "create-merger-message", + "title": "Create a merged forward message", + "href": "/sdk/uniapp/message/creating-messages/create-merger-message", + "type": "page", + "children": [], + "minIndex": 505, + "navigationTitle": "Create a merged message" + } + ], + "minIndex": 488 + }, + { + "id": "message/sending-messages", + "segment": "sending-messages", + "title": "Sending messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/sending-messages/send-message", + "segment": "send-message", + "title": "Send a message", + "href": "/sdk/uniapp/message/sending-messages/send-message", + "type": "page", + "children": [], + "minIndex": 506, + "navigationTitle": "Send a message" + }, + { + "id": "message/sending-messages/send-message-not-oss", + "segment": "send-message-not-oss", + "title": "Send an uploaded media message", + "href": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "type": "page", + "children": [], + "minIndex": 507, + "navigationTitle": "Send a message without OSS" + } + ], + "minIndex": 506 + }, + { + "id": "message/receiving-messages/receive-messages", + "segment": "receive-messages", + "title": "Receive messages", + "href": "/sdk/uniapp/message/receiving-messages/receive-messages", + "type": "page", + "children": [], + "minIndex": 508 + }, + { + "id": "message/receiving-messages/receive-custom-business-messages", + "segment": "receive-custom-business-messages", + "title": "Receive custom business messages", + "href": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "type": "page", + "children": [], + "minIndex": 509, + "navigationTitle": "Receive custom business messages" + }, + { + "id": "message/retrieving-messages", + "segment": "retrieving-messages", + "title": "Retrieving messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/retrieving-messages/load-older-messages", + "segment": "load-older-messages", + "title": "Load message history", + "href": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "type": "page", + "children": [], + "minIndex": 510, + "navigationTitle": "Load older messages" + }, + { + "id": "message/retrieving-messages/find-messages-by-id", + "segment": "find-messages-by-id", + "title": "Find messages by ID", + "href": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "type": "page", + "children": [], + "minIndex": 511, + "navigationTitle": "Find messages by ID" + }, + { + "id": "message/retrieving-messages/load-message-context", + "segment": "load-message-context", + "title": "Load message context", + "href": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "type": "page", + "children": [], + "minIndex": 512, + "navigationTitle": "Load message context" + }, + { + "id": "message/searching-messages/search-messages", + "segment": "search-messages", + "title": "Search messages", + "href": "/sdk/uniapp/message/searching-messages/search-messages", + "type": "page", + "children": [], + "minIndex": 513 + } + ], + "minIndex": 510 + }, + { + "id": "message/composing-messages", + "segment": "composing-messages", + "title": "Composing messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/composing-messages/update-typing-status", + "segment": "update-typing-status", + "title": "Report typing status", + "href": "/sdk/uniapp/message/composing-messages/update-typing-status", + "type": "page", + "children": [], + "minIndex": 514, + "navigationTitle": "Update typing status" + }, + { + "id": "message/composing-messages/get-typing-status", + "segment": "get-typing-status", + "title": "Get typing status", + "href": "/sdk/uniapp/message/composing-messages/get-typing-status", + "type": "page", + "children": [], + "minIndex": 515, + "navigationTitle": "Get typing status" + }, + { + "id": "message/composing-messages/check-speech-to-text", + "segment": "check-speech-to-text", + "title": "Check audio transcription availability", + "href": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "type": "page", + "children": [], + "minIndex": 516, + "navigationTitle": "Check speech recognition support" + }, + { + "id": "message/composing-messages/transcribe-audio", + "segment": "transcribe-audio", + "title": "Transcribe audio", + "href": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "type": "page", + "children": [], + "minIndex": 517, + "navigationTitle": "Transcribe an audio file" + }, + { + "id": "message/composing-messages/save-local-transcript", + "segment": "save-local-transcript", + "title": "Save a local transcript", + "href": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "type": "page", + "children": [], + "minIndex": 518, + "navigationTitle": "Save a local transcript" + }, + { + "id": "message/composing-messages/translate-text-and-messages", + "segment": "translate-text-and-messages", + "title": "Translate text and messages", + "href": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "type": "page", + "children": [], + "minIndex": 519, + "navigationTitle": "Translate text and messages" + } + ], + "minIndex": 514 + }, + { + "id": "message/managing-messages", + "segment": "managing-messages", + "title": "Managing messages", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/managing-messages/delete-local-message", + "segment": "delete-local-message", + "title": "Delete a local message", + "href": "/sdk/uniapp/message/managing-messages/delete-local-message", + "type": "page", + "children": [], + "minIndex": 520, + "navigationTitle": "Delete a local message" + }, + { + "id": "message/managing-messages/delete-saved-messages", + "segment": "delete-saved-messages", + "title": "Delete messages in a batch", + "href": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "type": "page", + "children": [], + "minIndex": 521, + "navigationTitle": "Delete saved messages" + }, + { + "id": "message/managing-messages/delete-user-messages", + "segment": "delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "href": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "type": "page", + "children": [], + "minIndex": 522, + "navigationTitle": "Delete messages from a user" + }, + { + "id": "message/managing-messages/revoke-a-message", + "segment": "revoke-a-message", + "title": "Revoke a message", + "href": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "type": "page", + "children": [], + "minIndex": 523 + }, + { + "id": "message/managing-messages/modify-a-message", + "segment": "modify-a-message", + "title": "Modify a message", + "href": "/sdk/uniapp/message/managing-messages/modify-a-message", + "type": "page", + "children": [], + "minIndex": 524 + }, + { + "id": "message/managing-messages/get-pinned-messages", + "segment": "get-pinned-messages", + "title": "Get pinned messages in a conversation", + "href": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "type": "page", + "children": [], + "minIndex": 525, + "navigationTitle": "View pinned messages" + }, + { + "id": "message/managing-messages/set-message-pinned", + "segment": "set-message-pinned", + "title": "Pin or unpin a message", + "href": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "type": "page", + "children": [], + "minIndex": 526, + "navigationTitle": "Pin or unpin a message" + }, + { + "id": "message/managing-messages/insert-local-single-message", + "segment": "insert-local-single-message", + "title": "Insert a local one-to-one message", + "href": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "type": "page", + "children": [], + "minIndex": 527, + "navigationTitle": "Insert a local direct message" + }, + { + "id": "message/managing-messages/insert-local-group-message", + "segment": "insert-local-group-message", + "title": "Insert a local group message", + "href": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "type": "page", + "children": [], + "minIndex": 528, + "navigationTitle": "Insert a local group message" + }, + { + "id": "message/managing-messages/clear-all-local-messages", + "segment": "clear-all-local-messages", + "title": "Clear all local messages", + "href": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "type": "page", + "children": [], + "minIndex": 529, + "navigationTitle": "Clear all local messages" + }, + { + "id": "message/managing-messages/clear-all-messages", + "segment": "clear-all-messages", + "title": "Clear local and server messages", + "href": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "type": "page", + "children": [], + "minIndex": 530, + "navigationTitle": "Clear all saved messages" + }, + { + "id": "message/managing-messages/set-message-local-ex", + "segment": "set-message-local-ex", + "title": "Set a local message extension", + "href": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "type": "page", + "children": [], + "minIndex": 531, + "navigationTitle": "Set local message extensions" + } + ], + "minIndex": 520 + }, + { + "id": "message/group-message-read-status", + "segment": "group-message-read-status", + "title": "Group message read status", + "href": null, + "type": "folder", + "children": [ + { + "id": "message/managing-read-status/send-group-read-receipts", + "segment": "send-group-read-receipts", + "title": "Report group messages as read", + "href": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "type": "page", + "children": [], + "minIndex": 532, + "navigationTitle": "Send group read receipts" + }, + { + "id": "message/managing-read-status/get-group-message-readers", + "segment": "get-group-message-readers", + "title": "Get members who read a group message", + "href": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "type": "page", + "children": [], + "minIndex": 533, + "navigationTitle": "View group message readers" + } + ], + "minIndex": 532 + } + ], + "minIndex": 487 + }, + { + "id": "file-uploads/upload-file", + "segment": "upload-file", + "title": "Upload a file", + "href": "/sdk/uniapp/file-uploads/upload-file", + "type": "page", + "children": [], + "minIndex": 534, + "navigationTitle": "Upload a file" + }, + { + "id": "calling", + "segment": "calling", + "title": "Calling", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/overview-calling", + "segment": "overview-calling", + "title": "Audio and video calling overview", + "href": "/sdk/uniapp/calling/overview-calling", + "type": "page", + "children": [], + "minIndex": 535 + }, + { + "id": "calling/managing-calls", + "segment": "managing-calls", + "title": "Managing calls", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/managing-calls/start-single-call", + "segment": "start-single-call", + "title": "Start a one-to-one call", + "href": "/sdk/uniapp/calling/managing-calls/start-single-call", + "type": "page", + "children": [], + "minIndex": 536, + "navigationTitle": "Start a one-to-one call" + }, + { + "id": "calling/managing-calls/start-group-call", + "segment": "start-group-call", + "title": "Start a group call", + "href": "/sdk/uniapp/calling/managing-calls/start-group-call", + "type": "page", + "children": [], + "minIndex": 537, + "navigationTitle": "Start a group call" + }, + { + "id": "calling/managing-calls/accept-call", + "segment": "accept-call", + "title": "Accept a call", + "href": "/sdk/uniapp/calling/managing-calls/accept-call", + "type": "page", + "children": [], + "minIndex": 538, + "navigationTitle": "Accept a call" + }, + { + "id": "calling/managing-calls/reject-call", + "segment": "reject-call", + "title": "Reject a call", + "href": "/sdk/uniapp/calling/managing-calls/reject-call", + "type": "page", + "children": [], + "minIndex": 539, + "navigationTitle": "Reject a call" + }, + { + "id": "calling/managing-calls/cancel-call", + "segment": "cancel-call", + "title": "Cancel a call invitation", + "href": "/sdk/uniapp/calling/managing-calls/cancel-call", + "type": "page", + "children": [], + "minIndex": 540, + "navigationTitle": "Cancel a call invitation" + }, + { + "id": "calling/managing-calls/hang-up-call", + "segment": "hang-up-call", + "title": "End a call", + "href": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "type": "page", + "children": [], + "minIndex": 541, + "navigationTitle": "Hang up a call" + }, + { + "id": "calling/managing-calls/handle-call-events", + "segment": "handle-call-events", + "title": "Handle call events", + "href": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "type": "page", + "children": [], + "minIndex": 542, + "navigationTitle": "Handle call events" + } + ], + "minIndex": 536 + }, + { + "id": "calling/retrieving-call-information", + "segment": "retrieving-call-information", + "title": "Retrieving call information", + "href": null, + "type": "folder", + "children": [ + { + "id": "calling/retrieving-call-information/restore-pending-invitation", + "segment": "restore-pending-invitation", + "title": "Restore a pending call invitation", + "href": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "type": "page", + "children": [], + "minIndex": 543, + "navigationTitle": "Restore a pending invitation" + }, + { + "id": "calling/retrieving-call-information/get-room-by-group-id", + "segment": "get-room-by-group-id", + "title": "Get a group call room", + "href": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "type": "page", + "children": [], + "minIndex": 544, + "navigationTitle": "Get a group call room" + }, + { + "id": "calling/retrieving-call-information/get-token-by-room-id", + "segment": "get-token-by-room-id", + "title": "Get a call room token", + "href": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "type": "page", + "children": [], + "minIndex": 545, + "navigationTitle": "Get room credentials" + } + ], + "minIndex": 543 + }, + { + "id": "calling/sending-custom-signals/send-a-custom-signal", + "segment": "send-a-custom-signal", + "title": "Send a custom signal", + "href": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "type": "page", + "children": [], + "minIndex": 546 + } + ], + "minIndex": 535 + }, + { + "id": "events", + "segment": "events", + "title": "Events", + "href": null, + "type": "folder", + "children": [ + { + "id": "events/overview-events", + "segment": "overview-events", + "title": "Events overview", + "href": "/sdk/uniapp/events/overview-events", + "type": "page", + "children": [], + "minIndex": 547, + "navigationTitle": "Event overview" + }, + { + "id": "events/handle-data-migration-events", + "segment": "handle-data-migration-events", + "title": "Handle data migration events", + "href": "/sdk/uniapp/events/handle-data-migration-events", + "type": "page", + "children": [], + "minIndex": 548, + "navigationTitle": "Handle data migration events" + } + ], + "minIndex": 547 + }, + { + "id": "logger", + "segment": "logger", + "title": "Logging", + "href": "/sdk/uniapp/logger", + "type": "page", + "children": [], + "minIndex": 549 } ], - "pageCount": 1 + "pageCount": 167, + "sidebarExpansion": "active-path" }, { "key": "chat/sdk/wasm", diff --git a/src/generated/routes.json b/src/generated/routes.json index fd73fe60f8..b9eaaeb0b1 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -9414,23 +9414,3011 @@ "navOrder": 417 }, { - "id": 323, + "id": 1356, "path": "/sdk/uniapp/overview", "relativePath": "sdk/uniapp/overview", "sourcePath": "/sdk/uniapp/overview", - "title": "OpenIM SDK for uni-app", - "description": "OpenIM uni-app SDK entry point for App, H5, and supported mini-app targets.", + "title": "OpenIM SDK for uni-app / uni-app x", + "description": "OpenIM uni-app / uni-app x SDK guide for OpenIM SDK for uni-app / uni-app x.", "product": "sdk", "version": "v4", "platform": "uniapp", "contextKey": "chat/sdk/uniapp", - "contextTitle": "SDKs · uni-app · v4", + "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "overview", - "status": "draft", - "sourceIndex": 383, + "status": "published", + "sourceIndex": 2726, "contentFile": "content/docs/chat/sdk/uniapp/overview.mdx", "navOrder": 383 }, + { + "id": 1357, + "path": "/sdk/uniapp/getting-started/before-you-start", + "relativePath": "sdk/uniapp/getting-started/before-you-start", + "sourcePath": "/sdk/uniapp/getting-started/before-you-start", + "title": "Before you start", + "description": "OpenIM uni-app / uni-app x SDK guide for Before you start.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2727, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx", + "navOrder": 384 + }, + { + "id": 1358, + "path": "/sdk/uniapp/getting-started/environment-specific-implementation", + "relativePath": "sdk/uniapp/getting-started/environment-specific-implementation", + "sourcePath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "title": "Environment-specific implementation", + "description": "OpenIM uni-app / uni-app x SDK guide for Environment-specific implementation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2728, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx", + "navOrder": 385 + }, + { + "id": 1359, + "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "relativePath": "sdk/uniapp/getting-started/authenticate-and-manage-session", + "sourcePath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "description": "OpenIM uni-app / uni-app x SDK guide for Authenticate and manage a session.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2729, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx", + "navOrder": 386 + }, + { + "id": 1360, + "path": "/sdk/uniapp/getting-started/send-first-message", + "relativePath": "sdk/uniapp/getting-started/send-first-message", + "sourcePath": "/sdk/uniapp/getting-started/send-first-message", + "title": "Send your first message", + "description": "OpenIM uni-app / uni-app x SDK guide for Send your first message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2730, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx", + "navOrder": 387 + }, + { + "id": 1361, + "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "relativePath": "sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "sourcePath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "title": "Install, initialize, and inspect the SDK", + "description": "OpenIM uni-app / uni-app x SDK guide for Install, initialize, and inspect the SDK.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2731, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx", + "navOrder": 388 + }, + { + "id": 1362, + "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "relativePath": "sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "sourcePath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "title": "Handle App lifecycle and device state", + "description": "OpenIM uni-app / uni-app x SDK guide for Handle App lifecycle and device state.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2732, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx", + "navOrder": 389 + }, + { + "id": 1363, + "path": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "relativePath": "sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "sourcePath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "title": "Update tokens and observe SDK sessions", + "description": "OpenIM uni-app / uni-app x SDK guide for Update tokens and observe SDK sessions.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2733, + "contentFile": "content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx", + "navOrder": 390 + }, + { + "id": 1364, + "path": "/sdk/uniapp/user/overview-user", + "relativePath": "sdk/uniapp/user/overview-user", + "sourcePath": "/sdk/uniapp/user/overview-user", + "title": "User overview", + "description": "OpenIM uni-app / uni-app x SDK guide for User overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2734, + "contentFile": "content/docs/chat/sdk/uniapp/user/overview-user.mdx", + "navOrder": 391 + }, + { + "id": 1365, + "path": "/sdk/uniapp/user/profile/get-users-info", + "relativePath": "sdk/uniapp/user/profile/get-users-info", + "sourcePath": "/sdk/uniapp/user/profile/get-users-info", + "title": "Get user profiles", + "description": "OpenIM uni-app / uni-app x SDK guide for Get user profiles.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2735, + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx", + "navOrder": 392 + }, + { + "id": 1366, + "path": "/sdk/uniapp/user/profile/get-self-user-info", + "relativePath": "sdk/uniapp/user/profile/get-self-user-info", + "sourcePath": "/sdk/uniapp/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "OpenIM uni-app / uni-app x SDK guide for Get your profile.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2736, + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx", + "navOrder": 393 + }, + { + "id": 1367, + "path": "/sdk/uniapp/user/profile/set-self-info", + "relativePath": "sdk/uniapp/user/profile/set-self-info", + "sourcePath": "/sdk/uniapp/user/profile/set-self-info", + "title": "Update your profile", + "description": "OpenIM uni-app / uni-app x SDK guide for Update your profile.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2737, + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx", + "navOrder": 394 + }, + { + "id": 1368, + "path": "/sdk/uniapp/user/profile/set-global-message-reception", + "relativePath": "sdk/uniapp/user/profile/set-global-message-reception", + "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "OpenIM uni-app / uni-app x SDK guide for Set global message reception.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2738, + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx", + "navOrder": 395 + }, + { + "id": 1369, + "path": "/sdk/uniapp/user/profile/set-friend-add-permission", + "relativePath": "sdk/uniapp/user/profile/set-friend-add-permission", + "sourcePath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "title": "Set friend request permissions", + "description": "OpenIM uni-app / uni-app x SDK guide for Set friend request permissions.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2739, + "contentFile": "content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx", + "navOrder": 396 + }, + { + "id": 1370, + "path": "/sdk/uniapp/user/online-status/subscribe-users-status", + "relativePath": "sdk/uniapp/user/online-status/subscribe-users-status", + "sourcePath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "title": "Subscribe to online status", + "description": "OpenIM uni-app / uni-app x SDK guide for Subscribe to online status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2740, + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx", + "navOrder": 397 + }, + { + "id": 1371, + "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "relativePath": "sdk/uniapp/user/online-status/get-subscribe-users-status", + "sourcePath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user status", + "description": "OpenIM uni-app / uni-app x SDK guide for Get subscribed user status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2741, + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx", + "navOrder": 398 + }, + { + "id": 1372, + "path": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "relativePath": "sdk/uniapp/user/online-status/unsubscribe-users-status", + "sourcePath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from online status", + "description": "OpenIM uni-app / uni-app x SDK guide for Unsubscribe from online status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2742, + "contentFile": "content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx", + "navOrder": 399 + }, + { + "id": 1373, + "path": "/sdk/uniapp/user/friends/get-friend-list-page", + "relativePath": "sdk/uniapp/user/friends/get-friend-list-page", + "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", + "title": "Get the friend list", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the friend list.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2743, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx", + "navOrder": 400 + }, + { + "id": 1374, + "path": "/sdk/uniapp/user/friends/search-friends", + "relativePath": "sdk/uniapp/user/friends/search-friends", + "sourcePath": "/sdk/uniapp/user/friends/search-friends", + "title": "Search friends", + "description": "OpenIM uni-app / uni-app x SDK guide for Search friends.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2744, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx", + "navOrder": 401 + }, + { + "id": 1375, + "path": "/sdk/uniapp/user/friends/get-specified-friends-info", + "relativePath": "sdk/uniapp/user/friends/get-specified-friends-info", + "sourcePath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "title": "Get friend profiles", + "description": "OpenIM uni-app / uni-app x SDK guide for Get friend profiles.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2745, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx", + "navOrder": 402 + }, + { + "id": 1376, + "path": "/sdk/uniapp/user/friends/check-friend", + "relativePath": "sdk/uniapp/user/friends/check-friend", + "sourcePath": "/sdk/uniapp/user/friends/check-friend", + "title": "Check friendship status", + "description": "OpenIM uni-app / uni-app x SDK guide for Check friendship status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2746, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx", + "navOrder": 403 + }, + { + "id": 1377, + "path": "/sdk/uniapp/user/friends/update-friends", + "relativePath": "sdk/uniapp/user/friends/update-friends", + "sourcePath": "/sdk/uniapp/user/friends/update-friends", + "title": "Update friend information", + "description": "OpenIM uni-app / uni-app x SDK guide for Update friend information.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2747, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx", + "navOrder": 404 + }, + { + "id": 1378, + "path": "/sdk/uniapp/user/friends/delete-friend", + "relativePath": "sdk/uniapp/user/friends/delete-friend", + "sourcePath": "/sdk/uniapp/user/friends/delete-friend", + "title": "Delete a friend", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a friend.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2748, + "contentFile": "content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx", + "navOrder": 405 + }, + { + "id": 1379, + "path": "/sdk/uniapp/user/friend-applications/add-friend", + "relativePath": "sdk/uniapp/user/friend-applications/add-friend", + "sourcePath": "/sdk/uniapp/user/friend-applications/add-friend", + "title": "Send a friend application", + "description": "OpenIM uni-app / uni-app x SDK guide for Send a friend application.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2749, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx", + "navOrder": 406 + }, + { + "id": 1380, + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "title": "Get received friend applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get received friend applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2750, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx", + "navOrder": 407 + }, + { + "id": 1381, + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "title": "Get sent friend applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get sent friend applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2751, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx", + "navOrder": 408 + }, + { + "id": 1382, + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get pending application count", + "description": "OpenIM uni-app / uni-app x SDK guide for Get pending application count.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2752, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx", + "navOrder": 409 + }, + { + "id": 1383, + "path": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "relativePath": "sdk/uniapp/user/friend-applications/accept-friend-application", + "sourcePath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "title": "Accept a friend application", + "description": "OpenIM uni-app / uni-app x SDK guide for Accept a friend application.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2753, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx", + "navOrder": 410 + }, + { + "id": 1384, + "path": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "relativePath": "sdk/uniapp/user/friend-applications/refuse-friend-application", + "sourcePath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "title": "Reject a friend application", + "description": "OpenIM uni-app / uni-app x SDK guide for Reject a friend application.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2754, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx", + "navOrder": 411 + }, + { + "id": 1385, + "path": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "relativePath": "sdk/uniapp/user/friend-applications/delete-friend-requests", + "sourcePath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "title": "Delete friend applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete friend applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2755, + "contentFile": "content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx", + "navOrder": 412 + }, + { + "id": 1386, + "path": "/sdk/uniapp/user/blacklist/get-black-list", + "relativePath": "sdk/uniapp/user/blacklist/get-black-list", + "sourcePath": "/sdk/uniapp/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the blacklist.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2756, + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx", + "navOrder": 413 + }, + { + "id": 1387, + "path": "/sdk/uniapp/user/blacklist/add-black", + "relativePath": "sdk/uniapp/user/blacklist/add-black", + "sourcePath": "/sdk/uniapp/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "OpenIM uni-app / uni-app x SDK guide for Add a user to the blacklist.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2757, + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx", + "navOrder": 414 + }, + { + "id": 1388, + "path": "/sdk/uniapp/user/blacklist/remove-black", + "relativePath": "sdk/uniapp/user/blacklist/remove-black", + "sourcePath": "/sdk/uniapp/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "OpenIM uni-app / uni-app x SDK guide for Remove a user from the blacklist.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2758, + "contentFile": "content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx", + "navOrder": 415 + }, + { + "id": 1389, + "path": "/sdk/uniapp/conversation/overview-conversation", + "relativePath": "sdk/uniapp/conversation/overview-conversation", + "sourcePath": "/sdk/uniapp/conversation/overview-conversation", + "title": "Conversation overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Conversation overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2759, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx", + "navOrder": 416 + }, + { + "id": 1390, + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "relativePath": "sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Open a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2760, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx", + "navOrder": 417 + }, + { + "id": 1391, + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "relativePath": "sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Resolve a conversation ID.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2761, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx", + "navOrder": 418 + }, + { + "id": 1392, + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "relativePath": "sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations by ID.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2762, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx", + "navOrder": 419 + }, + { + "id": 1393, + "path": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "relativePath": "sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Get the conversation list", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the conversation list.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2763, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx", + "navOrder": 420 + }, + { + "id": 1394, + "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "relativePath": "sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "title": "Search conversations", + "description": "OpenIM uni-app / uni-app x SDK guide for Search conversations.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2764, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx", + "navOrder": 421 + }, + { + "id": 1395, + "path": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "relativePath": "sdk/uniapp/conversation/managing-conversations/pin-conversation", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2765, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx", + "navOrder": 422 + }, + { + "id": 1396, + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "relativePath": "sdk/uniapp/conversation/managing-conversations/mark-conversation", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark or unmark a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2766, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx", + "navOrder": 423 + }, + { + "id": 1397, + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation remark.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2767, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx", + "navOrder": 424 + }, + { + "id": 1398, + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation extra data.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2768, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx", + "navOrder": 425 + }, + { + "id": 1399, + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation draft.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2769, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx", + "navOrder": 426 + }, + { + "id": 1400, + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation message reception.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2770, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx", + "navOrder": 427 + }, + { + "id": 1401, + "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "relativePath": "sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "OpenIM uni-app / uni-app x SDK guide for Reset group mention status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2771, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx", + "navOrder": 428 + }, + { + "id": 1402, + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "relativePath": "sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark a conversation as read.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2772, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx", + "navOrder": 429 + }, + { + "id": 1403, + "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "relativePath": "sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "title": "Mark all conversations as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark all conversations as read.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2773, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx", + "navOrder": 430 + }, + { + "id": 1404, + "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "relativePath": "sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "OpenIM uni-app / uni-app x SDK guide for Track the total unread count.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2774, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx", + "navOrder": 431 + }, + { + "id": 1405, + "path": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-private-chat", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "OpenIM uni-app / uni-app x SDK guide for Enable or disable burn after reading.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2775, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx", + "navOrder": 432 + }, + { + "id": 1406, + "path": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "OpenIM uni-app / uni-app x SDK guide for Set the burn duration.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2776, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx", + "navOrder": 433 + }, + { + "id": 1407, + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "relativePath": "sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "OpenIM uni-app / uni-app x SDK guide for Schedule server message deletion.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2777, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx", + "navOrder": 434 + }, + { + "id": 1408, + "path": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "relativePath": "sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Hide a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2778, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx", + "navOrder": 435 + }, + { + "id": 1409, + "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "relativePath": "sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "OpenIM uni-app / uni-app x SDK guide for Hide all conversations.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2779, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx", + "navOrder": 436 + }, + { + "id": 1410, + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "relativePath": "sdk/uniapp/conversation/managing-conversations/delete-conversation", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "title": "Delete a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2780, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx", + "navOrder": 437 + }, + { + "id": 1411, + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "relativePath": "sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation and its messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2781, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx", + "navOrder": 438 + }, + { + "id": 1412, + "path": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "relativePath": "sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear messages in a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2782, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx", + "navOrder": 439 + }, + { + "id": 1413, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Conversation group overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2783, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx", + "navOrder": 440 + }, + { + "id": 1414, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a conversation group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2784, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx", + "navOrder": 441 + }, + { + "id": 1415, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2785, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx", + "navOrder": 442 + }, + { + "id": 1416, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2786, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx", + "navOrder": 443 + }, + { + "id": 1417, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "title": "getConversationGroupByConversationID", + "description": "OpenIM uni-app / uni-app x SDK guide for getConversationGroupByConversationID.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2787, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx", + "navOrder": 444 + }, + { + "id": 1418, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a conversation group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2788, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx", + "navOrder": 445 + }, + { + "id": 1419, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Reorder conversation groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2789, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx", + "navOrder": 446 + }, + { + "id": 1420, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Add conversations to groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2790, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx", + "navOrder": 447 + }, + { + "id": 1421, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Remove conversations from groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2791, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx", + "navOrder": 448 + }, + { + "id": 1422, + "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "relativePath": "sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2792, + "contentFile": "content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx", + "navOrder": 449 + }, + { + "id": 1423, + "path": "/sdk/uniapp/group/overview-group", + "relativePath": "sdk/uniapp/group/overview-group", + "sourcePath": "/sdk/uniapp/group/overview-group", + "title": "Group overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Group overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2793, + "contentFile": "content/docs/chat/sdk/uniapp/group/overview-group.mdx", + "navOrder": 450 + }, + { + "id": 1424, + "path": "/sdk/uniapp/group/create-group", + "relativePath": "sdk/uniapp/group/create-group", + "sourcePath": "/sdk/uniapp/group/create-group", + "title": "Create a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2794, + "contentFile": "content/docs/chat/sdk/uniapp/group/create-group.mdx", + "navOrder": 451 + }, + { + "id": 1425, + "path": "/sdk/uniapp/group/update-group-profile", + "relativePath": "sdk/uniapp/group/update-group-profile", + "sourcePath": "/sdk/uniapp/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM uni-app / uni-app x SDK guide for Update group profile.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2795, + "contentFile": "content/docs/chat/sdk/uniapp/group/update-group-profile.mdx", + "navOrder": 452 + }, + { + "id": 1426, + "path": "/sdk/uniapp/group/set-group-announcement", + "relativePath": "sdk/uniapp/group/set-group-announcement", + "sourcePath": "/sdk/uniapp/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM uni-app / uni-app x SDK guide for Publish a group announcement.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2796, + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx", + "navOrder": 453 + }, + { + "id": 1427, + "path": "/sdk/uniapp/group/set-group-extension", + "relativePath": "sdk/uniapp/group/set-group-extension", + "sourcePath": "/sdk/uniapp/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM uni-app / uni-app x SDK guide for Set group extra data.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2797, + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-extension.mdx", + "navOrder": 454 + }, + { + "id": 1428, + "path": "/sdk/uniapp/group/set-group-join-verification", + "relativePath": "sdk/uniapp/group/set-group-join-verification", + "sourcePath": "/sdk/uniapp/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM uni-app / uni-app x SDK guide for Set group join verification.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2798, + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx", + "navOrder": 455 + }, + { + "id": 1429, + "path": "/sdk/uniapp/group/set-group-member-profile-access", + "relativePath": "sdk/uniapp/group/set-group-member-profile-access", + "sourcePath": "/sdk/uniapp/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM uni-app / uni-app x SDK guide for Set member profile access.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2799, + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx", + "navOrder": 456 + }, + { + "id": 1430, + "path": "/sdk/uniapp/group/set-group-member-friend-permission", + "relativePath": "sdk/uniapp/group/set-group-member-friend-permission", + "sourcePath": "/sdk/uniapp/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM uni-app / uni-app x SDK guide for Set member friend request permission.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2800, + "contentFile": "content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx", + "navOrder": 457 + }, + { + "id": 1431, + "path": "/sdk/uniapp/group/change-group-mute", + "relativePath": "sdk/uniapp/group/change-group-mute", + "sourcePath": "/sdk/uniapp/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM uni-app / uni-app x SDK guide for Change group mute status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2801, + "contentFile": "content/docs/chat/sdk/uniapp/group/change-group-mute.mdx", + "navOrder": 458 + }, + { + "id": 1432, + "path": "/sdk/uniapp/group/join-group", + "relativePath": "sdk/uniapp/group/join-group", + "sourcePath": "/sdk/uniapp/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Apply to join a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2802, + "contentFile": "content/docs/chat/sdk/uniapp/group/join-group.mdx", + "navOrder": 459 + }, + { + "id": 1433, + "path": "/sdk/uniapp/group/quit-group", + "relativePath": "sdk/uniapp/group/quit-group", + "sourcePath": "/sdk/uniapp/group/quit-group", + "title": "Leave a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Leave a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2803, + "contentFile": "content/docs/chat/sdk/uniapp/group/quit-group.mdx", + "navOrder": 460 + }, + { + "id": 1434, + "path": "/sdk/uniapp/group/dismiss-group", + "relativePath": "sdk/uniapp/group/dismiss-group", + "sourcePath": "/sdk/uniapp/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Dismiss a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2804, + "contentFile": "content/docs/chat/sdk/uniapp/group/dismiss-group.mdx", + "navOrder": 461 + }, + { + "id": 1435, + "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "relativePath": "sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM uni-app / uni-app x SDK guide for Get group information.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2805, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx", + "navOrder": 462 + }, + { + "id": 1436, + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "relativePath": "sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2806, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx", + "navOrder": 463 + }, + { + "id": 1437, + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "relativePath": "sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2807, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx", + "navOrder": 464 + }, + { + "id": 1438, + "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "relativePath": "sdk/uniapp/group/retrieving-groups/is-join-group", + "sourcePath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2808, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx", + "navOrder": 465 + }, + { + "id": 1439, + "path": "/sdk/uniapp/group/retrieving-groups/search-groups", + "relativePath": "sdk/uniapp/group/retrieving-groups/search-groups", + "sourcePath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Search groups.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2809, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx", + "navOrder": 466 + }, + { + "id": 1440, + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "relativePath": "sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get received group applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2810, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx", + "navOrder": 467 + }, + { + "id": 1441, + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "relativePath": "sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get sent group applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2811, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx", + "navOrder": 468 + }, + { + "id": 1442, + "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "relativePath": "sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "title": "Get the pending group application count", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the pending group application count.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2812, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx", + "navOrder": 469 + }, + { + "id": 1443, + "path": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "relativePath": "sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "sourcePath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "title": "Get the group application badge count", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the group application badge count.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2813, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx", + "navOrder": 470 + }, + { + "id": 1444, + "path": "/sdk/uniapp/group/group-applications/accept-group-application", + "relativePath": "sdk/uniapp/group/group-applications/accept-group-application", + "sourcePath": "/sdk/uniapp/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM uni-app / uni-app x SDK guide for Accept a group application.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2814, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx", + "navOrder": 471 + }, + { + "id": 1445, + "path": "/sdk/uniapp/group/group-applications/refuse-group-application", + "relativePath": "sdk/uniapp/group/group-applications/refuse-group-application", + "sourcePath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM uni-app / uni-app x SDK guide for Reject a group application.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2815, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx", + "navOrder": 472 + }, + { + "id": 1446, + "path": "/sdk/uniapp/group/group-applications/delete-group-requests", + "relativePath": "sdk/uniapp/group/group-applications/delete-group-requests", + "sourcePath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete group applications.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2816, + "contentFile": "content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx", + "navOrder": 473 + }, + { + "id": 1447, + "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "relativePath": "sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "title": "List group members", + "description": "OpenIM uni-app / uni-app x SDK guide for List group members.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2817, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx", + "navOrder": 474 + }, + { + "id": 1448, + "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "relativePath": "sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get specified group member profiles", + "description": "OpenIM uni-app / uni-app x SDK guide for Get specified group member profiles.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2818, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx", + "navOrder": 475 + }, + { + "id": 1449, + "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "relativePath": "sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "title": "Check group membership", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2819, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx", + "navOrder": 476 + }, + { + "id": 1450, + "path": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "relativePath": "sdk/uniapp/group/retrieving-group-members/search-group-members", + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM uni-app / uni-app x SDK guide for Search group members.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2820, + "contentFile": "content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx", + "navOrder": 477 + }, + { + "id": 1451, + "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "relativePath": "sdk/uniapp/group/managing-group-members/invite-user-to-group", + "sourcePath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Invite users to a group.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2821, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx", + "navOrder": 478 + }, + { + "id": 1452, + "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "relativePath": "sdk/uniapp/group/managing-group-members/kick-group-member", + "sourcePath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM uni-app / uni-app x SDK guide for Remove group members.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2822, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx", + "navOrder": 479 + }, + { + "id": 1453, + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "relativePath": "sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "title": "Update a member’s group nickname", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a member’s group nickname.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2823, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx", + "navOrder": 480 + }, + { + "id": 1454, + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "relativePath": "sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM uni-app / uni-app x SDK guide for Manage group administrators.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2824, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx", + "navOrder": 481 + }, + { + "id": 1455, + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "relativePath": "sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member’s avatar", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a group member’s avatar.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2825, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx", + "navOrder": 482 + }, + { + "id": 1456, + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "relativePath": "sdk/uniapp/group/managing-group-members/set-group-member-extension", + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "title": "Set a group member extension", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a group member extension.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2826, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx", + "navOrder": 483 + }, + { + "id": 1457, + "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "relativePath": "sdk/uniapp/group/managing-group-members/transfer-group-owner", + "sourcePath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM uni-app / uni-app x SDK guide for Transfer group ownership.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2827, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx", + "navOrder": 484 + }, + { + "id": 1458, + "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "relativePath": "sdk/uniapp/group/managing-group-members/change-group-member-mute", + "sourcePath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM uni-app / uni-app x SDK guide for Mute or unmute a group member.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2828, + "contentFile": "content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx", + "navOrder": 485 + }, + { + "id": 1459, + "path": "/sdk/uniapp/group/check-full-sync-state", + "relativePath": "sdk/uniapp/group/check-full-sync-state", + "sourcePath": "/sdk/uniapp/group/check-full-sync-state", + "title": "Check group full-sync state", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group full-sync state.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2829, + "contentFile": "content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx", + "navOrder": 486 + }, + { + "id": 1460, + "path": "/sdk/uniapp/message/overview-message", + "relativePath": "sdk/uniapp/message/overview-message", + "sourcePath": "/sdk/uniapp/message/overview-message", + "title": "Message overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Message overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2830, + "contentFile": "content/docs/chat/sdk/uniapp/message/overview-message.mdx", + "navOrder": 487 + }, + { + "id": 1461, + "path": "/sdk/uniapp/message/creating-messages/create-text-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-text-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a text message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2831, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx", + "navOrder": 488 + }, + { + "id": 1462, + "path": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-text-at-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an @ message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2832, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx", + "navOrder": 489 + }, + { + "id": 1463, + "path": "/sdk/uniapp/message/creating-messages/create-custom-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-custom-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a custom message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2833, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx", + "navOrder": 490 + }, + { + "id": 1464, + "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "relativePath": "sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "title": "Create an image message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an image message from a file.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2834, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx", + "navOrder": 491 + }, + { + "id": 1465, + "path": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "relativePath": "sdk/uniapp/message/creating-messages/create-image-message-by-url", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an image message from a URL.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2835, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx", + "navOrder": 492 + }, + { + "id": 1466, + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "relativePath": "sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "title": "Create an audio message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an audio message from a file.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2836, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx", + "navOrder": 493 + }, + { + "id": 1467, + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "relativePath": "sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an audio message from a URL.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2837, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx", + "navOrder": 494 + }, + { + "id": 1468, + "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "relativePath": "sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "title": "Create a video message from files", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a video message from files.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2838, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx", + "navOrder": 495 + }, + { + "id": 1469, + "path": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "relativePath": "sdk/uniapp/message/creating-messages/create-video-message-by-url", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a video message from URLs.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2839, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx", + "navOrder": 496 + }, + { + "id": 1470, + "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "relativePath": "sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "title": "Create a file message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a file message from a file.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2840, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx", + "navOrder": 497 + }, + { + "id": 1471, + "path": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "relativePath": "sdk/uniapp/message/creating-messages/create-file-message-by-url", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a file message from a URL.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2841, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx", + "navOrder": 498 + }, + { + "id": 1472, + "path": "/sdk/uniapp/message/creating-messages/create-card-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-card-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a contact card message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2842, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx", + "navOrder": 499 + }, + { + "id": 1473, + "path": "/sdk/uniapp/message/creating-messages/create-location-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-location-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a location message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2843, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx", + "navOrder": 500 + }, + { + "id": 1474, + "path": "/sdk/uniapp/message/creating-messages/create-face-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-face-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an emoji message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2844, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx", + "navOrder": 501 + }, + { + "id": 1475, + "path": "/sdk/uniapp/message/creating-messages/create-quote-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-quote-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a reply message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2845, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx", + "navOrder": 502 + }, + { + "id": 1476, + "path": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-markdown-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a Markdown message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2846, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx", + "navOrder": 503 + }, + { + "id": 1477, + "path": "/sdk/uniapp/message/creating-messages/create-forward-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-forward-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a forwarded message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2847, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx", + "navOrder": 504 + }, + { + "id": 1478, + "path": "/sdk/uniapp/message/creating-messages/create-merger-message", + "relativePath": "sdk/uniapp/message/creating-messages/create-merger-message", + "sourcePath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a merged forward message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2848, + "contentFile": "content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx", + "navOrder": 505 + }, + { + "id": 1479, + "path": "/sdk/uniapp/message/sending-messages/send-message", + "relativePath": "sdk/uniapp/message/sending-messages/send-message", + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Send a message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2849, + "contentFile": "content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx", + "navOrder": 506 + }, + { + "id": 1480, + "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "relativePath": "sdk/uniapp/message/sending-messages/send-message-not-oss", + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM uni-app / uni-app x SDK guide for Send an uploaded media message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2850, + "contentFile": "content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx", + "navOrder": 507 + }, + { + "id": 1481, + "path": "/sdk/uniapp/message/receiving-messages/receive-messages", + "relativePath": "sdk/uniapp/message/receiving-messages/receive-messages", + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Receive messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2851, + "contentFile": "content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx", + "navOrder": 508 + }, + { + "id": 1482, + "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "relativePath": "sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Receive custom business messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2852, + "contentFile": "content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx", + "navOrder": 509 + }, + { + "id": 1483, + "path": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "relativePath": "sdk/uniapp/message/retrieving-messages/load-older-messages", + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM uni-app / uni-app x SDK guide for Load message history.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2853, + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx", + "navOrder": 510 + }, + { + "id": 1484, + "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "relativePath": "sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "sourcePath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Find messages by ID.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2854, + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx", + "navOrder": 511 + }, + { + "id": 1485, + "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "relativePath": "sdk/uniapp/message/retrieving-messages/load-message-context", + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM uni-app / uni-app x SDK guide for Load message context.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2855, + "contentFile": "content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx", + "navOrder": 512 + }, + { + "id": 1486, + "path": "/sdk/uniapp/message/searching-messages/search-messages", + "relativePath": "sdk/uniapp/message/searching-messages/search-messages", + "sourcePath": "/sdk/uniapp/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Search messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2856, + "contentFile": "content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx", + "navOrder": 513 + }, + { + "id": 1487, + "path": "/sdk/uniapp/message/composing-messages/update-typing-status", + "relativePath": "sdk/uniapp/message/composing-messages/update-typing-status", + "sourcePath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM uni-app / uni-app x SDK guide for Report typing status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2857, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx", + "navOrder": 514 + }, + { + "id": 1488, + "path": "/sdk/uniapp/message/composing-messages/get-typing-status", + "relativePath": "sdk/uniapp/message/composing-messages/get-typing-status", + "sourcePath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM uni-app / uni-app x SDK guide for Get typing status.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2858, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx", + "navOrder": 515 + }, + { + "id": 1489, + "path": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "relativePath": "sdk/uniapp/message/composing-messages/check-speech-to-text", + "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM uni-app / uni-app x SDK guide for Check audio transcription availability.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2859, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx", + "navOrder": 516 + }, + { + "id": 1490, + "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "relativePath": "sdk/uniapp/message/composing-messages/transcribe-audio", + "sourcePath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM uni-app / uni-app x SDK guide for Transcribe audio.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2860, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx", + "navOrder": 517 + }, + { + "id": 1491, + "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "relativePath": "sdk/uniapp/message/composing-messages/save-local-transcript", + "sourcePath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM uni-app / uni-app x SDK guide for Save a local transcript.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2861, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx", + "navOrder": 518 + }, + { + "id": 1492, + "path": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "relativePath": "sdk/uniapp/message/composing-messages/translate-text-and-messages", + "sourcePath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "title": "Translate text and messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Translate text and messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2862, + "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx", + "navOrder": 519 + }, + { + "id": 1493, + "path": "/sdk/uniapp/message/managing-messages/delete-local-message", + "relativePath": "sdk/uniapp/message/managing-messages/delete-local-message", + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a local message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2863, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx", + "navOrder": 520 + }, + { + "id": 1494, + "path": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "relativePath": "sdk/uniapp/message/managing-messages/delete-saved-messages", + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete messages in a batch.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2864, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx", + "navOrder": 521 + }, + { + "id": 1495, + "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "relativePath": "sdk/uniapp/message/managing-messages/delete-user-messages", + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete all messages from a user in a group chat.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2865, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx", + "navOrder": 522 + }, + { + "id": 1496, + "path": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "relativePath": "sdk/uniapp/message/managing-messages/revoke-a-message", + "sourcePath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Revoke a message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2866, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx", + "navOrder": 523 + }, + { + "id": 1497, + "path": "/sdk/uniapp/message/managing-messages/modify-a-message", + "relativePath": "sdk/uniapp/message/managing-messages/modify-a-message", + "sourcePath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Modify a message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2867, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx", + "navOrder": 524 + }, + { + "id": 1498, + "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "relativePath": "sdk/uniapp/message/managing-messages/get-pinned-messages", + "sourcePath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "title": "Get pinned messages in a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Get pinned messages in a conversation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2868, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx", + "navOrder": 525 + }, + { + "id": 1499, + "path": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "relativePath": "sdk/uniapp/message/managing-messages/set-message-pinned", + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "title": "Pin or unpin a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2869, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx", + "navOrder": 526 + }, + { + "id": 1500, + "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "relativePath": "sdk/uniapp/message/managing-messages/insert-local-single-message", + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local one-to-one message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2870, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx", + "navOrder": 527 + }, + { + "id": 1501, + "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "relativePath": "sdk/uniapp/message/managing-messages/insert-local-group-message", + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local group message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2871, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx", + "navOrder": 528 + }, + { + "id": 1502, + "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "relativePath": "sdk/uniapp/message/managing-messages/clear-all-local-messages", + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear all local messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2872, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx", + "navOrder": 529 + }, + { + "id": 1503, + "path": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "relativePath": "sdk/uniapp/message/managing-messages/clear-all-messages", + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear local and server messages.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2873, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx", + "navOrder": 530 + }, + { + "id": 1504, + "path": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "relativePath": "sdk/uniapp/message/managing-messages/set-message-local-ex", + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a local message extension.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2874, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx", + "navOrder": 531 + }, + { + "id": 1505, + "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "relativePath": "sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "sourcePath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Report group messages as read.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2875, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx", + "navOrder": 532 + }, + { + "id": 1506, + "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "relativePath": "sdk/uniapp/message/managing-read-status/get-group-message-readers", + "sourcePath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM uni-app / uni-app x SDK guide for Get members who read a group message.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2876, + "contentFile": "content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx", + "navOrder": 533 + }, + { + "id": 1507, + "path": "/sdk/uniapp/file-uploads/upload-file", + "relativePath": "sdk/uniapp/file-uploads/upload-file", + "sourcePath": "/sdk/uniapp/file-uploads/upload-file", + "title": "Upload a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Upload a file.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2877, + "contentFile": "content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx", + "navOrder": 534 + }, + { + "id": 1508, + "path": "/sdk/uniapp/calling/overview-calling", + "relativePath": "sdk/uniapp/calling/overview-calling", + "sourcePath": "/sdk/uniapp/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Audio and video calling overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2878, + "contentFile": "content/docs/chat/sdk/uniapp/calling/overview-calling.mdx", + "navOrder": 535 + }, + { + "id": 1509, + "path": "/sdk/uniapp/calling/managing-calls/start-single-call", + "relativePath": "sdk/uniapp/calling/managing-calls/start-single-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "OpenIM uni-app / uni-app x SDK guide for Start a one-to-one call.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2879, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx", + "navOrder": 536 + }, + { + "id": 1510, + "path": "/sdk/uniapp/calling/managing-calls/start-group-call", + "relativePath": "sdk/uniapp/calling/managing-calls/start-group-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "OpenIM uni-app / uni-app x SDK guide for Start a group call.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2880, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx", + "navOrder": 537 + }, + { + "id": 1511, + "path": "/sdk/uniapp/calling/managing-calls/accept-call", + "relativePath": "sdk/uniapp/calling/managing-calls/accept-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "OpenIM uni-app / uni-app x SDK guide for Accept a call.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2881, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx", + "navOrder": 538 + }, + { + "id": 1512, + "path": "/sdk/uniapp/calling/managing-calls/reject-call", + "relativePath": "sdk/uniapp/calling/managing-calls/reject-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "OpenIM uni-app / uni-app x SDK guide for Reject a call.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2882, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx", + "navOrder": 539 + }, + { + "id": 1513, + "path": "/sdk/uniapp/calling/managing-calls/cancel-call", + "relativePath": "sdk/uniapp/calling/managing-calls/cancel-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "OpenIM uni-app / uni-app x SDK guide for Cancel a call invitation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2883, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx", + "navOrder": 540 + }, + { + "id": 1514, + "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "relativePath": "sdk/uniapp/calling/managing-calls/hang-up-call", + "sourcePath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "title": "End a call", + "description": "OpenIM uni-app / uni-app x SDK guide for End a call.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2884, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx", + "navOrder": 541 + }, + { + "id": 1515, + "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "relativePath": "sdk/uniapp/calling/managing-calls/handle-call-events", + "sourcePath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "OpenIM uni-app / uni-app x SDK guide for Handle call events.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2885, + "contentFile": "content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx", + "navOrder": 542 + }, + { + "id": 1516, + "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "relativePath": "sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending call invitation", + "description": "OpenIM uni-app / uni-app x SDK guide for Restore a pending call invitation.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2886, + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx", + "navOrder": 543 + }, + { + "id": 1517, + "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "relativePath": "sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "OpenIM uni-app / uni-app x SDK guide for Get a group call room.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2887, + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx", + "navOrder": 544 + }, + { + "id": 1518, + "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "relativePath": "sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get a call room token", + "description": "OpenIM uni-app / uni-app x SDK guide for Get a call room token.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2888, + "contentFile": "content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx", + "navOrder": 545 + }, + { + "id": 1519, + "path": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "relativePath": "sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "sourcePath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "OpenIM uni-app / uni-app x SDK guide for Send a custom signal.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2889, + "contentFile": "content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx", + "navOrder": 546 + }, + { + "id": 1520, + "path": "/sdk/uniapp/events/overview-events", + "relativePath": "sdk/uniapp/events/overview-events", + "sourcePath": "/sdk/uniapp/events/overview-events", + "title": "Events overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Events overview.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2890, + "contentFile": "content/docs/chat/sdk/uniapp/events/overview-events.mdx", + "navOrder": 547 + }, + { + "id": 1521, + "path": "/sdk/uniapp/events/handle-data-migration-events", + "relativePath": "sdk/uniapp/events/handle-data-migration-events", + "sourcePath": "/sdk/uniapp/events/handle-data-migration-events", + "title": "Handle data migration events", + "description": "OpenIM uni-app / uni-app x SDK guide for Handle data migration events.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "draft", + "sourceIndex": 2891, + "contentFile": "content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx", + "navOrder": 548 + }, + { + "id": 1522, + "path": "/sdk/uniapp/logger", + "relativePath": "sdk/uniapp/logger", + "sourcePath": "/sdk/uniapp/logger", + "title": "Logging", + "description": "OpenIM uni-app / uni-app x SDK guide for Logging.", + "product": "sdk", + "version": "v4", + "platform": "uniapp", + "contextKey": "chat/sdk/uniapp", + "contextTitle": "SDKs · uni-app / uni-app x · v4", + "template": "guide", + "status": "published", + "sourceIndex": 2892, + "contentFile": "content/docs/chat/sdk/uniapp/logger.mdx", + "navOrder": 549 + }, { "id": 333, "path": "/sdk/wasm/overview", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json new file mode 100644 index 0000000000..e4192c56ac --- /dev/null +++ b/src/generated/uniapp-sdk-zh-content.json @@ -0,0 +1,1927 @@ +{ + "sourceContext": "chat/sdk/uniapp", + "sourceRoot": "content/zh/docs/chat/sdk/uniapp", + "pageCount": 167, + "manualPageCount": 167, + "pendingPaths": [], + "reviewStates": { + "/sdk/uniapp/overview": "api-verified", + "/sdk/uniapp/getting-started/before-you-start": "api-verified", + "/sdk/uniapp/getting-started/environment-specific-implementation": "api-verified", + "/sdk/uniapp/getting-started/authenticate-and-manage-session": "api-verified", + "/sdk/uniapp/getting-started/send-first-message": "api-verified", + "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk": "api-verified", + "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state": "api-verified", + "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session": "api-verified", + "/sdk/uniapp/user/overview-user": "api-verified", + "/sdk/uniapp/user/profile/get-users-info": "api-verified", + "/sdk/uniapp/user/profile/get-self-user-info": "api-verified", + "/sdk/uniapp/user/profile/set-self-info": "api-verified", + "/sdk/uniapp/user/profile/set-global-message-reception": "api-verified", + "/sdk/uniapp/user/profile/set-friend-add-permission": "api-verified", + "/sdk/uniapp/user/online-status/subscribe-users-status": "api-verified", + "/sdk/uniapp/user/online-status/get-subscribe-users-status": "api-verified", + "/sdk/uniapp/user/online-status/unsubscribe-users-status": "api-verified", + "/sdk/uniapp/user/friends/get-friend-list-page": "api-verified", + "/sdk/uniapp/user/friends/search-friends": "api-verified", + "/sdk/uniapp/user/friends/get-specified-friends-info": "api-verified", + "/sdk/uniapp/user/friends/check-friend": "api-verified", + "/sdk/uniapp/user/friends/update-friends": "api-verified", + "/sdk/uniapp/user/friends/delete-friend": "api-verified", + "/sdk/uniapp/user/friend-applications/add-friend": "api-verified", + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": "api-verified", + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": "api-verified", + "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count": "api-verified", + "/sdk/uniapp/user/friend-applications/accept-friend-application": "api-verified", + "/sdk/uniapp/user/friend-applications/refuse-friend-application": "api-verified", + "/sdk/uniapp/user/friend-applications/delete-friend-requests": "api-verified", + "/sdk/uniapp/user/blacklist/get-black-list": "api-verified", + "/sdk/uniapp/user/blacklist/add-black": "api-verified", + "/sdk/uniapp/user/blacklist/remove-black": "api-verified", + "/sdk/uniapp/conversation/overview-conversation": "api-verified", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target": "api-verified", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id": "api-verified", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id": "api-verified", + "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list": "api-verified", + "/sdk/uniapp/conversation/retrieving-conversations/search-conversations": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/pin-conversation": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/mark-conversation": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-private-chat": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-burn-duration": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/set-message-destruct": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/delete-conversation": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages": "api-verified", + "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups": "api-verified", + "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group": "api-verified", + "/sdk/uniapp/group/overview-group": "api-verified", + "/sdk/uniapp/group/create-group": "api-verified", + "/sdk/uniapp/group/update-group-profile": "api-verified", + "/sdk/uniapp/group/set-group-announcement": "api-verified", + "/sdk/uniapp/group/set-group-extension": "api-verified", + "/sdk/uniapp/group/set-group-join-verification": "api-verified", + "/sdk/uniapp/group/set-group-member-profile-access": "api-verified", + "/sdk/uniapp/group/set-group-member-friend-permission": "api-verified", + "/sdk/uniapp/group/change-group-mute": "api-verified", + "/sdk/uniapp/group/join-group": "api-verified", + "/sdk/uniapp/group/quit-group": "api-verified", + "/sdk/uniapp/group/dismiss-group": "api-verified", + "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info": "api-verified", + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list": "api-verified", + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": "api-verified", + "/sdk/uniapp/group/retrieving-groups/is-join-group": "api-verified", + "/sdk/uniapp/group/retrieving-groups/search-groups": "api-verified", + "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient": "api-verified", + "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": "api-verified", + "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count": "api-verified", + "/sdk/uniapp/group/group-applications/observe-group-application-badge-count": "api-verified", + "/sdk/uniapp/group/group-applications/accept-group-application": "api-verified", + "/sdk/uniapp/group/group-applications/refuse-group-application": "api-verified", + "/sdk/uniapp/group/group-applications/delete-group-requests": "api-verified", + "/sdk/uniapp/group/retrieving-group-members/get-group-member-list": "api-verified", + "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info": "api-verified", + "/sdk/uniapp/group/retrieving-group-members/get-users-in-group": "api-verified", + "/sdk/uniapp/group/retrieving-group-members/search-group-members": "api-verified", + "/sdk/uniapp/group/managing-group-members/invite-user-to-group": "api-verified", + "/sdk/uniapp/group/managing-group-members/kick-group-member": "api-verified", + "/sdk/uniapp/group/managing-group-members/set-group-member-nickname": "api-verified", + "/sdk/uniapp/group/managing-group-members/set-group-member-role-level": "api-verified", + "/sdk/uniapp/group/managing-group-members/set-group-member-avatar": "api-verified", + "/sdk/uniapp/group/managing-group-members/set-group-member-extension": "api-verified", + "/sdk/uniapp/group/managing-group-members/transfer-group-owner": "api-verified", + "/sdk/uniapp/group/managing-group-members/change-group-member-mute": "api-verified", + "/sdk/uniapp/group/check-full-sync-state": "api-verified", + "/sdk/uniapp/message/overview-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-text-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-text-at-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-custom-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path": "api-verified", + "/sdk/uniapp/message/creating-messages/create-image-message-by-url": "api-verified", + "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path": "api-verified", + "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": "api-verified", + "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path": "api-verified", + "/sdk/uniapp/message/creating-messages/create-video-message-by-url": "api-verified", + "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path": "api-verified", + "/sdk/uniapp/message/creating-messages/create-file-message-by-url": "api-verified", + "/sdk/uniapp/message/creating-messages/create-card-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-location-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-face-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-quote-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-markdown-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-forward-message": "api-verified", + "/sdk/uniapp/message/creating-messages/create-merger-message": "api-verified", + "/sdk/uniapp/message/sending-messages/send-message": "api-verified", + "/sdk/uniapp/message/sending-messages/send-message-not-oss": "api-verified", + "/sdk/uniapp/message/receiving-messages/receive-messages": "api-verified", + "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages": "api-verified", + "/sdk/uniapp/message/retrieving-messages/load-older-messages": "api-verified", + "/sdk/uniapp/message/retrieving-messages/find-messages-by-id": "api-verified", + "/sdk/uniapp/message/retrieving-messages/load-message-context": "api-verified", + "/sdk/uniapp/message/searching-messages/search-messages": "api-verified", + "/sdk/uniapp/message/composing-messages/update-typing-status": "api-verified", + "/sdk/uniapp/message/composing-messages/get-typing-status": "api-verified", + "/sdk/uniapp/message/composing-messages/check-speech-to-text": "api-verified", + "/sdk/uniapp/message/composing-messages/transcribe-audio": "api-verified", + "/sdk/uniapp/message/composing-messages/save-local-transcript": "api-verified", + "/sdk/uniapp/message/composing-messages/translate-text-and-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/delete-local-message": "api-verified", + "/sdk/uniapp/message/managing-messages/delete-saved-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/delete-user-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/revoke-a-message": "api-verified", + "/sdk/uniapp/message/managing-messages/modify-a-message": "api-verified", + "/sdk/uniapp/message/managing-messages/get-pinned-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/set-message-pinned": "api-verified", + "/sdk/uniapp/message/managing-messages/insert-local-single-message": "api-verified", + "/sdk/uniapp/message/managing-messages/insert-local-group-message": "api-verified", + "/sdk/uniapp/message/managing-messages/clear-all-local-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/clear-all-messages": "api-verified", + "/sdk/uniapp/message/managing-messages/set-message-local-ex": "api-verified", + "/sdk/uniapp/message/managing-read-status/send-group-read-receipts": "api-verified", + "/sdk/uniapp/message/managing-read-status/get-group-message-readers": "api-verified", + "/sdk/uniapp/file-uploads/upload-file": "api-verified", + "/sdk/uniapp/calling/overview-calling": "api-verified", + "/sdk/uniapp/calling/managing-calls/start-single-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/start-group-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/accept-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/reject-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/cancel-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/hang-up-call": "api-verified", + "/sdk/uniapp/calling/managing-calls/handle-call-events": "api-verified", + "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation": "api-verified", + "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": "api-verified", + "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id": "api-verified", + "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal": "api-verified", + "/sdk/uniapp/events/overview-events": "api-verified", + "/sdk/uniapp/events/handle-data-migration-events": "api-verified", + "/sdk/uniapp/logger": "api-verified" + }, + "navigationLabels": { + "Accept a call": "接受通话", + "Accept a friend application": "接受好友申请", + "Accept a group application": "接受入群申请", + "Add a user to the blacklist": "将用户加入黑名单", + "Add conversations to groups": "添加会话到分组", + "Add extra data to a message": "为消息添加扩展数据", + "addConversationsToGroups": "添加会话到分组", + "Apply to join a group": "申请加入群组", + "Audio and video calling overview": "音视频通话概览", + "Authenticate and manage a session": "认证与管理登录会话", + "authenticate-and-manage-session": "认证与管理登录会话", + "Before you start": "开始之前", + "before-you-start": "开始之前", + "Blacklist": "黑名单", + "Blacklist overview": "黑名单概览", + "Block or unblock users": "拉黑或取消拉黑用户", + "calling": "音视频通话", + "Calling": "音视频通话", + "Calling overview": "音视频通话概览", + "Cancel a call invitation": "取消通话邀请", + "Change group mute status": "设置群组全员禁言", + "Check friendship status": "检查好友关系", + "Check group membership": "检查是否已加入群组", + "Check speech recognition support": "检查语音识别能力", + "Check users in a group": "查询用户入群状态", + "Clear all local conversations": "清理全部本地会话", + "Clear all local messages": "清理全部本地消息", + "Clear all saved messages": "清理本地与服务端消息", + "Clear message history": "清理消息历史", + "Clear messages in a conversation": "清空会话消息", + "Clear the group application badge": "清除入群申请角标", + "Composing messages": "输入状态与语音转写", + "composing-messages": "输入状态与语音转写", + "Configure a conversation": "设置会话属性", + "conversation": "会话", + "Conversation": "会话", + "Conversation group overview": "会话分组概览", + "Conversation groups": "会话分组", + "Conversation organization": "会话整理", + "Conversation overview": "会话概览", + "Create a contact card message": "创建名片消息", + "Create a conversation group": "创建会话分组", + "Create a custom message": "创建自定义消息", + "Create a file message": "创建文件消息", + "Create a file message from a file": "使用文件创建文件消息", + "Create a file message from a path": "使用本地路径创建文件消息", + "Create a file message from a URL": "使用 URL 创建文件消息", + "Create a forwarded message": "创建转发消息", + "Create a group": "创建群组", + "Create a location message": "创建位置消息", + "Create a Markdown message": "创建 Markdown 消息", + "Create a mention message": "创建 @ 消息", + "Create a merged message": "创建合并消息", + "Create a reply message": "创建回复消息", + "Create a rich reply": "创建富文本回复", + "Create a text message": "创建文本消息", + "Create a video message": "创建视频消息", + "Create a video message from a file": "使用文件创建视频消息", + "Create a video message from a path": "使用本地路径创建视频消息", + "Create a video message from a URL": "使用 URL 创建视频消息", + "Create an @all marker": "创建 @所有人 标记", + "Create an @all message": "创建 @所有人 消息", + "Create an audio message": "创建音频消息", + "Create an audio message from a file": "使用文件创建音频消息", + "Create an audio message from a path": "使用本地路径创建音频消息", + "Create an audio message from a URL": "使用 URL 创建音频消息", + "Create an emoji message": "创建表情消息", + "Create an image message": "创建图片消息", + "Create an image message from a file": "使用文件创建图片消息", + "Create an image message from a path": "使用本地路径创建图片消息", + "Create an image message from a URL": "使用 URL 创建图片消息", + "Create media and rich messages": "创建媒体与富消息", + "Create or update a group": "创建或更新群组", + "Create rich text": "创建富文本消息", + "createConversationGroup": "创建会话分组", + "Creating and updating groups": "创建和更新群组", + "Creating messages": "创建消息", + "Creating messages overview": "创建消息概览", + "creating-and-updating-groups": "创建和更新群组", + "Custom message and extra data": "自定义消息与扩展数据", + "Delete a conversation": "删除会话", + "Delete a conversation and its messages": "删除会话及消息", + "Delete a conversation group": "删除会话分组", + "Delete a friend": "删除好友", + "Delete a local message": "删除本地消息", + "Delete a message": "删除消息", + "Delete friend applications": "删除好友申请", + "Delete group applications": "删除入群申请", + "Delete messages from a user": "删除群聊中指定用户的全部消息", + "Delete or clear a conversation": "删除或清空会话", + "Delete or revoke a message": "删除或撤回消息", + "Delete saved messages": "批量删除消息", + "deleteConversationGroup": "删除会话分组", + "Dismiss a group": "解散群组", + "Enable or disable burn after reading": "开启或关闭阅后即焚", + "Environment-specific implementation": "按运行环境接入", + "environment-specific-implementation": "按运行环境接入", + "events": "事件", + "Events": "事件", + "Events overview": "事件概览", + "File upload overview": "文件上传概览", + "Find messages by ID": "按 ID 查找消息", + "Forward or merge a message": "转发或合并消息", + "Friend applications": "好友申请", + "Friend applications overview": "好友申请概览", + "Friends": "好友", + "Friends overview": "好友概览", + "Get a group call room": "查询群组通话房间", + "Get conversation groups": "查询会话分组列表", + "Get conversations by ID": "按 ID 批量获取会话", + "Get conversations in a group": "查询分组内会话", + "Get friend profiles": "查询指定好友资料", + "Get group application badge count": "获取入群申请角标数", + "Get group information": "查询指定群组资料", + "Get group member profiles": "查询指定群成员资料", + "Get group members": "分页查询群成员", + "Get group owners and admins": "获取群主和管理员", + "Get groups for a conversation": "查询会话所属分组", + "Get joined groups": "获取已加入群组", + "Get joined groups by page": "分页获取已加入群组", + "Get pending application count": "获取未处理好友申请数", + "Get pending group application count": "获取未处理入群申请数", + "Get received friend applications": "获取收到的好友申请", + "Get received group applications": "获取收到的入群申请", + "Get room credentials": "获取通话房间 Token", + "Get sent friend applications": "获取发出的好友申请", + "Get sent group applications": "获取发出的入群申请", + "Get subscribed user status": "查询已订阅用户状态", + "Get the @all tag": "获取 @所有人 标签", + "Get the blacklist": "获取黑名单", + "Get the conversation list": "获取会话列表", + "Get the friend list": "分页获取好友列表", + "Get typing status": "查询输入状态", + "Get user profiles": "获取用户资料", + "Get your profile": "获取当前用户资料", + "getConversationGroupIDsByConversationID": "查询会话所属的分组", + "getConversationGroupInfoWithConversations": "查询分组内的会话", + "getConversationGroups": "查询会话分组", + "Getting started": "快速开始", + "getting-started": "快速开始", + "group": "群组", + "Group": "群组", + "Group applications": "入群申请", + "Group applications overview": "入群申请概览", + "Group message read status": "群聊消息已读", + "Group member management overview": "群成员管理概览", + "Group member queries overview": "群成员查询概览", + "Group overview": "群组概览", + "Group permissions": "群权限与管理", + "Group profile and settings": "群资料与设置", + "Group queries overview": "群组查询概览", + "Handle call events": "处理通话事件", + "Hang up a call": "挂断通话", + "Hide a conversation": "隐藏会话", + "Hide all conversations": "隐藏全部会话", + "hide-a-conversation": "隐藏会话", + "Hiding and deleting conversations": "隐藏与删除会话", + "Insert a local direct message": "插入本地单聊消息", + "Insert a local group message": "插入本地群聊消息", + "Insert a local message": "插入本地消息", + "Invite or remove group members": "邀请或移除群成员", + "Invite users to a group": "邀请用户加入群组", + "Join, leave, or dismiss a group": "加入、退出或解散群组", + "Joining and leaving groups": "加入、退出与解散群组", + "joining-and-leaving-groups": "加入和退出群组", + "Leave a group": "退出群组", + "Load message context": "读取消息上下文", + "Load newer messages": "反向加载历史消息", + "Logging": "日志", + "Load older messages": "加载历史消息", + "Locate messages by ID": "按 ID 定位消息", + "logger": "日志", + "Logger": "日志", + "Manage conversation read status": "管理会话已读状态", + "Manage friend requests": "处理好友申请", + "Manage group administrators": "设置管理员", + "Manage group applications": "处理入群申请", + "Manage group message read receipts": "管理消息已读回执", + "Manage message read receipts": "管理消息已读回执", + "Manage typing status": "管理输入状态", + "Managing calls": "管理通话", + "Managing conversation groups": "管理会话分组", + "Managing conversations": "管理会话", + "Managing friends": "管理好友", + "Managing group applications": "管理入群申请", + "Managing group members": "管理群成员", + "Managing messages": "管理消息", + "Managing read status": "管理已读状态", + "managing-calls": "管理通话", + "managing-conversation-groups": "管理会话分组", + "managing-conversations": "管理会话", + "managing-friends": "管理好友", + "managing-group-applications": "管理入群申请", + "managing-group-members": "管理群成员", + "managing-messages": "管理消息", + "managing-read-status": "管理已读状态", + "Mark a conversation as read": "标记会话已读", + "Mark all conversations as read": "将全部会话标为已读", + "Mark or unmark a conversation": "标记或取消标记会话", + "Mention users in a message": "在消息中提及用户", + "message": "消息", + "Message": "消息", + "Message overview": "消息概览", + "Unread status and notifications": "未读与消息提醒", + "Message retention and privacy": "消息保留与隐私", + "Moderating groups": "群组管控", + "Moderating users": "用户黑名单", + "moderating-a-user": "用户黑名单", + "moderating-groups": "群组管控", + "Modify a message": "修改消息", + "modify-a-message": "修改消息", + "Mute a group or member": "禁言群组或群成员", + "Mute or unmute a group member": "设置群成员禁言", + "Online status": "在线状态", + "Online status overview": "在线状态概览", + "Open a conversation": "查询指定会话", + "Overview": "概览", + "overview-calling": "音视频通话概览", + "overview-conversation": "会话概览", + "overview-message": "消息概览", + "overview-user": "用户概览", + "Pin conversation messages": "置顶会话中的消息", + "Pin or unpin a conversation": "置顶或取消置顶会话", + "Pin or unpin a message": "置顶或取消置顶消息", + "Publish a group announcement": "发布或更新群公告", + "Receive custom business messages": "接收自定义业务消息", + "Receive messages": "接收消息", + "receive-messages": "接收消息", + "Receiving messages": "接收消息", + "receiving-messages": "接收消息", + "Reject a call": "拒绝通话", + "Reject a friend application": "拒绝好友申请", + "Reject a group application": "拒绝入群申请", + "Remove a user from the blacklist": "将用户移出黑名单", + "Remove conversations from groups": "从分组移除会话", + "Remove group members": "移除群成员", + "removeConversationsFromGroups": "从分组移除会话", + "Reorder conversation groups": "调整会话分组顺序", + "Relationships": "关系链", + "Reset group mention status": "重置群聊 @ 状态", + "Resolve a conversation ID": "获取会话 ID", + "Restore a pending invitation": "恢复待处理的通话邀请", + "Retrieve a conversation": "获取指定会话", + "Retrieve a conversation list": "获取会话列表", + "Retrieve a list of blocked users": "获取黑名单列表", + "Retrieve a list of friends": "获取好友列表", + "Retrieve a message list": "获取消息列表", + "Retrieve and search groups": "获取和搜索群组", + "Retrieve and update the current user profile": "获取和更新当前用户资料", + "Retrieve call information": "获取通话信息", + "Retrieve conversations": "获取会话", + "Retrieve group members": "获取群成员", + "Retrieve message history": "获取消息历史", + "Retrieve messages": "获取指定消息", + "Retrieve specified friend information": "获取指定好友信息", + "Retrieve specified messages": "按 ID 定位消息", + "Retrieve user online status": "获取用户在线状态", + "Retrieve users": "获取指定用户资料", + "retrieve-conversation-list": "获取会话列表", + "Retrieving and updating user information": "获取和更新用户资料", + "Retrieving call information": "通话恢复与房间信息", + "Retrieving conversations": "查询会话", + "Retrieving group members": "查询群成员", + "Retrieving groups": "查询群组", + "Retrieving messages": "查询消息", + "Retrieving users": "获取用户", + "retrieving-and-updating-user-information": "获取和更新用户资料", + "retrieving-call-information": "获取通话信息", + "retrieving-conversations": "获取会话", + "retrieving-group-members": "获取群成员", + "retrieving-groups": "获取群组", + "retrieving-messages": "获取消息", + "retrieving-users": "获取用户", + "Revoke a message": "撤回消息", + "revoke-a-message": "撤回消息", + "Save a local transcript": "保存本地转写结果", + "Schedule server message deletion": "定期删除服务端消息", + "Search friends": "搜索好友", + "Search conversations": "搜索会话", + "Search group members": "搜索群成员", + "Search groups": "搜索群组", + "Search messages": "搜索消息", + "search-messages": "搜索消息", + "Searching messages": "搜索消息", + "searching-messages": "搜索消息", + "Send a custom signal": "发送自定义信令", + "Send a friend application": "发送好友申请", + "Send a message": "发送消息", + "Send a message without OSS": "发送已上传的媒体消息", + "Send group read receipts": "上报群消息已读", + "Send your first message": "发送第一条消息", + "send-a-custom-signal": "发送自定义信令", + "send-first-message": "发送第一条消息", + "Sending custom signals": "发送自定义信令", + "Sending messages": "发送消息", + "sending-custom-signals": "发送自定义信令", + "sending-messages": "发送消息", + "Set a conversation": "设置会话", + "Set a conversation draft": "设置会话草稿", + "Set a conversation remark": "设置会话备注", + "Set conversation extra data": "设置会话扩展字段", + "Set conversation message reception": "设置会话消息接收方式", + "Set conversation settings": "设置会话属性", + "Set global message reception": "设置全局消息接收方式", + "Set friend request permissions": "设置好友添加权限", + "Set group extra data": "设置群组扩展字段", + "Set group join verification": "设置入群验证方式", + "Set group member extra data": "设置群成员扩展字段", + "Set local message extensions": "设置消息本地扩展", + "Set member friend request permission": "设置群内添加好友权限", + "Set member profile access": "设置成员资料查看权限", + "Set the burn duration": "设置阅后即焚时长", + "set-conversation-draft": "设置会话草稿", + "setConversationGroupOrder": "设置会话分组顺序", + "Start a group call": "发起群聊通话", + "Start a one-to-one call": "发起单聊通话", + "Start or handle a call": "发起或处理通话", + "Subscribe to online status": "订阅用户在线状态", + "Track file upload progress": "监听文件上传进度", + "Track message sending progress": "监听消息发送进度", + "Track the total unread count": "获取消息总未读数", + "Transcribe an audio file": "识别音频文字", + "Transcribe audio": "将音频转为文字", + "Transfer group owner": "转让群主", + "Transfer group ownership": "转让群主", + "Unsubscribe from online status": "取消订阅用户状态", + "Update a conversation group": "更新会话分组", + "Update a group member avatar": "更新群成员头像", + "Update a group nickname": "修改群内昵称", + "Update friend information": "更新好友资料", + "Update group fields": "更新群组字段", + "Update group information": "更新群组资料", + "Update group member information": "更新群成员资料", + "Update group profile": "更新群名称、简介和头像", + "Update or delete friends": "更新或删除好友", + "Update the user profile": "更新用户资料", + "Update typing status": "上报输入状态", + "Update your profile": "更新当前用户资料", + "updateConversationGroup": "更新会话分组", + "Upload a file": "上传文件", + "Upload files and track progress": "上传文件并跟踪进度", + "user": "用户", + "User": "用户", + "User overview": "用户概览", + "User profile": "用户资料", + "User profile overview": "用户资料概览", + "View group message readers": "查询群消息已读成员", + "View pinned messages": "查询会话置顶消息", + "OpenIM SDK for uni-app / uni-app x": "OpenIM uni-app / uni-app x SDK 概览", + "getConversationGroupByConversationID": "查询会话所属的分组", + "Install, initialize, and inspect the SDK": "安装、初始化并检查 SDK", + "Handle App lifecycle and device state": "处理 App 生命周期与设备状态", + "Update tokens and observe SDK sessions": "更新 Token 并观察 SDK 会话", + "Check group full-sync state": "检查群组全量同步状态", + "Translate text and messages": "翻译文本与消息", + "Handle data migration events": "处理数据迁移事件" + }, + "pages": { + "/sdk/uniapp/overview": { + "body": "OpenIM `unix-openim-sdk` 是 UTS 原生插件,为 uni-app 和 uni-app x 的 App 端提供用户、好友、会话、群组、消息、事件与本地数据库能力。插件在宿主进程中持有唯一的 OpenIM Core;业务代码直接从 `@/uni_modules/unix-openim-sdk` 导入函数,不创建 SDK 实例。\n\n## 支持范围\n\n| 宿主 | Android | iOS | HarmonyOS |\n| --- | --- | --- | --- |\n| uni-app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 |\n| uni-app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 |\n| Web / 小程序 | 不支持 | 不支持 | 不支持 |\n\n接入和本地编译使用 HBuilderX/uni-app `5.23` 系列。Android、iOS 需要包含插件原生依赖的自定义基座或本地原生工程,标准基座不能加载这些原生制品。\n\n## 公共版与商业版\n\n同一套文档覆盖公共能力和商业版扩展。标有“商业版”的 API、事件或字段需要商业版 `unix-openim-sdk` 与匹配的 OpenIMServer;没有徽标的能力属于公共接口。商业版归属与平台支持是两个维度:公共 API 也可能在某个平台返回 `platform-unsupported`,页面会单独列出。\n\n商业版增加信令、SDK session 快照、翻译和部分消息/会话扩展。`onSDKSessionChanged` 是插件层根据初始化、登录、退出、Token 与账号变化合成的事件,不是 OpenIM Core 原生事件。\n\n## 接入顺序\n\n1. 安装 `unix-openim-sdk`,为目标平台准备自定义基座或本地原生工程。\n2. 调用 `initSDK()`,配置 `apiAddr`、`wsAddr`、平台、日志和 `systemType`。\n3. 保存连接、消息和业务事件返回的订阅句柄。\n4. 从可信后端取得当前用户的 `userID` 与 Token,再调用 `login(userID, token)`。\n5. 等待 `onConnectSuccess` 后查询快照数据,并用事件增量更新应用状态。\n6. 用户退出时先 `logout()`,再通过 `off(subscription)` 清理监听;只有不再使用 SDK 时才调用 `unInitSDK()`。\n\n## 调用模型\n\nPromise 成功直接返回业务值,不使用 Web SDK 的 `{ data }` 包装。事件注册同步返回 `OpenIMSDKEventSubscription`,取消时必须传回同一句柄:\n\n```uts\nimport {\n off,\n onRecvNewMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst messageSubscription = onRecvNewMessage((message) => {\n console.log(message.clientMsgID)\n})\n\n// 页面或账号作用域结束时清理。\noff(messageSubscription)\n```\n\n不要使用 `offAll()` 代替正常的局部清理。它会移除当前插件实例中的全部监听,只适合应用整体销毁或可控的测试重置。\n\n## 安全边界\n\n- Token 必须由可信后端签发,不要把管理员 Token、secret 或固定用户 Token 写入 App。\n- `apiAddr` 与 `wsAddr` 必须从设备真实可访问;真机不能把 `localhost` 当作开发机。\n- SDK 的数据库目录和文件由插件管理,不要直接修改内部数据库。\n- 日志和错误上报应脱敏,避免记录 Token、完整消息内容与商业业务凭据。\n- AV Runtime 是独立 UTS 插件;它复用本插件的唯一登录态,但不属于本 SDK 的公共 IM API。\n\n## 下一步\n\n- [开始之前](/sdk/uniapp/getting-started/before-you-start)\n- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)\n- [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message)\n- [事件概览](/sdk/uniapp/events/overview-events)", + "description": "在 uni-app 与 uni-app x 的 Android、iOS 和商业版 HarmonyOS App 中接入 unix-openim-sdk。", + "headings": [ + { + "depth": 2, + "title": "支持范围", + "url": "#支持范围" + }, + { + "depth": 2, + "title": "公共版与商业版", + "url": "#公共版与商业版" + }, + { + "depth": 2, + "title": "接入顺序", + "url": "#接入顺序" + }, + { + "depth": 2, + "title": "调用模型", + "url": "#调用模型" + }, + { + "depth": 2, + "title": "安全边界", + "url": "#安全边界" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" + } + ], + "sourcePath": "/sdk/uniapp/overview", + "title": "OpenIM uni-app / uni-app x SDK 概览" + }, + "/sdk/uniapp/getting-started/before-you-start": { + "body": "接入前先确定目标是 uni-app 还是 uni-app x App,并准备与 `unix-openim-sdk 0.2.0-rc.3` 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。\n\n## 准备服务与账号\n\n客户端初始化需要以下信息:\n\n| 数据 | 来源 | 要求 |\n| --- | --- | --- |\n| `apiAddr` | OpenIMServer HTTP API | 设备可访问的完整地址 |\n| `wsAddr` | OpenIMServer WebSocket | 设备可建立长连接的完整地址 |\n| `userID` | 业务后端的账号映射 | 与 Token 对应且在服务端存在 |\n| Token | 可信业务后端 | 只授予当前用户,不在客户端生成 |\n\n业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。\n\n真机测试时,`apiAddr` 和 `wsAddr` 不能使用开发机的 `localhost`。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。\n\n## 准备插件与构建环境\n\n把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备:\n\n- Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。\n- iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。\n- HarmonyOS:仅 uni-app x 商业版,API 24;使用与插件合同一致的 HAR。\n\n标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。\n\n## 选择平台标识\n\n初始化使用插件导出的常量,不直接写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。`systemType` 是当前系统说明字符串,例如 `android`、`ios` 或 `harmony`,不可省略。\n\n## 发布前检查\n\n- 在真实目标设备上完成初始化、登录、普通消息收发与退出。\n- 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。\n- Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。\n- 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。\n- 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。\n\n准备完成后,先阅读[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk),再进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。", + "description": "准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。", + "headings": [ + { + "depth": 2, + "title": "准备服务与账号", + "url": "#准备服务与账号" + }, + { + "depth": 2, + "title": "准备插件与构建环境", + "url": "#准备插件与构建环境" + }, + { + "depth": 2, + "title": "选择平台标识", + "url": "#选择平台标识" + }, + { + "depth": 2, + "title": "发布前检查", + "url": "#发布前检查" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/before-you-start", + "title": "开始之前" + }, + "/sdk/uniapp/getting-started/environment-specific-implementation": { + "body": "`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。\n\n## 支持矩阵\n\n| 宿主 | Android | iOS | HarmonyOS |\n| --- | --- | --- | --- |\n| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 |\n| uni-app x | API 21+ | iOS 14+ | 商业版 API 24 |\n| H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 |\n\n## uni-app\n\n传统 uni-app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。\n\n```javascript\nimport {\n getLoginStatus,\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n console.log('OpenIM connected')\n})\n\nconst status = await getLoginStatus()\n\n// 应用 service 销毁时执行。\noff(connectSubscription)\n```\n\n## uni-app x\n\nuni-app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。\n\n```uts\nimport {\n getLoginStatus,\n type OpenIMLoginStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst status : OpenIMLoginStatus = await getLoginStatus()\n```\n\n解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 `UTSJSONObject` 强制转换成业务 DTO。\n\n## Android 与 iOS\n\nAndroid 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。\n\n文件消息使用本机可读的完整路径。`unifile://` 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。\n\n## HarmonyOS\n\nHarmonyOS 仅声明 uni-app x 商业版支持。当前以下操作会稳定返回 `platform-unsupported`:`updateFcmToken`、`updateToken`、`translateText`、`translateMessage`。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见[事件概览](/sdk/uniapp/events/overview-events)。\n\n平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。\n\n## 生命周期归属\n\nSDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 `unInitSDK()`。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。", + "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。", + "headings": [ + { + "depth": 2, + "title": "支持矩阵", + "url": "#支持矩阵" + }, + { + "depth": 2, + "title": "uni-app", + "url": "#uni-app" + }, + { + "depth": 2, + "title": "uni-app x", + "url": "#uni-app-x" + }, + { + "depth": 2, + "title": "Android 与 iOS", + "url": "#android-与-ios" + }, + { + "depth": 2, + "title": "HarmonyOS", + "url": "#harmonyos" + }, + { + "depth": 2, + "title": "生命周期归属", + "url": "#生命周期归属" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/environment-specific-implementation", + "title": "按宿主和平台接入" + }, + "/sdk/uniapp/getting-started/authenticate-and-manage-session": { + "body": "完成 `initSDK()` 后,先注册连接与账号事件,再调用 `login(userID, token)`。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 `onConnectSuccess`。\n\n## 注册登录事件\n\n每次 `on...` 调用都返回独立的 `OpenIMSDKEventSubscription`。保存全部句柄,并在账号或应用作用域结束时逐个释放。\n\n```uts\nimport {\n off,\n onConnectFailed,\n onConnectSuccess,\n onConnecting,\n onKickedOffline,\n onUserTokenExpired,\n onUserTokenInvalid,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n console.log('OpenIM connected')\n})\nconst subscriptions : Array = [\n connectSubscription,\n onConnecting(() => console.log('OpenIM connecting')),\n onConnectFailed((error) => console.error(error.errCode, error.errMsg)),\n onKickedOffline(() => clearCurrentAccount()),\n onUserTokenExpired(() => requestFreshToken()),\n onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)),\n]\n\nfunction releaseSessionSubscriptions() {\n subscriptions.forEach((subscription) => off(subscription))\n subscriptions.length = 0\n}\n```\n\n`onKickedOffline` 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 `logout()`。\n\n## 登录\n\n```uts\nimport { login } from '@/uni_modules/unix-openim-sdk'\n\nawait login(userID, token)\n```\n\n`login` 的真实签名是 `login(userID, token)`,不是对象参数。Token 必须来自可信后端,并且与 `userID` 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。\n\n## 查询当前状态\n\n```uts\nimport {\n OpenIMLoginStatusLogged,\n getLoginStatus,\n getLoginUserID,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst status = await getLoginStatus()\nif (status == OpenIMLoginStatusLogged) {\n const currentUserID = await getLoginUserID()\n restoreAccountState(currentUserID)\n}\n```\n\n`getLoginStatus()` 返回 `OpenIMLoginStatusLogout`、`OpenIMLoginStatusLogging` 或 `OpenIMLoginStatusLogged`。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。\n\n## 上报前后台与网络变化\n\n```uts\nimport {\n networkStatusChanged,\n setAppBackgroundStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nawait setAppBackgroundStatus(true) // 进入后台\nawait setAppBackgroundStatus(false) // 回到前台\nawait networkStatusChanged() // 网络恢复或网络类型变化\n```\n\n把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。\n\n## 主动退出与切换账号\n\n```uts\nimport { logout } from '@/uni_modules/unix-openim-sdk'\n\nawait logout()\nreleaseSessionSubscriptions()\nclearCurrentAccount()\n```\n\n切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。\n\n商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。", + "description": "登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。", + "headings": [ + { + "depth": 2, + "title": "注册登录事件", + "url": "#注册登录事件" + }, + { + "depth": 2, + "title": "登录", + "url": "#登录" + }, + { + "depth": 2, + "title": "查询当前状态", + "url": "#查询当前状态" + }, + { + "depth": 2, + "title": "上报前后台与网络变化", + "url": "#上报前后台与网络变化" + }, + { + "depth": 2, + "title": "主动退出与切换账号", + "url": "#主动退出与切换账号" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "title": "认证与管理登录会话" + }, + "/sdk/uniapp/getting-started/send-first-message": { + "body": "本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。\n\n## 1. 初始化并登录\n\n先按[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)初始化,再从可信后端取得 `userID` 和 Token。登录前注册连接事件,连接成功后才允许发送。\n\n```uts\nimport {\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n markOpenIMReady()\n})\n\n// 应用作用域结束时释放。\noff(connectSubscription)\n```\n\n完整登录和事件清理见[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。\n\n## 2. 准备目标\n\n| 场景 | `recvID` | `groupID` |\n| --- | --- | --- |\n| 单聊 | 已存在的接收用户 ID | 空字符串 |\n| 群聊 | 空字符串 | 当前用户已加入的群 ID |\n\n目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。\n\n## 3. 创建并发送文本消息\n\n```uts\nimport {\n createTextMessage,\n sendMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextMessage('你好,OpenIMSDK')\nif (message == null) {\n throw new Error('Failed to create text message')\n}\n\nconst sentMessage = await sendMessage({\n message,\n recvID: 'user_b',\n groupID: '',\n})\n\nappendOutgoingMessage(sentMessage)\n```\n\n`createTextMessage()` 只创建本地消息对象,不会发送。`sendMessage()` 成功后直接返回最终 `OpenIMMessageItem`,不需要读取 `{ data }`。发送端按 `clientMsgID` 合并返回值;接收端通过新消息事件按同一标识去重。\n\n群聊只需把 `recvID` 改为空字符串,并填入 `groupID`:\n\n```uts\nconst sentGroupMessage = await sendMessage({\n message,\n recvID: '',\n groupID: 'group_123',\n})\n```\n\n## 4. 双端验证\n\n用两个不同账号和两个独立客户端验证:\n\n1. A 端发送后获得非空 `clientMsgID`,消息状态进入发送成功。\n2. B 端收到新消息事件,并能解析到相同业务内容。\n3. A、B 重新进入会话后,都能从历史消息中读取该消息。\n4. 退出 SDK 后普通事件不再写入旧账号状态。\n\n下一步阅读[发送消息](/sdk/uniapp/message/sending-messages/send-message)、[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages)和[加载历史消息](/sdk/uniapp/message/retrieving-messages/load-older-messages)。", + "description": "在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。", + "headings": [ + { + "depth": 2, + "title": "1. 初始化并登录", + "url": "#1-初始化并登录" + }, + { + "depth": 2, + "title": "2. 准备目标", + "url": "#2-准备目标" + }, + { + "depth": 2, + "title": "3. 创建并发送文本消息", + "url": "#3-创建并发送文本消息" + }, + { + "depth": 2, + "title": "4. 双端验证", + "url": "#4-双端验证" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/send-first-message", + "title": "发送第一条消息" + }, + "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk": { + "body": "项目安装 `uni_modules/unix-openim-sdk` 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。\n\n## 初始化\n\n```uts\nimport {\n OpenIMLogLevelInfo,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelInfo,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nconst initialized = await initSDK(config)\nif (!initialized) {\n throw new Error('OpenIM SDK initialization was not accepted')\n}\n```\n\niOS 改用 `OpenIMPlatformIOS` 和 `systemType: 'ios'`;HarmonyOS 改用 `OpenIMPlatformHarmony` 和 `systemType: 'harmony'`。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 `logFilePath`。\n\n### `OpenIMInitConfig`\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `platformID` | `OpenIMPlatform` | 使用插件导出的平台常量。 |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string \\| null`(可选) | Core 数据目录;通常让插件使用平台默认值。 |\n| `logFilePath` | `string \\| null`(可选) | 日志目录或文件路径,按平台产物约定配置。 |\n| `logLevel` | `OpenIMLogLevel` | 使用 `OpenIMLogLevelError`、`OpenIMLogLevelInfo` 等常量。 |\n| `isLogStandardOutput` | `boolean` | 是否把 SDK 日志输出到系统控制台。 |\n| `systemType` | `string` | 必填的系统说明,初始化示例不得省略。 |\n\n同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。\n\n## 查询版本与数据路径\n\n`getSdkVersion()` 和 `getOpenIMDataPath()` 是同步本地操作:\n\n```uts\nimport {\n getOpenIMDataPath,\n getSdkVersion,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst version = getSdkVersion()\nconst dataPath = getOpenIMDataPath()\n```\n\n数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。\n\n## 反初始化\n\n```uts\nimport { unInitSDK } from '@/uni_modules/unix-openim-sdk'\n\nunInitSDK()\n```\n\n`unInitSDK()` 返回 `void`。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。\n\n初始化完成后,进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。", + "description": "安装 UTS 插件,初始化唯一 OpenIM Core,并查询 SDK 版本和数据目录。", + "headings": [ + { + "depth": 2, + "title": "初始化", + "url": "#初始化" + }, + { + "depth": 3, + "title": "`OpenIMInitConfig`", + "url": "#openiminitconfig" + }, + { + "depth": 2, + "title": "查询版本与数据路径", + "url": "#查询版本与数据路径" + }, + { + "depth": 2, + "title": "反初始化", + "url": "#反初始化" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "title": "安装、初始化与 SDK 信息" + }, + "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state": { + "body": "生命周期上报应由应用级 service 统一负责,而不是每个聊天页面分别调用。前后台和网络变化使用认证页说明的 `setAppBackgroundStatus()` 与 `networkStatusChanged()`;本页说明应用角标和 FCM Token。\n\n## 设置应用未读角标\n\n```uts\nimport { setAppBadge } from '@/uni_modules/unix-openim-sdk'\n\nawait setAppBadge(totalUnreadCount)\n```\n\n`setAppBadge()` 把当前应用总未读数同步给 SDK/平台侧。业务仍应订阅总未读事件维护自己的 UI;Promise 成功不代表桌面角标在所有系统设置下都可见。传 `0` 清除角标。\n\n## 更新 FCM Token\n\n```uts\nimport { updateFcmToken } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFcmToken({\n fcmToken: deviceFcmToken,\n expireTime: tokenExpireUnixSeconds,\n})\n```\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `fcmToken` | `string` | 推送服务为当前设备签发的 Token。 |\n| `expireTime` | `number` | Token 到期 Unix 时间;按服务端协议使用秒级时间。 |\n\n只在取得或刷新有效设备 Token 后调用。不要把 FCM Token 写入公开日志,也不要用 IM Token 代替设备推送 Token。\n\nHarmonyOS 当前不实现 `updateFcmToken`,调用会返回 `platform-unsupported`。这属于平台能力缺失,不是商业版鉴权问题;Harmony 推送应由业务使用其平台方案接入。\n\n## 推荐时序\n\n1. App 启动并初始化 SDK。\n2. 注册账号与消息事件,登录当前用户。\n3. 推送服务返回设备 Token 后调用 `updateFcmToken()`。\n4. 总未读事件到达时更新应用状态并调用 `setAppBadge()`。\n5. App 前后台、网络变化时调用对应生命周期 API。\n6. 退出账号时清空业务角标与推送关联,再清理账号作用域监听。\n\n推送到达只表示系统通知链路工作;消息列表仍应通过 SDK 新消息事件和历史查询恢复,不能只依赖通知 payload。", + "description": "把 App 前后台、网络、角标和 FCM Token 接入 OpenIM SDK。", + "headings": [ + { + "depth": 2, + "title": "设置应用未读角标", + "url": "#设置应用未读角标" + }, + { + "depth": 2, + "title": "更新 FCM Token", + "url": "#更新-fcm-token" + }, + { + "depth": 2, + "title": "推荐时序", + "url": "#推荐时序" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "title": "处理 App 生命周期、角标与推送 Token" + }, + "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session": { + "body": "本页能力属于商业版。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。\n\n`onSDKSessionChanged` 是 `unix-openim-sdk` 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。\n\n## 读取 session 快照\n\n```uts\nimport {\n getSDKSessionSnapshot,\n type OpenIMSDKSessionSnapshot,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot()\n```\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `loginStatus` | `OpenIMLoginStatus` | 当前登录状态。 |\n| `userID` | `string \\| null` | 当前 SDK 用户;未登录时为 `null`。 |\n| `sdkSessionEpoch` | `number` | session 世代。生命周期或账号成功变化后递增。 |\n| `sdkVersion` | `string` | 当前插件所连接 Core 的版本。 |\n\n快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 `userID` 与 `sdkSessionEpoch`,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。\n\n## 订阅 session 变化\n\n```uts\nimport {\n off,\n onSDKSessionChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sessionSubscription = onSDKSessionChanged((snapshot) => {\n cancelRequestsFromOlderEpoch(snapshot.sdkSessionEpoch)\n replaceActiveSdkUser(snapshot.userID)\n})\n\n// 应用或依赖插件销毁时执行。\noff(sessionSubscription)\n```\n\n初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。\n\n## 热更新 Token\n\n```uts\nimport { updateToken } from '@/uni_modules/unix-openim-sdk'\n\nawait updateToken({ token: freshToken })\n```\n\nToken 由可信后端签发。`updateToken()` 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 `platform-unsupported`,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。\n\n## 与其他插件协作\n\nAV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 `logout()` 或 `unInitSDK()`。用户切换时先销毁依赖插件,再退出并登录新账号。", + "description": "商业版更新登录 Token,并通过合成 session 快照防止账号与异步请求串线。", + "headings": [ + { + "depth": 2, + "title": "读取 session 快照", + "url": "#读取-session-快照" + }, + { + "depth": 2, + "title": "订阅 session 变化", + "url": "#订阅-session-变化" + }, + { + "depth": 2, + "title": "热更新 Token", + "url": "#热更新-token" + }, + { + "depth": 2, + "title": "与其他插件协作", + "url": "#与其他插件协作" + } + ], + "sourcePath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "title": "更新 Token 与观察 SDK session" + }, + "/sdk/uniapp/user/overview-user": { + "body": "用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。`userID` 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。\n\n## 核心模型\n\n`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。\n\n好友数据使用 `OpenIMFriendUserItem`,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 `OpenIMBlackUserItem`。好友申请使用 `OpenIMFriendApplicationItem`,申请状态由接受、拒绝和删除事件增量更新。\n\n## 快照与事件\n\n页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。\n\n- 当前资料:[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)与[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)\n- 在线状态:[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)\n- 好友:[分页查询好友](/sdk/uniapp/user/friends/get-friend-list-page)\n- 好友申请:[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)\n- 黑名单:[查询黑名单](/sdk/uniapp/user/blacklist/get-black-list)\n\n业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。", + "description": "理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。", + "headings": [ + { + "depth": 2, + "title": "核心模型", + "url": "#核心模型" + }, + { + "depth": 2, + "title": "快照与事件", + "url": "#快照与事件" + } + ], + "sourcePath": "/sdk/uniapp/user/overview-user", + "title": "用户概览" + }, + "/sdk/uniapp/user/profile/get-users-info": { + "body": "使用 `getUsersInfo()` 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 `OpenIMUserListResult | null`。\n\n```uts\nimport { getUsersInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getUsersInfo(['user_a', 'user_b'])\nconst users = result?.users ?? []\nusers.forEach((user) => cacheUser(user.userID, user))\n```\n\n返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n`OpenIMUserInfo` 字段见[用户概览](/sdk/uniapp/user/overview-user)。其中 `attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 `ex` 或 `attachedInfo` 当作可信身份凭据。\n\n大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。", + "description": "按 userID 列表查询用户公开资料。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/profile/get-users-info", + "title": "批量查询用户资料" + }, + "/sdk/uniapp/user/profile/get-self-user-info": { + "body": "`getSelfUserInfo()` 查询当前 SDK 登录账号的资料,返回 `OpenIMUserInfo | null`。调用前应确认 SDK 已登录且连接可用。\n\n```uts\nimport { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst self = await getSelfUserInfo()\nif (self != null) {\n renderProfile(self.nickname, self.faceURL)\n}\n```\n\n以返回的 `userID` 校验应用账号与 SDK 账号是否一致。`nickname`、`faceURL` 和 `ex` 属于公共字段;`attachedInfo` 与 `globalRecvMsgOpt` 商业版 为可选扩展,不应在公共环境中强制解包。\n\n资料变化由[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)页面归属的 `onSelfInfoUpdated` 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。", + "description": "读取当前已登录用户的 OpenIM 资料。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/profile/get-self-user-info", + "title": "查询自己的资料" + }, + "/sdk/uniapp/user/profile/set-self-info": { + "body": "`setSelfInfo()` 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n setSelfInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n})\n\noff(selfInfoSubscription)\n```\n\n`OpenIMSetSelfInfoParams` 支持 `nickname`、`faceURL`、`ex`,以及商业版使用的 `globalRecvMsgOpt`。Promise 成功表示服务端接受修改;界面最终状态以 `onSelfInfoUpdated` 或重新查询的资料为准。\n\n事件返回完整 `OpenIMUserInfo`。按 `userID` 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。", + "description": "更新当前用户资料并处理 onSelfInfoUpdated 事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/profile/set-self-info", + "title": "修改自己的资料" + }, + "/sdk/uniapp/user/profile/set-global-message-reception": { + "body": "`globalRecvMsgOpt` 商业版 是 `OpenIMSetSelfInfoParams` 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 `recvMsgOpt` 不同:前者影响账号全局,后者只影响指定会话。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\n// 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。\nawait setSelfInfo({ globalRecvMsgOpt: 0 })\n```\n\n只传 `globalRecvMsgOpt`,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)确认最终值;当前插件没有为这一字段单独提供 setter。\n\n公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。", + "description": "通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", + "title": "设置全局消息接收选项" + }, + "/sdk/uniapp/user/profile/set-friend-add-permission": { + "body": "加好友权限属于商业版账号策略。锁定的 `unix-openim-sdk 0.2.0-rc.3` 会在用户模型中公开相关商业字段,但当前 `OpenIMSetSelfInfoParams` 没有独立的 `addFriendPermission` 写入参数。\n\n因此本版本不能通过本插件伪造一个 setter,也不要把该值塞进 `ex`。需要修改时,应由商业版业务后端或已确认支持该字段的管理接口完成;客户端随后重新查询当前资料并刷新 UI。\n\n页面展示该开关前应进行能力判断。公共版、旧服务端或没有返回该字段时,把状态显示为“不可配置”,不要默认成“允许任何人添加”或“需要验证”。\n\n好友申请的客户端流程见[发起好友申请](/sdk/uniapp/user/friend-applications/add-friend)与[处理收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。", + "description": "说明商业版加好友权限字段与当前 unix-openim-sdk 的写入边界。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/profile/set-friend-add-permission", + "title": "设置加好友权限" + }, + "/sdk/uniapp/user/online-status/subscribe-users-status": { + "body": "`subscribeUsersStatus()` 为指定用户建立状态订阅;`getUserStatus()` 可立即查询这些用户的当前状态。`onUserStatusChanged` 是本页的完整事件归属。\n\n```uts\nimport {\n getUserStatus,\n off,\n onUserStatusChanged,\n subscribeUsersStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst statusSubscription = onUserStatusChanged((result) => {\n result.statuses.forEach((status) => replaceUserStatus(status.userID, status))\n})\n\nconst userIDs = ['user_a', 'user_b']\nawait subscribeUsersStatus(userIDs)\nconst snapshot = await getUserStatus(userIDs)\nsnapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status))\n\noff(statusSubscription)\n```\n\n先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 `userID` 和平台更新,不把一次离线事件等同于用户所有设备都离线。\n\n只订阅当前界面或业务确实需要的用户,并在不再需要时调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status)。", + "description": "订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/online-status/subscribe-users-status", + "title": "订阅用户在线状态" + }, + "/sdk/uniapp/user/online-status/get-subscribe-users-status": { + "body": "`getSubscribeUsersStatus()` 返回当前账号已订阅用户的状态快照,不接收用户 ID 参数。\n\n```uts\nimport { getSubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSubscribeUsersStatus()\nconst statuses = result?.statuses ?? []\nstatuses.forEach((status) => replaceUserStatus(status.userID, status))\n```\n\n空结果可能表示尚未订阅、订阅用户当前没有可用状态,或服务端返回空列表。不要只用数组长度判断连接是否正常。\n\n持续变化仍由 `onUserStatusChanged` 提供,完整订阅和清理见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。本方法适合 App 恢复前台或状态 store 重建时重新获取快照。", + "description": "读取当前账号已经订阅的用户在线状态快照。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "title": "查询已订阅用户状态" + }, + "/sdk/uniapp/user/online-status/unsubscribe-users-status": { + "body": "页面或业务不再关注一组用户时,调用 `unsubscribeUsersStatus()` 释放服务端状态订阅。\n\n```uts\nimport { unsubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk'\n\nawait unsubscribeUsersStatus(['user_a', 'user_b'])\n```\n\n该调用只取消传入用户,不会清空其他订阅,也不会自动释放本地 `onUserStatusChanged` 事件句柄。页面应同时维护两层生命周期:\n\n1. 用本 API取消不再需要的用户状态订阅。\n2. 在事件 owner 作用域结束时,通过 `off(subscription)` 清理本地事件处理器。\n\n重复取消应按幂等业务处理;失败时保留本地订阅记录并根据网络状态决定是否重试,不要高频循环调用。", + "description": "停止接收指定用户的在线状态变化。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "title": "取消用户在线状态订阅" + }, + "/sdk/uniapp/user/friends/get-friend-list-page": { + "body": "`getFriendListPage()` 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 `getFriendList()`。本页同时归属好友新增、删除和资料变化事件。\n\n```uts\nimport {\n getFriendListPage,\n off,\n onFriendAdded,\n onFriendDeleted,\n onFriendInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst friendAddedSubscription = onFriendAdded((friend) => upsertFriend(friend.userID, friend))\nconst subscriptions : Array = [\n friendAddedSubscription,\n onFriendDeleted((friend) => removeFriend(friend.userID)),\n onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)),\n]\n\nconst page = await getFriendListPage({ offset: 0, count: 100 })\nreplaceFriendSnapshot(page?.friends ?? [])\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`offset` 从 `0` 开始,`count` 是本页期望数量。继续分页直到返回数量小于 `count`,并按 `userID` 去重。`getFriendList(filterBlack)` 的 `filterBlack` 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。\n\n事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。", + "description": "分页或一次性查询好友,并处理好友新增、删除与资料变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", + "title": "查询好友列表" + }, + "/sdk/uniapp/user/friends/search-friends": { + "body": "`searchFriends()` 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。\n\n```uts\nimport { searchFriends } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchFriends({\n keywordList: ['Alice'],\n isSearchUserID: true,\n isSearchNickname: true,\n isSearchRemark: true,\n})\n\nrenderFriends(result?.friends ?? [])\n```\n\n`keywordList` 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 `OpenIMFriendListResult`,按 `userID` 去重并结合最新好友事件更新。\n\n搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。", + "description": "按用户 ID、昵称或备注搜索当前好友。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/search-friends", + "title": "搜索好友" + }, + "/sdk/uniapp/user/friends/get-specified-friends-info": { + "body": "`getSpecifiedFriendsInfo()` 接收用户 ID 列表,并可选择过滤黑名单用户。\n\n```uts\nimport { getSpecifiedFriendsInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedFriendsInfo({\n userIDList: ['user_a', 'user_b'],\n filterBlack: false,\n})\n\nconst friends = result?.friends ?? []\n```\n\n返回列表可能少于输入列表,且不保证顺序。按 `userID` 建立映射;未返回用户可能不是好友、被过滤或当前不可查询。\n\n`filterBlack: true` 只影响结果过滤,不会移除黑名单关系。需要判断双方关系时使用[检查好友关系](/sdk/uniapp/user/friends/check-friend),需要公共用户资料时使用[批量查询用户资料](/sdk/uniapp/user/profile/get-users-info)。", + "description": "按 userID 列表读取指定好友关系资料。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/get-specified-friends-info", + "title": "查询指定好友资料" + }, + "/sdk/uniapp/user/friends/check-friend": { + "body": "`checkFriend()` 批量检查当前账号与用户列表之间的关系,返回 `OpenIMCheckFriendResult | null`。\n\n```uts\nimport { checkFriend } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await checkFriend(['user_a', 'user_b'])\nconst relations = result?.result ?? []\nrelations.forEach((relation) => cacheFriendRelation(relation.userID, relation.result))\n```\n\n关系结果应按 `userID` 读取,不依赖数组顺序。具体数值含义使用插件导出的好友关系常量,不在业务代码中散落裸数字。\n\n本方法是查询,不会创建好友关系。不是好友时,使用[发起好友申请](/sdk/uniapp/user/friend-applications/add-friend);已有好友的资料和变化通过[查询好友列表](/sdk/uniapp/user/friends/get-friend-list-page)维护。", + "description": "批量检查当前账号与指定用户的好友关系。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/check-friend", + "title": "检查好友关系" + }, + "/sdk/uniapp/user/friends/update-friends": { + "body": "`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。\n\n```uts\nimport { updateFriends } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriends({\n friendUserIDs: ['user_a', 'user_b'],\n remark: '项目成员',\n isPinned: true,\n})\n```\n\n`friendUserIDs` 不能为空。`remark`、`isPinned` 和 `ex` 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 `onFriendInfoChanged` 或重新查询好友列表确认。\n\n商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`:\n\n```uts\nimport { updateFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' })\n```\n\n不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。", + "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/update-friends", + "title": "更新好友资料" + }, + "/sdk/uniapp/user/friends/delete-friend": { + "body": "`deleteFriend()` 解除当前账号与指定用户的好友关系。\n\n```uts\nimport { deleteFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteFriend('user_a')\n```\n\nPromise 成功表示请求完成。好友列表应以 `onFriendDeleted` 事件或重新查询结果为准;完整监听见[查询好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。\n\n删除好友不会自动删除会话、历史消息或加入黑名单。产品如需这些行为,应分别调用对应 API,并明确失败补偿顺序。删除前应由 UI 二次确认,避免误操作。", + "description": "解除与指定用户的好友关系。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friends/delete-friend", + "title": "删除好友" + }, + "/sdk/uniapp/user/friend-applications/add-friend": { + "body": "使用 `addFriend()` 向目标用户发起申请。目标用户、验证文案和可选扩展数据通过 `OpenIMAddFriendParams` 传入。\n\n```uts\nimport { addFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait addFriend({\n toUserID: 'user_b',\n reqMsg: '你好,我是 Alice',\n ex: '',\n})\n```\n\n`reqMsg` 会展示给接收方,不应包含 Token、内部权限信息或其他敏感数据。`ex` 只存放双方约定且可安全公开给申请接收者的扩展字符串。\n\nPromise 成功不等于已经成为好友;接收方仍可能接受或拒绝。申请方可通过[查询发出的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant)刷新状态。", + "description": "向指定用户发送好友申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/add-friend", + "title": "发起好友申请" + }, + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": { + "body": "`getFriendApplicationListAsRecipient()` 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。\n\n```uts\nimport {\n getFriendApplicationListAsRecipient,\n off,\n onFriendApplicationAccepted,\n onFriendApplicationAdded,\n onFriendApplicationDeleted,\n onFriendApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onFriendApplicationAdded((item) => upsertApplication(item))\nconst subscriptions : Array = [\n addedSubscription,\n onFriendApplicationAccepted((item) => upsertApplication(item)),\n onFriendApplicationRejected((item) => upsertApplication(item)),\n onFriendApplicationDeleted((item) => removeApplication(item)),\n]\n\nconst page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 })\nreplaceReceivedApplications(page?.applications ?? [])\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n参数可省略;显式分页时 `offset` 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。", + "description": "分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "title": "查询收到的好友申请" + }, + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": { + "body": "`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。\n\n```uts\nimport { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentApplications(result?.applications ?? [])\n```\n\n参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。\n\n申请状态变化事件统一在[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。", + "description": "分页读取当前账号发出的好友申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "title": "查询发出的好友申请" + }, + "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count": { + "body": "`getFriendApplicationUnhandledCount()` 返回未处理好友申请数量,结果可能为 `null`。\n\n```uts\nimport { getFriendApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk'\n\nconst count = await getFriendApplicationUnhandledCount({ offset: 0, count: 100 })\nrenderApplicationBadge(count ?? 0)\n```\n\n分页参数用于限制本次统计查询范围,实际产品应使用与服务端约定一致的 `count`。不要把 `null` 永久缓存成 0;它也可能表示当前没有有效结果。\n\n申请新增、接受、拒绝或删除时重新查询数量,避免在多个设备和断线恢复场景下只做本地 `+1/-1` 而漂移。", + "description": "查询好友申请入口的未处理数量。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "title": "查询未处理好友申请数" + }, + "/sdk/uniapp/user/friend-applications/accept-friend-application": { + "body": "`acceptFriendApplication()` 接受目标用户的申请,并可附带处理说明。\n\n```uts\nimport { acceptFriendApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait acceptFriendApplication({\n toUserID: 'user_b',\n handleMsg: '已通过',\n})\n```\n\n这里的 `toUserID` 是申请对方的用户 ID。Promise 成功后,申请状态和好友列表分别由申请事件、好友新增事件或重新查询确认;不要只在一个列表中更新。\n\n重复处理可能由服务端返回状态错误,UI 应在请求期间禁用重复操作,并在失败后重新查询申请详情。", + "description": "接受指定用户发来的好友申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "title": "接受好友申请" + }, + "/sdk/uniapp/user/friend-applications/refuse-friend-application": { + "body": "`refuseFriendApplication()` 拒绝目标用户的申请。\n\n```uts\nimport { refuseFriendApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait refuseFriendApplication({\n toUserID: 'user_b',\n handleMsg: '暂不添加',\n})\n```\n\n处理说明可能对申请方可见,不应包含内部风控原因或敏感信息。Promise 成功后,以 `onFriendApplicationRejected` 或重新查询结果更新状态。\n\n接受与拒绝互斥。请求开始后锁定该申请项,避免用户快速点击造成并行请求。", + "description": "拒绝指定用户发来的好友申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "title": "拒绝好友申请" + }, + "/sdk/uniapp/user/friend-applications/delete-friend-requests": { + "body": "`deleteFriendRequests()` 商业版 批量删除明确指定的好友申请记录。\n\n```uts\nimport { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteFriendRequests({\n friendRequests: [\n { fromUserID: 'user_a', toUserID: 'user_b' },\n ],\n})\n```\n\n`friendRequests` 中每项使用 `OpenIMSimpleFriendRequest` 的 `fromUserID` 与 `toUserID` 精确定位。删除申请记录不会自动解除已经建立的好友关系。\n\nPromise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。", + "description": "商业版批量删除指定好友申请记录。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "title": "删除好友申请记录" + }, + "/sdk/uniapp/user/blacklist/get-black-list": { + "body": "公共入口 `getBlackList()` 返回 `OpenIMBlackListResult | null`。本页同时归属 `onBlackAdded` 与 `onBlackDeleted`。\n\n```uts\nimport {\n getBlackList,\n off,\n onBlackAdded,\n onBlackDeleted,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst blackAddedSubscription = onBlackAdded((user) => upsertBlackUser(user))\nconst blackDeletedSubscription = onBlackDeleted((user) => removeBlackUser(user.userID))\n\nconst result = await getBlackList()\nreplaceBlackList(result?.blackUsers ?? [])\n\noff(blackAddedSubscription)\noff(blackDeletedSubscription)\n```\n\n商业版还提供 `getBlacks()` 商业版,返回包装字段名为 `blacks`:\n\n```uts\nimport { getBlacks } from '@/uni_modules/unix-openim-sdk'\n\nconst commercialResult = await getBlacks()\nreplaceBlackList(commercialResult?.blacks ?? [])\n```\n\n两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。", + "description": "查询黑名单快照,并处理加入与移除黑名单事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/blacklist/get-black-list", + "title": "查询黑名单" + }, + "/sdk/uniapp/user/blacklist/add-black": { + "body": "`addBlack()` 把目标用户加入黑名单,可附带双方约定的扩展字符串。\n\n```uts\nimport { addBlack } from '@/uni_modules/unix-openim-sdk'\n\nawait addBlack({ toUserID: 'user_b', ex: '' })\n```\n\nPromise 成功后,以 `onBlackAdded` 或重新查询黑名单确认最终状态。不要在 `ex` 中写入 Token、内部封禁证据或仅管理员可见的数据。\n\n加入黑名单不会自动删除本地历史消息。产品如需隐藏会话或解除好友,应作为独立操作并设计失败补偿。", + "description": "把指定用户加入当前账号的黑名单。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/blacklist/add-black", + "title": "加入黑名单" + }, + "/sdk/uniapp/user/blacklist/remove-black": { + "body": "`removeBlack()` 按用户 ID 移除黑名单关系。\n\n```uts\nimport { removeBlack } from '@/uni_modules/unix-openim-sdk'\n\nawait removeBlack('user_b')\n```\n\nPromise 成功后,以 `onBlackDeleted` 或重新查询结果更新 UI。移出黑名单不会自动恢复已删除的好友关系,也不会重新创建被隐藏或删除的会话。\n\n重复移除可能返回关系状态错误。操作失败时刷新黑名单快照,不要无限重试。", + "description": "把指定用户从当前账号的黑名单移除。", + "headings": [], + "sourcePath": "/sdk/uniapp/user/blacklist/remove-black", + "title": "移出黑名单" + }, + "/sdk/uniapp/conversation/overview-conversation": { + "body": "会话是单聊、群聊或其他消息流的本地索引。`conversationID` 是稳定主键;单聊同时有 `userID`,群聊同时有 `groupID`。界面标题、头像和最新消息都是可变快照,不能替代主键。\n\n`OpenIMConversationItem` 包含 `conversationType`、`showName`、`faceURL`、`unreadCount`、`latestMsg`、草稿、置顶、接收选项和消息序列边界。`latestMsg` 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。\n\n## 建议数据流\n\n1. 注册 `onNewConversation` 与 `onConversationChanged`。\n2. 查询完整或分页会话快照。\n3. 按 `conversationID` 幂等插入或替换事件项。\n4. 按 `isPinned`、时间和业务排序规则展示。\n5. App 恢复或重新登录时重新查询,不仅依赖事件。\n\n会话未读数和消息已读是相关但不同的状态。清零会话未读见[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read),总未读见[获取总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。\n\n商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。", + "description": "理解会话快照、增量事件、未读数、草稿和会话分组。", + "headings": [ + { + "depth": 2, + "title": "建议数据流", + "url": "#建议数据流" + } + ], + "sourcePath": "/sdk/uniapp/conversation/overview-conversation", + "title": "会话概览" + }, + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target": { + "body": "`getOneConversation()` 使用目标 ID 和 `OpenIMSessionType` 查询单个会话,返回 `OpenIMConversationItem | null`。\n\n```uts\nimport {\n OpenIMSessionTypeSingle,\n getOneConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst conversation = await getOneConversation({\n sourceID: 'user_b',\n sessionType: OpenIMSessionTypeSingle,\n})\n```\n\n单聊的 `sourceID` 是对方 `userID`,群聊是 `groupID`。使用插件导出的会话类型常量,不直接写数字。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。\n\n返回值按 `conversationID` 合并到 store,不要用 `sourceID` 直接覆盖其他会话类型。", + "description": "按目标 ID 和会话类型查询一个会话。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "title": "按目标查询会话" + }, + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id": { + "body": "`getConversationIDBySessionType()` 返回 Core 使用的规范 `conversationID`,适合在尚未生成会话项时构造路由键。\n\n```uts\nimport {\n OpenIMSessionTypeGroup,\n getConversationIDBySessionType,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst conversationID = await getConversationIDBySessionType({\n sourceID: 'group_123',\n sessionType: OpenIMSessionTypeGroup,\n})\n```\n\n不要自行拼接单聊或群聊会话 ID;不同会话类型有各自规则。返回 ID 不代表会话已存在,也不创建服务器数据。需要会话内容时继续调用[按目标查询会话](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target)或列表查询。", + "description": "根据目标 ID 和会话类型取得规范 conversationID。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "title": "生成会话 ID" + }, + "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id": { + "body": "`getMultipleConversation()` 批量查询会话,返回 `OpenIMConversationListResult | null`。\n\n```uts\nimport { getMultipleConversation } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getMultipleConversation(['si_user_a_user_b', 'sg_group_123'])\nconst conversations = result?.conversations ?? []\n```\n\n结果不保证与输入顺序一致,也可能缺少本地不存在的会话。按 `conversationID` 建立映射。大量 ID 应分批查询,避免一次传入无界数组。\n\n本方法只读取快照,不订阅变化。持续更新仍由[查询会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)归属的事件处理。", + "description": "按 conversationID 列表批量读取会话快照。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "title": "批量查询会话" + }, + "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list": { + "body": "`getAllConversationList()` 返回完整本地会话快照;列表较大时使用 `getConversationListSplit()` 分页。本页归属 `onNewConversation` 和 `onConversationChanged`。\n\n```uts\nimport {\n getConversationListSplit,\n off,\n onConversationChanged,\n onNewConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newConversationSubscription = onNewConversation((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\nconst changedSubscription = onConversationChanged((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\n\nconst firstPage = await getConversationListSplit({ offset: 0, count: 100 })\nreplaceConversationSnapshot(firstPage?.conversations ?? [])\n\noff(newConversationSubscription)\noff(changedSubscription)\n```\n\n分页时继续增加 `offset`,直到返回数量少于 `count`。查询与事件可能包含相同会话,必须按 `conversationID` 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。\n\n不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。", + "description": "查询完整或分页会话快照,并处理新增与变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "查询会话列表" + }, + "/sdk/uniapp/conversation/retrieving-conversations/search-conversations": { + "body": "`searchConversation()` 使用字符串关键词搜索本地会话,返回 `OpenIMConversationListResult | null`。\n\n```uts\nimport { searchConversation } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchConversation('Alice')\nrenderSearchResults(result?.conversations ?? [])\n```\n\n调用前去除首尾空白,并在输入为空时由 UI 直接展示正常会话列表。搜索结果是查询时快照;会话变化后可重新搜索,或按 `conversationID` 合并最新事件项。\n\n匹配范围由 Core 决定,不要承诺搜索所有消息正文。消息内容搜索使用消息领域的查询 API。", + "description": "按关键词搜索本地会话。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "title": "搜索会话" + }, + "/sdk/uniapp/conversation/managing-conversations/pin-conversation": { + "body": "`setConversation()` 是会话字段的统一更新入口。置顶时只传 `conversationID` 和 `isPinned`。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, isPinned: true })\n// 取消置顶:isPinned: false\n```\n\nPromise 成功后以 `onConversationChanged` 更新最终会话,不要直接假定本地排序已稳定。未提供的字段保持原值;不要为了置顶而复制并回写整条会话。", + "description": "通过 setConversation 修改会话置顶状态。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "title": "置顶或取消置顶会话" + }, + "/sdk/uniapp/conversation/managing-conversations/mark-conversation": { + "body": "会话“标记”属于商业版能力,通常与会话分组中的标记组配合使用。锁定的 UTS 合同没有独立 `markConversation` 操作,也没有在 `OpenIMSetConversationParams` 中暴露 `isMarked`。\n\n因此客户端不能通过 `ex` 或其他字段伪造标记。需要修改时应使用商业版业务后端或已确认的上层服务;随后通过[查询会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[会话分组](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)刷新结果。\n\n没有真实写入 API 时,UI 应隐藏或禁用入口,而不是只改本地状态。", + "description": "说明商业版标记会话能力在当前 UTS 合同中的边界。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "title": "标记会话" + }, + "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark": { + "body": "会话备注属于商业版扩展。当前 `OpenIMConversationItem` 和 `OpenIMSetConversationParams` 没有独立 `remark` 字段,因此本版本插件不能安全写入该能力。\n\n不要把备注编码进 `ex` 冒充标准字段。需要使用时,由商业版业务 API维护,并以业务侧返回作为权威;客户端可在会话 UI 中合并展示。\n\n后续合同若正式增加字段,本页会随 interface/schema 哈希变化重新审核。在此之前,公共和商业客户端都不应调用不存在的 setter。", + "description": "说明商业版会话备注字段的读取与写入边界。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "title": "设置会话备注" + }, + "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension": { + "body": "通过 `setConversation()` 的 `ex` 更新会话扩展字符串。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({\n conversationID,\n ex: JSON.stringify({ color: 'blue' }),\n})\n```\n\n`ex` 是整段替换,不是局部 merge。修改前先读取现值并按业务 schema 合并,避免覆盖其他模块字段。不要存 Token、密钥或仅服务端可见数据。\n\nPromise 成功后以 `onConversationChanged` 或重新查询确认。解析旧版本或未知字段失败时保留原字符串并降级展示。", + "description": "通过 setConversation 更新会话 ex。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "title": "设置会话扩展字段" + }, + "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft": { + "body": "`setConversationDraft()` 保存会话草稿;传空字符串清除草稿。\n\n```uts\nimport { setConversationDraft } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationDraft({ conversationID, draftText: editorText })\n```\n\n草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。\n\n会话项中的 `draftText` 和 `draftTextTime` 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。", + "description": "保存或清空指定会话的本地草稿文本。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "title": "保存会话草稿" + }, + "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option": { + "body": "`recvMsgOpt` 控制单个会话的消息接收策略,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, recvMsgOpt: 1 })\n```\n\n具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。\n\n更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。", + "description": "通过 setConversation 修改单个会话的 recvMsgOpt。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "title": "设置会话消息接收选项" + }, + "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions": { + "body": "群会话中的 @ 提及提示由 `groupAtType` 表示。处理完提及后,通过 `setConversation()` 把它重置为无提及状态。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, groupAtType: 0 })\n```\n\n使用合同/服务端定义的“无提及”值。该调用只修改会话提示状态,不删除 @ 消息,也不清理未读数。需要标记已读时另调用[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)。", + "description": "通过 setConversation 清除群会话的 groupAtType。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "title": "清除群聊提及状态" + }, + "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read": { + "body": "`markConversationMessageAsRead()` 把指定会话标为已读。本页同时归属单聊已读回执 `onRecvC2CReadReceipt`。\n\n```uts\nimport {\n markConversationMessageAsRead,\n off,\n onRecvC2CReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvC2CReadReceipt((result) => {\n result.receipts.forEach((receipt) => mergeReadReceipt(receipt))\n})\n\nawait markConversationMessageAsRead(conversationID)\noff(receiptSubscription)\n```\n\n商业版还提供 `resetConversationUnread()` 商业版,可把多个会话的未读数重置为指定值:\n\n```uts\nimport { resetConversationUnread } from '@/uni_modules/unix-openim-sdk'\n\nawait resetConversationUnread({ conversationIDs: [conversationID], num: 0 })\n```\n\n本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。", + "description": "清理会话未读数,并处理单聊已读回执事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "title": "标记会话已读" + }, + "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read": { + "body": "`markAllConversationMessageAsRead()` 标记当前账号的全部会话已读。\n\n```uts\nimport { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk'\n\nawait markAllConversationMessageAsRead()\n```\n\n这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。\n\n该调用不会删除消息,也不会修改单个会话的消息接收选项。", + "description": "清零当前账号的全部会话未读数。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "title": "标记全部会话已读" + }, + "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count": { + "body": "`getTotalUnreadMsgCount()` 返回当前账号总未读快照;`onTotalUnreadMessageCountChanged` 持续推送新值。\n\n```uts\nimport {\n getTotalUnreadMsgCount,\n off,\n onTotalUnreadMessageCountChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst unreadSubscription = onTotalUnreadMessageCountChanged((count) => {\n setTotalUnread(count)\n})\n\nsetTotalUnread((await getTotalUnreadMsgCount()) ?? 0)\noff(unreadSubscription)\n```\n\n先订阅再查询,事件和快照都直接替换总数,不做本地 `+1/-1`。把结果用于 TabBar 与[应用角标](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)时,仍要考虑系统通知权限。", + "description": "查询总未读快照,并订阅总未读变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "title": "获取总未读数" + }, + "/sdk/uniapp/conversation/managing-conversations/set-private-chat": { + "body": "`isPrivateChat` 商业版 通过公共的 `setConversation()` 字段写入。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, isPrivateChat: true })\n```\n\n只传本次字段。私聊模式的消息展示、截屏或销毁规则由商业版服务端和客户端产品共同定义;仅设置布尔值不会自动实现所有 UI 安全策略。\n\n最终状态以会话变化事件中的 `isPrivateChat` 为准。", + "description": "商业版通过 setConversation 开启或关闭会话私聊模式。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "title": "设置私聊模式" + }, + "/sdk/uniapp/conversation/managing-conversations/set-burn-duration": { + "body": "`burnDuration` 商业版 表示阅后即焚时长,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, burnDuration: 30 })\n```\n\n时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。\n\n关闭能力时使用产品约定的关闭值,并重新查询会话确认。", + "description": "商业版设置会话的 burnDuration。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "title": "设置阅后即焚时长" + }, + "/sdk/uniapp/conversation/managing-conversations/set-message-destruct": { + "body": "`OpenIMConversationItem` 包含 `isMsgDestruct` 与 `msgDestructTime` 商业版 状态,但当前 `OpenIMSetConversationParams` 没有这两个写入字段。\n\n因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。\n\n客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。", + "description": "说明商业版会话消息销毁字段的当前写入边界。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "title": "设置消息销毁" + }, + "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation": { + "body": "`hideConversation()` 从会话列表隐藏指定会话。\n\n```uts\nimport { hideConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait hideConversation(conversationID)\n```\n\n隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。\n\n完成后通过会话事件或重新查询移除本地项,不只操作页面数组。", + "description": "从当前会话列表隐藏一个会话而不删除消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "title": "隐藏会话" + }, + "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations": { + "body": "`hideAllConversations()` 隐藏当前账号的全部会话。\n\n```uts\nimport { hideAllConversations } from '@/uni_modules/unix-openim-sdk'\n\nawait hideAllConversations()\n```\n\n这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。", + "description": "隐藏当前账号的全部会话但保留消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话" + }, + "/sdk/uniapp/conversation/managing-conversations/delete-conversation": { + "body": "`deleteConversation()` 删除指定会话项。\n\n```uts\nimport { deleteConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteConversation(conversationID)\n```\n\n该入口与“删除会话并删除全部消息”不同。需要保留本地历史时使用本方法;收到新消息后会话可能再次出现。完成后重新查询或按事件更新会话 store。", + "description": "删除会话索引并保留其消息数据。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "title": "删除会话" + }, + "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages": { + "body": "`deleteConversationAndDeleteAllMsg()` 删除会话及其全部消息。\n\n```uts\nimport { deleteConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteConversationAndDeleteAllMsg(conversationID)\n```\n\n这是不可轻易恢复的操作,调用前必须确认。它不同于隐藏会话,也不同于只清理消息但保留会话。执行期间停止该会话的分页请求,成功后清空对应消息 store 并刷新会话列表。", + "description": "删除指定会话并清理其全部本地消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "title": "删除会话及全部消息" + }, + "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages": { + "body": "`clearConversationAndDeleteAllMsg()` 清空指定会话的消息,但保留会话入口。\n\n```uts\nimport { clearConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk'\n\nawait clearConversationAndDeleteAllMsg(conversationID)\n```\n\n调用前二次确认,并停止正在进行的历史分页。成功后清空消息 store,再重新查询会话,使用 Core 返回的最新消息、序列与未读状态。\n\n如果连会话也要删除,使用[删除会话及全部消息](/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages)。", + "description": "清理指定会话的全部消息并保留会话项。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "title": "清空会话消息" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": { + "body": "会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。\n\n`OpenIMConversationGroupItem` 的字段均可选。读取 `conversationGroupID` 后再作为主键;`conversationIDs` 可能为 `null`,完整成员应以分页查询为准。\n\n五个分组事件返回 opaque JSON 字符串,不是类型化对象:\n\n```uts\nimport {\n off,\n onConversationGroupAdded,\n onConversationGroupChanged,\n onConversationGroupDeleted,\n onConversationGroupMemberAdded,\n onConversationGroupMemberDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction refreshFromRawGroupEvent(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationGroups()\n } catch (_) {\n console.error('Invalid conversation group event payload')\n }\n}\n\nconst addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent)\nconst subscriptions : Array = [\n addedSubscription,\n onConversationGroupChanged(refreshFromRawGroupEvent),\n onConversationGroupDeleted(refreshFromRawGroupEvent),\n onConversationGroupMemberAdded(refreshFromRawGroupEvent),\n onConversationGroupMemberDeleted(refreshFromRawGroupEvent),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。", + "description": "商业版会话分组模型、raw 事件解析和生命周期。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "会话分组概览" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": { + "body": "`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。\n\n```uts\nimport { createConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await createConversationGroup({\n name: '重要会话',\n order: 100,\n conversationGroupType: 0,\n conversationID: conversationID,\n ex: '',\n})\n\nconst group = result?.conversationGroup\n```\n\n分组类型使用插件导出的合同值。`conversationID` 可省略;`ex` 是整段业务扩展。返回分组可能为 `null`,最终列表以分组事件或重新查询为准。", + "description": "商业版创建自定义会话分组。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "title": "创建会话分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups": { + "body": "`getConversationGroups()` 商业版 按 `conversationGroupType` 查询分组。\n\n```uts\nimport { getConversationGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroups({ conversationGroupType: 0 })\nconst groups = result?.conversationGroups ?? []\n```\n\n按非空 `conversationGroupID` 去重并排序。分组项中的 `conversationIDs` 可能只是当前快照;需要成员和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。", + "description": "商业版按分组查询类型读取会话分组快照。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "title": "查询会话分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": { + "body": "`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。\n\n```uts\nimport { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupInfoWithConversations({\n conversationGroupID: groupID,\n pagination: { pageNumber: 1, showNumber: 100 },\n})\n```\n\n`pageNumber` 从服务端约定的第一页开始,本合同示例使用 1;`showNumber` 是页大小。返回字段 `ConversationTotal` 首字母大写,应按真实字段名读取。会话按 `conversationID` 去重,分组为 `null` 时不要继续分页。", + "description": "商业版分页读取一个会话分组及其成员会话。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "查询分组及会话" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id": { + "body": "`getConversationGroupByConversationID()` 商业版 返回指定会话所属的全部分组。\n\n```uts\nimport { getConversationGroupByConversationID } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupByConversationID({ conversationID })\nconst groups = result?.conversationGroups ?? []\n```\n\n一个会话可以属于多个分组,不能只读取第一项。按 `conversationGroupID` 去重;空数组表示当前没有所属分组,不是查询失败。", + "description": "商业版按 conversationID 查询其所属会话分组。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "title": "查询会话所属分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": { + "body": "`updateConversationGroup()` 商业版 只更新提供的字段。\n\n```uts\nimport { updateConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await updateConversationGroup({\n conversationGroupID: groupID,\n name: '重点跟进',\n hidden: false,\n})\n```\n\n`name`、`ex` 和 `hidden` 都可选。`ex` 是整段替换,先合并已有业务字段。返回 `conversationGroup` 可能为空,最终状态以事件或重新查询为准。", + "description": "商业版更新分组名称、扩展字段或隐藏状态。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "title": "更新会话分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order": { + "body": "`setConversationGroupOrder()` 商业版 批量提交分组 ID 与顺序值。\n\n```uts\nimport { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationGroupOrder({\n conversationGroupOrders: [\n { conversationGroupID: 'group_a', order: 100 },\n { conversationGroupID: 'group_b', order: 200 },\n ],\n})\n```\n\n拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。", + "description": "商业版批量更新会话分组排序值。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "设置会话分组顺序" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups": { + "body": "`addConversationsToGroups()` 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。\n\n```uts\nimport { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait addConversationsToGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。", + "description": "商业版把多个会话加入一个或多个分组。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "把会话加入分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups": { + "body": "`removeConversationsFromGroups()` 商业版 使用与加入相同的成员参数。\n\n```uts\nimport { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait removeConversationsFromGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。", + "description": "商业版从一个或多个分组移除多个会话。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "把会话移出分组" + }, + "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group": { + "body": "`deleteConversationGroup()` 商业版 删除一个分组。\n\n```uts\nimport { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteConversationGroup({ conversationGroupID: groupID })\n```\n\n删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。", + "description": "商业版删除指定会话分组。", + "headings": [], + "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "title": "删除会话分组" + }, + "/sdk/uniapp/group/overview-group": { + "body": "群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。\n\n```uts\nimport {\n off,\n onGroupDismissed,\n onGroupInfoChanged,\n onJoinedGroupAdded,\n onJoinedGroupDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group))\nconst subscriptions : Array = [\n infoSubscription,\n onGroupDismissed((group) => removeGroup(group.groupID)),\n onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)),\n onJoinedGroupDeleted((group) => removeGroup(group.groupID)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。\n\n`OpenIMGroupItem` 的 `attachedInfo` 以及 `displayIsRead`、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。", + "description": "理解群资料、成员、申请、权限和群组事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/overview-group", + "title": "群组概览" + }, + "/sdk/uniapp/group/create-group": { + "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n群类型、验证方式和其他 `OpenIMCreateGroupInfo` 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。", + "description": "创建群资料并设置初始成员与管理员。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/create-group", + "title": "创建群组" + }, + "/sdk/uniapp/group/update-group-profile": { + "body": "`setGroupInfo()` 只更新提供的可选字段。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: '新的群名',\n introduction: '项目协作群',\n faceURL: 'https://cdn.example.com/group.png',\n})\n```\n\n群主和管理员权限由服务端校验。Promise 成功后通过 `onGroupInfoChanged` 或重新查询刷新,不直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", + "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/update-group-profile", + "title": "更新群资料" + }, + "/sdk/uniapp/group/set-group-announcement": { + "body": "群公告使用 `setGroupInfo()` 的 `notification` 字段更新。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, notification: '周五 17:00 发布版本' })\n```\n\n只传公告字段,避免覆盖群名、头像或策略。公告可能触发群资料事件;以事件或重新查询确认 `notificationUpdateTime` 与 `notificationUserID`。\n\n公告会展示给群成员,不应包含 Token 或内部密钥。", + "description": "通过 setGroupInfo 更新群公告。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/set-group-announcement", + "title": "设置群公告" + }, + "/sdk/uniapp/group/set-group-extension": { + "body": "群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) })\n```\n\n`ex` 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。", + "description": "通过 setGroupInfo 更新群组 ex。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/set-group-extension", + "title": "设置群扩展字段" + }, + "/sdk/uniapp/group/set-group-join-verification": { + "body": "通过 `setGroupInfo()` 的 `needVerification` 更新入群验证策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, needVerification: 1 })\n```\n\n使用 `OpenIMGroupNeedVerification` 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。", + "description": "设置群成员加入时的验证策略。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/set-group-join-verification", + "title": "设置入群验证" + }, + "/sdk/uniapp/group/set-group-member-profile-access": { + "body": "通过 `setGroupInfo()` 的 `lookMemberInfo` 设置群成员资料可见策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, lookMemberInfo: 1 })\n```\n\n使用 `OpenIMGroupOption` 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。", + "description": "控制群成员是否可以查看其他成员资料。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/set-group-member-profile-access", + "title": "设置群成员资料可见性" + }, + "/sdk/uniapp/group/set-group-member-friend-permission": { + "body": "通过 `setGroupInfo()` 的 `applyMemberFriend` 更新群成员加好友策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, applyMemberFriend: 1 })\n```\n\n使用 `OpenIMGroupOption` 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。", + "description": "控制群成员之间是否可以发起好友申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/set-group-member-friend-permission", + "title": "设置群成员加好友权限" + }, + "/sdk/uniapp/group/change-group-mute": { + "body": "`changeGroupMute()` 修改群组全员禁言。\n\n```uts\nimport { changeGroupMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMute({ groupID, isMute: true })\n```\n\n权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。", + "description": "修改群组全员禁言状态。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/change-group-mute", + "title": "开启或关闭全员禁言" + }, + "/sdk/uniapp/group/join-group": { + "body": "`joinGroup()` 提交入群申请。\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n`joinSource` 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 `ex` 不包含敏感信息。", + "description": "向指定群发送加入申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/join-group", + "title": "申请加入群组" + }, + "/sdk/uniapp/group/quit-group": { + "body": "`quitGroup()` 让当前用户退出群组。\n\n```uts\nimport { quitGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait quitGroup(groupID)\n```\n\n群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。", + "description": "当前用户主动退出指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/quit-group", + "title": "退出群组" + }, + "/sdk/uniapp/group/dismiss-group": { + "body": "`dismissGroup()` 解散群组。\n\n```uts\nimport { dismissGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait dismissGroup(groupID)\n```\n\n这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。", + "description": "群主解散指定群组。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/dismiss-group", + "title": "解散群组" + }, + "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info": { + "body": "`getSpecifiedGroupsInfo()` 批量查询群资料。\n\n```uts\nimport { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupsInfo(['group_a', 'group_b'])\nconst groups = result?.groups ?? []\n```\n\n结果不保证与输入顺序一致,按 `groupID` 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。", + "description": "按 groupID 列表批量查询群资料。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "title": "查询指定群资料" + }, + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list": { + "body": "`getJoinedGroupList()` 返回当前账号已加入群组的完整本地快照。\n\n```uts\nimport { getJoinedGroupList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupList()\nreplaceJoinedGroups(result?.groups ?? [])\n```\n\n按 `groupID` 去重,并配合[群组概览](/sdk/uniapp/group/overview-group)的事件维护增量。群较多时改用分页入口。", + "description": "一次性读取当前账号已加入的群组快照。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "title": "查询已加入群组" + }, + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": { + "body": "`getJoinedGroupListPage()` 适合群数量较大的账号。\n\n```uts\nimport { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupListPage({ offset: 0, count: 100 })\nappendGroups(result?.groups ?? [])\n```\n\n`offset` 从 0 开始,直到返回数量小于 `count`。分页期间群事件可能改变列表,应按 `groupID` 去重,而不是依赖页内位置。\n\n`displayIsRead` 和部分禁言扩展字段商业版,缺失时按可选值处理。", + "description": "按 offset 和 count 分页读取已加入群组。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "title": "分页查询已加入群组" + }, + "/sdk/uniapp/group/retrieving-groups/is-join-group": { + "body": "`isJoinGroup()` 返回布尔值。\n\n```uts\nimport { isJoinGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst joined = await isJoinGroup(groupID)\n```\n\n该结果是查询时快照。群状态变化后用群事件或重新查询刷新,不把一次 `true` 永久缓存。未加入时可按群验证策略发起申请。", + "description": "判断当前账号是否属于指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "title": "检查是否已加入群组" + }, + "/sdk/uniapp/group/retrieving-groups/search-groups": { + "body": "`searchGroups()` 搜索当前可见的群资料。\n\n```uts\nimport { searchGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroups({\n keywordList: ['项目'],\n isSearchGroupID: true,\n isSearchGroupName: true,\n})\n```\n\n空关键词由 UI 拦截。结果按 `groupID` 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。", + "description": "按群 ID 或群名称搜索本地群组。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-groups/search-groups", + "title": "搜索已加入群组" + }, + "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient": { + "body": "`getGroupApplicationListAsRecipient()` 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。\n\n```uts\nimport {\n getGroupApplicationListAsRecipient,\n off,\n onGroupApplicationAccepted,\n onGroupApplicationAdded,\n onGroupApplicationDeleted,\n onGroupApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupApplicationAdded((item) => upsertGroupApplication(item))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupApplicationAccepted((item) => upsertGroupApplication(item)),\n onGroupApplicationRejected((item) => upsertGroupApplication(item)),\n onGroupApplicationDeleted((item) => removeGroupApplication(item)),\n]\n\nconst result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 })\nreplaceReceivedGroupApplications(result?.applications ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。", + "description": "分页查询待管理的入群申请,并处理申请事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "title": "查询收到的入群申请" + }, + "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": { + "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。", + "description": "分页查询当前账号发出的入群申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "title": "查询发出的入群申请" + }, + "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count": { + "body": "`getGroupApplicationUnhandledCount()` 返回数量或 `null`。\n\n```uts\nimport { getGroupApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk'\n\nconst count = await getGroupApplicationUnhandledCount({ offset: 0, count: 100 })\nsetGroupApplicationCount(count ?? 0)\n```\n\n多端处理会让本地增减漂移,申请事件到达后重新查询权威数量。", + "description": "查询群管理入口的未处理申请数量。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "title": "查询未处理入群申请数" + }, + "/sdk/uniapp/group/group-applications/observe-group-application-badge-count": { + "body": "`onGroupApplicationBadgeCountChanged` 商业版 直接提供新的角标数量。\n\n```uts\nimport {\n off,\n onGroupApplicationBadgeCountChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst badgeSubscription = onGroupApplicationBadgeCountChanged((count) => {\n setGroupApplicationCount(count)\n})\n\noff(badgeSubscription)\n```\n\n用事件值替换本地数量,不做 `+1/-1`。当前没有“清除群申请 badge”的 API;处理申请后通过查询和后续事件刷新,不能调用不存在的方法。", + "description": "商业版订阅群申请 badge 数量事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "title": "观察群申请角标变化" + }, + "/sdk/uniapp/group/group-applications/accept-group-application": { + "body": "`acceptGroupApplication()` 由有权限的群成员处理申请。\n\n```uts\nimport { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '已通过' })\n```\n\n成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。", + "description": "接受指定用户加入指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/accept-group-application", + "title": "接受入群申请" + }, + "/sdk/uniapp/group/group-applications/refuse-group-application": { + "body": "`refuseGroupApplication()` 使用与接受相同的定位字段。\n\n```uts\nimport { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait refuseGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '暂不通过' })\n```\n\n处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。", + "description": "拒绝指定用户加入指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/refuse-group-application", + "title": "拒绝入群申请" + }, + "/sdk/uniapp/group/group-applications/delete-group-requests": { + "body": "`deleteGroupRequests()` 商业版 删除明确指定的申请记录。\n\n```uts\nimport { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteGroupRequests({\n groupRequests: [{ groupID, fromUserID: 'user_b' }],\n})\n```\n\n使用 `OpenIMSimpleGroupRequest` 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。", + "description": "商业版批量删除指定入群申请。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/group-applications/delete-group-requests", + "title": "删除入群申请记录" + }, + "/sdk/uniapp/group/retrieving-group-members/get-group-member-list": { + "body": "`getGroupMemberList()` 按过滤条件分页读取成员。本页归属三个成员事件。\n\n```uts\nimport {\n getGroupMemberList,\n off,\n onGroupMemberAdded,\n onGroupMemberDeleted,\n onGroupMemberInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupMemberAdded((member) => upsertMember(member))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupMemberDeleted((member) => removeMember(member.groupID, member.userID)),\n onGroupMemberInfoChanged((member) => upsertMember(member)),\n]\n\nconst result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 })\nreplaceMembers(result?.members ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`filter` 使用服务端定义的成员过滤值。按 `groupID:userID` 去重;分页与事件并发时不要按数组位置更新。", + "description": "分页查询群成员,并处理成员新增、删除和资料变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "title": "查询群成员列表" + }, + "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info": { + "body": "`getSpecifiedGroupMembersInfo()` 批量查询群内用户。\n\n```uts\nimport { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupMembersInfo({\n groupID,\n userIDList: ['user_a', 'user_b'],\n})\n```\n\n结果可能少于输入,按 `userID` 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。", + "description": "按用户 ID 列表批量读取指定群成员。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "title": "查询指定群成员资料" + }, + "/sdk/uniapp/group/retrieving-group-members/get-users-in-group": { + "body": "`getUsersInGroup()` 判断一批用户中哪些属于指定群,返回 `string[] | null`。\n\n```uts\nimport { getUsersInGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst members = await getUsersInGroup({ groupID, userIDList: candidateUserIDs })\n```\n\n结果是用户 ID,不含成员资料。需要群昵称和角色时再调用指定成员查询。输入去重,并把 `null` 与空数组分别作为“无有效结果”和“没有匹配成员”处理。", + "description": "从给定用户列表中返回属于指定群的用户 ID。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "title": "筛选群内用户" + }, + "/sdk/uniapp/group/retrieving-group-members/search-group-members": { + "body": "`searchGroupMembers()` 在指定群内搜索。\n\n```uts\nimport { searchGroupMembers } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroupMembers({\n groupID,\n keywordList: ['Alice'],\n isSearchUserID: true,\n isSearchMemberNickname: true,\n})\n```\n\n空关键词由 UI 拦截。结果按 `groupID:userID` 去重;它不是全局用户搜索。", + "description": "按用户 ID 或群昵称搜索群成员。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "title": "搜索群成员" + }, + "/sdk/uniapp/group/managing-group-members/invite-user-to-group": { + "body": "`inviteUserToGroup()` 提交用户列表和邀请原因。\n\n```uts\nimport { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait inviteUserToGroup({\n groupID,\n reason: '加入项目讨论',\n userIDList: ['user_b', 'user_c'],\n})\n```\n\n用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。", + "description": "邀请一个或多个用户加入指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "title": "邀请用户入群" + }, + "/sdk/uniapp/group/managing-group-members/kick-group-member": { + "body": "`kickGroupMember()` 使用 `OpenIMGroupInviteParams` 相同结构定位成员和填写原因。\n\n```uts\nimport { kickGroupMember } from '@/uni_modules/unix-openim-sdk'\n\nawait kickGroupMember({ groupID, reason: '成员调整', userIDList: ['user_b'] })\n```\n\n这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。", + "description": "把一个或多个成员移出指定群。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "title": "移除群成员" + }, + "/sdk/uniapp/group/managing-group-members/set-group-member-nickname": { + "body": "`setGroupMemberInfo()` 是成员资料统一更新入口。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', nickname: '项目负责人' })\n```\n\n群昵称不同于用户全局昵称。只传本次字段,最终资料以 `onGroupMemberInfoChanged` 为准。", + "description": "更新成员在指定群内的昵称。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "title": "设置群成员昵称" + }, + "/sdk/uniapp/group/managing-group-members/set-group-member-role-level": { + "body": "通过 `roleLevel` 更新群主、管理员或普通成员角色。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 })\n```\n\n使用 `OpenIMGroupMemberRoleLevel` 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。", + "description": "通过 setGroupMemberInfo 更新成员角色等级。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "title": "设置群成员角色" + }, + "/sdk/uniapp/group/managing-group-members/set-group-member-avatar": { + "body": "通过 `faceURL` 更新群成员资料中的头像。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL })\n```\n\n先把本地图片上传到业务可访问的 HTTPS 地址。不要传 `unifile://` 或本地沙盒路径作为远端头像 URL。", + "description": "通过 setGroupMemberInfo 更新成员在群内的头像。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "title": "设置群成员头像" + }, + "/sdk/uniapp/group/managing-group-members/set-group-member-extension": { + "body": "成员 `ex` 是整段业务扩展字符串。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) })\n```\n\n修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。", + "description": "通过 setGroupMemberInfo 更新成员 ex。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "title": "设置群成员扩展字段" + }, + "/sdk/uniapp/group/managing-group-members/transfer-group-owner": { + "body": "`transferGroupOwner()` 是不可轻易撤销的高风险操作。\n\n```uts\nimport { transferGroupOwner } from '@/uni_modules/unix-openim-sdk'\n\nawait transferGroupOwner({ groupID, newOwnerUserID: 'user_b' })\n```\n\n目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。", + "description": "把群主权限转让给指定成员。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "title": "转让群主" + }, + "/sdk/uniapp/group/managing-group-members/change-group-member-mute": { + "body": "`changeGroupMemberMute()` 使用 `mutedSeconds` 设置禁言时长。\n\n```uts\nimport { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 3600 })\n```\n\n解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。", + "description": "按秒设置指定群成员的禁言时长。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "title": "设置成员禁言" + }, + "/sdk/uniapp/group/check-full-sync-state": { + "body": "两个检查接口属于商业版,用于诊断本地数据是否已经完成全量同步。\n\n```uts\nimport {\n checkGroupMemberFullSync,\n checkLocalGroupFullSync,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst groups = await checkLocalGroupFullSync()\nconst members = await checkGroupMemberFullSync({ groupID })\n\nif (groups?.IsFullSync == true && members?.IsFullSync == true) {\n enableCompleteGroupManagement()\n}\n```\n\n返回字段真实名称是 `IsFullSync`。`null` 或字段缺失不能当作 `true`。这些方法只检查状态,不触发同步;未完成时继续观察 SDK 同步事件或稍后查询,避免高频轮询。", + "description": "商业版检查群列表或指定群成员是否完成全量同步。", + "headings": [], + "sourcePath": "/sdk/uniapp/group/check-full-sync-state", + "title": "检查群组 full-sync 状态" + }, + "/sdk/uniapp/message/overview-message": { + "body": "OpenIM 消息以 `clientMsgID` 作为客户端稳定标识,服务端消息还包含 `serverMsgID`、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表。\n\n创建消息只生成 `OpenIMMessageItem`,不会发送;随后调用 `sendMessage()` 指定 `recvID` 或 `groupID`。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。", + "description": "理解消息创建、发送、接收、历史、状态和进度事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/overview-message", + "title": "消息概览" + }, + "/sdk/uniapp/message/creating-messages/create-text-message": { + "body": "`createTextMessage()` 返回 `OpenIMMessageItem | null`,不发送消息。\n\n```uts\nimport { createTextMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextMessage('你好,OpenIMSDK')\nif (message == null) throw new Error('Failed to create text message')\n```\n\n文本应先按产品限制校验长度。创建成功后把消息传给[发送消息](/sdk/uniapp/message/sending-messages/send-message);不要手工拼 `OpenIMMessageItem`。", + "description": "创建待发送的普通文本消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-message", + "title": "创建文本消息" + }, + "/sdk/uniapp/message/creating-messages/create-text-at-message": { + "body": "`createTextAtMessage()` 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@Alice 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }],\n quoteMessage: null,\n})\n```\n\n字段以 `OpenIMCreateTextAtMessageParams` 为准,用户列表和显示信息保持一致。商业版 `getAtAllTag()` 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。\n\n创建后仍需调用发送 API并填写目标群 ID。", + "description": "在群聊中创建带 @ 用户信息的文本消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "title": "创建 @ 文本消息" + }, + "/sdk/uniapp/message/creating-messages/create-custom-message": { + "body": "`createCustomMessage()` 用于双方已约定 schema 的业务载荷:\n\n```uts\nimport { createCustomMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCustomMessage({\n data: JSON.stringify({ orderID: 'order_123' }),\n extension: '',\n descriptionText: '订单卡片',\n})\n```\n\n`data`、`extension`、`descriptionText` 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。\n\n`createAdvancedTextMessage()` 使用 `OpenIMCreateAdvancedTextMessageParams` 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。", + "description": "创建业务自定义消息或带实体范围的高级文本。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-custom-message", + "title": "创建自定义或高级文本消息" + }, + "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path": { + "body": "公共入口 `createImageMessageFromFullPath()` 接收本地完整路径:\n\n```uts\nimport { createImageMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createImageMessageFromFullPath('/data/user/0/app/cache/photo.jpg')\n```\n\n商业版还提供结构化 `createImageMessage()` 商业版,参数可包含平台来源路径。两者都要求原生层有读取权限。\n\n`unifile://`、相册临时对象或 content URI 应先通过 uni 平台 API转成插件可读路径。文件不存在或权限不足时,不要进入发送阶段。", + "description": "使用原生可读的本地完整路径创建图片消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "title": "从完整路径创建图片消息" + }, + "/sdk/uniapp/message/creating-messages/create-image-message-by-url": { + "body": "`createImageMessageByURL()` 适合图片已由业务上传并取得可访问 URL 的场景。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createImageMessageByURL(pictureElem)\n```\n\n`OpenIMPictureElem` 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。", + "description": "使用已上传图片的 elem 信息创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "title": "从 URL 创建图片消息" + }, + "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path": { + "body": "公共入口 `createSoundMessageFromFullPath()` 接收 `soundPath` 与 `duration`:\n\n```uts\nimport { createSoundMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageFromFullPath({\n soundPath: '/data/user/0/app/cache/voice.m4a',\n duration: 8,\n})\n```\n\n商业版 `createSoundMessage()` 商业版 使用同一结构。时长单位以合同/服务端约定为准,并与真实媒体一致。录音完成、文件关闭且权限可读后再调用。", + "description": "使用本地音频路径和时长创建语音消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "title": "从完整路径创建语音消息" + }, + "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": { + "body": "`createSoundMessageByURL()` 接收完整 `OpenIMSoundElem`。\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL(soundElem)\n```\n\nURL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。", + "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "title": "从 URL 创建语音消息" + }, + "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path": { + "body": "公共入口 `createVideoMessageFromFullPath()` 使用 `OpenIMCreateVideoMessageParams`:\n\n```uts\nimport { createVideoMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageFromFullPath({\n videoPath: '/data/user/0/app/cache/video.mp4',\n videoType: 'mp4',\n duration: 12,\n snapshotPath: '/data/user/0/app/cache/video-cover.jpg',\n})\n```\n\n商业版 `createVideoMessage()` 商业版 还可使用来源路径字段。视频和封面都必须真实存在并可读;时长、类型与文件一致。", + "description": "使用视频、封面完整路径和媒体信息创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "title": "从完整路径创建视频消息" + }, + "/sdk/uniapp/message/creating-messages/create-video-message-by-url": { + "body": "`createVideoMessageByURL()` 接收 `OpenIMVideoElem`。\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL(videoElem)\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。", + "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "title": "从 URL 创建视频消息" + }, + "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path": { + "body": "公共入口 `createFileMessageFromFullPath()`:\n\n```uts\nimport { createFileMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageFromFullPath({\n filePath: '/data/user/0/app/cache/report.pdf',\n fileName: 'report.pdf',\n})\n```\n\n商业版 `createFileMessage()` 商业版 可携带来源路径。调用前校验存在性、大小、扩展名和权限;文件名只用于展示,不能作为路径拼接依据。", + "description": "使用本地文件完整路径和文件名创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "title": "从完整路径创建文件消息" + }, + "/sdk/uniapp/message/creating-messages/create-file-message-by-url": { + "body": "`createFileMessageByURL()` 接收 `OpenIMFileElem`。\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL(fileElem)\n```\n\n文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。", + "description": "使用已上传文件的 OpenIMFileElem 创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "title": "从 URL 创建文件消息" + }, + "/sdk/uniapp/message/creating-messages/create-card-message": { + "body": "`createCardMessage()` 接收 `OpenIMCardElem`。\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alice',\n faceURL: 'https://cdn.example.com/alice.png',\n ex: '',\n})\n```\n\n名片是发送时快照,接收方点击后应按 `userID` 查询最新资料。不要把名片字段当作可信身份认证。", + "description": "使用 OpenIMCardElem 创建用户名片消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-card-message", + "title": "创建名片消息" + }, + "/sdk/uniapp/message/creating-messages/create-location-message": { + "body": "`createLocationMessage()` 使用描述、经度和纬度。\n\n```uts\nimport { createLocationMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createLocationMessage({\n descriptionText: '会议室 A',\n longitude: 121.47,\n latitude: 31.23,\n})\n```\n\n调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。", + "description": "使用经纬度和描述创建位置消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-location-message", + "title": "创建位置消息" + }, + "/sdk/uniapp/message/creating-messages/create-face-message": { + "body": "`createFaceMessage()` 接收 `index` 与 `data`。\n\n```uts\nimport { createFaceMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFaceMessage({ index: 1, data: 'smile' })\n```\n\n发送与接收端必须共享表情包版本和索引约定。未知索引应显示降级占位,不让解析错误阻断消息列表。", + "description": "使用表情索引和业务数据创建消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-face-message", + "title": "创建表情消息" + }, + "/sdk/uniapp/message/creating-messages/create-quote-message": { + "body": "`createQuoteMessage()` 使用文本和被引用消息的 JSON 字符串:\n\n```uts\nimport { createQuoteMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createQuoteMessage({\n text: '同意',\n message: JSON.stringify(quotedMessage),\n})\n```\n\n`createAdvancedQuoteMessage()` 还支持高级文本实体。引用的是消息快照;原消息撤回或删除后,UI 应显示不可用提示而不是崩溃。序列化前使用插件返回的完整消息,不要只复制 `clientMsgID` 伪造引用对象。", + "description": "创建普通或高级引用消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-quote-message", + "title": "创建引用回复消息" + }, + "/sdk/uniapp/message/creating-messages/create-markdown-message": { + "body": "`createMarkdownMessage()` 商业版 使用 `OpenIMCreateMarkdownMessageParams`。\n\n```uts\nimport { createMarkdownMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createMarkdownMessage({ content: '**发布完成**' })\n```\n\n具体字段以锁定合同为准。接收端渲染 Markdown 前进行安全过滤,禁用危险 HTML、脚本和不受信任 URL;原始内容不是可信 HTML。", + "description": "商业版创建 Markdown 内容消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "title": "创建 Markdown 消息" + }, + "/sdk/uniapp/message/creating-messages/create-forward-message": { + "body": "`createForwardMessage()` 接收一条完整消息并创建转发对象。\n\n```uts\nimport { createForwardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst forward = await createForwardMessage(sourceMessage)\n```\n\n创建后仍需向新目标发送。转发前检查原内容、权限与隐私;本地扩展、发送状态等设备字段不应作为接收方权威数据。", + "description": "基于现有消息创建可发送的转发消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-forward-message", + "title": "创建逐条转发消息" + }, + "/sdk/uniapp/message/creating-messages/create-merger-message": { + "body": "`createMergerMessage()` 使用标题、摘要和原消息列表创建合并转发。\n\n```uts\nimport { createMergerMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst merger = await createMergerMessage({\n messageList: selectedMessages,\n title: '聊天记录',\n abstractList: ['Alice: 方案已确认'],\n})\n```\n\n摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。", + "description": "把多条消息合并为摘要与消息列表。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "创建合并转发消息" + }, + "/sdk/uniapp/message/sending-messages/send-message": { + "body": "`sendMessage()` 接收 `OpenIMSendMessageOptions`,Promise 直接返回最终 `OpenIMMessageItem`。\n\n```uts\nimport { sendMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst sent = await sendMessage({\n message,\n recvID: 'user_b',\n groupID: '',\n isOnlineOnly: false,\n})\nupsertMessage(sent.clientMsgID, sent)\n```\n\n单聊填 `recvID`、群聊填 `groupID`,另一个传空字符串。`offlinePushInfo` 可按产品推送策略提供;`isOnlineOnly` 为 true 时不按普通持久消息处理。\n\n发送进度按 `clientMsgID` 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 `clientMsgID` 的重复消息,除非产品明确要求。", + "description": "把已创建的消息发送给单聊用户或群组。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message", + "title": "发送消息" + }, + "/sdk/uniapp/message/sending-messages/send-message-not-oss": { + "body": "`sendMessageNotOss()` 与 `sendMessage()` 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sent = await sendMessageNotOss({ message, recvID, groupID })\n```\n\n只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 `sendMessage()`。", + "description": "发送已经准备好远端资源信息的消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "title": "发送非 OSS 消息" + }, + "/sdk/uniapp/message/receiving-messages/receive-messages": { + "body": "不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 `conversationID:clientMsgID` 去重。\n\n```uts\nimport {\n off,\n onRecvNewMessage,\n onRecvNewMessages,\n onRecvOfflineNewMessage,\n onRecvOfflineNewMessages,\n onRecvOnlineOnlyMessage,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newMessageSubscription = onRecvNewMessage((message) => mergeMessage(message))\nconst subscriptions : Array = [\n newMessageSubscription,\n onRecvOfflineNewMessage((message) => mergeMessage(message)),\n onRecvOnlineOnlyMessage((message) => mergeOnlineOnlyMessage(message)),\n onRecvNewMessages((result) => result.messages.forEach(mergeMessage)),\n onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。", + "description": "订阅单条、批量、离线和只在线消息事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-messages", + "title": "接收消息" + }, + "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages": { + "body": "这些事件返回 opaque 字符串。`onRecvCustomBusinessMessage` 属于公共接口;消息扩展新增、变化、删除和 KV 变化事件属于商业版。\n\n```uts\nimport {\n off,\n onMessageKvInfoChanged,\n onRecvCustomBusinessMessage,\n onRecvMessageExtensionsAdded,\n onRecvMessageExtensionsChanged,\n onRecvMessageExtensionsDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction handleRawPayload(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) routeValidatedBusinessEvent(value)\n } catch (_) {\n console.error('Invalid custom message event')\n }\n}\n\nconst customSubscription = onRecvCustomBusinessMessage(handleRawPayload)\nconst subscriptions : Array = [\n customSubscription,\n onRecvMessageExtensionsAdded(handleRawPayload),\n onRecvMessageExtensionsChanged(handleRawPayload),\n onRecvMessageExtensionsDeleted(handleRawPayload),\n onMessageKvInfoChanged(handleRawPayload),\n]\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n校验版本、事件类型和必填字段后再更新 store;未知事件安全忽略。日志不输出完整 payload。HarmonyOS 当前不支持这四个商业扩展事件,会返回 unsupported subscription。", + "description": "安全解析 raw JSON 字符串,并区分公共与商业版扩展事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "title": "接收自定义业务与消息扩展事件" + }, + "/sdk/uniapp/message/retrieving-messages/load-older-messages": { + "body": "公共入口 `getAdvancedHistoryMessageList()` 读取历史:\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: '',\n count: 50,\n})\n```\n\n第一页用空 `startClientMsgID`,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 `clientMsgID` 去重。\n\n商业版 `getHistoryMessageList()` 商业版 额外支持 `isReverse`、`viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", + "description": "按会话和 clientMsgID 游标读取历史消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "title": "加载历史消息" + }, + "/sdk/uniapp/message/retrieving-messages/find-messages-by-id": { + "body": "`findMessageList()` 接收查询数组,每项包含会话 ID 与消息 ID 列表。\n\n```uts\nimport { findMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await findMessageList([\n { conversationID, clientMsgIDList: ['msg_a', 'msg_b'] },\n])\n```\n\n返回 `OpenIMFindMessageResult`,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。", + "description": "在多个会话中按 clientMsgID 批量定位消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "title": "按 ID 查找消息" + }, + "/sdk/uniapp/message/retrieving-messages/load-message-context": { + "body": "`fetchSurroundingMessages()` 商业版 围绕完整锚点消息读取前后文。\n\n```uts\nimport { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await fetchSurroundingMessages({\n startMessage: targetMessage,\n viewType: 0,\n before: 20,\n after: 20,\n})\n```\n\n`viewType` 使用产品/合同定义值。结果与实时事件可能重复,按 `clientMsgID` 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。", + "description": "商业版围绕一条锚点消息读取前后文。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "title": "加载消息上下文" + }, + "/sdk/uniapp/message/searching-messages/search-messages": { + "body": "`searchLocalMessages()` 在 SDK 本地数据中搜索。\n\n```uts\nimport { searchLocalMessages } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['发布'],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 50,\n})\n```\n\n匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。", + "description": "按关键词、发送者、类型和时间范围搜索消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/searching-messages/search-messages", + "title": "搜索本地消息" + }, + "/sdk/uniapp/message/composing-messages/update-typing-status": { + "body": "公共入口 `changeInputStates()` 以会话和焦点状态上报输入状态。本页归属 `onConversationUserInputStatusChanged`。\n\n```uts\nimport {\n changeInputStates,\n off,\n onConversationUserInputStatusChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst inputSubscription = onConversationUserInputStatusChanged((status) => {\n updateConversationInputStatus(status)\n})\n\nawait changeInputStates({ conversationID, userID: peerUserID, focus: true })\noff(inputSubscription)\n```\n\n进入输入框上报 true,失焦或离开页面上报 false,并做节流。商业版兼容入口 `typingStatusUpdate()` 商业版 使用 `recvID` 和 `msgTip`;同一流程不要同时调用两个入口。", + "description": "上报会话输入焦点并处理输入状态变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/update-typing-status", + "title": "更新输入状态" + }, + "/sdk/uniapp/message/composing-messages/get-typing-status": { + "body": "`getInputStates()` 商业版 查询当前快照。\n\n```uts\nimport { getInputStates } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getInputStates({ conversationID, userID: peerUserID })\n```\n\n输入状态是短时提示,不持久化为业务事实。以事件更新 UI,并设置本地超时自动清除,避免断线后永久显示“正在输入”。", + "description": "商业版查询指定会话和用户的输入状态。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/get-typing-status", + "title": "查询输入状态" + }, + "/sdk/uniapp/message/composing-messages/check-speech-to-text": { + "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\n在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。", + "description": "商业版查询当前语音转写能力。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "title": "检查语音转文字能力" + }, + "/sdk/uniapp/message/composing-messages/transcribe-audio": { + "body": "`speechToText()` 商业版 使用文件名和音频数据。\n\n```uts\nimport { speechToText } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await speechToText({ filename: 'voice.m4a', data: audioBase64 })\n```\n\n先检查能力,限制音频大小和格式。`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。", + "description": "商业版提交音频文件名和数据进行语音转写。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "title": "将音频转为文字" + }, + "/sdk/uniapp/message/composing-messages/save-local-transcript": { + "body": "`setMessageLocalContent()` 商业版 把完整消息对象保存到指定会话的本地存储。\n\n```uts\nimport { setMessageLocalContent } from '@/uni_modules/unix-openim-sdk'\n\nawait setMessageLocalContent({ conversationID, message: updatedMessage })\n```\n\n先在原消息副本中合并转写字段,不覆盖 `clientMsgID`、路由和其他业务 elem。该修改是本地内容,不应假定同步到其他设备或服务端。", + "description": "商业版把更新后的消息内容保存到本地消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "title": "保存本地转写内容" + }, + "/sdk/uniapp/message/composing-messages/translate-text-and-messages": { + "body": "两个接口均属于商业版,Android 与 iOS 支持,HarmonyOS 当前返回 `platform-unsupported`。\n\n```uts\nimport {\n translateMessage,\n translateText,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst textResult = await translateText({\n content: 'Hello',\n sourceLanguageCode: 'en',\n targetLanguageCode: 'zh',\n})\n\nconst translatedMessage = await translateMessage({\n conversationID,\n clientMsgID,\n sourceLanguageCode: 'en',\n targetLanguageCode: 'zh',\n})\n```\n\n语言代码使用商业服务支持的标准。翻译内容可能包含隐私,应遵守服务端数据处理政策。原文始终保留,翻译失败或平台不支持时降级显示原文。", + "description": "商业版翻译文本或指定消息,并说明 HarmonyOS 不支持。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "title": "翻译文本和消息" + }, + "/sdk/uniapp/message/managing-messages/delete-local-message": { + "body": "`deleteMessageFromLocalStorage()` 删除本地消息;兼容入口 `deleteMessage()` 使用同一参数。\n\n```uts\nimport { deleteMessageFromLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteMessageFromLocalStorage({ conversationID, clientMsgID })\n```\n\n该操作不会撤回对端消息,也不应伪装为服务端删除。成功后从当前设备 store 移除;需要通知对端使用撤回或商业版删除能力。", + "description": "按会话和 clientMsgID 删除当前设备中的消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-local-message", + "title": "删除本地消息" + }, + "/sdk/uniapp/message/managing-messages/delete-saved-messages": { + "body": "`deleteMessages()` 商业版 批量删除明确指定的消息。本页归属公共 `onMsgDeleted` 事件。\n\n```uts\nimport {\n deleteMessages,\n off,\n onMsgDeleted,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst deletedSubscription = onMsgDeleted((message) => {\n removeMessageByID(message.clientMsgID)\n})\n\nawait deleteMessages(deleteParams)\noff(deletedSubscription)\n```\n\n`deleteParams` 使用锁定的 `OpenIMDeleteMessagesParams`,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。", + "description": "商业版批量删除消息,并处理 onMsgDeleted。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "title": "删除已保存消息" + }, + "/sdk/uniapp/message/managing-messages/delete-user-messages": { + "body": "`deleteUserAllMessagesInConv()` 与事件 `onDeleteUserAllMsgsInConv` 均属于商业版。\n\n```uts\nimport {\n deleteUserAllMessagesInConv,\n off,\n onDeleteUserAllMsgsInConv,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst deleteSubscription = onDeleteUserAllMsgsInConv((payload) => {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationMessages()\n } catch (_) {}\n})\n\nawait deleteUserAllMessagesInConv({ conversationID, userID: targetUserID })\noff(deleteSubscription)\n```\n\n这是高风险范围删除,需权限与二次确认。raw payload 校验后重新查询,不依赖未冻结字段。", + "description": "商业版删除指定用户在一个会话中的消息并处理 raw 事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "title": "删除用户在会话中的全部消息" + }, + "/sdk/uniapp/message/managing-messages/revoke-a-message": { + "body": "`revokeMessage()` 使用会话和客户端消息 ID。\n\n```uts\nimport {\n off,\n onNewRecvMessageRevoked,\n revokeMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst revokedSubscription = onNewRecvMessageRevoked((info) => mergeRevokedInfo(info))\nawait revokeMessage({ conversationID, clientMsgID })\noff(revokedSubscription)\n```\n\n服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。", + "description": "撤回指定消息,并处理消息撤回事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "title": "撤回消息" + }, + "/sdk/uniapp/message/managing-messages/modify-a-message": { + "body": "`modifyMessage()`、`onMessageModified` 和 `onMessageEdited` 属于商业版。两个事件都是 raw 字符串。\n\n```uts\nimport {\n modifyMessage,\n off,\n onMessageEdited,\n onMessageModified,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst modifiedSubscription = onMessageModified((payload) => refreshModifiedMessage(payload))\nconst editedSubscription = onMessageEdited((payload) => refreshModifiedMessage(payload))\n\nconst result = await modifyMessage(modifyParams)\noff(modifiedSubscription)\noff(editedSubscription)\n```\n\n`modifyParams` 按 `OpenIMModifyMessageParams` 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。", + "description": "商业版修改消息,并处理 modified/edited raw 事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/modify-a-message", + "title": "修改消息" + }, + "/sdk/uniapp/message/managing-messages/get-pinned-messages": { + "body": "`getConversationPinnedMsg()` 商业版 按会话查询置顶消息。\n\n```uts\nimport { getConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationPinnedMsg({ conversationID })\n```\n\n以返回 DTO 的消息列表/分页字段为准,按 `clientMsgID` 去重。置顶变化后重新查询,避免依赖 raw 事件内部字段。", + "description": "商业版查询一个会话的置顶消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "title": "查询置顶消息" + }, + "/sdk/uniapp/message/managing-messages/set-message-pinned": { + "body": "`setConversationPinnedMsg()` 与 `onChangedPinnedMsg` 属于商业版。\n\n```uts\nimport {\n off,\n onChangedPinnedMsg,\n setConversationPinnedMsg,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst pinnedSubscription = onChangedPinnedMsg((payload) => {\n refreshPinnedMessagesAfterValidJson(payload)\n})\nawait setConversationPinnedMsg(pinParams)\noff(pinnedSubscription)\n```\n\n参数使用 `OpenIMSetConversationPinnedMsgParams`。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。", + "description": "商业版修改会话消息置顶状态并处理变化事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "title": "置顶或取消置顶消息" + }, + "/sdk/uniapp/message/managing-messages/insert-local-single-message": { + "body": "`insertSingleMessageToLocalStorage()` 只写当前设备本地数据库,不发送给对方。\n\n```uts\nimport { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait insertSingleMessageToLocalStorage(insertParams)\n```\n\n`insertParams` 使用真实 `OpenIMInsertSingleMessageParams`,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。", + "description": "把业务生成的消息插入单聊本地历史。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "title": "插入本地单聊消息" + }, + "/sdk/uniapp/message/managing-messages/insert-local-group-message": { + "body": "`insertGroupMessageToLocalStorage()` 只写本机群聊历史。\n\n```uts\nimport { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait insertGroupMessageToLocalStorage(insertParams)\n```\n\n参数使用 `OpenIMInsertGroupMessageParams`,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。", + "description": "把业务生成的消息插入群聊本地历史。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "title": "插入本地群聊消息" + }, + "/sdk/uniapp/message/managing-messages/clear-all-local-messages": { + "body": "`deleteAllMsgFromLocal()` 清空当前账号本地消息。\n\n```uts\nimport { deleteAllMsgFromLocal } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteAllMsgFromLocal()\n```\n\n这是高风险范围操作,二次确认并停止所有消息查询。它不保证删除服务端数据;重新同步可能恢复部分消息。", + "description": "删除当前账号在本设备的全部消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "title": "清空全部本地消息" + }, + "/sdk/uniapp/message/managing-messages/clear-all-messages": { + "body": "`deleteAllMsgFromLocalAndSvr()` 是更高风险的全局删除。\n\n```uts\nimport { deleteAllMsgFromLocalAndSvr } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteAllMsgFromLocalAndSvr()\n```\n\n调用前明确影响范围和恢复策略,并进行强确认。成功后重建会话与消息 store;失败时重新查询,不假定原子完成。", + "description": "删除当前账号的全部本地及服务端消息。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "title": "清空本地与服务端消息" + }, + "/sdk/uniapp/message/managing-messages/set-message-local-ex": { + "body": "`setMessageLocalEx()` 使用会话和消息 ID 更新本地扩展。\n\n```uts\nimport { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk'\n\nawait setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) })\n```\n\n`localEx` 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。", + "description": "更新一条消息在当前设备的 localEx。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "title": "设置消息本地扩展" + }, + "/sdk/uniapp/message/managing-read-status/send-group-read-receipts": { + "body": "`sendGroupMessageReadReceipt()` 与 `onRecvGroupReadReceipt` 属于商业版。\n\n```uts\nimport {\n off,\n onRecvGroupReadReceipt,\n sendGroupMessageReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvGroupReadReceipt((payload) => refreshReadState(payload))\nawait sendGroupMessageReadReceipt(receiptParams)\noff(receiptSubscription)\n```\n\n参数使用 `OpenIMSendGroupMessageReadReceiptParams`。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。", + "description": "商业版发送群消息已读回执并处理 raw 回执事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "title": "上报群消息已读" + }, + "/sdk/uniapp/message/managing-read-status/get-group-message-readers": { + "body": "`getGroupMessageReaderList()` 商业版 使用 `OpenIMGetGroupMessageReaderListParams` 查询。\n\n```uts\nimport { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupMessageReaderList(readerParams)\n```\n\n按返回 DTO 的分页字段继续加载,并按 `userID` 去重。已读成员数据可能随新回执变化,打开详情时重新查询。", + "description": "商业版分页查询读过指定群消息的成员。", + "headings": [], + "sourcePath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "title": "查询群消息已读成员" + }, + "/sdk/uniapp/file-uploads/upload-file": { + "body": "`uploadFile()` 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。\n\n```uts\nimport { uploadFile } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换;不要把网络 URL 作为 `filepath`。上传进度由[消息概览](/sdk/uniapp/message/overview-message)归属的 `onUploadFileProgress` 提供。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", + "description": "上传本地文件、观察进度,并在商业版取消上传。", + "headings": [], + "sourcePath": "/sdk/uniapp/file-uploads/upload-file", + "title": "上传文件" + }, + "/sdk/uniapp/calling/overview-calling": { + "body": "本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。\n\n需要完整通话与会议 UI 时,另行集成 `openim-av-runtime`。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。\n\n典型流程:\n\n1. 应用登录 IM,并注册全部信令事件。\n2. 主叫构造 `OpenIMSignalingInvitationInfo` 后调用邀请。\n3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。\n4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。\n5. 双方使用返回的 room/token/liveURL 建立媒体连接。\n6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。\n\n同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。", + "description": "商业版通话邀请、房间凭据、事件和 AV Runtime 的职责边界。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/overview-calling", + "title": "音视频信令概览" + }, + "/sdk/uniapp/calling/managing-calls/start-single-call": { + "body": "`signalingInvite()` 商业版 使用 invitation 和可选离线推送信息。\n\n```uts\nimport { signalingInvite } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingInvite({\n invitation: {\n inviterUserID: selfUserID,\n inviteeUserIDList: [peerUserID],\n mediaType: 'video',\n timeout: 30,\n sessionType: 1,\n },\n offlinePushInfo: { title: '视频通话', desc: '收到新的通话邀请' },\n})\n```\n\n返回值可能含 `roomID`、`token`、`liveURL` 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", + "description": "商业版向一个用户发起音频或视频邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-single-call", + "title": "发起单人通话" + }, + "/sdk/uniapp/calling/managing-calls/start-group-call": { + "body": "`signalingInviteInGroup()` 商业版 使用同一邀请结构,但 invitation 必须包含 `groupID` 和目标成员。\n\n```uts\nimport { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingInviteInGroup({\n invitation: {\n inviterUserID: selfUserID,\n inviteeUserIDList: selectedUserIDs,\n groupID,\n mediaType: 'audio',\n timeout: 30,\n sessionType: 2,\n },\n})\n```\n\n发送前确认成员仍在群内并去重。`busyLineUserIDList` 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。", + "description": "商业版向群成员发起群组通话邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/start-group-call", + "title": "发起群通话" + }, + "/sdk/uniapp/calling/managing-calls/accept-call": { + "body": "收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 `signalingAccept()`。\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingAccept({ invitation })\n```\n\n返回的 `token`、`roomID`、`liveURL` 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。\n\nPromise 成功与对方接受事件、媒体真正连接是不同阶段。", + "description": "商业版接受邀请并取得房间凭据。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", + "title": "接受通话" + }, + "/sdk/uniapp/calling/managing-calls/reject-call": { + "body": "`signalingReject()` 使用收到的完整 invitation。\n\n```uts\nimport { signalingReject } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingReject({ invitation })\n```\n\n拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 `roomID`。", + "description": "商业版拒绝当前邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/reject-call", + "title": "拒绝通话" + }, + "/sdk/uniapp/calling/managing-calls/cancel-call": { + "body": "主叫在对方接受前使用 `signalingCancel()`。\n\n```uts\nimport { signalingCancel } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingCancel({ invitation })\n```\n\n取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。", + "description": "商业版由主叫取消尚未接通的邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/cancel-call", + "title": "取消通话邀请" + }, + "/sdk/uniapp/calling/managing-calls/hang-up-call": { + "body": "`signalingHungUp()` 使用当前会话的 invitation。\n\n```uts\nimport { signalingHungUp } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingHungUp({ invitation })\n```\n\n调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 `onHangUp`。", + "description": "商业版结束已接受的通话。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "title": "挂断通话" + }, + "/sdk/uniapp/calling/managing-calls/handle-call-events": { + "body": "所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。\n\n```uts\nimport {\n off,\n onHangUp,\n onInvitationCancelled,\n onInvitationTimeout,\n onInviteeAccepted,\n onInviteeAcceptedByOtherDevice,\n onInviteeRejected,\n onInviteeRejectedByOtherDevice,\n onReceiveNewInvitation,\n onRoomParticipantConnected,\n onRoomParticipantDisconnected,\n onStreamChange,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction handleCallPayload(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) routeValidatedCallEvent(value)\n } catch (_) {\n console.error('Invalid call event payload')\n }\n}\n\nconst invitationSubscription = onReceiveNewInvitation(handleCallPayload)\nconst subscriptions : Array = [\n invitationSubscription,\n onInviteeAccepted(handleCallPayload),\n onInviteeAcceptedByOtherDevice(handleCallPayload),\n onInviteeRejected(handleCallPayload),\n onInviteeRejectedByOtherDevice(handleCallPayload),\n onInvitationCancelled(handleCallPayload),\n onInvitationTimeout(handleCallPayload),\n onHangUp(handleCallPayload),\n onRoomParticipantConnected(handleCallPayload),\n onRoomParticipantDisconnected(handleCallPayload),\n onStreamChange(handleCallPayload),\n]\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\nHarmonyOS 当前不支持 `onStreamChange`,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。", + "description": "商业版统一接收邀请、接受、拒绝、取消、超时、挂断和房间事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "title": "处理通话事件" + }, + "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation": { + "body": "事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,恢复初始化前到达的邀请。\n\n```uts\nimport { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetInvitationInfoStartApp()\nif (result?.invitation != null) recoverInvitation(result.invitation)\n```\n\n可选参数 `userID` 只用于明确查询用户。无邀请时合法返回 `null`,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。", + "description": "商业版在 SDK 启动后查询可能遗漏的当前邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "title": "恢复启动时邀请" + }, + "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": { + "body": "`signalingGetRoomByGroupID()` 返回可选 `roomID` 和 invitation。\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetRoomByGroupID({ groupID })\n```\n\n空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。", + "description": "商业版查询群当前关联的 roomID 与邀请。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "title": "按群查询通话房间" + }, + "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id": { + "body": "`signalingGetTokenByRoomID()` 返回可选 Token 与 liveURL。\n\n```uts\nimport { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetTokenByRoomID({ roomID })\n```\n\n凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。", + "description": "商业版为指定 roomID 获取 RTC Token 和 liveURL。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "title": "按房间获取 Token" + }, + "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal": { + "body": "`signalingSendCustomSignaling()` 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。\n\n```uts\nimport {\n off,\n onReceiveCustomSignal,\n onReceiveCustomSignaling,\n signalingSendCustomSignaling,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst signalSubscription = onReceiveCustomSignal((payload) => handleValidatedSignal(payload))\nconst signalingSubscription = onReceiveCustomSignaling((payload) => handleValidatedSignal(payload))\n\nawait signalingSendCustomSignaling({\n roomID,\n customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }),\n})\n\noff(signalSubscription)\noff(signalingSubscription)\n```\n\n接收端用事件 ID/内容哈希去重,校验 `type`、`version` 和字段。`customInfo` 不承担权限认证,不含 Token 或秘密。", + "description": "商业版向房间发送业务自定义信令,并安全解析接收事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "title": "发送自定义信令" + }, + "/sdk/uniapp/events/overview-events": { + "body": "每个 `on...()` 调用同步返回独立 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。正常清理使用 `off(subscription)`;不要继续使用旧版“监听函数直接返回取消闭包”的写法。\n\n```uts\nimport {\n off,\n onSyncServerFailed,\n onSyncServerFinish,\n onSyncServerProgress,\n onSyncServerStart,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst startSubscription = onSyncServerStart((reinstalled) => beginSyncUI(reinstalled))\nconst subscriptions : Array = [\n startSubscription,\n onSyncServerProgress((progress) => updateSyncProgress(progress)),\n onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)),\n onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。\n\n`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。\n\n## HarmonyOS unsupported 事件\n\nHarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、`onMessageKvInfoChanged`、`onStreamChange`,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。\n\n事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。", + "description": "管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。", + "headings": [ + { + "depth": 2, + "title": "HarmonyOS unsupported 事件", + "url": "#harmonyos-unsupported-事件" + } + ], + "sourcePath": "/sdk/uniapp/events/overview-events", + "title": "事件概览" + }, + "/sdk/uniapp/events/handle-data-migration-events": { + "body": "四个 migration 事件属于商业版,Android 与 iOS 支持;HarmonyOS 当前全部返回 `platform-unsupported`。它们来自 Core/插件迁移桥,不等同于普通同步事件。\n\n```uts\nimport {\n off,\n onMigrationFailed,\n onMigrationFinished,\n onMigrationProgress,\n onMigrationStart,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst startSubscription = onMigrationStart(() => showMigrationUI())\nconst subscriptions : Array = [\n startSubscription,\n onMigrationProgress((payload) => handleValidatedMigrationProgress(payload)),\n onMigrationFailed((payload) => handleValidatedMigrationFailure(payload)),\n onMigrationFinished(() => finishMigrationUI()),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n进度和失败 payload 是 opaque 字符串。若为 JSON,先校验再读取;不要向用户或日志暴露内部路径、数据库信息和敏感内容。迁移期间避免并发反初始化或切换账号,完成/失败后重新查询必要快照。", + "description": "商业版观察迁移开始、进度、失败与完成事件。", + "headings": [], + "sourcePath": "/sdk/uniapp/events/handle-data-migration-events", + "title": "处理数据迁移事件" + }, + "/sdk/uniapp/logger": { + "body": "初始化时通过 `logLevel`、`isLogStandardOutput` 和可选 `logFilePath` 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。\n\n## 上传日志\n\n`uploadLogs()` 接收行数和扩展说明:\n\n```uts\nimport { uploadLogs } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = `diagnostic-${Date.now()}`\nawait uploadLogs(\n { line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) },\n operationID,\n)\n```\n\n`operationID` 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。\n\n上传进度由 `onUploadLogsProgress` 提供,完整订阅归[消息概览](/sdk/uniapp/message/overview-message)。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。\n\n## 安全要求\n\n- 上传前取得用户同意,并说明日志范围与保留策略。\n- `ex` 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。\n- 控制 `line`,避免无界上传;失败时限次重试。\n- 生产包不要长期启用 verbose 标准输出。\n- 本地数据目录只用于诊断定位,不直接打包整个数据库上传。", + "description": "配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。", + "headings": [ + { + "depth": 2, + "title": "上传日志", + "url": "#上传日志" + }, + { + "depth": 2, + "title": "安全要求", + "url": "#安全要求" + } + ], + "sourcePath": "/sdk/uniapp/logger", + "title": "日志与诊断" + } + } +} diff --git a/src/lib/client-sdk-commercial.ts b/src/lib/client-sdk-commercial.ts index 0518e40313..3fc2edeb5f 100644 --- a/src/lib/client-sdk-commercial.ts +++ b/src/lib/client-sdk-commercial.ts @@ -1,6 +1,7 @@ -import flutterAudit from '@/data/structure/flutter-content-audit.json'; -import iosAudit from '@/data/structure/ios-content-audit.json'; -import ownership from '@/data/structure/wasm-api-ownership.json'; +import flutterAudit from '../../data/structure/flutter-content-audit.json' with { type: 'json' }; +import iosAudit from '../../data/structure/ios-content-audit.json' with { type: 'json' }; +import ownership from '../../data/structure/wasm-api-ownership.json' with { type: 'json' }; +import uniappOwnership from '../../data/structure/uniapp-api-ownership.json' with { type: 'json' }; type OwnershipEntry = { name: string; @@ -10,6 +11,7 @@ type OwnershipEntry = { }; type NativePlatform = 'flutter' | 'ios'; +type ClientSdkPlatform = 'wasm' | NativePlatform | 'uniapp'; type ClientSdkAuditPage = { currentPath: string; @@ -40,6 +42,18 @@ const nativeAudits: Record = { ios: iosAudit.pages as ClientSdkAuditPage[], }; +type UniAppOwnershipEntry = { + name: string; + page: string | null; + disposition: string; + edition: 'public' | 'commercial'; +}; + +const uniappCallables = uniappOwnership.callables as Array< + UniAppOwnershipEntry & { role: 'operation' | 'event-subscription' | 'event-control' } +>; +const uniappEvents = uniappOwnership.events as UniAppOwnershipEntry[]; + const platformSymbolAliases: Record> = { flutter: { getConversationGroupByConversationID: 'getConversationGroupIDsByConversationID', @@ -83,6 +97,11 @@ const partialCommercialConceptSources: Record = { '/sdk/ios/calling/managing-calls/handle-call-events', '/sdk/ios/calling/retrieving-call-information/restore-pending-invitation', ], + '/sdk/uniapp/calling/overview-calling': [ + '/sdk/uniapp/calling/managing-calls/start-single-call', + '/sdk/uniapp/calling/managing-calls/handle-call-events', + '/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation', + ], }; // These capabilities share general-purpose setters with open-source fields. Classify the @@ -104,6 +123,13 @@ const fullCommercialConceptPages = new Set([ '/sdk/ios/conversation/managing-conversations/set-message-destruct', '/sdk/ios/conversation/managing-conversations/set-message-destruct-time', '/sdk/ios/message/composing-messages/save-local-transcript', + '/sdk/uniapp/conversation/managing-conversations/set-private-chat', + '/sdk/uniapp/conversation/managing-conversations/set-burn-duration', + '/sdk/uniapp/conversation/managing-conversations/set-message-destruct', + '/sdk/uniapp/conversation/managing-conversations/set-conversation-remark', + '/sdk/uniapp/conversation/managing-conversations/mark-conversation', + '/sdk/uniapp/message/composing-messages/save-local-transcript', + '/sdk/uniapp/user/profile/set-friend-add-permission', ]); function applyCommercialConceptOverride( @@ -144,16 +170,42 @@ function getWasmPageCommercialInfo(pagePath: string): PageCommercialInfo { }; } +function getUniAppPageCommercialInfo(pagePath: string): PageCommercialInfo { + const pageCallables = uniappCallables.filter((entry) => entry.page === pagePath); + const commercialMethods = pageCallables + .filter((entry) => entry.edition === 'commercial') + .map((entry) => entry.name) + .sort((left, right) => left.localeCompare(right)); + const openSourceMethods = pageCallables + .filter((entry) => entry.edition === 'public') + .map((entry) => entry.name) + .sort((left, right) => left.localeCompare(right)); + const commercialEvents = uniappEvents + .filter((entry) => entry.page === pagePath && entry.edition === 'commercial') + .map((entry) => entry.name) + .sort((left, right) => left.localeCompare(right)); + + if (commercialMethods.length === 0 && commercialEvents.length === 0) { + return { kind: 'none', methods: [], openSourceMethods, events: [] }; + } + return { + kind: openSourceMethods.length === 0 ? 'full' : 'partial', + methods: commercialMethods, + openSourceMethods, + events: commercialEvents, + }; +} + function parseClientSdkPath( pagePath: string, ): - | { platform: 'wasm'; wasmPath: string } + | { platform: 'wasm' | 'uniapp'; wasmPath: string } | { platform: NativePlatform; wasmPath: string } | undefined { - const match = pagePath.match(/^\/sdk\/(wasm|flutter|ios)(\/.*)$/); + const match = pagePath.match(/^\/sdk\/(wasm|flutter|ios|uniapp)(\/.*)$/); if (!match) return undefined; - const platform = match[1] as 'wasm' | NativePlatform; + const platform = match[1] as ClientSdkPlatform; return { platform, wasmPath: `/sdk/wasm${match[2]}`, @@ -195,18 +247,22 @@ export function getPageCommercialInfo(pagePath: string): PageCommercialInfo { if (route.platform === 'wasm') { return applyCommercialConceptOverride(pagePath, getWasmPageCommercialInfo(route.wasmPath)); } + if (route.platform === 'uniapp') { + return applyCommercialConceptOverride(pagePath, getUniAppPageCommercialInfo(pagePath)); + } - const page = nativeAudits[route.platform].find( + const nativePlatform = route.platform as NativePlatform; + const page = nativeAudits[nativePlatform].find( (entry) => entry.currentPath === pagePath && entry.disposition !== 'omit', ); if (!page) return { kind: 'none', methods: [], openSourceMethods: [], events: [] }; const commercialMethods = page.sdkMethods.filter((name) => - commercialMethodNames.has(normalizePlatformSymbol(route.platform, name, 'method')), + commercialMethodNames.has(normalizePlatformSymbol(nativePlatform, name, 'method')), ); const openSourceMethods = page.sdkMethods.filter((name) => !commercialMethods.includes(name)); const commercialEvents = page.sdkEvents.filter((name) => - commercialEventNames.has(normalizePlatformSymbol(route.platform, name, 'event')), + commercialEventNames.has(normalizePlatformSymbol(nativePlatform, name, 'event')), ); if (commercialMethods.length === 0 && commercialEvents.length === 0) { diff --git a/src/lib/client-sdk-publication.ts b/src/lib/client-sdk-publication.ts index cac41c8253..f9038f8456 100644 --- a/src/lib/client-sdk-publication.ts +++ b/src/lib/client-sdk-publication.ts @@ -4,9 +4,11 @@ import iosAuditData from '../../data/structure/ios-content-audit.json' with { ty import iosSidebarData from '../../data/structure/ios-sidebar.json' with { type: 'json' }; import wasmAuditData from '../../data/structure/wasm-content-audit.json' with { type: 'json' }; import wasmSidebarData from '../../data/structure/wasm-sidebar.json' with { type: 'json' }; +import uniappAuditData from '../../data/structure/uniapp-content-audit.json' with { type: 'json' }; +import uniappSidebarData from '../../data/structure/uniapp-sidebar.json' with { type: 'json' }; export type ReviewLocale = 'en' | 'zh'; -export type ClientSdkPlatform = 'flutter' | 'ios' | 'wasm'; +export type ClientSdkPlatform = 'flutter' | 'ios' | 'wasm' | 'uniapp'; type ReviewStatus = | 'deferred' @@ -81,12 +83,17 @@ const publicationLookup = createClientSdkPublicationLookup({ pages: wasmAuditData.pages as ClientSdkAuditPage[], activePaths: flattenSidebarPaths(wasmSidebarData.nodes), }, + uniapp: { + pages: uniappAuditData.pages as ClientSdkAuditPage[], + activePaths: flattenSidebarPaths(uniappSidebarData.nodes), + }, }); const platformNames: Record = { flutter: 'Flutter', ios: 'iOS', wasm: 'WASM', + uniapp: 'uni-app / uni-app x', }; export function getClientSdkPendingReviewBody(platform: ClientSdkPlatform): string { diff --git a/src/lib/localized-docs.ts b/src/lib/localized-docs.ts index 9cc312dacb..ef1091b6df 100644 --- a/src/lib/localized-docs.ts +++ b/src/lib/localized-docs.ts @@ -5,6 +5,7 @@ import { resolve } from 'node:path'; import flutterSdkData from '@/src/generated/flutter-sdk-zh-content.json'; import iosSdkData from '@/src/generated/ios-sdk-zh-content.json'; import wasmSdkData from '@/src/generated/wasm-sdk-zh-content.json'; +import uniappSdkData from '@/src/generated/uniapp-sdk-zh-content.json'; import localizedPlatformApiData from '@/src/generated/platform-api-zh-content.json'; import { extractMarkdownHeadings } from '@/src/lib/heading-ids'; import type { Locale } from '@/src/lib/i18n'; @@ -32,6 +33,7 @@ const sdkZhByContext: Record = { 'chat/sdk/flutter': flutterSdkData as LocalizedSdkData, 'chat/sdk/ios': iosSdkData as LocalizedSdkData, 'chat/sdk/wasm': wasmSdkData as LocalizedSdkData, + 'chat/sdk/uniapp': uniappSdkData as LocalizedSdkData, }; const platformApiZh = localizedPlatformApiData as { navigationLabels: Record }; const localizedPageCache = new Map(); From 4c4391e4e14091b7bb130d937138bf53485e00ef Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 12:46:09 +0800 Subject: [PATCH 02/20] docs(uniapp): add bilingual setup and lifecycle guides --- .../authenticate-and-manage-session.mdx | 83 +++++++++++++++ .../getting-started/before-you-start.mdx | 49 +++++++++ .../environment-specific-implementation.mdx | 54 ++++++++++ .../handle-app-lifecycle-and-device-state.mdx | 37 +++++++ .../install-initialize-and-inspect-sdk.mdx | 69 ++++++++++++ .../getting-started/send-first-message.mdx | 53 ++++++++++ .../update-token-and-observe-sdk-session.mdx | 52 +++++++++ content/docs/chat/sdk/uniapp/overview.mdx | 67 ++++++++---- .../authenticate-and-manage-session.mdx | 100 ++++++++++++++++++ .../getting-started/before-you-start.mdx | 46 ++++++++ .../environment-specific-implementation.mdx | 67 ++++++++++++ .../handle-app-lifecycle-and-device-state.mdx | 48 +++++++++ .../install-initialize-and-inspect-sdk.mdx | 77 ++++++++++++++ .../getting-started/send-first-message.mdx | 81 ++++++++++++++ .../update-token-and-observe-sdk-session.mdx | 62 +++++++++++ content/zh/docs/chat/sdk/uniapp/overview.mdx | 75 +++++++++---- 16 files changed, 983 insertions(+), 37 deletions(-) create mode 100644 content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx diff --git a/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx new file mode 100644 index 0000000000..b562344be3 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx @@ -0,0 +1,83 @@ +--- +title: 'Authenticate and manage a session' +description: 'Log in, observe connection and token events, inspect login state, and log out safely.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/authenticate-and-manage-session' +--- + +After `initSDK()`, register account and connection events before calling `login(userID, token)`. Login Promise completion does not imply that the persistent connection is ready; wait for `onConnectSuccess` before network-dependent queries and sends. + +```uts +import { + off, + onConnectFailed, + onConnectSuccess, + onConnecting, + onKickedOffline, + onUserTokenExpired, + onUserTokenInvalid, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const subscriptions : Array = [ + onConnectSuccess(() => console.log('OpenIM connected')), + onConnecting(() => console.log('OpenIM connecting')), + onConnectFailed((error) => console.error(error.errCode, error.errMsg)), + onKickedOffline(() => clearCurrentAccount()), + onUserTokenExpired(() => requestFreshToken()), + onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)), +] + +function releaseSessionSubscriptions() { + subscriptions.forEach((subscription) => off(subscription)) + subscriptions.length = 0 +} +``` + +When `onKickedOffline` arrives, Core is already transitioning offline. Clear references to the old account and start reauthentication; do not race it with `logout()`. + +```uts +import { login } from '@/uni_modules/unix-openim-sdk' + +await login(userID, token) +``` + +The signature is `login(userID, token, operationID?)`, not an object parameter. Obtain a token matching `userID` from a trusted backend. + +```uts +import { OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID } from '@/uni_modules/unix-openim-sdk' + +const status = await getLoginStatus() +if (status == OpenIMLoginStatusLogged) { + const currentUserID = await getLoginUserID() + restoreAccountState(currentUserID) +} +``` + +Login state and network connectivity are different: a briefly disconnected account may remain logged in. + +Report application lifecycle and network transitions once from an application service: + +```uts +import { networkStatusChanged, setAppBackgroundStatus } from '@/uni_modules/unix-openim-sdk' + +await setAppBackgroundStatus(true) +await setAppBackgroundStatus(false) +await networkStatusChanged() +``` + +To sign out, wait for `logout()`, release account-scoped subscriptions, and clear state. Finish this sequence before logging in another account. + +```uts +import { logout } from '@/uni_modules/unix-openim-sdk' + +await logout() +releaseSessionSubscriptions() +clearCurrentAccount() +``` diff --git a/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx new file mode 100644 index 0000000000..9438a8a05c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx @@ -0,0 +1,49 @@ +--- +title: 'Before you start' +description: 'Prepare OpenIMServer, a user token, the UTS plugin, and a native build environment.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/before-you-start' +--- + +Choose a uni-app or uni-app x App target and prepare an OpenIMServer, users, and native build environment compatible with `unix-openim-sdk 0.2.0-rc.3`. Web, H5, and mini-app targets cannot use this native UTS plugin. + +## Prepare the service and account + +| Value | Source | Requirement | +| --- | --- | --- | +| `apiAddr` | OpenIMServer HTTP API | Complete address reachable from the device | +| `wsAddr` | OpenIMServer WebSocket | Complete address that accepts a persistent connection | +| `userID` | Your backend account mapping | Existing server user matching the token | +| Token | Trusted application backend | Grants access only to the current user | + +Your backend must authenticate its own account before returning the mapped OpenIM user and token. Never place an administrator token or server secret in the App. Public clients connect to a public OpenIMServer deployment; signaling, session, and other commercial features require the corresponding commercial services. + +On physical devices, do not use the development computer's `localhost`. Verify network reachability, TLS certificates, reverse-proxy rules, and WebSocket upgrades from the actual device. + +## Prepare the plugin and toolchain + +Install the plugin at `uni_modules/unix-openim-sdk`, use the HBuilderX/uni-app `5.23` series, and prepare: + +- Android: API 21+, a compatible JDK and Android SDK, declared AAR/Maven dependencies, and target ABIs. +- iOS: iOS 14+, compatible Xcode/CocoaPods, and correctly linked and embedded XCFrameworks. +- HarmonyOS: uni-app x commercial edition only, API 24, with the HAR matching the plugin contract. + +The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory. + +Use exported platform constants instead of numeric literals: `OpenIMPlatformAndroid`, `OpenIMPlatformIOS`, or `OpenIMPlatformHarmony`. The required `systemType` is a descriptive string such as `android`, `ios`, or `harmony`. + +## Release checklist + +- Verify initialization, login, normal message send/receive, and logout on target devices. +- Test foreground/background transitions, network recovery, token invalidation, and forced logout. +- Scan Android for duplicate classes/JNI and ABIs; validate iOS signing, embedding, privacy manifests, and device linking. +- Test commercial signaling against commercial services, not a public server. +- Keep tokens, secrets, and full private-message content out of logs, screenshots, and automation evidence. + +Continue with [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk). diff --git a/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx new file mode 100644 index 0000000000..31b5796b8b --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx @@ -0,0 +1,54 @@ +--- +title: 'Integrate by host and platform' +description: 'Understand the runtime and build boundaries for uni-app, uni-app x, Android, iOS, and HarmonyOS.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/environment-specific-implementation' +--- + +`unix-openim-sdk` exposes the same business functions to uni-app and uni-app x. Differences are limited mainly to language types, page lifecycle, and native build integration. Always import from the same flat plugin root. + +| Host | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared | +| uni-app x | API 21+ | iOS 14+ | Commercial API 24 | +| H5 / Web / mini apps | Not supported | Not supported | Not supported | + +## uni-app + +JavaScript does not provide UTS static type checking, but Promise values and subscription-handle semantics are identical. Keep SDK lifetime in an application service rather than reinitializing it from pages. + +```javascript +import { getLoginStatus, off, onConnectSuccess } from '@/uni_modules/unix-openim-sdk' + +const connection = onConnectSuccess(() => console.log('OpenIM connected')) +const status = await getLoginStatus() +off(connection) +``` + +## uni-app x + +Import public UTS types instead of copying interfaces that can drift: + +```uts +import { getLoginStatus, type OpenIMLoginStatus } from '@/uni_modules/unix-openim-sdk' + +const status : OpenIMLoginStatus = await getLoginStatus() +``` + +For commercial raw signaling JSON, validate the string and required fields before mapping an `UTSJSONObject` to your own domain type. + +## Native platform boundaries + +Android and iOS support public and commercial interfaces, but the plugin must be included in a custom base or local native project. The host App declares permissions, notifications, and background capabilities; the SDK does not request camera, microphone, photo, or notification access for your product. + +File APIs require a readable absolute native path. Resolve `unifile://` through a uni API first. Do not pass a network URL, transient URL, or virtual sandbox path directly to OpenIM Core. + +HarmonyOS is declared only for uni-app x commercial edition. `updateFcmToken`, `updateToken`, `translateText`, and `translateMessage` return `platform-unsupported`. Ten unavailable events return unsupported subscriptions and never synthesize success; see [Event overview](/sdk/uniapp/events/overview-events). + +Initialize Core once per application. Pages own and release only their listeners. Account switching must finish old-account logout and cleanup before the new login; call `unInitSDK()` only during complete SDK teardown. diff --git a/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx b/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx new file mode 100644 index 0000000000..3f10b999a2 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx @@ -0,0 +1,37 @@ +--- +title: 'Handle App lifecycle and device state' +description: 'Report lifecycle and network changes, update badges, and register an FCM token.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state' +--- + +An application service should own lifecycle reporting. Use `setAppBackgroundStatus()` and `networkStatusChanged()` as described in the authentication guide; do not report the same transition from multiple pages. + +```uts +import { setAppBadge } from '@/uni_modules/unix-openim-sdk' + +await setAppBadge(totalUnreadCount) +``` + +`setAppBadge()` synchronizes the current total unread count with the SDK/platform layer. Continue to maintain application UI from unread events. Resolving the Promise does not guarantee that every device configuration displays a launcher badge. Pass `0` to clear it. + +```uts +import { updateFcmToken } from '@/uni_modules/unix-openim-sdk' + +await updateFcmToken({ + fcmToken: deviceFcmToken, + expireTime: tokenExpireUnixSeconds, +}) +``` + +`fcmToken` is the token issued to this device; `expireTime` is the protocol-defined Unix expiry in seconds. Call this only after acquiring or refreshing a valid device token. Never log it or substitute an IM token. + +HarmonyOS currently returns `platform-unsupported` for `updateFcmToken`. This is a platform capability gap, not a commercial-authentication failure; integrate the Harmony push channel in the host application. + +A recommended sequence is: initialize; subscribe and log in; register the device token; apply unread events and `setAppBadge()`; report foreground/background and network transitions; then clear badge/push association and account subscriptions on logout. Push notifications do not replace SDK message events or history synchronization. diff --git a/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx new file mode 100644 index 0000000000..42e74a7229 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx @@ -0,0 +1,69 @@ +--- +title: 'Install, initialize, and inspect the SDK' +description: 'Install the UTS plugin, initialize the only OpenIM Core, and inspect version and data paths.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk' +--- + +After installing `uni_modules/unix-openim-sdk`, initialize it once from an application service. The plugin exports flat functions; do not construct a second SDK instance. + +```uts +import { + OpenIMLogLevelInfo, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, +} from '@/uni_modules/unix-openim-sdk' + +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelInfo, + isLogStandardOutput: true, + systemType: 'android', +} + +const initialized = await initSDK(config) +if (!initialized) throw new Error('OpenIM SDK initialization was not accepted') +``` + +Use `OpenIMPlatformIOS` with `systemType: 'ios'`, or `OpenIMPlatformHarmony` with `systemType: 'harmony'`. Reduce console logging in production and configure `logFilePath` according to your compliance policy. + +| `OpenIMInitConfig` field | Type | Description | +| --- | --- | --- | +| `platformID` | `OpenIMPlatform` | One of the exported platform constants. | +| `apiAddr` | `string` | OpenIMServer HTTP API address. | +| `wsAddr` | `string` | OpenIMServer WebSocket address. | +| `dataDir` | `string \| null` (optional) | Core data directory; normally use the platform default. | +| `logFilePath` | `string \| null` (optional) | Log path following the platform artifact contract. | +| `logLevel` | `OpenIMLogLevel` | For example `OpenIMLogLevelError` or `OpenIMLogLevelInfo`. | +| `isLogStandardOutput` | `boolean` | Whether SDK logs are emitted to the system console. | +| `systemType` | `string` | Required system description; never omit it. | + +Do not initialize concurrent environments in one process. Sign out, clear application state, and uninitialize before changing service addresses. + +`getSdkVersion()` and `getOpenIMDataPath()` are synchronous local operations: + +```uts +import { getOpenIMDataPath, getSdkVersion } from '@/uni_modules/unix-openim-sdk' + +const version = getSdkVersion() +const dataPath = getOpenIMDataPath() +``` + +Use the data path only for diagnostics and storage policy. Never edit the SDK database or publish full sandbox paths in logs. + +```uts +import { unInitSDK } from '@/uni_modules/unix-openim-sdk' + +unInitSDK() +``` + +`unInitSDK()` returns `void`. Stop new requests, sign out, and release subscriptions first. Page unload, App backgrounding, and AV Runtime disposal must not uninitialize the IM SDK. diff --git a/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx new file mode 100644 index 0000000000..ff7d252507 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx @@ -0,0 +1,53 @@ +--- +title: 'Send your first message' +description: 'Create and send a text message in a uni-app or uni-app x App.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/send-first-message' +--- + +Use this flow to verify installation, initialization, login, and messaging. Production applications should keep SDK lifetime in an application service. + +Register `onConnectSuccess` before login and release its handle when the application scope ends: + +```uts +import { off, onConnectSuccess } from '@/uni_modules/unix-openim-sdk' + +const connection = onConnectSuccess(() => markOpenIMReady()) +off(connection) +``` + +For a direct message, set `recvID` and leave `groupID` empty. For a group message, leave `recvID` empty and set a group ID joined by the current user. + +```uts +import { createTextMessage, sendMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createTextMessage('Hello, OpenIMSDK') +if (message == null) throw new Error('Failed to create text message') + +const sentMessage = await sendMessage({ + message, + recvID: 'user_b', + groupID: '', +}) +appendOutgoingMessage(sentMessage) +``` + +`createTextMessage()` creates a local message object; it does not send. `sendMessage()` resolves directly to the final `OpenIMMessageItem`, without a `{ data }` wrapper. Merge outgoing state by `clientMsgID`, and deduplicate incoming events by the same identifier. + +For a group: + +```uts +const sentGroupMessage = await sendMessage({ + message, + recvID: '', + groupID: 'group_123', +}) +``` + +Verify with two accounts on independent clients: the sender receives a non-empty `clientMsgID`, the receiver obtains the new-message event, both clients can reload the message from history, and no old-account state changes after logout. diff --git a/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx new file mode 100644 index 0000000000..6ca8a7d432 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx @@ -0,0 +1,52 @@ +--- +title: 'Update tokens and observe SDK sessions' +description: 'Commercially update a login token and use synthetic session snapshots to prevent cross-account work.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/getting-started/update-token-and-observe-sdk-session' +--- + +This is a Commercial capability for hosts that share one OpenIM Core with dependent plugins such as AV Runtime. `onSDKSessionChanged` is synthesized by `unix-openim-sdk`; it is not a native OpenIM Core listener. + +```uts +import { getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot } from '@/uni_modules/unix-openim-sdk' + +const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot() +``` + +| Field | Type | Description | +| --- | --- | --- | +| `loginStatus` | `OpenIMLoginStatus` | Current login state. | +| `userID` | `string \| null` | Current SDK user, or `null` when logged out. | +| `sdkSessionEpoch` | `number` | Session generation, incremented after successful lifecycle or account changes. | +| `sdkVersion` | `string` | Version of the connected Core. | + +The snapshot never contains an IM token, API address, or WebSocket address. Pin `userID` and `sdkSessionEpoch` before asynchronous work and compare another snapshot before committing the result. + +```uts +import { off, onSDKSessionChanged } from '@/uni_modules/unix-openim-sdk' + +const sessionSubscription = onSDKSessionChanged((next) => { + cancelRequestsFromOlderEpoch(next.sdkSessionEpoch) + replaceActiveSdkUser(next.userID) +}) + +off(sessionSubscription) +``` + +Initialization, login, logout, uninitialization, forced logout, token invalidation/expiry, and user changes can advance the epoch. Handlers must be idempotent and must not log tokens or trigger competing logins. + +```uts +import { updateToken } from '@/uni_modules/unix-openim-sdk' + +await updateToken({ token: freshToken }) +``` + +Obtain the token from a trusted backend. `updateToken()` is available on Android and iOS; HarmonyOS returns `platform-unsupported`. Continue to use session and connection events after the Promise resolves. + +Dependent plugins should compare snapshots before and after initialization, cancel only their own work during disposal, and never call IM `logout()` or `unInitSDK()`. Dispose dependent plugins before switching users. diff --git a/content/docs/chat/sdk/uniapp/overview.mdx b/content/docs/chat/sdk/uniapp/overview.mdx index 0c0f957179..2fcc350b8e 100644 --- a/content/docs/chat/sdk/uniapp/overview.mdx +++ b/content/docs/chat/sdk/uniapp/overview.mdx @@ -1,36 +1,65 @@ --- -title: 'OpenIM SDK for uni-app' -description: 'OpenIM uni-app SDK entry point for App, H5, and supported mini-app targets.' +title: 'OpenIM SDK for uni-app / uni-app x' +description: 'Integrate unix-openim-sdk into Android, iOS, and commercial HarmonyOS Apps built with uni-app or uni-app x.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'overview' status: 'draft' -lastUpdated: '2026-06-30' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/overview' --- -## Overview +OpenIM `unix-openim-sdk` is a native UTS plugin that provides user, friend, conversation, group, message, event, and local-database capabilities to uni-app and uni-app x Apps. The plugin owns the only OpenIM Core in the host process. Import flat functions from `@/uni_modules/unix-openim-sdk`; do not create an SDK instance. -Use the uni-app SDK when the same OpenIM integration needs to cover App, H5, and supported mini-app targets from a uni-app codebase. The integration should keep authentication, user identity, message creation, conversation state, and event handling aligned with the rest of the OpenIM SDK family. +## Supported environments -## Platform scope +| Host | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | Supported, API 21+ | Supported, iOS 14+ | Not currently declared | +| uni-app x | Supported, API 21+ | Supported, iOS 14+ | Commercial, API 24 | +| Web / mini apps | Not supported | Not supported | Not supported | -- App and H5 builds should use the SDK package and runtime adapter recommended by the OpenIM release you deploy. -- Mini-app targets need additional validation for storage, network, file upload, and websocket behavior. -- Tokens should still be issued by a trusted backend. Do not generate or hard-code user tokens in the client bundle. +Use the HBuilderX/uni-app `5.23` series. Android and iOS require a custom base or local native project containing the plugin's native dependencies; the standard base cannot load them. -## Core integration path +## Public and commercial capabilities -1. Install the SDK package that matches your OpenIM Server version. -2. Initialize the client with `apiAddr`, `wsAddr`, the current `userID`, and a backend-issued token. -3. Register connection and message events before calling `login()`. -4. Send the first text message, then validate message receipt in another signed-in client. -5. Add platform-specific handling for file messages, push notifications, and background lifecycle. +This documentation covers both public capabilities and commercial extensions. APIs, events, and fields carrying a **Commercial** badge require the commercial `unix-openim-sdk` and a matching OpenIMServer deployment. Edition and platform support are separate: a public API can still return `platform-unsupported` on a particular platform. -## Related SDKs +Commercial extensions include signaling, SDK session snapshots, translation, and selected message or conversation features. `onSDKSessionChanged` is synthesized by the plugin from initialization, login, logout, token, and account transitions. It is not a native OpenIM Core event. -- [WASM SDK](/sdk/wasm/overview) for browser and WebAssembly-oriented API examples. -- [Flutter SDK](/sdk/flutter/overview) when mobile and desktop should be handled through Flutter. -- [React Native SDK](/sdk/react-native/overview) when the app is built with React Native. +## Integration sequence + +1. Install `unix-openim-sdk` and prepare a custom base or local native project. +2. Call `initSDK()` with `apiAddr`, `wsAddr`, platform, logging, and `systemType`. +3. Save the subscription handles returned by connection, message, and business event listeners. +4. Obtain the current user's `userID` and token from a trusted backend, then call `login(userID, token)`. +5. Wait for `onConnectSuccess`, load snapshots, and apply subsequent events incrementally. +6. On sign-out, call `logout()` and release listeners with `off(subscription)`. Call `unInitSDK()` only when the App no longer uses the SDK. + +## Invocation model + +Promises resolve directly to business values; there is no Web SDK `{ data }` wrapper. Event registration synchronously returns an `OpenIMSDKEventSubscription`: + +```uts +import { off, onRecvNewMessage } from '@/uni_modules/unix-openim-sdk' + +const messageSubscription = onRecvNewMessage((message) => { + console.log(message.clientMsgID) +}) + +off(messageSubscription) +``` + +Do not use `offAll()` for normal scoped cleanup. It removes every listener owned by the plugin instance and is intended only for full App teardown or controlled test reset. + +## Security boundaries + +- Obtain user tokens from a trusted backend. Never embed administrator tokens, secrets, or fixed user tokens in the App. +- Physical devices must use reachable `apiAddr` and `wsAddr` values; `localhost` points to the device itself. +- Do not open, move, or modify the SDK-managed database directly. +- Redact tokens, full private-message bodies, and commercial credentials from logs and reports. +- AV Runtime is a separate UTS plugin. It reuses this plugin's single login session but is not part of the public IM API. + +Continue with [Before you start](/sdk/uniapp/getting-started/before-you-start), [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk), and [Event overview](/sdk/uniapp/events/overview-events). diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx new file mode 100644 index 0000000000..45cb6c4ca8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx @@ -0,0 +1,100 @@ +--- +title: '认证与管理登录会话' +description: '登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。' +sourcePath: '/sdk/uniapp/getting-started/authenticate-and-manage-session' +--- + +完成 `initSDK()` 后,先注册连接与账号事件,再调用 `login(userID, token)`。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 `onConnectSuccess`。 + +## 注册登录事件 + +每次 `on...` 调用都返回独立的 `OpenIMSDKEventSubscription`。保存全部句柄,并在账号或应用作用域结束时逐个释放。 + +```uts +import { + off, + onConnectFailed, + onConnectSuccess, + onConnecting, + onKickedOffline, + onUserTokenExpired, + onUserTokenInvalid, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const connectSubscription = onConnectSuccess(() => { + console.log('OpenIM connected') +}) +const subscriptions : Array = [ + connectSubscription, + onConnecting(() => console.log('OpenIM connecting')), + onConnectFailed((error) => console.error(error.errCode, error.errMsg)), + onKickedOffline(() => clearCurrentAccount()), + onUserTokenExpired(() => requestFreshToken()), + onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)), +] + +function releaseSessionSubscriptions() { + subscriptions.forEach((subscription) => off(subscription)) + subscriptions.length = 0 +} +``` + +`onKickedOffline` 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 `logout()`。 + +## 登录 + +```uts +import { login } from '@/uni_modules/unix-openim-sdk' + +await login(userID, token) +``` + +`login` 的真实签名是 `login(userID, token)`,不是对象参数。Token 必须来自可信后端,并且与 `userID` 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。 + +## 查询当前状态 + +```uts +import { + OpenIMLoginStatusLogged, + getLoginStatus, + getLoginUserID, +} from '@/uni_modules/unix-openim-sdk' + +const status = await getLoginStatus() +if (status == OpenIMLoginStatusLogged) { + const currentUserID = await getLoginUserID() + restoreAccountState(currentUserID) +} +``` + +`getLoginStatus()` 返回 `OpenIMLoginStatusLogout`、`OpenIMLoginStatusLogging` 或 `OpenIMLoginStatusLogged`。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。 + +## 上报前后台与网络变化 + +```uts +import { + networkStatusChanged, + setAppBackgroundStatus, +} from '@/uni_modules/unix-openim-sdk' + +await setAppBackgroundStatus(true) // 进入后台 +await setAppBackgroundStatus(false) // 回到前台 +await networkStatusChanged() // 网络恢复或网络类型变化 +``` + +把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。 + +## 主动退出与切换账号 + +```uts +import { logout } from '@/uni_modules/unix-openim-sdk' + +await logout() +releaseSessionSubscriptions() +clearCurrentAccount() +``` + +切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。 + +商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx new file mode 100644 index 0000000000..d9f0949920 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx @@ -0,0 +1,46 @@ +--- +title: '开始之前' +description: '准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。' +sourcePath: '/sdk/uniapp/getting-started/before-you-start' +--- + +接入前先确定目标是 uni-app 还是 uni-app x App,并准备与 `unix-openim-sdk 0.2.0-rc.3` 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。 + +## 准备服务与账号 + +客户端初始化需要以下信息: + +| 数据 | 来源 | 要求 | +| --- | --- | --- | +| `apiAddr` | OpenIMServer HTTP API | 设备可访问的完整地址 | +| `wsAddr` | OpenIMServer WebSocket | 设备可建立长连接的完整地址 | +| `userID` | 业务后端的账号映射 | 与 Token 对应且在服务端存在 | +| Token | 可信业务后端 | 只授予当前用户,不在客户端生成 | + +业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。 + +真机测试时,`apiAddr` 和 `wsAddr` 不能使用开发机的 `localhost`。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。 + +## 准备插件与构建环境 + +把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备: + +- Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。 +- iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。 +- HarmonyOS:仅 uni-app x 商业版,API 24;使用与插件合同一致的 HAR。 + +标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。 + +## 选择平台标识 + +初始化使用插件导出的常量,不直接写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。`systemType` 是当前系统说明字符串,例如 `android`、`ios` 或 `harmony`,不可省略。 + +## 发布前检查 + +- 在真实目标设备上完成初始化、登录、普通消息收发与退出。 +- 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。 +- Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。 +- 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。 +- 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。 + +准备完成后,先阅读[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk),再进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx new file mode 100644 index 0000000000..0471fe2685 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx @@ -0,0 +1,67 @@ +--- +title: '按宿主和平台接入' +description: '区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。' +sourcePath: '/sdk/uniapp/getting-started/environment-specific-implementation' +--- + +`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。 + +## 支持矩阵 + +| 宿主 | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 | +| uni-app x | API 21+ | iOS 14+ | 商业版 API 24 | +| H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 | + +## uni-app + +传统 uni-app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。 + +```javascript +import { + getLoginStatus, + off, + onConnectSuccess, +} from '@/uni_modules/unix-openim-sdk' + +const connectSubscription = onConnectSuccess(() => { + console.log('OpenIM connected') +}) + +const status = await getLoginStatus() + +// 应用 service 销毁时执行。 +off(connectSubscription) +``` + +## uni-app x + +uni-app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。 + +```uts +import { + getLoginStatus, + type OpenIMLoginStatus, +} from '@/uni_modules/unix-openim-sdk' + +const status : OpenIMLoginStatus = await getLoginStatus() +``` + +解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 `UTSJSONObject` 强制转换成业务 DTO。 + +## Android 与 iOS + +Android 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。 + +文件消息使用本机可读的完整路径。`unifile://` 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。 + +## HarmonyOS + +HarmonyOS 仅声明 uni-app x 商业版支持。当前以下操作会稳定返回 `platform-unsupported`:`updateFcmToken`、`updateToken`、`translateText`、`translateMessage`。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见[事件概览](/sdk/uniapp/events/overview-events)。 + +平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。 + +## 生命周期归属 + +SDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 `unInitSDK()`。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx new file mode 100644 index 0000000000..43cda709c1 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx @@ -0,0 +1,48 @@ +--- +title: '处理 App 生命周期、角标与推送 Token' +description: '把 App 前后台、网络、角标和 FCM Token 接入 OpenIM SDK。' +sourcePath: '/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state' +--- + +生命周期上报应由应用级 service 统一负责,而不是每个聊天页面分别调用。前后台和网络变化使用认证页说明的 `setAppBackgroundStatus()` 与 `networkStatusChanged()`;本页说明应用角标和 FCM Token。 + +## 设置应用未读角标 + +```uts +import { setAppBadge } from '@/uni_modules/unix-openim-sdk' + +await setAppBadge(totalUnreadCount) +``` + +`setAppBadge()` 把当前应用总未读数同步给 SDK/平台侧。业务仍应订阅总未读事件维护自己的 UI;Promise 成功不代表桌面角标在所有系统设置下都可见。传 `0` 清除角标。 + +## 更新 FCM Token + +```uts +import { updateFcmToken } from '@/uni_modules/unix-openim-sdk' + +await updateFcmToken({ + fcmToken: deviceFcmToken, + expireTime: tokenExpireUnixSeconds, +}) +``` + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `fcmToken` | `string` | 推送服务为当前设备签发的 Token。 | +| `expireTime` | `number` | Token 到期 Unix 时间;按服务端协议使用秒级时间。 | + +只在取得或刷新有效设备 Token 后调用。不要把 FCM Token 写入公开日志,也不要用 IM Token 代替设备推送 Token。 + +HarmonyOS 当前不实现 `updateFcmToken`,调用会返回 `platform-unsupported`。这属于平台能力缺失,不是商业版鉴权问题;Harmony 推送应由业务使用其平台方案接入。 + +## 推荐时序 + +1. App 启动并初始化 SDK。 +2. 注册账号与消息事件,登录当前用户。 +3. 推送服务返回设备 Token 后调用 `updateFcmToken()`。 +4. 总未读事件到达时更新应用状态并调用 `setAppBadge()`。 +5. App 前后台、网络变化时调用对应生命周期 API。 +6. 退出账号时清空业务角标与推送关联,再清理账号作用域监听。 + +推送到达只表示系统通知链路工作;消息列表仍应通过 SDK 新消息事件和历史查询恢复,不能只依赖通知 payload。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx new file mode 100644 index 0000000000..10703333a7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx @@ -0,0 +1,77 @@ +--- +title: '安装、初始化与 SDK 信息' +description: '安装 UTS 插件,初始化唯一 OpenIM Core,并查询 SDK 版本和数据目录。' +sourcePath: '/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk' +--- + +项目安装 `uni_modules/unix-openim-sdk` 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。 + +## 初始化 + +```uts +import { + OpenIMLogLevelInfo, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, +} from '@/uni_modules/unix-openim-sdk' + +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelInfo, + isLogStandardOutput: true, + systemType: 'android', +} + +const initialized = await initSDK(config) +if (!initialized) { + throw new Error('OpenIM SDK initialization was not accepted') +} +``` + +iOS 改用 `OpenIMPlatformIOS` 和 `systemType: 'ios'`;HarmonyOS 改用 `OpenIMPlatformHarmony` 和 `systemType: 'harmony'`。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 `logFilePath`。 + +### `OpenIMInitConfig` + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `platformID` | `OpenIMPlatform` | 使用插件导出的平台常量。 | +| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 | +| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 | +| `dataDir` | `string \| null`(可选) | Core 数据目录;通常让插件使用平台默认值。 | +| `logFilePath` | `string \| null`(可选) | 日志目录或文件路径,按平台产物约定配置。 | +| `logLevel` | `OpenIMLogLevel` | 使用 `OpenIMLogLevelError`、`OpenIMLogLevelInfo` 等常量。 | +| `isLogStandardOutput` | `boolean` | 是否把 SDK 日志输出到系统控制台。 | +| `systemType` | `string` | 必填的系统说明,初始化示例不得省略。 | + +同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。 + +## 查询版本与数据路径 + +`getSdkVersion()` 和 `getOpenIMDataPath()` 是同步本地操作: + +```uts +import { + getOpenIMDataPath, + getSdkVersion, +} from '@/uni_modules/unix-openim-sdk' + +const version = getSdkVersion() +const dataPath = getOpenIMDataPath() +``` + +数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。 + +## 反初始化 + +```uts +import { unInitSDK } from '@/uni_modules/unix-openim-sdk' + +unInitSDK() +``` + +`unInitSDK()` 返回 `void`。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。 + +初始化完成后,进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx new file mode 100644 index 0000000000..bf2faa3769 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx @@ -0,0 +1,81 @@ +--- +title: '发送第一条消息' +description: '在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。' +sourcePath: '/sdk/uniapp/getting-started/send-first-message' +--- + +本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。 + +## 1. 初始化并登录 + +先按[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)初始化,再从可信后端取得 `userID` 和 Token。登录前注册连接事件,连接成功后才允许发送。 + +```uts +import { + off, + onConnectSuccess, +} from '@/uni_modules/unix-openim-sdk' + +const connectSubscription = onConnectSuccess(() => { + markOpenIMReady() +}) + +// 应用作用域结束时释放。 +off(connectSubscription) +``` + +完整登录和事件清理见[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。 + +## 2. 准备目标 + +| 场景 | `recvID` | `groupID` | +| --- | --- | --- | +| 单聊 | 已存在的接收用户 ID | 空字符串 | +| 群聊 | 空字符串 | 当前用户已加入的群 ID | + +目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。 + +## 3. 创建并发送文本消息 + +```uts +import { + createTextMessage, + sendMessage, +} from '@/uni_modules/unix-openim-sdk' + +const message = await createTextMessage('你好,OpenIMSDK') +if (message == null) { + throw new Error('Failed to create text message') +} + +const sentMessage = await sendMessage({ + message, + recvID: 'user_b', + groupID: '', +}) + +appendOutgoingMessage(sentMessage) +``` + +`createTextMessage()` 只创建本地消息对象,不会发送。`sendMessage()` 成功后直接返回最终 `OpenIMMessageItem`,不需要读取 `{ data }`。发送端按 `clientMsgID` 合并返回值;接收端通过新消息事件按同一标识去重。 + +群聊只需把 `recvID` 改为空字符串,并填入 `groupID`: + +```uts +const sentGroupMessage = await sendMessage({ + message, + recvID: '', + groupID: 'group_123', +}) +``` + +## 4. 双端验证 + +用两个不同账号和两个独立客户端验证: + +1. A 端发送后获得非空 `clientMsgID`,消息状态进入发送成功。 +2. B 端收到新消息事件,并能解析到相同业务内容。 +3. A、B 重新进入会话后,都能从历史消息中读取该消息。 +4. 退出 SDK 后普通事件不再写入旧账号状态。 + +下一步阅读[发送消息](/sdk/uniapp/message/sending-messages/send-message)、[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages)和[加载历史消息](/sdk/uniapp/message/retrieving-messages/load-older-messages)。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx new file mode 100644 index 0000000000..38c26ba8ee --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx @@ -0,0 +1,62 @@ +--- +title: '更新 Token 与观察 SDK session' +description: '商业版更新登录 Token,并通过合成 session 快照防止账号与异步请求串线。' +sourcePath: '/sdk/uniapp/getting-started/update-token-and-observe-sdk-session' +--- + +本页能力属于商业版。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。 + +`onSDKSessionChanged` 是 `unix-openim-sdk` 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。 + +## 读取 session 快照 + +```uts +import { + getSDKSessionSnapshot, + type OpenIMSDKSessionSnapshot, +} from '@/uni_modules/unix-openim-sdk' + +const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot() +``` + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `loginStatus` | `OpenIMLoginStatus` | 当前登录状态。 | +| `userID` | `string \| null` | 当前 SDK 用户;未登录时为 `null`。 | +| `sdkSessionEpoch` | `number` | session 世代。生命周期或账号成功变化后递增。 | +| `sdkVersion` | `string` | 当前插件所连接 Core 的版本。 | + +快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 `userID` 与 `sdkSessionEpoch`,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。 + +## 订阅 session 变化 + +```uts +import { + off, + onSDKSessionChanged, +} from '@/uni_modules/unix-openim-sdk' + +const sessionSubscription = onSDKSessionChanged((snapshot) => { + cancelRequestsFromOlderEpoch(snapshot.sdkSessionEpoch) + replaceActiveSdkUser(snapshot.userID) +}) + +// 应用或依赖插件销毁时执行。 +off(sessionSubscription) +``` + +初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。 + +## 热更新 Token + +```uts +import { updateToken } from '@/uni_modules/unix-openim-sdk' + +await updateToken({ token: freshToken }) +``` + +Token 由可信后端签发。`updateToken()` 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 `platform-unsupported`,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。 + +## 与其他插件协作 + +AV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 `logout()` 或 `unInitSDK()`。用户切换时先销毁依赖插件,再退出并登录新账号。 diff --git a/content/zh/docs/chat/sdk/uniapp/overview.mdx b/content/zh/docs/chat/sdk/uniapp/overview.mdx index 37687d7937..a95b7a19bd 100644 --- a/content/zh/docs/chat/sdk/uniapp/overview.mdx +++ b/content/zh/docs/chat/sdk/uniapp/overview.mdx @@ -1,29 +1,68 @@ --- -title: 'OpenIM uni-app SDK 概览' -description: 'OpenIM uni-app SDK 入口,用于 App、H5 和支持的小程序目标。' +title: 'OpenIM uni-app / uni-app x SDK 概览' +description: '在 uni-app 与 uni-app x 的 Android、iOS 和商业版 HarmonyOS App 中接入 unix-openim-sdk。' sourcePath: '/sdk/uniapp/overview' --- -## 概览 +OpenIM `unix-openim-sdk` 是 UTS 原生插件,为 uni-app 和 uni-app x 的 App 端提供用户、好友、会话、群组、消息、事件与本地数据库能力。插件在宿主进程中持有唯一的 OpenIM Core;业务代码直接从 `@/uni_modules/unix-openim-sdk` 导入函数,不创建 SDK 实例。 -当你希望在一个 uni-app 工程中覆盖 App、H5 以及支持的小程序目标时,可以从 uni-app SDK 开始。接入时应保持认证、用户身份、消息创建、会话状态和事件处理模型与其他 OpenIMClientSDK 一致。 +## 支持范围 -## 适用范围 +| 宿主 | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 | +| uni-app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 | +| Web / 小程序 | 不支持 | 不支持 | 不支持 | -- App 和 H5 构建应使用与你部署的 OpenIMServer 版本匹配的 SDK 包和运行时适配方式。 -- 小程序目标需要额外确认本地存储、网络请求、文件上传和 WebSocket 行为。 -- token 必须由可信后端签发,不应在客户端包内生成或写死用户 token。 +接入和本地编译使用 HBuilderX/uni-app `5.23` 系列。Android、iOS 需要包含插件原生依赖的自定义基座或本地原生工程,标准基座不能加载这些原生制品。 -## 核心接入路径 +## 公共版与商业版 -1. 安装与你的 OpenIMServer 版本匹配的 SDK 包。 -2. 使用 `apiAddr`、`wsAddr`、当前 `userID` 和后端签发的 token 初始化客户端。 -3. 在调用 `login()` 前注册连接事件和消息事件。 -4. 发送第一条文本消息,并在另一个已登录客户端确认收到消息。 -5. 再补充文件消息、推送通知和后台生命周期等平台差异处理。 +同一套文档覆盖公共能力和商业版扩展。标有“商业版”的 API、事件或字段需要商业版 `unix-openim-sdk` 与匹配的 OpenIMServer;没有徽标的能力属于公共接口。商业版归属与平台支持是两个维度:公共 API 也可能在某个平台返回 `platform-unsupported`,页面会单独列出。 -## 相关 SDK +商业版增加信令、SDK session 快照、翻译和部分消息/会话扩展。`onSDKSessionChanged` 是插件层根据初始化、登录、退出、Token 与账号变化合成的事件,不是 OpenIM Core 原生事件。 -- [WASM SDK](/sdk/wasm/overview):查看浏览器和 WebAssembly 方向的核心 API 示例。 -- [Flutter SDK](/sdk/flutter/overview):适合用 Flutter 覆盖移动端和桌面端。 -- [React Native SDK](/sdk/react-native/overview):适合 React Native 应用。 +## 接入顺序 + +1. 安装 `unix-openim-sdk`,为目标平台准备自定义基座或本地原生工程。 +2. 调用 `initSDK()`,配置 `apiAddr`、`wsAddr`、平台、日志和 `systemType`。 +3. 保存连接、消息和业务事件返回的订阅句柄。 +4. 从可信后端取得当前用户的 `userID` 与 Token,再调用 `login(userID, token)`。 +5. 等待 `onConnectSuccess` 后查询快照数据,并用事件增量更新应用状态。 +6. 用户退出时先 `logout()`,再通过 `off(subscription)` 清理监听;只有不再使用 SDK 时才调用 `unInitSDK()`。 + +## 调用模型 + +Promise 成功直接返回业务值,不使用 Web SDK 的 `{ data }` 包装。事件注册同步返回 `OpenIMSDKEventSubscription`,取消时必须传回同一句柄: + +```uts +import { + off, + onRecvNewMessage, +} from '@/uni_modules/unix-openim-sdk' + +const messageSubscription = onRecvNewMessage((message) => { + console.log(message.clientMsgID) +}) + +// 页面或账号作用域结束时清理。 +off(messageSubscription) +``` + +不要使用 `offAll()` 代替正常的局部清理。它会移除当前插件实例中的全部监听,只适合应用整体销毁或可控的测试重置。 + +## 安全边界 + +- Token 必须由可信后端签发,不要把管理员 Token、secret 或固定用户 Token 写入 App。 +- `apiAddr` 与 `wsAddr` 必须从设备真实可访问;真机不能把 `localhost` 当作开发机。 +- SDK 的数据库目录和文件由插件管理,不要直接修改内部数据库。 +- 日志和错误上报应脱敏,避免记录 Token、完整消息内容与商业业务凭据。 +- AV Runtime 是独立 UTS 插件;它复用本插件的唯一登录态,但不属于本 SDK 的公共 IM API。 + +## 下一步 + +- [开始之前](/sdk/uniapp/getting-started/before-you-start) +- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) +- [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message) +- [事件概览](/sdk/uniapp/events/overview-events) From 1952755382024735362c9062446b56840fa81059 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 12:46:10 +0800 Subject: [PATCH 03/20] docs(uniapp): document user and relationship APIs --- .../sdk/uniapp/user/blacklist/add-black.mdx | 20 ++++++++++ .../uniapp/user/blacklist/get-black-list.mdx | 34 +++++++++++++++++ .../uniapp/user/blacklist/remove-black.mdx | 20 ++++++++++ .../accept-friend-application.mdx | 20 ++++++++++ .../user/friend-applications/add-friend.mdx | 20 ++++++++++ .../delete-friend-requests.mdx | 24 ++++++++++++ ...t-friend-application-list-as-applicant.mdx | 21 ++++++++++ ...t-friend-application-list-as-recipient.mdx | 38 +++++++++++++++++++ ...get-friend-application-unhandled-count.mdx | 21 ++++++++++ .../refuse-friend-application.mdx | 20 ++++++++++ .../sdk/uniapp/user/friends/check-friend.mdx | 21 ++++++++++ .../sdk/uniapp/user/friends/delete-friend.mdx | 20 ++++++++++ .../user/friends/get-friend-list-page.mdx | 36 ++++++++++++++++++ .../friends/get-specified-friends-info.mdx | 24 ++++++++++++ .../uniapp/user/friends/search-friends.mdx | 28 ++++++++++++++ .../uniapp/user/friends/update-friends.mdx | 32 ++++++++++++++++ .../get-subscribe-users-status.mdx | 23 +++++++++++ .../online-status/subscribe-users-status.mdx | 29 ++++++++++++++ .../unsubscribe-users-status.mdx | 20 ++++++++++ .../chat/sdk/uniapp/user/overview-user.mdx | 26 +++++++++++++ .../user/profile/get-self-user-info.mdx | 23 +++++++++++ .../uniapp/user/profile/get-users-info.mdx | 24 ++++++++++++ .../profile/set-friend-add-permission.mdx | 16 ++++++++ .../profile/set-global-message-reception.mdx | 22 +++++++++++ .../sdk/uniapp/user/profile/set-self-info.mdx | 24 ++++++++++++ .../sdk/uniapp/user/blacklist/add-black.mdx | 17 +++++++++ .../uniapp/user/blacklist/get-black-list.mdx | 36 ++++++++++++++++++ .../uniapp/user/blacklist/remove-black.mdx | 17 +++++++++ .../accept-friend-application.mdx | 20 ++++++++++ .../user/friend-applications/add-friend.mdx | 21 ++++++++++ .../delete-friend-requests.mdx | 21 ++++++++++ ...t-friend-application-list-as-applicant.mdx | 18 +++++++++ ...t-friend-application-list-as-recipient.mdx | 34 +++++++++++++++++ ...get-friend-application-unhandled-count.mdx | 18 +++++++++ .../refuse-friend-application.mdx | 20 ++++++++++ .../sdk/uniapp/user/friends/check-friend.mdx | 19 ++++++++++ .../sdk/uniapp/user/friends/delete-friend.mdx | 17 +++++++++ .../user/friends/get-friend-list-page.mdx | 34 +++++++++++++++++ .../friends/get-specified-friends-info.mdx | 22 +++++++++++ .../uniapp/user/friends/search-friends.mdx | 24 ++++++++++++ .../uniapp/user/friends/update-friends.mdx | 29 ++++++++++++++ .../get-subscribe-users-status.mdx | 19 ++++++++++ .../online-status/subscribe-users-status.mdx | 31 +++++++++++++++ .../unsubscribe-users-status.mdx | 20 ++++++++++ .../chat/sdk/uniapp/user/overview-user.mdx | 25 ++++++++++++ .../user/profile/get-self-user-info.mdx | 20 ++++++++++ .../uniapp/user/profile/get-users-info.mdx | 21 ++++++++++ .../profile/set-friend-add-permission.mdx | 13 +++++++ .../profile/set-global-message-reception.mdx | 18 +++++++++ .../sdk/uniapp/user/profile/set-self-info.mdx | 30 +++++++++++++++ 50 files changed, 1170 insertions(+) create mode 100644 content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/overview-user.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx create mode 100644 content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/check-friend.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx new file mode 100644 index 0000000000..5c58ae3673 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx @@ -0,0 +1,20 @@ +--- +title: 'Add a user to the blacklist' +description: 'Add a selected user to the current account blacklist.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/blacklist/add-black' +--- + +```uts +import { addBlack } from '@/uni_modules/unix-openim-sdk' + +await addBlack({ toUserID: 'user_b', ex: '' }) +``` + +Confirm through `onBlackAdded` or a fresh blacklist snapshot. Never store tokens, private moderation evidence, or administrator-only data in `ex`. Adding a blacklist entry does not delete local history; conversation hiding and friendship removal are separate operations. diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx new file mode 100644 index 0000000000..782180db87 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx @@ -0,0 +1,34 @@ +--- +title: 'Get the blacklist' +description: 'Load the blacklist and process add and remove events.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/blacklist/get-black-list' +--- + +```uts +import { getBlackList, off, onBlackAdded, onBlackDeleted } from '@/uni_modules/unix-openim-sdk' + +const added = onBlackAdded((user) => upsertBlackUser(user)) +const deleted = onBlackDeleted((user) => removeBlackUser(user.userID)) +const result = await getBlackList() +replaceBlackList(result?.blackUsers ?? []) +off(added) +off(deleted) +``` + +The commercial alternative returns a differently named wrapper field: + +```uts +import { getBlacks } from '@/uni_modules/unix-openim-sdk' + +const commercialResult = await getBlacks() +replaceBlackList(commercialResult?.blacks ?? []) +``` + +Do not mix the `blackUsers` and Commercial `blacks` result shapes. Blacklist and friendship are independent relationships. diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx new file mode 100644 index 0000000000..ff1f76c258 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx @@ -0,0 +1,20 @@ +--- +title: 'Remove a user from the blacklist' +description: 'Remove the selected blacklist relationship.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/blacklist/remove-black' +--- + +```uts +import { removeBlack } from '@/uni_modules/unix-openim-sdk' + +await removeBlack('user_b') +``` + +Confirm through `onBlackDeleted` or a new snapshot. Removal does not restore a deleted friendship or recreate conversations. If repeated removal returns a relation-state error, refresh the snapshot instead of retrying indefinitely. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx new file mode 100644 index 0000000000..4889bfa2b4 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx @@ -0,0 +1,20 @@ +--- +title: 'Accept a friend request' +description: 'Accept a friend request from a selected user.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/accept-friend-application' +--- + +```uts +import { acceptFriendApplication } from '@/uni_modules/unix-openim-sdk' + +await acceptFriendApplication({ toUserID: 'user_b', handleMsg: 'Accepted' }) +``` + +`toUserID` identifies the other party. Update the request and friend stores independently from events or fresh queries. Disable duplicate actions while the request is pending; repeated handling can return a state error. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx new file mode 100644 index 0000000000..08e554b9e3 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx @@ -0,0 +1,20 @@ +--- +title: 'Send a friend request' +description: 'Send a friend request to another user.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/add-friend' +--- + +```uts +import { addFriend } from '@/uni_modules/unix-openim-sdk' + +await addFriend({ toUserID: 'user_b', reqMsg: 'Hello, I am Alice', ex: '' }) +``` + +`reqMsg` is visible to the recipient. Keep tokens, internal permissions, and sensitive data out of both it and `ex`. Promise completion means the request was submitted, not accepted; refresh the sent-request list for its later status. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx new file mode 100644 index 0000000000..c96ef4ac1a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx @@ -0,0 +1,24 @@ +--- +title: 'Delete friend-request records' +description: 'Commercially delete selected friend-request records in a batch.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/delete-friend-requests' +--- + +`deleteFriendRequests()` is Commercial. + +```uts +import { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk' + +await deleteFriendRequests({ + friendRequests: [{ fromUserID: 'user_a', toUserID: 'user_b' }], +}) +``` + +Each `OpenIMSimpleFriendRequest` identifies an exact request. Deleting request history does not remove an established friendship. Confirm targets in the UI and reload both the list and unhandled count; after a batch failure, do not assume which records were removed. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx new file mode 100644 index 0000000000..8b3913f839 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -0,0 +1,21 @@ +--- +title: 'List sent friend requests' +description: 'Read friend requests sent by the current account.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant' +--- + +```uts +import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 }) +renderSentApplications(result?.applications ?? []) +``` + +Parameters are optional. Results can move while pages load, so deduplicate with participant IDs and time fields rather than array indexes. Reload after App restoration, login, or missed events. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx new file mode 100644 index 0000000000..c5aa8bf5c9 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -0,0 +1,38 @@ +--- +title: 'List received friend requests' +description: 'Read received requests and process add, accept, reject, and delete events.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient' +--- + +Register all request events before loading the snapshot. + +```uts +import { + getFriendApplicationListAsRecipient, + off, + onFriendApplicationAccepted, + onFriendApplicationAdded, + onFriendApplicationDeleted, + onFriendApplicationRejected, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const subscriptions : Array = [ + onFriendApplicationAdded((item) => upsertApplication(item)), + onFriendApplicationAccepted((item) => upsertApplication(item)), + onFriendApplicationRejected((item) => upsertApplication(item)), + onFriendApplicationDeleted((item) => removeApplication(item)), +] +const page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 }) +replaceReceivedApplications(page?.applications ?? []) +subscriptions.forEach((subscription) => off(subscription)) +``` + +Use a stable key based on both users and creation time. Handle a request with the accept or reject API; never mutate local state to imitate server success. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx new file mode 100644 index 0000000000..57980f88b0 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get unhandled friend-request count' +description: 'Read the unhandled count displayed on the friend-request entry.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count' +--- + +```uts +import { getFriendApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk' + +const count = await getFriendApplicationUnhandledCount({ offset: 0, count: 100 }) +renderApplicationBadge(count ?? 0) +``` + +Use pagination limits agreed with the server. A nullable result is not a permanently cacheable zero. Requery after request add, accept, reject, or delete events rather than maintaining only local `+1/-1` counters across devices. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx new file mode 100644 index 0000000000..bbcdea60a2 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx @@ -0,0 +1,20 @@ +--- +title: 'Reject a friend request' +description: 'Reject a friend request from a selected user.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friend-applications/refuse-friend-application' +--- + +```uts +import { refuseFriendApplication } from '@/uni_modules/unix-openim-sdk' + +await refuseFriendApplication({ toUserID: 'user_b', handleMsg: 'Not now' }) +``` + +The handling message may be visible to the requester, so omit internal risk decisions and sensitive data. Confirm through `onFriendApplicationRejected` or a fresh request query. Acceptance and rejection are mutually exclusive; lock the UI action while one request is active. diff --git a/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx b/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx new file mode 100644 index 0000000000..6994497319 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx @@ -0,0 +1,21 @@ +--- +title: 'Check friendship' +description: 'Check the friendship between the current account and selected users.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/check-friend' +--- + +```uts +import { checkFriend } from '@/uni_modules/unix-openim-sdk' + +const result = await checkFriend(['user_a', 'user_b']) +result?.result.forEach((relation) => cacheFriendRelation(relation.userID, relation.result)) +``` + +Read results by `userID`, not array position, and interpret relation values through exported constants rather than numeric literals. This query does not create a friendship; use `addFriend()` when appropriate. diff --git a/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx b/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx new file mode 100644 index 0000000000..6700155fa7 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete a friend' +description: 'Remove a friendship with a selected user.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/delete-friend' +--- + +```uts +import { deleteFriend } from '@/uni_modules/unix-openim-sdk' + +await deleteFriend('user_a') +``` + +Confirm final state through `onFriendDeleted` or a fresh friend snapshot. Deleting a friend does not delete conversations/history or add the user to the blacklist. Implement those as explicit operations with a defined compensation order, and ask for user confirmation first. diff --git a/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx new file mode 100644 index 0000000000..e055f81b15 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx @@ -0,0 +1,36 @@ +--- +title: 'List friends' +description: 'Load friends by page or snapshot and process friend changes.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/get-friend-list-page' +--- + +Use `getFriendListPage()` for pagination or `getFriendList()` for a complete small snapshot. Register events before querying. + +```uts +import { + getFriendListPage, + off, + onFriendAdded, + onFriendDeleted, + onFriendInfoChanged, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const subscriptions : Array = [ + onFriendAdded((friend) => upsertFriend(friend.userID, friend)), + onFriendDeleted((friend) => removeFriend(friend.userID)), + onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)), +] +const page = await getFriendListPage({ offset: 0, count: 100 }) +replaceFriendSnapshot(page?.friends ?? []) +subscriptions.forEach((subscription) => off(subscription)) +``` + +Start `offset` at 0, continue until fewer than `count` items return, and deduplicate by `userID`. `getFriendList(filterBlack)` optionally filters blacklist entries but does not merge the two relationship types. Reload after login, reconnection, or state loss. diff --git a/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx b/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx new file mode 100644 index 0000000000..778b2ba60a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx @@ -0,0 +1,24 @@ +--- +title: 'Get selected friend profiles' +description: 'Read friendship details for selected user IDs.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/get-specified-friends-info' +--- + +```uts +import { getSpecifiedFriendsInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedFriendsInfo({ + userIDList: ['user_a', 'user_b'], + filterBlack: false, +}) +const friends = result?.friends ?? [] +``` + +The result can be shorter or differently ordered. Map it by `userID`; missing users may not be friends, may be filtered, or may be inaccessible. `filterBlack` changes this result only and never removes blacklist relationships. diff --git a/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx new file mode 100644 index 0000000000..8943b4771c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx @@ -0,0 +1,28 @@ +--- +title: 'Search friends' +description: 'Search current friends by ID, nickname, or remark.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/search-friends' +--- + +`searchFriends()` searches only current friends, not every server user. + +```uts +import { searchFriends } from '@/uni_modules/unix-openim-sdk' + +const result = await searchFriends({ + keywordList: ['Alice'], + isSearchUserID: true, + isSearchNickname: true, + isSearchRemark: true, +}) +renderFriends(result?.friends ?? []) +``` + +Reject an empty search in the UI, deduplicate results by `userID`, and merge later friend events. Search flags affect only this query and do not update profiles or server indexes. diff --git a/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx new file mode 100644 index 0000000000..9ac052665a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -0,0 +1,32 @@ +--- +title: 'Update friend details' +description: 'Update friend remarks, pinned state, or extension values.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/friends/update-friends' +--- + +`updateFriends()` updates selected fields for one or more friendships. + +```uts +import { updateFriends } from '@/uni_modules/unix-openim-sdk' + +await updateFriends({ friendUserIDs: ['user_a', 'user_b'], remark: 'Project team', isPinned: true }) +``` + +`friendUserIDs` must not be empty. Omitted `remark`, `isPinned`, and `ex` fields remain unchanged. Confirm through `onFriendInfoChanged` or a new query. + +The commercial single-user alternative uses `pinned`: + +```uts +import { updateFriend } from '@/uni_modules/unix-openim-sdk' + +await updateFriend({ userID: 'user_a', pinned: true, remark: 'Owner' }) +``` + +Do not race `updateFriends()` and Commercial `updateFriend()` for the same user. diff --git a/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx new file mode 100644 index 0000000000..67604059b9 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx @@ -0,0 +1,23 @@ +--- +title: 'Get subscribed user presence' +description: 'Read a snapshot for users whose status is already subscribed.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/online-status/get-subscribe-users-status' +--- + +`getSubscribeUsersStatus()` takes no user IDs and returns the current subscribed-user snapshot. + +```uts +import { getSubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' + +const result = await getSubscribeUsersStatus() +result?.statuses.forEach((status) => replaceUserStatus(status.userID, status)) +``` + +An empty list can mean no subscriptions or no available presence; it does not diagnose connectivity. Continue merging `onUserStatusChanged`, and reload this snapshot after foreground restoration or store reconstruction. diff --git a/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx new file mode 100644 index 0000000000..73cd5e6ead --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx @@ -0,0 +1,29 @@ +--- +title: 'Subscribe to user presence' +description: 'Subscribe to user status and merge onUserStatusChanged updates.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/online-status/subscribe-users-status' +--- + +Register the event before subscribing and querying a snapshot to minimize the event/snapshot gap. + +```uts +import { getUserStatus, off, onUserStatusChanged, subscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' + +const presenceSubscription = onUserStatusChanged((result) => { + result.statuses.forEach((status) => replaceUserStatus(status.userID, status)) +}) +const userIDs = ['user_a', 'user_b'] +await subscribeUsersStatus(userIDs) +const snapshot = await getUserStatus(userIDs) +snapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status)) +off(presenceSubscription) +``` + +Presence can include per-platform details. Merge by user and platform; one offline device does not imply that every device is offline. Subscribe only to needed users and later call `unsubscribeUsersStatus()`. diff --git a/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx new file mode 100644 index 0000000000..5ca0c187b5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx @@ -0,0 +1,20 @@ +--- +title: 'Unsubscribe from user presence' +description: 'Stop receiving presence changes for selected users.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/online-status/unsubscribe-users-status' +--- + +```uts +import { unsubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' + +await unsubscribeUsersStatus(['user_a', 'user_b']) +``` + +This removes only the selected server-side subscriptions. It does not remove other users or release the local `onUserStatusChanged` handler. Manage both lifecycles: call this API for unwanted users and `off(subscription)` when the local event owner ends. On failure, retain local bookkeeping and retry according to network state rather than looping rapidly. diff --git a/content/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/docs/chat/sdk/uniapp/user/overview-user.mdx new file mode 100644 index 0000000000..e24b62baf8 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -0,0 +1,26 @@ +--- +title: 'User overview' +description: 'Understand user profiles, presence, friendships, friend requests, and the blacklist.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/overview-user' +--- + +The user domain covers the current profile, public profiles, presence, friendships, friend requests, and blacklist entries. Use stable `userID` values as keys; nicknames and avatars can change. + +`OpenIMUserInfo` includes public `userID`, `nickname`, `faceURL`, `ex`, and optional `createTime`. `attachedInfo` and `globalRecvMsgOpt` are Commercial extensions and must remain optional. Friend data uses `OpenIMFriendUserItem`, blacklist data uses `OpenIMBlackUserItem`, and requests use `OpenIMFriendApplicationItem`. + +Register events before loading a snapshot, then merge both sources idempotently by `userID`. Reload snapshots after reconnection, login, or process restoration; events alone are not a complete database. + +- [Read your profile](/sdk/uniapp/user/profile/get-self-user-info) +- [Subscribe to presence](/sdk/uniapp/user/online-status/subscribe-users-status) +- [List friends](/sdk/uniapp/user/friends/get-friend-list-page) +- [Read received friend requests](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) +- [Read the blacklist](/sdk/uniapp/user/blacklist/get-black-list) + +Your application backend remains authoritative for identity and authorization. Chat profiles must not replace account authentication. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx new file mode 100644 index 0000000000..0c44146ecb --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -0,0 +1,23 @@ +--- +title: 'Get your profile' +description: 'Read the OpenIM profile of the logged-in user.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/profile/get-self-user-info' +--- + +`getSelfUserInfo()` resolves to `OpenIMUserInfo | null` for the current logged-in account. + +```uts +import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' + +const self = await getSelfUserInfo() +if (self != null) renderProfile(self.nickname, self.faceURL) +``` + +Verify that the returned `userID` matches the application account. `attachedInfo` and `globalRecvMsgOpt` are optional Commercial fields. Refresh this snapshot after login or missed events; ongoing updates arrive through `onSelfInfoUpdated` on the profile-update page. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx new file mode 100644 index 0000000000..cf678e3c9a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -0,0 +1,24 @@ +--- +title: 'Get user profiles' +description: 'Read public profiles for a list of user IDs.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/profile/get-users-info' +--- + +`getUsersInfo()` resolves to `OpenIMUserListResult | null`. + +```uts +import { getUsersInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getUsersInfo(['user_a', 'user_b']) +const users = result?.users ?? [] +users.forEach((user) => cacheUser(user.userID, user)) +``` + +Results can be shorter than the request and are not ordered like the input. Map by `userID` and retain placeholders for missing or inaccessible users. Treat commercial `attachedInfo` and `globalRecvMsgOpt` as optional, and never trust `ex` or `attachedInfo` as identity credentials. Batch and cache large lookups. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx new file mode 100644 index 0000000000..c18a849389 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx @@ -0,0 +1,16 @@ +--- +title: 'Set friend-add permission' +description: 'Understand the commercial friend-add policy and the current plugin write boundary.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/profile/set-friend-add-permission' +--- + +Friend-add permission is a Commercial account policy. `unix-openim-sdk 0.2.0-rc.3` exposes the related profile data but `OpenIMSetSelfInfoParams` has no `addFriendPermission` setter. + +Do not invent a client setter or store this policy in `ex`. Change it through a supported commercial backend/administration API, then reload the user profile. If the field is absent, show the capability as unavailable instead of assuming a policy. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx new file mode 100644 index 0000000000..70aa56e7fe --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -0,0 +1,22 @@ +--- +title: 'Set global message reception' +description: 'Set the commercial account-wide globalRecvMsgOpt profile field.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' +--- + +`globalRecvMsgOpt` is a Commercial optional field of `OpenIMSetSelfInfoParams`. It controls the account globally and is different from a conversation's `recvMsgOpt`. + +```uts +import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' + +await setSelfInfo({ globalRecvMsgOpt: 0 }) +``` + +Use exported `OpenIMSetSelfInfoRecvMsgOpt` constants and send only this field to avoid overwriting profile data. Confirm the final value with `getSelfUserInfo()`. Hide or disable this control when the deployed edition does not expose the field. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx new file mode 100644 index 0000000000..8655d679de --- /dev/null +++ b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -0,0 +1,24 @@ +--- +title: 'Update your profile' +description: 'Update selected profile fields and process onSelfInfoUpdated.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/user/profile/set-self-info' +--- + +Pass only fields that should change; do not use empty strings to mean “unchanged.” + +```uts +import { off, onSelfInfoUpdated, setSelfInfo } from '@/uni_modules/unix-openim-sdk' + +const profileSubscription = onSelfInfoUpdated((user) => replaceCurrentUser(user.userID, user)) +await setSelfInfo({ nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png' }) +off(profileSubscription) +``` + +`OpenIMSetSelfInfoParams` supports `nickname`, `faceURL`, `ex`, and commercial `globalRecvMsgOpt`. Replace cached data by `userID` from the event or a fresh query. Each page must release its own handle, or an application user store can own one shared subscription. diff --git a/content/zh/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx b/content/zh/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx new file mode 100644 index 0000000000..2847d7ba66 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx @@ -0,0 +1,17 @@ +--- +title: '加入黑名单' +description: '把指定用户加入当前账号的黑名单。' +sourcePath: '/sdk/uniapp/user/blacklist/add-black' +--- + +`addBlack()` 把目标用户加入黑名单,可附带双方约定的扩展字符串。 + +```uts +import { addBlack } from '@/uni_modules/unix-openim-sdk' + +await addBlack({ toUserID: 'user_b', ex: '' }) +``` + +Promise 成功后,以 `onBlackAdded` 或重新查询黑名单确认最终状态。不要在 `ex` 中写入 Token、内部封禁证据或仅管理员可见的数据。 + +加入黑名单不会自动删除本地历史消息。产品如需隐藏会话或解除好友,应作为独立操作并设计失败补偿。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx b/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx new file mode 100644 index 0000000000..1cbf066d26 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx @@ -0,0 +1,36 @@ +--- +title: '查询黑名单' +description: '查询黑名单快照,并处理加入与移除黑名单事件。' +sourcePath: '/sdk/uniapp/user/blacklist/get-black-list' +--- + +公共入口 `getBlackList()` 返回 `OpenIMBlackListResult | null`。本页同时归属 `onBlackAdded` 与 `onBlackDeleted`。 + +```uts +import { + getBlackList, + off, + onBlackAdded, + onBlackDeleted, +} from '@/uni_modules/unix-openim-sdk' + +const blackAddedSubscription = onBlackAdded((user) => upsertBlackUser(user)) +const blackDeletedSubscription = onBlackDeleted((user) => removeBlackUser(user.userID)) + +const result = await getBlackList() +replaceBlackList(result?.blackUsers ?? []) + +off(blackAddedSubscription) +off(blackDeletedSubscription) +``` + +商业版还提供 `getBlacks()` 商业版,返回包装字段名为 `blacks`: + +```uts +import { getBlacks } from '@/uni_modules/unix-openim-sdk' + +const commercialResult = await getBlacks() +replaceBlackList(commercialResult?.blacks ?? []) +``` + +两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx b/content/zh/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx new file mode 100644 index 0000000000..9c3c9e341f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx @@ -0,0 +1,17 @@ +--- +title: '移出黑名单' +description: '把指定用户从当前账号的黑名单移除。' +sourcePath: '/sdk/uniapp/user/blacklist/remove-black' +--- + +`removeBlack()` 按用户 ID 移除黑名单关系。 + +```uts +import { removeBlack } from '@/uni_modules/unix-openim-sdk' + +await removeBlack('user_b') +``` + +Promise 成功后,以 `onBlackDeleted` 或重新查询结果更新 UI。移出黑名单不会自动恢复已删除的好友关系,也不会重新创建被隐藏或删除的会话。 + +重复移除可能返回关系状态错误。操作失败时刷新黑名单快照,不要无限重试。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx new file mode 100644 index 0000000000..bdd59e688f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx @@ -0,0 +1,20 @@ +--- +title: '接受好友申请' +description: '接受指定用户发来的好友申请。' +sourcePath: '/sdk/uniapp/user/friend-applications/accept-friend-application' +--- + +`acceptFriendApplication()` 接受目标用户的申请,并可附带处理说明。 + +```uts +import { acceptFriendApplication } from '@/uni_modules/unix-openim-sdk' + +await acceptFriendApplication({ + toUserID: 'user_b', + handleMsg: '已通过', +}) +``` + +这里的 `toUserID` 是申请对方的用户 ID。Promise 成功后,申请状态和好友列表分别由申请事件、好友新增事件或重新查询确认;不要只在一个列表中更新。 + +重复处理可能由服务端返回状态错误,UI 应在请求期间禁用重复操作,并在失败后重新查询申请详情。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx new file mode 100644 index 0000000000..4b9e70b4be --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx @@ -0,0 +1,21 @@ +--- +title: '发起好友申请' +description: '向指定用户发送好友申请。' +sourcePath: '/sdk/uniapp/user/friend-applications/add-friend' +--- + +使用 `addFriend()` 向目标用户发起申请。目标用户、验证文案和可选扩展数据通过 `OpenIMAddFriendParams` 传入。 + +```uts +import { addFriend } from '@/uni_modules/unix-openim-sdk' + +await addFriend({ + toUserID: 'user_b', + reqMsg: '你好,我是 Alice', + ex: '', +}) +``` + +`reqMsg` 会展示给接收方,不应包含 Token、内部权限信息或其他敏感数据。`ex` 只存放双方约定且可安全公开给申请接收者的扩展字符串。 + +Promise 成功不等于已经成为好友;接收方仍可能接受或拒绝。申请方可通过[查询发出的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant)刷新状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx new file mode 100644 index 0000000000..d66c37e91f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx @@ -0,0 +1,21 @@ +--- +title: '删除好友申请记录' +description: '商业版批量删除指定好友申请记录。' +sourcePath: '/sdk/uniapp/user/friend-applications/delete-friend-requests' +--- + +`deleteFriendRequests()` 商业版 批量删除明确指定的好友申请记录。 + +```uts +import { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk' + +await deleteFriendRequests({ + friendRequests: [ + { fromUserID: 'user_a', toUserID: 'user_b' }, + ], +}) +``` + +`friendRequests` 中每项使用 `OpenIMSimpleFriendRequest` 的 `fromUserID` 与 `toUserID` 精确定位。删除申请记录不会自动解除已经建立的好友关系。 + +Promise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx new file mode 100644 index 0000000000..771a424087 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -0,0 +1,18 @@ +--- +title: '查询发出的好友申请' +description: '分页读取当前账号发出的好友申请。' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant' +--- + +`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。 + +```uts +import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 }) +renderSentApplications(result?.applications ?? []) +``` + +参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。 + +申请状态变化事件统一在[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx new file mode 100644 index 0000000000..ad6ad2b8ea --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -0,0 +1,34 @@ +--- +title: '查询收到的好友申请' +description: '分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient' +--- + +`getFriendApplicationListAsRecipient()` 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。 + +```uts +import { + getFriendApplicationListAsRecipient, + off, + onFriendApplicationAccepted, + onFriendApplicationAdded, + onFriendApplicationDeleted, + onFriendApplicationRejected, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const addedSubscription = onFriendApplicationAdded((item) => upsertApplication(item)) +const subscriptions : Array = [ + addedSubscription, + onFriendApplicationAccepted((item) => upsertApplication(item)), + onFriendApplicationRejected((item) => upsertApplication(item)), + onFriendApplicationDeleted((item) => removeApplication(item)), +] + +const page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 }) +replaceReceivedApplications(page?.applications ?? []) + +subscriptions.forEach((subscription) => off(subscription)) +``` + +参数可省略;显式分页时 `offset` 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx new file mode 100644 index 0000000000..68be3291e8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx @@ -0,0 +1,18 @@ +--- +title: '查询未处理好友申请数' +description: '查询好友申请入口的未处理数量。' +sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count' +--- + +`getFriendApplicationUnhandledCount()` 返回未处理好友申请数量,结果可能为 `null`。 + +```uts +import { getFriendApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk' + +const count = await getFriendApplicationUnhandledCount({ offset: 0, count: 100 }) +renderApplicationBadge(count ?? 0) +``` + +分页参数用于限制本次统计查询范围,实际产品应使用与服务端约定一致的 `count`。不要把 `null` 永久缓存成 0;它也可能表示当前没有有效结果。 + +申请新增、接受、拒绝或删除时重新查询数量,避免在多个设备和断线恢复场景下只做本地 `+1/-1` 而漂移。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx new file mode 100644 index 0000000000..68ef63145d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx @@ -0,0 +1,20 @@ +--- +title: '拒绝好友申请' +description: '拒绝指定用户发来的好友申请。' +sourcePath: '/sdk/uniapp/user/friend-applications/refuse-friend-application' +--- + +`refuseFriendApplication()` 拒绝目标用户的申请。 + +```uts +import { refuseFriendApplication } from '@/uni_modules/unix-openim-sdk' + +await refuseFriendApplication({ + toUserID: 'user_b', + handleMsg: '暂不添加', +}) +``` + +处理说明可能对申请方可见,不应包含内部风控原因或敏感信息。Promise 成功后,以 `onFriendApplicationRejected` 或重新查询结果更新状态。 + +接受与拒绝互斥。请求开始后锁定该申请项,避免用户快速点击造成并行请求。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/check-friend.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/check-friend.mdx new file mode 100644 index 0000000000..38992821b8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/check-friend.mdx @@ -0,0 +1,19 @@ +--- +title: '检查好友关系' +description: '批量检查当前账号与指定用户的好友关系。' +sourcePath: '/sdk/uniapp/user/friends/check-friend' +--- + +`checkFriend()` 批量检查当前账号与用户列表之间的关系,返回 `OpenIMCheckFriendResult | null`。 + +```uts +import { checkFriend } from '@/uni_modules/unix-openim-sdk' + +const result = await checkFriend(['user_a', 'user_b']) +const relations = result?.result ?? [] +relations.forEach((relation) => cacheFriendRelation(relation.userID, relation.result)) +``` + +关系结果应按 `userID` 读取,不依赖数组顺序。具体数值含义使用插件导出的好友关系常量,不在业务代码中散落裸数字。 + +本方法是查询,不会创建好友关系。不是好友时,使用[发起好友申请](/sdk/uniapp/user/friend-applications/add-friend);已有好友的资料和变化通过[查询好友列表](/sdk/uniapp/user/friends/get-friend-list-page)维护。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx new file mode 100644 index 0000000000..90fe00635b --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx @@ -0,0 +1,17 @@ +--- +title: '删除好友' +description: '解除与指定用户的好友关系。' +sourcePath: '/sdk/uniapp/user/friends/delete-friend' +--- + +`deleteFriend()` 解除当前账号与指定用户的好友关系。 + +```uts +import { deleteFriend } from '@/uni_modules/unix-openim-sdk' + +await deleteFriend('user_a') +``` + +Promise 成功表示请求完成。好友列表应以 `onFriendDeleted` 事件或重新查询结果为准;完整监听见[查询好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。 + +删除好友不会自动删除会话、历史消息或加入黑名单。产品如需这些行为,应分别调用对应 API,并明确失败补偿顺序。删除前应由 UI 二次确认,避免误操作。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx new file mode 100644 index 0000000000..9ffee2b4e7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx @@ -0,0 +1,34 @@ +--- +title: '查询好友列表' +description: '分页或一次性查询好友,并处理好友新增、删除与资料变化事件。' +sourcePath: '/sdk/uniapp/user/friends/get-friend-list-page' +--- + +`getFriendListPage()` 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 `getFriendList()`。本页同时归属好友新增、删除和资料变化事件。 + +```uts +import { + getFriendListPage, + off, + onFriendAdded, + onFriendDeleted, + onFriendInfoChanged, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const friendAddedSubscription = onFriendAdded((friend) => upsertFriend(friend.userID, friend)) +const subscriptions : Array = [ + friendAddedSubscription, + onFriendDeleted((friend) => removeFriend(friend.userID)), + onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)), +] + +const page = await getFriendListPage({ offset: 0, count: 100 }) +replaceFriendSnapshot(page?.friends ?? []) + +subscriptions.forEach((subscription) => off(subscription)) +``` + +`offset` 从 `0` 开始,`count` 是本页期望数量。继续分页直到返回数量小于 `count`,并按 `userID` 去重。`getFriendList(filterBlack)` 的 `filterBlack` 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。 + +事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx new file mode 100644 index 0000000000..3dbf3bd8bd --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx @@ -0,0 +1,22 @@ +--- +title: '查询指定好友资料' +description: '按 userID 列表读取指定好友关系资料。' +sourcePath: '/sdk/uniapp/user/friends/get-specified-friends-info' +--- + +`getSpecifiedFriendsInfo()` 接收用户 ID 列表,并可选择过滤黑名单用户。 + +```uts +import { getSpecifiedFriendsInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedFriendsInfo({ + userIDList: ['user_a', 'user_b'], + filterBlack: false, +}) + +const friends = result?.friends ?? [] +``` + +返回列表可能少于输入列表,且不保证顺序。按 `userID` 建立映射;未返回用户可能不是好友、被过滤或当前不可查询。 + +`filterBlack: true` 只影响结果过滤,不会移除黑名单关系。需要判断双方关系时使用[检查好友关系](/sdk/uniapp/user/friends/check-friend),需要公共用户资料时使用[批量查询用户资料](/sdk/uniapp/user/profile/get-users-info)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx new file mode 100644 index 0000000000..acf1ff4a45 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx @@ -0,0 +1,24 @@ +--- +title: '搜索好友' +description: '按用户 ID、昵称或备注搜索当前好友。' +sourcePath: '/sdk/uniapp/user/friends/search-friends' +--- + +`searchFriends()` 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。 + +```uts +import { searchFriends } from '@/uni_modules/unix-openim-sdk' + +const result = await searchFriends({ + keywordList: ['Alice'], + isSearchUserID: true, + isSearchNickname: true, + isSearchRemark: true, +}) + +renderFriends(result?.friends ?? []) +``` + +`keywordList` 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 `OpenIMFriendListResult`,按 `userID` 去重并结合最新好友事件更新。 + +搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx new file mode 100644 index 0000000000..8768cd352f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -0,0 +1,29 @@ +--- +title: '更新好友资料' +description: '批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。' +sourcePath: '/sdk/uniapp/user/friends/update-friends' +--- + +`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 + +```uts +import { updateFriends } from '@/uni_modules/unix-openim-sdk' + +await updateFriends({ + friendUserIDs: ['user_a', 'user_b'], + remark: '项目成员', + isPinned: true, +}) +``` + +`friendUserIDs` 不能为空。`remark`、`isPinned` 和 `ex` 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 `onFriendInfoChanged` 或重新查询好友列表确认。 + +商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`: + +```uts +import { updateFriend } from '@/uni_modules/unix-openim-sdk' + +await updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' }) +``` + +不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx b/content/zh/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx new file mode 100644 index 0000000000..b6b775afd0 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx @@ -0,0 +1,19 @@ +--- +title: '查询已订阅用户状态' +description: '读取当前账号已经订阅的用户在线状态快照。' +sourcePath: '/sdk/uniapp/user/online-status/get-subscribe-users-status' +--- + +`getSubscribeUsersStatus()` 返回当前账号已订阅用户的状态快照,不接收用户 ID 参数。 + +```uts +import { getSubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' + +const result = await getSubscribeUsersStatus() +const statuses = result?.statuses ?? [] +statuses.forEach((status) => replaceUserStatus(status.userID, status)) +``` + +空结果可能表示尚未订阅、订阅用户当前没有可用状态,或服务端返回空列表。不要只用数组长度判断连接是否正常。 + +持续变化仍由 `onUserStatusChanged` 提供,完整订阅和清理见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。本方法适合 App 恢复前台或状态 store 重建时重新获取快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx b/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx new file mode 100644 index 0000000000..ee3b248c2b --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx @@ -0,0 +1,31 @@ +--- +title: '订阅用户在线状态' +description: '订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。' +sourcePath: '/sdk/uniapp/user/online-status/subscribe-users-status' +--- + +`subscribeUsersStatus()` 为指定用户建立状态订阅;`getUserStatus()` 可立即查询这些用户的当前状态。`onUserStatusChanged` 是本页的完整事件归属。 + +```uts +import { + getUserStatus, + off, + onUserStatusChanged, + subscribeUsersStatus, +} from '@/uni_modules/unix-openim-sdk' + +const statusSubscription = onUserStatusChanged((result) => { + result.statuses.forEach((status) => replaceUserStatus(status.userID, status)) +}) + +const userIDs = ['user_a', 'user_b'] +await subscribeUsersStatus(userIDs) +const snapshot = await getUserStatus(userIDs) +snapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status)) + +off(statusSubscription) +``` + +先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 `userID` 和平台更新,不把一次离线事件等同于用户所有设备都离线。 + +只订阅当前界面或业务确实需要的用户,并在不再需要时调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx b/content/zh/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx new file mode 100644 index 0000000000..95ff1421c8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx @@ -0,0 +1,20 @@ +--- +title: '取消用户在线状态订阅' +description: '停止接收指定用户的在线状态变化。' +sourcePath: '/sdk/uniapp/user/online-status/unsubscribe-users-status' +--- + +页面或业务不再关注一组用户时,调用 `unsubscribeUsersStatus()` 释放服务端状态订阅。 + +```uts +import { unsubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' + +await unsubscribeUsersStatus(['user_a', 'user_b']) +``` + +该调用只取消传入用户,不会清空其他订阅,也不会自动释放本地 `onUserStatusChanged` 事件句柄。页面应同时维护两层生命周期: + +1. 用本 API取消不再需要的用户状态订阅。 +2. 在事件 owner 作用域结束时,通过 `off(subscription)` 清理本地事件处理器。 + +重复取消应按幂等业务处理;失败时保留本地订阅记录并根据网络状态决定是否重试,不要高频循环调用。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx new file mode 100644 index 0000000000..a34215f7a6 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -0,0 +1,25 @@ +--- +title: '用户概览' +description: '理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。' +sourcePath: '/sdk/uniapp/user/overview-user' +--- + +用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。`userID` 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。 + +## 核心模型 + +`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。 + +好友数据使用 `OpenIMFriendUserItem`,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 `OpenIMBlackUserItem`。好友申请使用 `OpenIMFriendApplicationItem`,申请状态由接受、拒绝和删除事件增量更新。 + +## 快照与事件 + +页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。 + +- 当前资料:[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)与[修改自己的资料](/sdk/uniapp/user/profile/set-self-info) +- 在线状态:[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) +- 好友:[分页查询好友](/sdk/uniapp/user/friends/get-friend-list-page) +- 好友申请:[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) +- 黑名单:[查询黑名单](/sdk/uniapp/user/blacklist/get-black-list) + +业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx new file mode 100644 index 0000000000..8a4e942536 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -0,0 +1,20 @@ +--- +title: '查询自己的资料' +description: '读取当前已登录用户的 OpenIM 资料。' +sourcePath: '/sdk/uniapp/user/profile/get-self-user-info' +--- + +`getSelfUserInfo()` 查询当前 SDK 登录账号的资料,返回 `OpenIMUserInfo | null`。调用前应确认 SDK 已登录且连接可用。 + +```uts +import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' + +const self = await getSelfUserInfo() +if (self != null) { + renderProfile(self.nickname, self.faceURL) +} +``` + +以返回的 `userID` 校验应用账号与 SDK 账号是否一致。`nickname`、`faceURL` 和 `ex` 属于公共字段;`attachedInfo` 与 `globalRecvMsgOpt` 商业版 为可选扩展,不应在公共环境中强制解包。 + +资料变化由[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)页面归属的 `onSelfInfoUpdated` 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx new file mode 100644 index 0000000000..b95ae49283 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -0,0 +1,21 @@ +--- +title: '批量查询用户资料' +description: '按 userID 列表查询用户公开资料。' +sourcePath: '/sdk/uniapp/user/profile/get-users-info' +--- + +使用 `getUsersInfo()` 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 `OpenIMUserListResult | null`。 + +```uts +import { getUsersInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getUsersInfo(['user_a', 'user_b']) +const users = result?.users ?? [] +users.forEach((user) => cacheUser(user.userID, user)) +``` + +返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 + +`OpenIMUserInfo` 字段见[用户概览](/sdk/uniapp/user/overview-user)。其中 `attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 `ex` 或 `attachedInfo` 当作可信身份凭据。 + +大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx new file mode 100644 index 0000000000..cb2cda136e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx @@ -0,0 +1,13 @@ +--- +title: '设置加好友权限' +description: '说明商业版加好友权限字段与当前 unix-openim-sdk 的写入边界。' +sourcePath: '/sdk/uniapp/user/profile/set-friend-add-permission' +--- + +加好友权限属于商业版账号策略。锁定的 `unix-openim-sdk 0.2.0-rc.3` 会在用户模型中公开相关商业字段,但当前 `OpenIMSetSelfInfoParams` 没有独立的 `addFriendPermission` 写入参数。 + +因此本版本不能通过本插件伪造一个 setter,也不要把该值塞进 `ex`。需要修改时,应由商业版业务后端或已确认支持该字段的管理接口完成;客户端随后重新查询当前资料并刷新 UI。 + +页面展示该开关前应进行能力判断。公共版、旧服务端或没有返回该字段时,把状态显示为“不可配置”,不要默认成“允许任何人添加”或“需要验证”。 + +好友申请的客户端流程见[发起好友申请](/sdk/uniapp/user/friend-applications/add-friend)与[处理收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx new file mode 100644 index 0000000000..dc9b60b729 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -0,0 +1,18 @@ +--- +title: '设置全局消息接收选项' +description: '通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。' +sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' +--- + +`globalRecvMsgOpt` 商业版 是 `OpenIMSetSelfInfoParams` 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 `recvMsgOpt` 不同:前者影响账号全局,后者只影响指定会话。 + +```uts +import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' + +// 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。 +await setSelfInfo({ globalRecvMsgOpt: 0 }) +``` + +只传 `globalRecvMsgOpt`,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)确认最终值;当前插件没有为这一字段单独提供 setter。 + +公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx new file mode 100644 index 0000000000..b01a5d5a81 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -0,0 +1,30 @@ +--- +title: '修改自己的资料' +description: '更新当前用户资料并处理 onSelfInfoUpdated 事件。' +sourcePath: '/sdk/uniapp/user/profile/set-self-info' +--- + +`setSelfInfo()` 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。 + +```uts +import { + off, + onSelfInfoUpdated, + setSelfInfo, +} from '@/uni_modules/unix-openim-sdk' + +const selfInfoSubscription = onSelfInfoUpdated((user) => { + replaceCurrentUser(user.userID, user) +}) + +await setSelfInfo({ + nickname: 'OpenIM User', + faceURL: 'https://cdn.example.com/avatar.png', +}) + +off(selfInfoSubscription) +``` + +`OpenIMSetSelfInfoParams` 支持 `nickname`、`faceURL`、`ex`,以及商业版使用的 `globalRecvMsgOpt`。Promise 成功表示服务端接受修改;界面最终状态以 `onSelfInfoUpdated` 或重新查询的资料为准。 + +事件返回完整 `OpenIMUserInfo`。按 `userID` 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。 From 2f8d1f2276fb1397f40adeb625462f61bb4d190e Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 12:52:24 +0800 Subject: [PATCH 04/20] docs(uniapp): document conversation APIs --- .../add-conversations-to-groups.mdx | 20 +++++++++ .../create-conversation-group.mdx | 20 +++++++++ .../delete-conversation-group.mdx | 20 +++++++++ ...-conversation-group-by-conversation-id.mdx | 20 +++++++++ ...ersation-group-info-with-conversations.mdx | 20 +++++++++ .../get-conversation-groups.mdx | 21 +++++++++ .../overview-conversation-groups.mdx | 34 ++++++++++++++ .../remove-conversations-from-groups.mdx | 20 +++++++++ .../set-conversation-group-order.mdx | 20 +++++++++ .../update-conversation-group.mdx | 20 +++++++++ .../clear-conversation-messages.mdx | 20 +++++++++ .../clear-group-mentions.mdx | 20 +++++++++ .../delete-conversation-with-messages.mdx | 20 +++++++++ .../delete-conversation.mdx | 20 +++++++++ .../get-total-unread-count.mdx | 23 ++++++++++ .../hide-a-conversation.mdx | 20 +++++++++ .../hide-all-conversations.mdx | 20 +++++++++ .../mark-all-conversations-read.mdx | 20 +++++++++ .../mark-conversation-read.mdx | 24 ++++++++++ .../mark-conversation.mdx | 14 ++++++ .../pin-conversation.mdx | 20 +++++++++ .../set-burn-duration.mdx | 22 +++++++++ .../set-conversation-draft.mdx | 20 +++++++++ .../set-conversation-extension.mdx | 20 +++++++++ .../set-conversation-remark.mdx | 14 ++++++ .../set-message-destruct.mdx | 14 ++++++ .../set-message-receive-option.mdx | 20 +++++++++ .../set-private-chat.mdx | 22 +++++++++ .../conversation/overview-conversation.mdx | 16 +++++++ .../get-conversation-by-target.mdx | 23 ++++++++++ .../get-conversation-id.mdx | 20 +++++++++ .../get-conversations-by-id.mdx | 21 +++++++++ .../retrieve-conversation-list.mdx | 27 +++++++++++ .../search-conversations.mdx | 21 +++++++++ .../add-conversations-to-groups.mdx | 18 ++++++++ .../create-conversation-group.mdx | 23 ++++++++++ .../delete-conversation-group.mdx | 15 +++++++ ...-conversation-group-by-conversation-id.mdx | 16 +++++++ ...ersation-group-info-with-conversations.mdx | 18 ++++++++ .../get-conversation-groups.mdx | 16 +++++++ .../overview-conversation-groups.mdx | 45 +++++++++++++++++++ .../remove-conversations-from-groups.mdx | 18 ++++++++ .../set-conversation-group-order.mdx | 20 +++++++++ .../update-conversation-group.mdx | 19 ++++++++ .../clear-conversation-messages.mdx | 17 +++++++ .../clear-group-mentions.mdx | 15 +++++++ .../delete-conversation-with-messages.mdx | 15 +++++++ .../delete-conversation.mdx | 15 +++++++ .../get-total-unread-count.mdx | 24 ++++++++++ .../hide-a-conversation.mdx | 17 +++++++ .../hide-all-conversations.mdx | 15 +++++++ .../mark-all-conversations-read.mdx | 17 +++++++ .../mark-conversation-read.mdx | 32 +++++++++++++ .../mark-conversation.mdx | 11 +++++ .../pin-conversation.mdx | 16 +++++++ .../set-burn-duration.mdx | 17 +++++++ .../set-conversation-draft.mdx | 17 +++++++ .../set-conversation-extension.mdx | 20 +++++++++ .../set-conversation-remark.mdx | 11 +++++ .../set-message-destruct.mdx | 11 +++++ .../set-message-receive-option.mdx | 17 +++++++ .../set-private-chat.mdx | 17 +++++++ .../conversation/overview-conversation.mdx | 21 +++++++++ .../get-conversation-by-target.mdx | 23 ++++++++++ .../get-conversation-id.mdx | 21 +++++++++ .../get-conversations-by-id.mdx | 18 ++++++++ .../retrieve-conversation-list.mdx | 33 ++++++++++++++ .../search-conversations.mdx | 18 ++++++++ 68 files changed, 1342 insertions(+) create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx create mode 100644 content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx new file mode 100644 index 0000000000..3de60357f5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -0,0 +1,20 @@ +--- +title: 'Add conversations to groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Add conversations to groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups' +--- + +```uts +import { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk' + +await addConversationsToGroups({ conversationGroupIDList, conversationIDList }) +``` + +This Commercial batch adds explicit conversations to explicit groups. Deduplicate both arrays and confirm membership from events or a new snapshot. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx new file mode 100644 index 0000000000..02d3f15519 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a conversation group' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a conversation group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group' +--- + +```uts +import { createConversationGroup } from '@/uni_modules/unix-openim-sdk' + +const group = await createConversationGroup({ groupName: 'Priority', conversationIDList }) +``` + +This is Commercial. Use non-empty unique conversation IDs and merge the returned group/event by its stable ID. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx new file mode 100644 index 0000000000..693d1bac51 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete a conversation group' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group' +--- + +```uts +import { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk' + +await deleteConversationGroup(conversationGroupID) +``` + +Deleting a Commercial group does not delete its conversations or messages. Confirm destructive UI and remove the group only after the event or refreshed snapshot. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx new file mode 100644 index 0000000000..cea343c497 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx @@ -0,0 +1,20 @@ +--- +title: 'getConversationGroupByConversationID' +description: 'OpenIM uni-app / uni-app x SDK guide for getConversationGroupByConversationID.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id' +--- + +```uts +import { getConversationGroupByConversationID } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroupByConversationID(conversationID) +``` + +This Commercial operation returns the group association for one conversation. Use the returned group ID rather than inferring membership from UI order. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx new file mode 100644 index 0000000000..396b7f94ba --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get conversations in a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' +--- + +```uts +import { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroupInfoWithConversations(conversationGroupID) +``` + +The Commercial result combines group metadata with member conversations. Treat it as a snapshot and merge later group/membership events by stable IDs. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx new file mode 100644 index 0000000000..ac12cc713f --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get conversation groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Get conversation groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups' +--- + +```uts +import { getConversationGroups } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroups() +replaceConversationGroups(result?.groups ?? []) +``` + +This Commercial snapshot is ordered by server/Core state. Merge later group events and reload after account or synchronization changes. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx new file mode 100644 index 0000000000..a3eddf4c16 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -0,0 +1,34 @@ +--- +title: 'Conversation group overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Conversation group overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups' +--- + +Conversation groups are Commercial. Keep group and membership stores synchronized from snapshots plus five events. + +```uts +import { + off, + onConversationGroupAdded, + onConversationGroupChanged, + onConversationGroupDeleted, + onConversationGroupMemberAdded, + onConversationGroupMemberDeleted, +} from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onConversationGroupAdded(upsertGroup), onConversationGroupChanged(upsertGroup), + onConversationGroupDeleted(removeGroup), onConversationGroupMemberAdded(mergeMembers), + onConversationGroupMemberDeleted(removeMembers), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +Merge by group and conversation IDs, preserve ordering, and reload snapshots after login or synchronization gaps. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx new file mode 100644 index 0000000000..52f30e7eb0 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -0,0 +1,20 @@ +--- +title: 'Remove conversations from groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Remove conversations from groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups' +--- + +```uts +import { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk' + +await removeConversationsFromGroups({ conversationGroupIDList, conversationIDList }) +``` + +This Commercial batch changes group membership only; it does not hide or delete conversations. Refresh membership after partial or failed operations. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx new file mode 100644 index 0000000000..9994d5bc97 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -0,0 +1,20 @@ +--- +title: 'Reorder conversation groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Reorder conversation groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order' +--- + +```uts +import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk' + +await setConversationGroupOrder(conversationGroupIDList) +``` + +Send the complete desired unique group-ID order for this Commercial operation. Serialize concurrent reorder requests and refresh after failure. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx new file mode 100644 index 0000000000..13ca1d1bf9 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Update a conversation group' +description: 'OpenIM uni-app / uni-app x SDK guide for Update a conversation group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group' +--- + +```uts +import { updateConversationGroup } from '@/uni_modules/unix-openim-sdk' + +await updateConversationGroup({ conversationGroupID, groupName: 'Important' }) +``` + +The Commercial update changes only supplied fields. Confirm final state through `onConversationGroupChanged` or a fresh group query. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx new file mode 100644 index 0000000000..86176979e4 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx @@ -0,0 +1,20 @@ +--- +title: 'Clear messages in a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Clear messages in a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages' +--- + +```uts +import { clearConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' + +await clearConversationAndDeleteAllMsg(conversationID) +``` + +The conversation remains while its messages are cleared according to Core/server policy. Confirm the action, stop concurrent pagination/sends, and reload both conversation and message state afterward. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx new file mode 100644 index 0000000000..9cd87cba69 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx @@ -0,0 +1,20 @@ +--- +title: 'Reset group mention status' +description: 'OpenIM uni-app / uni-app x SDK guide for Reset group mention status.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-group-mentions' +--- + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, groupAtType: 0 }) +``` + +Use the contract-defined “no mention” value. This clears only the group mention indicator; it neither removes @ messages nor marks unread messages as read. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx new file mode 100644 index 0000000000..02fa420a3f --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete a conversation and its messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation and its messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages' +--- + +```uts +import { deleteConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' + +await deleteConversationAndDeleteAllMsg(conversationID) +``` + +This destructive operation removes the conversation and its messages according to Core/server policy. Ask for confirmation, stop writes to the conversation, and reload lists after completion. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx new file mode 100644 index 0000000000..377c68a610 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation' +--- + +```uts +import { deleteConversation } from '@/uni_modules/unix-openim-sdk' + +await deleteConversation(conversationID) +``` + +This removes the conversation entry without promising to delete its message history. Use the explicit conversation-and-message operation when that is the intended product action, and confirm destructive actions in the UI. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx new file mode 100644 index 0000000000..faeb6a2850 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx @@ -0,0 +1,23 @@ +--- +title: 'Track the total unread count' +description: 'OpenIM uni-app / uni-app x SDK guide for Track the total unread count.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/get-total-unread-count' +--- + +```uts +import { getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged } from '@/uni_modules/unix-openim-sdk' + +const unreadSubscription = onTotalUnreadMessageCountChanged((count) => renderBadge(count)) +const count = await getTotalUnreadMsgCount() +renderBadge(count ?? 0) +off(unreadSubscription) +``` + +Load a snapshot and then apply events. Requery after login or synchronization rather than maintaining only local increments. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx new file mode 100644 index 0000000000..b038b28c6c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx @@ -0,0 +1,20 @@ +--- +title: 'Hide a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Hide a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-a-conversation' +--- + +```uts +import { hideConversation } from '@/uni_modules/unix-openim-sdk' + +await hideConversation(conversationID) +``` + +Hiding removes the conversation from the visible list without deleting its message history. A later incoming message or product action can make it visible again; reload the list rather than deleting cached history. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx new file mode 100644 index 0000000000..e54449b7ed --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx @@ -0,0 +1,20 @@ +--- +title: 'Hide all conversations' +description: 'OpenIM uni-app / uni-app x SDK guide for Hide all conversations.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-all-conversations' +--- + +```uts +import { hideAllConversations } from '@/uni_modules/unix-openim-sdk' + +await hideAllConversations() +``` + +This hides every current conversation without deleting message history. Treat it as a destructive list action, confirm with the user, and rebuild the snapshot after completion. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx new file mode 100644 index 0000000000..e3b5772fdf --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx @@ -0,0 +1,20 @@ +--- +title: 'Mark all conversations as read' +description: 'OpenIM uni-app / uni-app x SDK guide for Mark all conversations as read.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read' +--- + +```uts +import { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk' + +await markAllConversationMessageAsRead() +``` + +This clears conversation unread state for the current account. Confirm final totals from unread events or a fresh query; it does not delete messages or guarantee per-message read receipts. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx new file mode 100644 index 0000000000..55f8cd0c99 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx @@ -0,0 +1,24 @@ +--- +title: 'Mark a conversation as read' +description: 'OpenIM uni-app / uni-app x SDK guide for Mark a conversation as read.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation-read' +--- + +Use `markConversationMessageAsRead()` to clear normal unread state. The commercial `resetConversationUnread()` is an additional reset entry point. Direct read receipts arrive through `onRecvC2CReadReceipt`. + +```uts +import { markConversationMessageAsRead, off, onRecvC2CReadReceipt } from '@/uni_modules/unix-openim-sdk' + +const receiptSubscription = onRecvC2CReadReceipt((items) => mergeReadReceipts(items)) +await markConversationMessageAsRead(conversationID) +off(receiptSubscription) +``` + +Do not infer message-level receipts solely from the conversation unread count. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx new file mode 100644 index 0000000000..f34ed61811 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx @@ -0,0 +1,14 @@ +--- +title: 'Mark or unmark a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Mark or unmark a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation' +--- + +Conversation marking is a Commercial concept, but the frozen `0.2.0-rc.3` contract has neither `markConversation` nor an `isMarked` setter field. Do not emulate it through `ex` or local-only state. Use a supported commercial backend capability and then refresh conversations/groups, or disable the UI. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx new file mode 100644 index 0000000000..70d8e78b57 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx @@ -0,0 +1,20 @@ +--- +title: 'Pin or unpin a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Pin or unpin a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/pin-conversation' +--- + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, isPinned: true }) +``` + +Pass only the field being changed; use `false` to unpin. Apply the final `onConversationChanged` snapshot before re-sorting instead of assuming Promise completion defines the final order. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx new file mode 100644 index 0000000000..3634540f79 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx @@ -0,0 +1,22 @@ +--- +title: 'Set the burn duration' +description: 'OpenIM uni-app / uni-app x SDK guide for Set the burn duration.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-burn-duration' +--- + +`burnDuration` is Commercial. + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, burnDuration: 30 }) +``` + +Use the server-defined unit, range, and disabled value. Client countdown UI does not itself delete server messages; reload the conversation to confirm the setting. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx new file mode 100644 index 0000000000..7448f6144b --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set a conversation draft' +description: 'OpenIM uni-app / uni-app x SDK guide for Set a conversation draft.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-draft' +--- + +```uts +import { setConversationDraft } from '@/uni_modules/unix-openim-sdk' + +await setConversationDraft({ conversationID, draftText: editorText }) +``` + +An empty draft clears it. Persist drafts deliberately as text, update UI from the changed conversation, and avoid storing tokens or sensitive transient editor state. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx new file mode 100644 index 0000000000..6a5de3a8e1 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set conversation extra data' +description: 'OpenIM uni-app / uni-app x SDK guide for Set conversation extra data.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-extension' +--- + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, ex: JSON.stringify({ color: 'blue' }) }) +``` + +`ex` is replaced as one string, not merged. Read and merge your versioned business schema first, preserve unknown fields, and never store tokens or server-only secrets. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx new file mode 100644 index 0000000000..565333f9f6 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx @@ -0,0 +1,14 @@ +--- +title: 'Set a conversation remark' +description: 'OpenIM uni-app / uni-app x SDK guide for Set a conversation remark.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-remark' +--- + +Conversation remarks are Commercial, but the frozen conversation model and setter expose no standard `remark` field. Do not encode one into `ex` as if it were a Core field. Maintain it through an authoritative commercial business API and merge it into the UI. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx new file mode 100644 index 0000000000..7b5a34835d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx @@ -0,0 +1,14 @@ +--- +title: 'Schedule server message deletion' +description: 'OpenIM uni-app / uni-app x SDK guide for Schedule server message deletion.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-destruct' +--- + +`OpenIMConversationItem` can expose commercial `isMsgDestruct` and `msgDestructTime`, but the frozen setter cannot write them. Treat them as read-only Commercial state. Use an explicitly supported business API to change policy and then reload; client countdown UI is not authoritative deletion. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx new file mode 100644 index 0000000000..0df49da81d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set conversation message reception' +description: 'OpenIM uni-app / uni-app x SDK guide for Set conversation message reception.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-receive-option' +--- + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, recvMsgOpt: 1 }) +``` + +Use exported receive-option constants rather than naked numbers. This conversation setting is distinct from the account-wide option and can be constrained by both. Confirm through the changed conversation or a new query. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx new file mode 100644 index 0000000000..e37faccb82 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx @@ -0,0 +1,22 @@ +--- +title: 'Enable or disable burn after reading' +description: 'OpenIM uni-app / uni-app x SDK guide for Enable or disable burn after reading.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-private-chat' +--- + +`isPrivateChat` is a Commercial field accepted by the public `setConversation()` operation. + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, isPrivateChat: true }) +``` + +Pass only this field. The host must still implement the corresponding product UI/security behavior; confirm the final flag from conversation updates. diff --git a/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx new file mode 100644 index 0000000000..7c8b7ba1aa --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx @@ -0,0 +1,16 @@ +--- +title: 'Conversation overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Conversation overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/overview-conversation' +--- + +Conversations are local indexes for direct, group, and other message streams. Use `conversationID` as the stable key; titles, avatars, unread counts, and latest messages are mutable snapshots. `latestMsg` is serialized message JSON, so preserve the conversation and show a fallback summary if parsing fails. + +Register `onNewConversation` and `onConversationChanged` before loading a list, merge by `conversationID`, and reload after login or App restoration. Unread state, message read receipts, and commercial conversation groups are related but separate workflows. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx new file mode 100644 index 0000000000..21dd578b78 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -0,0 +1,23 @@ +--- +title: 'Open a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Open a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target' +--- + +`getOneConversation()` resolves a conversation from session type and target ID. + +```uts +import { getOneConversation } from '@/uni_modules/unix-openim-sdk' + +const result = await getOneConversation({ sessionType, sourceID }) +const conversation = result?.conversation ?? null +``` + +Use a user ID for direct chat or group ID for group chat. A nullable result means no current local conversation; it does not create one. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx new file mode 100644 index 0000000000..126fb00c1e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx @@ -0,0 +1,20 @@ +--- +title: 'Resolve a conversation ID' +description: 'OpenIM uni-app / uni-app x SDK guide for Resolve a conversation ID.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id' +--- + +```uts +import { getConversationIDBySessionType } from '@/uni_modules/unix-openim-sdk' + +const conversationID = await getConversationIDBySessionType({ sourceID, sessionType }) +``` + +The returned ID is the canonical local key for the given direct or group target. Use exported session-type constants instead of numeric literals, and do not construct conversation IDs manually. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx new file mode 100644 index 0000000000..f7b5a929a5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get conversations by ID' +description: 'OpenIM uni-app / uni-app x SDK guide for Get conversations by ID.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id' +--- + +```uts +import { getMultipleConversation } from '@/uni_modules/unix-openim-sdk' + +const result = await getMultipleConversation(['single_user_a', 'group_group_a']) +const conversations = result?.conversations ?? [] +``` + +Results may be shorter or differently ordered than the request. Map by `conversationID` and preserve placeholders for missing local conversations. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx new file mode 100644 index 0000000000..e1fceb12ff --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -0,0 +1,27 @@ +--- +title: 'Get the conversation list' +description: 'OpenIM uni-app / uni-app x SDK guide for Get the conversation list.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list' +--- + +Register conversation events before loading a snapshot. Use `getAllConversationList()` for a complete result or `getConversationListSplit()` for pages. + +```uts +import { getConversationListSplit, off, onConversationChanged, onNewConversation } from '@/uni_modules/unix-openim-sdk' + +const changed = onConversationChanged((items) => items.forEach(upsertConversation)) +const created = onNewConversation((items) => items.forEach(upsertConversation)) +const page = await getConversationListSplit({ offset: 0, count: 100 }) +replaceConversations(page?.conversations ?? []) +off(changed) +off(created) +``` + +Paginate from offset 0, deduplicate by `conversationID`, and requery after account or synchronization changes. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx new file mode 100644 index 0000000000..f1eb25c3dc --- /dev/null +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx @@ -0,0 +1,21 @@ +--- +title: 'Search conversations' +description: 'OpenIM uni-app / uni-app x SDK guide for Search conversations.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/search-conversations' +--- + +```uts +import { searchConversation } from '@/uni_modules/unix-openim-sdk' + +const result = await searchConversation('project') +renderConversations(result?.conversations ?? []) +``` + +This searches local conversation metadata. Reject an empty keyword in the UI, deduplicate by `conversationID`, and do not treat local results as an authoritative server-wide search. diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx new file mode 100644 index 0000000000..67b271bdbb --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -0,0 +1,18 @@ +--- +title: '把会话加入分组' +description: '商业版把多个会话加入一个或多个分组。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups' +--- + +`addConversationsToGroups()` 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。 + +```uts +import { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk' + +await addConversationsToGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: ['group_a'], +}) +``` + +两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx new file mode 100644 index 0000000000..5e2f9413ba --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -0,0 +1,23 @@ +--- +title: '创建会话分组' +description: '商业版创建自定义会话分组。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group' +--- + +`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。 + +```uts +import { createConversationGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await createConversationGroup({ + name: '重要会话', + order: 100, + conversationGroupType: 0, + conversationID: conversationID, + ex: '', +}) + +const group = result?.conversationGroup +``` + +分组类型使用插件导出的合同值。`conversationID` 可省略;`ex` 是整段业务扩展。返回分组可能为 `null`,最终列表以分组事件或重新查询为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx new file mode 100644 index 0000000000..a04785b264 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -0,0 +1,15 @@ +--- +title: '删除会话分组' +description: '商业版删除指定会话分组。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group' +--- + +`deleteConversationGroup()` 商业版 删除一个分组。 + +```uts +import { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk' + +await deleteConversationGroup({ conversationGroupID: groupID }) +``` + +删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx new file mode 100644 index 0000000000..9e5474bad6 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx @@ -0,0 +1,16 @@ +--- +title: '查询会话所属分组' +description: '商业版按 conversationID 查询其所属会话分组。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id' +--- + +`getConversationGroupByConversationID()` 商业版 返回指定会话所属的全部分组。 + +```uts +import { getConversationGroupByConversationID } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroupByConversationID({ conversationID }) +const groups = result?.conversationGroups ?? [] +``` + +一个会话可以属于多个分组,不能只读取第一项。按 `conversationGroupID` 去重;空数组表示当前没有所属分组,不是查询失败。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx new file mode 100644 index 0000000000..cd5ee52d89 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -0,0 +1,18 @@ +--- +title: '查询分组及会话' +description: '商业版分页读取一个会话分组及其成员会话。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' +--- + +`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。 + +```uts +import { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroupInfoWithConversations({ + conversationGroupID: groupID, + pagination: { pageNumber: 1, showNumber: 100 }, +}) +``` + +`pageNumber` 从服务端约定的第一页开始,本合同示例使用 1;`showNumber` 是页大小。返回字段 `ConversationTotal` 首字母大写,应按真实字段名读取。会话按 `conversationID` 去重,分组为 `null` 时不要继续分页。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx new file mode 100644 index 0000000000..64591c0951 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -0,0 +1,16 @@ +--- +title: '查询会话分组' +description: '商业版按分组查询类型读取会话分组快照。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups' +--- + +`getConversationGroups()` 商业版 按 `conversationGroupType` 查询分组。 + +```uts +import { getConversationGroups } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationGroups({ conversationGroupType: 0 }) +const groups = result?.conversationGroups ?? [] +``` + +按非空 `conversationGroupID` 去重并排序。分组项中的 `conversationIDs` 可能只是当前快照;需要成员和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx new file mode 100644 index 0000000000..ffe758975c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -0,0 +1,45 @@ +--- +title: '会话分组概览' +description: '商业版会话分组模型、raw 事件解析和生命周期。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups' +--- + +会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 + +`OpenIMConversationGroupItem` 的字段均可选。读取 `conversationGroupID` 后再作为主键;`conversationIDs` 可能为 `null`,完整成员应以分页查询为准。 + +五个分组事件返回 opaque JSON 字符串,不是类型化对象: + +```uts +import { + off, + onConversationGroupAdded, + onConversationGroupChanged, + onConversationGroupDeleted, + onConversationGroupMemberAdded, + onConversationGroupMemberDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +function refreshFromRawGroupEvent(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) refreshConversationGroups() + } catch (_) { + console.error('Invalid conversation group event payload') + } +} + +const addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent) +const subscriptions : Array = [ + addedSubscription, + onConversationGroupChanged(refreshFromRawGroupEvent), + onConversationGroupDeleted(refreshFromRawGroupEvent), + onConversationGroupMemberAdded(refreshFromRawGroupEvent), + onConversationGroupMemberDeleted(refreshFromRawGroupEvent), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx new file mode 100644 index 0000000000..02e6362b31 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -0,0 +1,18 @@ +--- +title: '把会话移出分组' +description: '商业版从一个或多个分组移除多个会话。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups' +--- + +`removeConversationsFromGroups()` 商业版 使用与加入相同的成员参数。 + +```uts +import { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk' + +await removeConversationsFromGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: ['group_a'], +}) +``` + +移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx new file mode 100644 index 0000000000..8807aee004 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -0,0 +1,20 @@ +--- +title: '设置会话分组顺序' +description: '商业版批量更新会话分组排序值。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order' +--- + +`setConversationGroupOrder()` 商业版 批量提交分组 ID 与顺序值。 + +```uts +import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk' + +await setConversationGroupOrder({ + conversationGroupOrders: [ + { conversationGroupID: 'group_a', order: 100 }, + { conversationGroupID: 'group_b', order: 200 }, + ], +}) +``` + +拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx new file mode 100644 index 0000000000..6b2b1b8797 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -0,0 +1,19 @@ +--- +title: '更新会话分组' +description: '商业版更新分组名称、扩展字段或隐藏状态。' +sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group' +--- + +`updateConversationGroup()` 商业版 只更新提供的字段。 + +```uts +import { updateConversationGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await updateConversationGroup({ + conversationGroupID: groupID, + name: '重点跟进', + hidden: false, +}) +``` + +`name`、`ex` 和 `hidden` 都可选。`ex` 是整段替换,先合并已有业务字段。返回 `conversationGroup` 可能为空,最终状态以事件或重新查询为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx new file mode 100644 index 0000000000..e761899491 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx @@ -0,0 +1,17 @@ +--- +title: '清空会话消息' +description: '清理指定会话的全部消息并保留会话项。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages' +--- + +`clearConversationAndDeleteAllMsg()` 清空指定会话的消息,但保留会话入口。 + +```uts +import { clearConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' + +await clearConversationAndDeleteAllMsg(conversationID) +``` + +调用前二次确认,并停止正在进行的历史分页。成功后清空消息 store,再重新查询会话,使用 Core 返回的最新消息、序列与未读状态。 + +如果连会话也要删除,使用[删除会话及全部消息](/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx new file mode 100644 index 0000000000..83d84b96d3 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx @@ -0,0 +1,15 @@ +--- +title: '清除群聊提及状态' +description: '通过 setConversation 清除群会话的 groupAtType。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-group-mentions' +--- + +群会话中的 @ 提及提示由 `groupAtType` 表示。处理完提及后,通过 `setConversation()` 把它重置为无提及状态。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, groupAtType: 0 }) +``` + +使用合同/服务端定义的“无提及”值。该调用只修改会话提示状态,不删除 @ 消息,也不清理未读数。需要标记已读时另调用[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx new file mode 100644 index 0000000000..e7905927c3 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -0,0 +1,15 @@ +--- +title: '删除会话及全部消息' +description: '删除指定会话并清理其全部本地消息。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages' +--- + +`deleteConversationAndDeleteAllMsg()` 删除会话及其全部消息。 + +```uts +import { deleteConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' + +await deleteConversationAndDeleteAllMsg(conversationID) +``` + +这是不可轻易恢复的操作,调用前必须确认。它不同于隐藏会话,也不同于只清理消息但保留会话。执行期间停止该会话的分页请求,成功后清空对应消息 store 并刷新会话列表。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx new file mode 100644 index 0000000000..1444f3aebf --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx @@ -0,0 +1,15 @@ +--- +title: '删除会话' +description: '删除会话索引并保留其消息数据。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation' +--- + +`deleteConversation()` 删除指定会话项。 + +```uts +import { deleteConversation } from '@/uni_modules/unix-openim-sdk' + +await deleteConversation(conversationID) +``` + +该入口与“删除会话并删除全部消息”不同。需要保留本地历史时使用本方法;收到新消息后会话可能再次出现。完成后重新查询或按事件更新会话 store。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx new file mode 100644 index 0000000000..1e18931166 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx @@ -0,0 +1,24 @@ +--- +title: '获取总未读数' +description: '查询总未读快照,并订阅总未读变化事件。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/get-total-unread-count' +--- + +`getTotalUnreadMsgCount()` 返回当前账号总未读快照;`onTotalUnreadMessageCountChanged` 持续推送新值。 + +```uts +import { + getTotalUnreadMsgCount, + off, + onTotalUnreadMessageCountChanged, +} from '@/uni_modules/unix-openim-sdk' + +const unreadSubscription = onTotalUnreadMessageCountChanged((count) => { + setTotalUnread(count) +}) + +setTotalUnread((await getTotalUnreadMsgCount()) ?? 0) +off(unreadSubscription) +``` + +先订阅再查询,事件和快照都直接替换总数,不做本地 `+1/-1`。把结果用于 TabBar 与[应用角标](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)时,仍要考虑系统通知权限。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx new file mode 100644 index 0000000000..950717d7b3 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx @@ -0,0 +1,17 @@ +--- +title: '隐藏会话' +description: '从当前会话列表隐藏一个会话而不删除消息。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-a-conversation' +--- + +`hideConversation()` 从会话列表隐藏指定会话。 + +```uts +import { hideConversation } from '@/uni_modules/unix-openim-sdk' + +await hideConversation(conversationID) +``` + +隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 + +完成后通过会话事件或重新查询移除本地项,不只操作页面数组。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx new file mode 100644 index 0000000000..e3fedb751e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx @@ -0,0 +1,15 @@ +--- +title: '隐藏全部会话' +description: '隐藏当前账号的全部会话但保留消息。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-all-conversations' +--- + +`hideAllConversations()` 隐藏当前账号的全部会话。 + +```uts +import { hideAllConversations } from '@/uni_modules/unix-openim-sdk' + +await hideAllConversations() +``` + +这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx new file mode 100644 index 0000000000..521d3f8166 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx @@ -0,0 +1,17 @@ +--- +title: '标记全部会话已读' +description: '清零当前账号的全部会话未读数。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read' +--- + +`markAllConversationMessageAsRead()` 标记当前账号的全部会话已读。 + +```uts +import { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk' + +await markAllConversationMessageAsRead() +``` + +这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。 + +该调用不会删除消息,也不会修改单个会话的消息接收选项。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx new file mode 100644 index 0000000000..9a37342bbb --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx @@ -0,0 +1,32 @@ +--- +title: '标记会话已读' +description: '清理会话未读数,并处理单聊已读回执事件。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation-read' +--- + +`markConversationMessageAsRead()` 把指定会话标为已读。本页同时归属单聊已读回执 `onRecvC2CReadReceipt`。 + +```uts +import { + markConversationMessageAsRead, + off, + onRecvC2CReadReceipt, +} from '@/uni_modules/unix-openim-sdk' + +const receiptSubscription = onRecvC2CReadReceipt((result) => { + result.receipts.forEach((receipt) => mergeReadReceipt(receipt)) +}) + +await markConversationMessageAsRead(conversationID) +off(receiptSubscription) +``` + +商业版还提供 `resetConversationUnread()` 商业版,可把多个会话的未读数重置为指定值: + +```uts +import { resetConversationUnread } from '@/uni_modules/unix-openim-sdk' + +await resetConversationUnread({ conversationIDs: [conversationID], num: 0 }) +``` + +本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx new file mode 100644 index 0000000000..215a82190e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx @@ -0,0 +1,11 @@ +--- +title: '标记会话' +description: '说明商业版标记会话能力在当前 UTS 合同中的边界。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation' +--- + +会话“标记”属于商业版能力,通常与会话分组中的标记组配合使用。锁定的 UTS 合同没有独立 `markConversation` 操作,也没有在 `OpenIMSetConversationParams` 中暴露 `isMarked`。 + +因此客户端不能通过 `ex` 或其他字段伪造标记。需要修改时应使用商业版业务后端或已确认的上层服务;随后通过[查询会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[会话分组](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)刷新结果。 + +没有真实写入 API 时,UI 应隐藏或禁用入口,而不是只改本地状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx new file mode 100644 index 0000000000..7f189dfad6 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx @@ -0,0 +1,16 @@ +--- +title: '置顶或取消置顶会话' +description: '通过 setConversation 修改会话置顶状态。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/pin-conversation' +--- + +`setConversation()` 是会话字段的统一更新入口。置顶时只传 `conversationID` 和 `isPinned`。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, isPinned: true }) +// 取消置顶:isPinned: false +``` + +Promise 成功后以 `onConversationChanged` 更新最终会话,不要直接假定本地排序已稳定。未提供的字段保持原值;不要为了置顶而复制并回写整条会话。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx new file mode 100644 index 0000000000..f1c90fc059 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx @@ -0,0 +1,17 @@ +--- +title: '设置阅后即焚时长' +description: '商业版设置会话的 burnDuration。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-burn-duration' +--- + +`burnDuration` 商业版 表示阅后即焚时长,通过 `setConversation()` 更新。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, burnDuration: 30 }) +``` + +时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。 + +关闭能力时使用产品约定的关闭值,并重新查询会话确认。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx new file mode 100644 index 0000000000..d8dcac8c3c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx @@ -0,0 +1,17 @@ +--- +title: '保存会话草稿' +description: '保存或清空指定会话的本地草稿文本。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-draft' +--- + +`setConversationDraft()` 保存会话草稿;传空字符串清除草稿。 + +```uts +import { setConversationDraft } from '@/uni_modules/unix-openim-sdk' + +await setConversationDraft({ conversationID, draftText: editorText }) +``` + +草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。 + +会话项中的 `draftText` 和 `draftTextTime` 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx new file mode 100644 index 0000000000..ead32260d2 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx @@ -0,0 +1,20 @@ +--- +title: '设置会话扩展字段' +description: '通过 setConversation 更新会话 ex。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-extension' +--- + +通过 `setConversation()` 的 `ex` 更新会话扩展字符串。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ + conversationID, + ex: JSON.stringify({ color: 'blue' }), +}) +``` + +`ex` 是整段替换,不是局部 merge。修改前先读取现值并按业务 schema 合并,避免覆盖其他模块字段。不要存 Token、密钥或仅服务端可见数据。 + +Promise 成功后以 `onConversationChanged` 或重新查询确认。解析旧版本或未知字段失败时保留原字符串并降级展示。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx new file mode 100644 index 0000000000..c8dc4fe8ff --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx @@ -0,0 +1,11 @@ +--- +title: '设置会话备注' +description: '说明商业版会话备注字段的读取与写入边界。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-remark' +--- + +会话备注属于商业版扩展。当前 `OpenIMConversationItem` 和 `OpenIMSetConversationParams` 没有独立 `remark` 字段,因此本版本插件不能安全写入该能力。 + +不要把备注编码进 `ex` 冒充标准字段。需要使用时,由商业版业务 API维护,并以业务侧返回作为权威;客户端可在会话 UI 中合并展示。 + +后续合同若正式增加字段,本页会随 interface/schema 哈希变化重新审核。在此之前,公共和商业客户端都不应调用不存在的 setter。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx new file mode 100644 index 0000000000..dec4b4a9ba --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx @@ -0,0 +1,11 @@ +--- +title: '设置消息销毁' +description: '说明商业版会话消息销毁字段的当前写入边界。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-destruct' +--- + +`OpenIMConversationItem` 包含 `isMsgDestruct` 与 `msgDestructTime` 商业版 状态,但当前 `OpenIMSetConversationParams` 没有这两个写入字段。 + +因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。 + +客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx new file mode 100644 index 0000000000..8b1e637223 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx @@ -0,0 +1,17 @@ +--- +title: '设置会话消息接收选项' +description: '通过 setConversation 修改单个会话的 recvMsgOpt。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-receive-option' +--- + +`recvMsgOpt` 控制单个会话的消息接收策略,通过 `setConversation()` 更新。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, recvMsgOpt: 1 }) +``` + +具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。 + +更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx new file mode 100644 index 0000000000..de84660198 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx @@ -0,0 +1,17 @@ +--- +title: '设置私聊模式' +description: '商业版通过 setConversation 开启或关闭会话私聊模式。' +sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-private-chat' +--- + +`isPrivateChat` 商业版 通过公共的 `setConversation()` 字段写入。 + +```uts +import { setConversation } from '@/uni_modules/unix-openim-sdk' + +await setConversation({ conversationID, isPrivateChat: true }) +``` + +只传本次字段。私聊模式的消息展示、截屏或销毁规则由商业版服务端和客户端产品共同定义;仅设置布尔值不会自动实现所有 UI 安全策略。 + +最终状态以会话变化事件中的 `isPrivateChat` 为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx new file mode 100644 index 0000000000..88006ace35 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx @@ -0,0 +1,21 @@ +--- +title: '会话概览' +description: '理解会话快照、增量事件、未读数、草稿和会话分组。' +sourcePath: '/sdk/uniapp/conversation/overview-conversation' +--- + +会话是单聊、群聊或其他消息流的本地索引。`conversationID` 是稳定主键;单聊同时有 `userID`,群聊同时有 `groupID`。界面标题、头像和最新消息都是可变快照,不能替代主键。 + +`OpenIMConversationItem` 包含 `conversationType`、`showName`、`faceURL`、`unreadCount`、`latestMsg`、草稿、置顶、接收选项和消息序列边界。`latestMsg` 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。 + +## 建议数据流 + +1. 注册 `onNewConversation` 与 `onConversationChanged`。 +2. 查询完整或分页会话快照。 +3. 按 `conversationID` 幂等插入或替换事件项。 +4. 按 `isPinned`、时间和业务排序规则展示。 +5. App 恢复或重新登录时重新查询,不仅依赖事件。 + +会话未读数和消息已读是相关但不同的状态。清零会话未读见[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read),总未读见[获取总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。 + +商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx new file mode 100644 index 0000000000..8cb8f36e16 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -0,0 +1,23 @@ +--- +title: '按目标查询会话' +description: '按目标 ID 和会话类型查询一个会话。' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target' +--- + +`getOneConversation()` 使用目标 ID 和 `OpenIMSessionType` 查询单个会话,返回 `OpenIMConversationItem | null`。 + +```uts +import { + OpenIMSessionTypeSingle, + getOneConversation, +} from '@/uni_modules/unix-openim-sdk' + +const conversation = await getOneConversation({ + sourceID: 'user_b', + sessionType: OpenIMSessionTypeSingle, +}) +``` + +单聊的 `sourceID` 是对方 `userID`,群聊是 `groupID`。使用插件导出的会话类型常量,不直接写数字。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。 + +返回值按 `conversationID` 合并到 store,不要用 `sourceID` 直接覆盖其他会话类型。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx new file mode 100644 index 0000000000..6c3d4838c0 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx @@ -0,0 +1,21 @@ +--- +title: '生成会话 ID' +description: '根据目标 ID 和会话类型取得规范 conversationID。' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id' +--- + +`getConversationIDBySessionType()` 返回 Core 使用的规范 `conversationID`,适合在尚未生成会话项时构造路由键。 + +```uts +import { + OpenIMSessionTypeGroup, + getConversationIDBySessionType, +} from '@/uni_modules/unix-openim-sdk' + +const conversationID = await getConversationIDBySessionType({ + sourceID: 'group_123', + sessionType: OpenIMSessionTypeGroup, +}) +``` + +不要自行拼接单聊或群聊会话 ID;不同会话类型有各自规则。返回 ID 不代表会话已存在,也不创建服务器数据。需要会话内容时继续调用[按目标查询会话](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target)或列表查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx new file mode 100644 index 0000000000..ca100ec4bf --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -0,0 +1,18 @@ +--- +title: '批量查询会话' +description: '按 conversationID 列表批量读取会话快照。' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id' +--- + +`getMultipleConversation()` 批量查询会话,返回 `OpenIMConversationListResult | null`。 + +```uts +import { getMultipleConversation } from '@/uni_modules/unix-openim-sdk' + +const result = await getMultipleConversation(['si_user_a_user_b', 'sg_group_123']) +const conversations = result?.conversations ?? [] +``` + +结果不保证与输入顺序一致,也可能缺少本地不存在的会话。按 `conversationID` 建立映射。大量 ID 应分批查询,避免一次传入无界数组。 + +本方法只读取快照,不订阅变化。持续更新仍由[查询会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)归属的事件处理。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx new file mode 100644 index 0000000000..0a47a747b8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -0,0 +1,33 @@ +--- +title: '查询会话列表' +description: '查询完整或分页会话快照,并处理新增与变化事件。' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list' +--- + +`getAllConversationList()` 返回完整本地会话快照;列表较大时使用 `getConversationListSplit()` 分页。本页归属 `onNewConversation` 和 `onConversationChanged`。 + +```uts +import { + getConversationListSplit, + off, + onConversationChanged, + onNewConversation, +} from '@/uni_modules/unix-openim-sdk' + +const newConversationSubscription = onNewConversation((result) => { + result.conversations.forEach((item) => upsertConversation(item.conversationID, item)) +}) +const changedSubscription = onConversationChanged((result) => { + result.conversations.forEach((item) => upsertConversation(item.conversationID, item)) +}) + +const firstPage = await getConversationListSplit({ offset: 0, count: 100 }) +replaceConversationSnapshot(firstPage?.conversations ?? []) + +off(newConversationSubscription) +off(changedSubscription) +``` + +分页时继续增加 `offset`,直到返回数量少于 `count`。查询与事件可能包含相同会话,必须按 `conversationID` 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。 + +不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx new file mode 100644 index 0000000000..51e73a2fc1 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx @@ -0,0 +1,18 @@ +--- +title: '搜索会话' +description: '按关键词搜索本地会话。' +sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/search-conversations' +--- + +`searchConversation()` 使用字符串关键词搜索本地会话,返回 `OpenIMConversationListResult | null`。 + +```uts +import { searchConversation } from '@/uni_modules/unix-openim-sdk' + +const result = await searchConversation('Alice') +renderSearchResults(result?.conversations ?? []) +``` + +调用前去除首尾空白,并在输入为空时由 UI 直接展示正常会话列表。搜索结果是查询时快照;会话变化后可重新搜索,或按 `conversationID` 合并最新事件项。 + +匹配范围由 Core 决定,不要承诺搜索所有消息正文。消息内容搜索使用消息领域的查询 API。 From 6d030e74f132c373d4a6111381f01e098d38400b Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 12:52:24 +0800 Subject: [PATCH 05/20] docs(uniapp): document group APIs --- .../sdk/uniapp/group/change-group-mute.mdx | 20 +++++++++++ .../uniapp/group/check-full-sync-state.mdx | 23 +++++++++++++ .../chat/sdk/uniapp/group/create-group.mdx | 20 +++++++++++ .../chat/sdk/uniapp/group/dismiss-group.mdx | 20 +++++++++++ .../accept-group-application.mdx | 20 +++++++++++ .../delete-group-requests.mdx | 20 +++++++++++ ...et-group-application-list-as-applicant.mdx | 20 +++++++++++ ...et-group-application-list-as-recipient.mdx | 28 ++++++++++++++++ .../get-group-application-unhandled-count.mdx | 21 ++++++++++++ .../observe-group-application-badge-count.mdx | 23 +++++++++++++ .../refuse-group-application.mdx | 20 +++++++++++ .../docs/chat/sdk/uniapp/group/join-group.mdx | 20 +++++++++++ .../change-group-member-mute.mdx | 20 +++++++++++ .../invite-user-to-group.mdx | 20 +++++++++++ .../kick-group-member.mdx | 20 +++++++++++ .../set-group-member-avatar.mdx | 20 +++++++++++ .../set-group-member-extension.mdx | 20 +++++++++++ .../set-group-member-nickname.mdx | 20 +++++++++++ .../set-group-member-role-level.mdx | 20 +++++++++++ .../transfer-group-owner.mdx | 20 +++++++++++ .../chat/sdk/uniapp/group/overview-group.mdx | 26 +++++++++++++++ .../docs/chat/sdk/uniapp/group/quit-group.mdx | 20 +++++++++++ .../get-group-member-list.mdx | 25 ++++++++++++++ .../get-specified-group-members-info.mdx | 20 +++++++++++ .../get-users-in-group.mdx | 20 +++++++++++ .../search-group-members.mdx | 20 +++++++++++ .../get-joined-group-list-page.mdx | 20 +++++++++++ .../get-joined-group-list.mdx | 21 ++++++++++++ .../get-specified-groups-info.mdx | 20 +++++++++++ .../group/retrieving-groups/is-join-group.mdx | 20 +++++++++++ .../group/retrieving-groups/search-groups.mdx | 20 +++++++++++ .../uniapp/group/set-group-announcement.mdx | 20 +++++++++++ .../sdk/uniapp/group/set-group-extension.mdx | 20 +++++++++++ .../group/set-group-join-verification.mdx | 20 +++++++++++ .../set-group-member-friend-permission.mdx | 20 +++++++++++ .../group/set-group-member-profile-access.mdx | 20 +++++++++++ .../sdk/uniapp/group/update-group-profile.mdx | 20 +++++++++++ .../sdk/uniapp/group/change-group-mute.mdx | 15 +++++++++ .../uniapp/group/check-full-sync-state.mdx | 23 +++++++++++++ .../chat/sdk/uniapp/group/create-group.mdx | 19 +++++++++++ .../chat/sdk/uniapp/group/dismiss-group.mdx | 15 +++++++++ .../accept-group-application.mdx | 15 +++++++++ .../delete-group-requests.mdx | 17 ++++++++++ ...et-group-application-list-as-applicant.mdx | 16 +++++++++ ...et-group-application-list-as-recipient.mdx | 33 +++++++++++++++++++ .../get-group-application-unhandled-count.mdx | 16 +++++++++ .../observe-group-application-badge-count.mdx | 22 +++++++++++++ .../refuse-group-application.mdx | 15 +++++++++ .../docs/chat/sdk/uniapp/group/join-group.mdx | 20 +++++++++++ .../change-group-member-mute.mdx | 15 +++++++++ .../invite-user-to-group.mdx | 19 +++++++++++ .../kick-group-member.mdx | 15 +++++++++ .../set-group-member-avatar.mdx | 15 +++++++++ .../set-group-member-extension.mdx | 15 +++++++++ .../set-group-member-nickname.mdx | 15 +++++++++ .../set-group-member-role-level.mdx | 15 +++++++++ .../transfer-group-owner.mdx | 15 +++++++++ .../chat/sdk/uniapp/group/overview-group.mdx | 32 ++++++++++++++++++ .../docs/chat/sdk/uniapp/group/quit-group.mdx | 15 +++++++++ .../get-group-member-list.mdx | 31 +++++++++++++++++ .../get-specified-group-members-info.mdx | 18 ++++++++++ .../get-users-in-group.mdx | 15 +++++++++ .../search-group-members.mdx | 20 +++++++++++ .../get-joined-group-list-page.mdx | 18 ++++++++++ .../get-joined-group-list.mdx | 16 +++++++++ .../get-specified-groups-info.mdx | 16 +++++++++ .../group/retrieving-groups/is-join-group.mdx | 15 +++++++++ .../group/retrieving-groups/search-groups.mdx | 19 +++++++++++ .../uniapp/group/set-group-announcement.mdx | 17 ++++++++++ .../sdk/uniapp/group/set-group-extension.mdx | 15 +++++++++ .../group/set-group-join-verification.mdx | 15 +++++++++ .../set-group-member-friend-permission.mdx | 15 +++++++++ .../group/set-group-member-profile-access.mdx | 15 +++++++++ .../sdk/uniapp/group/update-group-profile.mdx | 22 +++++++++++++ 74 files changed, 1431 insertions(+) create mode 100644 content/docs/chat/sdk/uniapp/group/change-group-mute.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/create-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/dismiss-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/join-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/overview-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/quit-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/set-group-extension.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx create mode 100644 content/docs/chat/sdk/uniapp/group/update-group-profile.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/create-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/join-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/set-group-announcement.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx diff --git a/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx new file mode 100644 index 0000000000..1655587127 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx @@ -0,0 +1,20 @@ +--- +title: 'Change group mute status' +description: 'OpenIM uni-app / uni-app x SDK guide for Change group mute status.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/change-group-mute' +--- + +```uts +import { changeGroupMute } from '@/uni_modules/unix-openim-sdk' + +await changeGroupMute({ groupID, isMute: true }) +``` + +The server validates moderator permissions. Confirm group-wide mute from updated group information; do not assume it changes individual member mute expirations identically. diff --git a/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx b/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx new file mode 100644 index 0000000000..b0cee785ff --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx @@ -0,0 +1,23 @@ +--- +title: 'Check group full-sync state' +description: 'OpenIM uni-app / uni-app x SDK guide for Check group full-sync state.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/check-full-sync-state' +--- + +The following Commercial diagnostics compare local group data with synchronized state: + +```uts +import { checkGroupMemberFullSync, checkLocalGroupFullSync } from '@/uni_modules/unix-openim-sdk' + +const groupsReady = await checkLocalGroupFullSync() +const membersReady = await checkGroupMemberFullSync(groupID) +``` + +Use them for recovery diagnostics and gate refreshes, not as a replacement for normal group/member queries. Retry with bounded backoff after synchronization events. diff --git a/content/docs/chat/sdk/uniapp/group/create-group.mdx b/content/docs/chat/sdk/uniapp/group/create-group.mdx new file mode 100644 index 0000000000..4cd58c8a9d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/create-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/create-group' +--- + +```uts +import { createGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await createGroup({ groupInfo: { groupName: 'Project' }, memberUserIDs: ['user_b'] }) +``` + +Use valid group type and member IDs, then merge the returned group/event by `groupID`. Creation is not proof that every optional invite succeeded; reload membership when needed. diff --git a/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx new file mode 100644 index 0000000000..a978901906 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Dismiss a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Dismiss a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/dismiss-group' +--- + +```uts +import { dismissGroup } from '@/uni_modules/unix-openim-sdk' + +await dismissGroup(groupID) +``` + +This owner-only destructive action ends the group according to server policy. Confirm explicitly and process `onGroupDismissed`; do not equate local navigation with successful dismissal. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx new file mode 100644 index 0000000000..791d49be10 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx @@ -0,0 +1,20 @@ +--- +title: 'Accept a group application' +description: 'OpenIM uni-app / uni-app x SDK guide for Accept a group application.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/accept-group-application' +--- + +```uts +import { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk' + +await acceptGroupApplication({ groupID, fromUserID, handleMsg: 'Accepted' }) +``` + +The server validates moderator authority and request state. Disable duplicate UI actions and confirm both request and member state from events or snapshots. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx new file mode 100644 index 0000000000..97693c0e9c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete group applications' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete group applications.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/delete-group-requests' +--- + +```uts +import { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk' + +await deleteGroupRequests({ groupRequests: [{ groupID, fromUserID }] }) +``` + +This Commercial batch deletes request records, not group membership. Confirm targets and refresh both request list and count after any failure. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx new file mode 100644 index 0000000000..43b676ab86 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get sent group applications' +description: 'OpenIM uni-app / uni-app x SDK guide for Get sent group applications.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant' +--- + +```uts +import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' + +const result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 }) +``` + +This lists requests sent by the current account. Deduplicate across changing pages and reload after application events or App restoration. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx new file mode 100644 index 0000000000..db2083e6b1 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx @@ -0,0 +1,28 @@ +--- +title: 'Get received group applications' +description: 'OpenIM uni-app / uni-app x SDK guide for Get received group applications.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient' +--- + +Register request events before loading the received snapshot. + +```uts +import { getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected } from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onGroupApplicationAdded(upsertRequest), onGroupApplicationAccepted(upsertRequest), + onGroupApplicationRejected(upsertRequest), onGroupApplicationDeleted(removeRequest), +] +const result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 }) +replaceRequests(result?.applications ?? []) +subscriptions.forEach((subscription) => off(subscription)) +``` + +Merge with a stable group/applicant key and use explicit accept/reject operations. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx new file mode 100644 index 0000000000..05c40bbf7f --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get the pending group application count' +description: 'OpenIM uni-app / uni-app x SDK guide for Get the pending group application count.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-unhandled-count' +--- + +```uts +import { getGroupApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk' + +const count = await getGroupApplicationUnhandledCount({ offset: 0, count: 100 }) +renderGroupRequestBadge(count ?? 0) +``` + +Requery after add/accept/reject/delete changes instead of maintaining only local counters across devices. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx new file mode 100644 index 0000000000..06c4bc7d15 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx @@ -0,0 +1,23 @@ +--- +title: 'Get the group application badge count' +description: 'OpenIM uni-app / uni-app x SDK guide for Get the group application badge count.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/observe-group-application-badge-count' +--- + +`onGroupApplicationBadgeCountChanged` is Commercial. + +```uts +import { off, onGroupApplicationBadgeCountChanged } from '@/uni_modules/unix-openim-sdk' + +const badgeSubscription = onGroupApplicationBadgeCountChanged((count) => renderGroupRequestBadge(count)) +off(badgeSubscription) +``` + +Treat it as an incremental UI signal and reload the request/count snapshot after login or missed events. This platform event replaces the unavailable clear-badge operation. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx new file mode 100644 index 0000000000..f182dac58f --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx @@ -0,0 +1,20 @@ +--- +title: 'Reject a group application' +description: 'OpenIM uni-app / uni-app x SDK guide for Reject a group application.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/group-applications/refuse-group-application' +--- + +```uts +import { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk' + +await refuseGroupApplication({ groupID, fromUserID, handleMsg: 'Not accepted' }) +``` + +Keep private moderation evidence out of the handling text. Acceptance and rejection are mutually exclusive; confirm from events or a refreshed request list. diff --git a/content/docs/chat/sdk/uniapp/group/join-group.mdx b/content/docs/chat/sdk/uniapp/group/join-group.mdx new file mode 100644 index 0000000000..80691bac6a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/join-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Apply to join a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Apply to join a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/join-group' +--- + +```uts +import { joinGroup } from '@/uni_modules/unix-openim-sdk' + +await joinGroup({ groupID, reqMsg: 'Please add me', joinSource: 2, ex: '' }) +``` + +Use the documented `GroupJoinSource` value and keep request text free of secrets. Promise completion may mean pending verification rather than membership; verify from application state/events. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx new file mode 100644 index 0000000000..63e1a90f90 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx @@ -0,0 +1,20 @@ +--- +title: 'Mute or unmute a group member' +description: 'OpenIM uni-app / uni-app x SDK guide for Mute or unmute a group member.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/change-group-member-mute' +--- + +```uts +import { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk' + +await changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 600 }) +``` + +Use server-defined duration limits and the defined unmute value. Confirm from member updates; client countdown UI is not the authorization source. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx new file mode 100644 index 0000000000..2220586cf4 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Invite users to a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Invite users to a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/invite-user-to-group' +--- + +```uts +import { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk' + +await inviteUserToGroup({ groupID, userIDList: ['user_b'], reason: 'Project collaboration' }) +``` + +The server applies group policy and permissions. Promise completion does not guarantee every target joined; confirm with member events or a refreshed member list. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx new file mode 100644 index 0000000000..9728779793 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx @@ -0,0 +1,20 @@ +--- +title: 'Remove group members' +description: 'OpenIM uni-app / uni-app x SDK guide for Remove group members.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/kick-group-member' +--- + +```uts +import { kickGroupMember } from '@/uni_modules/unix-openim-sdk' + +await kickGroupMember({ groupID, userIDList: ['user_b'], reason: 'Removed by moderator' }) +``` + +Confirm this destructive moderation action and keep private evidence out of a potentially visible reason. Apply member-deleted events or reload membership. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx new file mode 100644 index 0000000000..3db689212b --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx @@ -0,0 +1,20 @@ +--- +title: 'Update a group member’s avatar' +description: 'OpenIM uni-app / uni-app x SDK guide for Update a group member’s avatar.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-avatar' +--- + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL }) +``` + +Upload local media first and pass a remotely reachable HTTPS URL. Do not store `unifile://` or a sandbox path as a remote avatar. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx new file mode 100644 index 0000000000..b1f3c70a09 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set a group member extension' +description: 'OpenIM uni-app / uni-app x SDK guide for Set a group member extension.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-extension' +--- + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) }) +``` + +`ex` replaces the whole value. Merge a versioned schema, preserve unknown fields, and store no secrets in member-visible data. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx new file mode 100644 index 0000000000..99fa65f753 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx @@ -0,0 +1,20 @@ +--- +title: 'Update a member’s group nickname' +description: 'OpenIM uni-app / uni-app x SDK guide for Update a member’s group nickname.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-nickname' +--- + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', nickname: 'Alice (Design)' }) +``` + +Send only the nickname field and confirm through member-info events. The server validates who can edit each member. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx new file mode 100644 index 0000000000..b8cedaa128 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx @@ -0,0 +1,20 @@ +--- +title: 'Manage group administrators' +description: 'OpenIM uni-app / uni-app x SDK guide for Manage group administrators.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-role-level' +--- + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 }) +``` + +Use exported `OpenIMGroupMemberRoleLevel` constants. Role changes are high-risk moderation actions; require confirmation and let the server enforce authority. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx new file mode 100644 index 0000000000..7e81d19f60 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx @@ -0,0 +1,20 @@ +--- +title: 'Transfer group ownership' +description: 'OpenIM uni-app / uni-app x SDK guide for Transfer group ownership.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/managing-group-members/transfer-group-owner' +--- + +```uts +import { transferGroupOwner } from '@/uni_modules/unix-openim-sdk' + +await transferGroupOwner({ groupID, newOwnerUserID: 'user_b' }) +``` + +Require explicit confirmation: ownership and moderator permissions change immediately according to server policy. Reload group/member role state after completion. diff --git a/content/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/docs/chat/sdk/uniapp/group/overview-group.mdx new file mode 100644 index 0000000000..1e8c85aaee --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -0,0 +1,26 @@ +--- +title: 'Group overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Group overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/overview-group' +--- + +Groups use stable `groupID` keys. Build snapshots and then merge group events idempotently. + +```uts +import { off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted } from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onGroupInfoChanged(upsertGroup), onGroupDismissed(removeGroup), + onJoinedGroupAdded(upsertGroup), onJoinedGroupDeleted(removeGroup), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +Treat membership roles, mute state, join policy, and commercial extension fields as server-authoritative. Reload after login or synchronization gaps. diff --git a/content/docs/chat/sdk/uniapp/group/quit-group.mdx b/content/docs/chat/sdk/uniapp/group/quit-group.mdx new file mode 100644 index 0000000000..7eefb1a18d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/quit-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Leave a group' +description: 'OpenIM uni-app / uni-app x SDK guide for Leave a group.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/quit-group' +--- + +```uts +import { quitGroup } from '@/uni_modules/unix-openim-sdk' + +await quitGroup(groupID) +``` + +Ask for confirmation. The group owner may need to transfer ownership or dismiss the group instead. Remove local state only after an event or refreshed joined-group list. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx new file mode 100644 index 0000000000..f45219ed10 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx @@ -0,0 +1,25 @@ +--- +title: 'List group members' +description: 'OpenIM uni-app / uni-app x SDK guide for List group members.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-group-member-list' +--- + +```uts +import { getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged } from '@/uni_modules/unix-openim-sdk' + +const added = onGroupMemberAdded(upsertMember) +const deleted = onGroupMemberDeleted(removeMember) +const changed = onGroupMemberInfoChanged(upsertMember) +const result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 }) +replaceMembers(result?.members ?? []) +off(added); off(deleted); off(changed) +``` + +Use exported filters, paginate, and merge by `(groupID,userID)`. Reload after role or synchronization changes. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx new file mode 100644 index 0000000000..ca8a17d9b6 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get specified group member profiles' +description: 'OpenIM uni-app / uni-app x SDK guide for Get specified group member profiles.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info' +--- + +```uts +import { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedGroupMembersInfo({ groupID, userIDList: ['user_a', 'user_b'] }) +``` + +Map results by `userID`; missing entries can reflect non-membership or access policy. Do not rely on input order. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx new file mode 100644 index 0000000000..dfb7a47fe5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Check group membership' +description: 'OpenIM uni-app / uni-app x SDK guide for Check group membership.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-users-in-group' +--- + +```uts +import { getUsersInGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await getUsersInGroup({ groupID, userIDList }) +``` + +Use this to check which requested users belong to one group. Interpret results by user ID, not position; it does not add or remove members. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx new file mode 100644 index 0000000000..43534233dc --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx @@ -0,0 +1,20 @@ +--- +title: 'Search group members' +description: 'OpenIM uni-app / uni-app x SDK guide for Search group members.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/search-group-members' +--- + +```uts +import { searchGroupMembers } from '@/uni_modules/unix-openim-sdk' + +const result = await searchGroupMembers({ groupID, keywordList: ['Alice'], isSearchUserID: true, isSearchMemberNickname: true }) +``` + +Reject empty keywords and use explicit search flags. This searches group-member data and does not replace public user lookup. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx new file mode 100644 index 0000000000..d319937f95 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get joined groups by page' +description: 'OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page' +--- + +```uts +import { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk' + +const result = await getJoinedGroupListPage({ offset: 0, count: 100 }) +``` + +Continue until a page returns fewer than `count` items. Group state may change during pagination, so deduplicate by `groupID` and merge events idempotently. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx new file mode 100644 index 0000000000..52f64aa875 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx @@ -0,0 +1,21 @@ +--- +title: 'Get joined groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Get joined groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list' +--- + +```uts +import { getJoinedGroupList } from '@/uni_modules/unix-openim-sdk' + +const result = await getJoinedGroupList() +replaceJoinedGroups(result?.groups ?? []) +``` + +Use this for a complete manageable snapshot, deduplicate by `groupID`, and merge joined/deleted/info events. Use the paged API for large lists. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx new file mode 100644 index 0000000000..41a250d297 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get group information' +description: 'OpenIM uni-app / uni-app x SDK guide for Get group information.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-specified-groups-info' +--- + +```uts +import { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedGroupsInfo(['group_a', 'group_b']) +``` + +Results can be missing or reordered. Map by `groupID` and treat server-returned role, policy, and mute fields as authoritative snapshots. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx new file mode 100644 index 0000000000..921e499919 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx @@ -0,0 +1,20 @@ +--- +title: 'Check group membership' +description: 'OpenIM uni-app / uni-app x SDK guide for Check group membership.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-groups/is-join-group' +--- + +```uts +import { isJoinGroup } from '@/uni_modules/unix-openim-sdk' + +const joined = await isJoinGroup(groupID) +``` + +Use the returned boolean for current membership, but refresh after join/quit events or account changes. This query neither joins the group nor checks moderation permissions. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx new file mode 100644 index 0000000000..30e86fc00c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx @@ -0,0 +1,20 @@ +--- +title: 'Search groups' +description: 'OpenIM uni-app / uni-app x SDK guide for Search groups.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/retrieving-groups/search-groups' +--- + +```uts +import { searchGroups } from '@/uni_modules/unix-openim-sdk' + +const result = await searchGroups({ keywordList: ['project'], isSearchGroupID: true, isSearchGroupName: true }) +``` + +Reject empty searches, map results by `groupID`, and distinguish local/joined-group search semantics from a server-wide group directory. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx new file mode 100644 index 0000000000..11223865f5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx @@ -0,0 +1,20 @@ +--- +title: 'Publish a group announcement' +description: 'OpenIM uni-app / uni-app x SDK guide for Publish a group announcement.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/set-group-announcement' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, notification: 'Release on Friday at 17:00' }) +``` + +Send only `notification`, then confirm its update time and author from group information. Announcements are visible to members and must not contain secrets. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx new file mode 100644 index 0000000000..75464e70ed --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set group extra data' +description: 'OpenIM uni-app / uni-app x SDK guide for Set group extra data.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/set-group-extension' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) }) +``` + +`ex` is a whole-value replacement. Parse and merge the existing versioned schema, preserve unknown fields, and never place secrets in member-readable data. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx new file mode 100644 index 0000000000..f9878ad1e7 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set group join verification' +description: 'OpenIM uni-app / uni-app x SDK guide for Set group join verification.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/set-group-join-verification' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, needVerification: 1 }) +``` + +Use exported `OpenIMGroupNeedVerification` constants. The policy affects future joins, not existing members or requests; confirm from the updated group. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx new file mode 100644 index 0000000000..88ca3c9a6e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set member friend request permission' +description: 'OpenIM uni-app / uni-app x SDK guide for Set member friend request permission.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/set-group-member-friend-permission' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, applyMemberFriend: 1 }) +``` + +Use valid `OpenIMGroupOption` values. The server enforces this policy; UI visibility alone is not an authorization boundary. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx new file mode 100644 index 0000000000..2db7e61492 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set member profile access' +description: 'OpenIM uni-app / uni-app x SDK guide for Set member profile access.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/set-group-member-profile-access' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, lookMemberInfo: 1 }) +``` + +Use valid `OpenIMGroupOption` values. The server remains responsible for privacy enforcement; hiding a client control is not sufficient protection. diff --git a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx new file mode 100644 index 0000000000..7ef6d3101c --- /dev/null +++ b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -0,0 +1,20 @@ +--- +title: 'Update group profile' +description: 'OpenIM uni-app / uni-app x SDK guide for Update group profile.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'draft' +lastUpdated: '2026-07-20' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/group/update-group-profile' +--- + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, groupName: 'New project name', faceURL: avatarURL }) +``` + +Pass only fields that should change. The server enforces role permissions; confirm final data through `onGroupInfoChanged` or a new query. diff --git a/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx b/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx new file mode 100644 index 0000000000..8e9dbea5ee --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx @@ -0,0 +1,15 @@ +--- +title: '开启或关闭全员禁言' +description: '修改群组全员禁言状态。' +sourcePath: '/sdk/uniapp/group/change-group-mute' +--- + +`changeGroupMute()` 修改群组全员禁言。 + +```uts +import { changeGroupMute } from '@/uni_modules/unix-openim-sdk' + +await changeGroupMute({ groupID, isMute: true }) +``` + +权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx b/content/zh/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx new file mode 100644 index 0000000000..c65d8dce58 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx @@ -0,0 +1,23 @@ +--- +title: '检查群组 full-sync 状态' +description: '商业版检查群列表或指定群成员是否完成全量同步。' +sourcePath: '/sdk/uniapp/group/check-full-sync-state' +--- + +两个检查接口属于商业版,用于诊断本地数据是否已经完成全量同步。 + +```uts +import { + checkGroupMemberFullSync, + checkLocalGroupFullSync, +} from '@/uni_modules/unix-openim-sdk' + +const groups = await checkLocalGroupFullSync() +const members = await checkGroupMemberFullSync({ groupID }) + +if (groups?.IsFullSync == true && members?.IsFullSync == true) { + enableCompleteGroupManagement() +} +``` + +返回字段真实名称是 `IsFullSync`。`null` 或字段缺失不能当作 `true`。这些方法只检查状态,不触发同步;未完成时继续观察 SDK 同步事件或稍后查询,避免高频轮询。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx new file mode 100644 index 0000000000..41bd284926 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx @@ -0,0 +1,19 @@ +--- +title: '创建群组' +description: '创建群资料并设置初始成员与管理员。' +sourcePath: '/sdk/uniapp/group/create-group' +--- + +`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。 + +```uts +import { createGroup } from '@/uni_modules/unix-openim-sdk' + +const group = await createGroup({ + groupInfo: { groupName: '项目群', groupType: 2 }, + memberUserIDs: ['user_b', 'user_c'], + adminUserIDs: ['user_b'], +}) +``` + +群类型、验证方式和其他 `OpenIMCreateGroupInfo` 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx new file mode 100644 index 0000000000..5559e540ec --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx @@ -0,0 +1,15 @@ +--- +title: '解散群组' +description: '群主解散指定群组。' +sourcePath: '/sdk/uniapp/group/dismiss-group' +--- + +`dismissGroup()` 解散群组。 + +```uts +import { dismissGroup } from '@/uni_modules/unix-openim-sdk' + +await dismissGroup(groupID) +``` + +这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx new file mode 100644 index 0000000000..d14d9e7171 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx @@ -0,0 +1,15 @@ +--- +title: '接受入群申请' +description: '接受指定用户加入指定群。' +sourcePath: '/sdk/uniapp/group/group-applications/accept-group-application' +--- + +`acceptGroupApplication()` 由有权限的群成员处理申请。 + +```uts +import { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk' + +await acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '已通过' }) +``` + +成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx new file mode 100644 index 0000000000..f1cf23010f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx @@ -0,0 +1,17 @@ +--- +title: '删除入群申请记录' +description: '商业版批量删除指定入群申请。' +sourcePath: '/sdk/uniapp/group/group-applications/delete-group-requests' +--- + +`deleteGroupRequests()` 商业版 删除明确指定的申请记录。 + +```uts +import { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk' + +await deleteGroupRequests({ + groupRequests: [{ groupID, fromUserID: 'user_b' }], +}) +``` + +使用 `OpenIMSimpleGroupRequest` 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx new file mode 100644 index 0000000000..22ca6a00a7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -0,0 +1,16 @@ +--- +title: '查询发出的入群申请' +description: '分页查询当前账号发出的入群申请。' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant' +--- + +`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。 + +```uts +import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' + +const result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 }) +renderSentGroupApplications(result?.applications ?? []) +``` + +参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx new file mode 100644 index 0000000000..66331f1320 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx @@ -0,0 +1,33 @@ +--- +title: '查询收到的入群申请' +description: '分页查询待管理的入群申请,并处理申请事件。' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient' +--- + +`getGroupApplicationListAsRecipient()` 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。 + +```uts +import { + getGroupApplicationListAsRecipient, + off, + onGroupApplicationAccepted, + onGroupApplicationAdded, + onGroupApplicationDeleted, + onGroupApplicationRejected, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const addedSubscription = onGroupApplicationAdded((item) => upsertGroupApplication(item)) +const subscriptions : Array = [ + addedSubscription, + onGroupApplicationAccepted((item) => upsertGroupApplication(item)), + onGroupApplicationRejected((item) => upsertGroupApplication(item)), + onGroupApplicationDeleted((item) => removeGroupApplication(item)), +] + +const result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 }) +replaceReceivedGroupApplications(result?.applications ?? []) +subscriptions.forEach((subscription) => off(subscription)) +``` + +事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx new file mode 100644 index 0000000000..64940291da --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx @@ -0,0 +1,16 @@ +--- +title: '查询未处理入群申请数' +description: '查询群管理入口的未处理申请数量。' +sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-unhandled-count' +--- + +`getGroupApplicationUnhandledCount()` 返回数量或 `null`。 + +```uts +import { getGroupApplicationUnhandledCount } from '@/uni_modules/unix-openim-sdk' + +const count = await getGroupApplicationUnhandledCount({ offset: 0, count: 100 }) +setGroupApplicationCount(count ?? 0) +``` + +多端处理会让本地增减漂移,申请事件到达后重新查询权威数量。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx new file mode 100644 index 0000000000..cf17d4a1bb --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx @@ -0,0 +1,22 @@ +--- +title: '观察群申请角标变化' +description: '商业版订阅群申请 badge 数量事件。' +sourcePath: '/sdk/uniapp/group/group-applications/observe-group-application-badge-count' +--- + +`onGroupApplicationBadgeCountChanged` 商业版 直接提供新的角标数量。 + +```uts +import { + off, + onGroupApplicationBadgeCountChanged, +} from '@/uni_modules/unix-openim-sdk' + +const badgeSubscription = onGroupApplicationBadgeCountChanged((count) => { + setGroupApplicationCount(count) +}) + +off(badgeSubscription) +``` + +用事件值替换本地数量,不做 `+1/-1`。当前没有“清除群申请 badge”的 API;处理申请后通过查询和后续事件刷新,不能调用不存在的方法。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx new file mode 100644 index 0000000000..dfecb1d4e3 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx @@ -0,0 +1,15 @@ +--- +title: '拒绝入群申请' +description: '拒绝指定用户加入指定群。' +sourcePath: '/sdk/uniapp/group/group-applications/refuse-group-application' +--- + +`refuseGroupApplication()` 使用与接受相同的定位字段。 + +```uts +import { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk' + +await refuseGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '暂不通过' }) +``` + +处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx new file mode 100644 index 0000000000..0318017e6f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx @@ -0,0 +1,20 @@ +--- +title: '申请加入群组' +description: '向指定群发送加入申请。' +sourcePath: '/sdk/uniapp/group/join-group' +--- + +`joinGroup()` 提交入群申请。 + +```uts +import { joinGroup } from '@/uni_modules/unix-openim-sdk' + +await joinGroup({ + groupID, + reqMsg: '申请加入项目群', + joinSource: 2, + ex: '', +}) +``` + +`joinSource` 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 `ex` 不包含敏感信息。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx new file mode 100644 index 0000000000..8675f3923a --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx @@ -0,0 +1,15 @@ +--- +title: '设置成员禁言' +description: '按秒设置指定群成员的禁言时长。' +sourcePath: '/sdk/uniapp/group/managing-group-members/change-group-member-mute' +--- + +`changeGroupMemberMute()` 使用 `mutedSeconds` 设置禁言时长。 + +```uts +import { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk' + +await changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 3600 }) +``` + +解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx new file mode 100644 index 0000000000..57b4d37d81 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx @@ -0,0 +1,19 @@ +--- +title: '邀请用户入群' +description: '邀请一个或多个用户加入指定群。' +sourcePath: '/sdk/uniapp/group/managing-group-members/invite-user-to-group' +--- + +`inviteUserToGroup()` 提交用户列表和邀请原因。 + +```uts +import { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk' + +await inviteUserToGroup({ + groupID, + reason: '加入项目讨论', + userIDList: ['user_b', 'user_c'], +}) +``` + +用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx new file mode 100644 index 0000000000..1a12c77339 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx @@ -0,0 +1,15 @@ +--- +title: '移除群成员' +description: '把一个或多个成员移出指定群。' +sourcePath: '/sdk/uniapp/group/managing-group-members/kick-group-member' +--- + +`kickGroupMember()` 使用 `OpenIMGroupInviteParams` 相同结构定位成员和填写原因。 + +```uts +import { kickGroupMember } from '@/uni_modules/unix-openim-sdk' + +await kickGroupMember({ groupID, reason: '成员调整', userIDList: ['user_b'] }) +``` + +这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx new file mode 100644 index 0000000000..952a6cbc69 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员头像' +description: '通过 setGroupMemberInfo 更新成员在群内的头像。' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-avatar' +--- + +通过 `faceURL` 更新群成员资料中的头像。 + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL }) +``` + +先把本地图片上传到业务可访问的 HTTPS 地址。不要传 `unifile://` 或本地沙盒路径作为远端头像 URL。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx new file mode 100644 index 0000000000..0d6989f39d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员扩展字段' +description: '通过 setGroupMemberInfo 更新成员 ex。' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-extension' +--- + +成员 `ex` 是整段业务扩展字符串。 + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) }) +``` + +修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx new file mode 100644 index 0000000000..f02e16b4a7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员昵称' +description: '更新成员在指定群内的昵称。' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-nickname' +--- + +`setGroupMemberInfo()` 是成员资料统一更新入口。 + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', nickname: '项目负责人' }) +``` + +群昵称不同于用户全局昵称。只传本次字段,最终资料以 `onGroupMemberInfoChanged` 为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx new file mode 100644 index 0000000000..a8cd848324 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员角色' +description: '通过 setGroupMemberInfo 更新成员角色等级。' +sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-role-level' +--- + +通过 `roleLevel` 更新群主、管理员或普通成员角色。 + +```uts +import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 }) +``` + +使用 `OpenIMGroupMemberRoleLevel` 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx new file mode 100644 index 0000000000..f790edfbdf --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx @@ -0,0 +1,15 @@ +--- +title: '转让群主' +description: '把群主权限转让给指定成员。' +sourcePath: '/sdk/uniapp/group/managing-group-members/transfer-group-owner' +--- + +`transferGroupOwner()` 是不可轻易撤销的高风险操作。 + +```uts +import { transferGroupOwner } from '@/uni_modules/unix-openim-sdk' + +await transferGroupOwner({ groupID, newOwnerUserID: 'user_b' }) +``` + +目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx new file mode 100644 index 0000000000..abc3df0243 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -0,0 +1,32 @@ +--- +title: '群组概览' +description: '理解群资料、成员、申请、权限和群组事件。' +sourcePath: '/sdk/uniapp/group/overview-group' +--- + +群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 + +```uts +import { + off, + onGroupDismissed, + onGroupInfoChanged, + onJoinedGroupAdded, + onJoinedGroupDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group)) +const subscriptions : Array = [ + infoSubscription, + onGroupDismissed((group) => removeGroup(group.groupID)), + onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)), + onJoinedGroupDeleted((group) => removeGroup(group.groupID)), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 + +`OpenIMGroupItem` 的 `attachedInfo` 以及 `displayIsRead`、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx new file mode 100644 index 0000000000..9bd2f7047e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx @@ -0,0 +1,15 @@ +--- +title: '退出群组' +description: '当前用户主动退出指定群。' +sourcePath: '/sdk/uniapp/group/quit-group' +--- + +`quitGroup()` 让当前用户退出群组。 + +```uts +import { quitGroup } from '@/uni_modules/unix-openim-sdk' + +await quitGroup(groupID) +``` + +群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx new file mode 100644 index 0000000000..d796665b2e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx @@ -0,0 +1,31 @@ +--- +title: '查询群成员列表' +description: '分页查询群成员,并处理成员新增、删除和资料变化事件。' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-group-member-list' +--- + +`getGroupMemberList()` 按过滤条件分页读取成员。本页归属三个成员事件。 + +```uts +import { + getGroupMemberList, + off, + onGroupMemberAdded, + onGroupMemberDeleted, + onGroupMemberInfoChanged, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const addedSubscription = onGroupMemberAdded((member) => upsertMember(member)) +const subscriptions : Array = [ + addedSubscription, + onGroupMemberDeleted((member) => removeMember(member.groupID, member.userID)), + onGroupMemberInfoChanged((member) => upsertMember(member)), +] + +const result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 }) +replaceMembers(result?.members ?? []) +subscriptions.forEach((subscription) => off(subscription)) +``` + +`filter` 使用服务端定义的成员过滤值。按 `groupID:userID` 去重;分页与事件并发时不要按数组位置更新。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx new file mode 100644 index 0000000000..49fd578a70 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -0,0 +1,18 @@ +--- +title: '查询指定群成员资料' +description: '按用户 ID 列表批量读取指定群成员。' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info' +--- + +`getSpecifiedGroupMembersInfo()` 批量查询群内用户。 + +```uts +import { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedGroupMembersInfo({ + groupID, + userIDList: ['user_a', 'user_b'], +}) +``` + +结果可能少于输入,按 `userID` 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx new file mode 100644 index 0000000000..3cf68499c6 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx @@ -0,0 +1,15 @@ +--- +title: '筛选群内用户' +description: '从给定用户列表中返回属于指定群的用户 ID。' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-users-in-group' +--- + +`getUsersInGroup()` 判断一批用户中哪些属于指定群,返回 `string[] | null`。 + +```uts +import { getUsersInGroup } from '@/uni_modules/unix-openim-sdk' + +const members = await getUsersInGroup({ groupID, userIDList: candidateUserIDs }) +``` + +结果是用户 ID,不含成员资料。需要群昵称和角色时再调用指定成员查询。输入去重,并把 `null` 与空数组分别作为“无有效结果”和“没有匹配成员”处理。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx new file mode 100644 index 0000000000..f3a0131ff5 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx @@ -0,0 +1,20 @@ +--- +title: '搜索群成员' +description: '按用户 ID 或群昵称搜索群成员。' +sourcePath: '/sdk/uniapp/group/retrieving-group-members/search-group-members' +--- + +`searchGroupMembers()` 在指定群内搜索。 + +```uts +import { searchGroupMembers } from '@/uni_modules/unix-openim-sdk' + +const result = await searchGroupMembers({ + groupID, + keywordList: ['Alice'], + isSearchUserID: true, + isSearchMemberNickname: true, +}) +``` + +空关键词由 UI 拦截。结果按 `groupID:userID` 去重;它不是全局用户搜索。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx new file mode 100644 index 0000000000..8b71600a51 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -0,0 +1,18 @@ +--- +title: '分页查询已加入群组' +description: '按 offset 和 count 分页读取已加入群组。' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page' +--- + +`getJoinedGroupListPage()` 适合群数量较大的账号。 + +```uts +import { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk' + +const result = await getJoinedGroupListPage({ offset: 0, count: 100 }) +appendGroups(result?.groups ?? []) +``` + +`offset` 从 0 开始,直到返回数量小于 `count`。分页期间群事件可能改变列表,应按 `groupID` 去重,而不是依赖页内位置。 + +`displayIsRead` 和部分禁言扩展字段商业版,缺失时按可选值处理。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx new file mode 100644 index 0000000000..af96ae4423 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx @@ -0,0 +1,16 @@ +--- +title: '查询已加入群组' +description: '一次性读取当前账号已加入的群组快照。' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list' +--- + +`getJoinedGroupList()` 返回当前账号已加入群组的完整本地快照。 + +```uts +import { getJoinedGroupList } from '@/uni_modules/unix-openim-sdk' + +const result = await getJoinedGroupList() +replaceJoinedGroups(result?.groups ?? []) +``` + +按 `groupID` 去重,并配合[群组概览](/sdk/uniapp/group/overview-group)的事件维护增量。群较多时改用分页入口。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx new file mode 100644 index 0000000000..4cabfe6fd9 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx @@ -0,0 +1,16 @@ +--- +title: '查询指定群资料' +description: '按 groupID 列表批量查询群资料。' +sourcePath: '/sdk/uniapp/group/retrieving-groups/get-specified-groups-info' +--- + +`getSpecifiedGroupsInfo()` 批量查询群资料。 + +```uts +import { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk' + +const result = await getSpecifiedGroupsInfo(['group_a', 'group_b']) +const groups = result?.groups ?? [] +``` + +结果不保证与输入顺序一致,按 `groupID` 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx new file mode 100644 index 0000000000..d593e71075 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx @@ -0,0 +1,15 @@ +--- +title: '检查是否已加入群组' +description: '判断当前账号是否属于指定群。' +sourcePath: '/sdk/uniapp/group/retrieving-groups/is-join-group' +--- + +`isJoinGroup()` 返回布尔值。 + +```uts +import { isJoinGroup } from '@/uni_modules/unix-openim-sdk' + +const joined = await isJoinGroup(groupID) +``` + +该结果是查询时快照。群状态变化后用群事件或重新查询刷新,不把一次 `true` 永久缓存。未加入时可按群验证策略发起申请。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx new file mode 100644 index 0000000000..740121b3ba --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx @@ -0,0 +1,19 @@ +--- +title: '搜索已加入群组' +description: '按群 ID 或群名称搜索本地群组。' +sourcePath: '/sdk/uniapp/group/retrieving-groups/search-groups' +--- + +`searchGroups()` 搜索当前可见的群资料。 + +```uts +import { searchGroups } from '@/uni_modules/unix-openim-sdk' + +const result = await searchGroups({ + keywordList: ['项目'], + isSearchGroupID: true, + isSearchGroupName: true, +}) +``` + +空关键词由 UI 拦截。结果按 `groupID` 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-announcement.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-announcement.mdx new file mode 100644 index 0000000000..b263926e2f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-announcement.mdx @@ -0,0 +1,17 @@ +--- +title: '设置群公告' +description: '通过 setGroupInfo 更新群公告。' +sourcePath: '/sdk/uniapp/group/set-group-announcement' +--- + +群公告使用 `setGroupInfo()` 的 `notification` 字段更新。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, notification: '周五 17:00 发布版本' }) +``` + +只传公告字段,避免覆盖群名、头像或策略。公告可能触发群资料事件;以事件或重新查询确认 `notificationUpdateTime` 与 `notificationUserID`。 + +公告会展示给群成员,不应包含 Token 或内部密钥。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx new file mode 100644 index 0000000000..92709e6869 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群扩展字段' +description: '通过 setGroupInfo 更新群组 ex。' +sourcePath: '/sdk/uniapp/group/set-group-extension' +--- + +群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) }) +``` + +`ex` 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx new file mode 100644 index 0000000000..2604994b1d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx @@ -0,0 +1,15 @@ +--- +title: '设置入群验证' +description: '设置群成员加入时的验证策略。' +sourcePath: '/sdk/uniapp/group/set-group-join-verification' +--- + +通过 `setGroupInfo()` 的 `needVerification` 更新入群验证策略。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, needVerification: 1 }) +``` + +使用 `OpenIMGroupNeedVerification` 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx new file mode 100644 index 0000000000..37206930fc --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员加好友权限' +description: '控制群成员之间是否可以发起好友申请。' +sourcePath: '/sdk/uniapp/group/set-group-member-friend-permission' +--- + +通过 `setGroupInfo()` 的 `applyMemberFriend` 更新群成员加好友策略。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, applyMemberFriend: 1 }) +``` + +使用 `OpenIMGroupOption` 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx new file mode 100644 index 0000000000..8508dac994 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx @@ -0,0 +1,15 @@ +--- +title: '设置群成员资料可见性' +description: '控制群成员是否可以查看其他成员资料。' +sourcePath: '/sdk/uniapp/group/set-group-member-profile-access' +--- + +通过 `setGroupInfo()` 的 `lookMemberInfo` 设置群成员资料可见策略。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ groupID, lookMemberInfo: 1 }) +``` + +使用 `OpenIMGroupOption` 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx new file mode 100644 index 0000000000..f916b3344c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -0,0 +1,22 @@ +--- +title: '更新群资料' +description: '通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。' +sourcePath: '/sdk/uniapp/group/update-group-profile' +--- + +`setGroupInfo()` 只更新提供的可选字段。 + +```uts +import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' + +await setGroupInfo({ + groupID, + groupName: '新的群名', + introduction: '项目协作群', + faceURL: 'https://cdn.example.com/group.png', +}) +``` + +群主和管理员权限由服务端校验。Promise 成功后通过 `onGroupInfoChanged` 或重新查询刷新,不直接覆盖未提交字段。 + +`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。 From a9d84f47f4baf9c2265757507838947a4f3f2a4c Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 13:04:00 +0800 Subject: [PATCH 06/20] docs(uniapp): document message and upload APIs --- .../sdk/uniapp/file-uploads/upload-file.mdx | 31 ++++++++++++++ .../check-speech-to-text.mdx | 20 ++++++++++ .../composing-messages/get-typing-status.mdx | 20 ++++++++++ .../save-local-transcript.mdx | 20 ++++++++++ .../composing-messages/transcribe-audio.mdx | 20 ++++++++++ .../translate-text-and-messages.mdx | 22 ++++++++++ .../update-typing-status.mdx | 24 +++++++++++ .../creating-messages/create-card-message.mdx | 20 ++++++++++ .../create-custom-message.mdx | 22 ++++++++++ .../creating-messages/create-face-message.mdx | 20 ++++++++++ .../create-file-message-by-url.mdx | 20 ++++++++++ .../create-file-message-from-full-path.mdx | 22 ++++++++++ .../create-forward-message.mdx | 20 ++++++++++ .../create-image-message-by-url.mdx | 20 ++++++++++ .../create-image-message-from-full-path.mdx | 20 ++++++++++ .../create-location-message.mdx | 20 ++++++++++ .../create-markdown-message.mdx | 20 ++++++++++ .../create-merger-message.mdx | 22 ++++++++++ .../create-quote-message.mdx | 20 ++++++++++ .../create-sound-message-by-url.mdx | 20 ++++++++++ .../create-sound-message-from-full-path.mdx | 20 ++++++++++ .../create-text-at-message.mdx | 23 +++++++++++ .../creating-messages/create-text-message.mdx | 21 ++++++++++ .../create-video-message-by-url.mdx | 20 ++++++++++ .../create-video-message-from-full-path.mdx | 23 +++++++++++ .../clear-all-local-messages.mdx | 20 ++++++++++ .../managing-messages/clear-all-messages.mdx | 20 ++++++++++ .../delete-local-message.mdx | 20 ++++++++++ .../delete-saved-messages.mdx | 22 ++++++++++ .../delete-user-messages.mdx | 22 ++++++++++ .../managing-messages/get-pinned-messages.mdx | 20 ++++++++++ .../insert-local-group-message.mdx | 20 ++++++++++ .../insert-local-single-message.mdx | 20 ++++++++++ .../managing-messages/modify-a-message.mdx | 23 +++++++++++ .../managing-messages/revoke-a-message.mdx | 22 ++++++++++ .../set-message-local-ex.mdx | 20 ++++++++++ .../managing-messages/set-message-pinned.mdx | 22 ++++++++++ .../get-group-message-readers.mdx | 20 ++++++++++ .../send-group-read-receipts.mdx | 22 ++++++++++ .../sdk/uniapp/message/overview-message.mdx | 25 ++++++++++++ .../receive-custom-business-messages.mdx | 31 ++++++++++++++ .../receiving-messages/receive-messages.mdx | 28 +++++++++++++ .../find-messages-by-id.mdx | 20 ++++++++++ .../load-message-context.mdx | 20 ++++++++++ .../load-older-messages.mdx | 22 ++++++++++ .../searching-messages/search-messages.mdx | 24 +++++++++++ .../sending-messages/send-message-not-oss.mdx | 20 ++++++++++ .../message/sending-messages/send-message.mdx | 21 ++++++++++ .../sdk/uniapp/file-uploads/upload-file.mdx | 31 ++++++++++++++ .../check-speech-to-text.mdx | 15 +++++++ .../composing-messages/get-typing-status.mdx | 15 +++++++ .../save-local-transcript.mdx | 15 +++++++ .../composing-messages/transcribe-audio.mdx | 15 +++++++ .../translate-text-and-messages.mdx | 29 ++++++++++++++ .../update-typing-status.mdx | 24 +++++++++++ .../creating-messages/create-card-message.mdx | 20 ++++++++++ .../create-custom-message.mdx | 21 ++++++++++ .../creating-messages/create-face-message.mdx | 15 +++++++ .../create-file-message-by-url.mdx | 15 +++++++ .../create-file-message-from-full-path.mdx | 18 +++++++++ .../create-forward-message.mdx | 15 +++++++ .../create-image-message-by-url.mdx | 15 +++++++ .../create-image-message-from-full-path.mdx | 17 ++++++++ .../create-location-message.mdx | 19 +++++++++ .../create-markdown-message.mdx | 15 +++++++ .../create-merger-message.mdx | 19 +++++++++ .../create-quote-message.mdx | 18 +++++++++ .../create-sound-message-by-url.mdx | 15 +++++++ .../create-sound-message-from-full-path.mdx | 18 +++++++++ .../create-text-at-message.mdx | 22 ++++++++++ .../creating-messages/create-text-message.mdx | 16 ++++++++ .../create-video-message-by-url.mdx | 15 +++++++ .../create-video-message-from-full-path.mdx | 20 ++++++++++ .../clear-all-local-messages.mdx | 15 +++++++ .../managing-messages/clear-all-messages.mdx | 15 +++++++ .../delete-local-message.mdx | 15 +++++++ .../delete-saved-messages.mdx | 24 +++++++++++ .../delete-user-messages.mdx | 27 +++++++++++++ .../managing-messages/get-pinned-messages.mdx | 15 +++++++ .../insert-local-group-message.mdx | 15 +++++++ .../insert-local-single-message.mdx | 15 +++++++ .../managing-messages/modify-a-message.mdx | 25 ++++++++++++ .../managing-messages/revoke-a-message.mdx | 21 ++++++++++ .../set-message-local-ex.mdx | 15 +++++++ .../managing-messages/set-message-pinned.mdx | 23 +++++++++++ .../get-group-message-readers.mdx | 15 +++++++ .../send-group-read-receipts.mdx | 21 ++++++++++ .../sdk/uniapp/message/overview-message.mdx | 36 +++++++++++++++++ .../receive-custom-business-messages.mdx | 40 +++++++++++++++++++ .../receiving-messages/receive-messages.mdx | 32 +++++++++++++++ .../find-messages-by-id.mdx | 17 ++++++++ .../load-message-context.mdx | 20 ++++++++++ .../load-older-messages.mdx | 21 ++++++++++ .../searching-messages/search-messages.mdx | 25 ++++++++++++ .../sending-messages/send-message-not-oss.mdx | 15 +++++++ .../message/sending-messages/send-message.mdx | 23 +++++++++++ 96 files changed, 1981 insertions(+) create mode 100644 content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/overview-message.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx create mode 100644 content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx diff --git a/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx new file mode 100644 index 0000000000..c00a77191e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -0,0 +1,31 @@ +--- +title: 'Upload a file' +description: 'OpenIM uni-app / uni-app x SDK guide for Upload a file.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/file-uploads/upload-file' +--- + +```uts +import { uploadFile } from '@/uni_modules/unix-openim-sdk' + +const result = await uploadFile({ + filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', + contentType: 'application/pdf', uuid: createStableUploadUUID(), cancelID: 'upload-report-1', +}) +``` + +Use a readable absolute native path. Resolve `unifile://` first and never pass a network URL as `filepath`. Observe progress through `onUploadFileProgress`. + +```uts +import { cancelUpload } from '@/uni_modules/unix-openim-sdk' + +await cancelUpload({ cancelID: 'upload-report-1' }) +``` + +`cancelUpload()` is Commercial. The original upload Promise defines the final state. Do not delete a temporary file while native code may still read it. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx new file mode 100644 index 0000000000..939603b775 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -0,0 +1,20 @@ +--- +title: 'Check audio transcription availability' +description: 'OpenIM uni-app / uni-app x SDK guide for Check audio transcription availability.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/check-speech-to-text' +--- + +```uts +import { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk' + +const capabilities = await getSpeechToTextCapabilities() +``` + +This Commercial query should gate transcription UI. Capability can vary by deployment and account; do not infer it solely from plugin version. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx new file mode 100644 index 0000000000..90eb604e01 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get typing status' +description: 'OpenIM uni-app / uni-app x SDK guide for Get typing status.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/get-typing-status' +--- + +```uts +import { getInputStates } from '@/uni_modules/unix-openim-sdk' + +const state = await getInputStates(conversationID) +``` + +This Commercial snapshot can become stale quickly. Combine it with typing events and a local timeout; never use it for authorization or durable presence. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx new file mode 100644 index 0000000000..8a8b3d5b42 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx @@ -0,0 +1,20 @@ +--- +title: 'Save a local transcript' +description: 'OpenIM uni-app / uni-app x SDK guide for Save a local transcript.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/save-local-transcript' +--- + +```uts +import { setMessageLocalContent } from '@/uni_modules/unix-openim-sdk' + +await setMessageLocalContent({ conversationID, clientMsgID, content: transcript }) +``` + +This Commercial local-only value is device state and does not edit the server message. Version any structured content and avoid storing unnecessary sensitive transcript data. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx new file mode 100644 index 0000000000..700ca6c56a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx @@ -0,0 +1,20 @@ +--- +title: 'Transcribe audio' +description: 'OpenIM uni-app / uni-app x SDK guide for Transcribe audio.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/transcribe-audio' +--- + +```uts +import { speechToText } from '@/uni_modules/unix-openim-sdk' + +const result = await speechToText(soundMessage) +``` + +This is Commercial. Use a complete sound message, expose consent/privacy behavior, and store the returned transcript according to product policy rather than modifying the original media. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx new file mode 100644 index 0000000000..8a6c43cc6e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx @@ -0,0 +1,22 @@ +--- +title: 'Translate text and messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Translate text and messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/translate-text-and-messages' +--- + +`translateText()` and `translateMessage()` are Commercial on Android and iOS. HarmonyOS returns `platform-unsupported`. + +```uts +import { translateText } from '@/uni_modules/unix-openim-sdk' + +const result = await translateText({ text: 'Hello', targetLanguage: 'zh-CN' }) +``` + +Use the exact frozen parameter model, keep source text/message intact, and display translation as derived content. Treat language output as untrusted user-visible text and preserve privacy consent. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx new file mode 100644 index 0000000000..5342f123b3 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx @@ -0,0 +1,24 @@ +--- +title: 'Report typing status' +description: 'OpenIM uni-app / uni-app x SDK guide for Report typing status.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/composing-messages/update-typing-status' +--- + +`changeInputStates()` updates typing/input state; commercial `typingStatusUpdate()` provides the legacy compatible route. Receive updates through `onConversationUserInputStatusChanged`. + +```uts +import { changeInputStates, off, onConversationUserInputStatusChanged } from '@/uni_modules/unix-openim-sdk' + +const typingSubscription = onConversationUserInputStatusChanged((state) => renderTyping(state)) +await changeInputStates({ conversationID, focus: true }) +off(typingSubscription) +``` + +Debounce high-frequency UI changes and expire stale indicators locally. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx new file mode 100644 index 0000000000..f67fbacf2a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a contact card message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a contact card message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' +--- + +```uts +import { createCardMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createCardMessage({ userID: 'user_b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '' }) +``` + +A card is a send-time snapshot. Resolve current profile data by `userID` when opened, and never treat card fields as authenticated identity. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx new file mode 100644 index 0000000000..b9aeace019 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx @@ -0,0 +1,22 @@ +--- +title: 'Create a custom message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a custom message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-custom-message' +--- + +```uts +import { createCustomMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createCustomMessage({ + data: JSON.stringify({ orderID: 'order_123' }), extension: '', descriptionText: 'Order card', +}) +``` + +All fields reach the recipient. Version and validate a shared schema and store no secrets. `createAdvancedTextMessage()` creates entity/styled text; reject entity ranges outside the original text. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx new file mode 100644 index 0000000000..8e210be565 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create an emoji message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an emoji message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-face-message' +--- + +```uts +import { createFaceMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createFaceMessage({ index: 1, data: 'smile' }) +``` + +Sender and receiver must share the same sticker package/version mapping. Render an unknown-index placeholder instead of failing the message list. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx new file mode 100644 index 0000000000..30559c28d5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a file message from a URL' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a file message from a URL.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' +--- + +```uts +import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createFileMessageByURL(fileElem) +``` + +Use trusted upload-result URL, name, UUID, size, and type values. The URL must be accessible to recipients without exposing private storage credentials. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx new file mode 100644 index 0000000000..38a1f0488b --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx @@ -0,0 +1,22 @@ +--- +title: 'Create a file message from a file' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a file message from a file.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-from-full-path' +--- + +```uts +import { createFileMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createFileMessageFromFullPath({ + filePath: '/data/user/0/app/cache/report.pdf', fileName: 'report.pdf', +}) +``` + +Commercial `createFileMessage()` can include source-path metadata. Validate path, permission, size, and extension. Treat `fileName` as display text, never as a path component. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx new file mode 100644 index 0000000000..fb356e422d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a forwarded message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a forwarded message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-forward-message' +--- + +```uts +import { createForwardMessage } from '@/uni_modules/unix-openim-sdk' + +const forward = await createForwardMessage(sourceMessage) +``` + +Creation does not send. Check content-sharing permissions and privacy first; device-local extension/send-state fields are not recipient-authoritative data. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx new file mode 100644 index 0000000000..d35b24d62e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create an image message from a URL' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an image message from a URL.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' +--- + +```uts +import { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createImageMessageByURL(pictureElem) +``` + +Provide uploaded source/thumbnail URLs and matching dimensions, size, and type. URLs must be accessible to conversation participants; do not place local paths in URL fields. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx new file mode 100644 index 0000000000..d521daacdd --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create an image message from a file' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an image message from a file.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-from-full-path' +--- + +```uts +import { createImageMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createImageMessageFromFullPath('/data/user/0/app/cache/photo.jpg') +``` + +Commercial `createImageMessage()` accepts structured source-path metadata. Both require a readable native path. Resolve `unifile://`, temporary album objects, or content URIs through the host platform and verify existence/permission before sending. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx new file mode 100644 index 0000000000..664387465a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a location message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a location message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-location-message' +--- + +```uts +import { createLocationMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createLocationMessage({ descriptionText: 'Room A', longitude: 121.47, latitude: 31.23 }) +``` + +Obtain user permission and validate coordinate ranges. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx new file mode 100644 index 0000000000..50a50ee2e9 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a Markdown message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a Markdown message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-markdown-message' +--- + +```uts +import { createMarkdownMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createMarkdownMessage({ content: '**Release complete**' }) +``` + +This is Commercial. Sanitize Markdown at render time, disable unsafe HTML/scripts/URLs, and never treat raw content as trusted HTML. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx new file mode 100644 index 0000000000..7e37ec0ce4 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx @@ -0,0 +1,22 @@ +--- +title: 'Create a merged forward message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a merged forward message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-merger-message' +--- + +```uts +import { createMergerMessage } from '@/uni_modules/unix-openim-sdk' + +const merger = await createMergerMessage({ + messageList: selectedMessages, title: 'Chat history', abstractList: ['Alice: Approved'], +}) +``` + +Keep summaries consistent with source messages, verify sharing permission and sensitive content, and limit total message count/size. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx new file mode 100644 index 0000000000..ab114d05cd --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a reply message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a reply message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-quote-message' +--- + +```uts +import { createQuoteMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createQuoteMessage({ text: 'Agreed', message: JSON.stringify(quotedMessage) }) +``` + +Use the complete SDK message snapshot, not a fabricated ID-only object. `createAdvancedQuoteMessage()` also supports text entities. Render a safe unavailable state if the quoted source is later revoked or deleted. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx new file mode 100644 index 0000000000..a5d751df9d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create an audio message from a URL' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an audio message from a URL.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' +--- + +```uts +import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createSoundMessageByURL(soundElem) +``` + +Use upload-result URL, UUID, size, duration, and type values. The remote resource must be accessible to recipients; a sandbox path is not a media URL. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx new file mode 100644 index 0000000000..a42df951dc --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create an audio message from a file' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an audio message from a file.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path' +--- + +```uts +import { createSoundMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createSoundMessageFromFullPath({ soundPath: '/data/user/0/app/cache/voice.m4a', duration: 8 }) +``` + +Commercial `createSoundMessage()` uses the structured form. Wait until recording is closed and readable; make duration match the actual media and the contract unit. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx new file mode 100644 index 0000000000..6047a33a62 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -0,0 +1,23 @@ +--- +title: 'Create an @ message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create an @ message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' +--- + +```uts +import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createTextAtMessage({ + text: '@Alice please review', atUserIDList: ['user_a'], + atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }], quoteMessage: null, +}) +``` + +Keep mention IDs and display metadata aligned. Commercial `getAtAllTag()` returns the deployed “mention everyone” tag. Send the created message with a target group ID. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx new file mode 100644 index 0000000000..352fcba814 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx @@ -0,0 +1,21 @@ +--- +title: 'Create a text message' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a text message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-text-message' +--- + +```uts +import { createTextMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createTextMessage('Hello, OpenIMSDK') +if (message == null) throw new Error('Failed to create text message') +``` + +Validate product length limits first. Creation does not send; pass the returned `OpenIMMessageItem` to `sendMessage()` rather than constructing one manually. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx new file mode 100644 index 0000000000..f2cfe46422 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -0,0 +1,20 @@ +--- +title: 'Create a video message from URLs' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a video message from URLs.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' +--- + +```uts +import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createVideoMessageByURL(videoElem) +``` + +Populate video and cover upload metadata accurately. Both resources must be accessible to recipients and must not expose private storage credentials. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx new file mode 100644 index 0000000000..ea944988ad --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx @@ -0,0 +1,23 @@ +--- +title: 'Create a video message from files' +description: 'OpenIM uni-app / uni-app x SDK guide for Create a video message from files.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-from-full-path' +--- + +```uts +import { createVideoMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createVideoMessageFromFullPath({ + videoPath: '/data/user/0/app/cache/video.mp4', videoType: 'mp4', duration: 12, + snapshotPath: '/data/user/0/app/cache/video-cover.jpg', +}) +``` + +Commercial `createVideoMessage()` can carry source-path metadata. Video and cover must exist, be readable, and match declared type/duration. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx new file mode 100644 index 0000000000..9d28eec511 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx @@ -0,0 +1,20 @@ +--- +title: 'Clear all local messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Clear all local messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/clear-all-local-messages' +--- + +```uts +import { deleteAllMsgFromLocal } from '@/uni_modules/unix-openim-sdk' + +await deleteAllMsgFromLocal() +``` + +This high-risk operation clears all local messages for the account. Confirm, stop concurrent queries, and remember that server synchronization may restore some data. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx new file mode 100644 index 0000000000..06fd84d967 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx @@ -0,0 +1,20 @@ +--- +title: 'Clear local and server messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Clear local and server messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/clear-all-messages' +--- + +```uts +import { deleteAllMsgFromLocalAndSvr } from '@/uni_modules/unix-openim-sdk' + +await deleteAllMsgFromLocalAndSvr() +``` + +This is a higher-risk account-wide local/server deletion. Explain scope/recovery, require strong confirmation, and rebuild conversation/message state after success or ambiguous failure. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx new file mode 100644 index 0000000000..70c0a2c348 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Delete a local message' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete a local message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-local-message' +--- + +```uts +import { deleteMessageFromLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await deleteMessageFromLocalStorage({ conversationID, clientMsgID }) +``` + +The compatible `deleteMessage()` uses the same parameters. This affects only local storage and must not be presented as remote deletion or revocation. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx new file mode 100644 index 0000000000..74bc3ad110 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx @@ -0,0 +1,22 @@ +--- +title: 'Delete messages in a batch' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete messages in a batch.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-saved-messages' +--- + +```uts +import { deleteMessages, off, onMsgDeleted } from '@/uni_modules/unix-openim-sdk' + +const deletedSubscription = onMsgDeleted((message) => removeMessageByID(message.clientMsgID)) +await deleteMessages(deleteParams) +off(deletedSubscription) +``` + +`deleteMessages()` is Commercial and uses `OpenIMDeleteMessagesParams`; `onMsgDeleted` is public. Merge request/event idempotently and follow the deployed service's cross-device semantics. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx new file mode 100644 index 0000000000..b808711d86 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx @@ -0,0 +1,22 @@ +--- +title: 'Delete all messages from a user in a group chat' +description: 'OpenIM uni-app / uni-app x SDK guide for Delete all messages from a user in a group chat.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-user-messages' +--- + +```uts +import { deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv } from '@/uni_modules/unix-openim-sdk' + +const subscription = onDeleteUserAllMsgsInConv((payload) => refreshAfterValidatedJson(payload)) +await deleteUserAllMessagesInConv({ conversationID, userID: targetUserID }) +off(subscription) +``` + +This Commercial range deletion requires authority and strong confirmation. Validate opaque JSON and refresh rather than depending on unfrozen fields. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx new file mode 100644 index 0000000000..ceb373cc63 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get pinned messages in a conversation' +description: 'OpenIM uni-app / uni-app x SDK guide for Get pinned messages in a conversation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/get-pinned-messages' +--- + +```uts +import { getConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationPinnedMsg({ conversationID }) +``` + +This is Commercial. Follow returned pagination/list fields, deduplicate by `clientMsgID`, and reload after pin-change events. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx new file mode 100644 index 0000000000..9abdd88ef5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Insert a local group message' +description: 'OpenIM uni-app / uni-app x SDK guide for Insert a local group message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-group-message' +--- + +```uts +import { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await insertGroupMessageToLocalStorage(insertParams) +``` + +Use `OpenIMInsertGroupMessageParams` with group, sender, and message. This updates only local history and does not broadcast to group members. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx new file mode 100644 index 0000000000..f11fbe6fc8 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx @@ -0,0 +1,20 @@ +--- +title: 'Insert a local one-to-one message' +description: 'OpenIM uni-app / uni-app x SDK guide for Insert a local one-to-one message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-single-message' +--- + +```uts +import { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await insertSingleMessageToLocalStorage(insertParams) +``` + +Use a real `OpenIMInsertSingleMessageParams` with message, sender, and receiver. This inserts device-local history and sends nothing; prevent ID collisions and never fake remote delivery. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx new file mode 100644 index 0000000000..7a37f9761a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx @@ -0,0 +1,23 @@ +--- +title: 'Modify a message' +description: 'OpenIM uni-app / uni-app x SDK guide for Modify a message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/modify-a-message' +--- + +```uts +import { modifyMessage, off, onMessageEdited, onMessageModified } from '@/uni_modules/unix-openim-sdk' + +const modified = onMessageModified(refreshModifiedMessage) +const edited = onMessageEdited(refreshModifiedMessage) +const result = await modifyMessage(modifyParams) +off(modified); off(edited) +``` + +These are Commercial. Validate raw event JSON, refresh by stable message ID, redact message bodies from logs, and use the server's final version for multi-device conflicts. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx new file mode 100644 index 0000000000..86c757b11e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx @@ -0,0 +1,22 @@ +--- +title: 'Revoke a message' +description: 'OpenIM uni-app / uni-app x SDK guide for Revoke a message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/revoke-a-message' +--- + +```uts +import { off, onNewRecvMessageRevoked, revokeMessage } from '@/uni_modules/unix-openim-sdk' + +const revokedSubscription = onNewRecvMessageRevoked(mergeRevokedInfo) +await revokeMessage({ conversationID, clientMsgID }) +off(revokedSubscription) +``` + +The server enforces sender, time, and permission rules. Keep a revoked placeholder instead of blindly removing the array entry; Promise and event order is not guaranteed. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx new file mode 100644 index 0000000000..95eadb91f7 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx @@ -0,0 +1,20 @@ +--- +title: 'Set a local message extension' +description: 'OpenIM uni-app / uni-app x SDK guide for Set a local message extension.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/set-message-local-ex' +--- + +```uts +import { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk' + +await setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) }) +``` + +`localEx` is device-local and replaced as one value. Merge/version JSON, constrain size, and store no tokens or irreplaceable business data. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx new file mode 100644 index 0000000000..5d27be806b --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx @@ -0,0 +1,22 @@ +--- +title: 'Pin or unpin a message' +description: 'OpenIM uni-app / uni-app x SDK guide for Pin or unpin a message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-messages/set-message-pinned' +--- + +```uts +import { off, onChangedPinnedMsg, setConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk' + +const pinnedSubscription = onChangedPinnedMsg((payload) => refreshPinnedMessagesAfterValidJson(payload)) +await setConversationPinnedMsg(pinParams) +off(pinnedSubscription) +``` + +Both are Commercial. Validate the raw event and reload the pinned list instead of casting opaque JSON directly to a message. diff --git a/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx b/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx new file mode 100644 index 0000000000..9a31393889 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get members who read a group message' +description: 'OpenIM uni-app / uni-app x SDK guide for Get members who read a group message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-read-status/get-group-message-readers' +--- + +```uts +import { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk' + +const result = await getGroupMessageReaderList(readerParams) +``` + +This Commercial operation uses `OpenIMGetGroupMessageReaderListParams`. Continue through returned pagination fields, deduplicate by `userID`, and refresh because new receipts can change the list. diff --git a/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx b/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx new file mode 100644 index 0000000000..d6e3ac389a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx @@ -0,0 +1,22 @@ +--- +title: 'Report group messages as read' +description: 'OpenIM uni-app / uni-app x SDK guide for Report group messages as read.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/managing-read-status/send-group-read-receipts' +--- + +```uts +import { off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt } from '@/uni_modules/unix-openim-sdk' + +const receiptSubscription = onRecvGroupReadReceipt(refreshReadState) +await sendGroupMessageReadReceipt(receiptParams) +off(receiptSubscription) +``` + +Both are Commercial. Validate raw JSON and merge by message ID. Request completion, event arrival, and reader-list updates are separate stages. diff --git a/content/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/docs/chat/sdk/uniapp/message/overview-message.mdx new file mode 100644 index 0000000000..5566bb2b9d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -0,0 +1,25 @@ +--- +title: 'Message overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Message overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/overview-message' +--- + +Use `clientMsgID` as the stable client identifier and merge send results, realtime events, and history by `(conversationID,clientMsgID)`. Creation only builds an `OpenIMMessageItem`; `sendMessage()` performs delivery. + +```uts +import { off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress } from '@/uni_modules/unix-openim-sdk' + +const send = onSendMessageProgress((event) => updateMessageProgress(event.clientMsgID, event.progress)) +const file = onUploadFileProgress((event) => updateCurrentUpload(event.progress)) +const logs = onUploadLogsProgress((event) => updateLogUpload(event.progress)) +off(send); off(file); off(logs) +``` + +Progress can repeat or skip values; only final API completion defines success. Convert `unifile://` to a readable native path before local-file creation. diff --git a/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx new file mode 100644 index 0000000000..5f34ab5c96 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx @@ -0,0 +1,31 @@ +--- +title: 'Receive custom business messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Receive custom business messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/receiving-messages/receive-custom-business-messages' +--- + +These listeners deliver opaque JSON strings. `onRecvCustomBusinessMessage` is public; four extension/KV listeners are Commercial and unsupported on HarmonyOS. + +```uts +import { off, onRecvCustomBusinessMessage } from '@/uni_modules/unix-openim-sdk' + +function handleRawPayload(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) routeValidatedBusinessEvent(value) + } catch (_) { + console.error('Invalid custom message event') + } +} +const customSubscription = onRecvCustomBusinessMessage(handleRawPayload) +off(customSubscription) +``` + +uni-app JavaScript should use protected `JSON.parse`. Validate version, kind, and required fields before updating state, safely ignore unknown payloads, and never log the complete string. diff --git a/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx new file mode 100644 index 0000000000..901eb47efc --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx @@ -0,0 +1,28 @@ +--- +title: 'Receive messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Receive messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/receiving-messages/receive-messages' +--- + +Subscribe to single, batch, offline, and online-only delivery paths, then deduplicate by `(conversationID,clientMsgID)`. + +```uts +import { off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage } from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onRecvNewMessage(mergeMessage), onRecvOfflineNewMessage(mergeMessage), + onRecvOnlineOnlyMessage(mergeOnlineOnlyMessage), + onRecvNewMessages((result) => result.messages.forEach(mergeMessage)), + onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +Online-only messages may not exist in history. A single application message store should own these global listeners; history queries remain necessary for snapshots and recovery. diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx new file mode 100644 index 0000000000..ff1146e465 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx @@ -0,0 +1,20 @@ +--- +title: 'Find messages by ID' +description: 'OpenIM uni-app / uni-app x SDK guide for Find messages by ID.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/retrieving-messages/find-messages-by-id' +--- + +```uts +import { findMessageList } from '@/uni_modules/unix-openim-sdk' + +const result = await findMessageList([{ conversationID, clientMsgIDList: ['msg_a', 'msg_b'] }]) +``` + +Map `OpenIMFindMessageResult` by conversation and requested message IDs. Missing messages should not invalidate the complete batch. diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx new file mode 100644 index 0000000000..61aed9b02a --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx @@ -0,0 +1,20 @@ +--- +title: 'Load message context' +description: 'OpenIM uni-app / uni-app x SDK guide for Load message context.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/retrieving-messages/load-message-context' +--- + +```uts +import { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk' + +const result = await fetchSurroundingMessages({ startMessage: targetMessage, viewType: 0, before: 20, after: 20 }) +``` + +This is Commercial. Use a complete SDK message as the anchor, merge duplicates by `clientMsgID`, and preserve chronological ordering. diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx new file mode 100644 index 0000000000..1bacfc3ebb --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -0,0 +1,22 @@ +--- +title: 'Load message history' +description: 'OpenIM uni-app / uni-app x SDK guide for Load message history.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' +--- + +```uts +import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' + +const page = await getAdvancedHistoryMessageList({ conversationID, startClientMsgID: '', count: 50 }) +``` + +Use an empty cursor for the first page and the earliest boundary message ID for the next. Deduplicate by `clientMsgID` and honor the returned end marker. + +Commercial `getHistoryMessageList()` additionally supports `isReverse`, `viewType`, and `lastMinSeq`; direction is a parameter, not a separate reverse-history API. diff --git a/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx new file mode 100644 index 0000000000..2bf7383ab5 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -0,0 +1,24 @@ +--- +title: 'Search messages' +description: 'OpenIM uni-app / uni-app x SDK guide for Search messages.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/searching-messages/search-messages' +--- + +```uts +import { searchLocalMessages } from '@/uni_modules/unix-openim-sdk' + +const result = await searchLocalMessages({ + conversationID, keywordList: ['release'], keywordListMatchType: 0, + senderUserIDList: [], messageTypeList: [], searchTimePosition: 0, + searchTimePeriod: 0, pageIndex: 1, count: 50, +}) +``` + +Use contract-defined matching and time semantics. Search covers locally synchronized/indexable data, not guaranteed full server history. Deduplicate by conversation and message ID. diff --git a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx new file mode 100644 index 0000000000..c125e770ff --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -0,0 +1,20 @@ +--- +title: 'Send an uploaded media message' +description: 'OpenIM uni-app / uni-app x SDK guide for Send an uploaded media message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' +--- + +```uts +import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' + +const sent = await sendMessageNotOss({ message, recvID, groupID }) +``` + +Use this only when the message already contains complete remotely accessible media metadata. A local-path message sent through this route may be inaccessible to recipients; use normal `sendMessage()` for local uploads. diff --git a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx new file mode 100644 index 0000000000..ad72a9e318 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx @@ -0,0 +1,21 @@ +--- +title: 'Send a message' +description: 'OpenIM uni-app / uni-app x SDK guide for Send a message.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/message/sending-messages/send-message' +--- + +```uts +import { sendMessage } from '@/uni_modules/unix-openim-sdk' + +const sent = await sendMessage({ message, recvID: 'user_b', groupID: '', isOnlineOnly: false }) +upsertMessage(sent.clientMsgID, sent) +``` + +Set `recvID` for direct chat or `groupID` for group chat and leave the other empty. The Promise resolves directly to `OpenIMMessageItem`. Preserve failed messages for retry under the same `clientMsgID` unless your product explicitly creates a new send. diff --git a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx new file mode 100644 index 0000000000..82be75b19e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -0,0 +1,31 @@ +--- +title: '上传文件' +description: '上传本地文件、观察进度,并在商业版取消上传。' +sourcePath: '/sdk/uniapp/file-uploads/upload-file' +--- + +`uploadFile()` 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。 + +```uts +import { uploadFile } from '@/uni_modules/unix-openim-sdk' + +const result = await uploadFile({ + filepath: '/data/user/0/app/cache/report.pdf', + name: 'report.pdf', + contentType: 'application/pdf', + uuid: createStableUploadUUID(), + cancelID: 'upload-report-1', +}) +``` + +路径必须是原生可读的完整路径。`unifile://` 先转换;不要把网络 URL 作为 `filepath`。上传进度由[消息概览](/sdk/uniapp/message/overview-message)归属的 `onUploadFileProgress` 提供。 + +商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`: + +```uts +import { cancelUpload } from '@/uni_modules/unix-openim-sdk' + +await cancelUpload({ cancelID: 'upload-report-1' }) +``` + +取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx new file mode 100644 index 0000000000..7760e6ba1c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -0,0 +1,15 @@ +--- +title: '检查语音转文字能力' +description: '商业版查询当前语音转写能力。' +sourcePath: '/sdk/uniapp/message/composing-messages/check-speech-to-text' +--- + +`getSpeechToTextCapabilities()` 商业版 返回能力信息。 + +```uts +import { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk' + +const capabilities = await getSpeechToTextCapabilities() +``` + +在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx new file mode 100644 index 0000000000..5fcc76591f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx @@ -0,0 +1,15 @@ +--- +title: '查询输入状态' +description: '商业版查询指定会话和用户的输入状态。' +sourcePath: '/sdk/uniapp/message/composing-messages/get-typing-status' +--- + +`getInputStates()` 商业版 查询当前快照。 + +```uts +import { getInputStates } from '@/uni_modules/unix-openim-sdk' + +const result = await getInputStates({ conversationID, userID: peerUserID }) +``` + +输入状态是短时提示,不持久化为业务事实。以事件更新 UI,并设置本地超时自动清除,避免断线后永久显示“正在输入”。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx new file mode 100644 index 0000000000..889c894838 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx @@ -0,0 +1,15 @@ +--- +title: '保存本地转写内容' +description: '商业版把更新后的消息内容保存到本地消息。' +sourcePath: '/sdk/uniapp/message/composing-messages/save-local-transcript' +--- + +`setMessageLocalContent()` 商业版 把完整消息对象保存到指定会话的本地存储。 + +```uts +import { setMessageLocalContent } from '@/uni_modules/unix-openim-sdk' + +await setMessageLocalContent({ conversationID, message: updatedMessage }) +``` + +先在原消息副本中合并转写字段,不覆盖 `clientMsgID`、路由和其他业务 elem。该修改是本地内容,不应假定同步到其他设备或服务端。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx new file mode 100644 index 0000000000..68f0f10572 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx @@ -0,0 +1,15 @@ +--- +title: '将音频转为文字' +description: '商业版提交音频文件名和数据进行语音转写。' +sourcePath: '/sdk/uniapp/message/composing-messages/transcribe-audio' +--- + +`speechToText()` 商业版 使用文件名和音频数据。 + +```uts +import { speechToText } from '@/uni_modules/unix-openim-sdk' + +const result = await speechToText({ filename: 'voice.m4a', data: audioBase64 }) +``` + +先检查能力,限制音频大小和格式。`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx new file mode 100644 index 0000000000..4d56a78665 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx @@ -0,0 +1,29 @@ +--- +title: '翻译文本和消息' +description: '商业版翻译文本或指定消息,并说明 HarmonyOS 不支持。' +sourcePath: '/sdk/uniapp/message/composing-messages/translate-text-and-messages' +--- + +两个接口均属于商业版,Android 与 iOS 支持,HarmonyOS 当前返回 `platform-unsupported`。 + +```uts +import { + translateMessage, + translateText, +} from '@/uni_modules/unix-openim-sdk' + +const textResult = await translateText({ + content: 'Hello', + sourceLanguageCode: 'en', + targetLanguageCode: 'zh', +}) + +const translatedMessage = await translateMessage({ + conversationID, + clientMsgID, + sourceLanguageCode: 'en', + targetLanguageCode: 'zh', +}) +``` + +语言代码使用商业服务支持的标准。翻译内容可能包含隐私,应遵守服务端数据处理政策。原文始终保留,翻译失败或平台不支持时降级显示原文。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx new file mode 100644 index 0000000000..a2002a99be --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx @@ -0,0 +1,24 @@ +--- +title: '更新输入状态' +description: '上报会话输入焦点并处理输入状态变化事件。' +sourcePath: '/sdk/uniapp/message/composing-messages/update-typing-status' +--- + +公共入口 `changeInputStates()` 以会话和焦点状态上报输入状态。本页归属 `onConversationUserInputStatusChanged`。 + +```uts +import { + changeInputStates, + off, + onConversationUserInputStatusChanged, +} from '@/uni_modules/unix-openim-sdk' + +const inputSubscription = onConversationUserInputStatusChanged((status) => { + updateConversationInputStatus(status) +}) + +await changeInputStates({ conversationID, userID: peerUserID, focus: true }) +off(inputSubscription) +``` + +进入输入框上报 true,失焦或离开页面上报 false,并做节流。商业版兼容入口 `typingStatusUpdate()` 商业版 使用 `recvID` 和 `msgTip`;同一流程不要同时调用两个入口。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx new file mode 100644 index 0000000000..d833599919 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -0,0 +1,20 @@ +--- +title: '创建名片消息' +description: '使用 OpenIMCardElem 创建用户名片消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' +--- + +`createCardMessage()` 接收 `OpenIMCardElem`。 + +```uts +import { createCardMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createCardMessage({ + userID: 'user_b', + nickname: 'Alice', + faceURL: 'https://cdn.example.com/alice.png', + ex: '', +}) +``` + +名片是发送时快照,接收方点击后应按 `userID` 查询最新资料。不要把名片字段当作可信身份认证。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx new file mode 100644 index 0000000000..c5d68c4c6a --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx @@ -0,0 +1,21 @@ +--- +title: '创建自定义或高级文本消息' +description: '创建业务自定义消息或带实体范围的高级文本。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-custom-message' +--- + +`createCustomMessage()` 用于双方已约定 schema 的业务载荷: + +```uts +import { createCustomMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createCustomMessage({ + data: JSON.stringify({ orderID: 'order_123' }), + extension: '', + descriptionText: '订单卡片', +}) +``` + +`data`、`extension`、`descriptionText` 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。 + +`createAdvancedTextMessage()` 使用 `OpenIMCreateAdvancedTextMessageParams` 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx new file mode 100644 index 0000000000..73f630b257 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx @@ -0,0 +1,15 @@ +--- +title: '创建表情消息' +description: '使用表情索引和业务数据创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-face-message' +--- + +`createFaceMessage()` 接收 `index` 与 `data`。 + +```uts +import { createFaceMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createFaceMessage({ index: 1, data: 'smile' }) +``` + +发送与接收端必须共享表情包版本和索引约定。未知索引应显示降级占位,不让解析错误阻断消息列表。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx new file mode 100644 index 0000000000..f95d6719bd --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -0,0 +1,15 @@ +--- +title: '从 URL 创建文件消息' +description: '使用已上传文件的 OpenIMFileElem 创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' +--- + +`createFileMessageByURL()` 接收 `OpenIMFileElem`。 + +```uts +import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createFileMessageByURL(fileElem) +``` + +文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx new file mode 100644 index 0000000000..f21bc7d00b --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-from-full-path.mdx @@ -0,0 +1,18 @@ +--- +title: '从完整路径创建文件消息' +description: '使用本地文件完整路径和文件名创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-from-full-path' +--- + +公共入口 `createFileMessageFromFullPath()`: + +```uts +import { createFileMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createFileMessageFromFullPath({ + filePath: '/data/user/0/app/cache/report.pdf', + fileName: 'report.pdf', +}) +``` + +商业版 `createFileMessage()` 商业版 可携带来源路径。调用前校验存在性、大小、扩展名和权限;文件名只用于展示,不能作为路径拼接依据。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx new file mode 100644 index 0000000000..e2ba6b32f7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx @@ -0,0 +1,15 @@ +--- +title: '创建逐条转发消息' +description: '基于现有消息创建可发送的转发消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-forward-message' +--- + +`createForwardMessage()` 接收一条完整消息并创建转发对象。 + +```uts +import { createForwardMessage } from '@/uni_modules/unix-openim-sdk' + +const forward = await createForwardMessage(sourceMessage) +``` + +创建后仍需向新目标发送。转发前检查原内容、权限与隐私;本地扩展、发送状态等设备字段不应作为接收方权威数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx new file mode 100644 index 0000000000..ce4d04bb17 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -0,0 +1,15 @@ +--- +title: '从 URL 创建图片消息' +description: '使用已上传图片的 elem 信息创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' +--- + +`createImageMessageByURL()` 适合图片已由业务上传并取得可访问 URL 的场景。 + +```uts +import { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createImageMessageByURL(pictureElem) +``` + +`OpenIMPictureElem` 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx new file mode 100644 index 0000000000..b07fc79368 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-from-full-path.mdx @@ -0,0 +1,17 @@ +--- +title: '从完整路径创建图片消息' +description: '使用原生可读的本地完整路径创建图片消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-from-full-path' +--- + +公共入口 `createImageMessageFromFullPath()` 接收本地完整路径: + +```uts +import { createImageMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createImageMessageFromFullPath('/data/user/0/app/cache/photo.jpg') +``` + +商业版还提供结构化 `createImageMessage()` 商业版,参数可包含平台来源路径。两者都要求原生层有读取权限。 + +`unifile://`、相册临时对象或 content URI 应先通过 uni 平台 API转成插件可读路径。文件不存在或权限不足时,不要进入发送阶段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx new file mode 100644 index 0000000000..e5b1fa9f82 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx @@ -0,0 +1,19 @@ +--- +title: '创建位置消息' +description: '使用经纬度和描述创建位置消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-location-message' +--- + +`createLocationMessage()` 使用描述、经度和纬度。 + +```uts +import { createLocationMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createLocationMessage({ + descriptionText: '会议室 A', + longitude: 121.47, + latitude: 31.23, +}) +``` + +调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx new file mode 100644 index 0000000000..2ecf9316d5 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-markdown-message.mdx @@ -0,0 +1,15 @@ +--- +title: '创建 Markdown 消息' +description: '商业版创建 Markdown 内容消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-markdown-message' +--- + +`createMarkdownMessage()` 商业版 使用 `OpenIMCreateMarkdownMessageParams`。 + +```uts +import { createMarkdownMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createMarkdownMessage({ content: '**发布完成**' }) +``` + +具体字段以锁定合同为准。接收端渲染 Markdown 前进行安全过滤,禁用危险 HTML、脚本和不受信任 URL;原始内容不是可信 HTML。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx new file mode 100644 index 0000000000..36f505458b --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx @@ -0,0 +1,19 @@ +--- +title: '创建合并转发消息' +description: '把多条消息合并为摘要与消息列表。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-merger-message' +--- + +`createMergerMessage()` 使用标题、摘要和原消息列表创建合并转发。 + +```uts +import { createMergerMessage } from '@/uni_modules/unix-openim-sdk' + +const merger = await createMergerMessage({ + messageList: selectedMessages, + title: '聊天记录', + abstractList: ['Alice: 方案已确认'], +}) +``` + +摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx new file mode 100644 index 0000000000..9b916db35f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-quote-message.mdx @@ -0,0 +1,18 @@ +--- +title: '创建引用回复消息' +description: '创建普通或高级引用消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-quote-message' +--- + +`createQuoteMessage()` 使用文本和被引用消息的 JSON 字符串: + +```uts +import { createQuoteMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createQuoteMessage({ + text: '同意', + message: JSON.stringify(quotedMessage), +}) +``` + +`createAdvancedQuoteMessage()` 还支持高级文本实体。引用的是消息快照;原消息撤回或删除后,UI 应显示不可用提示而不是崩溃。序列化前使用插件返回的完整消息,不要只复制 `clientMsgID` 伪造引用对象。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx new file mode 100644 index 0000000000..30d30257a5 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -0,0 +1,15 @@ +--- +title: '从 URL 创建语音消息' +description: '使用已上传音频的 OpenIMSoundElem 创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' +--- + +`createSoundMessageByURL()` 接收完整 `OpenIMSoundElem`。 + +```uts +import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createSoundMessageByURL(soundElem) +``` + +URL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx new file mode 100644 index 0000000000..7da1d5959e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path.mdx @@ -0,0 +1,18 @@ +--- +title: '从完整路径创建语音消息' +description: '使用本地音频路径和时长创建语音消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path' +--- + +公共入口 `createSoundMessageFromFullPath()` 接收 `soundPath` 与 `duration`: + +```uts +import { createSoundMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createSoundMessageFromFullPath({ + soundPath: '/data/user/0/app/cache/voice.m4a', + duration: 8, +}) +``` + +商业版 `createSoundMessage()` 商业版 使用同一结构。时长单位以合同/服务端约定为准,并与真实媒体一致。录音完成、文件关闭且权限可读后再调用。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx new file mode 100644 index 0000000000..452f3a419a --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -0,0 +1,22 @@ +--- +title: '创建 @ 文本消息' +description: '在群聊中创建带 @ 用户信息的文本消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' +--- + +`createTextAtMessage()` 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。 + +```uts +import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createTextAtMessage({ + text: '@Alice 请确认', + atUserIDList: ['user_a'], + atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }], + quoteMessage: null, +}) +``` + +字段以 `OpenIMCreateTextAtMessageParams` 为准,用户列表和显示信息保持一致。商业版 `getAtAllTag()` 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。 + +创建后仍需调用发送 API并填写目标群 ID。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx new file mode 100644 index 0000000000..3c9a4c5430 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx @@ -0,0 +1,16 @@ +--- +title: '创建文本消息' +description: '创建待发送的普通文本消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-text-message' +--- + +`createTextMessage()` 返回 `OpenIMMessageItem | null`,不发送消息。 + +```uts +import { createTextMessage } from '@/uni_modules/unix-openim-sdk' + +const message = await createTextMessage('你好,OpenIMSDK') +if (message == null) throw new Error('Failed to create text message') +``` + +文本应先按产品限制校验长度。创建成功后把消息传给[发送消息](/sdk/uniapp/message/sending-messages/send-message);不要手工拼 `OpenIMMessageItem`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx new file mode 100644 index 0000000000..f9d46a3c91 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -0,0 +1,15 @@ +--- +title: '从 URL 创建视频消息' +description: '使用已上传视频和封面的 OpenIMVideoElem 创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' +--- + +`createVideoMessageByURL()` 接收 `OpenIMVideoElem`。 + +```uts +import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' + +const message = await createVideoMessageByURL(videoElem) +``` + +视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx new file mode 100644 index 0000000000..9804e8be7d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-from-full-path.mdx @@ -0,0 +1,20 @@ +--- +title: '从完整路径创建视频消息' +description: '使用视频、封面完整路径和媒体信息创建消息。' +sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-from-full-path' +--- + +公共入口 `createVideoMessageFromFullPath()` 使用 `OpenIMCreateVideoMessageParams`: + +```uts +import { createVideoMessageFromFullPath } from '@/uni_modules/unix-openim-sdk' + +const message = await createVideoMessageFromFullPath({ + videoPath: '/data/user/0/app/cache/video.mp4', + videoType: 'mp4', + duration: 12, + snapshotPath: '/data/user/0/app/cache/video-cover.jpg', +}) +``` + +商业版 `createVideoMessage()` 商业版 还可使用来源路径字段。视频和封面都必须真实存在并可读;时长、类型与文件一致。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx new file mode 100644 index 0000000000..a2c7cf94c1 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx @@ -0,0 +1,15 @@ +--- +title: '清空全部本地消息' +description: '删除当前账号在本设备的全部消息。' +sourcePath: '/sdk/uniapp/message/managing-messages/clear-all-local-messages' +--- + +`deleteAllMsgFromLocal()` 清空当前账号本地消息。 + +```uts +import { deleteAllMsgFromLocal } from '@/uni_modules/unix-openim-sdk' + +await deleteAllMsgFromLocal() +``` + +这是高风险范围操作,二次确认并停止所有消息查询。它不保证删除服务端数据;重新同步可能恢复部分消息。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx new file mode 100644 index 0000000000..47a27c1cdd --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx @@ -0,0 +1,15 @@ +--- +title: '清空本地与服务端消息' +description: '删除当前账号的全部本地及服务端消息。' +sourcePath: '/sdk/uniapp/message/managing-messages/clear-all-messages' +--- + +`deleteAllMsgFromLocalAndSvr()` 是更高风险的全局删除。 + +```uts +import { deleteAllMsgFromLocalAndSvr } from '@/uni_modules/unix-openim-sdk' + +await deleteAllMsgFromLocalAndSvr() +``` + +调用前明确影响范围和恢复策略,并进行强确认。成功后重建会话与消息 store;失败时重新查询,不假定原子完成。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx new file mode 100644 index 0000000000..d8dd61681f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx @@ -0,0 +1,15 @@ +--- +title: '删除本地消息' +description: '按会话和 clientMsgID 删除当前设备中的消息。' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-local-message' +--- + +`deleteMessageFromLocalStorage()` 删除本地消息;兼容入口 `deleteMessage()` 使用同一参数。 + +```uts +import { deleteMessageFromLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await deleteMessageFromLocalStorage({ conversationID, clientMsgID }) +``` + +该操作不会撤回对端消息,也不应伪装为服务端删除。成功后从当前设备 store 移除;需要通知对端使用撤回或商业版删除能力。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx new file mode 100644 index 0000000000..5e19e532a8 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx @@ -0,0 +1,24 @@ +--- +title: '删除已保存消息' +description: '商业版批量删除消息,并处理 onMsgDeleted。' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-saved-messages' +--- + +`deleteMessages()` 商业版 批量删除明确指定的消息。本页归属公共 `onMsgDeleted` 事件。 + +```uts +import { + deleteMessages, + off, + onMsgDeleted, +} from '@/uni_modules/unix-openim-sdk' + +const deletedSubscription = onMsgDeleted((message) => { + removeMessageByID(message.clientMsgID) +}) + +await deleteMessages(deleteParams) +off(deletedSubscription) +``` + +`deleteParams` 使用锁定的 `OpenIMDeleteMessagesParams`,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx new file mode 100644 index 0000000000..4ec4209658 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx @@ -0,0 +1,27 @@ +--- +title: '删除用户在会话中的全部消息' +description: '商业版删除指定用户在一个会话中的消息并处理 raw 事件。' +sourcePath: '/sdk/uniapp/message/managing-messages/delete-user-messages' +--- + +`deleteUserAllMessagesInConv()` 与事件 `onDeleteUserAllMsgsInConv` 均属于商业版。 + +```uts +import { + deleteUserAllMessagesInConv, + off, + onDeleteUserAllMsgsInConv, +} from '@/uni_modules/unix-openim-sdk' + +const deleteSubscription = onDeleteUserAllMsgsInConv((payload) => { + try { + const value = JSON.parseObject(payload) + if (value != null) refreshConversationMessages() + } catch (_) {} +}) + +await deleteUserAllMessagesInConv({ conversationID, userID: targetUserID }) +off(deleteSubscription) +``` + +这是高风险范围删除,需权限与二次确认。raw payload 校验后重新查询,不依赖未冻结字段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx new file mode 100644 index 0000000000..c81562db89 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx @@ -0,0 +1,15 @@ +--- +title: '查询置顶消息' +description: '商业版查询一个会话的置顶消息。' +sourcePath: '/sdk/uniapp/message/managing-messages/get-pinned-messages' +--- + +`getConversationPinnedMsg()` 商业版 按会话查询置顶消息。 + +```uts +import { getConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk' + +const result = await getConversationPinnedMsg({ conversationID }) +``` + +以返回 DTO 的消息列表/分页字段为准,按 `clientMsgID` 去重。置顶变化后重新查询,避免依赖 raw 事件内部字段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx new file mode 100644 index 0000000000..30177171a1 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx @@ -0,0 +1,15 @@ +--- +title: '插入本地群聊消息' +description: '把业务生成的消息插入群聊本地历史。' +sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-group-message' +--- + +`insertGroupMessageToLocalStorage()` 只写本机群聊历史。 + +```uts +import { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await insertGroupMessageToLocalStorage(insertParams) +``` + +参数使用 `OpenIMInsertGroupMessageParams`,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx new file mode 100644 index 0000000000..32a295e202 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx @@ -0,0 +1,15 @@ +--- +title: '插入本地单聊消息' +description: '把业务生成的消息插入单聊本地历史。' +sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-single-message' +--- + +`insertSingleMessageToLocalStorage()` 只写当前设备本地数据库,不发送给对方。 + +```uts +import { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' + +await insertSingleMessageToLocalStorage(insertParams) +``` + +`insertParams` 使用真实 `OpenIMInsertSingleMessageParams`,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx new file mode 100644 index 0000000000..f8c1ac3c68 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx @@ -0,0 +1,25 @@ +--- +title: '修改消息' +description: '商业版修改消息,并处理 modified/edited raw 事件。' +sourcePath: '/sdk/uniapp/message/managing-messages/modify-a-message' +--- + +`modifyMessage()`、`onMessageModified` 和 `onMessageEdited` 属于商业版。两个事件都是 raw 字符串。 + +```uts +import { + modifyMessage, + off, + onMessageEdited, + onMessageModified, +} from '@/uni_modules/unix-openim-sdk' + +const modifiedSubscription = onMessageModified((payload) => refreshModifiedMessage(payload)) +const editedSubscription = onMessageEdited((payload) => refreshModifiedMessage(payload)) + +const result = await modifyMessage(modifyParams) +off(modifiedSubscription) +off(editedSubscription) +``` + +`modifyParams` 按 `OpenIMModifyMessageParams` 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx new file mode 100644 index 0000000000..42c1eef83b --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx @@ -0,0 +1,21 @@ +--- +title: '撤回消息' +description: '撤回指定消息,并处理消息撤回事件。' +sourcePath: '/sdk/uniapp/message/managing-messages/revoke-a-message' +--- + +`revokeMessage()` 使用会话和客户端消息 ID。 + +```uts +import { + off, + onNewRecvMessageRevoked, + revokeMessage, +} from '@/uni_modules/unix-openim-sdk' + +const revokedSubscription = onNewRecvMessageRevoked((info) => mergeRevokedInfo(info)) +await revokeMessage({ conversationID, clientMsgID }) +off(revokedSubscription) +``` + +服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx new file mode 100644 index 0000000000..e9e16ded54 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx @@ -0,0 +1,15 @@ +--- +title: '设置消息本地扩展' +description: '更新一条消息在当前设备的 localEx。' +sourcePath: '/sdk/uniapp/message/managing-messages/set-message-local-ex' +--- + +`setMessageLocalEx()` 使用会话和消息 ID 更新本地扩展。 + +```uts +import { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk' + +await setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) }) +``` + +`localEx` 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx new file mode 100644 index 0000000000..2ad7923090 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx @@ -0,0 +1,23 @@ +--- +title: '置顶或取消置顶消息' +description: '商业版修改会话消息置顶状态并处理变化事件。' +sourcePath: '/sdk/uniapp/message/managing-messages/set-message-pinned' +--- + +`setConversationPinnedMsg()` 与 `onChangedPinnedMsg` 属于商业版。 + +```uts +import { + off, + onChangedPinnedMsg, + setConversationPinnedMsg, +} from '@/uni_modules/unix-openim-sdk' + +const pinnedSubscription = onChangedPinnedMsg((payload) => { + refreshPinnedMessagesAfterValidJson(payload) +}) +await setConversationPinnedMsg(pinParams) +off(pinnedSubscription) +``` + +参数使用 `OpenIMSetConversationPinnedMsgParams`。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx new file mode 100644 index 0000000000..e0544166a9 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx @@ -0,0 +1,15 @@ +--- +title: '查询群消息已读成员' +description: '商业版分页查询读过指定群消息的成员。' +sourcePath: '/sdk/uniapp/message/managing-read-status/get-group-message-readers' +--- + +`getGroupMessageReaderList()` 商业版 使用 `OpenIMGetGroupMessageReaderListParams` 查询。 + +```uts +import { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk' + +const result = await getGroupMessageReaderList(readerParams) +``` + +按返回 DTO 的分页字段继续加载,并按 `userID` 去重。已读成员数据可能随新回执变化,打开详情时重新查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx new file mode 100644 index 0000000000..df195bd9db --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx @@ -0,0 +1,21 @@ +--- +title: '上报群消息已读' +description: '商业版发送群消息已读回执并处理 raw 回执事件。' +sourcePath: '/sdk/uniapp/message/managing-read-status/send-group-read-receipts' +--- + +`sendGroupMessageReadReceipt()` 与 `onRecvGroupReadReceipt` 属于商业版。 + +```uts +import { + off, + onRecvGroupReadReceipt, + sendGroupMessageReadReceipt, +} from '@/uni_modules/unix-openim-sdk' + +const receiptSubscription = onRecvGroupReadReceipt((payload) => refreshReadState(payload)) +await sendGroupMessageReadReceipt(receiptParams) +off(receiptSubscription) +``` + +参数使用 `OpenIMSendGroupMessageReadReceiptParams`。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx new file mode 100644 index 0000000000..ed8544a2b6 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -0,0 +1,36 @@ +--- +title: '消息概览' +description: '理解消息创建、发送、接收、历史、状态和进度事件。' +sourcePath: '/sdk/uniapp/message/overview-message' +--- + +OpenIM 消息以 `clientMsgID` 作为客户端稳定标识,服务端消息还包含 `serverMsgID`、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表。 + +创建消息只生成 `OpenIMMessageItem`,不会发送;随后调用 `sendMessage()` 指定 `recvID` 或 `groupID`。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。 + +本页归属发送、文件上传和日志上传进度事件: + +```uts +import { + off, + onSendMessageProgress, + onUploadFileProgress, + onUploadLogsProgress, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const sendProgressSubscription = onSendMessageProgress((event) => { + updateMessageProgress(event.clientMsgID, event.progress) +}) +const subscriptions : Array = [ + sendProgressSubscription, + onUploadFileProgress((event) => updateCurrentUpload(event.progress)), + onUploadLogsProgress((event) => updateLogUpload(event.progress)), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。 + +文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx new file mode 100644 index 0000000000..573d517787 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-custom-business-messages.mdx @@ -0,0 +1,40 @@ +--- +title: '接收自定义业务与消息扩展事件' +description: '安全解析 raw JSON 字符串,并区分公共与商业版扩展事件。' +sourcePath: '/sdk/uniapp/message/receiving-messages/receive-custom-business-messages' +--- + +这些事件返回 opaque 字符串。`onRecvCustomBusinessMessage` 属于公共接口;消息扩展新增、变化、删除和 KV 变化事件属于商业版。 + +```uts +import { + off, + onMessageKvInfoChanged, + onRecvCustomBusinessMessage, + onRecvMessageExtensionsAdded, + onRecvMessageExtensionsChanged, + onRecvMessageExtensionsDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +function handleRawPayload(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) routeValidatedBusinessEvent(value) + } catch (_) { + console.error('Invalid custom message event') + } +} + +const customSubscription = onRecvCustomBusinessMessage(handleRawPayload) +const subscriptions : Array = [ + customSubscription, + onRecvMessageExtensionsAdded(handleRawPayload), + onRecvMessageExtensionsChanged(handleRawPayload), + onRecvMessageExtensionsDeleted(handleRawPayload), + onMessageKvInfoChanged(handleRawPayload), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +校验版本、事件类型和必填字段后再更新 store;未知事件安全忽略。日志不输出完整 payload。HarmonyOS 当前不支持这四个商业扩展事件,会返回 unsupported subscription。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx new file mode 100644 index 0000000000..87767f3bfa --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx @@ -0,0 +1,32 @@ +--- +title: '接收消息' +description: '订阅单条、批量、离线和只在线消息事件。' +sourcePath: '/sdk/uniapp/message/receiving-messages/receive-messages' +--- + +不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 `conversationID:clientMsgID` 去重。 + +```uts +import { + off, + onRecvNewMessage, + onRecvNewMessages, + onRecvOfflineNewMessage, + onRecvOfflineNewMessages, + onRecvOnlineOnlyMessage, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const newMessageSubscription = onRecvNewMessage((message) => mergeMessage(message)) +const subscriptions : Array = [ + newMessageSubscription, + onRecvOfflineNewMessage((message) => mergeMessage(message)), + onRecvOnlineOnlyMessage((message) => mergeOnlineOnlyMessage(message)), + onRecvNewMessages((result) => result.messages.forEach(mergeMessage)), + onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx new file mode 100644 index 0000000000..3df5609e3c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx @@ -0,0 +1,17 @@ +--- +title: '按 ID 查找消息' +description: '在多个会话中按 clientMsgID 批量定位消息。' +sourcePath: '/sdk/uniapp/message/retrieving-messages/find-messages-by-id' +--- + +`findMessageList()` 接收查询数组,每项包含会话 ID 与消息 ID 列表。 + +```uts +import { findMessageList } from '@/uni_modules/unix-openim-sdk' + +const result = await findMessageList([ + { conversationID, clientMsgIDList: ['msg_a', 'msg_b'] }, +]) +``` + +返回 `OpenIMFindMessageResult`,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx new file mode 100644 index 0000000000..bcd261ad51 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx @@ -0,0 +1,20 @@ +--- +title: '加载消息上下文' +description: '商业版围绕一条锚点消息读取前后文。' +sourcePath: '/sdk/uniapp/message/retrieving-messages/load-message-context' +--- + +`fetchSurroundingMessages()` 商业版 围绕完整锚点消息读取前后文。 + +```uts +import { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk' + +const result = await fetchSurroundingMessages({ + startMessage: targetMessage, + viewType: 0, + before: 20, + after: 20, +}) +``` + +`viewType` 使用产品/合同定义值。结果与实时事件可能重复,按 `clientMsgID` 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx new file mode 100644 index 0000000000..53d1a7ea83 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -0,0 +1,21 @@ +--- +title: '加载历史消息' +description: '按会话和 clientMsgID 游标读取历史消息。' +sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' +--- + +公共入口 `getAdvancedHistoryMessageList()` 读取历史: + +```uts +import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' + +const page = await getAdvancedHistoryMessageList({ + conversationID, + startClientMsgID: '', + count: 50, +}) +``` + +第一页用空 `startClientMsgID`,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 `clientMsgID` 去重。 + +商业版 `getHistoryMessageList()` 商业版 额外支持 `isReverse`、`viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx new file mode 100644 index 0000000000..0b7aa159fe --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -0,0 +1,25 @@ +--- +title: '搜索本地消息' +description: '按关键词、发送者、类型和时间范围搜索消息。' +sourcePath: '/sdk/uniapp/message/searching-messages/search-messages' +--- + +`searchLocalMessages()` 在 SDK 本地数据中搜索。 + +```uts +import { searchLocalMessages } from '@/uni_modules/unix-openim-sdk' + +const result = await searchLocalMessages({ + conversationID, + keywordList: ['发布'], + keywordListMatchType: 0, + senderUserIDList: [], + messageTypeList: [], + searchTimePosition: 0, + searchTimePeriod: 0, + pageIndex: 1, + count: 50, +}) +``` + +匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx new file mode 100644 index 0000000000..7b96271f9e --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -0,0 +1,15 @@ +--- +title: '发送非 OSS 消息' +description: '发送已经准备好远端资源信息的消息。' +sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' +--- + +`sendMessageNotOss()` 与 `sendMessage()` 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。 + +```uts +import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' + +const sent = await sendMessageNotOss({ message, recvID, groupID }) +``` + +只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 `sendMessage()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx new file mode 100644 index 0000000000..15a3501439 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx @@ -0,0 +1,23 @@ +--- +title: '发送消息' +description: '把已创建的消息发送给单聊用户或群组。' +sourcePath: '/sdk/uniapp/message/sending-messages/send-message' +--- + +`sendMessage()` 接收 `OpenIMSendMessageOptions`,Promise 直接返回最终 `OpenIMMessageItem`。 + +```uts +import { sendMessage } from '@/uni_modules/unix-openim-sdk' + +const sent = await sendMessage({ + message, + recvID: 'user_b', + groupID: '', + isOnlineOnly: false, +}) +upsertMessage(sent.clientMsgID, sent) +``` + +单聊填 `recvID`、群聊填 `groupID`,另一个传空字符串。`offlinePushInfo` 可按产品推送策略提供;`isOnlineOnly` 为 true 时不按普通持久消息处理。 + +发送进度按 `clientMsgID` 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 `clientMsgID` 的重复消息,除非产品明确要求。 From 7067d3dfdecfaa042a9305d43bca36616156a031 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 13:04:00 +0800 Subject: [PATCH 07/20] docs(uniapp): document signaling events and diagnostics --- .../calling/managing-calls/accept-call.mdx | 20 +++++++ .../calling/managing-calls/cancel-call.mdx | 20 +++++++ .../managing-calls/handle-call-events.mdx | 33 ++++++++++++ .../calling/managing-calls/hang-up-call.mdx | 20 +++++++ .../calling/managing-calls/reject-call.mdx | 20 +++++++ .../managing-calls/start-group-call.mdx | 22 ++++++++ .../managing-calls/start-single-call.mdx | 23 ++++++++ .../sdk/uniapp/calling/overview-calling.mdx | 18 +++++++ .../get-room-by-group-id.mdx | 20 +++++++ .../get-token-by-room-id.mdx | 20 +++++++ .../restore-pending-invitation.mdx | 23 ++++++++ .../send-a-custom-signal.mdx | 23 ++++++++ .../events/handle-data-migration-events.mdx | 26 ++++++++++ .../sdk/uniapp/events/overview-events.mdx | 30 +++++++++++ content/docs/chat/sdk/uniapp/logger.mdx | 25 +++++++++ .../calling/managing-calls/accept-call.mdx | 17 ++++++ .../calling/managing-calls/cancel-call.mdx | 15 ++++++ .../managing-calls/handle-call-events.mdx | 52 +++++++++++++++++++ .../calling/managing-calls/hang-up-call.mdx | 15 ++++++ .../calling/managing-calls/reject-call.mdx | 15 ++++++ .../managing-calls/start-group-call.mdx | 24 +++++++++ .../managing-calls/start-single-call.mdx | 24 +++++++++ .../sdk/uniapp/calling/overview-calling.mdx | 20 +++++++ .../get-room-by-group-id.mdx | 15 ++++++ .../get-token-by-room-id.mdx | 15 ++++++ .../restore-pending-invitation.mdx | 16 ++++++ .../send-a-custom-signal.mdx | 29 +++++++++++ .../events/handle-data-migration-events.mdx | 30 +++++++++++ .../sdk/uniapp/events/overview-events.mdx | 38 ++++++++++++++ content/zh/docs/chat/sdk/uniapp/logger.mdx | 33 ++++++++++++ 30 files changed, 701 insertions(+) create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/overview-calling.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx create mode 100644 content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx create mode 100644 content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx create mode 100644 content/docs/chat/sdk/uniapp/events/overview-events.mdx create mode 100644 content/docs/chat/sdk/uniapp/logger.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx create mode 100644 content/zh/docs/chat/sdk/uniapp/logger.mdx diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx new file mode 100644 index 0000000000..9ebd51131e --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -0,0 +1,20 @@ +--- +title: 'Accept a call' +description: 'OpenIM uni-app / uni-app x SDK guide for Accept a call.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/accept-call' +--- + +```uts +import { signalingAccept } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingAccept({ invitation }) +``` + +This is Commercial. Validate the session and obtain microphone/camera permission before sending accept. Keep optional token/room/live URL only in memory. Promise completion, remote events, and media connection are separate phases. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx new file mode 100644 index 0000000000..86ea9edc70 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx @@ -0,0 +1,20 @@ +--- +title: 'Cancel a call invitation' +description: 'OpenIM uni-app / uni-app x SDK guide for Cancel a call invitation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/cancel-call' +--- + +```uts +import { signalingCancel } from '@/uni_modules/unix-openim-sdk' + +await signalingCancel({ invitation }) +``` + +This Commercial operation is for a caller before connection; hangup is for an accepted/connecting session. Prevent duplicate actions and resolve cancel/accept races from events. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx new file mode 100644 index 0000000000..d5b6636a23 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx @@ -0,0 +1,33 @@ +--- +title: 'Handle call events' +description: 'OpenIM uni-app / uni-app x SDK guide for Handle call events.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/handle-call-events' +--- + +All Commercial call events deliver raw JSON strings. Acknowledge quickly, validate JSON, then map to your own call domain model. + +```uts +import { off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeRejected, onReceiveNewInvitation } from '@/uni_modules/unix-openim-sdk' + +function handleCallPayload(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) routeValidatedCallEvent(value) + } catch (_) { console.error('Invalid call event payload') } +} +const subscriptions = [ + onReceiveNewInvitation(handleCallPayload), onInviteeAccepted(handleCallPayload), + onInviteeRejected(handleCallPayload), onInvitationCancelled(handleCallPayload), + onInvitationTimeout(handleCallPayload), onHangUp(handleCallPayload), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +Also register the documented other-device and room-participant events. HarmonyOS returns an unsupported subscription for `onStreamChange`. Deduplicate by room/session plus runtime generation, and never log raw payloads or RTC tokens. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx new file mode 100644 index 0000000000..9337c17358 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx @@ -0,0 +1,20 @@ +--- +title: 'End a call' +description: 'OpenIM uni-app / uni-app x SDK guide for End a call.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/hang-up-call' +--- + +```uts +import { signalingHungUp } from '@/uni_modules/unix-openim-sdk' + +await signalingHungUp({ invitation }) +``` + +Lock the Commercial ending transition so local, remote, and network causes cannot execute it twice. Close media resources and process `onHangUp` idempotently. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx new file mode 100644 index 0000000000..23fe82b3b6 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx @@ -0,0 +1,20 @@ +--- +title: 'Reject a call' +description: 'OpenIM uni-app / uni-app x SDK guide for Reject a call.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/reject-call' +--- + +```uts +import { signalingReject } from '@/uni_modules/unix-openim-sdk' + +await signalingReject({ invitation }) +``` + +Use the complete received Commercial invitation; do not reconstruct it or alter `roomID`. Close local incoming UI and handle remote/multi-device events idempotently. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx new file mode 100644 index 0000000000..cf4705d8f7 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx @@ -0,0 +1,22 @@ +--- +title: 'Start a group call' +description: 'OpenIM uni-app / uni-app x SDK guide for Start a group call.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/start-group-call' +--- + +```uts +import { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingInviteInGroup({ + invitation: { inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2 }, +}) +``` + +This is Commercial. Deduplicate targets and verify current membership. Busy users do not determine later accept/reject/timeout outcomes for all other invitees. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx new file mode 100644 index 0000000000..5c2e31d376 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -0,0 +1,23 @@ +--- +title: 'Start a one-to-one call' +description: 'OpenIM uni-app / uni-app x SDK guide for Start a one-to-one call.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/managing-calls/start-single-call' +--- + +```uts +import { signalingInvite } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingInvite({ + invitation: { inviterUserID: selfUserID, inviteeUserIDList: [peerUserID], mediaType: 'video', timeout: 30, sessionType: 1 }, + offlinePushInfo: { title: 'Video call', desc: 'Incoming call' }, +}) +``` + +This is Commercial. Treat `roomID`, `token`, `liveURL`, and busy-user results as optional; cancel an accepted invitation if presentation fails, and never log credentials. diff --git a/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx b/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx new file mode 100644 index 0000000000..8d84e3a870 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx @@ -0,0 +1,18 @@ +--- +title: 'Audio and video calling overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Audio and video calling overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/overview-calling' +--- + +Every capability in this section is Commercial and requires the commercial signaling services. `unix-openim-sdk` handles invitations, accept/reject/cancel/hangup, room credentials, and events; it does not provide call UI or render camera/audio. + +For complete call and meeting UI, integrate `openim-av-runtime`. It reuses this plugin's only login through typed Host RPC and never initializes another OpenIM Core. + +A typical flow registers all signaling events, invites with `OpenIMSignalingInvitationInfo`, validates the raw incoming payload, requests media permission before accepting, creates media from room credentials, and drives one session state machine from cancel/timeout/hangup/multi-device events. Never persist or log token, liveURL, or raw signaling payload. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx new file mode 100644 index 0000000000..ab917c73b9 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get a group call room' +description: 'OpenIM uni-app / uni-app x SDK guide for Get a group call room.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id' +--- + +```uts +import { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetRoomByGroupID({ groupID }) +``` + +The Commercial room ID and invitation are optional. Empty means no joinable room. Treat the snapshot as short-lived and obtain a valid token immediately before joining. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx new file mode 100644 index 0000000000..2a231e6798 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -0,0 +1,20 @@ +--- +title: 'Get a call room token' +description: 'OpenIM uni-app / uni-app x SDK guide for Get a call room token.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id' +--- + +```uts +import { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetTokenByRoomID({ roomID }) +``` + +This Commercial result contains optional token/live URL. Keep credentials only in memory, stop when fields are absent/expired, and never reuse or log an old token. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx new file mode 100644 index 0000000000..a5ab1c366d --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -0,0 +1,23 @@ +--- +title: 'Restore a pending call invitation' +description: 'OpenIM uni-app / uni-app x SDK guide for Restore a pending call invitation.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation' +--- + +Call this Commercial operation once after event listeners are armed: + +```uts +import { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetInvitationInfoStartApp() +if (result?.invitation != null) recoverInvitation(result.invitation) +``` + +No invitation legitimately resolves to `null`. Deduplicate recovery against realtime events by room/session ID and perform only one startup request per runtime initialization. diff --git a/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx new file mode 100644 index 0000000000..7d78b31fb1 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -0,0 +1,23 @@ +--- +title: 'Send a custom signal' +description: 'OpenIM uni-app / uni-app x SDK guide for Send a custom signal.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal' +--- + +```uts +import { off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling } from '@/uni_modules/unix-openim-sdk' + +const signal = onReceiveCustomSignal(handleValidatedSignal) +const signaling = onReceiveCustomSignaling(handleValidatedSignal) +await signalingSendCustomSignaling({ roomID, customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }) }) +off(signal); off(signaling) +``` + +These are Commercial. Compatible platforms may use either receive event, so deduplicate by event ID/content hash. Validate type/version/fields; custom content is not authorization and must not contain secrets. diff --git a/content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx b/content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx new file mode 100644 index 0000000000..046c342044 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx @@ -0,0 +1,26 @@ +--- +title: 'Handle data migration events' +description: 'OpenIM uni-app / uni-app x SDK guide for Handle data migration events.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/events/handle-data-migration-events' +--- + +These four Commercial events are available on Android/iOS and return unsupported subscriptions on HarmonyOS. + +```uts +import { off, onMigrationFailed, onMigrationFinished, onMigrationProgress, onMigrationStart } from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onMigrationStart(showMigrationUI), onMigrationProgress(handleValidatedMigrationProgress), + onMigrationFailed(handleValidatedMigrationFailure), onMigrationFinished(finishMigrationUI), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +Progress/failure payloads are opaque strings. Validate JSON before reading it and redact paths, database details, and sensitive content. Avoid account switching or uninitialization during migration; reload snapshots after completion/failure. diff --git a/content/docs/chat/sdk/uniapp/events/overview-events.mdx b/content/docs/chat/sdk/uniapp/events/overview-events.mdx new file mode 100644 index 0000000000..50321a4356 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/events/overview-events.mdx @@ -0,0 +1,30 @@ +--- +title: 'Events overview' +description: 'OpenIM uni-app / uni-app x SDK guide for Events overview.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/events/overview-events' +--- + +Every `on...()` call synchronously returns an `OpenIMSDKEventSubscription` with `id` and `eventName`. Release only your handle with `off(subscription)`. + +```uts +import { off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart } from '@/uni_modules/unix-openim-sdk' + +const subscriptions = [ + onSyncServerStart((reinstalled) => beginSyncUI(reinstalled)), + onSyncServerProgress(updateSyncProgress), + onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)), + onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +The boolean describes the contract's reinstall/sync context, not success. `offAll(eventName)` removes every handler for an event and is reserved for full App reset or controlled tests. + +HarmonyOS returns unsupported subscriptions for ten unavailable events: four migrations plus the documented message-extension/KV, badge, and stream events. It never fabricates success. Handlers should return quickly and queue expensive work. diff --git a/content/docs/chat/sdk/uniapp/logger.mdx b/content/docs/chat/sdk/uniapp/logger.mdx new file mode 100644 index 0000000000..278e2c8f56 --- /dev/null +++ b/content/docs/chat/sdk/uniapp/logger.mdx @@ -0,0 +1,25 @@ +--- +title: 'Logging' +description: 'OpenIM uni-app / uni-app x SDK guide for Logging.' +product: 'sdk' +context: 'chat/sdk/uniapp' +template: 'guide' +status: 'published' +lastUpdated: '2026-08-13' +version: 'v4' +platform: 'uniapp' +sourcePath: '/sdk/uniapp/logger' +--- + +Configure `logLevel`, `isLogStandardOutput`, and optional `logFilePath` during initialization. Use the lowest production level that supports diagnosis and redact tokens, private content, and commercial credentials. + +```uts +import { uploadLogs } from '@/uni_modules/unix-openim-sdk' + +const operationID = `diagnostic-${Date.now()}` +await uploadLogs({ line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) }, operationID) +``` + +`operationID` is an optional diagnostic correlation value, not a user ID, idempotency key, or credential. Upload progress belongs to `onUploadLogsProgress`; completion does not itself open a support case. + +Obtain user consent, limit line count/retries, keep `ex` redacted, disable verbose production output, and never upload the entire local database as a shortcut. diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx new file mode 100644 index 0000000000..8770e4795c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -0,0 +1,17 @@ +--- +title: '接受通话' +description: '商业版接受邀请并取得房间凭据。' +sourcePath: '/sdk/uniapp/calling/managing-calls/accept-call' +--- + +收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 `signalingAccept()`。 + +```uts +import { signalingAccept } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingAccept({ invitation }) +``` + +返回的 `token`、`roomID`、`liveURL` 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。 + +Promise 成功与对方接受事件、媒体真正连接是不同阶段。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx new file mode 100644 index 0000000000..bcda1a71b7 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx @@ -0,0 +1,15 @@ +--- +title: '取消通话邀请' +description: '商业版由主叫取消尚未接通的邀请。' +sourcePath: '/sdk/uniapp/calling/managing-calls/cancel-call' +--- + +主叫在对方接受前使用 `signalingCancel()`。 + +```uts +import { signalingCancel } from '@/uni_modules/unix-openim-sdk' + +await signalingCancel({ invitation }) +``` + +取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx new file mode 100644 index 0000000000..749370303c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx @@ -0,0 +1,52 @@ +--- +title: '处理通话事件' +description: '商业版统一接收邀请、接受、拒绝、取消、超时、挂断和房间事件。' +sourcePath: '/sdk/uniapp/calling/managing-calls/handle-call-events' +--- + +所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。 + +```uts +import { + off, + onHangUp, + onInvitationCancelled, + onInvitationTimeout, + onInviteeAccepted, + onInviteeAcceptedByOtherDevice, + onInviteeRejected, + onInviteeRejectedByOtherDevice, + onReceiveNewInvitation, + onRoomParticipantConnected, + onRoomParticipantDisconnected, + onStreamChange, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +function handleCallPayload(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) routeValidatedCallEvent(value) + } catch (_) { + console.error('Invalid call event payload') + } +} + +const invitationSubscription = onReceiveNewInvitation(handleCallPayload) +const subscriptions : Array = [ + invitationSubscription, + onInviteeAccepted(handleCallPayload), + onInviteeAcceptedByOtherDevice(handleCallPayload), + onInviteeRejected(handleCallPayload), + onInviteeRejectedByOtherDevice(handleCallPayload), + onInvitationCancelled(handleCallPayload), + onInvitationTimeout(handleCallPayload), + onHangUp(handleCallPayload), + onRoomParticipantConnected(handleCallPayload), + onRoomParticipantDisconnected(handleCallPayload), + onStreamChange(handleCallPayload), +] +subscriptions.forEach((subscription) => off(subscription)) +``` + +HarmonyOS 当前不支持 `onStreamChange`,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx new file mode 100644 index 0000000000..bf9940f56f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx @@ -0,0 +1,15 @@ +--- +title: '挂断通话' +description: '商业版结束已接受的通话。' +sourcePath: '/sdk/uniapp/calling/managing-calls/hang-up-call' +--- + +`signalingHungUp()` 使用当前会话的 invitation。 + +```uts +import { signalingHungUp } from '@/uni_modules/unix-openim-sdk' + +await signalingHungUp({ invitation }) +``` + +调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 `onHangUp`。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx new file mode 100644 index 0000000000..998b60d564 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx @@ -0,0 +1,15 @@ +--- +title: '拒绝通话' +description: '商业版拒绝当前邀请。' +sourcePath: '/sdk/uniapp/calling/managing-calls/reject-call' +--- + +`signalingReject()` 使用收到的完整 invitation。 + +```uts +import { signalingReject } from '@/uni_modules/unix-openim-sdk' + +await signalingReject({ invitation }) +``` + +拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 `roomID`。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx new file mode 100644 index 0000000000..c8b439145d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx @@ -0,0 +1,24 @@ +--- +title: '发起群通话' +description: '商业版向群成员发起群组通话邀请。' +sourcePath: '/sdk/uniapp/calling/managing-calls/start-group-call' +--- + +`signalingInviteInGroup()` 商业版 使用同一邀请结构,但 invitation 必须包含 `groupID` 和目标成员。 + +```uts +import { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingInviteInGroup({ + invitation: { + inviterUserID: selfUserID, + inviteeUserIDList: selectedUserIDs, + groupID, + mediaType: 'audio', + timeout: 30, + sessionType: 2, + }, +}) +``` + +发送前确认成员仍在群内并去重。`busyLineUserIDList` 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx new file mode 100644 index 0000000000..86cd697a4d --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -0,0 +1,24 @@ +--- +title: '发起单人通话' +description: '商业版向一个用户发起音频或视频邀请。' +sourcePath: '/sdk/uniapp/calling/managing-calls/start-single-call' +--- + +`signalingInvite()` 商业版 使用 invitation 和可选离线推送信息。 + +```uts +import { signalingInvite } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingInvite({ + invitation: { + inviterUserID: selfUserID, + inviteeUserIDList: [peerUserID], + mediaType: 'video', + timeout: 30, + sessionType: 1, + }, + offlinePushInfo: { title: '视频通话', desc: '收到新的通话邀请' }, +}) +``` + +返回值可能含 `roomID`、`token`、`liveURL` 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx b/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx new file mode 100644 index 0000000000..3cda55f97c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx @@ -0,0 +1,20 @@ +--- +title: '音视频信令概览' +description: '商业版通话邀请、房间凭据、事件和 AV Runtime 的职责边界。' +sourcePath: '/sdk/uniapp/calling/overview-calling' +--- + +本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。 + +需要完整通话与会议 UI 时,另行集成 `openim-av-runtime`。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。 + +典型流程: + +1. 应用登录 IM,并注册全部信令事件。 +2. 主叫构造 `OpenIMSignalingInvitationInfo` 后调用邀请。 +3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。 +4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。 +5. 双方使用返回的 room/token/liveURL 建立媒体连接。 +6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。 + +同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx new file mode 100644 index 0000000000..8da55685ef --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -0,0 +1,15 @@ +--- +title: '按群查询通话房间' +description: '商业版查询群当前关联的 roomID 与邀请。' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id' +--- + +`signalingGetRoomByGroupID()` 返回可选 `roomID` 和 invitation。 + +```uts +import { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetRoomByGroupID({ groupID }) +``` + +空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx new file mode 100644 index 0000000000..461451684c --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -0,0 +1,15 @@ +--- +title: '按房间获取 Token' +description: '商业版为指定 roomID 获取 RTC Token 和 liveURL。' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id' +--- + +`signalingGetTokenByRoomID()` 返回可选 Token 与 liveURL。 + +```uts +import { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetTokenByRoomID({ roomID }) +``` + +凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx new file mode 100644 index 0000000000..b3b28665df --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -0,0 +1,16 @@ +--- +title: '恢复启动时邀请' +description: '商业版在 SDK 启动后查询可能遗漏的当前邀请。' +sourcePath: '/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation' +--- + +事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,恢复初始化前到达的邀请。 + +```uts +import { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk' + +const result = await signalingGetInvitationInfoStartApp() +if (result?.invitation != null) recoverInvitation(result.invitation) +``` + +可选参数 `userID` 只用于明确查询用户。无邀请时合法返回 `null`,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx new file mode 100644 index 0000000000..31876d9440 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -0,0 +1,29 @@ +--- +title: '发送自定义信令' +description: '商业版向房间发送业务自定义信令,并安全解析接收事件。' +sourcePath: '/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal' +--- + +`signalingSendCustomSignaling()` 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。 + +```uts +import { + off, + onReceiveCustomSignal, + onReceiveCustomSignaling, + signalingSendCustomSignaling, +} from '@/uni_modules/unix-openim-sdk' + +const signalSubscription = onReceiveCustomSignal((payload) => handleValidatedSignal(payload)) +const signalingSubscription = onReceiveCustomSignaling((payload) => handleValidatedSignal(payload)) + +await signalingSendCustomSignaling({ + roomID, + customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }), +}) + +off(signalSubscription) +off(signalingSubscription) +``` + +接收端用事件 ID/内容哈希去重,校验 `type`、`version` 和字段。`customInfo` 不承担权限认证,不含 Token 或秘密。 diff --git a/content/zh/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx b/content/zh/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx new file mode 100644 index 0000000000..8254fdbbe9 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx @@ -0,0 +1,30 @@ +--- +title: '处理数据迁移事件' +description: '商业版观察迁移开始、进度、失败与完成事件。' +sourcePath: '/sdk/uniapp/events/handle-data-migration-events' +--- + +四个 migration 事件属于商业版,Android 与 iOS 支持;HarmonyOS 当前全部返回 `platform-unsupported`。它们来自 Core/插件迁移桥,不等同于普通同步事件。 + +```uts +import { + off, + onMigrationFailed, + onMigrationFinished, + onMigrationProgress, + onMigrationStart, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const startSubscription = onMigrationStart(() => showMigrationUI()) +const subscriptions : Array = [ + startSubscription, + onMigrationProgress((payload) => handleValidatedMigrationProgress(payload)), + onMigrationFailed((payload) => handleValidatedMigrationFailure(payload)), + onMigrationFinished(() => finishMigrationUI()), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +进度和失败 payload 是 opaque 字符串。若为 JSON,先校验再读取;不要向用户或日志暴露内部路径、数据库信息和敏感内容。迁移期间避免并发反初始化或切换账号,完成/失败后重新查询必要快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx b/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx new file mode 100644 index 0000000000..fcb3758527 --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx @@ -0,0 +1,38 @@ +--- +title: '事件概览' +description: '管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。' +sourcePath: '/sdk/uniapp/events/overview-events' +--- + +每个 `on...()` 调用同步返回独立 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。正常清理使用 `off(subscription)`;不要继续使用旧版“监听函数直接返回取消闭包”的写法。 + +```uts +import { + off, + onSyncServerFailed, + onSyncServerFinish, + onSyncServerProgress, + onSyncServerStart, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const startSubscription = onSyncServerStart((reinstalled) => beginSyncUI(reinstalled)) +const subscriptions : Array = [ + startSubscription, + onSyncServerProgress((progress) => updateSyncProgress(progress)), + onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)), + onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)), +] + +subscriptions.forEach((subscription) => off(subscription)) +``` + +同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。 + +`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。 + +## HarmonyOS unsupported 事件 + +HarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、`onMessageKvInfoChanged`、`onStreamChange`,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。 + +事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。 diff --git a/content/zh/docs/chat/sdk/uniapp/logger.mdx b/content/zh/docs/chat/sdk/uniapp/logger.mdx new file mode 100644 index 0000000000..656a96579f --- /dev/null +++ b/content/zh/docs/chat/sdk/uniapp/logger.mdx @@ -0,0 +1,33 @@ +--- +title: '日志与诊断' +description: '配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。' +sourcePath: '/sdk/uniapp/logger' +--- + +初始化时通过 `logLevel`、`isLogStandardOutput` 和可选 `logFilePath` 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。 + +## 上传日志 + +`uploadLogs()` 接收行数和扩展说明: + +```uts +import { uploadLogs } from '@/uni_modules/unix-openim-sdk' + +const operationID = `diagnostic-${Date.now()}` +await uploadLogs( + { line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) }, + operationID, +) +``` + +`operationID` 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。 + +上传进度由 `onUploadLogsProgress` 提供,完整订阅归[消息概览](/sdk/uniapp/message/overview-message)。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。 + +## 安全要求 + +- 上传前取得用户同意,并说明日志范围与保留策略。 +- `ex` 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。 +- 控制 `line`,避免无界上传;失败时限次重试。 +- 生产包不要长期启用 verbose 标准输出。 +- 本地数据目录只用于诊断定位,不直接打包整个数据库上传。 From d5608b3a147643b4d5e907e0eb2ff7406c39d9f5 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 13:05:09 +0800 Subject: [PATCH 08/20] feat(docs): publish uni-app SDK documentation --- .../add-conversations-to-groups.mdx | 4 +- .../create-conversation-group.mdx | 4 +- .../delete-conversation-group.mdx | 4 +- ...-conversation-group-by-conversation-id.mdx | 4 +- ...ersation-group-info-with-conversations.mdx | 4 +- .../get-conversation-groups.mdx | 4 +- .../overview-conversation-groups.mdx | 4 +- .../remove-conversations-from-groups.mdx | 4 +- .../set-conversation-group-order.mdx | 4 +- .../update-conversation-group.mdx | 4 +- .../clear-conversation-messages.mdx | 4 +- .../clear-group-mentions.mdx | 4 +- .../delete-conversation-with-messages.mdx | 4 +- .../delete-conversation.mdx | 4 +- .../get-total-unread-count.mdx | 4 +- .../hide-a-conversation.mdx | 4 +- .../hide-all-conversations.mdx | 4 +- .../mark-all-conversations-read.mdx | 4 +- .../mark-conversation-read.mdx | 4 +- .../mark-conversation.mdx | 4 +- .../pin-conversation.mdx | 4 +- .../set-burn-duration.mdx | 4 +- .../set-conversation-draft.mdx | 4 +- .../set-conversation-extension.mdx | 4 +- .../set-conversation-remark.mdx | 4 +- .../set-message-destruct.mdx | 4 +- .../set-message-receive-option.mdx | 4 +- .../set-private-chat.mdx | 4 +- .../conversation/overview-conversation.mdx | 4 +- .../get-conversation-by-target.mdx | 4 +- .../get-conversation-id.mdx | 4 +- .../get-conversations-by-id.mdx | 4 +- .../retrieve-conversation-list.mdx | 4 +- .../search-conversations.mdx | 4 +- .../authenticate-and-manage-session.mdx | 4 +- .../getting-started/before-you-start.mdx | 2 +- .../environment-specific-implementation.mdx | 2 +- .../handle-app-lifecycle-and-device-state.mdx | 2 +- .../install-initialize-and-inspect-sdk.mdx | 2 +- .../getting-started/send-first-message.mdx | 2 +- .../update-token-and-observe-sdk-session.mdx | 2 +- .../sdk/uniapp/group/change-group-mute.mdx | 4 +- .../uniapp/group/check-full-sync-state.mdx | 4 +- .../chat/sdk/uniapp/group/create-group.mdx | 4 +- .../chat/sdk/uniapp/group/dismiss-group.mdx | 4 +- .../accept-group-application.mdx | 4 +- .../delete-group-requests.mdx | 4 +- ...et-group-application-list-as-applicant.mdx | 4 +- ...et-group-application-list-as-recipient.mdx | 4 +- .../get-group-application-unhandled-count.mdx | 4 +- .../observe-group-application-badge-count.mdx | 4 +- .../refuse-group-application.mdx | 4 +- .../docs/chat/sdk/uniapp/group/join-group.mdx | 4 +- .../change-group-member-mute.mdx | 4 +- .../invite-user-to-group.mdx | 4 +- .../kick-group-member.mdx | 4 +- .../set-group-member-avatar.mdx | 4 +- .../set-group-member-extension.mdx | 4 +- .../set-group-member-nickname.mdx | 4 +- .../set-group-member-role-level.mdx | 4 +- .../transfer-group-owner.mdx | 4 +- .../chat/sdk/uniapp/group/overview-group.mdx | 4 +- .../docs/chat/sdk/uniapp/group/quit-group.mdx | 4 +- .../get-group-member-list.mdx | 4 +- .../get-specified-group-members-info.mdx | 4 +- .../get-users-in-group.mdx | 4 +- .../search-group-members.mdx | 4 +- .../get-joined-group-list-page.mdx | 4 +- .../get-joined-group-list.mdx | 4 +- .../get-specified-groups-info.mdx | 4 +- .../group/retrieving-groups/is-join-group.mdx | 4 +- .../group/retrieving-groups/search-groups.mdx | 4 +- .../uniapp/group/set-group-announcement.mdx | 4 +- .../sdk/uniapp/group/set-group-extension.mdx | 4 +- .../group/set-group-join-verification.mdx | 4 +- .../set-group-member-friend-permission.mdx | 4 +- .../group/set-group-member-profile-access.mdx | 4 +- .../sdk/uniapp/group/update-group-profile.mdx | 4 +- content/docs/chat/sdk/uniapp/overview.mdx | 2 +- .../sdk/uniapp/user/blacklist/add-black.mdx | 2 +- .../uniapp/user/blacklist/get-black-list.mdx | 2 +- .../uniapp/user/blacklist/remove-black.mdx | 2 +- .../accept-friend-application.mdx | 2 +- .../user/friend-applications/add-friend.mdx | 2 +- .../delete-friend-requests.mdx | 2 +- ...t-friend-application-list-as-applicant.mdx | 2 +- ...t-friend-application-list-as-recipient.mdx | 2 +- ...get-friend-application-unhandled-count.mdx | 2 +- .../refuse-friend-application.mdx | 2 +- .../sdk/uniapp/user/friends/check-friend.mdx | 2 +- .../sdk/uniapp/user/friends/delete-friend.mdx | 2 +- .../user/friends/get-friend-list-page.mdx | 2 +- .../friends/get-specified-friends-info.mdx | 2 +- .../uniapp/user/friends/search-friends.mdx | 2 +- .../uniapp/user/friends/update-friends.mdx | 2 +- .../get-subscribe-users-status.mdx | 2 +- .../online-status/subscribe-users-status.mdx | 2 +- .../unsubscribe-users-status.mdx | 2 +- .../chat/sdk/uniapp/user/overview-user.mdx | 2 +- .../user/profile/get-self-user-info.mdx | 2 +- .../uniapp/user/profile/get-users-info.mdx | 2 +- .../profile/set-friend-add-permission.mdx | 2 +- .../profile/set-global-message-reception.mdx | 2 +- .../sdk/uniapp/user/profile/set-self-info.mdx | 2 +- data/structure/report.json | 29 +- data/structure/uniapp-content-audit.json | 3988 ++++++++++------- data/structure/uniapp-navigation-labels.json | 2 + docs/STRUCTURE_REPORT.md | 45 +- pnpm-lock.yaml | 20 +- pnpm-workspace.yaml | 2 + .../__tests__/client-sdk-publication.test.mjs | 3 +- src/components/mdx/landing.tsx | 13 + src/config/docs.ts | 8 +- src/generated/navigation.json | 34 +- src/generated/routes.json | 110 +- src/generated/search-index-zh.json | 1336 +++++- src/generated/search-index.json | 1336 +++++- src/generated/uniapp-sdk-zh-content.json | 336 +- 118 files changed, 5467 insertions(+), 2147 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx index 3de60357f5..176a31f328 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Add conversations to grou product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx index 02d3f15519..b91c3d6b16 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Create a conversation gro product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx index 693d1bac51..fbbc1eb5f2 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation gro product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx index cea343c497..934ddb17a0 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for getConversationGroupByCon product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx index 396b7f94ba..32bf99ab37 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get conversations in a gr product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx index ac12cc713f..4db5936f5f 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get conversation groups.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx index a3eddf4c16..876bc521e2 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Conversation group overvi product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx index 52f30e7eb0..a2796d380d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Remove conversations from product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx index 9994d5bc97..cdc1cb852c 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Reorder conversation grou product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx index 13ca1d1bf9..9cd3cf8a9e 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Update a conversation gro product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx index 86176979e4..d0d83f4669 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Clear messages in a conve product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx index 9cd87cba69..c268cb40c5 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Reset group mention statu product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-group-mentions' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx index 02fa420a3f..9fb27c5ffb 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation and product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx index 377c68a610..1c7a2e4632 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Delete a conversation.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx index faeb6a2850..c7379887a3 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Track the total unread co product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/get-total-unread-count' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx index b038b28c6c..83fe7b8101 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Hide a conversation.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-a-conversation' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx index e54449b7ed..a4a0d5d4e5 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Hide all conversations.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-all-conversations' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx index e3b5772fdf..f0212921aa 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Mark all conversations as product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx index 55f8cd0c99..21d5b47460 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Mark a conversation as re product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation-read' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx index f34ed61811..edb8265b5e 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Mark or unmark a conversa product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx index 70d8e78b57..60ce18297f 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Pin or unpin a conversati product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/pin-conversation' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx index 3634540f79..66081931b6 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set the burn duration.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-burn-duration' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx index 7448f6144b..7abeba9370 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set a conversation draft. product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-draft' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx index 6a5de3a8e1..13c8e2eccf 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set conversation extra da product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-extension' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx index 565333f9f6..43ac6bee0f 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set a conversation remark product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-remark' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx index 7b5a34835d..db80987eee 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Schedule server message d product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-destruct' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx index 0df49da81d..b387aa6170 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set conversation message product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-receive-option' diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx index e37faccb82..7d1c864052 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Enable or disable burn af product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-private-chat' diff --git a/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx index 7c8b7ba1aa..84b99c4c7d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Conversation overview.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/overview-conversation' diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx index 21dd578b78..ef5c4622ea 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Open a conversation.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target' diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx index 126fb00c1e..7f2d28e769 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Resolve a conversation ID product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id' diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx index f7b5a929a5..d7b71a58c4 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get conversations by ID.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id' diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx index e1fceb12ff..2fcc06f31c 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get the conversation list product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list' diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx index f1eb25c3dc..a1ab894ccb 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Search conversations.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/search-conversations' diff --git a/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx index b562344be3..77a19615ac 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx @@ -4,7 +4,7 @@ description: 'Log in, observe connection and token events, inspect login state, product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' @@ -48,7 +48,7 @@ import { login } from '@/uni_modules/unix-openim-sdk' await login(userID, token) ``` -The signature is `login(userID, token, operationID?)`, not an object parameter. Obtain a token matching `userID` from a trusted backend. +The required call shape is `login(userID, token)`, not an object parameter. Obtain a token matching `userID` from a trusted backend; the optional diagnostic argument is intentionally omitted from normal examples. ```uts import { OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID } from '@/uni_modules/unix-openim-sdk' diff --git a/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx index 9438a8a05c..faafc8d96d 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx @@ -4,7 +4,7 @@ description: 'Prepare OpenIMServer, a user token, the UTS plugin, and a native b product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx index 31b5796b8b..8894d1a240 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx @@ -4,7 +4,7 @@ description: 'Understand the runtime and build boundaries for uni-app, uni-app x product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx b/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx index 3f10b999a2..18b785d63d 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx @@ -4,7 +4,7 @@ description: 'Report lifecycle and network changes, update badges, and register product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx index 42e74a7229..ba5f6f8561 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx @@ -4,7 +4,7 @@ description: 'Install the UTS plugin, initialize the only OpenIM Core, and inspe product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx index ff7d252507..ca44ab1483 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx @@ -4,7 +4,7 @@ description: 'Create and send a text message in a uni-app or uni-app x App.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx index 6ca8a7d432..c1906dde67 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx @@ -4,7 +4,7 @@ description: 'Commercially update a login token and use synthetic session snapsh product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx index 1655587127..6510d73858 100644 --- a/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx +++ b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Change group mute status. product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/change-group-mute' diff --git a/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx b/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx index b0cee785ff..d1310a3269 100644 --- a/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx +++ b/content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Check group full-sync sta product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/check-full-sync-state' diff --git a/content/docs/chat/sdk/uniapp/group/create-group.mdx b/content/docs/chat/sdk/uniapp/group/create-group.mdx index 4cd58c8a9d..99c6deb83f 100644 --- a/content/docs/chat/sdk/uniapp/group/create-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/create-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Create a group.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/create-group' diff --git a/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx index a978901906..becec688fb 100644 --- a/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Dismiss a group.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/dismiss-group' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx index 791d49be10..0560734ec6 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Accept a group applicatio product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/accept-group-application' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx index 97693c0e9c..081b9f8671 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Delete group applications product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/delete-group-requests' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx index 43b676ab86..37b0a60ea0 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get sent group applicatio product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx index db2083e6b1..bd1ab5b6b2 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get received group applic product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx index 05c40bbf7f..30cda966df 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-unhandled-count.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get the pending group app product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-unhandled-count' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx index 06c4bc7d15..490444fae4 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/observe-group-application-badge-count.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get the group application product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/observe-group-application-badge-count' diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx index f182dac58f..0df78fbaee 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Reject a group applicatio product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/refuse-group-application' diff --git a/content/docs/chat/sdk/uniapp/group/join-group.mdx b/content/docs/chat/sdk/uniapp/group/join-group.mdx index 80691bac6a..8c1b4d9660 100644 --- a/content/docs/chat/sdk/uniapp/group/join-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/join-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Apply to join a group.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/join-group' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx index 63e1a90f90..163054a308 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Mute or unmute a group me product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/change-group-member-mute' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx index 2220586cf4..f32b800eba 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Invite users to a group.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/invite-user-to-group' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx index 9728779793..74cab1b6b7 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Remove group members.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/kick-group-member' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx index 3db689212b..6f26810397 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Update a group member’s product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-avatar' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx index b1f3c70a09..db22e33370 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set a group member extens product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-extension' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx index 99fa65f753..e356d192ee 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Update a member’s group product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-nickname' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx index b8cedaa128..e919f1d193 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Manage group administrato product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-role-level' diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx index 7e81d19f60..6ad93f266c 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Transfer group ownership. product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/transfer-group-owner' diff --git a/content/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/docs/chat/sdk/uniapp/group/overview-group.mdx index 1e8c85aaee..ac281d4f46 100644 --- a/content/docs/chat/sdk/uniapp/group/overview-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Group overview.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/overview-group' diff --git a/content/docs/chat/sdk/uniapp/group/quit-group.mdx b/content/docs/chat/sdk/uniapp/group/quit-group.mdx index 7eefb1a18d..b91d47e219 100644 --- a/content/docs/chat/sdk/uniapp/group/quit-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/quit-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Leave a group.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/quit-group' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx index f45219ed10..78ea25975d 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for List group members.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-group-member-list' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx index ca8a17d9b6..2249f9be36 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get specified group membe product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx index dfb7a47fe5..9f5c76bf09 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Check group membership.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-users-in-group' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx index 43534233dc..58d3e1820b 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Search group members.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/search-group-members' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx index d319937f95..c82ccddf56 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get joined groups by page product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx index 52f64aa875..590315f289 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get joined groups.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx index 41a250d297..1156ebb4a0 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Get group information.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-specified-groups-info' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx index 921e499919..163dd305ad 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Check group membership.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/is-join-group' diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx index 30e86fc00c..93fe323cbb 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Search groups.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/search-groups' diff --git a/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx index 11223865f5..9ab8b34ebc 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Publish a group announcem product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-announcement' diff --git a/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx index 75464e70ed..0240446092 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set group extra data.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-extension' diff --git a/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx index f9878ad1e7..42ec1cc2e5 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set group join verificati product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-join-verification' diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx index 88ca3c9a6e..c7dbe4a97f 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set member friend request product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-member-friend-permission' diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx index 2db7e61492..85d3519503 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Set member profile access product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-member-profile-access' diff --git a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx index 7ef6d3101c..a4e5efe4a6 100644 --- a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -4,8 +4,8 @@ description: 'OpenIM uni-app / uni-app x SDK guide for Update group profile.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' -lastUpdated: '2026-07-20' +status: 'published' +lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' sourcePath: '/sdk/uniapp/group/update-group-profile' diff --git a/content/docs/chat/sdk/uniapp/overview.mdx b/content/docs/chat/sdk/uniapp/overview.mdx index 2fcc350b8e..6f24ca863e 100644 --- a/content/docs/chat/sdk/uniapp/overview.mdx +++ b/content/docs/chat/sdk/uniapp/overview.mdx @@ -4,7 +4,7 @@ description: 'Integrate unix-openim-sdk into Android, iOS, and commercial Harmon product: 'sdk' context: 'chat/sdk/uniapp' template: 'overview' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx index 5c58ae3673..2f07d6939d 100644 --- a/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx +++ b/content/docs/chat/sdk/uniapp/user/blacklist/add-black.mdx @@ -4,7 +4,7 @@ description: 'Add a selected user to the current account blacklist.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx index 782180db87..4b2066bf4a 100644 --- a/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx +++ b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx @@ -4,7 +4,7 @@ description: 'Load the blacklist and process add and remove events.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx index ff1f76c258..81a3acf17a 100644 --- a/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx +++ b/content/docs/chat/sdk/uniapp/user/blacklist/remove-black.mdx @@ -4,7 +4,7 @@ description: 'Remove the selected blacklist relationship.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx index 4889bfa2b4..fab3beece6 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/accept-friend-application.mdx @@ -4,7 +4,7 @@ description: 'Accept a friend request from a selected user.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx index 08e554b9e3..a307b20ea9 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/add-friend.mdx @@ -4,7 +4,7 @@ description: 'Send a friend request to another user.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx index c96ef4ac1a..df4a66ca8c 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx @@ -4,7 +4,7 @@ description: 'Commercially delete selected friend-request records in a batch.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx index 8b3913f839..ea64df4a07 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -4,7 +4,7 @@ description: 'Read friend requests sent by the current account.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx index c5aa8bf5c9..0cbc3b3216 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -4,7 +4,7 @@ description: 'Read received requests and process add, accept, reject, and delete product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx index 57980f88b0..cc94c71cb6 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count.mdx @@ -4,7 +4,7 @@ description: 'Read the unhandled count displayed on the friend-request entry.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx index bbcdea60a2..e73aa4df79 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/refuse-friend-application.mdx @@ -4,7 +4,7 @@ description: 'Reject a friend request from a selected user.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx b/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx index 6994497319..6c1251bdb4 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/check-friend.mdx @@ -4,7 +4,7 @@ description: 'Check the friendship between the current account and selected user product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx b/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx index 6700155fa7..d8689c535b 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/delete-friend.mdx @@ -4,7 +4,7 @@ description: 'Remove a friendship with a selected user.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx index e055f81b15..0c8cbbc973 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx @@ -4,7 +4,7 @@ description: 'Load friends by page or snapshot and process friend changes.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx b/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx index 778b2ba60a..3cdb5b2870 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/get-specified-friends-info.mdx @@ -4,7 +4,7 @@ description: 'Read friendship details for selected user IDs.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx index 8943b4771c..64f623cff4 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx @@ -4,7 +4,7 @@ description: 'Search current friends by ID, nickname, or remark.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx index 9ac052665a..2e6b179e26 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -4,7 +4,7 @@ description: 'Update friend remarks, pinned state, or extension values.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx index 67604059b9..8976fcec2f 100644 --- a/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx +++ b/content/docs/chat/sdk/uniapp/user/online-status/get-subscribe-users-status.mdx @@ -4,7 +4,7 @@ description: 'Read a snapshot for users whose status is already subscribed.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx index 73cd5e6ead..4e793e2ea7 100644 --- a/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx +++ b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx @@ -4,7 +4,7 @@ description: 'Subscribe to user status and merge onUserStatusChanged updates.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx index 5ca0c187b5..267d036925 100644 --- a/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx +++ b/content/docs/chat/sdk/uniapp/user/online-status/unsubscribe-users-status.mdx @@ -4,7 +4,7 @@ description: 'Stop receiving presence changes for selected users.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/docs/chat/sdk/uniapp/user/overview-user.mdx index e24b62baf8..8faf35784a 100644 --- a/content/docs/chat/sdk/uniapp/user/overview-user.mdx +++ b/content/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -4,7 +4,7 @@ description: 'Understand user profiles, presence, friendships, friend requests, product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 0c44146ecb..8a6b05c5aa 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -4,7 +4,7 @@ description: 'Read the OpenIM profile of the logged-in user.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index cf678e3c9a..b263c9b102 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -4,7 +4,7 @@ description: 'Read public profiles for a list of user IDs.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx index c18a849389..6d55f7c949 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx @@ -4,7 +4,7 @@ description: 'Understand the commercial friend-add policy and the current plugin product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx index 70aa56e7fe..7fb86b6d1e 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -4,7 +4,7 @@ description: 'Set the commercial account-wide globalRecvMsgOpt profile field.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index 8655d679de..3b07bfeb3a 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -4,7 +4,7 @@ description: 'Update selected profile fields and process onSelfInfoUpdated.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' -status: 'draft' +status: 'published' lastUpdated: '2026-08-13' version: 'v4' platform: 'uniapp' diff --git a/data/structure/report.json b/data/structure/report.json index 4baacf47d5..4724338fc5 100644 --- a/data/structure/report.json +++ b/data/structure/report.json @@ -1,21 +1,21 @@ { - "generatedAt": "2026-08-04T09:27:31.347Z", + "generatedAt": "2026-08-13T04:59:19.646Z", "scope": "current-only", - "pageCount": 813, - "contextCount": 9, + "pageCount": 983, + "contextCount": 10, "byProduct": { "platform-api": 194, - "sdk": 619 + "sdk": 789 }, "byTemplate": { "api": 179, - "guide": 612, + "guide": 782, "overview": 22 }, "byStatus": { - "draft": 2, - "published": 682, - "scaffold": 129 + "draft": 1, + "published": 854, + "scaffold": 128 }, "contexts": [ { @@ -31,7 +31,7 @@ { "key": "chat/sdk/android", "title": "SDKs · Android · v4", - "pageCount": 129 + "pageCount": 128 }, { "key": "chat/sdk/flutter", @@ -40,13 +40,13 @@ }, { "key": "chat/sdk/uniapp", - "title": "SDKs · uni-app · v4", - "pageCount": 1 + "title": "SDKs · uni-app / uni-app x · v4", + "pageCount": 167 }, { "key": "chat/sdk/wasm", "title": "SDKs · WASM · v4", - "pageCount": 161 + "pageCount": 165 }, { "key": "chat/sdk/electron", @@ -62,6 +62,11 @@ "key": "chat/sdk/react-native", "title": "SDKs · React Native · v4", "pageCount": 1 + }, + { + "key": "chat/sdk/common", + "title": "SDKs · Common reference · v4", + "pageCount": 1 } ] } diff --git a/data/structure/uniapp-content-audit.json b/data/structure/uniapp-content-audit.json index d9b803bb18..dc9edbdd5a 100644 --- a/data/structure/uniapp-content-audit.json +++ b/data/structure/uniapp-content-audit.json @@ -26,22 +26,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -64,23 +68,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -102,22 +106,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -160,22 +168,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -198,22 +210,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -241,22 +257,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -282,22 +302,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -326,22 +350,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -364,23 +392,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -404,22 +432,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -444,22 +476,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -487,22 +523,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -525,22 +565,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -563,23 +607,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -607,22 +651,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -647,22 +695,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -687,22 +739,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -735,22 +791,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -775,22 +835,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -815,22 +879,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -855,22 +923,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -896,22 +968,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -936,22 +1012,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -976,22 +1056,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1025,22 +1109,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1065,22 +1153,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1105,22 +1197,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1145,22 +1241,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1185,22 +1285,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1225,22 +1329,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1271,22 +1379,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1311,22 +1423,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1351,22 +1467,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1389,23 +1509,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -1429,22 +1549,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1469,22 +1593,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1509,22 +1637,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1555,22 +1687,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1595,22 +1731,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1635,22 +1775,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1673,23 +1817,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -1711,23 +1855,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -1749,22 +1893,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1789,22 +1937,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1827,22 +1979,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1865,22 +2021,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1909,22 +2069,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1949,22 +2113,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -1992,22 +2160,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2030,22 +2202,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2068,22 +2244,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2106,23 +2286,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -2146,22 +2326,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2186,22 +2370,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2226,22 +2414,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2266,22 +2458,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2306,22 +2502,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2356,22 +2556,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2396,22 +2600,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2436,22 +2644,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2476,22 +2688,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2516,22 +2732,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2556,22 +2776,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2596,22 +2820,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2636,22 +2864,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2676,22 +2908,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2716,22 +2952,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2764,22 +3004,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2804,22 +3048,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2844,22 +3092,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2882,22 +3134,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2920,22 +3176,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2958,22 +3218,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -2996,22 +3260,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3034,22 +3302,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3074,22 +3346,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3114,22 +3390,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3154,22 +3434,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3194,22 +3478,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3234,22 +3522,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3274,22 +3566,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3314,22 +3610,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3354,22 +3654,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } - }, - "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3394,22 +3698,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3443,22 +3751,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3483,22 +3795,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3523,22 +3839,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3565,22 +3885,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3605,22 +3929,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3645,22 +3973,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3685,22 +4017,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3732,22 +4068,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3772,22 +4112,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3812,22 +4156,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3852,22 +4200,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3892,22 +4244,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3932,22 +4288,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -3972,22 +4332,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4010,22 +4374,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4048,22 +4416,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4086,22 +4458,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4126,22 +4502,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4166,22 +4546,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4207,22 +4591,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4253,22 +4641,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4293,22 +4685,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4334,22 +4730,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4375,22 +4775,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4416,22 +4820,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4456,22 +4864,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4497,22 +4909,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } - }, - "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4537,22 +4953,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4578,22 +4998,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4618,22 +5042,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4659,22 +5087,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4699,22 +5131,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4739,22 +5175,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4779,22 +5219,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4819,22 +5263,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4860,22 +5308,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4900,22 +5352,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4940,22 +5396,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -4980,22 +5440,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5020,22 +5484,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5060,22 +5528,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5110,22 +5582,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5160,22 +5636,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5201,22 +5681,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5241,22 +5725,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5281,22 +5769,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5321,22 +5813,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5365,22 +5861,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5405,22 +5905,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5445,22 +5949,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5485,22 +5993,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5525,22 +6037,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5566,22 +6082,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5607,22 +6127,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5650,22 +6174,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } - }, - "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + }, + "en": { + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5693,22 +6221,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5736,22 +6268,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5781,22 +6317,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5821,22 +6361,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5864,22 +6408,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5904,22 +6452,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5944,22 +6496,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -5984,22 +6540,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6024,22 +6584,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6064,22 +6628,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6107,22 +6675,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6147,22 +6719,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6188,22 +6764,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6226,23 +6806,23 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", + "status": "not-applicable", "evidence": [], - "reason": null + "reason": "Concept or boundary page contains no executable code block." } } }, @@ -6266,22 +6846,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6306,22 +6890,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6346,22 +6934,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6386,22 +6978,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6426,22 +7022,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6466,22 +7066,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6528,22 +7132,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6568,22 +7176,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6608,22 +7220,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6648,22 +7264,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6693,22 +7313,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6743,22 +7367,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6791,22 +7419,26 @@ ], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } @@ -6831,22 +7463,26 @@ "sdkEvents": [], "locales": { "zh": { - "reviewStatus": "api-verified", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } }, "en": { - "reviewStatus": "deferred", - "reviewer": null, - "reviewedAt": null, + "reviewStatus": "published", + "reviewer": "Codex contract audit", + "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "pending", - "evidence": [], + "status": "verified", + "evidence": [ + "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + ], "reason": null } } diff --git a/data/structure/uniapp-navigation-labels.json b/data/structure/uniapp-navigation-labels.json index 21c4f46f2f..efd669bb6f 100644 --- a/data/structure/uniapp-navigation-labels.json +++ b/data/structure/uniapp-navigation-labels.json @@ -97,6 +97,7 @@ "Environment-specific implementation": "按运行环境接入", "environment-specific-implementation": "按运行环境接入", "events": "事件", + "Event overview": "事件概览", "Events": "事件", "Events overview": "事件概览", "File upload overview": "文件上传概览", @@ -112,6 +113,7 @@ "Get conversations in a group": "查询分组内会话", "Get friend profiles": "查询指定好友资料", "Get group application badge count": "获取入群申请角标数", + "Observe group application badge count": "观察群申请角标变化", "Get group information": "查询指定群组资料", "Get group member profiles": "查询指定群成员资料", "Get group members": "分页查询群成员", diff --git a/docs/STRUCTURE_REPORT.md b/docs/STRUCTURE_REPORT.md index ef7c903a5b..ea25bb9b0a 100644 --- a/docs/STRUCTURE_REPORT.md +++ b/docs/STRUCTURE_REPORT.md @@ -1,9 +1,9 @@ # 当前结构报告 -- 页面总数:**813** -- 导航上下文:**9** +- 页面总数:**983** +- 导航上下文:**10** - 内容范围:**current-only** -- 生成时间:`2026-08-04T09:27:31.347Z` +- 生成时间:`2026-08-13T04:59:19.646Z` ## 当前保留范围 @@ -18,38 +18,39 @@ SDK Reference 应从代码注释或类型定义生成。Platform API 的结构 | 分支 | 页面数 | 占比 | | -------------- | -----: | ----: | -| `platform-api` | 194 | 23.9% | -| `sdk` | 619 | 76.1% | +| `platform-api` | 194 | 19.7% | +| `sdk` | 789 | 80.3% | ## 按页面模板 | 模板 | 页面数 | 占比 | | ---------- | -----: | ----: | -| `api` | 179 | 22.0% | -| `guide` | 612 | 75.3% | -| `overview` | 22 | 2.7% | +| `api` | 179 | 18.2% | +| `guide` | 782 | 79.6% | +| `overview` | 22 | 2.2% | ## 按发布状态 | 状态 | 页面数 | 占比 | | ----------- | -----: | ----: | -| `draft` | 2 | 0.2% | -| `published` | 682 | 83.9% | -| `scaffold` | 129 | 15.9% | +| `draft` | 1 | 0.1% | +| `published` | 854 | 86.9% | +| `scaffold` | 128 | 13.0% | ## 导航上下文 -| 上下文键 | 显示名称 | 页面数 | -| ----------------------- | ------------------------ | -----: | -| `chat/platform-api` | Platform API | 194 | -| `chat/sdk/ios` | SDKs · iOS · v4 | 164 | -| `chat/sdk/android` | SDKs · Android · v4 | 129 | -| `chat/sdk/flutter` | SDKs · Flutter · v4 | 158 | -| `chat/sdk/uniapp` | SDKs · uni-app · v4 | 1 | -| `chat/sdk/wasm` | SDKs · WASM · v4 | 161 | -| `chat/sdk/electron` | SDKs · Electron · v4 | 4 | -| `chat/sdk/miniprogram` | SDKs · Mini Program · v4 | 1 | -| `chat/sdk/react-native` | SDKs · React Native · v4 | 1 | +| 上下文键 | 显示名称 | 页面数 | +| ----------------------- | ------------------------------- | -----: | +| `chat/platform-api` | Platform API | 194 | +| `chat/sdk/ios` | SDKs · iOS · v4 | 164 | +| `chat/sdk/android` | SDKs · Android · v4 | 128 | +| `chat/sdk/flutter` | SDKs · Flutter · v4 | 158 | +| `chat/sdk/uniapp` | SDKs · uni-app / uni-app x · v4 | 167 | +| `chat/sdk/wasm` | SDKs · WASM · v4 | 165 | +| `chat/sdk/electron` | SDKs · Electron · v4 | 4 | +| `chat/sdk/miniprogram` | SDKs · Mini Program · v4 | 1 | +| `chat/sdk/react-native` | SDKs · React Native · v4 | 1 | +| `chat/sdk/common` | SDKs · Common reference · v4 | 1 | ## 说明 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6f8eefb62..bd59bb014e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + nanoid: 3.3.17 + importers: .: @@ -2910,13 +2913,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - nanoid@3.3.15: - resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - nanoid@3.3.16: - resolution: {integrity: sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==} + nanoid@3.3.17: + resolution: {integrity: sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -6877,9 +6875,7 @@ snapshots: ms@2.1.3: {} - nanoid@3.3.15: {} - - nanoid@3.3.16: {} + nanoid@3.3.17: {} napi-postinstall@0.3.4: {} @@ -7118,13 +7114,13 @@ snapshots: postcss@8.5.15: dependencies: - nanoid: 3.3.15 + nanoid: 3.3.17 picocolors: 1.1.1 source-map-js: 1.2.1 postcss@8.5.23: dependencies: - nanoid: 3.3.16 + nanoid: 3.3.17 picocolors: 1.1.1 source-map-js: 1.2.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ad091f5643..fd94862349 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -15,3 +15,5 @@ minimumReleaseAgeExclude: - '@next/swc-win32-x64-msvc@16.3.0' - eslint-config-next@16.3.0 - next@16.3.0 +overrides: + nanoid: 3.3.17 diff --git a/scripts/__tests__/client-sdk-publication.test.mjs b/scripts/__tests__/client-sdk-publication.test.mjs index 59a934728c..43ddb6f7c8 100644 --- a/scripts/__tests__/client-sdk-publication.test.mjs +++ b/scripts/__tests__/client-sdk-publication.test.mjs @@ -24,7 +24,8 @@ test('reads locale publication state per platform audit', () => { assert.deepEqual(getPublishedClientSdkLocales('/sdk/flutter/overview'), ['en', 'zh']); assert.equal(isClientSdkLocalePublished('/sdk/flutter/overview', 'en'), true); assert.equal(isClientSdkLocalePublished('/sdk/wasm/overview', 'zh'), true); - assert.equal(isClientSdkLocalePublished('/sdk/uniapp/overview', 'zh'), false); + assert.deepEqual(getPublishedClientSdkLocales('/sdk/uniapp/overview'), ['en', 'zh']); + assert.equal(isClientSdkLocalePublished('/sdk/uniapp/overview', 'zh'), true); }); test('lookup keeps active route detection independent from audit completeness', () => { diff --git a/src/components/mdx/landing.tsx b/src/components/mdx/landing.tsx index bb0f9e64bc..5e0ec7a8cc 100644 --- a/src/components/mdx/landing.tsx +++ b/src/components/mdx/landing.tsx @@ -105,6 +105,13 @@ const sdkCards: HomeCard[] = [ 'Use one OpenIMClientSDK integration path across mobile and supported desktop targets.', meta: 'Dart', }, + { + title: 'uni-app / uni-app x', + href: '/sdk/uniapp/overview', + description: + 'Integrate the native UTS SDK into Android, iOS, and commercial HarmonyOS Apps.', + meta: 'UTS', + }, { title: 'Electron', href: '/sdk/electron/overview', @@ -411,6 +418,12 @@ const featureGroups: FeatureGroup[] = [ 'Use one OpenIMClientSDK integration path across mobile and supported desktop targets.', meta: 'Flutter', }, + { + title: 'uni-app / uni-app x SDK', + href: '/sdk/uniapp/overview', + description: 'Use the native UTS plugin in uni-app and uni-app x mobile Apps.', + meta: 'UTS', + }, { title: 'API setup', href: '/platform-api/prepare-to-use-api', diff --git a/src/config/docs.ts b/src/config/docs.ts index afa31f2c3c..728d661fb1 100644 --- a/src/config/docs.ts +++ b/src/config/docs.ts @@ -26,7 +26,7 @@ export const platformLabels: Record = { export const webCompatibleSdkPlatforms = ['wasm', 'electron', 'miniprogram'] as const; /** Temporarily hidden from SDK nav, home cards, and platform switcher. Routes remain. */ -export const hiddenSdkPlatforms = ['android', 'uniapp', 'react-native'] as const; +export const hiddenSdkPlatforms = ['android', 'react-native'] as const; export function isSdkPlatformVisible(platform?: string | null): boolean { if (!platform) return true; @@ -53,6 +53,12 @@ export const sdkPlatformSections: SdkPlatformSection[] = [ items: [ { label: 'iOS', platform: 'ios', href: '/sdk/ios/overview' }, { label: 'Flutter', platform: 'flutter', href: '/sdk/flutter/overview' }, + { + label: 'uni-app / uni-app x', + labelZh: 'uni-app / uni-app x', + platform: 'uniapp', + href: '/sdk/uniapp/overview', + }, ], }, { diff --git a/src/generated/navigation.json b/src/generated/navigation.json index e917058bbb..729b083541 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -7903,7 +7903,7 @@ { "id": "overview", "segment": "overview", - "title": "OpenIM SDK for uni-app", + "title": "OpenIM SDK for uni-app / uni-app x", "href": "/sdk/uniapp/overview", "type": "page", "children": [], @@ -7929,7 +7929,7 @@ { "id": "getting-started/environment-specific-implementation", "segment": "environment-specific-implementation", - "title": "Environment-specific implementation", + "title": "Integrate by host and platform", "href": "/sdk/uniapp/getting-started/environment-specific-implementation", "type": "page", "children": [], @@ -8055,7 +8055,7 @@ { "id": "user/profile/set-friend-add-permission", "segment": "set-friend-add-permission", - "title": "Set friend request permissions", + "title": "Set friend-add permission", "href": "/sdk/uniapp/user/profile/set-friend-add-permission", "type": "page", "children": [], @@ -8072,7 +8072,7 @@ { "id": "user/online-status/subscribe-users-status", "segment": "subscribe-users-status", - "title": "Subscribe to online status", + "title": "Subscribe to user presence", "href": "/sdk/uniapp/user/online-status/subscribe-users-status", "type": "page", "children": [], @@ -8082,7 +8082,7 @@ { "id": "user/online-status/get-subscribe-users-status", "segment": "get-subscribe-users-status", - "title": "Get subscribed user status", + "title": "Get subscribed user presence", "href": "/sdk/uniapp/user/online-status/get-subscribe-users-status", "type": "page", "children": [], @@ -8092,7 +8092,7 @@ { "id": "user/online-status/unsubscribe-users-status", "segment": "unsubscribe-users-status", - "title": "Unsubscribe from online status", + "title": "Unsubscribe from user presence", "href": "/sdk/uniapp/user/online-status/unsubscribe-users-status", "type": "page", "children": [], @@ -8122,7 +8122,7 @@ { "id": "user/friends/get-friend-list-page", "segment": "get-friend-list-page", - "title": "Get the friend list", + "title": "List friends", "href": "/sdk/uniapp/user/friends/get-friend-list-page", "type": "page", "children": [], @@ -8142,7 +8142,7 @@ { "id": "user/friends/get-specified-friends-info", "segment": "get-specified-friends-info", - "title": "Get friend profiles", + "title": "Get selected friend profiles", "href": "/sdk/uniapp/user/friends/get-specified-friends-info", "type": "page", "children": [], @@ -8152,7 +8152,7 @@ { "id": "user/friends/check-friend", "segment": "check-friend", - "title": "Check friendship status", + "title": "Check friendship", "href": "/sdk/uniapp/user/friends/check-friend", "type": "page", "children": [], @@ -8162,7 +8162,7 @@ { "id": "user/friends/update-friends", "segment": "update-friends", - "title": "Update friend information", + "title": "Update friend details", "href": "/sdk/uniapp/user/friends/update-friends", "type": "page", "children": [], @@ -8189,7 +8189,7 @@ { "id": "user/friend-applications/add-friend", "segment": "add-friend", - "title": "Send a friend application", + "title": "Send a friend request", "href": "/sdk/uniapp/user/friend-applications/add-friend", "type": "page", "children": [], @@ -8199,7 +8199,7 @@ { "id": "user/friend-applications/get-friend-application-list-as-recipient", "segment": "get-friend-application-list-as-recipient", - "title": "Get received friend applications", + "title": "List received friend requests", "href": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", "type": "page", "children": [], @@ -8209,7 +8209,7 @@ { "id": "user/friend-applications/get-friend-application-list-as-applicant", "segment": "get-friend-application-list-as-applicant", - "title": "Get sent friend applications", + "title": "List sent friend requests", "href": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", "type": "page", "children": [], @@ -8219,7 +8219,7 @@ { "id": "user/friend-applications/get-friend-application-unhandled-count", "segment": "get-friend-application-unhandled-count", - "title": "Get pending application count", + "title": "Get unhandled friend-request count", "href": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", "type": "page", "children": [], @@ -8229,7 +8229,7 @@ { "id": "user/friend-applications/accept-friend-application", "segment": "accept-friend-application", - "title": "Accept a friend application", + "title": "Accept a friend request", "href": "/sdk/uniapp/user/friend-applications/accept-friend-application", "type": "page", "children": [], @@ -8239,7 +8239,7 @@ { "id": "user/friend-applications/refuse-friend-application", "segment": "refuse-friend-application", - "title": "Reject a friend application", + "title": "Reject a friend request", "href": "/sdk/uniapp/user/friend-applications/refuse-friend-application", "type": "page", "children": [], @@ -8249,7 +8249,7 @@ { "id": "user/friend-applications/delete-friend-requests", "segment": "delete-friend-requests", - "title": "Delete friend applications", + "title": "Delete friend-request records", "href": "/sdk/uniapp/user/friend-applications/delete-friend-requests", "type": "page", "children": [], diff --git a/src/generated/routes.json b/src/generated/routes.json index b9eaaeb0b1..59f4de382d 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -9419,7 +9419,7 @@ "relativePath": "sdk/uniapp/overview", "sourcePath": "/sdk/uniapp/overview", "title": "OpenIM SDK for uni-app / uni-app x", - "description": "OpenIM uni-app / uni-app x SDK guide for OpenIM SDK for uni-app / uni-app x.", + "description": "Integrate unix-openim-sdk into Android, iOS, and commercial HarmonyOS Apps built with uni-app or uni-app x.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9437,7 +9437,7 @@ "relativePath": "sdk/uniapp/getting-started/before-you-start", "sourcePath": "/sdk/uniapp/getting-started/before-you-start", "title": "Before you start", - "description": "OpenIM uni-app / uni-app x SDK guide for Before you start.", + "description": "Prepare OpenIMServer, a user token, the UTS plugin, and a native build environment.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9454,8 +9454,8 @@ "path": "/sdk/uniapp/getting-started/environment-specific-implementation", "relativePath": "sdk/uniapp/getting-started/environment-specific-implementation", "sourcePath": "/sdk/uniapp/getting-started/environment-specific-implementation", - "title": "Environment-specific implementation", - "description": "OpenIM uni-app / uni-app x SDK guide for Environment-specific implementation.", + "title": "Integrate by host and platform", + "description": "Understand the runtime and build boundaries for uni-app, uni-app x, Android, iOS, and HarmonyOS.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9473,7 +9473,7 @@ "relativePath": "sdk/uniapp/getting-started/authenticate-and-manage-session", "sourcePath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", "title": "Authenticate and manage a session", - "description": "OpenIM uni-app / uni-app x SDK guide for Authenticate and manage a session.", + "description": "Log in, observe connection and token events, inspect login state, and log out safely.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9491,7 +9491,7 @@ "relativePath": "sdk/uniapp/getting-started/send-first-message", "sourcePath": "/sdk/uniapp/getting-started/send-first-message", "title": "Send your first message", - "description": "OpenIM uni-app / uni-app x SDK guide for Send your first message.", + "description": "Create and send a text message in a uni-app or uni-app x App.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9509,14 +9509,14 @@ "relativePath": "sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", "sourcePath": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", "title": "Install, initialize, and inspect the SDK", - "description": "OpenIM uni-app / uni-app x SDK guide for Install, initialize, and inspect the SDK.", + "description": "Install the UTS plugin, initialize the only OpenIM Core, and inspect version and data paths.", "product": "sdk", "version": "v4", "platform": "uniapp", "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2731, "contentFile": "content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx", "navOrder": 388 @@ -9527,14 +9527,14 @@ "relativePath": "sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", "sourcePath": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", "title": "Handle App lifecycle and device state", - "description": "OpenIM uni-app / uni-app x SDK guide for Handle App lifecycle and device state.", + "description": "Report lifecycle and network changes, update badges, and register an FCM token.", "product": "sdk", "version": "v4", "platform": "uniapp", "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2732, "contentFile": "content/docs/chat/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state.mdx", "navOrder": 389 @@ -9545,14 +9545,14 @@ "relativePath": "sdk/uniapp/getting-started/update-token-and-observe-sdk-session", "sourcePath": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", "title": "Update tokens and observe SDK sessions", - "description": "OpenIM uni-app / uni-app x SDK guide for Update tokens and observe SDK sessions.", + "description": "Commercially update a login token and use synthetic session snapshots to prevent cross-account work.", "product": "sdk", "version": "v4", "platform": "uniapp", "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2733, "contentFile": "content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx", "navOrder": 390 @@ -9563,7 +9563,7 @@ "relativePath": "sdk/uniapp/user/overview-user", "sourcePath": "/sdk/uniapp/user/overview-user", "title": "User overview", - "description": "OpenIM uni-app / uni-app x SDK guide for User overview.", + "description": "Understand user profiles, presence, friendships, friend requests, and the blacklist.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9581,7 +9581,7 @@ "relativePath": "sdk/uniapp/user/profile/get-users-info", "sourcePath": "/sdk/uniapp/user/profile/get-users-info", "title": "Get user profiles", - "description": "OpenIM uni-app / uni-app x SDK guide for Get user profiles.", + "description": "Read public profiles for a list of user IDs.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9599,7 +9599,7 @@ "relativePath": "sdk/uniapp/user/profile/get-self-user-info", "sourcePath": "/sdk/uniapp/user/profile/get-self-user-info", "title": "Get your profile", - "description": "OpenIM uni-app / uni-app x SDK guide for Get your profile.", + "description": "Read the OpenIM profile of the logged-in user.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9617,7 +9617,7 @@ "relativePath": "sdk/uniapp/user/profile/set-self-info", "sourcePath": "/sdk/uniapp/user/profile/set-self-info", "title": "Update your profile", - "description": "OpenIM uni-app / uni-app x SDK guide for Update your profile.", + "description": "Update selected profile fields and process onSelfInfoUpdated.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9635,7 +9635,7 @@ "relativePath": "sdk/uniapp/user/profile/set-global-message-reception", "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", "title": "Set global message reception", - "description": "OpenIM uni-app / uni-app x SDK guide for Set global message reception.", + "description": "Set the commercial account-wide globalRecvMsgOpt profile field.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9652,8 +9652,8 @@ "path": "/sdk/uniapp/user/profile/set-friend-add-permission", "relativePath": "sdk/uniapp/user/profile/set-friend-add-permission", "sourcePath": "/sdk/uniapp/user/profile/set-friend-add-permission", - "title": "Set friend request permissions", - "description": "OpenIM uni-app / uni-app x SDK guide for Set friend request permissions.", + "title": "Set friend-add permission", + "description": "Understand the commercial friend-add policy and the current plugin write boundary.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9670,8 +9670,8 @@ "path": "/sdk/uniapp/user/online-status/subscribe-users-status", "relativePath": "sdk/uniapp/user/online-status/subscribe-users-status", "sourcePath": "/sdk/uniapp/user/online-status/subscribe-users-status", - "title": "Subscribe to online status", - "description": "OpenIM uni-app / uni-app x SDK guide for Subscribe to online status.", + "title": "Subscribe to user presence", + "description": "Subscribe to user status and merge onUserStatusChanged updates.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9688,8 +9688,8 @@ "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", "relativePath": "sdk/uniapp/user/online-status/get-subscribe-users-status", "sourcePath": "/sdk/uniapp/user/online-status/get-subscribe-users-status", - "title": "Get subscribed user status", - "description": "OpenIM uni-app / uni-app x SDK guide for Get subscribed user status.", + "title": "Get subscribed user presence", + "description": "Read a snapshot for users whose status is already subscribed.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9706,8 +9706,8 @@ "path": "/sdk/uniapp/user/online-status/unsubscribe-users-status", "relativePath": "sdk/uniapp/user/online-status/unsubscribe-users-status", "sourcePath": "/sdk/uniapp/user/online-status/unsubscribe-users-status", - "title": "Unsubscribe from online status", - "description": "OpenIM uni-app / uni-app x SDK guide for Unsubscribe from online status.", + "title": "Unsubscribe from user presence", + "description": "Stop receiving presence changes for selected users.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9724,8 +9724,8 @@ "path": "/sdk/uniapp/user/friends/get-friend-list-page", "relativePath": "sdk/uniapp/user/friends/get-friend-list-page", "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", - "title": "Get the friend list", - "description": "OpenIM uni-app / uni-app x SDK guide for Get the friend list.", + "title": "List friends", + "description": "Load friends by page or snapshot and process friend changes.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9743,7 +9743,7 @@ "relativePath": "sdk/uniapp/user/friends/search-friends", "sourcePath": "/sdk/uniapp/user/friends/search-friends", "title": "Search friends", - "description": "OpenIM uni-app / uni-app x SDK guide for Search friends.", + "description": "Search current friends by ID, nickname, or remark.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9760,8 +9760,8 @@ "path": "/sdk/uniapp/user/friends/get-specified-friends-info", "relativePath": "sdk/uniapp/user/friends/get-specified-friends-info", "sourcePath": "/sdk/uniapp/user/friends/get-specified-friends-info", - "title": "Get friend profiles", - "description": "OpenIM uni-app / uni-app x SDK guide for Get friend profiles.", + "title": "Get selected friend profiles", + "description": "Read friendship details for selected user IDs.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9778,8 +9778,8 @@ "path": "/sdk/uniapp/user/friends/check-friend", "relativePath": "sdk/uniapp/user/friends/check-friend", "sourcePath": "/sdk/uniapp/user/friends/check-friend", - "title": "Check friendship status", - "description": "OpenIM uni-app / uni-app x SDK guide for Check friendship status.", + "title": "Check friendship", + "description": "Check the friendship between the current account and selected users.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9796,8 +9796,8 @@ "path": "/sdk/uniapp/user/friends/update-friends", "relativePath": "sdk/uniapp/user/friends/update-friends", "sourcePath": "/sdk/uniapp/user/friends/update-friends", - "title": "Update friend information", - "description": "OpenIM uni-app / uni-app x SDK guide for Update friend information.", + "title": "Update friend details", + "description": "Update friend remarks, pinned state, or extension values.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9815,7 +9815,7 @@ "relativePath": "sdk/uniapp/user/friends/delete-friend", "sourcePath": "/sdk/uniapp/user/friends/delete-friend", "title": "Delete a friend", - "description": "OpenIM uni-app / uni-app x SDK guide for Delete a friend.", + "description": "Remove a friendship with a selected user.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9832,8 +9832,8 @@ "path": "/sdk/uniapp/user/friend-applications/add-friend", "relativePath": "sdk/uniapp/user/friend-applications/add-friend", "sourcePath": "/sdk/uniapp/user/friend-applications/add-friend", - "title": "Send a friend application", - "description": "OpenIM uni-app / uni-app x SDK guide for Send a friend application.", + "title": "Send a friend request", + "description": "Send a friend request to another user.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9850,8 +9850,8 @@ "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", - "title": "Get received friend applications", - "description": "OpenIM uni-app / uni-app x SDK guide for Get received friend applications.", + "title": "List received friend requests", + "description": "Read received requests and process add, accept, reject, and delete events.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9868,8 +9868,8 @@ "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", - "title": "Get sent friend applications", - "description": "OpenIM uni-app / uni-app x SDK guide for Get sent friend applications.", + "title": "List sent friend requests", + "description": "Read friend requests sent by the current account.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9886,8 +9886,8 @@ "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", "relativePath": "sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", - "title": "Get pending application count", - "description": "OpenIM uni-app / uni-app x SDK guide for Get pending application count.", + "title": "Get unhandled friend-request count", + "description": "Read the unhandled count displayed on the friend-request entry.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9904,8 +9904,8 @@ "path": "/sdk/uniapp/user/friend-applications/accept-friend-application", "relativePath": "sdk/uniapp/user/friend-applications/accept-friend-application", "sourcePath": "/sdk/uniapp/user/friend-applications/accept-friend-application", - "title": "Accept a friend application", - "description": "OpenIM uni-app / uni-app x SDK guide for Accept a friend application.", + "title": "Accept a friend request", + "description": "Accept a friend request from a selected user.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9922,8 +9922,8 @@ "path": "/sdk/uniapp/user/friend-applications/refuse-friend-application", "relativePath": "sdk/uniapp/user/friend-applications/refuse-friend-application", "sourcePath": "/sdk/uniapp/user/friend-applications/refuse-friend-application", - "title": "Reject a friend application", - "description": "OpenIM uni-app / uni-app x SDK guide for Reject a friend application.", + "title": "Reject a friend request", + "description": "Reject a friend request from a selected user.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9940,8 +9940,8 @@ "path": "/sdk/uniapp/user/friend-applications/delete-friend-requests", "relativePath": "sdk/uniapp/user/friend-applications/delete-friend-requests", "sourcePath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", - "title": "Delete friend applications", - "description": "OpenIM uni-app / uni-app x SDK guide for Delete friend applications.", + "title": "Delete friend-request records", + "description": "Commercially delete selected friend-request records in a batch.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9959,7 +9959,7 @@ "relativePath": "sdk/uniapp/user/blacklist/get-black-list", "sourcePath": "/sdk/uniapp/user/blacklist/get-black-list", "title": "Get the blacklist", - "description": "OpenIM uni-app / uni-app x SDK guide for Get the blacklist.", + "description": "Load the blacklist and process add and remove events.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9977,7 +9977,7 @@ "relativePath": "sdk/uniapp/user/blacklist/add-black", "sourcePath": "/sdk/uniapp/user/blacklist/add-black", "title": "Add a user to the blacklist", - "description": "OpenIM uni-app / uni-app x SDK guide for Add a user to the blacklist.", + "description": "Add a selected user to the current account blacklist.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -9995,7 +9995,7 @@ "relativePath": "sdk/uniapp/user/blacklist/remove-black", "sourcePath": "/sdk/uniapp/user/blacklist/remove-black", "title": "Remove a user from the blacklist", - "description": "OpenIM uni-app / uni-app x SDK guide for Remove a user from the blacklist.", + "description": "Remove the selected blacklist relationship.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -11280,7 +11280,7 @@ "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2829, "contentFile": "content/docs/chat/sdk/uniapp/group/check-full-sync-state.mdx", "navOrder": 486 @@ -11874,7 +11874,7 @@ "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2862, "contentFile": "content/docs/chat/sdk/uniapp/message/composing-messages/translate-text-and-messages.mdx", "navOrder": 519 @@ -12396,7 +12396,7 @@ "contextKey": "chat/sdk/uniapp", "contextTitle": "SDKs · uni-app / uni-app x · v4", "template": "guide", - "status": "draft", + "status": "published", "sourceIndex": 2891, "contentFile": "content/docs/chat/sdk/uniapp/events/handle-data-migration-events.mdx", "navOrder": 548 diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 7a8bb02473..ebc63b9dc1 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4185,11 +4185,1339 @@ }, { "path": "/sdk/uniapp/overview", - "title": "OpenIM SDK for uni-app", - "description": "OpenIM uni-app SDK entry point for App, H5, and supported mini-app targets.", - "context": "SDKs · uni-app · v4", + "title": "OpenIM uni-app / uni-app x SDK 概览", + "description": "在 uni-app 与 uni-app x 的 Android、iOS 和商业版 HarmonyOS App 中接入 unix-openim-sdk。", + "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp overview", - "content": "Overview Use the uni app SDK when the same OpenIM integration needs to cover App, H5, and supported mini app targets from a uni app codebase. The integration should keep authentication, user identity, message creation, conversation state, and event handling aligned with the rest of the OpenIM SDK family. Platform scope App and H5 builds should use the SDK package and runtime adapter recommended by the OpenIM release you deploy. Mini app targets need additional validation for storage, network, file upload, and websocket behavior. Tokens should still be issued by a trusted backend. Do not generate or hard code user tokens in the client bundle. Core integration path 1. Install the SDK package that matches your OpenIM Server version. 2. Initialize the client with apiAddr , wsAddr , the current userID , and a backend issued token. 3. Register connection and message events before calling login . 4. Send the first text message, then validate message receipt in another signed in client. 5. Add platform specific handling for file messages, push notifications, and background lifecycle. Related SDKs WASM SDK /sdk/wasm/overview for browser and WebAssembly oriented API examples. Flutter SDK /sdk/flutter/overview when mobile and desktop should be handled through Flutter. React Native SDK /sdk/react native/overview when the app is built with React Native." + "content": "OpenIM unix openim sdk 是 UTS 原生插件,为 uni app 和 uni app x 的 App 端提供用户、好友、会话、群组、消息、事件与本地数据库能力。插件在宿主进程中持有唯一的 OpenIM Core;业务代码直接从 @/uni modules/unix openim sdk 导入函数,不创建 SDK 实例。 支持范围 | 宿主 | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 | | uni app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 | | Web / 小程序 | 不支持 | 不支持 | 不支持 | 接入和本地编译使用 HBuilderX/uni app 5.23 系列。Android、iOS 需要包含插件原生依赖的自定义基座或本地原生工程,标准基座不能加载这些原生制品。 公共版与商业版 同一套文档覆盖公共能力和商业版扩展。标有“商业版”的 API、事件或字段需要商业版 unix openim sdk 与匹配的 OpenIMServer;没有徽标的能力属于公共接口。商业版归属与平台支持是两个维度:公共 API 也可能在某个平台返回 platform unsupported ,页面会单独列出。 商业版增加信令、SDK session 快照、翻译和部分消息/会话扩展。 onSDKSessionChanged 是插件层根据初始化、登录、退出、Token 与账号变化合成的事件,不是 OpenIM Core 原生事件。 接入顺序 1. 安装 unix openim sdk ,为目标平台准备自定义基座或本地原生工程。 2. 调用 initSDK ,配置 apiAddr 、 wsAddr 、平台、日志和 systemType 。 3. 保存连接、消息和业务事件返回的订阅句柄。 4. 从可信后端取得当前用户的 userID 与 Token,再调用 login userID, token 。 5. 等待 onConnectSuccess 后查询快照数据,并用事件增量更新应用状态。 6. 用户退出时先 logout ,再通过 off subscription 清理监听;只有不再使用 SDK 时才调用 unInitSDK 。 调用模型 Promise 成功直接返回业务值,不使用 Web SDK 的 data 包装。事件注册同步返回 OpenIMSDKEventSubscription ,取消时必须传回同一句柄: import off, onRecvNewMessage, from '@/uni modules/unix openim sdk' const messageSubscription = onRecvNewMessage message = console.log message.clientMsgID // 页面或账号作用域结束时清理。 off messageSubscription 不要使用 offAll 代替正常的局部清理。它会移除当前插件实例中的全部监听,只适合应用整体销毁或可控的测试重置。 安全边界 Token 必须由可信后端签发,不要把管理员 Token、secret 或固定用户 Token 写入 App。 apiAddr 与 wsAddr 必须从设备真实可访问;真机不能把 localhost 当作开发机。 SDK 的数据库目录和文件由插件管理,不要直接修改内部数据库。 日志和错误上报应脱敏,避免记录 Token、完整消息内容与商业业务凭据。 AV Runtime 是独立 UTS 插件;它复用本插件的唯一登录态,但不属于本 SDK 的公共 IM API。 下一步 开始之前 /sdk/uniapp/getting started/before you start 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 发送第一条消息 /sdk/uniapp/getting started/send first message 事件概览 /sdk/uniapp/events/overview events" + }, + { + "path": "/sdk/uniapp/getting-started/before-you-start", + "title": "开始之前", + "description": "准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started before-you-start", + "content": "接入前先确定目标是 uni app 还是 uni app x App,并准备与 unix openim sdk 0.2.0 rc.3 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。 准备服务与账号 客户端初始化需要以下信息: | 数据 | 来源 | 要求 | | | | | | apiAddr | OpenIMServer HTTP API | 设备可访问的完整地址 | | wsAddr | OpenIMServer WebSocket | 设备可建立长连接的完整地址 | | userID | 业务后端的账号映射 | 与 Token 对应且在服务端存在 | | Token | 可信业务后端 | 只授予当前用户,不在客户端生成 | 业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。 真机测试时, apiAddr 和 wsAddr 不能使用开发机的 localhost 。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。 准备插件与构建环境 把插件安装在项目的 uni modules/unix openim sdk 。使用 HBuilderX/uni app 5.23 系列,并按目标平台准备: Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。 iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。 HarmonyOS:仅 uni app x 商业版,API 24;使用与插件合同一致的 HAR。 标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。 选择平台标识 初始化使用插件导出的常量,不直接写数字:Android 使用 OpenIMPlatformAndroid ,iPhone 使用 OpenIMPlatformIOS ,HarmonyOS 使用 OpenIMPlatformHarmony 。 systemType 是当前系统说明字符串,例如 android 、 ios 或 harmony ,不可省略。 发布前检查 在真实目标设备上完成初始化、登录、普通消息收发与退出。 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。 Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。 准备完成后,先阅读 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk ,再进入 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。" + }, + { + "path": "/sdk/uniapp/getting-started/environment-specific-implementation", + "title": "按宿主和平台接入", + "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started environment-specific-implementation", + "content": "unix openim sdk 的业务函数在 uni app 与 uni app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。 支持矩阵 | 宿主 | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 | | uni app x | API 21+ | iOS 14+ | 商业版 API 24 | | H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 | uni app 传统 uni app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。 import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus // 应用 service 销毁时执行。 off connectSubscription uni app x uni app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。 import getLoginStatus, type OpenIMLoginStatus, from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus 解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 UTSJSONObject 强制转换成业务 DTO。 Android 与 iOS Android 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。 文件消息使用本机可读的完整路径。 unifile:// 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。 HarmonyOS HarmonyOS 仅声明 uni app x 商业版支持。当前以下操作会稳定返回 platform unsupported : updateFcmToken 、 updateToken 、 translateText 、 translateMessage 。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见 事件概览 /sdk/uniapp/events/overview events 。 平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。 生命周期归属 SDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 unInitSDK 。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。" + }, + { + "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "title": "认证与管理登录会话", + "description": "登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started authenticate-and-manage-session", + "content": "完成 initSDK 后,先注册连接与账号事件,再调用 login userID, token 。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 onConnectSuccess 。 注册登录事件 每次 on... 调用都返回独立的 OpenIMSDKEventSubscription 。保存全部句柄,并在账号或应用作用域结束时逐个释放。 import off, onConnectFailed, onConnectSuccess, onConnecting, onKickedOffline, onUserTokenExpired, onUserTokenInvalid, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const subscriptions : Array = connectSubscription, onConnecting = console.log 'OpenIM connecting' , onConnectFailed error = console.error error.errCode, error.errMsg , onKickedOffline = clearCurrentAccount , onUserTokenExpired = requestFreshToken , onUserTokenInvalid error = console.error error.errCode, error.errMsg , function releaseSessionSubscriptions subscriptions.forEach subscription = off subscription subscriptions.length = 0 onKickedOffline 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 logout 。 登录 import login from '@/uni modules/unix openim sdk' await login userID, token login 的真实签名是 login userID, token ,不是对象参数。Token 必须来自可信后端,并且与 userID 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。 查询当前状态 import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID, from '@/uni modules/unix openim sdk' const status = await getLoginStatus if status == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreAccountState currentUserID getLoginStatus 返回 OpenIMLoginStatusLogout 、 OpenIMLoginStatusLogging 或 OpenIMLoginStatusLogged 。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。 上报前后台与网络变化 import networkStatusChanged, setAppBackgroundStatus, from '@/uni modules/unix openim sdk' await setAppBackgroundStatus true // 进入后台 await setAppBackgroundStatus false // 回到前台 await networkStatusChanged // 网络恢复或网络类型变化 把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。 主动退出与切换账号 import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount 切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。 商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见 更新 Token 与观察 SDK session /sdk/uniapp/getting started/update token and observe sdk session 。" + }, + { + "path": "/sdk/uniapp/getting-started/send-first-message", + "title": "发送第一条消息", + "description": "在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started send-first-message", + "content": "本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。 1. 初始化并登录 先按 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 初始化,再从可信后端取得 userID 和 Token。登录前注册连接事件,连接成功后才允许发送。 import off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = markOpenIMReady // 应用作用域结束时释放。 off connectSubscription 完整登录和事件清理见 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。 2. 准备目标 | 场景 | recvID | groupID | | | | | | 单聊 | 已存在的接收用户 ID | 空字符串 | | 群聊 | 空字符串 | 当前用户已加入的群 ID | 目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。 3. 创建并发送文本消息 import createTextMessage, sendMessage, from '@/uni modules/unix openim sdk' const message = await createTextMessage '你好,OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage = await sendMessage message, recvID: 'user b', groupID: '', appendOutgoingMessage sentMessage createTextMessage 只创建本地消息对象,不会发送。 sendMessage 成功后直接返回最终 OpenIMMessageItem ,不需要读取 data 。发送端按 clientMsgID 合并返回值;接收端通过新消息事件按同一标识去重。 群聊只需把 recvID 改为空字符串,并填入 groupID : const sentGroupMessage = await sendMessage message, recvID: '', groupID: 'group 123', 4. 双端验证 用两个不同账号和两个独立客户端验证: 1. A 端发送后获得非空 clientMsgID ,消息状态进入发送成功。 2. B 端收到新消息事件,并能解析到相同业务内容。 3. A、B 重新进入会话后,都能从历史消息中读取该消息。 4. 退出 SDK 后普通事件不再写入旧账号状态。 下一步阅读 发送消息 /sdk/uniapp/message/sending messages/send message 、 接收消息 /sdk/uniapp/message/receiving messages/receive messages 和 加载历史消息 /sdk/uniapp/message/retrieving messages/load older messages 。" + }, + { + "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "title": "安装、初始化与 SDK 信息", + "description": "安装 UTS 插件,初始化唯一 OpenIM Core,并查询 SDK 版本和数据目录。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started install-initialize-and-inspect-sdk", + "content": "项目安装 uni modules/unix openim sdk 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。 初始化 import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' iOS 改用 OpenIMPlatformIOS 和 systemType: 'ios' ;HarmonyOS 改用 OpenIMPlatformHarmony 和 systemType: 'harmony' 。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 logFilePath 。 OpenIMInitConfig | 字段 | 类型 | 说明 | | | | | | platformID | OpenIMPlatform | 使用插件导出的平台常量。 | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string \\| null (可选) | Core 数据目录;通常让插件使用平台默认值。 | | logFilePath | string \\| null (可选) | 日志目录或文件路径,按平台产物约定配置。 | | logLevel | OpenIMLogLevel | 使用 OpenIMLogLevelError 、 OpenIMLogLevelInfo 等常量。 | | isLogStandardOutput | boolean | 是否把 SDK 日志输出到系统控制台。 | | systemType | string | 必填的系统说明,初始化示例不得省略。 | 同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。 查询版本与数据路径 getSdkVersion 和 getOpenIMDataPath 是同步本地操作: import getOpenIMDataPath, getSdkVersion, from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath 数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。 反初始化 import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK 返回 void 。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。 初始化完成后,进入 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。" + }, + { + "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "title": "处理 App 生命周期、角标与推送 Token", + "description": "把 App 前后台、网络、角标和 FCM Token 接入 OpenIM SDK。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started handle-app-lifecycle-and-device-state", + "content": "生命周期上报应由应用级 service 统一负责,而不是每个聊天页面分别调用。前后台和网络变化使用认证页说明的 setAppBackgroundStatus 与 networkStatusChanged ;本页说明应用角标和 FCM Token。 设置应用未读角标 import setAppBadge from '@/uni modules/unix openim sdk' await setAppBadge totalUnreadCount setAppBadge 把当前应用总未读数同步给 SDK/平台侧。业务仍应订阅总未读事件维护自己的 UI;Promise 成功不代表桌面角标在所有系统设置下都可见。传 0 清除角标。 更新 FCM Token import updateFcmToken from '@/uni modules/unix openim sdk' await updateFcmToken fcmToken: deviceFcmToken, expireTime: tokenExpireUnixSeconds, | 字段 | 类型 | 说明 | | | | | | fcmToken | string | 推送服务为当前设备签发的 Token。 | | expireTime | number | Token 到期 Unix 时间;按服务端协议使用秒级时间。 | 只在取得或刷新有效设备 Token 后调用。不要把 FCM Token 写入公开日志,也不要用 IM Token 代替设备推送 Token。 HarmonyOS 当前不实现 updateFcmToken ,调用会返回 platform unsupported 。这属于平台能力缺失,不是商业版鉴权问题;Harmony 推送应由业务使用其平台方案接入。 推荐时序 1. App 启动并初始化 SDK。 2. 注册账号与消息事件,登录当前用户。 3. 推送服务返回设备 Token 后调用 updateFcmToken 。 4. 总未读事件到达时更新应用状态并调用 setAppBadge 。 5. App 前后台、网络变化时调用对应生命周期 API。 6. 退出账号时清空业务角标与推送关联,再清理账号作用域监听。 推送到达只表示系统通知链路工作;消息列表仍应通过 SDK 新消息事件和历史查询恢复,不能只依赖通知 payload。" + }, + { + "path": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "title": "更新 Token 与观察 SDK session", + "description": "商业版更新登录 Token,并通过合成 session 快照防止账号与异步请求串线。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started update-token-and-observe-sdk-session", + "content": "本页能力属于 商业版 。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。 onSDKSessionChanged 是 unix openim sdk 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。 读取 session 快照 import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot, from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | 字段 | 类型 | 说明 | | | | | | loginStatus | OpenIMLoginStatus | 当前登录状态。 | | userID | string \\| null | 当前 SDK 用户;未登录时为 null 。 | | sdkSessionEpoch | number | session 世代。生命周期或账号成功变化后递增。 | | sdkVersion | string | 当前插件所连接 Core 的版本。 | 快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 userID 与 sdkSessionEpoch ,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。 订阅 session 变化 import off, onSDKSessionChanged, from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged snapshot = cancelRequestsFromOlderEpoch snapshot.sdkSessionEpoch replaceActiveSdkUser snapshot.userID // 应用或依赖插件销毁时执行。 off sessionSubscription 初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。 热更新 Token import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Token 由可信后端签发。 updateToken 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 platform unsupported ,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。 与其他插件协作 AV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 logout 或 unInitSDK 。用户切换时先销毁依赖插件,再退出并登录新账号。" + }, + { + "path": "/sdk/uniapp/user/overview-user", + "title": "用户概览", + "description": "理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user overview-user", + "content": "用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。 userID 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。 核心模型 OpenIMUserInfo 的公共字段包括 userID 、 nickname 、 faceURL 、 ex 和可选 createTime 。 attachedInfo 与 globalRecvMsgOpt 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。 好友数据使用 OpenIMFriendUserItem ,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 OpenIMBlackUserItem 。好友申请使用 OpenIMFriendApplicationItem ,申请状态由接受、拒绝和删除事件增量更新。 快照与事件 页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 userID 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。 当前资料: 查询自己的资料 /sdk/uniapp/user/profile/get self user info 与 修改自己的资料 /sdk/uniapp/user/profile/set self info 在线状态: 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 好友: 分页查询好友 /sdk/uniapp/user/friends/get friend list page 好友申请: 查询收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 黑名单: 查询黑名单 /sdk/uniapp/user/blacklist/get black list 业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。" + }, + { + "path": "/sdk/uniapp/user/profile/get-users-info", + "title": "批量查询用户资料", + "description": "按 userID 列表查询用户公开资料。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", + "content": "使用 getUsersInfo 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 OpenIMUserListResult | null 。 import getUsersInfo from '@/uni modules/unix openim sdk' const result = await getUsersInfo 'user a', 'user b' const users = result?.users ?? users.forEach user = cacheUser user.userID, user 返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 OpenIMUserInfo 字段见 用户概览 /sdk/uniapp/user/overview user 。其中 attachedInfo 与 globalRecvMsgOpt 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 ex 或 attachedInfo 当作可信身份凭据。 大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。" + }, + { + "path": "/sdk/uniapp/user/profile/get-self-user-info", + "title": "查询自己的资料", + "description": "读取当前已登录用户的 OpenIM 资料。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", + "content": "getSelfUserInfo 查询当前 SDK 登录账号的资料,返回 OpenIMUserInfo | null 。调用前应确认 SDK 已登录且连接可用。 import getSelfUserInfo from '@/uni modules/unix openim sdk' const self = await getSelfUserInfo if self = null renderProfile self.nickname, self.faceURL 以返回的 userID 校验应用账号与 SDK 账号是否一致。 nickname 、 faceURL 和 ex 属于公共字段; attachedInfo 与 globalRecvMsgOpt 商业版 为可选扩展,不应在公共环境中强制解包。 资料变化由 修改自己的资料 /sdk/uniapp/user/profile/set self info 页面归属的 onSelfInfoUpdated 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。" + }, + { + "path": "/sdk/uniapp/user/profile/set-self-info", + "title": "修改自己的资料", + "description": "更新当前用户资料并处理 onSelfInfoUpdated 事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", + "content": "setSelfInfo 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。 import off, onSelfInfoUpdated, setSelfInfo, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', off selfInfoSubscription OpenIMSetSelfInfoParams 支持 nickname 、 faceURL 、 ex ,以及商业版使用的 globalRecvMsgOpt 。Promise 成功表示服务端接受修改;界面最终状态以 onSelfInfoUpdated 或重新查询的资料为准。 事件返回完整 OpenIMUserInfo 。按 userID 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。" + }, + { + "path": "/sdk/uniapp/user/profile/set-global-message-reception", + "title": "设置全局消息接收选项", + "description": "通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", + "content": "globalRecvMsgOpt 商业版 是 OpenIMSetSelfInfoParams 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 recvMsgOpt 不同:前者影响账号全局,后者只影响指定会话。 import setSelfInfo from '@/uni modules/unix openim sdk' // 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。 await setSelfInfo globalRecvMsgOpt: 0 只传 globalRecvMsgOpt ,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用 查询自己的资料 /sdk/uniapp/user/profile/get self user info 确认最终值;当前插件没有为这一字段单独提供 setter。 公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。" + }, + { + "path": "/sdk/uniapp/user/profile/set-friend-add-permission", + "title": "设置加好友权限", + "description": "说明商业版加好友权限字段与当前 unix-openim-sdk 的写入边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-friend-add-permission", + "content": "加好友权限属于 商业版 账号策略。锁定的 unix openim sdk 0.2.0 rc.3 会在用户模型中公开相关商业字段,但当前 OpenIMSetSelfInfoParams 没有独立的 addFriendPermission 写入参数。 因此本版本不能通过本插件伪造一个 setter,也不要把该值塞进 ex 。需要修改时,应由商业版业务后端或已确认支持该字段的管理接口完成;客户端随后重新查询当前资料并刷新 UI。 页面展示该开关前应进行能力判断。公共版、旧服务端或没有返回该字段时,把状态显示为“不可配置”,不要默认成“允许任何人添加”或“需要验证”。 好友申请的客户端流程见 发起好友申请 /sdk/uniapp/user/friend applications/add friend 与 处理收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。" + }, + { + "path": "/sdk/uniapp/user/online-status/subscribe-users-status", + "title": "订阅用户在线状态", + "description": "订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status subscribe-users-status", + "content": "subscribeUsersStatus 为指定用户建立状态订阅; getUserStatus 可立即查询这些用户的当前状态。 onUserStatusChanged 是本页的完整事件归属。 import getUserStatus, off, onUserStatusChanged, subscribeUsersStatus, from '@/uni modules/unix openim sdk' const statusSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status const userIDs = 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status off statusSubscription 先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 userID 和平台更新,不把一次离线事件等同于用户所有设备都离线。 只订阅当前界面或业务确实需要的用户,并在不再需要时调用 取消用户在线状态订阅 /sdk/uniapp/user/online status/unsubscribe users status 。" + }, + { + "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "title": "查询已订阅用户状态", + "description": "读取当前账号已经订阅的用户在线状态快照。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status get-subscribe-users-status", + "content": "getSubscribeUsersStatus 返回当前账号已订阅用户的状态快照,不接收用户 ID 参数。 import getSubscribeUsersStatus from '@/uni modules/unix openim sdk' const result = await getSubscribeUsersStatus const statuses = result?.statuses ?? statuses.forEach status = replaceUserStatus status.userID, status 空结果可能表示尚未订阅、订阅用户当前没有可用状态,或服务端返回空列表。不要只用数组长度判断连接是否正常。 持续变化仍由 onUserStatusChanged 提供,完整订阅和清理见 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 。本方法适合 App 恢复前台或状态 store 重建时重新获取快照。" + }, + { + "path": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "title": "取消用户在线状态订阅", + "description": "停止接收指定用户的在线状态变化。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status unsubscribe-users-status", + "content": "页面或业务不再关注一组用户时,调用 unsubscribeUsersStatus 释放服务端状态订阅。 import unsubscribeUsersStatus from '@/uni modules/unix openim sdk' await unsubscribeUsersStatus 'user a', 'user b' 该调用只取消传入用户,不会清空其他订阅,也不会自动释放本地 onUserStatusChanged 事件句柄。页面应同时维护两层生命周期: 1. 用本 API取消不再需要的用户状态订阅。 2. 在事件 owner 作用域结束时,通过 off subscription 清理本地事件处理器。 重复取消应按幂等业务处理;失败时保留本地订阅记录并根据网络状态决定是否重试,不要高频循环调用。" + }, + { + "path": "/sdk/uniapp/user/friends/get-friend-list-page", + "title": "查询好友列表", + "description": "分页或一次性查询好友,并处理好友新增、删除与资料变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends get-friend-list-page", + "content": "getFriendListPage 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 getFriendList 。本页同时归属好友新增、删除和资料变化事件。 import getFriendListPage, off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const friendAddedSubscription = onFriendAdded friend = upsertFriend friend.userID, friend const subscriptions : Array = friendAddedSubscription, onFriendDeleted friend = removeFriend friend.userID , onFriendInfoChanged friend = upsertFriend friend.userID, friend , const page = await getFriendListPage offset: 0, count: 100 replaceFriendSnapshot page?.friends ?? subscriptions.forEach subscription = off subscription offset 从 0 开始, count 是本页期望数量。继续分页直到返回数量小于 count ,并按 userID 去重。 getFriendList filterBlack 的 filterBlack 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。 事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。" + }, + { + "path": "/sdk/uniapp/user/friends/search-friends", + "title": "搜索好友", + "description": "按用户 ID、昵称或备注搜索当前好友。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends search-friends", + "content": "searchFriends 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。 import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? keywordList 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 OpenIMFriendListResult ,按 userID 去重并结合最新好友事件更新。 搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用 查询指定好友资料 /sdk/uniapp/user/friends/get specified friends info 。" + }, + { + "path": "/sdk/uniapp/user/friends/get-specified-friends-info", + "title": "查询指定好友资料", + "description": "按 userID 列表读取指定好友关系资料。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends get-specified-friends-info", + "content": "getSpecifiedFriendsInfo 接收用户 ID 列表,并可选择过滤黑名单用户。 import getSpecifiedFriendsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: false, const friends = result?.friends ?? 返回列表可能少于输入列表,且不保证顺序。按 userID 建立映射;未返回用户可能不是好友、被过滤或当前不可查询。 filterBlack: true 只影响结果过滤,不会移除黑名单关系。需要判断双方关系时使用 检查好友关系 /sdk/uniapp/user/friends/check friend ,需要公共用户资料时使用 批量查询用户资料 /sdk/uniapp/user/profile/get users info 。" + }, + { + "path": "/sdk/uniapp/user/friends/check-friend", + "title": "检查好友关系", + "description": "批量检查当前账号与指定用户的好友关系。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends check-friend", + "content": "checkFriend 批量检查当前账号与用户列表之间的关系,返回 OpenIMCheckFriendResult | null 。 import checkFriend from '@/uni modules/unix openim sdk' const result = await checkFriend 'user a', 'user b' const relations = result?.result ?? relations.forEach relation = cacheFriendRelation relation.userID, relation.result 关系结果应按 userID 读取,不依赖数组顺序。具体数值含义使用插件导出的好友关系常量,不在业务代码中散落裸数字。 本方法是查询,不会创建好友关系。不是好友时,使用 发起好友申请 /sdk/uniapp/user/friend applications/add friend ;已有好友的资料和变化通过 查询好友列表 /sdk/uniapp/user/friends/get friend list page 维护。" + }, + { + "path": "/sdk/uniapp/user/friends/update-friends", + "title": "更新好友资料", + "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends update-friends", + "content": "updateFriends 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: '项目成员', isPinned: true, friendUserIDs 不能为空。 remark 、 isPinned 和 ex 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 onFriendInfoChanged 或重新查询好友列表确认。 商业版还提供 updateFriend 商业版 ,参数为单个 userID ,字段名使用 pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: '负责人' 不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。" + }, + { + "path": "/sdk/uniapp/user/friends/delete-friend", + "title": "删除好友", + "description": "解除与指定用户的好友关系。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends delete-friend", + "content": "deleteFriend 解除当前账号与指定用户的好友关系。 import deleteFriend from '@/uni modules/unix openim sdk' await deleteFriend 'user a' Promise 成功表示请求完成。好友列表应以 onFriendDeleted 事件或重新查询结果为准;完整监听见 查询好友列表 /sdk/uniapp/user/friends/get friend list page 。 删除好友不会自动删除会话、历史消息或加入黑名单。产品如需这些行为,应分别调用对应 API,并明确失败补偿顺序。删除前应由 UI 二次确认,避免误操作。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/add-friend", + "title": "发起好友申请", + "description": "向指定用户发送好友申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications add-friend", + "content": "使用 addFriend 向目标用户发起申请。目标用户、验证文案和可选扩展数据通过 OpenIMAddFriendParams 传入。 import addFriend from '@/uni modules/unix openim sdk' await addFriend toUserID: 'user b', reqMsg: '你好,我是 Alice', ex: '', reqMsg 会展示给接收方,不应包含 Token、内部权限信息或其他敏感数据。 ex 只存放双方约定且可安全公开给申请接收者的扩展字符串。 Promise 成功不等于已经成为好友;接收方仍可能接受或拒绝。申请方可通过 查询发出的好友申请 /sdk/uniapp/user/friend applications/get friend application list as applicant 刷新状态。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "title": "查询收到的好友申请", + "description": "分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-recipient", + "content": "getFriendApplicationListAsRecipient 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。 import getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onFriendApplicationAdded item = upsertApplication item const subscriptions : Array = addedSubscription, onFriendApplicationAccepted item = upsertApplication item , onFriendApplicationRejected item = upsertApplication item , onFriendApplicationDeleted item = removeApplication item , const page = await getFriendApplicationListAsRecipient offset: 0, count: 50 replaceReceivedApplications page?.applications ?? subscriptions.forEach subscription = off subscription 参数可省略;显式分页时 offset 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "title": "查询发出的好友申请", + "description": "分页读取当前账号发出的好友申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-applicant", + "content": "getFriendApplicationListAsApplicant 查询当前账号发出的申请,返回 OpenIMFriendApplicationListResult | null 。 import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? 参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。 申请状态变化事件统一在 查询收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "title": "查询未处理好友申请数", + "description": "查询好友申请入口的未处理数量。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-unhandled-count", + "content": "getFriendApplicationUnhandledCount 返回未处理好友申请数量,结果可能为 null 。 import getFriendApplicationUnhandledCount from '@/uni modules/unix openim sdk' const count = await getFriendApplicationUnhandledCount offset: 0, count: 100 renderApplicationBadge count ?? 0 分页参数用于限制本次统计查询范围,实际产品应使用与服务端约定一致的 count 。不要把 null 永久缓存成 0;它也可能表示当前没有有效结果。 申请新增、接受、拒绝或删除时重新查询数量,避免在多个设备和断线恢复场景下只做本地 +1/ 1 而漂移。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "title": "接受好友申请", + "description": "接受指定用户发来的好友申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications accept-friend-application", + "content": "acceptFriendApplication 接受目标用户的申请,并可附带处理说明。 import acceptFriendApplication from '@/uni modules/unix openim sdk' await acceptFriendApplication toUserID: 'user b', handleMsg: '已通过', 这里的 toUserID 是申请对方的用户 ID。Promise 成功后,申请状态和好友列表分别由申请事件、好友新增事件或重新查询确认;不要只在一个列表中更新。 重复处理可能由服务端返回状态错误,UI 应在请求期间禁用重复操作,并在失败后重新查询申请详情。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "title": "拒绝好友申请", + "description": "拒绝指定用户发来的好友申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications refuse-friend-application", + "content": "refuseFriendApplication 拒绝目标用户的申请。 import refuseFriendApplication from '@/uni modules/unix openim sdk' await refuseFriendApplication toUserID: 'user b', handleMsg: '暂不添加', 处理说明可能对申请方可见,不应包含内部风控原因或敏感信息。Promise 成功后,以 onFriendApplicationRejected 或重新查询结果更新状态。 接受与拒绝互斥。请求开始后锁定该申请项,避免用户快速点击造成并行请求。" + }, + { + "path": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "title": "删除好友申请记录", + "description": "商业版批量删除指定好友申请记录。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications delete-friend-requests", + "content": "deleteFriendRequests 商业版 批量删除明确指定的好友申请记录。 import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , , friendRequests 中每项使用 OpenIMSimpleFriendRequest 的 fromUserID 与 toUserID 精确定位。删除申请记录不会自动解除已经建立的好友关系。 Promise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。" + }, + { + "path": "/sdk/uniapp/user/blacklist/get-black-list", + "title": "查询黑名单", + "description": "查询黑名单快照,并处理加入与移除黑名单事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist get-black-list", + "content": "公共入口 getBlackList 返回 OpenIMBlackListResult | null 。本页同时归属 onBlackAdded 与 onBlackDeleted 。 import getBlackList, off, onBlackAdded, onBlackDeleted, from '@/uni modules/unix openim sdk' const blackAddedSubscription = onBlackAdded user = upsertBlackUser user const blackDeletedSubscription = onBlackDeleted user = removeBlackUser user.userID const result = await getBlackList replaceBlackList result?.blackUsers ?? off blackAddedSubscription off blackDeletedSubscription 商业版还提供 getBlacks 商业版 ,返回包装字段名为 blacks : import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlackList commercialResult?.blacks ?? 两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。" + }, + { + "path": "/sdk/uniapp/user/blacklist/add-black", + "title": "加入黑名单", + "description": "把指定用户加入当前账号的黑名单。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist add-black", + "content": "addBlack 把目标用户加入黑名单,可附带双方约定的扩展字符串。 import addBlack from '@/uni modules/unix openim sdk' await addBlack toUserID: 'user b', ex: '' Promise 成功后,以 onBlackAdded 或重新查询黑名单确认最终状态。不要在 ex 中写入 Token、内部封禁证据或仅管理员可见的数据。 加入黑名单不会自动删除本地历史消息。产品如需隐藏会话或解除好友,应作为独立操作并设计失败补偿。" + }, + { + "path": "/sdk/uniapp/user/blacklist/remove-black", + "title": "移出黑名单", + "description": "把指定用户从当前账号的黑名单移除。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist remove-black", + "content": "removeBlack 按用户 ID 移除黑名单关系。 import removeBlack from '@/uni modules/unix openim sdk' await removeBlack 'user b' Promise 成功后,以 onBlackDeleted 或重新查询结果更新 UI。移出黑名单不会自动恢复已删除的好友关系,也不会重新创建被隐藏或删除的会话。 重复移除可能返回关系状态错误。操作失败时刷新黑名单快照,不要无限重试。" + }, + { + "path": "/sdk/uniapp/conversation/overview-conversation", + "title": "会话概览", + "description": "理解会话快照、增量事件、未读数、草稿和会话分组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation overview-conversation", + "content": "会话是单聊、群聊或其他消息流的本地索引。 conversationID 是稳定主键;单聊同时有 userID ,群聊同时有 groupID 。界面标题、头像和最新消息都是可变快照,不能替代主键。 OpenIMConversationItem 包含 conversationType 、 showName 、 faceURL 、 unreadCount 、 latestMsg 、草稿、置顶、接收选项和消息序列边界。 latestMsg 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。 建议数据流 1. 注册 onNewConversation 与 onConversationChanged 。 2. 查询完整或分页会话快照。 3. 按 conversationID 幂等插入或替换事件项。 4. 按 isPinned 、时间和业务排序规则展示。 5. App 恢复或重新登录时重新查询,不仅依赖事件。 会话未读数和消息已读是相关但不同的状态。清零会话未读见 标记会话已读 /sdk/uniapp/conversation/managing conversations/mark conversation read ,总未读见 获取总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count 。 商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见 会话分组概览 /sdk/uniapp/conversation/managing conversation groups/overview conversation groups 。" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "title": "按目标查询会话", + "description": "按目标 ID 和会话类型查询一个会话。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-by-target", + "content": "getOneConversation 使用目标 ID 和 OpenIMSessionType 查询单个会话,返回 OpenIMConversationItem | null 。 import OpenIMSessionTypeSingle, getOneConversation, from '@/uni modules/unix openim sdk' const conversation = await getOneConversation sourceID: 'user b', sessionType: OpenIMSessionTypeSingle, 单聊的 sourceID 是对方 userID ,群聊是 groupID 。使用插件导出的会话类型常量,不直接写数字。 null 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。 返回值按 conversationID 合并到 store,不要用 sourceID 直接覆盖其他会话类型。" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "title": "生成会话 ID", + "description": "根据目标 ID 和会话类型取得规范 conversationID。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-id", + "content": "getConversationIDBySessionType 返回 Core 使用的规范 conversationID ,适合在尚未生成会话项时构造路由键。 import OpenIMSessionTypeGroup, getConversationIDBySessionType, from '@/uni modules/unix openim sdk' const conversationID = await getConversationIDBySessionType sourceID: 'group 123', sessionType: OpenIMSessionTypeGroup, 不要自行拼接单聊或群聊会话 ID;不同会话类型有各自规则。返回 ID 不代表会话已存在,也不创建服务器数据。需要会话内容时继续调用 按目标查询会话 /sdk/uniapp/conversation/retrieving conversations/get conversation by target 或列表查询。" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "title": "批量查询会话", + "description": "按 conversationID 列表批量读取会话快照。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversations-by-id", + "content": "getMultipleConversation 批量查询会话,返回 OpenIMConversationListResult | null 。 import getMultipleConversation from '@/uni modules/unix openim sdk' const result = await getMultipleConversation 'si user a user b', 'sg group 123' const conversations = result?.conversations ?? 结果不保证与输入顺序一致,也可能缺少本地不存在的会话。按 conversationID 建立映射。大量 ID 应分批查询,避免一次传入无界数组。 本方法只读取快照,不订阅变化。持续更新仍由 查询会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 归属的事件处理。" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "查询会话列表", + "description": "查询完整或分页会话快照,并处理新增与变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations retrieve-conversation-list", + "content": "getAllConversationList 返回完整本地会话快照;列表较大时使用 getConversationListSplit 分页。本页归属 onNewConversation 和 onConversationChanged 。 import getConversationListSplit, off, onConversationChanged, onNewConversation, from '@/uni modules/unix openim sdk' const newConversationSubscription = onNewConversation result = result.conversations.forEach item = upsertConversation item.conversationID, item const changedSubscription = onConversationChanged result = result.conversations.forEach item = upsertConversation item.conversationID, item const firstPage = await getConversationListSplit offset: 0, count: 100 replaceConversationSnapshot firstPage?.conversations ?? off newConversationSubscription off changedSubscription 分页时继续增加 offset ,直到返回数量少于 count 。查询与事件可能包含相同会话,必须按 conversationID 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。 不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。" + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "title": "搜索会话", + "description": "按关键词搜索本地会话。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations search-conversations", + "content": "searchConversation 使用字符串关键词搜索本地会话,返回 OpenIMConversationListResult | null 。 import searchConversation from '@/uni modules/unix openim sdk' const result = await searchConversation 'Alice' renderSearchResults result?.conversations ?? 调用前去除首尾空白,并在输入为空时由 UI 直接展示正常会话列表。搜索结果是查询时快照;会话变化后可重新搜索,或按 conversationID 合并最新事件项。 匹配范围由 Core 决定,不要承诺搜索所有消息正文。消息内容搜索使用消息领域的查询 API。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "title": "置顶或取消置顶会话", + "description": "通过 setConversation 修改会话置顶状态。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations pin-conversation", + "content": "setConversation 是会话字段的统一更新入口。置顶时只传 conversationID 和 isPinned 。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPinned: true // 取消置顶:isPinned: false Promise 成功后以 onConversationChanged 更新最终会话,不要直接假定本地排序已稳定。未提供的字段保持原值;不要为了置顶而复制并回写整条会话。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "title": "标记会话", + "description": "说明商业版标记会话能力在当前 UTS 合同中的边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation", + "content": "会话“标记”属于 商业版 能力,通常与会话分组中的标记组配合使用。锁定的 UTS 合同没有独立 markConversation 操作,也没有在 OpenIMSetConversationParams 中暴露 isMarked 。 因此客户端不能通过 ex 或其他字段伪造标记。需要修改时应使用商业版业务后端或已确认的上层服务;随后通过 查询会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 和 会话分组 /sdk/uniapp/conversation/managing conversation groups/overview conversation groups 刷新结果。 没有真实写入 API 时,UI 应隐藏或禁用入口,而不是只改本地状态。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "title": "设置会话备注", + "description": "说明商业版会话备注字段的读取与写入边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-remark", + "content": "会话备注属于 商业版 扩展。当前 OpenIMConversationItem 和 OpenIMSetConversationParams 没有独立 remark 字段,因此本版本插件不能安全写入该能力。 不要把备注编码进 ex 冒充标准字段。需要使用时,由商业版业务 API维护,并以业务侧返回作为权威;客户端可在会话 UI 中合并展示。 后续合同若正式增加字段,本页会随 interface/schema 哈希变化重新审核。在此之前,公共和商业客户端都不应调用不存在的 setter。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "title": "设置会话扩展字段", + "description": "通过 setConversation 更新会话 ex。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-extension", + "content": "通过 setConversation 的 ex 更新会话扩展字符串。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, ex: JSON.stringify color: 'blue' , ex 是整段替换,不是局部 merge。修改前先读取现值并按业务 schema 合并,避免覆盖其他模块字段。不要存 Token、密钥或仅服务端可见数据。 Promise 成功后以 onConversationChanged 或重新查询确认。解析旧版本或未知字段失败时保留原字符串并降级展示。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "title": "保存会话草稿", + "description": "保存或清空指定会话的本地草稿文本。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-draft", + "content": "setConversationDraft 保存会话草稿;传空字符串清除草稿。 import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText 草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。 会话项中的 draftText 和 draftTextTime 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "title": "设置会话消息接收选项", + "description": "通过 setConversation 修改单个会话的 recvMsgOpt。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-receive-option", + "content": "recvMsgOpt 控制单个会话的消息接收策略,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。 更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "title": "清除群聊提及状态", + "description": "通过 setConversation 清除群会话的 groupAtType。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-group-mentions", + "content": "群会话中的 @ 提及提示由 groupAtType 表示。处理完提及后,通过 setConversation 把它重置为无提及状态。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, groupAtType: 0 使用合同/服务端定义的“无提及”值。该调用只修改会话提示状态,不删除 @ 消息,也不清理未读数。需要标记已读时另调用 标记会话已读 /sdk/uniapp/conversation/managing conversations/mark conversation read 。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "title": "标记会话已读", + "description": "清理会话未读数,并处理单聊已读回执事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation-read", + "content": "markConversationMessageAsRead 把指定会话标为已读。本页同时归属单聊已读回执 onRecvC2CReadReceipt 。 import markConversationMessageAsRead, off, onRecvC2CReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt result = result.receipts.forEach receipt = mergeReadReceipt receipt await markConversationMessageAsRead conversationID off receiptSubscription 商业版还提供 resetConversationUnread 商业版 ,可把多个会话的未读数重置为指定值: import resetConversationUnread from '@/uni modules/unix openim sdk' await resetConversationUnread conversationIDs: conversationID , num: 0 本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "title": "标记全部会话已读", + "description": "清零当前账号的全部会话未读数。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-all-conversations-read", + "content": "markAllConversationMessageAsRead 标记当前账号的全部会话已读。 import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead 这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。 该调用不会删除消息,也不会修改单个会话的消息接收选项。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "title": "获取总未读数", + "description": "查询总未读快照,并订阅总未读变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations get-total-unread-count", + "content": "getTotalUnreadMsgCount 返回当前账号总未读快照; onTotalUnreadMessageCountChanged 持续推送新值。 import getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged, from '@/uni modules/unix openim sdk' const unreadSubscription = onTotalUnreadMessageCountChanged count = setTotalUnread count setTotalUnread await getTotalUnreadMsgCount ?? 0 off unreadSubscription 先订阅再查询,事件和快照都直接替换总数,不做本地 +1/ 1 。把结果用于 TabBar 与 应用角标 /sdk/uniapp/getting started/handle app lifecycle and device state 时,仍要考虑系统通知权限。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "title": "设置私聊模式", + "description": "商业版通过 setConversation 开启或关闭会话私聊模式。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-private-chat", + "content": "isPrivateChat 商业版 通过公共的 setConversation 字段写入。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPrivateChat: true 只传本次字段。私聊模式的消息展示、截屏或销毁规则由商业版服务端和客户端产品共同定义;仅设置布尔值不会自动实现所有 UI 安全策略。 最终状态以会话变化事件中的 isPrivateChat 为准。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "title": "设置阅后即焚时长", + "description": "商业版设置会话的 burnDuration。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-burn-duration", + "content": "burnDuration 商业版 表示阅后即焚时长,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。 关闭能力时使用产品约定的关闭值,并重新查询会话确认。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "title": "设置消息销毁", + "description": "说明商业版会话消息销毁字段的当前写入边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-destruct", + "content": "OpenIMConversationItem 包含 isMsgDestruct 与 msgDestructTime 商业版 状态,但当前 OpenIMSetConversationParams 没有这两个写入字段。 因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 ex 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。 客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "title": "隐藏会话", + "description": "从当前会话列表隐藏一个会话而不删除消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-a-conversation", + "content": "hideConversation 从会话列表隐藏指定会话。 import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID 隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 完成后通过会话事件或重新查询移除本地项,不只操作页面数组。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "title": "隐藏全部会话", + "description": "隐藏当前账号的全部会话但保留消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-all-conversations", + "content": "hideAllConversations 隐藏当前账号的全部会话。 import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations 这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "title": "删除会话", + "description": "删除会话索引并保留其消息数据。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation", + "content": "deleteConversation 删除指定会话项。 import deleteConversation from '@/uni modules/unix openim sdk' await deleteConversation conversationID 该入口与“删除会话并删除全部消息”不同。需要保留本地历史时使用本方法;收到新消息后会话可能再次出现。完成后重新查询或按事件更新会话 store。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "title": "删除会话及全部消息", + "description": "删除指定会话并清理其全部本地消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation-with-messages", + "content": "deleteConversationAndDeleteAllMsg 删除会话及其全部消息。 import deleteConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await deleteConversationAndDeleteAllMsg conversationID 这是不可轻易恢复的操作,调用前必须确认。它不同于隐藏会话,也不同于只清理消息但保留会话。执行期间停止该会话的分页请求,成功后清空对应消息 store 并刷新会话列表。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "title": "清空会话消息", + "description": "清理指定会话的全部消息并保留会话项。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-conversation-messages", + "content": "clearConversationAndDeleteAllMsg 清空指定会话的消息,但保留会话入口。 import clearConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await clearConversationAndDeleteAllMsg conversationID 调用前二次确认,并停止正在进行的历史分页。成功后清空消息 store,再重新查询会话,使用 Core 返回的最新消息、序列与未读状态。 如果连会话也要删除,使用 删除会话及全部消息 /sdk/uniapp/conversation/managing conversations/delete conversation with messages 。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "会话分组概览", + "description": "商业版会话分组模型、raw 事件解析和生命周期。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups overview-conversation-groups", + "content": "会话分组属于 商业版 ,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 OpenIMConversationGroupItem 的字段均可选。读取 conversationGroupID 后再作为主键; conversationIDs 可能为 null ,完整成员应以分页查询为准。 五个分组事件返回 opaque JSON 字符串,不是类型化对象: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription 校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "title": "创建会话分组", + "description": "商业版创建自定义会话分组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups create-conversation-group", + "content": "createConversationGroup 商业版 创建分组,并可把一个会话作为初始成员。 import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: '重要会话', order: 100, conversationGroupType: 0, conversationID: conversationID, ex: '', const group = result?.conversationGroup 分组类型使用插件导出的合同值。 conversationID 可省略; ex 是整段业务扩展。返回分组可能为 null ,最终列表以分组事件或重新查询为准。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "title": "查询会话分组", + "description": "商业版按分组查询类型读取会话分组快照。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-groups", + "content": "getConversationGroups 商业版 按 conversationGroupType 查询分组。 import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups conversationGroupType: 0 const groups = result?.conversationGroups ?? 按非空 conversationGroupID 去重并排序。分组项中的 conversationIDs 可能只是当前快照;需要成员和总数时使用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "查询分组及会话", + "description": "商业版分页读取一个会话分组及其成员会话。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "getConversationGroupInfoWithConversations 商业版 返回分组资料、会话总数和一页会话。 import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , pageNumber 从服务端约定的第一页开始,本合同示例使用 1; showNumber 是页大小。返回字段 ConversationTotal 首字母大写,应按真实字段名读取。会话按 conversationID 去重,分组为 null 时不要继续分页。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "title": "查询会话所属分组", + "description": "商业版按 conversationID 查询其所属会话分组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-by-conversation-id", + "content": "getConversationGroupByConversationID 商业版 返回指定会话所属的全部分组。 import getConversationGroupByConversationID from '@/uni modules/unix openim sdk' const result = await getConversationGroupByConversationID conversationID const groups = result?.conversationGroups ?? 一个会话可以属于多个分组,不能只读取第一项。按 conversationGroupID 去重;空数组表示当前没有所属分组,不是查询失败。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "title": "更新会话分组", + "description": "商业版更新分组名称、扩展字段或隐藏状态。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups update-conversation-group", + "content": "updateConversationGroup 商业版 只更新提供的字段。 import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: '重点跟进', hidden: false, name 、 ex 和 hidden 都可选。 ex 是整段替换,先合并已有业务字段。返回 conversationGroup 可能为空,最终状态以事件或重新查询为准。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "设置会话分组顺序", + "description": "商业版批量更新会话分组排序值。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups set-conversation-group-order", + "content": "setConversationGroupOrder 商业版 批量提交分组 ID 与顺序值。 import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupOrders: conversationGroupID: 'group a', order: 100 , conversationGroupID: 'group b', order: 200 , , 拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "把会话加入分组", + "description": "商业版把多个会话加入一个或多个分组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups add-conversations-to-groups", + "content": "addConversationsToGroups 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。 import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "把会话移出分组", + "description": "商业版从一个或多个分组移除多个会话。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups remove-conversations-from-groups", + "content": "removeConversationsFromGroups 商业版 使用与加入相同的成员参数。 import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。" + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "title": "删除会话分组", + "description": "商业版删除指定会话分组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups delete-conversation-group", + "content": "deleteConversationGroup 商业版 删除一个分组。 import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID: groupID 删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。" + }, + { + "path": "/sdk/uniapp/group/overview-group", + "title": "群组概览", + "description": "理解群资料、成员、申请、权限和群组事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group overview-group", + "content": "群组领域以 groupID 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription 先订阅事件,再查询已加入群组快照。按 groupID 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 OpenIMGroupItem 的 attachedInfo 以及 displayIsRead 、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。" + }, + { + "path": "/sdk/uniapp/group/create-group", + "title": "创建群组", + "description": "创建群资料并设置初始成员与管理员。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group create-group", + "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 群类型、验证方式和其他 OpenIMCreateGroupInfo 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。" + }, + { + "path": "/sdk/uniapp/group/update-group-profile", + "title": "更新群资料", + "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", + "content": "setGroupInfo 只更新提供的可选字段。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: '新的群名', introduction: '项目协作群', faceURL: 'https://cdn.example.com/group.png', 群主和管理员权限由服务端校验。Promise 成功后通过 onGroupInfoChanged 或重新查询刷新,不直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" + }, + { + "path": "/sdk/uniapp/group/set-group-announcement", + "title": "设置群公告", + "description": "通过 setGroupInfo 更新群公告。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-announcement", + "content": "群公告使用 setGroupInfo 的 notification 字段更新。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, notification: '周五 17:00 发布版本' 只传公告字段,避免覆盖群名、头像或策略。公告可能触发群资料事件;以事件或重新查询确认 notificationUpdateTime 与 notificationUserID 。 公告会展示给群成员,不应包含 Token 或内部密钥。" + }, + { + "path": "/sdk/uniapp/group/set-group-extension", + "title": "设置群扩展字段", + "description": "通过 setGroupInfo 更新群组 ex。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-extension", + "content": "群组业务扩展使用 setGroupInfo 的 ex 字符串。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, ex: JSON.stringify department: 'R&D' ex 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。" + }, + { + "path": "/sdk/uniapp/group/set-group-join-verification", + "title": "设置入群验证", + "description": "设置群成员加入时的验证策略。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-join-verification", + "content": "通过 setGroupInfo 的 needVerification 更新入群验证策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 使用 OpenIMGroupNeedVerification 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。" + }, + { + "path": "/sdk/uniapp/group/set-group-member-profile-access", + "title": "设置群成员资料可见性", + "description": "控制群成员是否可以查看其他成员资料。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-profile-access", + "content": "通过 setGroupInfo 的 lookMemberInfo 设置群成员资料可见策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 使用 OpenIMGroupOption 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。" + }, + { + "path": "/sdk/uniapp/group/set-group-member-friend-permission", + "title": "设置群成员加好友权限", + "description": "控制群成员之间是否可以发起好友申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-friend-permission", + "content": "通过 setGroupInfo 的 applyMemberFriend 更新群成员加好友策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 使用 OpenIMGroupOption 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。" + }, + { + "path": "/sdk/uniapp/group/change-group-mute", + "title": "开启或关闭全员禁言", + "description": "修改群组全员禁言状态。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group change-group-mute", + "content": "changeGroupMute 修改群组全员禁言。 import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true 权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。" + }, + { + "path": "/sdk/uniapp/group/join-group", + "title": "申请加入群组", + "description": "向指定群发送加入申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group join-group", + "content": "joinGroup 提交入群申请。 import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', joinSource 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 ex 不包含敏感信息。" + }, + { + "path": "/sdk/uniapp/group/quit-group", + "title": "退出群组", + "description": "当前用户主动退出指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group quit-group", + "content": "quitGroup 让当前用户退出群组。 import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID 群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。" + }, + { + "path": "/sdk/uniapp/group/dismiss-group", + "title": "解散群组", + "description": "群主解散指定群组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group dismiss-group", + "content": "dismissGroup 解散群组。 import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID 这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "title": "查询指定群资料", + "description": "按 groupID 列表批量查询群资料。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-specified-groups-info", + "content": "getSpecifiedGroupsInfo 批量查询群资料。 import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo 'group a', 'group b' const groups = result?.groups ?? 结果不保证与输入顺序一致,按 groupID 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "title": "查询已加入群组", + "description": "一次性读取当前账号已加入的群组快照。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list", + "content": "getJoinedGroupList 返回当前账号已加入群组的完整本地快照。 import getJoinedGroupList from '@/uni modules/unix openim sdk' const result = await getJoinedGroupList replaceJoinedGroups result?.groups ?? 按 groupID 去重,并配合 群组概览 /sdk/uniapp/group/overview group 的事件维护增量。群较多时改用分页入口。" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "title": "分页查询已加入群组", + "description": "按 offset 和 count 分页读取已加入群组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", + "content": "getJoinedGroupListPage 适合群数量较大的账号。 import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? offset 从 0 开始,直到返回数量小于 count 。分页期间群事件可能改变列表,应按 groupID 去重,而不是依赖页内位置。 displayIsRead 和部分禁言扩展字段 商业版 ,缺失时按可选值处理。" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "title": "检查是否已加入群组", + "description": "判断当前账号是否属于指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups is-join-group", + "content": "isJoinGroup 返回布尔值。 import isJoinGroup from '@/uni modules/unix openim sdk' const joined = await isJoinGroup groupID 该结果是查询时快照。群状态变化后用群事件或重新查询刷新,不把一次 true 永久缓存。未加入时可按群验证策略发起申请。" + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/search-groups", + "title": "搜索已加入群组", + "description": "按群 ID 或群名称搜索本地群组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups search-groups", + "content": "searchGroups 搜索当前可见的群资料。 import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: '项目' , isSearchGroupID: true, isSearchGroupName: true, 空关键词由 UI 拦截。结果按 groupID 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。" + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "title": "查询收到的入群申请", + "description": "分页查询待管理的入群申请,并处理申请事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-recipient", + "content": "getGroupApplicationListAsRecipient 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。 import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupApplicationAdded item = upsertGroupApplication item const subscriptions : Array = addedSubscription, onGroupApplicationAccepted item = upsertGroupApplication item , onGroupApplicationRejected item = upsertGroupApplication item , onGroupApplicationDeleted item = removeGroupApplication item , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceReceivedGroupApplications result?.applications ?? subscriptions.forEach subscription = off subscription 事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。" + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "title": "查询发出的入群申请", + "description": "分页查询当前账号发出的入群申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", + "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。" + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "title": "查询未处理入群申请数", + "description": "查询群管理入口的未处理申请数量。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-unhandled-count", + "content": "getGroupApplicationUnhandledCount 返回数量或 null 。 import getGroupApplicationUnhandledCount from '@/uni modules/unix openim sdk' const count = await getGroupApplicationUnhandledCount offset: 0, count: 100 setGroupApplicationCount count ?? 0 多端处理会让本地增减漂移,申请事件到达后重新查询权威数量。" + }, + { + "path": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "title": "观察群申请角标变化", + "description": "商业版订阅群申请 badge 数量事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications observe-group-application-badge-count", + "content": "onGroupApplicationBadgeCountChanged 商业版 直接提供新的角标数量。 import off, onGroupApplicationBadgeCountChanged, from '@/uni modules/unix openim sdk' const badgeSubscription = onGroupApplicationBadgeCountChanged count = setGroupApplicationCount count off badgeSubscription 用事件值替换本地数量,不做 +1/ 1 。当前没有“清除群申请 badge”的 API;处理申请后通过查询和后续事件刷新,不能调用不存在的方法。" + }, + { + "path": "/sdk/uniapp/group/group-applications/accept-group-application", + "title": "接受入群申请", + "description": "接受指定用户加入指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications accept-group-application", + "content": "acceptGroupApplication 由有权限的群成员处理申请。 import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID: 'user b', handleMsg: '已通过' 成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。" + }, + { + "path": "/sdk/uniapp/group/group-applications/refuse-group-application", + "title": "拒绝入群申请", + "description": "拒绝指定用户加入指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications refuse-group-application", + "content": "refuseGroupApplication 使用与接受相同的定位字段。 import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID: 'user b', handleMsg: '暂不通过' 处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。" + }, + { + "path": "/sdk/uniapp/group/group-applications/delete-group-requests", + "title": "删除入群申请记录", + "description": "商业版批量删除指定入群申请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications delete-group-requests", + "content": "deleteGroupRequests 商业版 删除明确指定的申请记录。 import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID: 'user b' , 使用 OpenIMSimpleGroupRequest 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "title": "查询群成员列表", + "description": "分页查询群成员,并处理成员新增、删除和资料变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-group-member-list", + "content": "getGroupMemberList 按过滤条件分页读取成员。本页归属三个成员事件。 import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupMemberAdded member = upsertMember member const subscriptions : Array = addedSubscription, onGroupMemberDeleted member = removeMember member.groupID, member.userID , onGroupMemberInfoChanged member = upsertMember member , const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? subscriptions.forEach subscription = off subscription filter 使用服务端定义的成员过滤值。按 groupID:userID 去重;分页与事件并发时不要按数组位置更新。" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "title": "查询指定群成员资料", + "description": "按用户 ID 列表批量读取指定群成员。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-specified-group-members-info", + "content": "getSpecifiedGroupMembersInfo 批量查询群内用户。 import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList: 'user a', 'user b' , 结果可能少于输入,按 userID 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "title": "筛选群内用户", + "description": "从给定用户列表中返回属于指定群的用户 ID。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-users-in-group", + "content": "getUsersInGroup 判断一批用户中哪些属于指定群,返回 string | null 。 import getUsersInGroup from '@/uni modules/unix openim sdk' const members = await getUsersInGroup groupID, userIDList: candidateUserIDs 结果是用户 ID,不含成员资料。需要群昵称和角色时再调用指定成员查询。输入去重,并把 null 与空数组分别作为“无有效结果”和“没有匹配成员”处理。" + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "title": "搜索群成员", + "description": "按用户 ID 或群昵称搜索群成员。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members search-group-members", + "content": "searchGroupMembers 在指定群内搜索。 import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: 'Alice' , isSearchUserID: true, isSearchMemberNickname: true, 空关键词由 UI 拦截。结果按 groupID:userID 去重;它不是全局用户搜索。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "title": "邀请用户入群", + "description": "邀请一个或多个用户加入指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members invite-user-to-group", + "content": "inviteUserToGroup 提交用户列表和邀请原因。 import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, reason: '加入项目讨论', userIDList: 'user b', 'user c' , 用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "title": "移除群成员", + "description": "把一个或多个成员移出指定群。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members kick-group-member", + "content": "kickGroupMember 使用 OpenIMGroupInviteParams 相同结构定位成员和填写原因。 import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, reason: '成员调整', userIDList: 'user b' 这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "title": "设置群成员昵称", + "description": "更新成员在指定群内的昵称。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-nickname", + "content": "setGroupMemberInfo 是成员资料统一更新入口。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', nickname: '项目负责人' 群昵称不同于用户全局昵称。只传本次字段,最终资料以 onGroupMemberInfoChanged 为准。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "title": "设置群成员角色", + "description": "通过 setGroupMemberInfo 更新成员角色等级。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-role-level", + "content": "通过 roleLevel 更新群主、管理员或普通成员角色。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', roleLevel: 60 使用 OpenIMGroupMemberRoleLevel 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "title": "设置群成员头像", + "description": "通过 setGroupMemberInfo 更新成员在群内的头像。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-avatar", + "content": "通过 faceURL 更新群成员资料中的头像。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', faceURL: avatarURL 先把本地图片上传到业务可访问的 HTTPS 地址。不要传 unifile:// 或本地沙盒路径作为远端头像 URL。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "title": "设置群成员扩展字段", + "description": "通过 setGroupMemberInfo 更新成员 ex。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-extension", + "content": "成员 ex 是整段业务扩展字符串。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', ex: JSON.stringify title: 'PM' 修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "title": "转让群主", + "description": "把群主权限转让给指定成员。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members transfer-group-owner", + "content": "transferGroupOwner 是不可轻易撤销的高风险操作。 import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: 'user b' 目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。" + }, + { + "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "title": "设置成员禁言", + "description": "按秒设置指定群成员的禁言时长。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members change-group-member-mute", + "content": "changeGroupMemberMute 使用 mutedSeconds 设置禁言时长。 import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: 'user b', mutedSeconds: 3600 解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。" + }, + { + "path": "/sdk/uniapp/group/check-full-sync-state", + "title": "检查群组 full-sync 状态", + "description": "商业版检查群列表或指定群成员是否完成全量同步。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group check-full-sync-state", + "content": "两个检查接口属于 商业版 ,用于诊断本地数据是否已经完成全量同步。 import checkGroupMemberFullSync, checkLocalGroupFullSync, from '@/uni modules/unix openim sdk' const groups = await checkLocalGroupFullSync const members = await checkGroupMemberFullSync groupID if groups?.IsFullSync == true && members?.IsFullSync == true enableCompleteGroupManagement 返回字段真实名称是 IsFullSync 。 null 或字段缺失不能当作 true 。这些方法只检查状态,不触发同步;未完成时继续观察 SDK 同步事件或稍后查询,避免高频轮询。" + }, + { + "path": "/sdk/uniapp/message/overview-message", + "title": "消息概览", + "description": "理解消息创建、发送、接收、历史、状态和进度事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message overview-message", + "content": "OpenIM 消息以 clientMsgID 作为客户端稳定标识,服务端消息还包含 serverMsgID 、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表。 创建消息只生成 OpenIMMessageItem ,不会发送;随后调用 sendMessage 指定 recvID 或 groupID 。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-text-message", + "title": "创建文本消息", + "description": "创建待发送的普通文本消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-message", + "content": "createTextMessage 返回 OpenIMMessageItem | null ,不发送消息。 import createTextMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage '你好,OpenIMSDK' if message == null throw new Error 'Failed to create text message' 文本应先按产品限制校验长度。创建成功后把消息传给 发送消息 /sdk/uniapp/message/sending messages/send message ;不要手工拼 OpenIMMessageItem 。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "title": "创建 @ 文本消息", + "description": "在群聊中创建带 @ 用户信息的文本消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", + "content": "createTextAtMessage 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。 import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@Alice 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alice' , quoteMessage: null, 字段以 OpenIMCreateTextAtMessageParams 为准,用户列表和显示信息保持一致。商业版 getAtAllTag 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。 创建后仍需调用发送 API并填写目标群 ID。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-custom-message", + "title": "创建自定义或高级文本消息", + "description": "创建业务自定义消息或带实体范围的高级文本。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-custom-message", + "content": "createCustomMessage 用于双方已约定 schema 的业务载荷: import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify orderID: 'order 123' , extension: '', descriptionText: '订单卡片', data 、 extension 、 descriptionText 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。 createAdvancedTextMessage 使用 OpenIMCreateAdvancedTextMessageParams 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "title": "从完整路径创建图片消息", + "description": "使用原生可读的本地完整路径创建图片消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-from-full-path", + "content": "公共入口 createImageMessageFromFullPath 接收本地完整路径: import createImageMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createImageMessageFromFullPath '/data/user/0/app/cache/photo.jpg' 商业版还提供结构化 createImageMessage 商业版 ,参数可包含平台来源路径。两者都要求原生层有读取权限。 unifile:// 、相册临时对象或 content URI 应先通过 uni 平台 API转成插件可读路径。文件不存在或权限不足时,不要进入发送阶段。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "title": "从 URL 创建图片消息", + "description": "使用已上传图片的 elem 信息创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", + "content": "createImageMessageByURL 适合图片已由业务上传并取得可访问 URL 的场景。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const message = await createImageMessageByURL pictureElem OpenIMPictureElem 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "title": "从完整路径创建语音消息", + "description": "使用本地音频路径和时长创建语音消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-from-full-path", + "content": "公共入口 createSoundMessageFromFullPath 接收 soundPath 与 duration : import createSoundMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createSoundMessageFromFullPath soundPath: '/data/user/0/app/cache/voice.m4a', duration: 8, 商业版 createSoundMessage 商业版 使用同一结构。时长单位以合同/服务端约定为准,并与真实媒体一致。录音完成、文件关闭且权限可读后再调用。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "title": "从 URL 创建语音消息", + "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", + "content": "createSoundMessageByURL 接收完整 OpenIMSoundElem 。 import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL soundElem URL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "title": "从完整路径创建视频消息", + "description": "使用视频、封面完整路径和媒体信息创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-from-full-path", + "content": "公共入口 createVideoMessageFromFullPath 使用 OpenIMCreateVideoMessageParams : import createVideoMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createVideoMessageFromFullPath videoPath: '/data/user/0/app/cache/video.mp4', videoType: 'mp4', duration: 12, snapshotPath: '/data/user/0/app/cache/video cover.jpg', 商业版 createVideoMessage 商业版 还可使用来源路径字段。视频和封面都必须真实存在并可读;时长、类型与文件一致。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "title": "从 URL 创建视频消息", + "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", + "content": "createVideoMessageByURL 接收 OpenIMVideoElem 。 import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoElem 视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "title": "从完整路径创建文件消息", + "description": "使用本地文件完整路径和文件名创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-from-full-path", + "content": "公共入口 createFileMessageFromFullPath : import createFileMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createFileMessageFromFullPath filePath: '/data/user/0/app/cache/report.pdf', fileName: 'report.pdf', 商业版 createFileMessage 商业版 可携带来源路径。调用前校验存在性、大小、扩展名和权限;文件名只用于展示,不能作为路径拼接依据。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "title": "从 URL 创建文件消息", + "description": "使用已上传文件的 OpenIMFileElem 创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", + "content": "createFileMessageByURL 接收 OpenIMFileElem 。 import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL fileElem 文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-card-message", + "title": "创建名片消息", + "description": "使用 OpenIMCardElem 创建用户名片消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", + "content": "createCardMessage 接收 OpenIMCardElem 。 import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '', 名片是发送时快照,接收方点击后应按 userID 查询最新资料。不要把名片字段当作可信身份认证。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-location-message", + "title": "创建位置消息", + "description": "使用经纬度和描述创建位置消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-location-message", + "content": "createLocationMessage 使用描述、经度和纬度。 import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: '会议室 A', longitude: 121.47, latitude: 31.23, 调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-face-message", + "title": "创建表情消息", + "description": "使用表情索引和业务数据创建消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-face-message", + "content": "createFaceMessage 接收 index 与 data 。 import createFaceMessage from '@/uni modules/unix openim sdk' const message = await createFaceMessage index: 1, data: 'smile' 发送与接收端必须共享表情包版本和索引约定。未知索引应显示降级占位,不让解析错误阻断消息列表。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-quote-message", + "title": "创建引用回复消息", + "description": "创建普通或高级引用消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-quote-message", + "content": "createQuoteMessage 使用文本和被引用消息的 JSON 字符串: import createQuoteMessage from '@/uni modules/unix openim sdk' const message = await createQuoteMessage text: '同意', message: JSON.stringify quotedMessage , createAdvancedQuoteMessage 还支持高级文本实体。引用的是消息快照;原消息撤回或删除后,UI 应显示不可用提示而不是崩溃。序列化前使用插件返回的完整消息,不要只复制 clientMsgID 伪造引用对象。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "title": "创建 Markdown 消息", + "description": "商业版创建 Markdown 内容消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-markdown-message", + "content": "createMarkdownMessage 商业版 使用 OpenIMCreateMarkdownMessageParams 。 import createMarkdownMessage from '@/uni modules/unix openim sdk' const message = await createMarkdownMessage content: ' 发布完成 ' 具体字段以锁定合同为准。接收端渲染 Markdown 前进行安全过滤,禁用危险 HTML、脚本和不受信任 URL;原始内容不是可信 HTML。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-forward-message", + "title": "创建逐条转发消息", + "description": "基于现有消息创建可发送的转发消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-forward-message", + "content": "createForwardMessage 接收一条完整消息并创建转发对象。 import createForwardMessage from '@/uni modules/unix openim sdk' const forward = await createForwardMessage sourceMessage 创建后仍需向新目标发送。转发前检查原内容、权限与隐私;本地扩展、发送状态等设备字段不应作为接收方权威数据。" + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "创建合并转发消息", + "description": "把多条消息合并为摘要与消息列表。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-merger-message", + "content": "createMergerMessage 使用标题、摘要和原消息列表创建合并转发。 import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: '聊天记录', abstractList: 'Alice: 方案已确认' , 摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。" + }, + { + "path": "/sdk/uniapp/message/sending-messages/send-message", + "title": "发送消息", + "description": "把已创建的消息发送给单聊用户或群组。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message", + "content": "sendMessage 接收 OpenIMSendMessageOptions ,Promise 直接返回最终 OpenIMMessageItem 。 import sendMessage from '@/uni modules/unix openim sdk' const sent = await sendMessage message, recvID: 'user b', groupID: '', isOnlineOnly: false, upsertMessage sent.clientMsgID, sent 单聊填 recvID 、群聊填 groupID ,另一个传空字符串。 offlinePushInfo 可按产品推送策略提供; isOnlineOnly 为 true 时不按普通持久消息处理。 发送进度按 clientMsgID 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 clientMsgID 的重复消息,除非产品明确要求。" + }, + { + "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "title": "发送非 OSS 消息", + "description": "发送已经准备好远端资源信息的消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", + "content": "sendMessageNotOss 与 sendMessage 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。 import sendMessageNotOss from '@/uni modules/unix openim sdk' const sent = await sendMessageNotOss message, recvID, groupID 只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 sendMessage 。" + }, + { + "path": "/sdk/uniapp/message/receiving-messages/receive-messages", + "title": "接收消息", + "description": "订阅单条、批量、离线和只在线消息事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-messages", + "content": "不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 conversationID:clientMsgID 去重。 import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const newMessageSubscription = onRecvNewMessage message = mergeMessage message const subscriptions : Array = newMessageSubscription, onRecvOfflineNewMessage message = mergeMessage message , onRecvOnlineOnlyMessage message = mergeOnlineOnlyMessage message , onRecvNewMessages result = result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = result.messages.forEach mergeMessage , subscriptions.forEach subscription = off subscription 只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。" + }, + { + "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "title": "接收自定义业务与消息扩展事件", + "description": "安全解析 raw JSON 字符串,并区分公共与商业版扩展事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-custom-business-messages", + "content": "这些事件返回 opaque 字符串。 onRecvCustomBusinessMessage 属于公共接口;消息扩展新增、变化、删除和 KV 变化事件属于 商业版 。 import off, onMessageKvInfoChanged, onRecvCustomBusinessMessage, onRecvMessageExtensionsAdded, onRecvMessageExtensionsChanged, onRecvMessageExtensionsDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function handleRawPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedBusinessEvent value catch console.error 'Invalid custom message event' const customSubscription = onRecvCustomBusinessMessage handleRawPayload const subscriptions : Array = customSubscription, onRecvMessageExtensionsAdded handleRawPayload , onRecvMessageExtensionsChanged handleRawPayload , onRecvMessageExtensionsDeleted handleRawPayload , onMessageKvInfoChanged handleRawPayload , subscriptions.forEach subscription = off subscription 校验版本、事件类型和必填字段后再更新 store;未知事件安全忽略。日志不输出完整 payload。HarmonyOS 当前不支持这四个商业扩展事件,会返回 unsupported subscription。" + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "title": "加载历史消息", + "description": "按会话和 clientMsgID 游标读取历史消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", + "content": "公共入口 getAdvancedHistoryMessageList 读取历史: import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: '', count: 50, 第一页用空 startClientMsgID ,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 clientMsgID 去重。 商业版 getHistoryMessageList 商业版 额外支持 isReverse 、 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "title": "按 ID 查找消息", + "description": "在多个会话中按 clientMsgID 批量定位消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages find-messages-by-id", + "content": "findMessageList 接收查询数组,每项包含会话 ID 与消息 ID 列表。 import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: 'msg a', 'msg b' , 返回 OpenIMFindMessageResult ,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。" + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "title": "加载消息上下文", + "description": "商业版围绕一条锚点消息读取前后文。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-message-context", + "content": "fetchSurroundingMessages 商业版 围绕完整锚点消息读取前后文。 import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20, viewType 使用产品/合同定义值。结果与实时事件可能重复,按 clientMsgID 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。" + }, + { + "path": "/sdk/uniapp/message/searching-messages/search-messages", + "title": "搜索本地消息", + "description": "按关键词、发送者、类型和时间范围搜索消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", + "content": "searchLocalMessages 在 SDK 本地数据中搜索。 import searchLocalMessages from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: '发布' , keywordListMatchType: 0, senderUserIDList: , messageTypeList: , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 50, 匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/update-typing-status", + "title": "更新输入状态", + "description": "上报会话输入焦点并处理输入状态变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages update-typing-status", + "content": "公共入口 changeInputStates 以会话和焦点状态上报输入状态。本页归属 onConversationUserInputStatusChanged 。 import changeInputStates, off, onConversationUserInputStatusChanged, from '@/uni modules/unix openim sdk' const inputSubscription = onConversationUserInputStatusChanged status = updateConversationInputStatus status await changeInputStates conversationID, userID: peerUserID, focus: true off inputSubscription 进入输入框上报 true,失焦或离开页面上报 false,并做节流。商业版兼容入口 typingStatusUpdate 商业版 使用 recvID 和 msgTip ;同一流程不要同时调用两个入口。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/get-typing-status", + "title": "查询输入状态", + "description": "商业版查询指定会话和用户的输入状态。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages get-typing-status", + "content": "getInputStates 商业版 查询当前快照。 import getInputStates from '@/uni modules/unix openim sdk' const result = await getInputStates conversationID, userID: peerUserID 输入状态是短时提示,不持久化为业务事实。以事件更新 UI,并设置本地超时自动清除,避免断线后永久显示“正在输入”。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "title": "检查语音转文字能力", + "description": "商业版查询当前语音转写能力。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", + "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities 在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "title": "将音频转为文字", + "description": "商业版提交音频文件名和数据进行语音转写。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages transcribe-audio", + "content": "speechToText 商业版 使用文件名和音频数据。 import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText filename: 'voice.m4a', data: audioBase64 先检查能力,限制音频大小和格式。 data 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "title": "保存本地转写内容", + "description": "商业版把更新后的消息内容保存到本地消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages save-local-transcript", + "content": "setMessageLocalContent 商业版 把完整消息对象保存到指定会话的本地存储。 import setMessageLocalContent from '@/uni modules/unix openim sdk' await setMessageLocalContent conversationID, message: updatedMessage 先在原消息副本中合并转写字段,不覆盖 clientMsgID 、路由和其他业务 elem。该修改是本地内容,不应假定同步到其他设备或服务端。" + }, + { + "path": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "title": "翻译文本和消息", + "description": "商业版翻译文本或指定消息,并说明 HarmonyOS 不支持。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages translate-text-and-messages", + "content": "两个接口均属于 商业版 ,Android 与 iOS 支持,HarmonyOS 当前返回 platform unsupported 。 import translateMessage, translateText, from '@/uni modules/unix openim sdk' const textResult = await translateText content: 'Hello', sourceLanguageCode: 'en', targetLanguageCode: 'zh', const translatedMessage = await translateMessage conversationID, clientMsgID, sourceLanguageCode: 'en', targetLanguageCode: 'zh', 语言代码使用商业服务支持的标准。翻译内容可能包含隐私,应遵守服务端数据处理政策。原文始终保留,翻译失败或平台不支持时降级显示原文。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-local-message", + "title": "删除本地消息", + "description": "按会话和 clientMsgID 删除当前设备中的消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-local-message", + "content": "deleteMessageFromLocalStorage 删除本地消息;兼容入口 deleteMessage 使用同一参数。 import deleteMessageFromLocalStorage from '@/uni modules/unix openim sdk' await deleteMessageFromLocalStorage conversationID, clientMsgID 该操作不会撤回对端消息,也不应伪装为服务端删除。成功后从当前设备 store 移除;需要通知对端使用撤回或商业版删除能力。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "title": "删除已保存消息", + "description": "商业版批量删除消息,并处理 onMsgDeleted。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-saved-messages", + "content": "deleteMessages 商业版 批量删除明确指定的消息。本页归属公共 onMsgDeleted 事件。 import deleteMessages, off, onMsgDeleted, from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = removeMessageByID message.clientMsgID await deleteMessages deleteParams off deletedSubscription deleteParams 使用锁定的 OpenIMDeleteMessagesParams ,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "title": "删除用户在会话中的全部消息", + "description": "商业版删除指定用户在一个会话中的消息并处理 raw 事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-user-messages", + "content": "deleteUserAllMessagesInConv 与事件 onDeleteUserAllMsgsInConv 均属于 商业版 。 import deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv, from '@/uni modules/unix openim sdk' const deleteSubscription = onDeleteUserAllMsgsInConv payload = try const value = JSON.parseObject payload if value = null refreshConversationMessages catch await deleteUserAllMessagesInConv conversationID, userID: targetUserID off deleteSubscription 这是高风险范围删除,需权限与二次确认。raw payload 校验后重新查询,不依赖未冻结字段。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "title": "撤回消息", + "description": "撤回指定消息,并处理消息撤回事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages revoke-a-message", + "content": "revokeMessage 使用会话和客户端消息 ID。 import off, onNewRecvMessageRevoked, revokeMessage, from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked info = mergeRevokedInfo info await revokeMessage conversationID, clientMsgID off revokedSubscription 服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/modify-a-message", + "title": "修改消息", + "description": "商业版修改消息,并处理 modified/edited raw 事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages modify-a-message", + "content": "modifyMessage 、 onMessageModified 和 onMessageEdited 属于 商业版 。两个事件都是 raw 字符串。 import modifyMessage, off, onMessageEdited, onMessageModified, from '@/uni modules/unix openim sdk' const modifiedSubscription = onMessageModified payload = refreshModifiedMessage payload const editedSubscription = onMessageEdited payload = refreshModifiedMessage payload const result = await modifyMessage modifyParams off modifiedSubscription off editedSubscription modifyParams 按 OpenIMModifyMessageParams 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "title": "查询置顶消息", + "description": "商业版查询一个会话的置顶消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages get-pinned-messages", + "content": "getConversationPinnedMsg 商业版 按会话查询置顶消息。 import getConversationPinnedMsg from '@/uni modules/unix openim sdk' const result = await getConversationPinnedMsg conversationID 以返回 DTO 的消息列表/分页字段为准,按 clientMsgID 去重。置顶变化后重新查询,避免依赖 raw 事件内部字段。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "title": "置顶或取消置顶消息", + "description": "商业版修改会话消息置顶状态并处理变化事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-pinned", + "content": "setConversationPinnedMsg 与 onChangedPinnedMsg 属于 商业版 。 import off, onChangedPinnedMsg, setConversationPinnedMsg, from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg pinParams off pinnedSubscription 参数使用 OpenIMSetConversationPinnedMsgParams 。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "title": "插入本地单聊消息", + "description": "把业务生成的消息插入单聊本地历史。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-single-message", + "content": "insertSingleMessageToLocalStorage 只写当前设备本地数据库,不发送给对方。 import insertSingleMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertSingleMessageToLocalStorage insertParams insertParams 使用真实 OpenIMInsertSingleMessageParams ,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "title": "插入本地群聊消息", + "description": "把业务生成的消息插入群聊本地历史。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-group-message", + "content": "insertGroupMessageToLocalStorage 只写本机群聊历史。 import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage insertParams 参数使用 OpenIMInsertGroupMessageParams ,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "title": "清空全部本地消息", + "description": "删除当前账号在本设备的全部消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-local-messages", + "content": "deleteAllMsgFromLocal 清空当前账号本地消息。 import deleteAllMsgFromLocal from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocal 这是高风险范围操作,二次确认并停止所有消息查询。它不保证删除服务端数据;重新同步可能恢复部分消息。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "title": "清空本地与服务端消息", + "description": "删除当前账号的全部本地及服务端消息。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-messages", + "content": "deleteAllMsgFromLocalAndSvr 是更高风险的全局删除。 import deleteAllMsgFromLocalAndSvr from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocalAndSvr 调用前明确影响范围和恢复策略,并进行强确认。成功后重建会话与消息 store;失败时重新查询,不假定原子完成。" + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "title": "设置消息本地扩展", + "description": "更新一条消息在当前设备的 localEx。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-local-ex", + "content": "setMessageLocalEx 使用会话和消息 ID 更新本地扩展。 import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify localState localEx 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。" + }, + { + "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "title": "上报群消息已读", + "description": "商业版发送群消息已读回执并处理 raw 回执事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status send-group-read-receipts", + "content": "sendGroupMessageReadReceipt 与 onRecvGroupReadReceipt 属于 商业版 。 import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt payload = refreshReadState payload await sendGroupMessageReadReceipt receiptParams off receiptSubscription 参数使用 OpenIMSendGroupMessageReadReceiptParams 。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。" + }, + { + "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "title": "查询群消息已读成员", + "description": "商业版分页查询读过指定群消息的成员。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status get-group-message-readers", + "content": "getGroupMessageReaderList 商业版 使用 OpenIMGetGroupMessageReaderListParams 查询。 import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList readerParams 按返回 DTO 的分页字段继续加载,并按 userID 去重。已读成员数据可能随新回执变化,打开详情时重新查询。" + }, + { + "path": "/sdk/uniapp/file-uploads/upload-file", + "title": "上传文件", + "description": "上传本地文件、观察进度,并在商业版取消上传。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", + "content": "uploadFile 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。 import uploadFile from '@/uni modules/unix openim sdk' const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', 路径必须是原生可读的完整路径。 unifile:// 先转换;不要把网络 URL 作为 filepath 。上传进度由 消息概览 /sdk/uniapp/message/overview message 归属的 onUploadFileProgress 提供。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" + }, + { + "path": "/sdk/uniapp/calling/overview-calling", + "title": "音视频信令概览", + "description": "商业版通话邀请、房间凭据、事件和 AV Runtime 的职责边界。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling overview-calling", + "content": "本节全部能力属于 商业版 ,要求商业版 OpenIMServer 信令服务。 unix openim sdk 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。 需要完整通话与会议 UI 时,另行集成 openim av runtime 。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。 典型流程: 1. 应用登录 IM,并注册全部信令事件。 2. 主叫构造 OpenIMSignalingInvitationInfo 后调用邀请。 3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。 4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。 5. 双方使用返回的 room/token/liveURL 建立媒体连接。 6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。 同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/start-single-call", + "title": "发起单人通话", + "description": "商业版向一个用户发起音频或视频邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", + "content": "signalingInvite 商业版 使用 invitation 和可选离线推送信息。 import signalingInvite from '@/uni modules/unix openim sdk' const result = await signalingInvite invitation: inviterUserID: selfUserID, inviteeUserIDList: peerUserID , mediaType: 'video', timeout: 30, sessionType: 1, , offlinePushInfo: title: '视频通话', desc: '收到新的通话邀请' , 返回值可能含 roomID 、 token 、 liveURL 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/start-group-call", + "title": "发起群通话", + "description": "商业版向群成员发起群组通话邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-group-call", + "content": "signalingInviteInGroup 商业版 使用同一邀请结构,但 invitation 必须包含 groupID 和目标成员。 import signalingInviteInGroup from '@/uni modules/unix openim sdk' const result = await signalingInviteInGroup invitation: inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2, , 发送前确认成员仍在群内并去重。 busyLineUserIDList 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/accept-call", + "title": "接受通话", + "description": "商业版接受邀请并取得房间凭据。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", + "content": "收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 signalingAccept 。 import signalingAccept from '@/uni modules/unix openim sdk' const result = await signalingAccept invitation 返回的 token 、 roomID 、 liveURL 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。 Promise 成功与对方接受事件、媒体真正连接是不同阶段。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/reject-call", + "title": "拒绝通话", + "description": "商业版拒绝当前邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls reject-call", + "content": "signalingReject 使用收到的完整 invitation。 import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation 拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 roomID 。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/cancel-call", + "title": "取消通话邀请", + "description": "商业版由主叫取消尚未接通的邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls cancel-call", + "content": "主叫在对方接受前使用 signalingCancel 。 import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation 取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "title": "挂断通话", + "description": "商业版结束已接受的通话。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls hang-up-call", + "content": "signalingHungUp 使用当前会话的 invitation。 import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation 调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 onHangUp 。" + }, + { + "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "title": "处理通话事件", + "description": "商业版统一接收邀请、接受、拒绝、取消、超时、挂断和房间事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls handle-call-events", + "content": "所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。 import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeAcceptedByOtherDevice, onInviteeRejected, onInviteeRejectedByOtherDevice, onReceiveNewInvitation, onRoomParticipantConnected, onRoomParticipantDisconnected, onStreamChange, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const invitationSubscription = onReceiveNewInvitation handleCallPayload const subscriptions : Array = invitationSubscription, onInviteeAccepted handleCallPayload , onInviteeAcceptedByOtherDevice handleCallPayload , onInviteeRejected handleCallPayload , onInviteeRejectedByOtherDevice handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , onRoomParticipantConnected handleCallPayload , onRoomParticipantDisconnected handleCallPayload , onStreamChange handleCallPayload , subscriptions.forEach subscription = off subscription HarmonyOS 当前不支持 onStreamChange ,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。" + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "title": "恢复启动时邀请", + "description": "商业版在 SDK 启动后查询可能遗漏的当前邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information restore-pending-invitation", + "content": "事件监听建立后调用一次 signalingGetInvitationInfoStartApp ,恢复初始化前到达的邀请。 import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation 可选参数 userID 只用于明确查询用户。无邀请时合法返回 null ,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。" + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "title": "按群查询通话房间", + "description": "商业版查询群当前关联的 roomID 与邀请。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", + "content": "signalingGetRoomByGroupID 返回可选 roomID 和 invitation。 import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const result = await signalingGetRoomByGroupID groupID 空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。" + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "title": "按房间获取 Token", + "description": "商业版为指定 roomID 获取 RTC Token 和 liveURL。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-token-by-room-id", + "content": "signalingGetTokenByRoomID 返回可选 Token 与 liveURL。 import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const result = await signalingGetTokenByRoomID roomID 凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。" + }, + { + "path": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "title": "发送自定义信令", + "description": "商业版向房间发送业务自定义信令,并安全解析接收事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling sending-custom-signals send-a-custom-signal", + "content": "signalingSendCustomSignaling 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。 import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling, from '@/uni modules/unix openim sdk' const signalSubscription = onReceiveCustomSignal payload = handleValidatedSignal payload const signalingSubscription = onReceiveCustomSignaling payload = handleValidatedSignal payload await signalingSendCustomSignaling roomID, customInfo: JSON.stringify type: 'raise hand', version: 1 , off signalSubscription off signalingSubscription 接收端用事件 ID/内容哈希去重,校验 type 、 version 和字段。 customInfo 不承担权限认证,不含 Token 或秘密。" + }, + { + "path": "/sdk/uniapp/events/overview-events", + "title": "事件概览", + "description": "管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp events overview-events", + "content": "每个 on... 调用同步返回独立 OpenIMSDKEventSubscription ,其中包含 id 与 eventName 。正常清理使用 off subscription ;不要继续使用旧版“监听函数直接返回取消闭包”的写法。 import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const startSubscription = onSyncServerStart reinstalled = beginSyncUI reinstalled const subscriptions : Array = startSubscription, onSyncServerProgress progress = updateSyncProgress progress , onSyncServerFinish reinstalled = finishSyncUI reinstalled , onSyncServerFailed reinstalled = failSyncUI reinstalled , subscriptions.forEach subscription = off subscription 同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。 offAll eventName 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。 HarmonyOS unsupported 事件 HarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、 onMessageKvInfoChanged 、 onStreamChange ,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。 事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。" + }, + { + "path": "/sdk/uniapp/events/handle-data-migration-events", + "title": "处理数据迁移事件", + "description": "商业版观察迁移开始、进度、失败与完成事件。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp events handle-data-migration-events", + "content": "四个 migration 事件属于 商业版 ,Android 与 iOS 支持;HarmonyOS 当前全部返回 platform unsupported 。它们来自 Core/插件迁移桥,不等同于普通同步事件。 import off, onMigrationFailed, onMigrationFinished, onMigrationProgress, onMigrationStart, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const startSubscription = onMigrationStart = showMigrationUI const subscriptions : Array = startSubscription, onMigrationProgress payload = handleValidatedMigrationProgress payload , onMigrationFailed payload = handleValidatedMigrationFailure payload , onMigrationFinished = finishMigrationUI , subscriptions.forEach subscription = off subscription 进度和失败 payload 是 opaque 字符串。若为 JSON,先校验再读取;不要向用户或日志暴露内部路径、数据库信息和敏感内容。迁移期间避免并发反初始化或切换账号,完成/失败后重新查询必要快照。" + }, + { + "path": "/sdk/uniapp/logger", + "title": "日志与诊断", + "description": "配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp logger", + "content": "初始化时通过 logLevel 、 isLogStandardOutput 和可选 logFilePath 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。 上传日志 uploadLogs 接收行数和扩展说明: import uploadLogs from '@/uni modules/unix openim sdk' const operationID = diagnostic $ Date.now await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , operationID, operationID 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。 上传进度由 onUploadLogsProgress 提供,完整订阅归 消息概览 /sdk/uniapp/message/overview message 。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。 安全要求 上传前取得用户同意,并说明日志范围与保留策略。 ex 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。 控制 line ,避免无界上传;失败时限次重试。 生产包不要长期启用 verbose 标准输出。 本地数据目录只用于诊断定位,不直接打包整个数据库上传。" }, { "path": "/sdk/wasm/overview", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 8fd6d279f9..0a3c5f6946 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -4185,11 +4185,1339 @@ }, { "path": "/sdk/uniapp/overview", - "title": "OpenIM SDK for uni-app", - "description": "OpenIM uni-app SDK entry point for App, H5, and supported mini-app targets.", - "context": "SDKs · uni-app · v4", + "title": "OpenIM SDK for uni-app / uni-app x", + "description": "Integrate unix-openim-sdk into Android, iOS, and commercial HarmonyOS Apps built with uni-app or uni-app x.", + "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp overview", - "content": "Overview Use the uni app SDK when the same OpenIM integration needs to cover App, H5, and supported mini app targets from a uni app codebase. The integration should keep authentication, user identity, message creation, conversation state, and event handling aligned with the rest of the OpenIM SDK family. Platform scope App and H5 builds should use the SDK package and runtime adapter recommended by the OpenIM release you deploy. Mini app targets need additional validation for storage, network, file upload, and websocket behavior. Tokens should still be issued by a trusted backend. Do not generate or hard code user tokens in the client bundle. Core integration path 1. Install the SDK package that matches your OpenIM Server version. 2. Initialize the client with apiAddr , wsAddr , the current userID , and a backend issued token. 3. Register connection and message events before calling login . 4. Send the first text message, then validate message receipt in another signed in client. 5. Add platform specific handling for file messages, push notifications, and background lifecycle. Related SDKs WASM SDK /sdk/wasm/overview for browser and WebAssembly oriented API examples. Flutter SDK /sdk/flutter/overview when mobile and desktop should be handled through Flutter. React Native SDK /sdk/react native/overview when the app is built with React Native." + "content": "OpenIM unix openim sdk is a native UTS plugin that provides user, friend, conversation, group, message, event, and local database capabilities to uni app and uni app x Apps. The plugin owns the only OpenIM Core in the host process. Import flat functions from @/uni modules/unix openim sdk ; do not create an SDK instance. Supported environments | Host | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | Supported, API 21+ | Supported, iOS 14+ | Not currently declared | | uni app x | Supported, API 21+ | Supported, iOS 14+ | Commercial, API 24 | | Web / mini apps | Not supported | Not supported | Not supported | Use the HBuilderX/uni app 5.23 series. Android and iOS require a custom base or local native project containing the plugin's native dependencies; the standard base cannot load them. Public and commercial capabilities This documentation covers both public capabilities and commercial extensions. APIs, events, and fields carrying a Commercial badge require the commercial unix openim sdk and a matching OpenIMServer deployment. Edition and platform support are separate: a public API can still return platform unsupported on a particular platform. Commercial extensions include signaling, SDK session snapshots, translation, and selected message or conversation features. onSDKSessionChanged is synthesized by the plugin from initialization, login, logout, token, and account transitions. It is not a native OpenIM Core event. Integration sequence 1. Install unix openim sdk and prepare a custom base or local native project. 2. Call initSDK with apiAddr , wsAddr , platform, logging, and systemType . 3. Save the subscription handles returned by connection, message, and business event listeners. 4. Obtain the current user's userID and token from a trusted backend, then call login userID, token . 5. Wait for onConnectSuccess , load snapshots, and apply subsequent events incrementally. 6. On sign out, call logout and release listeners with off subscription . Call unInitSDK only when the App no longer uses the SDK. Invocation model Promises resolve directly to business values; there is no Web SDK data wrapper. Event registration synchronously returns an OpenIMSDKEventSubscription : import off, onRecvNewMessage from '@/uni modules/unix openim sdk' const messageSubscription = onRecvNewMessage message = console.log message.clientMsgID off messageSubscription Do not use offAll for normal scoped cleanup. It removes every listener owned by the plugin instance and is intended only for full App teardown or controlled test reset. Security boundaries Obtain user tokens from a trusted backend. Never embed administrator tokens, secrets, or fixed user tokens in the App. Physical devices must use reachable apiAddr and wsAddr values; localhost points to the device itself. Do not open, move, or modify the SDK managed database directly. Redact tokens, full private message bodies, and commercial credentials from logs and reports. AV Runtime is a separate UTS plugin. It reuses this plugin's single login session but is not part of the public IM API. Continue with Before you start /sdk/uniapp/getting started/before you start , Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk , and Event overview /sdk/uniapp/events/overview events ." + }, + { + "path": "/sdk/uniapp/getting-started/before-you-start", + "title": "Before you start", + "description": "Prepare OpenIMServer, a user token, the UTS plugin, and a native build environment.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started before-you-start", + "content": "Choose a uni app or uni app x App target and prepare an OpenIMServer, users, and native build environment compatible with unix openim sdk 0.2.0 rc.3 . Web, H5, and mini app targets cannot use this native UTS plugin. Prepare the service and account | Value | Source | Requirement | | | | | | apiAddr | OpenIMServer HTTP API | Complete address reachable from the device | | wsAddr | OpenIMServer WebSocket | Complete address that accepts a persistent connection | | userID | Your backend account mapping | Existing server user matching the token | | Token | Trusted application backend | Grants access only to the current user | Your backend must authenticate its own account before returning the mapped OpenIM user and token. Never place an administrator token or server secret in the App. Public clients connect to a public OpenIMServer deployment; signaling, session, and other commercial features require the corresponding commercial services. On physical devices, do not use the development computer's localhost . Verify network reachability, TLS certificates, reverse proxy rules, and WebSocket upgrades from the actual device. Prepare the plugin and toolchain Install the plugin at uni modules/unix openim sdk , use the HBuilderX/uni app 5.23 series, and prepare: Android: API 21+, a compatible JDK and Android SDK, declared AAR/Maven dependencies, and target ABIs. iOS: iOS 14+, compatible Xcode/CocoaPods, and correctly linked and embedded XCFrameworks. HarmonyOS: uni app x commercial edition only, API 24, with the HAR matching the plugin contract. The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory. Use exported platform constants instead of numeric literals: OpenIMPlatformAndroid , OpenIMPlatformIOS , or OpenIMPlatformHarmony . The required systemType is a descriptive string such as android , ios , or harmony . Release checklist Verify initialization, login, normal message send/receive, and logout on target devices. Test foreground/background transitions, network recovery, token invalidation, and forced logout. Scan Android for duplicate classes/JNI and ABIs; validate iOS signing, embedding, privacy manifests, and device linking. Test commercial signaling against commercial services, not a public server. Keep tokens, secrets, and full private message content out of logs, screenshots, and automation evidence. Continue with Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk ." + }, + { + "path": "/sdk/uniapp/getting-started/environment-specific-implementation", + "title": "Integrate by host and platform", + "description": "Understand the runtime and build boundaries for uni-app, uni-app x, Android, iOS, and HarmonyOS.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started environment-specific-implementation", + "content": "unix openim sdk exposes the same business functions to uni app and uni app x. Differences are limited mainly to language types, page lifecycle, and native build integration. Always import from the same flat plugin root. | Host | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared | | uni app x | API 21+ | iOS 14+ | Commercial API 24 | | H5 / Web / mini apps | Not supported | Not supported | Not supported | uni app JavaScript does not provide UTS static type checking, but Promise values and subscription handle semantics are identical. Keep SDK lifetime in an application service rather than reinitializing it from pages. import getLoginStatus, off, onConnectSuccess from '@/uni modules/unix openim sdk' const connection = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus off connection uni app x Import public UTS types instead of copying interfaces that can drift: import getLoginStatus, type OpenIMLoginStatus from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus For commercial raw signaling JSON, validate the string and required fields before mapping an UTSJSONObject to your own domain type. Native platform boundaries Android and iOS support public and commercial interfaces, but the plugin must be included in a custom base or local native project. The host App declares permissions, notifications, and background capabilities; the SDK does not request camera, microphone, photo, or notification access for your product. File APIs require a readable absolute native path. Resolve unifile:// through a uni API first. Do not pass a network URL, transient URL, or virtual sandbox path directly to OpenIM Core. HarmonyOS is declared only for uni app x commercial edition. updateFcmToken , updateToken , translateText , and translateMessage return platform unsupported . Ten unavailable events return unsupported subscriptions and never synthesize success; see Event overview /sdk/uniapp/events/overview events . Initialize Core once per application. Pages own and release only their listeners. Account switching must finish old account logout and cleanup before the new login; call unInitSDK only during complete SDK teardown." + }, + { + "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", + "title": "Authenticate and manage a session", + "description": "Log in, observe connection and token events, inspect login state, and log out safely.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started authenticate-and-manage-session", + "content": "After initSDK , register account and connection events before calling login userID, token . Login Promise completion does not imply that the persistent connection is ready; wait for onConnectSuccess before network dependent queries and sends. import off, onConnectFailed, onConnectSuccess, onConnecting, onKickedOffline, onUserTokenExpired, onUserTokenInvalid, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onConnectSuccess = console.log 'OpenIM connected' , onConnecting = console.log 'OpenIM connecting' , onConnectFailed error = console.error error.errCode, error.errMsg , onKickedOffline = clearCurrentAccount , onUserTokenExpired = requestFreshToken , onUserTokenInvalid error = console.error error.errCode, error.errMsg , function releaseSessionSubscriptions subscriptions.forEach subscription = off subscription subscriptions.length = 0 When onKickedOffline arrives, Core is already transitioning offline. Clear references to the old account and start reauthentication; do not race it with logout . import login from '@/uni modules/unix openim sdk' await login userID, token The required call shape is login userID, token , not an object parameter. Obtain a token matching userID from a trusted backend; the optional diagnostic argument is intentionally omitted from normal examples. import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID from '@/uni modules/unix openim sdk' const status = await getLoginStatus if status == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreAccountState currentUserID Login state and network connectivity are different: a briefly disconnected account may remain logged in. Report application lifecycle and network transitions once from an application service: import networkStatusChanged, setAppBackgroundStatus from '@/uni modules/unix openim sdk' await setAppBackgroundStatus true await setAppBackgroundStatus false await networkStatusChanged To sign out, wait for logout , release account scoped subscriptions, and clear state. Finish this sequence before logging in another account. import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount" + }, + { + "path": "/sdk/uniapp/getting-started/send-first-message", + "title": "Send your first message", + "description": "Create and send a text message in a uni-app or uni-app x App.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started send-first-message", + "content": "Use this flow to verify installation, initialization, login, and messaging. Production applications should keep SDK lifetime in an application service. Register onConnectSuccess before login and release its handle when the application scope ends: import off, onConnectSuccess from '@/uni modules/unix openim sdk' const connection = onConnectSuccess = markOpenIMReady off connection For a direct message, set recvID and leave groupID empty. For a group message, leave recvID empty and set a group ID joined by the current user. import createTextMessage, sendMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage = await sendMessage message, recvID: 'user b', groupID: '', appendOutgoingMessage sentMessage createTextMessage creates a local message object; it does not send. sendMessage resolves directly to the final OpenIMMessageItem , without a data wrapper. Merge outgoing state by clientMsgID , and deduplicate incoming events by the same identifier. For a group: const sentGroupMessage = await sendMessage message, recvID: '', groupID: 'group 123', Verify with two accounts on independent clients: the sender receives a non empty clientMsgID , the receiver obtains the new message event, both clients can reload the message from history, and no old account state changes after logout." + }, + { + "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", + "title": "Install, initialize, and inspect the SDK", + "description": "Install the UTS plugin, initialize the only OpenIM Core, and inspect version and data paths.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started install-initialize-and-inspect-sdk", + "content": "After installing uni modules/unix openim sdk , initialize it once from an application service. The plugin exports flat functions; do not construct a second SDK instance. import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' Use OpenIMPlatformIOS with systemType: 'ios' , or OpenIMPlatformHarmony with systemType: 'harmony' . Reduce console logging in production and configure logFilePath according to your compliance policy. | OpenIMInitConfig field | Type | Description | | | | | | platformID | OpenIMPlatform | One of the exported platform constants. | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string \\| null optional | Core data directory; normally use the platform default. | | logFilePath | string \\| null optional | Log path following the platform artifact contract. | | logLevel | OpenIMLogLevel | For example OpenIMLogLevelError or OpenIMLogLevelInfo . | | isLogStandardOutput | boolean | Whether SDK logs are emitted to the system console. | | systemType | string | Required system description; never omit it. | Do not initialize concurrent environments in one process. Sign out, clear application state, and uninitialize before changing service addresses. getSdkVersion and getOpenIMDataPath are synchronous local operations: import getOpenIMDataPath, getSdkVersion from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath Use the data path only for diagnostics and storage policy. Never edit the SDK database or publish full sandbox paths in logs. import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK returns void . Stop new requests, sign out, and release subscriptions first. Page unload, App backgrounding, and AV Runtime disposal must not uninitialize the IM SDK." + }, + { + "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", + "title": "Handle App lifecycle and device state", + "description": "Report lifecycle and network changes, update badges, and register an FCM token.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started handle-app-lifecycle-and-device-state", + "content": "An application service should own lifecycle reporting. Use setAppBackgroundStatus and networkStatusChanged as described in the authentication guide; do not report the same transition from multiple pages. import setAppBadge from '@/uni modules/unix openim sdk' await setAppBadge totalUnreadCount setAppBadge synchronizes the current total unread count with the SDK/platform layer. Continue to maintain application UI from unread events. Resolving the Promise does not guarantee that every device configuration displays a launcher badge. Pass 0 to clear it. import updateFcmToken from '@/uni modules/unix openim sdk' await updateFcmToken fcmToken: deviceFcmToken, expireTime: tokenExpireUnixSeconds, fcmToken is the token issued to this device; expireTime is the protocol defined Unix expiry in seconds. Call this only after acquiring or refreshing a valid device token. Never log it or substitute an IM token. HarmonyOS currently returns platform unsupported for updateFcmToken . This is a platform capability gap, not a commercial authentication failure; integrate the Harmony push channel in the host application. A recommended sequence is: initialize; subscribe and log in; register the device token; apply unread events and setAppBadge ; report foreground/background and network transitions; then clear badge/push association and account subscriptions on logout. Push notifications do not replace SDK message events or history synchronization." + }, + { + "path": "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session", + "title": "Update tokens and observe SDK sessions", + "description": "Commercially update a login token and use synthetic session snapshots to prevent cross-account work.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp getting-started update-token-and-observe-sdk-session", + "content": "This is a Commercial capability for hosts that share one OpenIM Core with dependent plugins such as AV Runtime. onSDKSessionChanged is synthesized by unix openim sdk ; it is not a native OpenIM Core listener. import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | Field | Type | Description | | | | | | loginStatus | OpenIMLoginStatus | Current login state. | | userID | string \\| null | Current SDK user, or null when logged out. | | sdkSessionEpoch | number | Session generation, incremented after successful lifecycle or account changes. | | sdkVersion | string | Version of the connected Core. | The snapshot never contains an IM token, API address, or WebSocket address. Pin userID and sdkSessionEpoch before asynchronous work and compare another snapshot before committing the result. import off, onSDKSessionChanged from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged next = cancelRequestsFromOlderEpoch next.sdkSessionEpoch replaceActiveSdkUser next.userID off sessionSubscription Initialization, login, logout, uninitialization, forced logout, token invalidation/expiry, and user changes can advance the epoch. Handlers must be idempotent and must not log tokens or trigger competing logins. import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Obtain the token from a trusted backend. updateToken is available on Android and iOS; HarmonyOS returns platform unsupported . Continue to use session and connection events after the Promise resolves. Dependent plugins should compare snapshots before and after initialization, cancel only their own work during disposal, and never call IM logout or unInitSDK . Dispose dependent plugins before switching users." + }, + { + "path": "/sdk/uniapp/user/overview-user", + "title": "User overview", + "description": "Understand user profiles, presence, friendships, friend requests, and the blacklist.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user overview-user", + "content": "The user domain covers the current profile, public profiles, presence, friendships, friend requests, and blacklist entries. Use stable userID values as keys; nicknames and avatars can change. OpenIMUserInfo includes public userID , nickname , faceURL , ex , and optional createTime . attachedInfo and globalRecvMsgOpt are Commercial extensions and must remain optional. Friend data uses OpenIMFriendUserItem , blacklist data uses OpenIMBlackUserItem , and requests use OpenIMFriendApplicationItem . Register events before loading a snapshot, then merge both sources idempotently by userID . Reload snapshots after reconnection, login, or process restoration; events alone are not a complete database. Read your profile /sdk/uniapp/user/profile/get self user info Subscribe to presence /sdk/uniapp/user/online status/subscribe users status List friends /sdk/uniapp/user/friends/get friend list page Read received friend requests /sdk/uniapp/user/friend applications/get friend application list as recipient Read the blacklist /sdk/uniapp/user/blacklist/get black list Your application backend remains authoritative for identity and authorization. Chat profiles must not replace account authentication." + }, + { + "path": "/sdk/uniapp/user/profile/get-users-info", + "title": "Get user profiles", + "description": "Read public profiles for a list of user IDs.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", + "content": "getUsersInfo resolves to OpenIMUserListResult | null . import getUsersInfo from '@/uni modules/unix openim sdk' const result = await getUsersInfo 'user a', 'user b' const users = result?.users ?? users.forEach user = cacheUser user.userID, user Results can be shorter than the request and are not ordered like the input. Map by userID and retain placeholders for missing or inaccessible users. Treat commercial attachedInfo and globalRecvMsgOpt as optional, and never trust ex or attachedInfo as identity credentials. Batch and cache large lookups." + }, + { + "path": "/sdk/uniapp/user/profile/get-self-user-info", + "title": "Get your profile", + "description": "Read the OpenIM profile of the logged-in user.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", + "content": "getSelfUserInfo resolves to OpenIMUserInfo | null for the current logged in account. import getSelfUserInfo from '@/uni modules/unix openim sdk' const self = await getSelfUserInfo if self = null renderProfile self.nickname, self.faceURL Verify that the returned userID matches the application account. attachedInfo and globalRecvMsgOpt are optional Commercial fields. Refresh this snapshot after login or missed events; ongoing updates arrive through onSelfInfoUpdated on the profile update page." + }, + { + "path": "/sdk/uniapp/user/profile/set-self-info", + "title": "Update your profile", + "description": "Update selected profile fields and process onSelfInfoUpdated.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", + "content": "Pass only fields that should change; do not use empty strings to mean “unchanged.” import off, onSelfInfoUpdated, setSelfInfo from '@/uni modules/unix openim sdk' const profileSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png' off profileSubscription OpenIMSetSelfInfoParams supports nickname , faceURL , ex , and commercial globalRecvMsgOpt . Replace cached data by userID from the event or a fresh query. Each page must release its own handle, or an application user store can own one shared subscription." + }, + { + "path": "/sdk/uniapp/user/profile/set-global-message-reception", + "title": "Set global message reception", + "description": "Set the commercial account-wide globalRecvMsgOpt profile field.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", + "content": "globalRecvMsgOpt is a Commercial optional field of OpenIMSetSelfInfoParams . It controls the account globally and is different from a conversation's recvMsgOpt . import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo globalRecvMsgOpt: 0 Use exported OpenIMSetSelfInfoRecvMsgOpt constants and send only this field to avoid overwriting profile data. Confirm the final value with getSelfUserInfo . Hide or disable this control when the deployed edition does not expose the field." + }, + { + "path": "/sdk/uniapp/user/profile/set-friend-add-permission", + "title": "Set friend-add permission", + "description": "Understand the commercial friend-add policy and the current plugin write boundary.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user profile set-friend-add-permission", + "content": "Friend add permission is a Commercial account policy. unix openim sdk 0.2.0 rc.3 exposes the related profile data but OpenIMSetSelfInfoParams has no addFriendPermission setter. Do not invent a client setter or store this policy in ex . Change it through a supported commercial backend/administration API, then reload the user profile. If the field is absent, show the capability as unavailable instead of assuming a policy." + }, + { + "path": "/sdk/uniapp/user/online-status/subscribe-users-status", + "title": "Subscribe to user presence", + "description": "Subscribe to user status and merge onUserStatusChanged updates.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status subscribe-users-status", + "content": "Register the event before subscribing and querying a snapshot to minimize the event/snapshot gap. import getUserStatus, off, onUserStatusChanged, subscribeUsersStatus from '@/uni modules/unix openim sdk' const presenceSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status const userIDs = 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status off presenceSubscription Presence can include per platform details. Merge by user and platform; one offline device does not imply that every device is offline. Subscribe only to needed users and later call unsubscribeUsersStatus ." + }, + { + "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", + "title": "Get subscribed user presence", + "description": "Read a snapshot for users whose status is already subscribed.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status get-subscribe-users-status", + "content": "getSubscribeUsersStatus takes no user IDs and returns the current subscribed user snapshot. import getSubscribeUsersStatus from '@/uni modules/unix openim sdk' const result = await getSubscribeUsersStatus result?.statuses.forEach status = replaceUserStatus status.userID, status An empty list can mean no subscriptions or no available presence; it does not diagnose connectivity. Continue merging onUserStatusChanged , and reload this snapshot after foreground restoration or store reconstruction." + }, + { + "path": "/sdk/uniapp/user/online-status/unsubscribe-users-status", + "title": "Unsubscribe from user presence", + "description": "Stop receiving presence changes for selected users.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user online-status unsubscribe-users-status", + "content": "import unsubscribeUsersStatus from '@/uni modules/unix openim sdk' await unsubscribeUsersStatus 'user a', 'user b' This removes only the selected server side subscriptions. It does not remove other users or release the local onUserStatusChanged handler. Manage both lifecycles: call this API for unwanted users and off subscription when the local event owner ends. On failure, retain local bookkeeping and retry according to network state rather than looping rapidly." + }, + { + "path": "/sdk/uniapp/user/friends/get-friend-list-page", + "title": "List friends", + "description": "Load friends by page or snapshot and process friend changes.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends get-friend-list-page", + "content": "Use getFriendListPage for pagination or getFriendList for a complete small snapshot. Register events before querying. import getFriendListPage, off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onFriendAdded friend = upsertFriend friend.userID, friend , onFriendDeleted friend = removeFriend friend.userID , onFriendInfoChanged friend = upsertFriend friend.userID, friend , const page = await getFriendListPage offset: 0, count: 100 replaceFriendSnapshot page?.friends ?? subscriptions.forEach subscription = off subscription Start offset at 0, continue until fewer than count items return, and deduplicate by userID . getFriendList filterBlack optionally filters blacklist entries but does not merge the two relationship types. Reload after login, reconnection, or state loss." + }, + { + "path": "/sdk/uniapp/user/friends/search-friends", + "title": "Search friends", + "description": "Search current friends by ID, nickname, or remark.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends search-friends", + "content": "searchFriends searches only current friends, not every server user. import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? Reject an empty search in the UI, deduplicate results by userID , and merge later friend events. Search flags affect only this query and do not update profiles or server indexes." + }, + { + "path": "/sdk/uniapp/user/friends/get-specified-friends-info", + "title": "Get selected friend profiles", + "description": "Read friendship details for selected user IDs.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends get-specified-friends-info", + "content": "import getSpecifiedFriendsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedFriendsInfo userIDList: 'user a', 'user b' , filterBlack: false, const friends = result?.friends ?? The result can be shorter or differently ordered. Map it by userID ; missing users may not be friends, may be filtered, or may be inaccessible. filterBlack changes this result only and never removes blacklist relationships." + }, + { + "path": "/sdk/uniapp/user/friends/check-friend", + "title": "Check friendship", + "description": "Check the friendship between the current account and selected users.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends check-friend", + "content": "import checkFriend from '@/uni modules/unix openim sdk' const result = await checkFriend 'user a', 'user b' result?.result.forEach relation = cacheFriendRelation relation.userID, relation.result Read results by userID , not array position, and interpret relation values through exported constants rather than numeric literals. This query does not create a friendship; use addFriend when appropriate." + }, + { + "path": "/sdk/uniapp/user/friends/update-friends", + "title": "Update friend details", + "description": "Update friend remarks, pinned state, or extension values.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends update-friends", + "content": "updateFriends updates selected fields for one or more friendships. import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: 'Project team', isPinned: true friendUserIDs must not be empty. Omitted remark , isPinned , and ex fields remain unchanged. Confirm through onFriendInfoChanged or a new query. The commercial single user alternative uses pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: 'Owner' Do not race updateFriends and Commercial updateFriend for the same user." + }, + { + "path": "/sdk/uniapp/user/friends/delete-friend", + "title": "Delete a friend", + "description": "Remove a friendship with a selected user.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friends delete-friend", + "content": "import deleteFriend from '@/uni modules/unix openim sdk' await deleteFriend 'user a' Confirm final state through onFriendDeleted or a fresh friend snapshot. Deleting a friend does not delete conversations/history or add the user to the blacklist. Implement those as explicit operations with a defined compensation order, and ask for user confirmation first." + }, + { + "path": "/sdk/uniapp/user/friend-applications/add-friend", + "title": "Send a friend request", + "description": "Send a friend request to another user.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications add-friend", + "content": "import addFriend from '@/uni modules/unix openim sdk' await addFriend toUserID: 'user b', reqMsg: 'Hello, I am Alice', ex: '' reqMsg is visible to the recipient. Keep tokens, internal permissions, and sensitive data out of both it and ex . Promise completion means the request was submitted, not accepted; refresh the sent request list for its later status." + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", + "title": "List received friend requests", + "description": "Read received requests and process add, accept, reject, and delete events.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-recipient", + "content": "Register all request events before loading the snapshot. import getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onFriendApplicationAdded item = upsertApplication item , onFriendApplicationAccepted item = upsertApplication item , onFriendApplicationRejected item = upsertApplication item , onFriendApplicationDeleted item = removeApplication item , const page = await getFriendApplicationListAsRecipient offset: 0, count: 50 replaceReceivedApplications page?.applications ?? subscriptions.forEach subscription = off subscription Use a stable key based on both users and creation time. Handle a request with the accept or reject API; never mutate local state to imitate server success." + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", + "title": "List sent friend requests", + "description": "Read friend requests sent by the current account.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-applicant", + "content": "import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? Parameters are optional. Results can move while pages load, so deduplicate with participant IDs and time fields rather than array indexes. Reload after App restoration, login, or missed events." + }, + { + "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", + "title": "Get unhandled friend-request count", + "description": "Read the unhandled count displayed on the friend-request entry.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-unhandled-count", + "content": "import getFriendApplicationUnhandledCount from '@/uni modules/unix openim sdk' const count = await getFriendApplicationUnhandledCount offset: 0, count: 100 renderApplicationBadge count ?? 0 Use pagination limits agreed with the server. A nullable result is not a permanently cacheable zero. Requery after request add, accept, reject, or delete events rather than maintaining only local +1/ 1 counters across devices." + }, + { + "path": "/sdk/uniapp/user/friend-applications/accept-friend-application", + "title": "Accept a friend request", + "description": "Accept a friend request from a selected user.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications accept-friend-application", + "content": "import acceptFriendApplication from '@/uni modules/unix openim sdk' await acceptFriendApplication toUserID: 'user b', handleMsg: 'Accepted' toUserID identifies the other party. Update the request and friend stores independently from events or fresh queries. Disable duplicate actions while the request is pending; repeated handling can return a state error." + }, + { + "path": "/sdk/uniapp/user/friend-applications/refuse-friend-application", + "title": "Reject a friend request", + "description": "Reject a friend request from a selected user.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications refuse-friend-application", + "content": "import refuseFriendApplication from '@/uni modules/unix openim sdk' await refuseFriendApplication toUserID: 'user b', handleMsg: 'Not now' The handling message may be visible to the requester, so omit internal risk decisions and sensitive data. Confirm through onFriendApplicationRejected or a fresh request query. Acceptance and rejection are mutually exclusive; lock the UI action while one request is active." + }, + { + "path": "/sdk/uniapp/user/friend-applications/delete-friend-requests", + "title": "Delete friend-request records", + "description": "Commercially delete selected friend-request records in a batch.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user friend-applications delete-friend-requests", + "content": "deleteFriendRequests is Commercial . import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , Each OpenIMSimpleFriendRequest identifies an exact request. Deleting request history does not remove an established friendship. Confirm targets in the UI and reload both the list and unhandled count; after a batch failure, do not assume which records were removed." + }, + { + "path": "/sdk/uniapp/user/blacklist/get-black-list", + "title": "Get the blacklist", + "description": "Load the blacklist and process add and remove events.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist get-black-list", + "content": "import getBlackList, off, onBlackAdded, onBlackDeleted from '@/uni modules/unix openim sdk' const added = onBlackAdded user = upsertBlackUser user const deleted = onBlackDeleted user = removeBlackUser user.userID const result = await getBlackList replaceBlackList result?.blackUsers ?? off added off deleted The commercial alternative returns a differently named wrapper field: import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlackList commercialResult?.blacks ?? Do not mix the blackUsers and Commercial blacks result shapes. Blacklist and friendship are independent relationships." + }, + { + "path": "/sdk/uniapp/user/blacklist/add-black", + "title": "Add a user to the blacklist", + "description": "Add a selected user to the current account blacklist.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist add-black", + "content": "import addBlack from '@/uni modules/unix openim sdk' await addBlack toUserID: 'user b', ex: '' Confirm through onBlackAdded or a fresh blacklist snapshot. Never store tokens, private moderation evidence, or administrator only data in ex . Adding a blacklist entry does not delete local history; conversation hiding and friendship removal are separate operations." + }, + { + "path": "/sdk/uniapp/user/blacklist/remove-black", + "title": "Remove a user from the blacklist", + "description": "Remove the selected blacklist relationship.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp user blacklist remove-black", + "content": "import removeBlack from '@/uni modules/unix openim sdk' await removeBlack 'user b' Confirm through onBlackDeleted or a new snapshot. Removal does not restore a deleted friendship or recreate conversations. If repeated removal returns a relation state error, refresh the snapshot instead of retrying indefinitely." + }, + { + "path": "/sdk/uniapp/conversation/overview-conversation", + "title": "Conversation overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Conversation overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation overview-conversation", + "content": "Conversations are local indexes for direct, group, and other message streams. Use conversationID as the stable key; titles, avatars, unread counts, and latest messages are mutable snapshots. latestMsg is serialized message JSON, so preserve the conversation and show a fallback summary if parsing fails. Register onNewConversation and onConversationChanged before loading a list, merge by conversationID , and reload after login or App restoration. Unread state, message read receipts, and commercial conversation groups are related but separate workflows." + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", + "title": "Open a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Open a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-by-target", + "content": "getOneConversation resolves a conversation from session type and target ID. import getOneConversation from '@/uni modules/unix openim sdk' const result = await getOneConversation sessionType, sourceID const conversation = result?.conversation ?? null Use a user ID for direct chat or group ID for group chat. A nullable result means no current local conversation; it does not create one." + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", + "title": "Resolve a conversation ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Resolve a conversation ID.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-id", + "content": "import getConversationIDBySessionType from '@/uni modules/unix openim sdk' const conversationID = await getConversationIDBySessionType sourceID, sessionType The returned ID is the canonical local key for the given direct or group target. Use exported session type constants instead of numeric literals, and do not construct conversation IDs manually." + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", + "title": "Get conversations by ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations by ID.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversations-by-id", + "content": "import getMultipleConversation from '@/uni modules/unix openim sdk' const result = await getMultipleConversation 'single user a', 'group group a' const conversations = result?.conversations ?? Results may be shorter or differently ordered than the request. Map by conversationID and preserve placeholders for missing local conversations." + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", + "title": "Get the conversation list", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the conversation list.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations retrieve-conversation-list", + "content": "Register conversation events before loading a snapshot. Use getAllConversationList for a complete result or getConversationListSplit for pages. import getConversationListSplit, off, onConversationChanged, onNewConversation from '@/uni modules/unix openim sdk' const changed = onConversationChanged items = items.forEach upsertConversation const created = onNewConversation items = items.forEach upsertConversation const page = await getConversationListSplit offset: 0, count: 100 replaceConversations page?.conversations ?? off changed off created Paginate from offset 0, deduplicate by conversationID , and requery after account or synchronization changes." + }, + { + "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", + "title": "Search conversations", + "description": "OpenIM uni-app / uni-app x SDK guide for Search conversations.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations search-conversations", + "content": "import searchConversation from '@/uni modules/unix openim sdk' const result = await searchConversation 'project' renderConversations result?.conversations ?? This searches local conversation metadata. Reject an empty keyword in the UI, deduplicate by conversationID , and do not treat local results as an authoritative server wide search." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", + "title": "Pin or unpin a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations pin-conversation", + "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPinned: true Pass only the field being changed; use false to unpin. Apply the final onConversationChanged snapshot before re sorting instead of assuming Promise completion defines the final order." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", + "title": "Mark or unmark a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark or unmark a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation", + "content": "Conversation marking is a Commercial concept, but the frozen 0.2.0 rc.3 contract has neither markConversation nor an isMarked setter field. Do not emulate it through ex or local only state. Use a supported commercial backend capability and then refresh conversations/groups, or disable the UI." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", + "title": "Set a conversation remark", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation remark.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-remark", + "content": "Conversation remarks are Commercial , but the frozen conversation model and setter expose no standard remark field. Do not encode one into ex as if it were a Core field. Maintain it through an authoritative commercial business API and merge it into the UI." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", + "title": "Set conversation extra data", + "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation extra data.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-extension", + "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, ex: JSON.stringify color: 'blue' ex is replaced as one string, not merged. Read and merge your versioned business schema first, preserve unknown fields, and never store tokens or server only secrets." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", + "title": "Set a conversation draft", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation draft.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-draft", + "content": "import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText An empty draft clears it. Persist drafts deliberately as text, update UI from the changed conversation, and avoid storing tokens or sensitive transient editor state." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", + "title": "Set conversation message reception", + "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation message reception.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-receive-option", + "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 Use exported receive option constants rather than naked numbers. This conversation setting is distinct from the account wide option and can be constrained by both. Confirm through the changed conversation or a new query." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", + "title": "Reset group mention status", + "description": "OpenIM uni-app / uni-app x SDK guide for Reset group mention status.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-group-mentions", + "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, groupAtType: 0 Use the contract defined “no mention” value. This clears only the group mention indicator; it neither removes @ messages nor marks unread messages as read." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", + "title": "Mark a conversation as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark a conversation as read.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation-read", + "content": "Use markConversationMessageAsRead to clear normal unread state. The commercial resetConversationUnread is an additional reset entry point. Direct read receipts arrive through onRecvC2CReadReceipt . import markConversationMessageAsRead, off, onRecvC2CReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt items = mergeReadReceipts items await markConversationMessageAsRead conversationID off receiptSubscription Do not infer message level receipts solely from the conversation unread count." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", + "title": "Mark all conversations as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Mark all conversations as read.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-all-conversations-read", + "content": "import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead This clears conversation unread state for the current account. Confirm final totals from unread events or a fresh query; it does not delete messages or guarantee per message read receipts." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", + "title": "Track the total unread count", + "description": "OpenIM uni-app / uni-app x SDK guide for Track the total unread count.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations get-total-unread-count", + "content": "import getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged from '@/uni modules/unix openim sdk' const unreadSubscription = onTotalUnreadMessageCountChanged count = renderBadge count const count = await getTotalUnreadMsgCount renderBadge count ?? 0 off unreadSubscription Load a snapshot and then apply events. Requery after login or synchronization rather than maintaining only local increments." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", + "title": "Enable or disable burn after reading", + "description": "OpenIM uni-app / uni-app x SDK guide for Enable or disable burn after reading.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-private-chat", + "content": "isPrivateChat is a Commercial field accepted by the public setConversation operation. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPrivateChat: true Pass only this field. The host must still implement the corresponding product UI/security behavior; confirm the final flag from conversation updates." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", + "title": "Set the burn duration", + "description": "OpenIM uni-app / uni-app x SDK guide for Set the burn duration.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-burn-duration", + "content": "burnDuration is Commercial . import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 Use the server defined unit, range, and disabled value. Client countdown UI does not itself delete server messages; reload the conversation to confirm the setting." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", + "title": "Schedule server message deletion", + "description": "OpenIM uni-app / uni-app x SDK guide for Schedule server message deletion.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-destruct", + "content": "OpenIMConversationItem can expose commercial isMsgDestruct and msgDestructTime , but the frozen setter cannot write them. Treat them as read only Commercial state. Use an explicitly supported business API to change policy and then reload; client countdown UI is not authoritative deletion." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", + "title": "Hide a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Hide a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-a-conversation", + "content": "import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID Hiding removes the conversation from the visible list without deleting its message history. A later incoming message or product action can make it visible again; reload the list rather than deleting cached history." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", + "title": "Hide all conversations", + "description": "OpenIM uni-app / uni-app x SDK guide for Hide all conversations.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-all-conversations", + "content": "import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations This hides every current conversation without deleting message history. Treat it as a destructive list action, confirm with the user, and rebuild the snapshot after completion." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", + "title": "Delete a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation", + "content": "import deleteConversation from '@/uni modules/unix openim sdk' await deleteConversation conversationID This removes the conversation entry without promising to delete its message history. Use the explicit conversation and message operation when that is the intended product action, and confirm destructive actions in the UI." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", + "title": "Delete a conversation and its messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation and its messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation-with-messages", + "content": "import deleteConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await deleteConversationAndDeleteAllMsg conversationID This destructive operation removes the conversation and its messages according to Core/server policy. Ask for confirmation, stop writes to the conversation, and reload lists after completion." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", + "title": "Clear messages in a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear messages in a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-conversation-messages", + "content": "import clearConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await clearConversationAndDeleteAllMsg conversationID The conversation remains while its messages are cleared according to Core/server policy. Confirm the action, stop concurrent pagination/sends, and reload both conversation and message state afterward." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", + "title": "Conversation group overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Conversation group overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups overview-conversation-groups", + "content": "Conversation groups are Commercial . Keep group and membership stores synchronized from snapshots plus five events. import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, from '@/uni modules/unix openim sdk' const subscriptions = onConversationGroupAdded upsertGroup , onConversationGroupChanged upsertGroup , onConversationGroupDeleted removeGroup , onConversationGroupMemberAdded mergeMembers , onConversationGroupMemberDeleted removeMembers , subscriptions.forEach subscription = off subscription Merge by group and conversation IDs, preserve ordering, and reload snapshots after login or synchronization gaps." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", + "title": "Create a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a conversation group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups create-conversation-group", + "content": "import createConversationGroup from '@/uni modules/unix openim sdk' const group = await createConversationGroup groupName: 'Priority', conversationIDList This is Commercial . Use non empty unique conversation IDs and merge the returned group/event by its stable ID." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", + "title": "Get conversation groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversation groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-groups", + "content": "import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups replaceConversationGroups result?.groups ?? This Commercial snapshot is ordered by server/Core state. Merge later group events and reload after account or synchronization changes." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", + "title": "Get conversations in a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-info-with-conversations", + "content": "import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID The Commercial result combines group metadata with member conversations. Treat it as a snapshot and merge later group/membership events by stable IDs." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", + "title": "getConversationGroupByConversationID", + "description": "OpenIM uni-app / uni-app x SDK guide for getConversationGroupByConversationID.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-by-conversation-id", + "content": "import getConversationGroupByConversationID from '@/uni modules/unix openim sdk' const result = await getConversationGroupByConversationID conversationID This Commercial operation returns the group association for one conversation. Use the returned group ID rather than inferring membership from UI order." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", + "title": "Update a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a conversation group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups update-conversation-group", + "content": "import updateConversationGroup from '@/uni modules/unix openim sdk' await updateConversationGroup conversationGroupID, groupName: 'Important' The Commercial update changes only supplied fields. Confirm final state through onConversationGroupChanged or a fresh group query." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", + "title": "Reorder conversation groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Reorder conversation groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups set-conversation-group-order", + "content": "import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupIDList Send the complete desired unique group ID order for this Commercial operation. Serialize concurrent reorder requests and refresh after failure." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", + "title": "Add conversations to groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Add conversations to groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups add-conversations-to-groups", + "content": "import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationGroupIDList, conversationIDList This Commercial batch adds explicit conversations to explicit groups. Deduplicate both arrays and confirm membership from events or a new snapshot." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", + "title": "Remove conversations from groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Remove conversations from groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups remove-conversations-from-groups", + "content": "import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationGroupIDList, conversationIDList This Commercial batch changes group membership only; it does not hide or delete conversations. Refresh membership after partial or failed operations." + }, + { + "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", + "title": "Delete a conversation group", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups delete-conversation-group", + "content": "import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID Deleting a Commercial group does not delete its conversations or messages. Confirm destructive UI and remove the group only after the event or refreshed snapshot." + }, + { + "path": "/sdk/uniapp/group/overview-group", + "title": "Group overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Group overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group overview-group", + "content": "Groups use stable groupID keys. Build snapshots and then merge group events idempotently. import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted from '@/uni modules/unix openim sdk' const subscriptions = onGroupInfoChanged upsertGroup , onGroupDismissed removeGroup , onJoinedGroupAdded upsertGroup , onJoinedGroupDeleted removeGroup , subscriptions.forEach subscription = off subscription Treat membership roles, mute state, join policy, and commercial extension fields as server authoritative. Reload after login or synchronization gaps." + }, + { + "path": "/sdk/uniapp/group/create-group", + "title": "Create a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group create-group", + "content": "import createGroup from '@/uni modules/unix openim sdk' const result = await createGroup groupInfo: groupName: 'Project' , memberUserIDs: 'user b' Use valid group type and member IDs, then merge the returned group/event by groupID . Creation is not proof that every optional invite succeeded; reload membership when needed." + }, + { + "path": "/sdk/uniapp/group/update-group-profile", + "title": "Update group profile", + "description": "OpenIM uni-app / uni-app x SDK guide for Update group profile.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: 'New project name', faceURL: avatarURL Pass only fields that should change. The server enforces role permissions; confirm final data through onGroupInfoChanged or a new query." + }, + { + "path": "/sdk/uniapp/group/set-group-announcement", + "title": "Publish a group announcement", + "description": "OpenIM uni-app / uni-app x SDK guide for Publish a group announcement.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-announcement", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, notification: 'Release on Friday at 17:00' Send only notification , then confirm its update time and author from group information. Announcements are visible to members and must not contain secrets." + }, + { + "path": "/sdk/uniapp/group/set-group-extension", + "title": "Set group extra data", + "description": "OpenIM uni-app / uni-app x SDK guide for Set group extra data.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-extension", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, ex: JSON.stringify department: 'R&D' ex is a whole value replacement. Parse and merge the existing versioned schema, preserve unknown fields, and never place secrets in member readable data." + }, + { + "path": "/sdk/uniapp/group/set-group-join-verification", + "title": "Set group join verification", + "description": "OpenIM uni-app / uni-app x SDK guide for Set group join verification.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-join-verification", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 Use exported OpenIMGroupNeedVerification constants. The policy affects future joins, not existing members or requests; confirm from the updated group." + }, + { + "path": "/sdk/uniapp/group/set-group-member-profile-access", + "title": "Set member profile access", + "description": "OpenIM uni-app / uni-app x SDK guide for Set member profile access.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-profile-access", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 Use valid OpenIMGroupOption values. The server remains responsible for privacy enforcement; hiding a client control is not sufficient protection." + }, + { + "path": "/sdk/uniapp/group/set-group-member-friend-permission", + "title": "Set member friend request permission", + "description": "OpenIM uni-app / uni-app x SDK guide for Set member friend request permission.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-friend-permission", + "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 Use valid OpenIMGroupOption values. The server enforces this policy; UI visibility alone is not an authorization boundary." + }, + { + "path": "/sdk/uniapp/group/change-group-mute", + "title": "Change group mute status", + "description": "OpenIM uni-app / uni-app x SDK guide for Change group mute status.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group change-group-mute", + "content": "import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true The server validates moderator permissions. Confirm group wide mute from updated group information; do not assume it changes individual member mute expirations identically." + }, + { + "path": "/sdk/uniapp/group/join-group", + "title": "Apply to join a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Apply to join a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group join-group", + "content": "import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: 'Please add me', joinSource: 2, ex: '' Use the documented GroupJoinSource value and keep request text free of secrets. Promise completion may mean pending verification rather than membership; verify from application state/events." + }, + { + "path": "/sdk/uniapp/group/quit-group", + "title": "Leave a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Leave a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group quit-group", + "content": "import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID Ask for confirmation. The group owner may need to transfer ownership or dismiss the group instead. Remove local state only after an event or refreshed joined group list." + }, + { + "path": "/sdk/uniapp/group/dismiss-group", + "title": "Dismiss a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Dismiss a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group dismiss-group", + "content": "import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID This owner only destructive action ends the group according to server policy. Confirm explicitly and process onGroupDismissed ; do not equate local navigation with successful dismissal." + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", + "title": "Get group information", + "description": "OpenIM uni-app / uni-app x SDK guide for Get group information.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-specified-groups-info", + "content": "import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo 'group a', 'group b' Results can be missing or reordered. Map by groupID and treat server returned role, policy, and mute fields as authoritative snapshots." + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", + "title": "Get joined groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list", + "content": "import getJoinedGroupList from '@/uni modules/unix openim sdk' const result = await getJoinedGroupList replaceJoinedGroups result?.groups ?? Use this for a complete manageable snapshot, deduplicate by groupID , and merge joined/deleted/info events. Use the paged API for large lists." + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", + "title": "Get joined groups by page", + "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", + "content": "import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 Continue until a page returns fewer than count items. Group state may change during pagination, so deduplicate by groupID and merge events idempotently." + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", + "title": "Check group membership", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups is-join-group", + "content": "import isJoinGroup from '@/uni modules/unix openim sdk' const joined = await isJoinGroup groupID Use the returned boolean for current membership, but refresh after join/quit events or account changes. This query neither joins the group nor checks moderation permissions." + }, + { + "path": "/sdk/uniapp/group/retrieving-groups/search-groups", + "title": "Search groups", + "description": "OpenIM uni-app / uni-app x SDK guide for Search groups.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups search-groups", + "content": "import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: 'project' , isSearchGroupID: true, isSearchGroupName: true Reject empty searches, map results by groupID , and distinguish local/joined group search semantics from a server wide group directory." + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", + "title": "Get received group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get received group applications.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-recipient", + "content": "Register request events before loading the received snapshot. import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected from '@/uni modules/unix openim sdk' const subscriptions = onGroupApplicationAdded upsertRequest , onGroupApplicationAccepted upsertRequest , onGroupApplicationRejected upsertRequest , onGroupApplicationDeleted removeRequest , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceRequests result?.applications ?? subscriptions.forEach subscription = off subscription Merge with a stable group/applicant key and use explicit accept/reject operations." + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", + "title": "Get sent group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Get sent group applications.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", + "content": "import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 This lists requests sent by the current account. Deduplicate across changing pages and reload after application events or App restoration." + }, + { + "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", + "title": "Get the pending group application count", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the pending group application count.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-unhandled-count", + "content": "import getGroupApplicationUnhandledCount from '@/uni modules/unix openim sdk' const count = await getGroupApplicationUnhandledCount offset: 0, count: 100 renderGroupRequestBadge count ?? 0 Requery after add/accept/reject/delete changes instead of maintaining only local counters across devices." + }, + { + "path": "/sdk/uniapp/group/group-applications/observe-group-application-badge-count", + "title": "Get the group application badge count", + "description": "OpenIM uni-app / uni-app x SDK guide for Get the group application badge count.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications observe-group-application-badge-count", + "content": "onGroupApplicationBadgeCountChanged is Commercial . import off, onGroupApplicationBadgeCountChanged from '@/uni modules/unix openim sdk' const badgeSubscription = onGroupApplicationBadgeCountChanged count = renderGroupRequestBadge count off badgeSubscription Treat it as an incremental UI signal and reload the request/count snapshot after login or missed events. This platform event replaces the unavailable clear badge operation." + }, + { + "path": "/sdk/uniapp/group/group-applications/accept-group-application", + "title": "Accept a group application", + "description": "OpenIM uni-app / uni-app x SDK guide for Accept a group application.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications accept-group-application", + "content": "import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID, handleMsg: 'Accepted' The server validates moderator authority and request state. Disable duplicate UI actions and confirm both request and member state from events or snapshots." + }, + { + "path": "/sdk/uniapp/group/group-applications/refuse-group-application", + "title": "Reject a group application", + "description": "OpenIM uni-app / uni-app x SDK guide for Reject a group application.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications refuse-group-application", + "content": "import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID, handleMsg: 'Not accepted' Keep private moderation evidence out of the handling text. Acceptance and rejection are mutually exclusive; confirm from events or a refreshed request list." + }, + { + "path": "/sdk/uniapp/group/group-applications/delete-group-requests", + "title": "Delete group applications", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete group applications.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group group-applications delete-group-requests", + "content": "import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID This Commercial batch deletes request records, not group membership. Confirm targets and refresh both request list and count after any failure." + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", + "title": "List group members", + "description": "OpenIM uni-app / uni-app x SDK guide for List group members.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-group-member-list", + "content": "import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged from '@/uni modules/unix openim sdk' const added = onGroupMemberAdded upsertMember const deleted = onGroupMemberDeleted removeMember const changed = onGroupMemberInfoChanged upsertMember const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? off added ; off deleted ; off changed Use exported filters, paginate, and merge by groupID,userID . Reload after role or synchronization changes." + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", + "title": "Get specified group member profiles", + "description": "OpenIM uni-app / uni-app x SDK guide for Get specified group member profiles.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-specified-group-members-info", + "content": "import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList: 'user a', 'user b' Map results by userID ; missing entries can reflect non membership or access policy. Do not rely on input order." + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", + "title": "Check group membership", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-users-in-group", + "content": "import getUsersInGroup from '@/uni modules/unix openim sdk' const result = await getUsersInGroup groupID, userIDList Use this to check which requested users belong to one group. Interpret results by user ID, not position; it does not add or remove members." + }, + { + "path": "/sdk/uniapp/group/retrieving-group-members/search-group-members", + "title": "Search group members", + "description": "OpenIM uni-app / uni-app x SDK guide for Search group members.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members search-group-members", + "content": "import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: 'Alice' , isSearchUserID: true, isSearchMemberNickname: true Reject empty keywords and use explicit search flags. This searches group member data and does not replace public user lookup." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", + "title": "Invite users to a group", + "description": "OpenIM uni-app / uni-app x SDK guide for Invite users to a group.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members invite-user-to-group", + "content": "import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, userIDList: 'user b' , reason: 'Project collaboration' The server applies group policy and permissions. Promise completion does not guarantee every target joined; confirm with member events or a refreshed member list." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", + "title": "Remove group members", + "description": "OpenIM uni-app / uni-app x SDK guide for Remove group members.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members kick-group-member", + "content": "import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, userIDList: 'user b' , reason: 'Removed by moderator' Confirm this destructive moderation action and keep private evidence out of a potentially visible reason. Apply member deleted events or reload membership." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", + "title": "Update a member’s group nickname", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a member’s group nickname.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-nickname", + "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', nickname: 'Alice Design ' Send only the nickname field and confirm through member info events. The server validates who can edit each member." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", + "title": "Manage group administrators", + "description": "OpenIM uni-app / uni-app x SDK guide for Manage group administrators.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-role-level", + "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', roleLevel: 60 Use exported OpenIMGroupMemberRoleLevel constants. Role changes are high risk moderation actions; require confirmation and let the server enforce authority." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", + "title": "Update a group member’s avatar", + "description": "OpenIM uni-app / uni-app x SDK guide for Update a group member’s avatar.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-avatar", + "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', faceURL: avatarURL Upload local media first and pass a remotely reachable HTTPS URL. Do not store unifile:// or a sandbox path as a remote avatar." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", + "title": "Set a group member extension", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a group member extension.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-extension", + "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', ex: JSON.stringify title: 'PM' ex replaces the whole value. Merge a versioned schema, preserve unknown fields, and store no secrets in member visible data." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", + "title": "Transfer group ownership", + "description": "OpenIM uni-app / uni-app x SDK guide for Transfer group ownership.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members transfer-group-owner", + "content": "import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: 'user b' Require explicit confirmation: ownership and moderator permissions change immediately according to server policy. Reload group/member role state after completion." + }, + { + "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", + "title": "Mute or unmute a group member", + "description": "OpenIM uni-app / uni-app x SDK guide for Mute or unmute a group member.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members change-group-member-mute", + "content": "import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: 'user b', mutedSeconds: 600 Use server defined duration limits and the defined unmute value. Confirm from member updates; client countdown UI is not the authorization source." + }, + { + "path": "/sdk/uniapp/group/check-full-sync-state", + "title": "Check group full-sync state", + "description": "OpenIM uni-app / uni-app x SDK guide for Check group full-sync state.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp group check-full-sync-state", + "content": "The following Commercial diagnostics compare local group data with synchronized state: import checkGroupMemberFullSync, checkLocalGroupFullSync from '@/uni modules/unix openim sdk' const groupsReady = await checkLocalGroupFullSync const membersReady = await checkGroupMemberFullSync groupID Use them for recovery diagnostics and gate refreshes, not as a replacement for normal group/member queries. Retry with bounded backoff after synchronization events." + }, + { + "path": "/sdk/uniapp/message/overview-message", + "title": "Message overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Message overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message overview-message", + "content": "Use clientMsgID as the stable client identifier and merge send results, realtime events, and history by conversationID,clientMsgID . Creation only builds an OpenIMMessageItem ; sendMessage performs delivery. import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress from '@/uni modules/unix openim sdk' const send = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const file = onUploadFileProgress event = updateCurrentUpload event.progress const logs = onUploadLogsProgress event = updateLogUpload event.progress off send ; off file ; off logs Progress can repeat or skip values; only final API completion defines success. Convert unifile:// to a readable native path before local file creation." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-text-message", + "title": "Create a text message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a text message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-message", + "content": "import createTextMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' Validate product length limits first. Creation does not send; pass the returned OpenIMMessageItem to sendMessage rather than constructing one manually." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-text-at-message", + "title": "Create an @ message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an @ message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", + "content": "import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@Alice please review', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alice' , quoteMessage: null, Keep mention IDs and display metadata aligned. Commercial getAtAllTag returns the deployed “mention everyone” tag. Send the created message with a target group ID." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-custom-message", + "title": "Create a custom message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a custom message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-custom-message", + "content": "import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify orderID: 'order 123' , extension: '', descriptionText: 'Order card', All fields reach the recipient. Version and validate a shared schema and store no secrets. createAdvancedTextMessage creates entity/styled text; reject entity ranges outside the original text." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", + "title": "Create an image message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an image message from a file.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-from-full-path", + "content": "import createImageMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createImageMessageFromFullPath '/data/user/0/app/cache/photo.jpg' Commercial createImageMessage accepts structured source path metadata. Both require a readable native path. Resolve unifile:// , temporary album objects, or content URIs through the host platform and verify existence/permission before sending." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", + "title": "Create an image message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an image message from a URL.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", + "content": "import createImageMessageByURL from '@/uni modules/unix openim sdk' const message = await createImageMessageByURL pictureElem Provide uploaded source/thumbnail URLs and matching dimensions, size, and type. URLs must be accessible to conversation participants; do not place local paths in URL fields." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", + "title": "Create an audio message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an audio message from a file.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-from-full-path", + "content": "import createSoundMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createSoundMessageFromFullPath soundPath: '/data/user/0/app/cache/voice.m4a', duration: 8 Commercial createSoundMessage uses the structured form. Wait until recording is closed and readable; make duration match the actual media and the contract unit." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", + "title": "Create an audio message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an audio message from a URL.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", + "content": "import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL soundElem Use upload result URL, UUID, size, duration, and type values. The remote resource must be accessible to recipients; a sandbox path is not a media URL." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", + "title": "Create a video message from files", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a video message from files.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-from-full-path", + "content": "import createVideoMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createVideoMessageFromFullPath videoPath: '/data/user/0/app/cache/video.mp4', videoType: 'mp4', duration: 12, snapshotPath: '/data/user/0/app/cache/video cover.jpg', Commercial createVideoMessage can carry source path metadata. Video and cover must exist, be readable, and match declared type/duration." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", + "title": "Create a video message from URLs", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a video message from URLs.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", + "content": "import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoElem Populate video and cover upload metadata accurately. Both resources must be accessible to recipients and must not expose private storage credentials." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", + "title": "Create a file message from a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a file message from a file.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-from-full-path", + "content": "import createFileMessageFromFullPath from '@/uni modules/unix openim sdk' const message = await createFileMessageFromFullPath filePath: '/data/user/0/app/cache/report.pdf', fileName: 'report.pdf', Commercial createFileMessage can include source path metadata. Validate path, permission, size, and extension. Treat fileName as display text, never as a path component." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", + "title": "Create a file message from a URL", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a file message from a URL.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", + "content": "import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL fileElem Use trusted upload result URL, name, UUID, size, and type values. The URL must be accessible to recipients without exposing private storage credentials." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-card-message", + "title": "Create a contact card message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a contact card message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", + "content": "import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '' A card is a send time snapshot. Resolve current profile data by userID when opened, and never treat card fields as authenticated identity." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-location-message", + "title": "Create a location message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a location message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-location-message", + "content": "import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: 'Room A', longitude: 121.47, latitude: 31.23 Obtain user permission and validate coordinate ranges. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-face-message", + "title": "Create an emoji message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create an emoji message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-face-message", + "content": "import createFaceMessage from '@/uni modules/unix openim sdk' const message = await createFaceMessage index: 1, data: 'smile' Sender and receiver must share the same sticker package/version mapping. Render an unknown index placeholder instead of failing the message list." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-quote-message", + "title": "Create a reply message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a reply message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-quote-message", + "content": "import createQuoteMessage from '@/uni modules/unix openim sdk' const message = await createQuoteMessage text: 'Agreed', message: JSON.stringify quotedMessage Use the complete SDK message snapshot, not a fabricated ID only object. createAdvancedQuoteMessage also supports text entities. Render a safe unavailable state if the quoted source is later revoked or deleted." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-markdown-message", + "title": "Create a Markdown message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a Markdown message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-markdown-message", + "content": "import createMarkdownMessage from '@/uni modules/unix openim sdk' const message = await createMarkdownMessage content: ' Release complete ' This is Commercial . Sanitize Markdown at render time, disable unsafe HTML/scripts/URLs, and never treat raw content as trusted HTML." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-forward-message", + "title": "Create a forwarded message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a forwarded message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-forward-message", + "content": "import createForwardMessage from '@/uni modules/unix openim sdk' const forward = await createForwardMessage sourceMessage Creation does not send. Check content sharing permissions and privacy first; device local extension/send state fields are not recipient authoritative data." + }, + { + "path": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "Create a merged forward message", + "description": "OpenIM uni-app / uni-app x SDK guide for Create a merged forward message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-merger-message", + "content": "import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: 'Chat history', abstractList: 'Alice: Approved' , Keep summaries consistent with source messages, verify sharing permission and sensitive content, and limit total message count/size." + }, + { + "path": "/sdk/uniapp/message/sending-messages/send-message", + "title": "Send a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Send a message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message", + "content": "import sendMessage from '@/uni modules/unix openim sdk' const sent = await sendMessage message, recvID: 'user b', groupID: '', isOnlineOnly: false upsertMessage sent.clientMsgID, sent Set recvID for direct chat or groupID for group chat and leave the other empty. The Promise resolves directly to OpenIMMessageItem . Preserve failed messages for retry under the same clientMsgID unless your product explicitly creates a new send." + }, + { + "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", + "title": "Send an uploaded media message", + "description": "OpenIM uni-app / uni-app x SDK guide for Send an uploaded media message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", + "content": "import sendMessageNotOss from '@/uni modules/unix openim sdk' const sent = await sendMessageNotOss message, recvID, groupID Use this only when the message already contains complete remotely accessible media metadata. A local path message sent through this route may be inaccessible to recipients; use normal sendMessage for local uploads." + }, + { + "path": "/sdk/uniapp/message/receiving-messages/receive-messages", + "title": "Receive messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Receive messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-messages", + "content": "Subscribe to single, batch, offline, and online only delivery paths, then deduplicate by conversationID,clientMsgID . import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage from '@/uni modules/unix openim sdk' const subscriptions = onRecvNewMessage mergeMessage , onRecvOfflineNewMessage mergeMessage , onRecvOnlineOnlyMessage mergeOnlineOnlyMessage , onRecvNewMessages result = result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = result.messages.forEach mergeMessage , subscriptions.forEach subscription = off subscription Online only messages may not exist in history. A single application message store should own these global listeners; history queries remain necessary for snapshots and recovery." + }, + { + "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", + "title": "Receive custom business messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Receive custom business messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-custom-business-messages", + "content": "These listeners deliver opaque JSON strings. onRecvCustomBusinessMessage is public; four extension/KV listeners are Commercial and unsupported on HarmonyOS. import off, onRecvCustomBusinessMessage from '@/uni modules/unix openim sdk' function handleRawPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedBusinessEvent value catch console.error 'Invalid custom message event' const customSubscription = onRecvCustomBusinessMessage handleRawPayload off customSubscription uni app JavaScript should use protected JSON.parse . Validate version, kind, and required fields before updating state, safely ignore unknown payloads, and never log the complete string." + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/load-older-messages", + "title": "Load message history", + "description": "OpenIM uni-app / uni-app x SDK guide for Load message history.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", + "content": "import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: '', count: 50 Use an empty cursor for the first page and the earliest boundary message ID for the next. Deduplicate by clientMsgID and honor the returned end marker. Commercial getHistoryMessageList additionally supports isReverse , viewType , and lastMinSeq ; direction is a parameter, not a separate reverse history API." + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", + "title": "Find messages by ID", + "description": "OpenIM uni-app / uni-app x SDK guide for Find messages by ID.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages find-messages-by-id", + "content": "import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: 'msg a', 'msg b' Map OpenIMFindMessageResult by conversation and requested message IDs. Missing messages should not invalidate the complete batch." + }, + { + "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", + "title": "Load message context", + "description": "OpenIM uni-app / uni-app x SDK guide for Load message context.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-message-context", + "content": "import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20 This is Commercial . Use a complete SDK message as the anchor, merge duplicates by clientMsgID , and preserve chronological ordering." + }, + { + "path": "/sdk/uniapp/message/searching-messages/search-messages", + "title": "Search messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Search messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", + "content": "import searchLocalMessages from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: , messageTypeList: , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 50, Use contract defined matching and time semantics. Search covers locally synchronized/indexable data, not guaranteed full server history. Deduplicate by conversation and message ID." + }, + { + "path": "/sdk/uniapp/message/composing-messages/update-typing-status", + "title": "Report typing status", + "description": "OpenIM uni-app / uni-app x SDK guide for Report typing status.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages update-typing-status", + "content": "changeInputStates updates typing/input state; commercial typingStatusUpdate provides the legacy compatible route. Receive updates through onConversationUserInputStatusChanged . import changeInputStates, off, onConversationUserInputStatusChanged from '@/uni modules/unix openim sdk' const typingSubscription = onConversationUserInputStatusChanged state = renderTyping state await changeInputStates conversationID, focus: true off typingSubscription Debounce high frequency UI changes and expire stale indicators locally." + }, + { + "path": "/sdk/uniapp/message/composing-messages/get-typing-status", + "title": "Get typing status", + "description": "OpenIM uni-app / uni-app x SDK guide for Get typing status.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages get-typing-status", + "content": "import getInputStates from '@/uni modules/unix openim sdk' const state = await getInputStates conversationID This Commercial snapshot can become stale quickly. Combine it with typing events and a local timeout; never use it for authorization or durable presence." + }, + { + "path": "/sdk/uniapp/message/composing-messages/check-speech-to-text", + "title": "Check audio transcription availability", + "description": "OpenIM uni-app / uni-app x SDK guide for Check audio transcription availability.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", + "content": "import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities This Commercial query should gate transcription UI. Capability can vary by deployment and account; do not infer it solely from plugin version." + }, + { + "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", + "title": "Transcribe audio", + "description": "OpenIM uni-app / uni-app x SDK guide for Transcribe audio.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages transcribe-audio", + "content": "import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText soundMessage This is Commercial . Use a complete sound message, expose consent/privacy behavior, and store the returned transcript according to product policy rather than modifying the original media." + }, + { + "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", + "title": "Save a local transcript", + "description": "OpenIM uni-app / uni-app x SDK guide for Save a local transcript.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages save-local-transcript", + "content": "import setMessageLocalContent from '@/uni modules/unix openim sdk' await setMessageLocalContent conversationID, clientMsgID, content: transcript This Commercial local only value is device state and does not edit the server message. Version any structured content and avoid storing unnecessary sensitive transcript data." + }, + { + "path": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", + "title": "Translate text and messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Translate text and messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message composing-messages translate-text-and-messages", + "content": "translateText and translateMessage are Commercial on Android and iOS. HarmonyOS returns platform unsupported . import translateText from '@/uni modules/unix openim sdk' const result = await translateText text: 'Hello', targetLanguage: 'zh CN' Use the exact frozen parameter model, keep source text/message intact, and display translation as derived content. Treat language output as untrusted user visible text and preserve privacy consent." + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-local-message", + "title": "Delete a local message", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete a local message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-local-message", + "content": "import deleteMessageFromLocalStorage from '@/uni modules/unix openim sdk' await deleteMessageFromLocalStorage conversationID, clientMsgID The compatible deleteMessage uses the same parameters. This affects only local storage and must not be presented as remote deletion or revocation." + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-saved-messages", + "title": "Delete messages in a batch", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete messages in a batch.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-saved-messages", + "content": "import deleteMessages, off, onMsgDeleted from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = removeMessageByID message.clientMsgID await deleteMessages deleteParams off deletedSubscription deleteMessages is Commercial and uses OpenIMDeleteMessagesParams ; onMsgDeleted is public. Merge request/event idempotently and follow the deployed service's cross device semantics." + }, + { + "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", + "title": "Delete all messages from a user in a group chat", + "description": "OpenIM uni-app / uni-app x SDK guide for Delete all messages from a user in a group chat.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-user-messages", + "content": "import deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv from '@/uni modules/unix openim sdk' const subscription = onDeleteUserAllMsgsInConv payload = refreshAfterValidatedJson payload await deleteUserAllMessagesInConv conversationID, userID: targetUserID off subscription This Commercial range deletion requires authority and strong confirmation. Validate opaque JSON and refresh rather than depending on unfrozen fields." + }, + { + "path": "/sdk/uniapp/message/managing-messages/revoke-a-message", + "title": "Revoke a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Revoke a message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages revoke-a-message", + "content": "import off, onNewRecvMessageRevoked, revokeMessage from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked mergeRevokedInfo await revokeMessage conversationID, clientMsgID off revokedSubscription The server enforces sender, time, and permission rules. Keep a revoked placeholder instead of blindly removing the array entry; Promise and event order is not guaranteed." + }, + { + "path": "/sdk/uniapp/message/managing-messages/modify-a-message", + "title": "Modify a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Modify a message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages modify-a-message", + "content": "import modifyMessage, off, onMessageEdited, onMessageModified from '@/uni modules/unix openim sdk' const modified = onMessageModified refreshModifiedMessage const edited = onMessageEdited refreshModifiedMessage const result = await modifyMessage modifyParams off modified ; off edited These are Commercial . Validate raw event JSON, refresh by stable message ID, redact message bodies from logs, and use the server's final version for multi device conflicts." + }, + { + "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", + "title": "Get pinned messages in a conversation", + "description": "OpenIM uni-app / uni-app x SDK guide for Get pinned messages in a conversation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages get-pinned-messages", + "content": "import getConversationPinnedMsg from '@/uni modules/unix openim sdk' const result = await getConversationPinnedMsg conversationID This is Commercial . Follow returned pagination/list fields, deduplicate by clientMsgID , and reload after pin change events." + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-pinned", + "title": "Pin or unpin a message", + "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-pinned", + "content": "import off, onChangedPinnedMsg, setConversationPinnedMsg from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg pinParams off pinnedSubscription Both are Commercial . Validate the raw event and reload the pinned list instead of casting opaque JSON directly to a message." + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", + "title": "Insert a local one-to-one message", + "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local one-to-one message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-single-message", + "content": "import insertSingleMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertSingleMessageToLocalStorage insertParams Use a real OpenIMInsertSingleMessageParams with message, sender, and receiver. This inserts device local history and sends nothing; prevent ID collisions and never fake remote delivery." + }, + { + "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", + "title": "Insert a local group message", + "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local group message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-group-message", + "content": "import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage insertParams Use OpenIMInsertGroupMessageParams with group, sender, and message. This updates only local history and does not broadcast to group members." + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", + "title": "Clear all local messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear all local messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-local-messages", + "content": "import deleteAllMsgFromLocal from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocal This high risk operation clears all local messages for the account. Confirm, stop concurrent queries, and remember that server synchronization may restore some data." + }, + { + "path": "/sdk/uniapp/message/managing-messages/clear-all-messages", + "title": "Clear local and server messages", + "description": "OpenIM uni-app / uni-app x SDK guide for Clear local and server messages.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-messages", + "content": "import deleteAllMsgFromLocalAndSvr from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocalAndSvr This is a higher risk account wide local/server deletion. Explain scope/recovery, require strong confirmation, and rebuild conversation/message state after success or ambiguous failure." + }, + { + "path": "/sdk/uniapp/message/managing-messages/set-message-local-ex", + "title": "Set a local message extension", + "description": "OpenIM uni-app / uni-app x SDK guide for Set a local message extension.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-local-ex", + "content": "import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify localState localEx is device local and replaced as one value. Merge/version JSON, constrain size, and store no tokens or irreplaceable business data." + }, + { + "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", + "title": "Report group messages as read", + "description": "OpenIM uni-app / uni-app x SDK guide for Report group messages as read.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status send-group-read-receipts", + "content": "import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt refreshReadState await sendGroupMessageReadReceipt receiptParams off receiptSubscription Both are Commercial . Validate raw JSON and merge by message ID. Request completion, event arrival, and reader list updates are separate stages." + }, + { + "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", + "title": "Get members who read a group message", + "description": "OpenIM uni-app / uni-app x SDK guide for Get members who read a group message.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status get-group-message-readers", + "content": "import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList readerParams This Commercial operation uses OpenIMGetGroupMessageReaderListParams . Continue through returned pagination fields, deduplicate by userID , and refresh because new receipts can change the list." + }, + { + "path": "/sdk/uniapp/file-uploads/upload-file", + "title": "Upload a file", + "description": "OpenIM uni-app / uni-app x SDK guide for Upload a file.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", + "content": "import uploadFile from '@/uni modules/unix openim sdk' const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', Use a readable absolute native path. Resolve unifile:// first and never pass a network URL as filepath . Observe progress through onUploadFileProgress . import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' cancelUpload is Commercial . The original upload Promise defines the final state. Do not delete a temporary file while native code may still read it." + }, + { + "path": "/sdk/uniapp/calling/overview-calling", + "title": "Audio and video calling overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Audio and video calling overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling overview-calling", + "content": "Every capability in this section is Commercial and requires the commercial signaling services. unix openim sdk handles invitations, accept/reject/cancel/hangup, room credentials, and events; it does not provide call UI or render camera/audio. For complete call and meeting UI, integrate openim av runtime . It reuses this plugin's only login through typed Host RPC and never initializes another OpenIM Core. A typical flow registers all signaling events, invites with OpenIMSignalingInvitationInfo , validates the raw incoming payload, requests media permission before accepting, creates media from room credentials, and drives one session state machine from cancel/timeout/hangup/multi device events. Never persist or log token, liveURL, or raw signaling payload." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/start-single-call", + "title": "Start a one-to-one call", + "description": "OpenIM uni-app / uni-app x SDK guide for Start a one-to-one call.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", + "content": "import signalingInvite from '@/uni modules/unix openim sdk' const result = await signalingInvite invitation: inviterUserID: selfUserID, inviteeUserIDList: peerUserID , mediaType: 'video', timeout: 30, sessionType: 1 , offlinePushInfo: title: 'Video call', desc: 'Incoming call' , This is Commercial . Treat roomID , token , liveURL , and busy user results as optional; cancel an accepted invitation if presentation fails, and never log credentials." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/start-group-call", + "title": "Start a group call", + "description": "OpenIM uni-app / uni-app x SDK guide for Start a group call.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-group-call", + "content": "import signalingInviteInGroup from '@/uni modules/unix openim sdk' const result = await signalingInviteInGroup invitation: inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2 , This is Commercial . Deduplicate targets and verify current membership. Busy users do not determine later accept/reject/timeout outcomes for all other invitees." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/accept-call", + "title": "Accept a call", + "description": "OpenIM uni-app / uni-app x SDK guide for Accept a call.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", + "content": "import signalingAccept from '@/uni modules/unix openim sdk' const result = await signalingAccept invitation This is Commercial . Validate the session and obtain microphone/camera permission before sending accept. Keep optional token/room/live URL only in memory. Promise completion, remote events, and media connection are separate phases." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/reject-call", + "title": "Reject a call", + "description": "OpenIM uni-app / uni-app x SDK guide for Reject a call.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls reject-call", + "content": "import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation Use the complete received Commercial invitation; do not reconstruct it or alter roomID . Close local incoming UI and handle remote/multi device events idempotently." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/cancel-call", + "title": "Cancel a call invitation", + "description": "OpenIM uni-app / uni-app x SDK guide for Cancel a call invitation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls cancel-call", + "content": "import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation This Commercial operation is for a caller before connection; hangup is for an accepted/connecting session. Prevent duplicate actions and resolve cancel/accept races from events." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", + "title": "End a call", + "description": "OpenIM uni-app / uni-app x SDK guide for End a call.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls hang-up-call", + "content": "import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation Lock the Commercial ending transition so local, remote, and network causes cannot execute it twice. Close media resources and process onHangUp idempotently." + }, + { + "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", + "title": "Handle call events", + "description": "OpenIM uni-app / uni-app x SDK guide for Handle call events.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls handle-call-events", + "content": "All Commercial call events deliver raw JSON strings. Acknowledge quickly, validate JSON, then map to your own call domain model. import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeRejected, onReceiveNewInvitation from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const subscriptions = onReceiveNewInvitation handleCallPayload , onInviteeAccepted handleCallPayload , onInviteeRejected handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , subscriptions.forEach subscription = off subscription Also register the documented other device and room participant events. HarmonyOS returns an unsupported subscription for onStreamChange . Deduplicate by room/session plus runtime generation, and never log raw payloads or RTC tokens." + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", + "title": "Restore a pending call invitation", + "description": "OpenIM uni-app / uni-app x SDK guide for Restore a pending call invitation.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information restore-pending-invitation", + "content": "Call this Commercial operation once after event listeners are armed: import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation No invitation legitimately resolves to null . Deduplicate recovery against realtime events by room/session ID and perform only one startup request per runtime initialization." + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", + "title": "Get a group call room", + "description": "OpenIM uni-app / uni-app x SDK guide for Get a group call room.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", + "content": "import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const result = await signalingGetRoomByGroupID groupID The Commercial room ID and invitation are optional. Empty means no joinable room. Treat the snapshot as short lived and obtain a valid token immediately before joining." + }, + { + "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", + "title": "Get a call room token", + "description": "OpenIM uni-app / uni-app x SDK guide for Get a call room token.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-token-by-room-id", + "content": "import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const result = await signalingGetTokenByRoomID roomID This Commercial result contains optional token/live URL. Keep credentials only in memory, stop when fields are absent/expired, and never reuse or log an old token." + }, + { + "path": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", + "title": "Send a custom signal", + "description": "OpenIM uni-app / uni-app x SDK guide for Send a custom signal.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp calling sending-custom-signals send-a-custom-signal", + "content": "import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling from '@/uni modules/unix openim sdk' const signal = onReceiveCustomSignal handleValidatedSignal const signaling = onReceiveCustomSignaling handleValidatedSignal await signalingSendCustomSignaling roomID, customInfo: JSON.stringify type: 'raise hand', version: 1 off signal ; off signaling These are Commercial . Compatible platforms may use either receive event, so deduplicate by event ID/content hash. Validate type/version/fields; custom content is not authorization and must not contain secrets." + }, + { + "path": "/sdk/uniapp/events/overview-events", + "title": "Events overview", + "description": "OpenIM uni-app / uni-app x SDK guide for Events overview.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp events overview-events", + "content": "Every on... call synchronously returns an OpenIMSDKEventSubscription with id and eventName . Release only your handle with off subscription . import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart from '@/uni modules/unix openim sdk' const subscriptions = onSyncServerStart reinstalled = beginSyncUI reinstalled , onSyncServerProgress updateSyncProgress , onSyncServerFinish reinstalled = finishSyncUI reinstalled , onSyncServerFailed reinstalled = failSyncUI reinstalled , subscriptions.forEach subscription = off subscription The boolean describes the contract's reinstall/sync context, not success. offAll eventName removes every handler for an event and is reserved for full App reset or controlled tests. HarmonyOS returns unsupported subscriptions for ten unavailable events: four migrations plus the documented message extension/KV, badge, and stream events. It never fabricates success. Handlers should return quickly and queue expensive work." + }, + { + "path": "/sdk/uniapp/events/handle-data-migration-events", + "title": "Handle data migration events", + "description": "OpenIM uni-app / uni-app x SDK guide for Handle data migration events.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp events handle-data-migration-events", + "content": "These four Commercial events are available on Android/iOS and return unsupported subscriptions on HarmonyOS. import off, onMigrationFailed, onMigrationFinished, onMigrationProgress, onMigrationStart from '@/uni modules/unix openim sdk' const subscriptions = onMigrationStart showMigrationUI , onMigrationProgress handleValidatedMigrationProgress , onMigrationFailed handleValidatedMigrationFailure , onMigrationFinished finishMigrationUI , subscriptions.forEach subscription = off subscription Progress/failure payloads are opaque strings. Validate JSON before reading it and redact paths, database details, and sensitive content. Avoid account switching or uninitialization during migration; reload snapshots after completion/failure." + }, + { + "path": "/sdk/uniapp/logger", + "title": "Logging", + "description": "OpenIM uni-app / uni-app x SDK guide for Logging.", + "context": "SDKs · uni-app / uni-app x · v4", + "keywords": "sdk uniapp v4 sdk uniapp logger", + "content": "Configure logLevel , isLogStandardOutput , and optional logFilePath during initialization. Use the lowest production level that supports diagnosis and redact tokens, private content, and commercial credentials. import uploadLogs from '@/uni modules/unix openim sdk' const operationID = diagnostic $ Date.now await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , operationID operationID is an optional diagnostic correlation value, not a user ID, idempotency key, or credential. Upload progress belongs to onUploadLogsProgress ; completion does not itself open a support case. Obtain user consent, limit line count/retries, keep ex redacted, disable verbose production output, and never upload the entire local database as a shortcut." }, { "path": "/sdk/wasm/overview", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index e4192c56ac..6b64991525 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -5,173 +5,173 @@ "manualPageCount": 167, "pendingPaths": [], "reviewStates": { - "/sdk/uniapp/overview": "api-verified", - "/sdk/uniapp/getting-started/before-you-start": "api-verified", - "/sdk/uniapp/getting-started/environment-specific-implementation": "api-verified", - "/sdk/uniapp/getting-started/authenticate-and-manage-session": "api-verified", - "/sdk/uniapp/getting-started/send-first-message": "api-verified", - "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk": "api-verified", - "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state": "api-verified", - "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session": "api-verified", - "/sdk/uniapp/user/overview-user": "api-verified", - "/sdk/uniapp/user/profile/get-users-info": "api-verified", - "/sdk/uniapp/user/profile/get-self-user-info": "api-verified", - "/sdk/uniapp/user/profile/set-self-info": "api-verified", - "/sdk/uniapp/user/profile/set-global-message-reception": "api-verified", - "/sdk/uniapp/user/profile/set-friend-add-permission": "api-verified", - "/sdk/uniapp/user/online-status/subscribe-users-status": "api-verified", - "/sdk/uniapp/user/online-status/get-subscribe-users-status": "api-verified", - "/sdk/uniapp/user/online-status/unsubscribe-users-status": "api-verified", - "/sdk/uniapp/user/friends/get-friend-list-page": "api-verified", - "/sdk/uniapp/user/friends/search-friends": "api-verified", - "/sdk/uniapp/user/friends/get-specified-friends-info": "api-verified", - "/sdk/uniapp/user/friends/check-friend": "api-verified", - "/sdk/uniapp/user/friends/update-friends": "api-verified", - "/sdk/uniapp/user/friends/delete-friend": "api-verified", - "/sdk/uniapp/user/friend-applications/add-friend": "api-verified", - "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": "api-verified", - "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": "api-verified", - "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count": "api-verified", - "/sdk/uniapp/user/friend-applications/accept-friend-application": "api-verified", - "/sdk/uniapp/user/friend-applications/refuse-friend-application": "api-verified", - "/sdk/uniapp/user/friend-applications/delete-friend-requests": "api-verified", - "/sdk/uniapp/user/blacklist/get-black-list": "api-verified", - "/sdk/uniapp/user/blacklist/add-black": "api-verified", - "/sdk/uniapp/user/blacklist/remove-black": "api-verified", - "/sdk/uniapp/conversation/overview-conversation": "api-verified", - "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target": "api-verified", - "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id": "api-verified", - "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id": "api-verified", - "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list": "api-verified", - "/sdk/uniapp/conversation/retrieving-conversations/search-conversations": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/pin-conversation": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/mark-conversation": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-private-chat": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-burn-duration": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/set-message-destruct": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/delete-conversation": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages": "api-verified", - "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups": "api-verified", - "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group": "api-verified", - "/sdk/uniapp/group/overview-group": "api-verified", - "/sdk/uniapp/group/create-group": "api-verified", - "/sdk/uniapp/group/update-group-profile": "api-verified", - "/sdk/uniapp/group/set-group-announcement": "api-verified", - "/sdk/uniapp/group/set-group-extension": "api-verified", - "/sdk/uniapp/group/set-group-join-verification": "api-verified", - "/sdk/uniapp/group/set-group-member-profile-access": "api-verified", - "/sdk/uniapp/group/set-group-member-friend-permission": "api-verified", - "/sdk/uniapp/group/change-group-mute": "api-verified", - "/sdk/uniapp/group/join-group": "api-verified", - "/sdk/uniapp/group/quit-group": "api-verified", - "/sdk/uniapp/group/dismiss-group": "api-verified", - "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info": "api-verified", - "/sdk/uniapp/group/retrieving-groups/get-joined-group-list": "api-verified", - "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": "api-verified", - "/sdk/uniapp/group/retrieving-groups/is-join-group": "api-verified", - "/sdk/uniapp/group/retrieving-groups/search-groups": "api-verified", - "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient": "api-verified", - "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": "api-verified", - "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count": "api-verified", - "/sdk/uniapp/group/group-applications/observe-group-application-badge-count": "api-verified", - "/sdk/uniapp/group/group-applications/accept-group-application": "api-verified", - "/sdk/uniapp/group/group-applications/refuse-group-application": "api-verified", - "/sdk/uniapp/group/group-applications/delete-group-requests": "api-verified", - "/sdk/uniapp/group/retrieving-group-members/get-group-member-list": "api-verified", - "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info": "api-verified", - "/sdk/uniapp/group/retrieving-group-members/get-users-in-group": "api-verified", - "/sdk/uniapp/group/retrieving-group-members/search-group-members": "api-verified", - "/sdk/uniapp/group/managing-group-members/invite-user-to-group": "api-verified", - "/sdk/uniapp/group/managing-group-members/kick-group-member": "api-verified", - "/sdk/uniapp/group/managing-group-members/set-group-member-nickname": "api-verified", - "/sdk/uniapp/group/managing-group-members/set-group-member-role-level": "api-verified", - "/sdk/uniapp/group/managing-group-members/set-group-member-avatar": "api-verified", - "/sdk/uniapp/group/managing-group-members/set-group-member-extension": "api-verified", - "/sdk/uniapp/group/managing-group-members/transfer-group-owner": "api-verified", - "/sdk/uniapp/group/managing-group-members/change-group-member-mute": "api-verified", - "/sdk/uniapp/group/check-full-sync-state": "api-verified", - "/sdk/uniapp/message/overview-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-text-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-text-at-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-custom-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path": "api-verified", - "/sdk/uniapp/message/creating-messages/create-image-message-by-url": "api-verified", - "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path": "api-verified", - "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": "api-verified", - "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path": "api-verified", - "/sdk/uniapp/message/creating-messages/create-video-message-by-url": "api-verified", - "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path": "api-verified", - "/sdk/uniapp/message/creating-messages/create-file-message-by-url": "api-verified", - "/sdk/uniapp/message/creating-messages/create-card-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-location-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-face-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-quote-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-markdown-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-forward-message": "api-verified", - "/sdk/uniapp/message/creating-messages/create-merger-message": "api-verified", - "/sdk/uniapp/message/sending-messages/send-message": "api-verified", - "/sdk/uniapp/message/sending-messages/send-message-not-oss": "api-verified", - "/sdk/uniapp/message/receiving-messages/receive-messages": "api-verified", - "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages": "api-verified", - "/sdk/uniapp/message/retrieving-messages/load-older-messages": "api-verified", - "/sdk/uniapp/message/retrieving-messages/find-messages-by-id": "api-verified", - "/sdk/uniapp/message/retrieving-messages/load-message-context": "api-verified", - "/sdk/uniapp/message/searching-messages/search-messages": "api-verified", - "/sdk/uniapp/message/composing-messages/update-typing-status": "api-verified", - "/sdk/uniapp/message/composing-messages/get-typing-status": "api-verified", - "/sdk/uniapp/message/composing-messages/check-speech-to-text": "api-verified", - "/sdk/uniapp/message/composing-messages/transcribe-audio": "api-verified", - "/sdk/uniapp/message/composing-messages/save-local-transcript": "api-verified", - "/sdk/uniapp/message/composing-messages/translate-text-and-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/delete-local-message": "api-verified", - "/sdk/uniapp/message/managing-messages/delete-saved-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/delete-user-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/revoke-a-message": "api-verified", - "/sdk/uniapp/message/managing-messages/modify-a-message": "api-verified", - "/sdk/uniapp/message/managing-messages/get-pinned-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/set-message-pinned": "api-verified", - "/sdk/uniapp/message/managing-messages/insert-local-single-message": "api-verified", - "/sdk/uniapp/message/managing-messages/insert-local-group-message": "api-verified", - "/sdk/uniapp/message/managing-messages/clear-all-local-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/clear-all-messages": "api-verified", - "/sdk/uniapp/message/managing-messages/set-message-local-ex": "api-verified", - "/sdk/uniapp/message/managing-read-status/send-group-read-receipts": "api-verified", - "/sdk/uniapp/message/managing-read-status/get-group-message-readers": "api-verified", - "/sdk/uniapp/file-uploads/upload-file": "api-verified", - "/sdk/uniapp/calling/overview-calling": "api-verified", - "/sdk/uniapp/calling/managing-calls/start-single-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/start-group-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/accept-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/reject-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/cancel-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/hang-up-call": "api-verified", - "/sdk/uniapp/calling/managing-calls/handle-call-events": "api-verified", - "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation": "api-verified", - "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": "api-verified", - "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id": "api-verified", - "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal": "api-verified", - "/sdk/uniapp/events/overview-events": "api-verified", - "/sdk/uniapp/events/handle-data-migration-events": "api-verified", - "/sdk/uniapp/logger": "api-verified" + "/sdk/uniapp/overview": "published", + "/sdk/uniapp/getting-started/before-you-start": "published", + "/sdk/uniapp/getting-started/environment-specific-implementation": "published", + "/sdk/uniapp/getting-started/authenticate-and-manage-session": "published", + "/sdk/uniapp/getting-started/send-first-message": "published", + "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk": "published", + "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state": "published", + "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session": "published", + "/sdk/uniapp/user/overview-user": "published", + "/sdk/uniapp/user/profile/get-users-info": "published", + "/sdk/uniapp/user/profile/get-self-user-info": "published", + "/sdk/uniapp/user/profile/set-self-info": "published", + "/sdk/uniapp/user/profile/set-global-message-reception": "published", + "/sdk/uniapp/user/profile/set-friend-add-permission": "published", + "/sdk/uniapp/user/online-status/subscribe-users-status": "published", + "/sdk/uniapp/user/online-status/get-subscribe-users-status": "published", + "/sdk/uniapp/user/online-status/unsubscribe-users-status": "published", + "/sdk/uniapp/user/friends/get-friend-list-page": "published", + "/sdk/uniapp/user/friends/search-friends": "published", + "/sdk/uniapp/user/friends/get-specified-friends-info": "published", + "/sdk/uniapp/user/friends/check-friend": "published", + "/sdk/uniapp/user/friends/update-friends": "published", + "/sdk/uniapp/user/friends/delete-friend": "published", + "/sdk/uniapp/user/friend-applications/add-friend": "published", + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": "published", + "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": "published", + "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count": "published", + "/sdk/uniapp/user/friend-applications/accept-friend-application": "published", + "/sdk/uniapp/user/friend-applications/refuse-friend-application": "published", + "/sdk/uniapp/user/friend-applications/delete-friend-requests": "published", + "/sdk/uniapp/user/blacklist/get-black-list": "published", + "/sdk/uniapp/user/blacklist/add-black": "published", + "/sdk/uniapp/user/blacklist/remove-black": "published", + "/sdk/uniapp/conversation/overview-conversation": "published", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target": "published", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id": "published", + "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id": "published", + "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list": "published", + "/sdk/uniapp/conversation/retrieving-conversations/search-conversations": "published", + "/sdk/uniapp/conversation/managing-conversations/pin-conversation": "published", + "/sdk/uniapp/conversation/managing-conversations/mark-conversation": "published", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark": "published", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension": "published", + "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft": "published", + "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option": "published", + "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions": "published", + "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read": "published", + "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read": "published", + "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count": "published", + "/sdk/uniapp/conversation/managing-conversations/set-private-chat": "published", + "/sdk/uniapp/conversation/managing-conversations/set-burn-duration": "published", + "/sdk/uniapp/conversation/managing-conversations/set-message-destruct": "published", + "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation": "published", + "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations": "published", + "/sdk/uniapp/conversation/managing-conversations/delete-conversation": "published", + "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages": "published", + "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups": "published", + "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group": "published", + "/sdk/uniapp/group/overview-group": "published", + "/sdk/uniapp/group/create-group": "published", + "/sdk/uniapp/group/update-group-profile": "published", + "/sdk/uniapp/group/set-group-announcement": "published", + "/sdk/uniapp/group/set-group-extension": "published", + "/sdk/uniapp/group/set-group-join-verification": "published", + "/sdk/uniapp/group/set-group-member-profile-access": "published", + "/sdk/uniapp/group/set-group-member-friend-permission": "published", + "/sdk/uniapp/group/change-group-mute": "published", + "/sdk/uniapp/group/join-group": "published", + "/sdk/uniapp/group/quit-group": "published", + "/sdk/uniapp/group/dismiss-group": "published", + "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info": "published", + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list": "published", + "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": "published", + "/sdk/uniapp/group/retrieving-groups/is-join-group": "published", + "/sdk/uniapp/group/retrieving-groups/search-groups": "published", + "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient": "published", + "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": "published", + "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count": "published", + "/sdk/uniapp/group/group-applications/observe-group-application-badge-count": "published", + "/sdk/uniapp/group/group-applications/accept-group-application": "published", + "/sdk/uniapp/group/group-applications/refuse-group-application": "published", + "/sdk/uniapp/group/group-applications/delete-group-requests": "published", + "/sdk/uniapp/group/retrieving-group-members/get-group-member-list": "published", + "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info": "published", + "/sdk/uniapp/group/retrieving-group-members/get-users-in-group": "published", + "/sdk/uniapp/group/retrieving-group-members/search-group-members": "published", + "/sdk/uniapp/group/managing-group-members/invite-user-to-group": "published", + "/sdk/uniapp/group/managing-group-members/kick-group-member": "published", + "/sdk/uniapp/group/managing-group-members/set-group-member-nickname": "published", + "/sdk/uniapp/group/managing-group-members/set-group-member-role-level": "published", + "/sdk/uniapp/group/managing-group-members/set-group-member-avatar": "published", + "/sdk/uniapp/group/managing-group-members/set-group-member-extension": "published", + "/sdk/uniapp/group/managing-group-members/transfer-group-owner": "published", + "/sdk/uniapp/group/managing-group-members/change-group-member-mute": "published", + "/sdk/uniapp/group/check-full-sync-state": "published", + "/sdk/uniapp/message/overview-message": "published", + "/sdk/uniapp/message/creating-messages/create-text-message": "published", + "/sdk/uniapp/message/creating-messages/create-text-at-message": "published", + "/sdk/uniapp/message/creating-messages/create-custom-message": "published", + "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path": "published", + "/sdk/uniapp/message/creating-messages/create-image-message-by-url": "published", + "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path": "published", + "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": "published", + "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path": "published", + "/sdk/uniapp/message/creating-messages/create-video-message-by-url": "published", + "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path": "published", + "/sdk/uniapp/message/creating-messages/create-file-message-by-url": "published", + "/sdk/uniapp/message/creating-messages/create-card-message": "published", + "/sdk/uniapp/message/creating-messages/create-location-message": "published", + "/sdk/uniapp/message/creating-messages/create-face-message": "published", + "/sdk/uniapp/message/creating-messages/create-quote-message": "published", + "/sdk/uniapp/message/creating-messages/create-markdown-message": "published", + "/sdk/uniapp/message/creating-messages/create-forward-message": "published", + "/sdk/uniapp/message/creating-messages/create-merger-message": "published", + "/sdk/uniapp/message/sending-messages/send-message": "published", + "/sdk/uniapp/message/sending-messages/send-message-not-oss": "published", + "/sdk/uniapp/message/receiving-messages/receive-messages": "published", + "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages": "published", + "/sdk/uniapp/message/retrieving-messages/load-older-messages": "published", + "/sdk/uniapp/message/retrieving-messages/find-messages-by-id": "published", + "/sdk/uniapp/message/retrieving-messages/load-message-context": "published", + "/sdk/uniapp/message/searching-messages/search-messages": "published", + "/sdk/uniapp/message/composing-messages/update-typing-status": "published", + "/sdk/uniapp/message/composing-messages/get-typing-status": "published", + "/sdk/uniapp/message/composing-messages/check-speech-to-text": "published", + "/sdk/uniapp/message/composing-messages/transcribe-audio": "published", + "/sdk/uniapp/message/composing-messages/save-local-transcript": "published", + "/sdk/uniapp/message/composing-messages/translate-text-and-messages": "published", + "/sdk/uniapp/message/managing-messages/delete-local-message": "published", + "/sdk/uniapp/message/managing-messages/delete-saved-messages": "published", + "/sdk/uniapp/message/managing-messages/delete-user-messages": "published", + "/sdk/uniapp/message/managing-messages/revoke-a-message": "published", + "/sdk/uniapp/message/managing-messages/modify-a-message": "published", + "/sdk/uniapp/message/managing-messages/get-pinned-messages": "published", + "/sdk/uniapp/message/managing-messages/set-message-pinned": "published", + "/sdk/uniapp/message/managing-messages/insert-local-single-message": "published", + "/sdk/uniapp/message/managing-messages/insert-local-group-message": "published", + "/sdk/uniapp/message/managing-messages/clear-all-local-messages": "published", + "/sdk/uniapp/message/managing-messages/clear-all-messages": "published", + "/sdk/uniapp/message/managing-messages/set-message-local-ex": "published", + "/sdk/uniapp/message/managing-read-status/send-group-read-receipts": "published", + "/sdk/uniapp/message/managing-read-status/get-group-message-readers": "published", + "/sdk/uniapp/file-uploads/upload-file": "published", + "/sdk/uniapp/calling/overview-calling": "published", + "/sdk/uniapp/calling/managing-calls/start-single-call": "published", + "/sdk/uniapp/calling/managing-calls/start-group-call": "published", + "/sdk/uniapp/calling/managing-calls/accept-call": "published", + "/sdk/uniapp/calling/managing-calls/reject-call": "published", + "/sdk/uniapp/calling/managing-calls/cancel-call": "published", + "/sdk/uniapp/calling/managing-calls/hang-up-call": "published", + "/sdk/uniapp/calling/managing-calls/handle-call-events": "published", + "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation": "published", + "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": "published", + "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id": "published", + "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal": "published", + "/sdk/uniapp/events/overview-events": "published", + "/sdk/uniapp/events/handle-data-migration-events": "published", + "/sdk/uniapp/logger": "published" }, "navigationLabels": { "Accept a call": "接受通话", @@ -272,6 +272,7 @@ "Environment-specific implementation": "按运行环境接入", "environment-specific-implementation": "按运行环境接入", "events": "事件", + "Event overview": "事件概览", "Events": "事件", "Events overview": "事件概览", "File upload overview": "文件上传概览", @@ -287,6 +288,7 @@ "Get conversations in a group": "查询分组内会话", "Get friend profiles": "查询指定好友资料", "Get group application badge count": "获取入群申请角标数", + "Observe group application badge count": "观察群申请角标变化", "Get group information": "查询指定群组资料", "Get group member profiles": "查询指定群成员资料", "Get group members": "分页查询群成员", From 07cef87157980a30a70d00969fd785ab3413f1e5 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 14:19:07 +0800 Subject: [PATCH 09/20] fix(docs): render UTS examples in production --- package.json | 2 +- .../__tests__/production-route-smoke.test.mjs | 24 +++++ scripts/check-production-routes.mjs | 99 +++++++++++++++++++ source.config.ts | 13 ++- 4 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 scripts/__tests__/production-route-smoke.test.mjs create mode 100644 scripts/check-production-routes.mjs diff --git a/package.json b/package.json index 3d25ce1c0f..334c1dfdc2 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "structure:sync": "node scripts/import-structure.mjs", "structure:report": "pnpm content:metadata && node scripts/structure-report.mjs && prettier --write docs/STRUCTURE_REPORT.md", "check": "eslint . && tsc --noEmit && pnpm test:audit && node scripts/check-content.mjs && node scripts/check-guides-content-audit.mjs && node scripts/check-wasm-content-audit.mjs && node scripts/check-localized-sdk-content.mjs && node scripts/check-client-sdk-content-audit.mjs && node scripts/check-wasm-sdk-examples.mjs && pnpm docsets-sync:lint-openapi && pnpm platform-api:test", - "postbuild": "node scripts/prepare-standalone.mjs", + "postbuild": "node scripts/prepare-standalone.mjs && node scripts/check-production-routes.mjs", "content:sync": "node scripts/build-wasm-sdk-zh-content.mjs && node scripts/build-client-sdk-zh-content.mjs ios flutter uniapp && node scripts/build-search-index.mjs", "guides:sync": "node scripts/import-openim-guides.mjs", "platform-api:sync": "node scripts/import-openim-platform-api.mjs && node scripts/sync-openim-user-api.mjs && node scripts/sync-openim-friend-api.mjs && node scripts/sync-openim-group-api.mjs && node scripts/sync-openim-auth-api.mjs && node scripts/sync-openim-third-api.mjs && node scripts/sync-openim-msg-api.mjs && node scripts/sync-openim-conversation-api.mjs && node scripts/sync-openim-platform-api-order.mjs && node scripts/sync-openim-platform-api-english.mjs && node scripts/build-search-index.mjs", diff --git a/scripts/__tests__/production-route-smoke.test.mjs b/scripts/__tests__/production-route-smoke.test.mjs new file mode 100644 index 0000000000..acde751b27 --- /dev/null +++ b/scripts/__tests__/production-route-smoke.test.mjs @@ -0,0 +1,24 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import test from 'node:test'; + +const sourceConfig = readFileSync(new URL('../../source.config.ts', import.meta.url), 'utf8'); +const packageJson = JSON.parse( + readFileSync(new URL('../../package.json', import.meta.url), 'utf8'), +); +const smokeScript = readFileSync( + new URL('../check-production-routes.mjs', import.meta.url), + 'utf8', +); + +test('maps UTS examples to a supported Shiki grammar', () => { + assert.match(sourceConfig, /langs:\s*\['typescript'\]/); + assert.match(sourceConfig, /langAlias:\s*\{\s*uts:\s*'typescript'\s*\}/); +}); + +test('production build requests every published uni-app route', () => { + assert.match(packageJson.scripts.postbuild, /check-production-routes\.mjs/); + assert.match(smokeScript, /uniapp-content-audit\.json/); + assert.match(smokeScript, /reviewStatus === 'published'/); + assert.match(smokeScript, /response\.status !== 200/); +}); diff --git a/scripts/check-production-routes.mjs b/scripts/check-production-routes.mjs new file mode 100644 index 0000000000..d9420c5c3b --- /dev/null +++ b/scripts/check-production-routes.mjs @@ -0,0 +1,99 @@ +import { spawn } from 'node:child_process'; +import { readFile } from 'node:fs/promises'; +import process from 'node:process'; + +const audit = JSON.parse( + await readFile(new URL('../data/structure/uniapp-content-audit.json', import.meta.url), 'utf8'), +); + +const routes = audit.pages.flatMap((page) => { + const paths = []; + if (page.locales?.en?.reviewStatus === 'published') paths.push(page.currentPath); + if (page.locales?.zh?.reviewStatus === 'published') paths.push(`/zh${page.currentPath}`); + return paths; +}); + +if (routes.length === 0) throw new Error('No published uni-app routes found for production smoke.'); + +const externalBaseURL = process.env.OPENIM_DOCS_BASE_URL; +const port = Number(process.env.OPENIM_DOCS_SMOKE_PORT ?? 31000 + (process.pid % 1000)); +const baseURL = externalBaseURL ?? `http://127.0.0.1:${port}`; +let server; +let serverOutput = ''; + +if (!externalBaseURL) { + server = spawn(process.execPath, ['.next/standalone/server.js'], { + env: { ...process.env, HOSTNAME: '127.0.0.1', PORT: String(port) }, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + server.stdout.on('data', (chunk) => { + serverOutput += chunk.toString(); + }); + server.stderr.on('data', (chunk) => { + serverOutput += chunk.toString(); + }); + + try { + await waitUntilReady(baseURL, server); + } catch (error) { + throw new Error(`${error.message}\n${serverOutput.trim()}`); + } +} + +try { + const failures = []; + await mapConcurrent(routes, 6, async (route) => { + try { + const response = await fetch(`${baseURL}${route}`, { redirect: 'manual' }); + if (response.status !== 200) failures.push(`${response.status} ${route}`); + await response.arrayBuffer(); + } catch (error) { + failures.push(`request failed ${route}: ${error instanceof Error ? error.message : error}`); + } + }); + + if (failures.length > 0) { + throw new Error( + `Production route smoke failed for ${failures.length}/${routes.length} uni-app routes:\n${failures.join('\n')}\n${serverOutput.trim()}`, + ); + } + + console.log(`Production route smoke passed for ${routes.length} published uni-app routes.`); +} finally { + if (server && server.exitCode === null) { + server.kill('SIGTERM'); + await Promise.race([ + new Promise((resolve) => server.once('exit', resolve)), + new Promise((resolve) => setTimeout(resolve, 2_000)), + ]); + } +} + +async function waitUntilReady(url, child) { + const deadline = Date.now() + 20_000; + while (Date.now() < deadline) { + if (child.exitCode !== null) throw new Error(`Production server exited with ${child.exitCode}.`); + try { + const response = await fetch(url, { redirect: 'manual' }); + await response.arrayBuffer(); + return; + } catch { + await new Promise((resolve) => setTimeout(resolve, 100)); + } + } + throw new Error(`Production server did not become ready at ${url}.`); +} + +async function mapConcurrent(items, concurrency, fn) { + let cursor = 0; + await Promise.all( + Array.from({ length: Math.min(concurrency, items.length) }, async () => { + while (cursor < items.length) { + const index = cursor; + cursor += 1; + await fn(items[index]); + } + }), + ); +} diff --git a/source.config.ts b/source.config.ts index 31523071fd..90ce1c59f0 100644 --- a/source.config.ts +++ b/source.config.ts @@ -22,4 +22,15 @@ export const docs = defineDocs({ }, }); -export default defineConfig(); +export default defineConfig({ + mdxOptions: { + rehypeCodeOptions: { + themes: { light: 'github-light', dark: 'github-dark' }, + // UTS follows TypeScript syntax for the examples in this docset. Shiki + // does not ship a dedicated UTS grammar, so keep the public `uts` fence + // while highlighting it with the TypeScript grammar. + langs: ['typescript'], + langAlias: { uts: 'typescript' }, + }, + }, +}); From 0b581cffb53dbff2b46bea2a7e3b3b1e40acbf23 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:06:49 +0800 Subject: [PATCH 10/20] docs(uniapp): align core guides with wasm standards --- .../message/sending-messages/send-message.mdx | 28 +- .../user/friends/get-friend-list-page.mdx | 66 ++- .../add-conversations-to-groups.mdx | 13 +- .../create-conversation-group.mdx | 16 +- .../delete-conversation-group.mdx | 8 +- ...ersation-group-info-with-conversations.mdx | 20 +- .../get-conversation-groups.mdx | 10 +- .../overview-conversation-groups.mdx | 44 +- .../remove-conversations-from-groups.mdx | 13 +- .../set-conversation-group-order.mdx | 15 +- .../update-conversation-group.mdx | 15 +- .../hide-a-conversation.mdx | 8 +- .../hide-all-conversations.mdx | 6 +- .../mark-all-conversations-read.mdx | 4 +- .../mark-conversation-read.mdx | 6 + .../set-burn-duration.mdx | 6 +- .../set-conversation-draft.mdx | 14 +- .../set-message-destruct.mdx | 8 +- .../set-message-receive-option.mdx | 6 +- .../conversation/overview-conversation.mdx | 73 ++- .../get-conversation-by-target.mdx | 11 +- .../retrieve-conversation-list.mdx | 48 +- .../sdk/uniapp/events/overview-events.mdx | 105 +++- .../authenticate-and-manage-session.mdx | 230 +++++++-- .../getting-started/before-you-start.mdx | 97 +++- .../environment-specific-implementation.mdx | 133 ++++- .../getting-started/send-first-message.mdx | 148 ++++-- content/zh/docs/chat/sdk/uniapp/logger.mdx | 144 +++++- .../message/sending-messages/send-message.mdx | 27 +- .../uniapp/user/blacklist/get-black-list.mdx | 94 +++- .../delete-friend-requests.mdx | 15 +- ...t-friend-application-list-as-applicant.mdx | 13 +- ...t-friend-application-list-as-recipient.mdx | 86 +++- .../user/friends/get-friend-list-page.mdx | 69 ++- .../uniapp/user/friends/search-friends.mdx | 15 +- .../uniapp/user/friends/update-friends.mdx | 15 +- .../online-status/subscribe-users-status.mdx | 61 ++- .../chat/sdk/uniapp/user/overview-user.mdx | 57 ++- .../user/profile/get-self-user-info.mdx | 35 +- .../uniapp/user/profile/get-users-info.mdx | 83 +++- .../profile/set-global-message-reception.mdx | 33 +- .../sdk/uniapp/user/profile/set-self-info.mdx | 52 +- data/structure/uniapp-content-audit.json | 90 ++-- package.json | 2 +- .../uniapp-wasm-content-parity.test.mjs | 16 + scripts/check-uniapp-wasm-content-parity.mjs | 80 +++ src/generated/search-index-zh.json | 82 ++-- src/generated/search-index.json | 10 +- src/generated/uniapp-sdk-zh-content.json | 458 ++++++++++++++---- 49 files changed, 2195 insertions(+), 493 deletions(-) create mode 100644 scripts/__tests__/uniapp-wasm-content-parity.test.mjs create mode 100644 scripts/check-uniapp-wasm-content-parity.mjs diff --git a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx index ad72a9e318..5047711844 100644 --- a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx @@ -1,6 +1,6 @@ --- title: 'Send a message' -description: 'OpenIM uni-app / uni-app x SDK guide for Send a message.' +description: 'Send a pending message object with the uni-app / uni-app x SDK.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' @@ -11,11 +11,31 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/sending-messages/send-message' --- +`sendMessage()` sends an `OpenIMMessageItem` returned by a message creation API. For a one-to-one chat, set only `recvID`; for a group chat, set only `groupID`. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `recvID` | `string` | Conditional | Recipient's user ID for a one-to-one chat. Pass an empty string for a group chat. | +| `groupID` | `string` | Conditional | Target group ID for a group chat. Pass an empty string for a one-to-one chat. | +| `message` | `OpenIMMessageItem` | Yes | Pending message object to send. | +| `offlinePushInfo` | `OpenIMOfflinePush` | No | Offline push configuration. | +| `isOnlineOnly` | `boolean` | No | Whether to deliver only to online clients. Online-only messages are not stored in local history. | + ```uts import { sendMessage } from '@/uni_modules/unix-openim-sdk' -const sent = await sendMessage({ message, recvID: 'user_b', groupID: '', isOnlineOnly: false }) -upsertMessage(sent.clientMsgID, sent) +const sentMessage = await sendMessage({ + recvID: receiverUserID, + groupID: '', + message, + isOnlineOnly: false, +}) ``` -Set `recvID` for direct chat or `groupID` for group chat and leave the other empty. The Promise resolves directly to `OpenIMMessageItem`. Preserve failed messages for retry under the same `clientMsgID` unless your product explicitly creates a new send. +When the Promise resolves, the returned value is the server-confirmed `OpenIMMessageItem`; the native UTS API does not wrap it in `{ data }`. On the sending client, replace the local pending item by `clientMsgID` with the returned object. For common and content-specific fields, see [Message overview](/sdk/uniapp/message/overview-message). + +Other clients receive the message through new-message events. Promise completion, arrival of the receiving event, and reconciliation through a history query are separate stages. Keep a failed pending message under the same `clientMsgID` when offering a retry unless the product deliberately creates a new send. + +If the resource has already been uploaded by your application and stored in a URL-based message, use [`sendMessageNotOss()`](/sdk/uniapp/message/sending-messages/send-message-not-oss). diff --git a/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx index 0c8cbbc973..92f027d8ea 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx @@ -1,6 +1,6 @@ --- -title: 'List friends' -description: 'Load friends by page or snapshot and process friend changes.' +title: 'Get the friend list' +description: 'Page through the current user’s friend list with the uni-app / uni-app x SDK.' product: 'sdk' context: 'chat/sdk/uniapp' template: 'guide' @@ -11,11 +11,54 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/friends/get-friend-list-page' --- -Use `getFriendListPage()` for pagination or `getFriendList()` for a complete small snapshot. Register events before querying. +Register friend events before the initial query, then call `getFriendListPage()` to establish the current snapshot. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset. Pass `0` for the first page. | +| `count` | `number` | Yes | Number of friends to request. | +| `filterBlack` | `boolean` | No | Whether to exclude blacklisted users from the results. | + +```uts +import { getFriendListPage } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendListPage({ + offset: 0, + count: 50, + filterBlack: true, +}) +``` + +After the Promise succeeds, `result?.friends` is the current page of `OpenIMFriendUserItem[]`. Increase `offset` by the requested item count to load the next page. Reset pagination after a friend is added or removed. The native API returns `OpenIMFriendListResult | null` directly; there is no `{ data }` wrapper. + +### Friend profile fields + +`OpenIMFriendUserItem` describes the current account's relationship with one friend: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | The friend's user ID and the stable identifier in the friend list. | +| `nickname` | `string` | The friend's account-level nickname. | +| `faceURL` | `string` | The friend's account-level avatar URL. | +| `remark` | `string` | A remark the current account assigned to this friend. | +| `isPinned` | `boolean` | Whether the friend is pinned in the contacts list. | +| `ownerUserID` | `string` | The user ID that owns this friendship, normally the current account. | +| `operatorUserID` | `string` | The user ID that created or updated the relationship. | +| `addSource` | `number` | Value describing the source through which the friendship was added. | +| `createTime` | `number` | Time when the friendship was created. | +| `ex` | `string` | Friendship extension string. | +| `attachedInfo` | `string` | SDK attachment data. Parse it only according to a confirmed application contract. | + +`nickname` and `faceURL` are snapshots of the account profile. `remark`, `isPinned`, `ex`, and `attachedInfo` belong to the friendship. Do not overwrite a non-friend's `OpenIMPublicUserItem` with an `OpenIMFriendUserItem`, and do not write a friend remark back to the account nickname. + +## Synchronize friend changes + +This page owns the complete listeners for `onFriendAdded`, `onFriendInfoChanged`, and `onFriendDeleted`. The query establishes a snapshot; events merge incremental changes by `userID`. ```uts import { - getFriendListPage, off, onFriendAdded, onFriendDeleted, @@ -23,14 +66,15 @@ import { type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const subscriptions : Array = [ - onFriendAdded((friend) => upsertFriend(friend.userID, friend)), +const friendSubscriptions : Array = [ + onFriendAdded((friend) => mergeFriend(friend.userID, friend)), + onFriendInfoChanged((friend) => mergeFriend(friend.userID, friend)), onFriendDeleted((friend) => removeFriend(friend.userID)), - onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)), ] -const page = await getFriendListPage({ offset: 0, count: 100 }) -replaceFriendSnapshot(page?.friends ?? []) -subscriptions.forEach((subscription) => off(subscription)) + +function removeFriendListeners() { + friendSubscriptions.forEach((subscription) => off(subscription)) +} ``` -Start `offset` at 0, continue until fewer than `count` items return, and deduplicate by `userID`. `getFriendList(filterBlack)` optionally filters blacklist entries but does not merge the two relationship types. Reload after login, reconnection, or state loss. +Call `removeFriendListeners()` when signing out, switching accounts, or destroying the contacts state layer. diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx index 67b271bdbb..03108ccb66 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -6,6 +6,13 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/add-conversat `addConversationsToGroups()` 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | 是 | 要加入分组的会话 ID 列表。 | +| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID 列表。每个会话会加入每个目标分组。 | + ```uts import { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk' @@ -15,4 +22,8 @@ await addConversationsToGroups({ }) ``` -两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。 +两个数组都不能为空,并应先去除空值和重复项。一个会话可以属于多个分组;该操作不会改变会话消息或删除其他分组关系。 + +## 返回结果 + +Promise 成功直接返回 Core 的字符串结果,表示成员更新请求已经完成,不等于分组成员事件已经到达。通过 `onConversationGroupMemberAdded` 或重新查询分组确认最终关系;不要在失败时保留仅本地的成员关系。完整 raw 事件处理见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx index 5e2f9413ba..8dfcfba803 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -6,6 +6,16 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conver `createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `name` | `string` | 是 | 分组名称。提交前按产品规则校验空值和长度。 | +| `order` | `number` | 是 | 分组排序值;排序方向应在业务中保持一致。 | +| `conversationGroupType` | `OpenIMConversationGroupType` | 是 | 分组类型,使用插件合同允许的值。 | +| `conversationID` | `string \| null` | 否 | 创建时加入分组的初始会话 ID。 | +| `ex` | `string \| null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | + ```uts import { createConversationGroup } from '@/uni_modules/unix-openim-sdk' @@ -20,4 +30,8 @@ const result = await createConversationGroup({ const group = result?.conversationGroup ``` -分组类型使用插件导出的合同值。`conversationID` 可省略;`ex` 是整段业务扩展。返回分组可能为 `null`,最终列表以分组事件或重新查询为准。 +## 返回结果 + +Promise 成功直接返回 `OpenIMCreateConversationGroupResult | null`。非空结果的 `conversationGroup` 是新分组快照,也可能为 `null`;先校验非空 `conversationGroupID` 再加入本地索引。 + +Promise 成功和 `onConversationGroupAdded` 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 `conversationID`,成员关系也应以查询结果校准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx index a04785b264..f5a55096a9 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -6,10 +6,16 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/delete-conver `deleteConversationGroup()` 商业版 删除一个分组。 +参数对象只包含必填的 `conversationGroupID`。删除前应确认该 ID 来自当前账号的分组快照,而不是名称或数组下标。 + ```uts import { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk' await deleteConversationGroup({ conversationGroupID: groupID }) ``` -删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。 +## 返回结果 + +Promise 成功直接返回字符串结果,表示删除请求已完成。删除分组不会删除其中的会话或消息,也不会删除会话本身。 + +UI 应二次确认;成功后通过 `onConversationGroupDeleted` 或重新查询,按 `conversationGroupID` 清理本地分组与成员索引。Promise 失败时不要先行隐藏分组;若事件与本地快照不一致,以重新查询为准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx index cd5ee52d89..832d58f9c5 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -6,6 +6,14 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversat `getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 | +| `pagination.pageNumber` | `number` | 是 | 页码;本合同示例从 `1` 开始。 | +| `pagination.showNumber` | `number` | 是 | 每页会话数量。 | + ```uts import { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk' @@ -15,4 +23,14 @@ const result = await getConversationGroupInfoWithConversations({ }) ``` -`pageNumber` 从服务端约定的第一页开始,本合同示例使用 1;`showNumber` 是页大小。返回字段 `ConversationTotal` 首字母大写,应按真实字段名读取。会话按 `conversationID` 去重,分组为 `null` 时不要继续分页。 +## 返回结果 + +Promise 成功直接返回 `OpenIMGetConversationGroupInfoWithConversationsResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `conversationGroup` | `OpenIMConversationGroupItem \| null` | 当前分组资料;为 `null` 时不要继续分页。 | +| `ConversationTotal` | `number \| null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | +| `conversations` | `OpenIMConversationItem[]` | 当前页会话。 | + +分页期间成员可能变化。按 `conversationID` 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 `ConversationTotal`。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx index 64591c0951..2c1913aa0a 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -6,6 +6,8 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversat `getConversationGroups()` 商业版 按 `conversationGroupType` 查询分组。 +`conversationGroupType` 是必填的 `OpenIMConversationGroupQueryType`。使用合同允许的查询值,不把分组创建类型、展示 tab 下标或本地枚举直接混用。 + ```uts import { getConversationGroups } from '@/uni_modules/unix-openim-sdk' @@ -13,4 +15,10 @@ const result = await getConversationGroups({ conversationGroupType: 0 }) const groups = result?.conversationGroups ?? [] ``` -按非空 `conversationGroupID` 去重并排序。分组项中的 `conversationIDs` 可能只是当前快照;需要成员和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 +## 返回结果 + +Promise 成功直接返回 `OpenIMGetConversationGroupsResult | null`,从 `conversationGroups` 读取分组快照。按非空 `conversationGroupID` 去重并使用 `order` 排序。 + +### 会话分组字段 + +`OpenIMConversationGroupItem` 的字段均可空,包括 `conversationGroupID`、`name`、`order`、`ex`、`conversationGroupType`、`hidden`、`unreadCount` 和 `conversationIDs`。先校验 ID 再缓存;`conversationIDs` 可能只是当前快照,需要成员、分页和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx index ffe758975c..ad6e705144 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -6,7 +6,45 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conv 会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 -`OpenIMConversationGroupItem` 的字段均可选。读取 `conversationGroupID` 后再作为主键;`conversationIDs` 可能为 `null`,完整成员应以分页查询为准。 +## 分组类型 + +创建分组时使用 `OpenIMConversationGroupType`,查询分组时使用 `OpenIMConversationGroupQueryType`。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。 + +同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。 + +## 分组数据 + +`OpenIMConversationGroupItem` 的字段均可选: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `conversationGroupID` | `string \| null` | 分组稳定标识;非空后才能作为缓存主键。 | +| `name` | `string \| null` | 分组名称。 | +| `order` | `number \| null` | 分组排序值。 | +| `ex` | `string \| null` | 业务扩展字符串,只按已约定格式解析。 | +| `conversationGroupType` | `number \| null` | 分组类型。 | +| `hidden` | `boolean \| null` | 当前分组是否隐藏。 | +| `unreadCount` | `number \| null` | 分组维度的未读数快照。 | +| `conversationIDs` | `string[] \| null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | + +读取非空 `conversationGroupID` 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 + +## 可用操作 + +| 需求 | 页面 | +| --- | --- | +| 创建分组并可选加入初始会话 | [创建会话分组](/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group) | +| 查询分组列表 | [查询会话分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups) | +| 查询分组资料、成员与总数 | [查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) | +| 查询一个会话所属的全部分组 | [查询会话所属分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id) | +| 加入或移出分组 | [把会话加入分组](/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups)、[把会话移出分组](/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups) | +| 更新名称、扩展和隐藏状态 | [更新会话分组](/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group) | +| 调整分组顺序 | [设置会话分组顺序](/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order) | +| 删除分组 | [删除会话分组](/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group) | + +页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。 + +## 监听分组变化 五个分组事件返回 opaque JSON 字符串,不是类型化对象: @@ -42,4 +80,6 @@ const subscriptions : Array = [ subscriptions.forEach((subscription) => off(subscription)) ``` -校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。 +`onConversationGroupAdded`、`onConversationGroupChanged` 和 `onConversationGroupDeleted` 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。 + +校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 `ex` 或其他字段可能包含业务数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx index 02e6362b31..b01fadbd12 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -6,6 +6,13 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/remove-conver `removeConversationsFromGroups()` 商业版 使用与加入相同的成员参数。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | 是 | 要移出分组的会话 ID 列表。 | +| `conversationGroupIDs` | `string[]` | 是 | 要移出的目标分组 ID 列表。 | + ```uts import { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk' @@ -15,4 +22,8 @@ await removeConversationsFromGroups({ }) ``` -移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。 +两个数组都不能为空,并应先去重。移出分组不会删除会话、消息或该会话在其他分组中的成员关系。 + +## 返回结果 + +Promise 成功直接返回字符串结果,表示请求完成,不等于本地分组快照已经更新。随后处理 `onConversationGroupMemberDeleted` 或重新查询分组。重复移除按服务端最终状态处理,不做无限重试,也不在失败时伪造本地成功。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx index 8807aee004..9cc520b6d6 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/set-conversat `setConversationGroupOrder()` 商业版 批量提交分组 ID 与顺序值。 +## 参数说明 + +`conversationGroupOrders` 是非空数组,每项包含: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | 是 | 要调整的分组 ID。 | +| `order` | `number` | 是 | 新排序值;同一批次应避免重复值或不稳定规则。 | + ```uts import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk' @@ -17,4 +26,8 @@ await setConversationGroupOrder({ }) ``` -拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。 +拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。提交前按 `conversationGroupID` 去重,并用稳定算法计算所有受影响分组的值。 + +## 返回结果 + +Promise 成功直接返回字符串结果,表示排序更新请求完成。重新查询分组或等待分组变更事件确认最终排序;并发编辑时以服务端最终 `order` 为准,不只保留本地拖拽顺序。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx index 6b2b1b8797..ffc6b0438c 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conver `updateConversationGroup()` 商业版 只更新提供的字段。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | 是 | 要更新的分组 ID。 | +| `name` | `string \| null` | 否 | 新分组名称。 | +| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | +| `hidden` | `boolean \| null` | 否 | 是否在业务界面隐藏该分组。 | + ```uts import { updateConversationGroup } from '@/uni_modules/unix-openim-sdk' @@ -16,4 +25,8 @@ const result = await updateConversationGroup({ }) ``` -`name`、`ex` 和 `hidden` 都可选。`ex` 是整段替换,先合并已有业务字段。返回 `conversationGroup` 可能为空,最终状态以事件或重新查询为准。 +除 `conversationGroupID` 外,至少提供一个实际更新字段。`ex` 是整段替换,多个模块共用时先读取并合并已有业务字段。 + +## 返回结果 + +Promise 成功直接返回 `OpenIMUpdateConversationGroupResult | null`,其中 `conversationGroup` 是更新后的分组快照或 `null`。只有非空且带有效 ID 时才立即合并;最终状态通过 `onConversationGroupChanged` 或重新查询校准。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx index 950717d7b3..24a5cad623 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx @@ -12,6 +12,10 @@ import { hideConversation } from '@/uni_modules/unix-openim-sdk' await hideConversation(conversationID) ``` -隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 +该操作只影响当前登录用户的会话入口,不会删除单聊关系、退出群组或影响其他用户。隐藏不会删除本地或服务端历史消息;后续收到新消息或完成重新同步时,会话可能重新出现在列表中。需要清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 -完成后通过会话事件或重新查询移除本地项,不只操作页面数组。 +## 调用后的状态变化 + +Promise 成功表示本次隐藏请求已经完成。调用端可以按 `conversationID` 从当前会话列表移除对应项,但仍需合并 `onConversationChanged`,或重新查询会话列表校准。完整监听见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。 + +不要把隐藏操作描述为删除聊天关系,也不要只操作页面数组而跳过 store;同一会话再次出现时,按 `conversationID` 恢复或更新原状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx index e3fedb751e..52d74b71da 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx @@ -4,7 +4,7 @@ description: '隐藏当前账号的全部会话但保留消息。' sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-all-conversations' --- -`hideAllConversations()` 隐藏当前账号的全部会话。 +`hideAllConversations()` 重置当前账号全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中。 ```uts import { hideAllConversations } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,6 @@ import { hideAllConversations } from '@/uni_modules/unix-openim-sdk' await hideAllConversations() ``` -这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。 +这是范围操作,调用前应二次确认。Promise 成功只表示本地会话状态已完成重置;它不会删除本地或服务端消息、群组、好友关系,也不会修改其他客户端的会话。 + +后续收到新消息或重新建立有效状态时,相应会话仍可能再次出现。完成后重新查询[会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[会话总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count),不要把 Promise 成功当成远端事件或永久删除。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx index 521d3f8166..69ca3be1c5 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx @@ -12,6 +12,8 @@ import { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk' await markAllConversationMessageAsRead() ``` -这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。 +这是范围较大的状态变更,UI 应二次确认。Promise 成功表示 SDK 已完成本次找到的全部未读会话处理,不等于相关会话事件已经到达,也不保证其他客户端界面已同步完成。 + +完成后不要只把角标设为 0;通过 `onConversationChanged` 按 `conversationID` 合并各会话状态,并通过 `onTotalUnreadMessageCountChanged` 更新总未读数。完整监听分别见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[获取会话总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。必要时重新查询两份快照,处理服务端或其他设备并发产生的新未读消息。 该调用不会删除消息,也不会修改单个会话的消息接收选项。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx index 9a37342bbb..c8f8313c68 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx @@ -6,6 +6,8 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation-r `markConversationMessageAsRead()` 把指定会话标为已读。本页同时归属单聊已读回执 `onRecvC2CReadReceipt`。 +用户打开会话并阅读完当前可见消息后再调用。不要在只预览通知、后台收到消息或尚未展示聊天页时提前标记已读。 + ```uts import { markConversationMessageAsRead, @@ -30,3 +32,7 @@ await resetConversationUnread({ conversationIDs: [conversationID], num: 0 }) ``` 本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。 + +Promise 成功后,通过 `onConversationChanged` 取得最新会话并按 `conversationID` 合并未读数;需要立即校准时重新查询该会话。单聊回执中的 `receipts` 应先定位对端用户对应的单聊,再按每项消息 ID 列表更新已读状态。 + +群聊中调用本 API 只清理当前账号的会话未读数。需要上报群成员级已读状态时,另见[上报群消息已读](/sdk/uniapp/message/managing-read-status/send-group-read-receipts)。组件卸载、退出登录或切换账号时释放 `receiptSubscription`。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx index f1c90fc059..bceb643137 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx @@ -12,6 +12,8 @@ import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, burnDuration: 30 }) ``` -时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。 +`burnDuration` 的单位为秒,只描述阅后即焚模式的时长。启用或关闭模式还需要设置 `isPrivateChat`,见[开启或关闭阅后即焚](/sdk/uniapp/conversation/managing-conversations/set-private-chat)。 -关闭能力时使用产品约定的关闭值,并重新查询会话确认。 +不要把 `burnDuration` 与服务端消息定期删除周期 `msgDestructTime` 混用,也不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端行为呈现。 + +Promise 成功表示设置请求完成。通过 `onConversationChanged` 按 `conversationID` 合并最新 `burnDuration`,或重新查询会话确认。关闭能力时按产品协议设置私聊模式和时长,不用本地开关伪造服务端状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx index d8dcac8c3c..d4e258217b 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx @@ -6,12 +6,22 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-dr `setConversationDraft()` 保存会话草稿;传空字符串清除草稿。 +用户离开聊天页、切换会话或输入框内容变化时可以保存草稿。输入过程中先维护编辑器状态并对 SDK 写入做防抖;离开页面前立即提交一次最新文本,避免每次按键写库或旧请求后完成覆盖新草稿。 + ```uts import { setConversationDraft } from '@/uni_modules/unix-openim-sdk' await setConversationDraft({ conversationID, draftText: editorText }) ``` -草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。 +清空草稿时明确传入空字符串: + +```uts +await setConversationDraft({ conversationID, draftText: '' }) +``` + +## 调用后的状态变化 + +Promise 成功表示草稿已经保存。SDK 通过 `onConversationChanged` 同步变化后的会话,按 `conversationID` 合并 `draftText` 和 `draftTextTime`。完整事件注册与清理见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。 -会话项中的 `draftText` 和 `draftTextTime` 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。 +草稿属于当前设备的会话状态,不应假定同步到其他设备。退出账号时还要清理编辑器内存状态,避免把旧账号草稿带入新账号。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx index dec4b4a9ba..eea7e1d4f6 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx @@ -6,6 +6,10 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-destruc `OpenIMConversationItem` 包含 `isMsgDestruct` 与 `msgDestructTime` 商业版 状态,但当前 `OpenIMSetConversationParams` 没有这两个写入字段。 -因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。 +服务端消息定期删除由这两个字段共同描述:`isMsgDestruct` 是开关,`msgDestructTime` 是删除周期。它不是阅后即焚;阅后即焚使用 `isPrivateChat` 和 `burnDuration`。 -客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。 +因此本插件版本只能读取并展示服务端返回的销毁状态,不能照搬 Wasm 的 `setConversation({ isMsgDestruct, msgDestructTime })`,也不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已经确认并鉴权的商业业务接口,并在完成后重新查询会话。 + +达到删除周期后,服务端策略清理的是服务端保存的消息,不代表当前设备或其他已经同步过消息的客户端会立即删除本地副本。客户端卸载重装、清除数据或在新设备同步时,已被服务端清理的消息可能无法再次拉取。 + +客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。该页保留与 Wasm 相同的业务边界,但明确记录当前 unix 源码合同没有写入能力,避免发布不存在的 API。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx index 8b1e637223..70d4e1c6ef 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx @@ -12,6 +12,8 @@ import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, recvMsgOpt: 1 }) ``` -具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。 +常用值为 `0`(正常接收并允许通知)和 `2`(接收消息但不通知)。合同类型还允许 `1` 表示不接收消息,但只有产品和服务端明确支持该策略时使用;业务应集中定义含义,不在页面中散落裸数字。 -更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。 +该设置只作用于指定会话。账号级默认策略由 `globalRecvMsgOpt` 设置,见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。最终有效行为可能同时受账号级和会话级策略影响。 + +Promise 成功、`onConversationChanged` 到达和重新查询是三个阶段。更新后按 `conversationID` 合并事件或重新查询确认,不要仅修改当前页面开关。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx index 88006ace35..0831b772bf 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx @@ -6,16 +6,77 @@ sourcePath: '/sdk/uniapp/conversation/overview-conversation' 会话是单聊、群聊或其他消息流的本地索引。`conversationID` 是稳定主键;单聊同时有 `userID`,群聊同时有 `groupID`。界面标题、头像和最新消息都是可变快照,不能替代主键。 -`OpenIMConversationItem` 包含 `conversationType`、`showName`、`faceURL`、`unreadCount`、`latestMsg`、草稿、置顶、接收选项和消息序列边界。`latestMsg` 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。 +## 会话标识 -## 建议数据流 +`conversationID` 是列表、事件、未读数和消息查询之间的稳定关联键。按目标查询时,单聊使用对端 `userID` 和单聊类型,群聊使用 `groupID` 和对应群会话类型;不要只按 `userID` 或 `groupID` 覆盖其他类型的会话。 -1. 注册 `onNewConversation` 与 `onConversationChanged`。 -2. 查询完整或分页会话快照。 +会话项中的 `showName` 和 `faceURL` 是当前展示快照。好友备注、群名称或头像变化后它们可能改变;业务不应把展示名称作为缓存主键。 + +## 会话数据 + +`OpenIMConversationItem` 主要包含: + +| 数据 | 用途 | +| --- | --- | +| `conversationType`、`userID`、`groupID` | 判断会话类型和目标。 | +| `showName`、`faceURL` | 展示标题与头像。 | +| `unreadCount` | 当前会话未读数。 | +| `latestMsg`、`latestMsgSendTime` | 最新消息摘要与排序时间。 | +| `draftText`、`draftTextTime` | 当前设备保存的草稿。 | +| `isPinned` | 置顶状态。 | +| `recvMsgOpt` | 会话级消息接收与通知策略。 | +| `isPrivateChat`、`burnDuration` | 阅后即焚模式和时长。 | +| `minSeq`、`maxSeq`、`msgDestructTime` | 消息序列与商业版销毁状态边界。 | + +`latestMsg` 是序列化消息字符串。解析失败时保留会话并显示降级摘要,不要因为一条未知消息类型删除整个会话。商业版扩展字段在公共环境中可能缺失,使用前判空。 + +### 排序与展示 + +会话列表常见排序先处理 `isPinned`,再使用 `latestMsgSendTime`、草稿时间或产品定义的稳定规则。不要使用当前数组下标作为持久顺序;任何新消息、置顶或草稿变化都可能改变位置。 + +列表摘要应从 `latestMsg` 安全解析已知消息类型。遇到未知 contentType、自定义消息或解析失败时显示通用摘要,并保留未读数、会话目标和进入聊天页的能力。不要把原始 JSON 直接展示给用户或写入公开日志。 + +### 未读与接收策略 + +`unreadCount` 是单个会话快照,总未读数由独立 API 与事件维护。标记已读后,分别处理操作 Promise、会话变化和总未读事件;其他设备或服务端并发新消息可能让未读数再次增加。 + +`recvMsgOpt` 只描述该会话的接收策略,还可能受账号级 `globalRecvMsgOpt` 影响。界面应展示服务端返回的最终会话状态,而不是仅根据用户刚点击的本地开关推断成功。 + +## 按任务查找页面 + +| 需求 | 页面 | +| --- | --- | +| 分页获取列表并同步新增、变化事件 | [获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) | +| 按用户或群组目标查询会话 | [按目标查询会话](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target) | +| 按会话 ID 查询一个或多个会话 | [按会话 ID 查询](/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id) | +| 搜索本地会话 | [搜索会话](/sdk/uniapp/conversation/retrieving-conversations/search-conversations) | +| 标记一个或全部会话已读 | [标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[标记全部会话已读](/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read) | +| 管理草稿、置顶、备注和扩展 | 对应“管理会话”页面 | +| 使用商业版会话分组 | [会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups) | + +## 删除和清理 + +隐藏会话、删除会话、删除会话及消息、清空会话消息和清除全部本地消息是不同操作: + +- 隐藏只移除列表入口,消息保留,新消息可能让会话重新出现。 +- 删除会话不应被描述为删除好友或退出群组。 +- 删除会话及消息会影响本地会话与消息记录,应在 UI 中二次确认。 +- 清空消息与服务端消息销毁策略也不是同一能力。 + +选择操作前明确产品语义,Promise 失败时不要先行清除本地状态;完成后用事件或重新查询校准。 + +## 状态更新 + +建议数据流如下: + +1. 注册 `onNewConversation` 与 `onConversationChanged`,保存各自订阅句柄。 +2. 分页查询会话快照。 3. 按 `conversationID` 幂等插入或替换事件项。 4. 按 `isPinned`、时间和业务排序规则展示。 -5. App 恢复或重新登录时重新查询,不仅依赖事件。 +5. App 恢复、同步完成或重新登录时重新查询,不仅依赖事件。 会话未读数和消息已读是相关但不同的状态。清零会话未读见[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read),总未读见[获取总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。 -商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。 +查询用于建立快照,事件用于合并增量,Promise 成功只说明当前操作完成。完整监听与句柄清理统一见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。 + +切换账号时先停止旧 store 写入,释放旧订阅并清空会话、未读和草稿内存状态。不要让旧账号分页或事件异步结果写入新账号;商业版依赖插件还应比较 SDK session epoch。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx index 8cb8f36e16..3659088783 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -6,6 +6,13 @@ sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation- `getOneConversation()` 使用目标 ID 和 `OpenIMSessionType` 查询单个会话,返回 `OpenIMConversationItem | null`。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `sourceID` | `string` | 是 | 会话目标 ID:单聊为对方 `userID`,群聊为 `groupID`。 | +| `sessionType` | `OpenIMSessionType` | 是 | 会话类型,使用插件导出的 `OpenIMSessionTypeSingle`、群聊等常量。 | + ```uts import { OpenIMSessionTypeSingle, @@ -18,6 +25,8 @@ const conversation = await getOneConversation({ }) ``` -单聊的 `sourceID` 是对方 `userID`,群聊是 `groupID`。使用插件导出的会话类型常量,不直接写数字。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。 +同一个字符串在不同 `sessionType` 下可能表示不同目标,必须同时传入正确类型。不要直接写数字,也不要把 `conversationID` 当成 `sourceID` 传入;已经知道会话 ID 时使用按会话 ID 查询 API。 + +Promise 成功直接返回 `OpenIMConversationItem | null`。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。查询本身不会创建会话,也不会触发会话事件。 返回值按 `conversationID` 合并到 store,不要用 `sourceID` 直接覆盖其他会话类型。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx index 0a47a747b8..7ce7c035c1 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -4,7 +4,16 @@ description: '查询完整或分页会话快照,并处理新增与变化事件 sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list' --- -`getAllConversationList()` 返回完整本地会话快照;列表较大时使用 `getConversationListSplit()` 分页。本页归属 `onNewConversation` 和 `onConversationChanged`。 +会话列表应使用 `getConversationListSplit()` 分页建立本地快照。虽然 Private 合同仍导出非分页 `getAllConversationList()` 作为兼容能力,面向真实应用和公开文档的推荐流程统一使用分页,避免会话较多时一次加载全部本地记录。 + +## 分页获取会话 + +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次读取数量;根据页面和设备性能设置合理上限。 | ```uts import { @@ -28,6 +37,39 @@ off(newConversationSubscription) off(changedSubscription) ``` -分页时继续增加 `offset`,直到返回数量少于 `count`。查询与事件可能包含相同会话,必须按 `conversationID` 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。 +Promise 成功直接返回 `OpenIMConversationListResult | null`,从 `conversations` 读取当前页。第一页用于替换当前账号快照;后续页按 `conversationID` 合并。返回 `null` 时不要伪造成功的空列表,应结合登录状态和错误诊断决定保留旧快照还是展示加载失败。 + +分页时继续增加 `offset`,直到返回数量少于 `count`。在前一页加载期间收到会话事件后,列表排序和分页边界可能变化;应让 store 按主键合并,并在刷新或同步完成时从 offset 0 重新建立快照。不要只把后续页追加到数组后永久依赖旧 offset。 + +### 会话字段 + +`OpenIMConversationItem` 中常用字段如下: + +| 字段 | 说明 | +| --- | --- | +| `conversationID` | 会话稳定主键,列表与事件都按该字段合并。 | +| `conversationType` | 单聊、群聊或通知会话类型。 | +| `userID` / `groupID` | 单聊对端用户或群聊群组 ID,根据会话类型使用。 | +| `showName` / `faceURL` | 当前会话展示名称与头像快照。 | +| `unreadCount` | 当前会话未读数。 | +| `latestMsg` | 最新消息序列化字符串;解析失败时保留会话并展示降级摘要。 | +| `latestMsgSendTime` | 最新消息发送时间,可参与普通会话排序。 | +| `draftText` / `draftTextTime` | 本地草稿内容和更新时间。 | +| `isPinned` | 是否置顶。排序时先应用置顶规则,再处理时间。 | +| `recvMsgOpt` | 会话级消息接收选项。 | + +完整字段及商业扩展见[会话概览](/sdk/uniapp/conversation/overview-conversation)。不要根据本地数组位置更新;置顶、最新消息、草稿和未读变化都会改变排序。 + +### 列表排序 + +推荐先把分页与事件结果写入以 `conversationID` 为键的映射,再计算展示数组。通常先显示置顶会话,组内按最新消息或草稿时间排序,并为时间相同项提供稳定的 ID 次序。不要直接在事件回调中对页面数组做局部交换。 + +`latestMsg` 解析失败不影响会话存在。保留该项并显示未知消息摘要;收到后续可识别消息或重新查询时自然更新。 + +## 保持列表同步 + +本页是 `onNewConversation` 和 `onConversationChanged` 的完整监听归属页。应先注册事件,再查询第一页,缩小登录同步期间的丢失窗口。两种事件都携带 `OpenIMConversationListResult`,即使通常只变化一个会话,也要遍历全部 `conversations`。 + +Promise 成功、事件到达和重新查询是不同阶段。App 前台恢复、同步完成、断线重连或切换账号后重新查询快照;退出登录或销毁会话 store 时分别 `off(newConversationSubscription)` 和 `off(changedSubscription)`。 -不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。 +切换账号时,在启动新账号查询前停止旧账号分页请求的状态写入。即使旧 Promise 迟到,也不能把旧 `conversationID` 列表合入新账号;可使用应用账号世代或商业版 `sdkSessionEpoch` 做完成前校验。 diff --git a/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx b/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx index fcb3758527..16ecc449e6 100644 --- a/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx +++ b/content/zh/docs/chat/sdk/uniapp/events/overview-events.mdx @@ -1,10 +1,65 @@ --- title: '事件概览' -description: '管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。' +description: '注册 uni-app / uni-app x SDK 事件,并按业务生命周期同步连接与数据状态。' sourcePath: '/sdk/uniapp/events/overview-events' --- -每个 `on...()` 调用同步返回独立 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。正常清理使用 `off(subscription)`;不要继续使用旧版“监听函数直接返回取消闭包”的写法。 +`unix-openim-sdk` 通过 `on...()` 函数推送连接、同步、用户、好友、会话、群组、消息和商业信令相关事件。所有事件函数都从 `@/uni_modules/unix-openim-sdk` 扁平导入,不需要为不同领域创建 SDK 实例或原生 listener 对象。 + +## 注册与移除事件 + +每次 `on...()` 调用同步返回一个独立的 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。应用必须保存该句柄,并在拥有它的页面、状态层或账号作用域结束时传给 `off(subscription)`。 + +```uts +import { + off, + onConnectSuccess, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const connectionSubscription : OpenIMSDKEventSubscription = onConnectSuccess(() => { + setConnectionState('connected') +}) + +// 拥有该监听的作用域结束时执行。 +off(connectionSubscription) +``` + +不要继续使用旧版“监听函数直接返回取消闭包”的写法,也不要调用 `connectionSubscription()`。同一个事件可以有多个订阅者;`off()` 只删除传入句柄对应的处理器,不影响其他模块。 + +`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体销毁、可控测试重置或明确拥有该事件全部监听的基础设施。普通组件、页面和功能模块不得用它代替局部清理,否则会移除其他消费者的监听。 + +事件处理器应尽快返回。耗时查询、文件操作和网络请求应进入应用队列,并在写回状态前确认当前登录用户或商业版 session epoch 没有变化。每个事件的完整监听代码只放在下表链接的归属页面,本页不重复其他领域的业务处理器。 + +## 选择注册时机 + +| 事件范围 | 建议生命周期 | 对应页面 | +| --- | --- | --- | +| 连接和 Token | 在 `login()` 前注册,切换账号时清理 | [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session) | +| 用户、好友和黑名单 | 联系人状态层初始化时注册 | [用户概览](/sdk/uniapp/user/overview-user) | +| 会话列表 | 会话列表状态层初始化时注册 | [获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) | +| 会话未读数 | 应用角标状态层初始化时注册 | [维护总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count) | +| 群组列表 | 群组状态层初始化时注册 | [群组概览](/sdk/uniapp/group/overview-group) | +| 群成员 | 群成员状态层初始化时注册 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) | +| 入群申请 | 群申请状态层初始化时注册 | [获取收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) | +| 消息 | 消息状态层初始化时注册 | [接收消息](/sdk/uniapp/message/receiving-messages/receive-messages) | +| 商业信令 | 通话功能初始化时注册 | [通话事件](/sdk/uniapp/calling/managing-calls/handle-call-events) | +| SDK session | 依赖唯一 Core 的商业插件初始化时注册 | [更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session) | + +不要在每次组件渲染、`onShow` 或列表刷新时重复注册。多次注册同一个逻辑会造成重复消息、未读数反复累加,或让旧账号的异步结果写入新账号界面。 + +查询 API 用于建立页面进入时的快照,事件用于合并后续增量。业务实体应使用稳定标识合并,例如消息使用 `clientMsgID`、会话使用 `conversationID`、好友与黑名单使用 `userID`、群成员使用 `groupID:userID`。不要使用数组下标或展示名称去重。 + +## 监听初始化同步 + +登录后 SDK 会同步 OpenIMServer 数据。以下事件适合驱动全局同步状态和进度展示: + +| 事件 | 处理器参数 | 含义 | +| --- | --- | --- | +| `onSyncServerStart` | `reinstalled: boolean` | 开始同步;布尔值表示本地库是否因重装或等价重建进入同步。 | +| `onSyncServerProgress` | `progress: number` | 同步进度变化;用于展示,不承诺每个整数都会到达。 | +| `onSyncServerFinish` | `reinstalled: boolean` | 本轮同步完成,可以重新查询依赖完整数据的页面。 | +| `onSyncServerFailed` | `reinstalled: boolean` | 本轮同步失败,应记录当前同步上下文并等待重试或连接恢复。 | ```uts import { @@ -16,23 +71,45 @@ import { type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const startSubscription = onSyncServerStart((reinstalled) => beginSyncUI(reinstalled)) -const subscriptions : Array = [ - startSubscription, - onSyncServerProgress((progress) => updateSyncProgress(progress)), - onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)), - onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)), +const syncSubscriptions : Array = [ + onSyncServerStart((reinstalled) => { + setSyncState('syncing', 0, reinstalled) + }), + onSyncServerProgress((progress) => { + setSyncProgress(progress) + }), + onSyncServerFinish((reinstalled) => { + setSyncState('ready', 100, reinstalled) + refreshVisibleSnapshots() + }), + onSyncServerFailed((reinstalled) => { + setSyncState('failed', 0, reinstalled) + }), ] -subscriptions.forEach((subscription) => off(subscription)) +function releaseSyncSubscriptions() { + syncSubscriptions.forEach((subscription) => off(subscription)) + syncSubscriptions.length = 0 +} ``` -同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。 +三个 boolean 回调参数都描述合同定义的重装/同步上下文,不是“操作是否成功”的通用返回值;完成或失败由事件名区分。同步事件描述 Core 的同步生命周期,不是某个查询 API 的 Promise 回调,也没有业务实体合并键;状态应按当前登录用户隔离。 + +本页是四个同步事件以及 `off()` / `offAll()` 控制语义的归属页。退出登录、切换账号或销毁 SDK 作用域时调用 `releaseSyncSubscriptions()`。同步完成后数据仍会继续变化:重新查询当前页面快照,并继续通过各领域归属页的增量事件更新同一状态层。 -`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。 +## HarmonyOS 不支持事件 -## HarmonyOS unsupported 事件 +商业版 HarmonyOS 的锁定 HAR 缺少以下十个事件,因此订阅会稳定返回 `platform-unsupported`,不会伪造成功回调: -HarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、`onMessageKvInfoChanged`、`onStreamChange`,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。 +- `onMigrationStart` +- `onMigrationProgress` +- `onMigrationFailed` +- `onMigrationFinished` +- `onRecvMessageExtensionsAdded` +- `onRecvMessageExtensionsChanged` +- `onRecvMessageExtensionsDeleted` +- `onMessageKvInfoChanged` +- `onStreamChange` +- `onGroupApplicationBadgeCountChanged` -事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。 +平台支持状态和“是否为商业版”是两个独立维度。应用应识别 `platform-unsupported` 并关闭对应入口或采用平台替代方案,不要无限重试,也不要把未发生的事件模拟成成功。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx index 45cb6c4ca8..4296c52d19 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx @@ -1,14 +1,49 @@ --- title: '认证与管理登录会话' -description: '登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。' +description: '登录 OpenIM、查询登录状态、处理连接与 Token 事件并安全退出当前账号。' sourcePath: '/sdk/uniapp/getting-started/authenticate-and-manage-session' --- -完成 `initSDK()` 后,先注册连接与账号事件,再调用 `login(userID, token)`。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 `onConnectSuccess`。 +`unix-openim-sdk` 使用 `login()` 建立当前用户的登录会话。开始认证前,请先按照[开始之前](/sdk/uniapp/getting-started/before-you-start)准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,并完成[安装与初始化](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。 -## 注册登录事件 +完整登录流程按以下顺序执行: -每次 `on...` 调用都返回独立的 `OpenIMSDKEventSubscription`。保存全部句柄,并在账号或应用作用域结束时逐个释放。 +1. 在 App 作用域初始化唯一的 OpenIM Core。 +2. 在登录前订阅连接、Token 和账号下线事件,避免丢失登录阶段的状态。 +3. 从可信后端取得相互匹配的 `userID` 和 OpenIMSDK Token。 +4. 调用 `login(userID, token)`,等待 Promise 成功,并继续等待 `onConnectSuccess` 确认连接可用。 +5. 连接成功后再查询用户、好友、会话、群组和消息数据。 +6. 用户主动退出或切换账号时调用 `logout()`,然后释放旧账号的订阅并清理应用状态。 + +## 初始化 SDK + +插件安装后,在应用级 service 中调用一次 `initSDK()`。初始化配置、平台常量、`systemType`、SDK 版本和反初始化规则见[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。 + +`unix-openim-sdk` 导出扁平函数;业务代码不创建 SDK 实例,也不要让不同页面用不同服务地址重复初始化 Core。OpenIMServer 地址在 `initSDK()` 时固定,当前用户身份在 `login()` 时建立。 + +### 初始化配置边界 + +`initSDK()` 接收 `OpenIMInitConfig`,其中包含平台 ID、API 地址、WebSocket 地址、日志选项和必填的 `systemType`。这些字段属于 App 和部署环境,不属于某个用户;切换账号时继续复用同一次初始化,不要把初始化配置拼进 `login()`。 + +### 理解 UTS 插件 + +`unix-openim-sdk` 是原生 UTS 插件,不是 JavaScript 单例工厂。插件内部持有唯一 OpenIM Core,uni-app 和 uni-app x 都通过 `@/uni_modules/unix-openim-sdk` 的扁平导出访问它。标准基座未包含插件原生依赖;开发与发布包都必须使用包含该插件的原生构建产物。 + +## 获取当前用户的登录信息 + +调用业务后端提供的登录信息接口,取得当前用户的 `userID` 和 Token: + +```uts +const session = await loadOpenIMSDKSession() +const userID = session.userID +const token = session.token +``` + +`userID` 只是 OpenIMSDK 用户标识,不是认证凭据。Token 必须由可信后端取得并且与该 `userID` 对应;App 不负责创建用户、签发 Token,也不得保存管理员 Token 或服务端 secret。 + +## 在登录前注册连接事件 + +连接事件应在 `login()` 前注册。这样可以捕获登录阶段因网络、服务地址、Token 或服务端状态产生的错误,并把连接状态反馈给界面。 ```uts import { @@ -16,43 +51,73 @@ import { onConnectFailed, onConnectSuccess, onConnecting, - onKickedOffline, - onUserTokenExpired, - onUserTokenInvalid, type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const connectSubscription = onConnectSuccess(() => { - console.log('OpenIM connected') -}) -const subscriptions : Array = [ - connectSubscription, - onConnecting(() => console.log('OpenIM connecting')), - onConnectFailed((error) => console.error(error.errCode, error.errMsg)), - onKickedOffline(() => clearCurrentAccount()), - onUserTokenExpired(() => requestFreshToken()), - onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)), -] +const sessionSubscriptions : Array = [] -function releaseSessionSubscriptions() { - subscriptions.forEach((subscription) => off(subscription)) - subscriptions.length = 0 -} +sessionSubscriptions.push(onConnecting(() => { + setConnectionState('connecting') +})) + +sessionSubscriptions.push(onConnectSuccess(() => { + setConnectionState('connected') +})) + +sessionSubscriptions.push(onConnectFailed((errCode, errMsg) => { + setConnectionState('failed') + console.error('OpenIM SDK 连接失败', errCode, errMsg) +})) ``` -`onKickedOffline` 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 `logout()`。 +`onConnectFailed` 的处理器接收两个独立参数 `errCode` 和 `errMsg`,不是错误对象。每次 `on...()` 调用都返回独立的 `OpenIMSDKEventSubscription`,不能把返回值当作取消函数直接调用。 -## 登录 +## 登录当前用户 ```uts import { login } from '@/uni_modules/unix-openim-sdk' -await login(userID, token) +try { + await login(userID, token) +} catch (error) { + console.error('OpenIM SDK 登录失败', userID, error) + throw error +} ``` -`login` 的真实签名是 `login(userID, token)`,不是对象参数。Token 必须来自可信后端,并且与 `userID` 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。 +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `userID` | `string` | 是 | 当前 OpenIMSDK 用户 ID,必须与 Token 对应。它不是昵称、手机号或临时会话 ID。 | +| `token` | `string` | 是 | 当前用户的 OpenIMSDK Token,由可信后端返回;不要在客户端自行签发。 | + +`login()` 的 Promise 成功表示登录请求已经完成;`onConnectSuccess` 表示 SDK 长连接已经可用。两者是不同阶段,不能只因 Promise 成功就立即调用依赖连接的消息、会话、群组或用户 API。 -## 查询当前状态 +重复点击登录时,应复用正在进行的登录请求及其 Promise,避免并发调用 `login()`。初始化配置中的平台 ID、API 地址和 WebSocket 地址不作为 `login()` 的对象参数重复传入。 + +## 处理 API 调用结果 + +插件的异步 API 直接返回 Promise 中的业务值,不使用 Wasm 文档中的 `{ data }` 响应包装。失败时 Promise 会抛出插件错误;业务可记录脱敏后的错误码、方法名和用户 ID,用于与原生日志对应。 + +```uts +import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' + +try { + const currentUser = await getSelfUserInfo() + if (currentUser != null) { + useCurrentUser(currentUser) + } +} catch (error) { + console.error('getSelfUserInfo failed', error) +} +``` + +查询 API 的返回值用于建立调用时的快照。状态变更 API 没有可用于刷新界面的业务对象时,应继续根据对应页面说明处理事件或重新查询。Promise 成功、事件到达和重新查询校准是三个不同阶段。 + +## 查询当前登录状态 + +`getLoginStatus()` 和 `getLoginUserID()` 都不接收业务参数: ```uts import { @@ -61,16 +126,28 @@ import { getLoginUserID, } from '@/uni_modules/unix-openim-sdk' -const status = await getLoginStatus() -if (status == OpenIMLoginStatusLogged) { +const loginStatus = await getLoginStatus() +if (loginStatus == OpenIMLoginStatusLogged) { const currentUserID = await getLoginUserID() - restoreAccountState(currentUserID) + restoreSessionFor(currentUserID) } ``` -`getLoginStatus()` 返回 `OpenIMLoginStatusLogout`、`OpenIMLoginStatusLogging` 或 `OpenIMLoginStatusLogged`。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。 +登录状态常量如下: + +| 状态 | 说明 | +| --- | --- | +| `OpenIMLoginStatusLogout` | 当前 Core 未登录。 | +| `OpenIMLoginStatusLogging` | 登录流程正在进行,不要再次发起并行登录。 | +| `OpenIMLoginStatusLogged` | Core 已登录;仍应结合连接事件判断当前网络连接是否可用。 | -## 上报前后台与网络变化 +`getLoginUserID()` 返回 Core 当前登录的用户 ID,适合校验应用账号与 SDK 账号是否一致,但不能替代业务身份认证。这两个查询都不会触发连接事件。 + +切换账号时不要直接用新参数覆盖当前登录。先调用 `logout()` 完成旧账号退出,再清理旧账号的订阅和状态,最后使用新账号调用 `login()`。 + +## 上报 App 运行状态 + +Android、iOS 与 HarmonyOS 的前后台和网络状态应在 App 级生命周期中上报。进入后台时向 `setAppBackgroundStatus()` 传 `true`,回到前台时传 `false`;设备网络恢复或网络类型变化时调用 `networkStatusChanged()`。 ```uts import { @@ -78,14 +155,67 @@ import { setAppBackgroundStatus, } from '@/uni_modules/unix-openim-sdk' -await setAppBackgroundStatus(true) // 进入后台 -await setAppBackgroundStatus(false) // 回到前台 -await networkStatusChanged() // 网络恢复或网络类型变化 +async function reportAppBackground() { + await setAppBackgroundStatus(true) +} + +async function reportAppForeground() { + await setAppBackgroundStatus(false) +} + +async function reportNetworkAvailable() { + await networkStatusChanged() +} +``` + +`setAppBackgroundStatus()` 和 `networkStatusChanged()` 只报告运行环境变化,不会建立新的登录会话,也不能替代 `login()` 或 Token 刷新。普通页面进入、退出时不要重复调用这些 App 级操作。 + +如何把这些函数连接到 uni-app / uni-app x 生命周期,以及如何处理 Badge 和 FCM Token,见[处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)。 + +## 处理 Token 生命周期 + +OpenIMSDK Token 由可信后端签发。公共流程在 Token 过期或无效时重新向后端取 Token,并按产品策略重新认证;商业版还可以使用 `updateToken()` 热更新,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。 + +```uts +import { + onUserTokenExpired, + onUserTokenInvalid, +} from '@/uni_modules/unix-openim-sdk' + +sessionSubscriptions.push(onUserTokenExpired(() => { + requestFreshTokenAndRelogin() +})) + +sessionSubscriptions.push(onUserTokenInvalid((errCode, errMsg) => { + console.warn('OpenIM SDK Token 无效', errCode, errMsg) + redirectToSignIn() +})) +``` + +`onUserTokenInvalid` 与 `onConnectFailed` 一样接收 `(errCode, errMsg)`。这些值只用于诊断和界面提示,不应据此绕过重新认证。不要在日志或事件状态中保存 Token。 + +### Token 模型 + +客户端 `login()` 接收的是当前用户的 OpenIMSDK Token。Token 的签发、有效期、刷新、撤销和多端策略由业务后端与 OpenIMServer 配置决定。若产品需要短期会话或一次性登录,应在后端实现,并让 App 根据 Token 生命周期事件重新认证。 + +## 处理账号被强制下线 + +还应订阅账号被踢下线事件。该事件通常表示同一账号在其他客户端登录,或服务端策略要求当前端结束会话。 + +```uts +import { onKickedOffline } from '@/uni_modules/unix-openim-sdk' + +sessionSubscriptions.push(onKickedOffline(() => { + clearCurrentAccount() + showSignedInElsewhereDialog() +})) ``` -把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。 +收到 `onKickedOffline` 时,SDK 已进入下线流程,不要再并发调用 `logout()`。处理器只清理应用保存的当前用户、会话、消息视图和页面状态,再根据产品策略提示重新登录。 + +## 主动退出 OpenIM -## 主动退出与切换账号 +用户主动退出或切换账号时调用 `logout()`,再清理当前用户的会话列表、消息视图、未读数和业务状态。被 `onKickedOffline` 强制下线不属于主动退出,不执行这里的 `logout()` 流程。 ```uts import { logout } from '@/uni_modules/unix-openim-sdk' @@ -95,6 +225,28 @@ releaseSessionSubscriptions() clearCurrentAccount() ``` -切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。 +`logout()` 的 Promise 成功表示当前 SDK 登录会话已经退出。切换账号时先等待旧账号退出完成,再清理旧状态和订阅,然后注册新账号作用域的事件并调用 `login()`。不要让两个账号的登录与退出流程并发执行。 + +### 仅断开 WebSocket + +插件不提供“仅断开 WebSocket、但保留登录会话”的公共操作。前后台或网络变化通过 App 生命周期 API 上报;需要主动结束用户会话时使用 `logout()`。 + +## 清理登录相关事件监听 + +本页是连接、Token 和账号下线事件的完整监听归属页。退出登录、切换账号或销毁拥有这些监听的应用 service 时,逐个传给 `off(subscription)`: + +```uts +function releaseSessionSubscriptions() { + sessionSubscriptions.forEach((subscription) => off(subscription)) + sessionSubscriptions.length = 0 +} +``` + +连接事件没有业务实体合并键,应按当前 Core 和登录用户隔离状态。业务页面首次进入时通过查询 API 建立快照,再通过各领域事件合并增量。 + +## 下一步 -商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。 +- [开始之前](/sdk/uniapp/getting-started/before-you-start) +- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message) +- [事件概览](/sdk/uniapp/events/overview-events) +- [日志](/sdk/uniapp/logger) diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx index d9f0949920..399453606e 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx @@ -1,46 +1,93 @@ --- title: '开始之前' -description: '准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。' +description: '准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,再开始认证或发送消息。' sourcePath: '/sdk/uniapp/getting-started/before-you-start' --- -接入前先确定目标是 uni-app 还是 uni-app x App,并准备与 `unix-openim-sdk 0.2.0-rc.3` 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。 +在 uni-app / uni-app x App 中接入 `unix-openim-sdk` 前,需要先准备设备可访问的 OpenIMServer、可信的用户认证流程、UTS 插件和目标平台原生构建环境。这些条件同时适用于[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)和[发送第一条消息](/sdk/uniapp/getting-started/send-first-message)。Web、H5 和小程序不能使用本 UTS 原生插件。 -## 准备服务与账号 +## 准备 OpenIMServer -客户端初始化需要以下信息: +如果还没有可用的 OpenIMServer,先按 [Docker 部署指南](/docs/guides/quick-deployment/docker)完成部署,并确认实际 Android、iPhone 或 HarmonyOS 设备可以访问 `apiAddr` 与 `wsAddr`。 -| 数据 | 来源 | 要求 | -| --- | --- | --- | -| `apiAddr` | OpenIMServer HTTP API | 设备可访问的完整地址 | -| `wsAddr` | OpenIMServer WebSocket | 设备可建立长连接的完整地址 | -| `userID` | 业务后端的账号映射 | 与 Token 对应且在服务端存在 | -| Token | 可信业务后端 | 只授予当前用户,不在客户端生成 | +初始化 SDK 需要以下两个服务地址: -业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。 +| 字段 | 说明 | +| --- | --- | +| `apiAddr` | OpenIMServer 的 HTTP API 地址,用于登录、同步和资源请求。生产 App 应使用设备可访问且证书有效的 HTTPS 地址。 | +| `wsAddr` | OpenIMServer 的 WebSocket 地址,用于建立长连接和接收实时事件。生产 App 通常使用 WSS 地址。 | -真机测试时,`apiAddr` 和 `wsAddr` 不能使用开发机的 `localhost`。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。 +不要只验证服务在服务器本机或开发 Mac 上能够访问。真机不能使用开发机的 `localhost`;还应从实际设备核对局域网或公网路由、TLS 证书、反向代理和 WebSocket 升级。 -## 准备插件与构建环境 +公共版客户端可以连接公共 OpenIMServer。若要使用信令、session、翻译或其他标记为商业版的能力,服务端也必须部署对应商业能力;不能用公共服务端的失败结果判断商业 API 的客户端实现。 -把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备: +## 准备用户和 Token -- Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。 -- iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。 -- HarmonyOS:仅 uni-app x 商业版,API 24;使用与插件合同一致的 HAR。 +`userID` 标识 OpenIMSDK 用户,Token 用于认证当前用户。创建或绑定 OpenIMSDK 用户、签发 Token 和校验业务权限都应由可信后端完成,App 不能保存管理员 Token、secret 或其他服务端凭据。 -标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。 +后端接入 OpenIMServer REST API 前,可先阅读[准备使用 Platform API](/platform-api/prepare-to-use-api)和[签发会话 Token](/platform-api/user/managing-session-tokens/issue-a-session-token)。如果产品已有账号体系,后端应把业务账号与 OpenIMSDK `userID` 建立稳定映射,并确保返回的 Token 与该 `userID` 对应。 + +建议由业务后端提供登录信息接口,App 只取得 SDK 登录所需的最小数据: + +```uts +type OpenIMSDKSession = { + userID : string + token : string +} + +async function loadOpenIMSDKSession() : Promise { + const response = await uni.request({ + url: `${businessApiURL}/openim/session`, + method: 'POST', + }) + + if (response.statusCode != 200) { + throw new Error('Failed to load OpenIM SDK session') + } + + return parseTrustedSessionResponse(response.data) +} +``` + +业务接口必须先验证当前业务账号,再返回与该账号对应的 OpenIMSDK 登录信息;不能接受客户端任意传入的 `userID` 后直接为其签发 Token。`apiAddr` 和 `wsAddr` 通常作为受控的 App 环境配置传给 `initSDK()`,不需要随每次用户登录响应改变。 + +## 准备 UTS 插件与原生运行环境 + +把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备原生环境: + +| 宿主 | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 | +| uni-app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 | +| Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 | + +- Android 需要匹配的 JDK、Android SDK 和插件声明的 AAR/Maven 依赖,并为目标设备包含正确 ABI。 +- iOS 需要匹配的 Xcode/CocoaPods,最终 App 必须正确链接、嵌入并签名插件 XCFramework。 +- HarmonyOS 仅声明 uni-app x 商业版支持,使用与插件合同一致的 HAR 和 API 24 工程。 + +标准基座不包含这些原生依赖。开发阶段应构建包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共版和商业版的原生制品混装在同一个插件目录,也不要直接修改 SDK 的数据库或原生缓存文件。 + +不同宿主的生命周期、类型与文件路径差异见[按宿主和平台接入](/sdk/uniapp/getting-started/environment-specific-implementation)。 ## 选择平台标识 -初始化使用插件导出的常量,不直接写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。`systemType` 是当前系统说明字符串,例如 `android`、`ios` 或 `harmony`,不可省略。 +`initSDK()` 的 `platformID` 使用插件导出的常量,不直接填写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。 + +初始化还必须提供 `systemType`,例如 `android`、`ios` 或 `harmony`。平台常量和 `systemType` 应与实际运行目标匹配;它们会参与服务端多端登录策略和原生运行诊断。 ## 发布前检查 -- 在真实目标设备上完成初始化、登录、普通消息收发与退出。 -- 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。 -- Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。 -- 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。 -- 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。 +正式发布前,应在产品实际支持的平台和网络环境中验证: + +- `initSDK()` 成功,随后 `login()` 成功并收到 `onConnectSuccess`。 +- App 前后台、网络断开恢复、Token 失效和被踢下线符合产品状态机。 +- Android 安装包没有重复 class/JNI,并包含目标设备 ABI。 +- iOS 真机包可以完成 link/embed/sign,权限说明和隐私清单完整。 +- HarmonyOS 使用精确匹配合同的商业 HAR,并对平台不支持能力返回明确错误。 +- 两个不同账号能完成普通消息收发、历史查询和退出后的状态隔离。 +- 商业版连接对应商业服务端,完成所启用能力的真实链路测试。 +- 日志、截图和自动化证据不包含 Token、secret、完整私聊内容或不必要的本机绝对路径。 + +## 继续接入 -准备完成后,先阅读[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk),再进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。 +准备完成后,先完成[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)和[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。确认连接成功后,再按照[发送第一条消息](/sdk/uniapp/getting-started/send-first-message)准备单聊用户或群组目标并验证消息链路。 diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx index 0471fe2685..a7f4f7f201 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx @@ -1,10 +1,10 @@ --- title: '按宿主和平台接入' -description: '区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。' +description: '区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的调用、生命周期和原生构建边界。' sourcePath: '/sdk/uniapp/getting-started/environment-specific-implementation' --- -`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。 +`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期、文件路径和原生构建方式。所有宿主都从同一个插件根路径扁平导入,且共享宿主进程中唯一的 OpenIM Core。 ## 支持矩阵 @@ -12,11 +12,27 @@ sourcePath: '/sdk/uniapp/getting-started/environment-specific-implementation' | --- | --- | --- | --- | | uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 | | uni-app x | API 21+ | iOS 14+ | 商业版 API 24 | -| H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 | +| Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 | -## uni-app +接入和本地编译使用 HBuilderX/uni-app `5.23` 系列。公共与商业能力是否可用还取决于所安装的插件版本、原生制品和 OpenIMServer 部署,不能只根据宿主名称判断。 -传统 uni-app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。 +## 使用统一插件入口 + +uni-app 和 uni-app x 都从 `@/uni_modules/unix-openim-sdk` 导入。不要使用裸包名,也不要直接导入 `utssdk/app-android`、`app-ios` 或 HarmonyOS 实现。 + +```uts +import { + getLoginStatus, + off, + onConnectSuccess, +} from '@/uni_modules/unix-openim-sdk' +``` + +Promise 成功直接返回业务值,不读取 `{ data }`;事件返回 `OpenIMSDKEventSubscription`,使用 `off(subscription)` 清理。 + +## uni-app Vue 2 / Vue 3 + +传统 uni-app 页面可以在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的完整静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 初始化、登录和全局监听放在应用级 service 中,避免页面反复初始化。 ```javascript import { @@ -31,13 +47,15 @@ const connectSubscription = onConnectSuccess(() => { const status = await getLoginStatus() -// 应用 service 销毁时执行。 +// 拥有监听的应用 service 销毁时执行。 off(connectSubscription) ``` +Vue 组件销毁只释放该组件或 service 拥有的订阅,不调用 `unInitSDK()`。若多个页面依赖同一事件,优先由 store 统一订阅并向页面分发状态。 + ## uni-app x -uni-app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。 +uni-app x 使用 UTS 类型。初始化参数、消息对象和事件 payload 应直接导入插件公开类型,不要复制一套会随 SDK 漂移的本地接口。 ```uts import { @@ -48,20 +66,105 @@ import { const status : OpenIMLoginStatus = await getLoginStatus() ``` -解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 `UTSJSONObject` 强制转换成业务 DTO。 +UTS 的可空值需要显式处理。若返回类型是 `OpenIMUserInfo | null` 或结果包装中的数组可空,不要用不安全强制转换绕过合同。 + +商业信令事件返回 raw JSON 字符串。先确认字符串非空,再通过经过校验的 UTS JSON 解析读取已知字段;不要把未经校验的 `UTSJSONObject` 强制转换成完整业务 DTO。 + +## App 生命周期 + +SDK Core 在 App 作用域只初始化一次。页面进入和退出只管理该页面拥有的订阅;用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。 + +前后台、网络、Badge 与推送状态应由 App 生命周期统一上报,不要让多个页面重复调用。完整示例见[处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)。 + +## Android + +Android 最低 API 21。构建产物需要包含插件声明的 Maven/AAR 依赖和目标 ABI;标准基座没有这些原生制品,应使用包含插件的自定义基座或本地原生工程。 + +发布前至少检查: + +- manifest merge 后的网络、通知和存储等权限符合产品需求。 +- 每个目标 ABI 只有一套 OpenIM Core native library。 +- release/R8 构建没有 duplicate class、duplicate JNI 或反射裁剪问题。 +- 真机可以访问 `apiAddr` / `wsAddr`,后台恢复符合系统限制。 + +SDK 不会自动替业务申请相册、相机、麦克风或通知权限。普通 IM 功能按实际使用场景声明;AV Runtime 的媒体权限属于另一个插件边界。 -## Android 与 iOS +## iOS -Android 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。 +iOS 最低版本为 14。构建时需要正确链接、嵌入并签名插件 XCFramework;使用与插件版本匹配的 CocoaPods/Xcode 环境。 -文件消息使用本机可读的完整路径。`unifile://` 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。 +发布前在真机检查 framework slice、embed/sign、隐私清单、权限说明和 App Store 构建。模拟器通过不能替代 device arm64 链接。若宿主还安装其他原生插件,应扫描重复 framework 和同名 module。 + +SDK 日志和数据库位于应用沙盒中。不要把模拟器绝对路径写入业务配置,也不要直接移动或修改 Core 数据库。 ## HarmonyOS -HarmonyOS 仅声明 uni-app x 商业版支持。当前以下操作会稳定返回 `platform-unsupported`:`updateFcmToken`、`updateToken`、`translateText`、`translateMessage`。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见[事件概览](/sdk/uniapp/events/overview-events)。 +HarmonyOS 仅声明 uni-app x 商业版支持,最低 API 24,并要求与插件合同一致的商业 HAR。 + +当前以下操作稳定返回 `platform-unsupported`: + +- `updateFcmToken` +- `updateToken` +- `translateText` +- `translateMessage` + +十个不支持事件只返回 unsupported subscription,不会伪造回调,完整清单见[事件概览](/sdk/uniapp/events/overview-events)。平台不支持不等于商业版鉴权失败;业务应按稳定错误区分能力缺失、登录状态、网络和服务端错误。 + +## 文件路径 + +图片、语音、视频和文件消息使用本机可读的完整路径。`unifile://`、相册临时地址或页面沙盒虚拟路径应先通过 uni API 转换为原生 Core 可访问的本地路径。 + +- 不要把 HTTP URL 当作本地路径传给 `by-file` / full-path 创建接口。 +- 确认临时文件在消息创建和上传完成前不会被系统清理。 +- iOS 与 Android 沙盒路径不同,不要把一个平台的绝对路径持久化后交给另一平台。 +- 文件访问、相册和媒体权限由宿主申请并向用户解释。 + +对应消息页会分别说明 URL 创建与本地完整路径创建的区别。 + +## 本地构建与自定义基座 + +原生 UTS 插件必须进入原生编译。开发时可选择: + +1. 使用 HBuilderX 5.23 构建包含插件的自定义基座。 +2. 使用项目维护的 Android/iOS 本地原生工程完成编译、安装和自动化测试。 + +本地流程应锁定 HBuilderX、DCloud 原生 SDK、JDK/Android SDK、Xcode/CocoaPods 和插件版本,避免“开发机能跑但发布包使用另一套依赖”。标准基座只能用于不含该原生插件的页面,不能据此判断 SDK 能力。 + +### 共享 SDK service + +建议在业务代码中封装一个 App 级 SDK service,统一负责初始化状态、当前登录用户、全局订阅句柄和销毁顺序。页面只调用这个 service 的业务方法并订阅应用状态,不自行决定 Core 是否需要重新初始化。 + +该 service 仍应暴露插件的真实 Promise 与错误语义:不要重新包装成 Wasm 的 `{ data }`,不要吞掉 `platform-unsupported`,也不要用 `offAll()` 清理并非自己拥有的监听。切换账号时先停止旧账号写入,再等待 `logout()`、释放旧句柄、清空状态,最后登录新账号。 + +## 不适用范围 + +本插件不支持 Web、H5 和小程序。它依赖 Android、iOS 或 HarmonyOS 原生 Core、本地数据库和原生网络生命周期,不能通过条件编译把同一导入直接运行在浏览器。 + +若同一项目还有 H5 或小程序端,应在业务适配层选择相应 Web/Wasm/小程序 SDK,并分别管理初始化、登录、事件和存储,不要让两个 SDK 实例竞争同一 App 端登录状态。 + +## 验证与排查 + +- 在目标平台确认 `initSDK()` 成功,`login()` 后收到 `onConnectSuccess`。 +- 验证查询 API 直接返回业务值,事件句柄可以在异步使用后通过 `off()` 清理。 +- 真机验证网络断开恢复、前后台、被踢、Token 失效和重新登录。 +- 文件消息在 release 包中使用真实相册/文件路径测试,不只验证固定沙盒样例。 +- 商业 API 连接商业服务端;HarmonyOS 对不支持能力明确返回错误。 +- Android/iOS 最终安装包执行重复原生依赖、签名和 ABI/slice 扫描。 + +## 常见问题 -平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。 +| 现象 | 可能原因 | 处理方式 | +| --- | --- | --- | +| 标准基座提示原生插件不可用 | 基座未包含插件原生依赖 | 构建自定义基座或使用本地原生工程。 | +| 真机无法连接、模拟器可以 | 服务地址使用 `localhost`、TLS 或局域网路由不通 | 从真机验证 API/WSS 地址、证书和反向代理。 | +| 事件重复执行 | 页面或 `onShow` 重复注册,旧句柄未释放 | 把监听提升到稳定 service,并逐个 `off(subscription)`。 | +| 文件创建失败 | 传入 `unifile://`、临时 URL 或 Core 无权读取的路径 | 转换为原生可读完整路径并保证文件生命周期。 | +| HarmonyOS 某 API 始终失败 | 锁定 HAR 没有该能力 | 识别 `platform-unsupported`,关闭入口或采用替代流程。 | +| iOS 模拟器成功、真机链接失败 | device slice、embed、签名或最低版本不匹配 | 用 iPhone device 构建检查 XCFramework 与签名。 | -## 生命周期归属 +## 下一步 -SDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 `unInitSDK()`。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。 +- [开始之前](/sdk/uniapp/getting-started/before-you-start) +- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) +- [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state) diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx index bf2faa3769..0d5aefb97c 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx @@ -1,46 +1,118 @@ --- title: '发送第一条消息' -description: '在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。' +description: '在 uni-app / uni-app x App 中初始化 SDK、登录并验证单聊或群聊的首条文本消息。' sourcePath: '/sdk/uniapp/getting-started/send-first-message' --- -本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。 +本页说明如何在 uni-app / uni-app x App 中安装并初始化 `unix-openim-sdk`,登录后发送第一条文本消息。开始前,请先完成[开始之前](/sdk/uniapp/getting-started/before-you-start)列出的服务、用户、Token、插件和原生构建环境准备。 -## 1. 初始化并登录 +OpenIMSDK 消息的发送对象可以是用户或群组。单聊消息使用目标用户 `recvID`;群聊消息使用目标群组 `groupID`。 -先按[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)初始化,再从可信后端取得 `userID` 和 Token。登录前注册连接事件,连接成功后才允许发送。 +## 准备消息目标 + +单聊测试需要一个已存在的接收方用户。群聊测试需要一个已存在并且当前用户有权发言的 `groupID`;发送群聊消息时不再传接收方用户 ID,也不需要指定某个群成员。 + +| 场景 | 需要准备的目标标识 | +| --- | --- | +| 单聊 | 已存在的接收方用户 ID,发送时写入 `recvID`,`groupID` 为空字符串。 | +| 群聊 | 已存在的群 ID,发送时写入 `groupID`,`recvID` 为空字符串。 | + +### 确认目标可用 + +首条消息通常用于验证客户端、OpenIMServer 和另一客户端之间的完整链路。发送前确认: + +- 单聊接收方用户已存在,且服务端策略允许当前用户向其发送消息。 +- 群聊目标 `groupID` 已存在,当前用户已加入该群,并且没有被群状态或禁言策略禁止发言。 +- 两个测试客户端使用不同用户登录;不要用同一账号的界面现象代替对端收件验证。 + +## 开始使用 + +按照下面步骤发送首条文本消息。 + +### 第 1 步:安装 UTS 插件 + +把 `unix-openim-sdk` 安装到项目的 `uni_modules/unix-openim-sdk` 目录。插件包含原生依赖,标准基座不能直接加载;运行前需要构建包含该插件的自定义基座,或使用项目的本地 Android/iOS 原生构建流程。 + +业务页面统一从插件根路径扁平导入函数与类型: + +```uts +import { + createTextMessage, + sendMessage, +} from '@/uni_modules/unix-openim-sdk' +``` + +不需要创建 SDK 实例,也不要导入或直接调用 Android、iOS、HarmonyOS 平台目录中的实现文件。 + +### 第 2 步:初始化 OpenIM SDK + +在 App 作用域调用一次 `initSDK()`。下面以 Android 为例;iOS 和 HarmonyOS 使用各自的平台常量与 `systemType`。 ```uts import { - off, - onConnectSuccess, + OpenIMLogLevelInfo, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, } from '@/uni_modules/unix-openim-sdk' -const connectSubscription = onConnectSuccess(() => { - markOpenIMReady() -}) +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelInfo, + isLogStandardOutput: true, + systemType: 'android', +} -// 应用作用域结束时释放。 -off(connectSubscription) +const initialized = await initSDK(config) +if (!initialized) { + throw new Error('OpenIM SDK initialization was not accepted') +} ``` -完整登录和事件清理见[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。 +`apiAddr` 和 `wsAddr` 必须能从实际设备访问,`systemType` 不可省略。完整字段、iOS/HarmonyOS 常量、版本查询和反初始化规则见[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。 + +### 第 3 步:连接到 OpenIMServer + +使用[开始之前](/sdk/uniapp/getting-started/before-you-start)约定的业务接口取得当前用户的 `userID` 和 Token。登录前先按[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)注册连接与 Token 事件;本页只保留首条消息主流程,不重复定义完整监听器。 -## 2. 准备目标 +```uts +import { login } from '@/uni_modules/unix-openim-sdk' + +const session = await loadOpenIMSDKSession() +await login(session.userID, session.token) +``` -| 场景 | `recvID` | `groupID` | -| --- | --- | --- | -| 单聊 | 已存在的接收用户 ID | 空字符串 | -| 群聊 | 空字符串 | 当前用户已加入的群 ID | +`login()` 的 Promise 成功表示登录请求完成;收到由认证页面统一处理的 `onConnectSuccess` 后,再调用依赖连接的消息 API。uni-app / uni-app x 的 `login()` 使用两个位置参数,不接受 Wasm 的对象式登录参数。 -目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。 +### 第 4 步:确定消息目标 -## 3. 创建并发送文本消息 +单聊只需要接收方用户 ID。把已经确认存在的用户 ID 写入 `recvID`: + +```uts +const recvID = 'user_b' +const groupID = '' +``` + +群聊只使用群 ID。可以复用业务系统已有的 `groupID`,也可以先通过管理后台、业务后端或群组 API 创建测试群,并保存返回的群 ID: + +```uts +const recvID = '' +const groupID = 'group_123' +``` + +创建群组时可以设置初始成员,但发送群消息本身不再传某个接收用户 ID。 + +### 第 5 步:创建并发送消息 + +发送文本消息分两步:先用 `createTextMessage()` 创建本地 `OpenIMMessageItem`,再通过 `sendMessage()` 发送到目标用户或群组。 ```uts import { createTextMessage, sendMessage, + type OpenIMMessageItem, } from '@/uni_modules/unix-openim-sdk' const message = await createTextMessage('你好,OpenIMSDK') @@ -48,34 +120,34 @@ if (message == null) { throw new Error('Failed to create text message') } -const sentMessage = await sendMessage({ +const sentMessage : OpenIMMessageItem = await sendMessage({ + recvID, + groupID, message, - recvID: 'user_b', - groupID: '', }) appendOutgoingMessage(sentMessage) ``` -`createTextMessage()` 只创建本地消息对象,不会发送。`sendMessage()` 成功后直接返回最终 `OpenIMMessageItem`,不需要读取 `{ data }`。发送端按 `clientMsgID` 合并返回值;接收端通过新消息事件按同一标识去重。 +`createTextMessage()` 的 Promise 只返回待发送消息对象,不会发送消息,也不会触发新消息事件。`sendMessage()` 直接返回发送后的 `OpenIMMessageItem`,不需要读取 Wasm 响应中的 `{ data }`。 -群聊只需把 `recvID` 改为空字符串,并填入 `groupID`: +发送端应按 `clientMsgID` 用 `sentMessage` 替换本地待发送项;另一已登录客户端通过新消息事件获得消息对象。完整事件、批量与单条回调、清理和会话路由见[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages),本页不重复注册。 -```uts -const sentGroupMessage = await sendMessage({ - message, - recvID: '', - groupID: 'group_123', -}) -``` +## 验证发送结果 + +使用两个账号和两个独立客户端验证以下阶段: -## 4. 双端验证 +1. A 端 `sendMessage()` 成功并返回非空 `clientMsgID`。 +2. A 端按 `clientMsgID` 合并返回消息,而不是向列表重复追加一条。 +3. B 端收到新消息事件,并能读取相同业务内容。 +4. A、B 重新进入会话后,都能从历史消息中查询到该消息。 -用两个不同账号和两个独立客户端验证: +Promise 成功和对端事件到达是两个阶段,应分别验证。排查失败时记录脱敏后的错误码、当前用户 ID、目标用户或群组 ID、`clientMsgID`,并与 OpenIMServer 日志对应;不要记录 Token 或完整私聊内容。 -1. A 端发送后获得非空 `clientMsgID`,消息状态进入发送成功。 -2. B 端收到新消息事件,并能解析到相同业务内容。 -3. A、B 重新进入会话后,都能从历史消息中读取该消息。 -4. 退出 SDK 后普通事件不再写入旧账号状态。 +## 下一步 -下一步阅读[发送消息](/sdk/uniapp/message/sending-messages/send-message)、[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages)和[加载历史消息](/sdk/uniapp/message/retrieving-messages/load-older-messages)。 +- [开始之前](/sdk/uniapp/getting-started/before-you-start) +- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [按宿主和平台接入](/sdk/uniapp/getting-started/environment-specific-implementation) +- [发送消息](/sdk/uniapp/message/sending-messages/send-message) +- [接收消息](/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/zh/docs/chat/sdk/uniapp/logger.mdx b/content/zh/docs/chat/sdk/uniapp/logger.mdx index 656a96579f..2df53f50ff 100644 --- a/content/zh/docs/chat/sdk/uniapp/logger.mdx +++ b/content/zh/docs/chat/sdk/uniapp/logger.mdx @@ -1,33 +1,151 @@ --- title: '日志与诊断' -description: '配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。' +description: '配置 UTS 插件日志级别,使用 operationID 关联调用链路,并在用户同意后上传脱敏日志。' sourcePath: '/sdk/uniapp/logger' --- -初始化时通过 `logLevel`、`isLogStandardOutput` 和可选 `logFilePath` 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。 +`unix-openim-sdk` 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。 + +日志链路通常包含 `OpenIMInitConfig` 中的日志配置、单次调用可选的 `operationID`、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。 + +## 日志级别 + +日志级别在 `initSDK()` 时通过 `OpenIMInitConfig.logLevel` 配置。从最详细到最简略依次为: + +| 常量 | 数值 | 说明 | +| --- | --- | --- | +| `OpenIMLogLevelVerbose` | `6` | 最详细的运行跟踪,只用于短期深度诊断。 | +| `OpenIMLogLevelDebug` | `5` | 开发与联调信息。 | +| `OpenIMLogLevelInfo` | `4` | 常规运行信息。 | +| `OpenIMLogLevelWarn` | `3` | 警告信息。 | +| `OpenIMLogLevelError` | `2` | 错误信息。 | +| `OpenIMLogLevelFatal` | `1` | 严重错误。 | +| `OpenIMLogLevelPanic` | `0` | 最严重级别。 | + +生产环境不建议长期使用 `Verbose` 或 `Debug`。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。 + +### 日志级别建议 + +| 场景 | 建议配置 | 说明 | +| --- | --- | --- | +| 本地开发 | `OpenIMLogLevelDebug`,`isLogStandardOutput: true` | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 | +| 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 | +| 生产默认 | `OpenIMLogLevelWarn` 或 `OpenIMLogLevelError`,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 | +| 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 | + +## 配置日志 + +日志选项属于 SDK 初始化配置,不是 `login()` 参数。下面以 Android 为例: + +```uts +import { + OpenIMLogLevelDebug, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, +} from '@/uni_modules/unix-openim-sdk' + +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelDebug, + isLogStandardOutput: true, + systemType: 'android', +} + +await initSDK(config) +``` + +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `logLevel` | `OpenIMLogLevel` | 是 | 控制 Core 运行日志的详细程度。 | +| `isLogStandardOutput` | `boolean` | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 | +| `logFilePath` | `string \| null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | + +`apiAddr`、`wsAddr`、平台和 `systemType` 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。 + +## 使用 operationID 定位一次调用 + +`operationID` 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。 + +```uts +import { getConversationListSplit } from '@/uni_modules/unix-openim-sdk' + +const operationID = createDiagnosticOperationID() + +try { + const result = await getConversationListSplit( + { offset: 0, count: 50 }, + operationID, + ) + + appLogger.info('openim_api_success', { + operationID, + action: 'get_conversation_page', + count: result?.conversations.length ?? 0, + }) +} catch (error) { + appLogger.error('openim_api_failed', { + operationID, + action: 'get_conversation_page', + error: sanitizeOpenIMError(error), + }) + throw error +} +``` + +每次调用使用新的 `operationID`,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、`conversationID` 或 `clientMsgID`。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。 + +## 记录业务上下文 + +应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 `conversationID` 或 `clientMsgID`。不要记录: + +- 用户 Token、管理员 Token、secret 或商业业务凭据。 +- 完整消息正文、原始自定义消息 payload、私人文件 URL。 +- 不必要的用户资料、通讯录、群成员清单。 +- SDK 数据库内容和完整本机沙盒路径。 + +日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。 ## 上传日志 -`uploadLogs()` 接收行数和扩展说明: +`uploadLogs()` 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。 ```uts import { uploadLogs } from '@/uni_modules/unix-openim-sdk' -const operationID = `diagnostic-${Date.now()}` +const operationID = createDiagnosticOperationID() + await uploadLogs( - { line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) }, + { + line: 2000, + ex: JSON.stringify({ scene: 'login-timeout' }), + }, operationID, ) ``` -`operationID` 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。 +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `line` | `number` | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 | +| `ex` | `string` | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 | + +Promise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。 + +## 观察上传进度 + +`onUploadLogsProgress()` 返回独立订阅句柄。进度事件的完整业务归属在[消息概览](/sdk/uniapp/message/overview-message);日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 `off(subscription)` 释放。 -上传进度由 `onUploadLogsProgress` 提供,完整订阅归[消息概览](/sdk/uniapp/message/overview-message)。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。 +上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。 -## 安全要求 +## 相关页面 -- 上传前取得用户同意,并说明日志范围与保留策略。 -- `ex` 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。 -- 控制 `line`,避免无界上传;失败时限次重试。 -- 生产包不要长期启用 verbose 标准输出。 -- 本地数据目录只用于诊断定位,不直接打包整个数据库上传。 +- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) +- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message) +- [发送消息](/sdk/uniapp/message/sending-messages/send-message) diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx index 15a3501439..d361afe994 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message.mdx @@ -1,23 +1,34 @@ --- title: '发送消息' -description: '把已创建的消息发送给单聊用户或群组。' +description: '使用 uni-app / uni-app x SDK 发送待发送消息对象。' sourcePath: '/sdk/uniapp/message/sending-messages/send-message' --- -`sendMessage()` 接收 `OpenIMSendMessageOptions`,Promise 直接返回最终 `OpenIMMessageItem`。 +`sendMessage()` 发送由消息创建 API 返回的 `OpenIMMessageItem`。单聊只填写 `recvID`,群聊只填写 `groupID`。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | +| `groupID` | `string` | 条件必填 | 群聊时填写目标群组 ID;单聊时传空字符串。 | +| `message` | `OpenIMMessageItem` | 是 | 待发送的消息对象。 | +| `offlinePushInfo` | `OpenIMOfflinePush` | 否 | 离线推送配置。 | +| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | ```uts import { sendMessage } from '@/uni_modules/unix-openim-sdk' -const sent = await sendMessage({ - message, - recvID: 'user_b', +const sentMessage = await sendMessage({ + recvID: receiverUserID, groupID: '', + message, isOnlineOnly: false, }) -upsertMessage(sent.clientMsgID, sent) ``` -单聊填 `recvID`、群聊填 `groupID`,另一个传空字符串。`offlinePushInfo` 可按产品推送策略提供;`isOnlineOnly` 为 true 时不按普通持久消息处理。 +Promise 成功后,直接返回服务端确认的 `OpenIMMessageItem`,原生 UTS API 不使用 `{ data }` 包装。发送端应使用返回对象按 `clientMsgID` 替换本地待发送项;常用字段和内容字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。 + +其他客户端通过新消息事件接收。Promise 成功、接收事件到达和历史查询校准是不同阶段。提供失败重试时,应继续保留同一个 `clientMsgID` 下的待发送消息,除非产品明确创建一次新的发送。 -发送进度按 `clientMsgID` 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 `clientMsgID` 的重复消息,除非产品明确要求。 +资源已由业务上传并写入 URL 型消息时,使用 [`sendMessageNotOss()`](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx b/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx index 1cbf066d26..cbf7806a8e 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx @@ -1,36 +1,94 @@ --- -title: '查询黑名单' -description: '查询黑名单快照,并处理加入与移除黑名单事件。' +title: '获取黑名单' +description: '查询当前用户的黑名单快照,并处理加入与移除黑名单事件。' sourcePath: '/sdk/uniapp/user/blacklist/get-black-list' --- -公共入口 `getBlackList()` 返回 `OpenIMBlackListResult | null`。本页同时归属 `onBlackAdded` 与 `onBlackDeleted`。 +OpenIMSDK 黑名单记录当前用户主动拉黑的用户。调用 `getBlackList()` 可以获取完整列表,用于构建黑名单设置页、展示资料卡关系状态和限制聊天入口。 -```uts -import { - getBlackList, - off, - onBlackAdded, - onBlackDeleted, -} from '@/uni_modules/unix-openim-sdk' +黑名单与群组管理是两类独立能力。禁言、移除群成员或调整群角色时,应使用群成员 API;`getBlackList()` 只读取当前用户维护的黑名单。 + +## 获取黑名单 + +完成初始化、登录并确认连接可用后调用 `getBlackList()`。Promise 直接返回 `OpenIMBlackListResult | null`;`blackUsers` 为空数组表示当前没有黑名单用户。 -const blackAddedSubscription = onBlackAdded((user) => upsertBlackUser(user)) -const blackDeletedSubscription = onBlackDeleted((user) => removeBlackUser(user.userID)) +```uts +import { getBlackList } from '@/uni_modules/unix-openim-sdk' const result = await getBlackList() -replaceBlackList(result?.blackUsers ?? []) +const blockedUsers = result?.blackUsers ?? [] +replaceBlockedUsers(blockedUsers) +``` + +资料卡、会话操作菜单和联系人列表通常只需要判断某个 `userID` 是否在黑名单中。建议用 `userID` 建立集合,昵称和头像仅用于展示。 + +```uts +const blockedUserIDs = new Set() +blockedUsers.forEach((user) => blockedUserIDs.add(user.userID)) -off(blackAddedSubscription) -off(blackDeletedSubscription) +function isBlocked(userID : string) : boolean { + return blockedUserIDs.has(userID) +} ``` -商业版还提供 `getBlacks()` 商业版,返回包装字段名为 `blacks`: +商业版还提供 `getBlacks()` 商业版,其包装字段名是 `blacks`: ```uts import { getBlacks } from '@/uni_modules/unix-openim-sdk' const commercialResult = await getBlacks() -replaceBlackList(commercialResult?.blacks ?? []) +replaceBlockedUsers(commercialResult?.blacks ?? []) +``` + +两个入口不要混用返回字段。一般业务选择一个与所安装版本一致的入口,不需要同时查询两份快照。 + +## 黑名单记录字段 + +`blackUsers` 中的每一项都是 `OpenIMBlackUserItem`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 被当前用户拉黑的目标用户 ID,也是列表和事件合并标识。 | +| `nickname` | `string` | 目标用户昵称,用于展示。 | +| `faceURL` | `string` | 目标用户头像地址。 | +| `ownerUserID` | `string` | 这条黑名单关系的所有者,通常是当前登录用户。 | +| `operatorUserID` | `string` | 执行拉黑操作的用户 ID。 | +| `createTime` | `number` | 黑名单关系创建时间。 | +| `addSource` | `number` | 黑名单关系的添加来源值。 | +| `ex` | `string` | 扩展字段,只解析业务已经约定的内容。 | +| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 | + +若黑名单页还要展示公开资料或好友备注,应按 `userID` 合并,并明确区分 `OpenIMBlackUserItem`、`OpenIMFriendUserItem` 和 `OpenIMPublicUserItem` 的来源。 + +## 调用结果与增量变化 + +`getBlackList()` 成功后,用返回数组完整替换当前黑名单快照。该查询本身不会触发新增或删除事件;首次进入页面、重新登录或用户主动刷新时,应重新查询完整列表。 + +本页是 `onBlackAdded` 和 `onBlackDeleted` 的完整监听归属页: + +```uts +import { + off, + onBlackAdded, + onBlackDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const blacklistSubscriptions : Array = [ + onBlackAdded((user) => { + upsertBlockedUser(user.userID, user) + }), + onBlackDeleted((user) => { + removeBlockedUser(user.userID) + }), +] + +function releaseBlacklistSubscriptions() { + blacklistSubscriptions.forEach((subscription) => off(subscription)) + blacklistSubscriptions.length = 0 +} ``` -两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。 +事件按 `userID` 合并。加入黑名单后,对方不能向当前用户发送消息,但当前用户仍可向对方发送;若产品要求双向限制,应由业务层额外控制。黑名单与好友关系仍是独立状态,客户端应分别查询,不能假定拉黑一定删除好友。 + +退出登录、切换账号或销毁黑名单状态层时调用 `releaseBlacklistSubscriptions()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx index d66c37e91f..4c28cac638 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/user/friend-applications/delete-friend-requests' `deleteFriendRequests()` 商业版 批量删除明确指定的好友申请记录。 +## 参数说明 + +该方法接收 `OpenIMDeleteFriendRequestsParams`,其中 `friendRequests` 数组的每一项使用以下字段: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `friendRequests[].fromUserID` | `string` | 是 | 申请发起人的用户 ID。 | +| `friendRequests[].toUserID` | `string` | 是 | 申请接收人的用户 ID。 | + ```uts import { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk' @@ -16,6 +25,8 @@ await deleteFriendRequests({ }) ``` -`friendRequests` 中每项使用 `OpenIMSimpleFriendRequest` 的 `fromUserID` 与 `toUserID` 精确定位。删除申请记录不会自动解除已经建立的好友关系。 +每项都是 `OpenIMSimpleFriendRequest`,通过 `fromUserID:toUserID` 精确定位。删除申请记录不等于拒绝申请,也不会解除已经建立的好友关系;删除好友关系应使用好友删除 API。 + +Promise 成功表示删除请求已完成,随后可能收到 `onFriendApplicationDeleted`。完整事件监听见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient),按 `fromUserID:toUserID` 移除记录。 -Promise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。 +批量操作前应在 UI 中确认目标。失败时不要假定全部或部分记录已经删除;重新查询收到和发出的申请列表,以服务端快照校准。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx index 771a424087..3e31b4c0f5 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as `getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。 +## 参数说明 + +参数对象可以省略;显式分页时使用: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number \| null` | 否 | 本次请求的申请数量。 | + ```uts import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' @@ -13,6 +22,6 @@ const result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 renderSentApplications(result?.applications ?? []) ``` -参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。 +Promise 成功后,`applications` 是当前页已发出的 `OpenIMFriendApplicationItem[]`,字段含义见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。该查询本身不会触发申请事件。 -申请状态变化事件统一在[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。 +分页结果可能在查询期间发生变化。事件按 `fromUserID:toUserID` 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx index ad6ad2b8ea..10ef2bf8b4 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -1,14 +1,61 @@ --- -title: '查询收到的好友申请' -description: '分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。' +title: '获取收到的好友申请' +description: '分页查询当前用户收到的好友申请,并同步申请状态变化。' sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient' --- -`getFriendApplicationListAsRecipient()` 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。 +`getFriendApplicationListAsRecipient()` 查询其他用户发给当前账号的好友申请。uni-app / uni-app x 的 `OpenIMApplicationListParams` 只提供分页字段,不包含 Wasm 版本的 `handleResults` 筛选;需要只展示待处理申请时,在返回后根据 `handleResult` 过滤。 + +## 参数说明 + +参数对象可以省略;显式分页时使用: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number \| null` | 否 | 本次请求的申请数量。 | + +```uts +import { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendApplicationListAsRecipient({ + offset: 0, + count: 20, +}) + +const applications = result?.applications ?? [] +replaceReceivedApplications(applications) +``` + +Promise 成功后直接返回 `OpenIMFriendApplicationListResult | null`,其中 `applications` 是当前页 `OpenIMFriendApplicationItem[]`。查询本身不会触发申请事件。 + +### 好友申请字段 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `fromUserID` | `string` | 申请发起人的用户 ID。 | +| `fromNickname` | `string` | 申请发起人的昵称快照。 | +| `fromFaceURL` | `string` | 申请发起人的头像快照。 | +| `toUserID` | `string` | 申请接收人的用户 ID。 | +| `toNickname` | `string` | 申请接收人的昵称快照。 | +| `toFaceURL` | `string` | 申请接收人的头像快照。 | +| `reqMsg` | `string` | 申请附言。 | +| `handleResult` | `number` | 当前处理结果:`0` 待处理、`1` 已同意、`-1` 已拒绝。 | +| `handlerUserID` | `string` | 执行处理的用户 ID;未处理时可能为空。 | +| `handleMsg` | `string` | 处理时填写的说明。 | +| `handleTime` | `number` | 处理时间;未处理时不应当作有效时间展示。 | +| `createTime` | `number` | 申请记录创建时间。 | +| `ex` | `string` | 申请记录扩展字符串。 | +| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 | + +申请记录使用 `fromUserID:toUserID` 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 `userID` 调用 `getUsersInfo()`。 + +## 同步好友申请变化 + +本页是 `onFriendApplicationAdded`、`onFriendApplicationAccepted`、`onFriendApplicationRejected` 和 `onFriendApplicationDeleted` 的完整监听归属页。推荐先注册事件,再查询快照: ```uts import { - getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, @@ -17,18 +64,27 @@ import { type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const addedSubscription = onFriendApplicationAdded((item) => upsertApplication(item)) -const subscriptions : Array = [ - addedSubscription, - onFriendApplicationAccepted((item) => upsertApplication(item)), - onFriendApplicationRejected((item) => upsertApplication(item)), - onFriendApplicationDeleted((item) => removeApplication(item)), +const applicationSubscriptions : Array = [ + onFriendApplicationAdded((item) => { + mergeFriendApplication(item.fromUserID, item.toUserID, item) + }), + onFriendApplicationAccepted((item) => { + mergeFriendApplication(item.fromUserID, item.toUserID, item) + }), + onFriendApplicationRejected((item) => { + mergeFriendApplication(item.fromUserID, item.toUserID, item) + }), + onFriendApplicationDeleted((item) => { + removeFriendApplication(item.fromUserID, item.toUserID) + }), ] -const page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 }) -replaceReceivedApplications(page?.applications ?? []) - -subscriptions.forEach((subscription) => off(subscription)) +function releaseFriendApplicationSubscriptions() { + applicationSubscriptions.forEach((subscription) => off(subscription)) + applicationSubscriptions.length = 0 +} ``` -参数可省略;显式分页时 `offset` 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。 +按当前用户是否为 `toUserID`,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)归属的 `onFriendAdded` 合并。 + +收到申请后应调用接受或拒绝 API,不要只修改本地 `handleResult` 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 `releaseFriendApplicationSubscriptions()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx index 9ffee2b4e7..d4588bab2f 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/get-friend-list-page.mdx @@ -1,14 +1,57 @@ --- -title: '查询好友列表' -description: '分页或一次性查询好友,并处理好友新增、删除与资料变化事件。' +title: '分页获取好友列表' +description: '使用 uni-app / uni-app x SDK 分页查询当前用户的好友列表。' sourcePath: '/sdk/uniapp/user/friends/get-friend-list-page' --- -`getFriendListPage()` 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 `getFriendList()`。本页同时归属好友新增、删除和资料变化事件。 +先注册好友事件,再调用 `getFriendListPage()` 建立当前好友快照。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次请求的好友数量。 | +| `filterBlack` | `boolean` | 否 | 是否从结果中过滤黑名单用户。 | + +```uts +import { getFriendListPage } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendListPage({ + offset: 0, + count: 50, + filterBlack: true, +}) +``` + +Promise 成功后,`result?.friends` 是当前页 `OpenIMFriendUserItem[]`。继续加载时按请求条目数增加 `offset`;好友增删后重置分页。原生 API 直接返回 `OpenIMFriendListResult | null`,不使用 `{ data }` 包装。 + +### 好友资料字段 + +`OpenIMFriendUserItem` 表示当前账号与一个好友的关系资料: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 好友的用户 ID,也是好友列表的稳定标识。 | +| `nickname` | `string` | 好友的账号级昵称。 | +| `faceURL` | `string` | 好友的账号级头像地址。 | +| `remark` | `string` | 当前账号为该好友设置的备注。 | +| `isPinned` | `boolean` | 该好友是否在联系人列表中置顶。 | +| `ownerUserID` | `string` | 这条好友关系所属的用户 ID,通常是当前账号。 | +| `operatorUserID` | `string` | 建立或更新这条关系的操作用户 ID。 | +| `addSource` | `number` | 好友关系的添加来源值。 | +| `createTime` | `number` | 好友关系创建时间。 | +| `ex` | `string` | 好友关系扩展字符串。 | +| `attachedInfo` | `string` | SDK 附加信息;只按已确认的业务约定解析。 | + +`nickname`、`faceURL` 是账号资料快照,`remark`、`isPinned`、`ex` 和 `attachedInfo` 属于好友关系。不要用 `OpenIMFriendUserItem` 覆盖陌生人的 `OpenIMPublicUserItem`,也不要把好友备注写回账号昵称。 + +## 同步好友变化 + +本页是 `onFriendAdded`、`onFriendInfoChanged` 和 `onFriendDeleted` 的完整监听归属页。查询负责建立快照,事件负责按 `userID` 合并增量。 ```uts import { - getFriendListPage, off, onFriendAdded, onFriendDeleted, @@ -16,19 +59,15 @@ import { type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const friendAddedSubscription = onFriendAdded((friend) => upsertFriend(friend.userID, friend)) -const subscriptions : Array = [ - friendAddedSubscription, +const friendSubscriptions : Array = [ + onFriendAdded((friend) => mergeFriend(friend.userID, friend)), + onFriendInfoChanged((friend) => mergeFriend(friend.userID, friend)), onFriendDeleted((friend) => removeFriend(friend.userID)), - onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)), ] -const page = await getFriendListPage({ offset: 0, count: 100 }) -replaceFriendSnapshot(page?.friends ?? []) - -subscriptions.forEach((subscription) => off(subscription)) +function removeFriendListeners() { + friendSubscriptions.forEach((subscription) => off(subscription)) +} ``` -`offset` 从 `0` 开始,`count` 是本页期望数量。继续分页直到返回数量小于 `count`,并按 `userID` 去重。`getFriendList(filterBlack)` 的 `filterBlack` 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。 - -事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。 +退出登录、切换账号或销毁联系人状态层时调用 `removeFriendListeners()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx index acf1ff4a45..8b0ad1915a 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/search-friends.mdx @@ -6,6 +6,17 @@ sourcePath: '/sdk/uniapp/user/friends/search-friends' `searchFriends()` 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。 +当前建议只使用一个去除首尾空格后的非空关键词。空关键词应在调用前拦截。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | 是 | 搜索关键词数组;当前只使用第一个非空关键词。 | +| `isSearchUserID` | `boolean` | 是 | 是否匹配好友用户 ID。 | +| `isSearchNickname` | `boolean` | 是 | 是否匹配好友昵称。 | +| `isSearchRemark` | `boolean` | 是 | 是否匹配当前用户设置的好友备注。 | + ```uts import { searchFriends } from '@/uni_modules/unix-openim-sdk' @@ -19,6 +30,6 @@ const result = await searchFriends({ renderFriends(result?.friends ?? []) ``` -`keywordList` 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 `OpenIMFriendListResult`,按 `userID` 去重并结合最新好友事件更新。 +Promise 成功后直接返回 `OpenIMFriendListResult | null`,从 `friends` 读取 `OpenIMFriendUserItem[]`。好友字段见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。 -搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。 +搜索结果只建立当前条件下的展示快照,不改变好友资料或服务端索引,也不应覆盖完整好友列表。按 `userID` 关联现有好友状态,并继续合并好友事件;需要查指定好友资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx index 8768cd352f..251ec79e43 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/user/friends/update-friends' `updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 | +| `remark` | `string \| null` | 否 | 新备注。 | +| `isPinned` | `boolean \| null` | 否 | 是否置顶好友。 | +| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | + ```uts import { updateFriends } from '@/uni_modules/unix-openim-sdk' @@ -16,7 +25,9 @@ await updateFriends({ }) ``` -`friendUserIDs` 不能为空。`remark`、`isPinned` 和 `ex` 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 `onFriendInfoChanged` 或重新查询好友列表确认。 +`friendUserIDs` 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。`ex` 是完整字符串,不会自动合并 JSON 字段。 + +Promise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 `onFriendInfoChanged` 按 `userID` 合并,完整监听见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page);必要时重新查询校准。 商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`: @@ -26,4 +37,4 @@ import { updateFriend } from '@/uni_modules/unix-openim-sdk' await updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' }) ``` -不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。 +`updateFriend()` 使用单个 `userID`,并把置顶字段命名为 `pinned`;其 `remark` 和 `ex` 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx b/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx index ee3b248c2b..cf76034c40 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx @@ -1,31 +1,70 @@ --- title: '订阅用户在线状态' -description: '订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。' +description: '订阅指定用户的在线状态,查询初始快照并合并状态事件。' sourcePath: '/sdk/uniapp/user/online-status/subscribe-users-status' --- -`subscribeUsersStatus()` 为指定用户建立状态订阅;`getUserStatus()` 可立即查询这些用户的当前状态。`onUserStatusChanged` 是本页的完整事件归属。 +在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看 App、某个会话或某条消息。建议只订阅当前界面和业务确实需要的用户;每个账号最多订阅 3000 个用户,不要一次订阅整个用户目录。 + +`subscribeUsersStatus()` 在 unix SDK 中用于建立订阅,Promise 成功只返回字符串结果,不直接返回状态数组。建立订阅后再调用 `getUserStatus()` 获取当前快照,后续变化通过 `onUserStatusChanged` 合并。 ```uts import { getUserStatus, + subscribeUsersStatus, +} from '@/uni_modules/unix-openim-sdk' + +const userIDs = uniqueUserIDs(['user_a', 'user_b']) + +await subscribeUsersStatus(userIDs) + +const snapshot = await getUserStatus(userIDs) +snapshot?.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) +}) +``` + +先去除空值和重复 `userID`。订阅成功、查询快照和后续事件是三个阶段,不能把 `subscribeUsersStatus()` 的字符串返回值当成在线状态对象。 + +### 在线状态字段 + +`getUserStatus()` 返回 `OpenIMUserStatusListResult | null`,其中 `statuses` 的元素是 `OpenIMUserStatusItem`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 状态所属用户 ID,也是状态缓存的合并标识。 | +| `status` | `number` | 汇总在线状态;应使用插件导出的在线状态常量解释,不要自行发明数值。 | +| `platformIDs` | `number[]` | 当前在线平台列表;为空时不要推断具体设备或最后活跃时间。 | + +一次平台离线不一定表示用户所有设备都离线。应用应同时查看汇总 `status` 与 `platformIDs`,并按服务端多端策略展示。 + +## 监听在线状态变化 + +本页是 `onUserStatusChanged` 的完整监听归属页。为缩小注册与快照查询之间的丢失窗口,推荐先注册事件,再建立订阅和查询快照: + +```uts +import { off, onUserStatusChanged, - subscribeUsersStatus, + type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' const statusSubscription = onUserStatusChanged((result) => { - result.statuses.forEach((status) => replaceUserStatus(status.userID, status)) + result.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) + }) }) -const userIDs = ['user_a', 'user_b'] await subscribeUsersStatus(userIDs) -const snapshot = await getUserStatus(userIDs) -snapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status)) -off(statusSubscription) -``` +const current = await getUserStatus(userIDs) +current?.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) +}) -先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 `userID` 和平台更新,不把一次离线事件等同于用户所有设备都离线。 +function releaseStatusListener() { + off(statusSubscription) +} +``` -只订阅当前界面或业务确实需要的用户,并在不再需要时调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status)。 +初始快照与事件都按 `userID` 幂等合并。退出登录、切换账号或销毁在线状态层时调用 `releaseStatusListener()`;不再需要某些用户状态时,还要调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status),避免长期占用订阅额度。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx index a34215f7a6..14b59f79ea 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -1,25 +1,56 @@ --- title: '用户概览' -description: '理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。' +description: '了解 uni-app / uni-app x SDK 中的用户资料、好友关系、黑名单和在线状态。' sourcePath: '/sdk/uniapp/user/overview-user' --- -用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。`userID` 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。 +`unix-openim-sdk` 使用 `userID` 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。 -## 核心模型 +群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。`userID` 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。 -`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。 +## 用户类型 -好友数据使用 `OpenIMFriendUserItem`,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 `OpenIMBlackUserItem`。好友申请使用 `OpenIMFriendApplicationItem`,申请状态由接受、拒绝和删除事件增量更新。 +SDK 会根据使用场景返回不同的用户对象: -## 快照与事件 +| 类型 | 适用场景 | 主要接口 | +| --- | --- | --- | +| `OpenIMUserInfo` | 当前登录用户资料、设置页、当前账号头像和昵称 | `getSelfUserInfo()`、`setSelfInfo()` | +| `OpenIMPublicUserItem` | 应用用户查询、好友候选人、陌生人资料卡;它是 `OpenIMUserInfo` 的公开别名 | `getUsersInfo()` | +| `OpenIMFriendUserItem` | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` | +| `OpenIMBlackUserItem` | 当前用户黑名单中的用户 | `getBlackList()`、`addBlack()`、`removeBlack()` | +| `OpenIMFriendApplicationItem` | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API | +| `OpenIMUserStatusItem` | 用户汇总在线状态和在线平台 | `subscribeUsersStatus()`、`getUserStatus()` | -页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。 +同一个 `userID` 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 `OpenIMFriendUserItem`;陌生人资料卡使用 `OpenIMPublicUserItem`;群成员列表使用 `OpenIMGroupMemberItem`。会话列表和聊天页标题属于会话数据,应使用 `OpenIMConversationItem.showName`。 -- 当前资料:[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)与[修改自己的资料](/sdk/uniapp/user/profile/set-self-info) -- 在线状态:[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) -- 好友:[分页查询好友](/sdk/uniapp/user/friends/get-friend-list-page) -- 好友申请:[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) -- 黑名单:[查询黑名单](/sdk/uniapp/user/blacklist/get-black-list) +`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。 -业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。 +## 功能入口 + +| 需求 | 推荐页面 | +| --- | --- | +| 按 `userID` 查询公开资料,用于查找好友候选人或展示资料卡 | [获取用户资料](/sdk/uniapp/user/profile/get-users-info) | +| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page) | +| 发送或处理好友申请 | [发送好友申请](/sdk/uniapp/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) | +| 修改好友资料 | [更新好友资料](/sdk/uniapp/user/friends/update-friends) | +| 删除好友关系 | [删除好友](/sdk/uniapp/user/friends/delete-friend) | +| 查看和维护当前用户黑名单 | [获取黑名单](/sdk/uniapp/user/blacklist/get-black-list) | +| 读取或更新当前用户昵称、头像和扩展资料 | [更新当前用户资料](/sdk/uniapp/user/profile/set-self-info) | +| 设置账号级消息接收策略 | [设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception) | +| 查看加好友权限的当前合同边界 | [设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission) | +| 订阅和读取在线状态 | [订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) | +| 读取群成员、搜索成员或查询指定成员资料 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) | + +业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。 + +## 状态更新 + +页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量: + +- 当前用户资料变化:见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。 +- 好友申请变化:见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。 +- 好友关系和资料变化:见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。 +- 黑名单变化:见[获取黑名单](/sdk/uniapp/user/blacklist/get-black-list)。 +- 在线状态变化:见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。 + +这些列表都按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 8a4e942536..0ca61f7265 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -1,20 +1,37 @@ --- -title: '查询自己的资料' -description: '读取当前已登录用户的 OpenIM 资料。' +title: '获取当前用户资料' +description: '查询当前已登录用户的 OpenIM 资料快照。' sourcePath: '/sdk/uniapp/user/profile/get-self-user-info' --- -`getSelfUserInfo()` 查询当前 SDK 登录账号的资料,返回 `OpenIMUserInfo | null`。调用前应确认 SDK 已登录且连接可用。 +完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料: ```uts -import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' +import { + getSelfUserInfo, + type OpenIMUserInfo, +} from '@/uni_modules/unix-openim-sdk' -const self = await getSelfUserInfo() -if (self != null) { - renderProfile(self.nickname, self.faceURL) +const currentUser : OpenIMUserInfo | null = await getSelfUserInfo() +if (currentUser != null) { + renderProfile(currentUser.nickname, currentUser.faceURL) } ``` -以返回的 `userID` 校验应用账号与 SDK 账号是否一致。`nickname`、`faceURL` 和 `ex` 属于公共字段;`attachedInfo` 与 `globalRecvMsgOpt` 商业版 为可选扩展,不应在公共环境中强制解包。 +## 返回结果 -资料变化由[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)页面归属的 `onSelfInfoUpdated` 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。 +Promise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | +| `nickname` | `string` | 账号级昵称。 | +| `faceURL` | `string` | 账号级头像地址。 | +| `createTime` | `number \| null`(可选) | 用户记录创建时间。 | +| `globalRecvMsgOpt` 商业版字段 | `number \| null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 | +| `attachedInfo` 商业版字段 | `string \| null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 | +| `ex` | `string` | 由业务约定的账号级扩展字符串。 | + +以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 + +该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index b95ae49283..5542e7cd33 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -1,21 +1,84 @@ --- -title: '批量查询用户资料' -description: '按 userID 列表查询用户公开资料。' +title: '获取用户资料' +description: '按 userID 批量查询应用用户的公开资料。' sourcePath: '/sdk/uniapp/user/profile/get-users-info' --- -使用 `getUsersInfo()` 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 `OpenIMUserListResult | null`。 +`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 + +如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 + +## 查询公开资料 + +传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 + +```uts +import { + getUsersInfo, + type OpenIMUserInfo, +} from '@/uni_modules/unix-openim-sdk' + +const userIDList : Array = uniqueUserIDs(['user_a', 'user_b']) +const result = await getUsersInfo(userIDList) +const users : Array = result?.users ?? [] + +users.forEach((user) => { + cachePublicUser(user.userID, user) +}) +``` + +Promise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 + +页面常用字段如下: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `userID` | `string` | OpenIMSDK 用户 ID。 | +| `nickname` | `string` | 账号级公开昵称。 | +| `faceURL` | `string` | 账号级公开头像地址。 | +| `createTime` | `number \| null`(可选) | 用户记录创建时间。 | +| `ex` | `string` | 账号级扩展字段,格式由业务约定。 | +| `attachedInfo` 商业版字段 | `string \| null`(可选) | 仅按已确认的商业业务协议解析。 | +| `globalRecvMsgOpt` 商业版字段 | `number \| null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | + +`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。 + +## 调用结果与资料刷新 + +以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。 + +SDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。 + +## 搜索添加好友 + +搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。 ```uts -import { getUsersInfo } from '@/uni_modules/unix-openim-sdk' +async function searchUsersForFriendRequest(keyword : string) : Promise> { + const userIDs = await searchUserIDsFromBusinessBackend(keyword) + if (userIDs.length == 0) { + return [] + } -const result = await getUsersInfo(['user_a', 'user_b']) -const users = result?.users ?? [] -users.forEach((user) => cacheUser(user.userID, user)) + const result = await getUsersInfo(uniqueUserIDs(userIDs)) + return result?.users ?? [] +} ``` -返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 +如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 + +## 按场景选择展示数据 + +| 场景 | 优先使用 | +| --- | --- | +| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` | +| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` | +| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` | + +好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 -`OpenIMUserInfo` 字段见[用户概览](/sdk/uniapp/user/overview-user)。其中 `attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 `ex` 或 `attachedInfo` 当作可信身份凭据。 +## 下一步 -大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。 +- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page) +- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info) +- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx index dc9b60b729..3652a9da36 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -1,18 +1,35 @@ --- -title: '设置全局消息接收选项' -description: '通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。' +title: '设置全局消息接收方式' +description: '设置当前账号在全部会话中的默认消息接收与通知方式。' sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' --- -`globalRecvMsgOpt` 商业版 是 `OpenIMSetSelfInfoParams` 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 `recvMsgOpt` 不同:前者影响账号全局,后者只影响指定会话。 +`globalRecvMsgOpt` 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 + +当前插件通过 `setSelfInfo()` 更新该字段: ```uts -import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' +import { + setSelfInfo, + type OpenIMSetSelfInfoRecvMsgOpt, +} from '@/uni_modules/unix-openim-sdk' -// 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。 -await setSelfInfo({ globalRecvMsgOpt: 0 }) +const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 +await setSelfInfo({ + globalRecvMsgOpt: receiveWithoutNotification, +}) ``` -只传 `globalRecvMsgOpt`,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)确认最终值;当前插件没有为这一字段单独提供 setter。 +`OpenIMSetSelfInfoRecvMsgOpt` 的合同允许以下数值: + +| 数值 | 含义 | +| --- | --- | +| `0` | 正常接收消息,并允许离线推送或通知。 | +| `1` | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 | +| `2` | 接收消息,但不触发离线推送或通知,即全天免打扰。 | + +只传 `globalRecvMsgOpt`,避免在切换接收策略时意外覆盖昵称、头像或 `ex`。当前插件没有为这一字段提供独立 setter。 + +单个会话的 `recvMsgOpt` 是更细粒度的会话设置,见[设置会话消息接收方式](/sdk/uniapp/conversation/managing-conversations/set-message-receive-option)。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。 -公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。 +Promise 成功表示设置请求完成,不等于 `onSelfInfoUpdated` 已经到达。事件监听和 `getSelfUserInfo()` 校准方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index b01a5d5a81..17bbf114f2 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -1,30 +1,56 @@ --- -title: '修改自己的资料' -description: '更新当前用户资料并处理 onSelfInfoUpdated 事件。' +title: '更新当前用户资料' +description: '更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。' sourcePath: '/sdk/uniapp/user/profile/set-self-info' --- -`setSelfInfo()` 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。 +`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `nickname` | `string \| null` | 否 | 新昵称。 | +| `faceURL` | `string \| null` | 否 | 新头像地址。 | +| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | +| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt \| null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | + +至少传入一个实际要更新的字段。 + +```uts +import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' + +await setSelfInfo({ + nickname: 'OpenIM User', + faceURL: 'https://cdn.example.com/avatar.png', + ex: mergedExtra, +}) +``` + +`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 + +`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。 + +Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。 + +## 监听当前用户资料变化 + +本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照: ```uts import { off, onSelfInfoUpdated, - setSelfInfo, + type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' const selfInfoSubscription = onSelfInfoUpdated((user) => { replaceCurrentUser(user.userID, user) }) -await setSelfInfo({ - nickname: 'OpenIM User', - faceURL: 'https://cdn.example.com/avatar.png', -}) - -off(selfInfoSubscription) +function releaseSelfInfoSubscription() { + off(selfInfoSubscription) +} ``` -`OpenIMSetSelfInfoParams` 支持 `nickname`、`faceURL`、`ex`,以及商业版使用的 `globalRecvMsgOpt`。Promise 成功表示服务端接受修改;界面最终状态以 `onSelfInfoUpdated` 或重新查询的资料为准。 - -事件返回完整 `OpenIMUserInfo`。按 `userID` 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。 +不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。 diff --git a/data/structure/uniapp-content-audit.json b/data/structure/uniapp-content-audit.json index dc9edbdd5a..00dae4c815 100644 --- a/data/structure/uniapp-content-audit.json +++ b/data/structure/uniapp-content-audit.json @@ -69,12 +69,14 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "not-applicable", - "evidence": [], - "reason": "Concept or boundary page contains no executable code block." + "status": "verified", + "evidence": [ + "Wasm prerequisites were reviewed section by section and adapted to the native UTS plugin, device networking, custom-base/native build, and locked platform support matrix on 2026-08-13." + ], + "reason": null } }, "en": { @@ -107,12 +109,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm environment guide structure was manually re-authored for uni-app and uni-app x, covering the locked support matrix, flat imports, lifecycle ownership, Android/iOS/Harmony builds, native files, local bases, validation, and troubleshooting on 2026-08-13." ], "reason": null } @@ -169,12 +171,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm page structure and semantics were reviewed section by section; examples were adapted to the frozen Private 0.2.0-rc.3 signatures, direct Promise values, error-handler arity, and subscription/off contract on 2026-08-13." ], "reason": null } @@ -211,12 +213,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm first-message flow was reviewed section by section; installation, initialization, login, direct Promise return, clientMsgID merge, and two-client verification were adapted to the frozen Private 0.2.0-rc.3 contract on 2026-08-13." ], "reason": null } @@ -393,12 +395,14 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "not-applicable", - "evidence": [], - "reason": "Concept or boundary page contains no executable code block." + "evidence": [ + "Wasm user-domain structure and model selection guidance were reviewed section by section and adapted to frozen Private type names and field-level commercial extensions on 2026-08-13." + ], + "reason": "Concept and ownership page contains no executable SDK call." } }, "en": { @@ -433,12 +437,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm public-profile workflow was reviewed section by section; OpenIMUserListResult.users, batching, refresh boundaries, backend search, and scenario-specific model selection were verified against Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } @@ -477,12 +481,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm self-profile result documentation was reviewed section by section; nullable direct return, exact OpenIMUserInfo fields, and field-level commercial markers were verified against Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } @@ -524,12 +528,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm profile update parameters, overwrite semantics, Promise/event/query stages, and complete handle/off listener ownership were manually adapted to Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } @@ -566,12 +570,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm account-level receive-option semantics were manually adapted to the Private OpenIMSetSelfInfoRecvMsgOpt union, field-level commercial marker, and setSelfInfo event boundary on 2026-08-13." ], "reason": null } @@ -652,12 +656,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm presence semantics were reviewed section by section; the unix-specific subscribe string result, getUserStatus snapshot, exact status fields, handle/off lifecycle, and 3000-user boundary were verified on 2026-08-13." ], "reason": null } @@ -792,12 +796,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm friend snapshot, complete field model, pagination, and friend added/deleted/info-changed handle/off lifecycle were manually adapted to Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } @@ -836,12 +840,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm friend-search parameters and snapshot semantics were manually adapted to OpenIMSearchFriendsParams and OpenIMFriendListResult.friends on 2026-08-13." ], "reason": null } @@ -969,12 +973,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm batch friend-update fields, overwrite rules, and event confirmation were manually adapted together with the commercial single-user updateFriend difference on 2026-08-13." ], "reason": null } @@ -1110,12 +1114,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm application fields and four-event ownership were manually adapted to the unix pagination-only parameter shape, direct applications wrapper, and handle/off lifecycle on 2026-08-13." ], "reason": null } @@ -1154,12 +1158,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm applicant pagination and event merge semantics were manually adapted to nullable OpenIMApplicationListParams and OpenIMFriendApplicationListResult.applications on 2026-08-13." ], "reason": null } @@ -1330,12 +1334,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm delete-request identity and event boundary were manually adapted to the commercial OpenIMDeleteFriendRequestsParams.friendRequests wrapper on 2026-08-13." ], "reason": null } @@ -1380,12 +1384,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm blacklist workflow was reviewed section by section; blackUsers versus commercial blacks wrappers, full OpenIMBlackUserItem fields, asymmetric blocking semantics, and handle/off event merging were verified on 2026-08-13." ], "reason": null } @@ -5485,12 +5489,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm send-message target, parameter, server-confirmed result, clientMsgID replacement, and Promise/event/query stages were manually adapted to the direct OpenIMMessageItem return on 2026-08-13." ], "reason": null } @@ -7368,12 +7372,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm event lifecycle and sync semantics were reviewed section by section; handle/off control, exact scalar callback payloads, ownership links, and Harmony unsupported events were verified against Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } @@ -7464,12 +7468,12 @@ "locales": { "zh": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { "status": "verified", "evidence": [ - "Frozen Private 0.2.0-rc.3 manifest ownership, import-symbol, and native example policy checks passed on 2026-08-13." + "Wasm logging structure was reviewed section by section; initialization log constants, direct Promise diagnostics, operationID rules, uploadLogs shape, and privacy boundaries were verified against Private 0.2.0-rc.3 on 2026-08-13." ], "reason": null } diff --git a/package.json b/package.json index 334c1dfdc2..06a37c2a80 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "sdk:native:structure:sync": "node scripts/sync-client-sdk-structure.mjs ios flutter uniapp", "sdk:native:routes:sync": "node scripts/sync-client-sdk-route-skeletons.mjs ios flutter uniapp && node scripts/sync-content-metadata.mjs", "uniapp:ownership:sync": "node scripts/sync-uniapp-sdk-ownership.mjs", - "uniapp:audit:check": "node scripts/check-client-sdk-content-audit.mjs uniapp", + "uniapp:audit:check": "node scripts/check-client-sdk-content-audit.mjs uniapp && node scripts/check-uniapp-wasm-content-parity.mjs", "structure:sync": "node scripts/import-structure.mjs", "structure:report": "pnpm content:metadata && node scripts/structure-report.mjs && prettier --write docs/STRUCTURE_REPORT.md", "check": "eslint . && tsc --noEmit && pnpm test:audit && node scripts/check-content.mjs && node scripts/check-guides-content-audit.mjs && node scripts/check-wasm-content-audit.mjs && node scripts/check-localized-sdk-content.mjs && node scripts/check-client-sdk-content-audit.mjs && node scripts/check-wasm-sdk-examples.mjs && pnpm docsets-sync:lint-openapi && pnpm platform-api:test", diff --git a/scripts/__tests__/uniapp-wasm-content-parity.test.mjs b/scripts/__tests__/uniapp-wasm-content-parity.test.mjs new file mode 100644 index 0000000000..68bd5585fb --- /dev/null +++ b/scripts/__tests__/uniapp-wasm-content-parity.test.mjs @@ -0,0 +1,16 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import test from 'node:test'; + +const source = readFileSync( + new URL('../check-uniapp-wasm-content-parity.mjs', import.meta.url), + 'utf8', +); + +test('uni-app parity audit compares every shared English and Chinese route', () => { + assert.match(source, /content\/docs\/chat\/sdk/); + assert.match(source, /content\/zh\/docs\/chat\/sdk/); + assert.match(source, /path\.relative\(uniappRoot, uniappFile\)/); + assert.match(source, /content ratio/); + assert.match(source, /Wasm sections/); +}); diff --git a/scripts/check-uniapp-wasm-content-parity.mjs b/scripts/check-uniapp-wasm-content-parity.mjs new file mode 100644 index 0000000000..f923012834 --- /dev/null +++ b/scripts/check-uniapp-wasm-content-parity.mjs @@ -0,0 +1,80 @@ +import { readdir, readFile } from 'node:fs/promises'; +import path from 'node:path'; +import process from 'node:process'; + +const localeRoots = [ + ['en', 'content/docs/chat/sdk'], + ['zh', 'content/zh/docs/chat/sdk'], +]; + +const failures = []; + +for (const [locale, sdkRoot] of localeRoots) { + const wasmRoot = path.join(sdkRoot, 'wasm'); + const uniappRoot = path.join(sdkRoot, 'uniapp'); + + for (const uniappFile of await listMdxFiles(uniappRoot)) { + const relativePath = path.relative(uniappRoot, uniappFile); + const wasmFile = path.join(wasmRoot, relativePath); + let wasmSource; + try { + wasmSource = await readFile(wasmFile, 'utf8'); + } catch { + continue; + } + + const uniappSource = await readFile(uniappFile, 'utf8'); + const wasmBody = extractBody(wasmSource); + const uniappBody = extractBody(uniappSource); + const ratio = normalizedContentLength(uniappBody) / Math.max(normalizedContentLength(wasmBody), 1); + const wasmSections = extractSections(wasmBody); + const uniappSections = extractSections(uniappBody); + + if (ratio < 0.72) { + failures.push( + `${locale}:${relativePath} content ratio ${ratio.toFixed(2)} is below the 0.72 Wasm baseline`, + ); + } + if (uniappSections.length < wasmSections.length) { + failures.push( + `${locale}:${relativePath} keeps ${uniappSections.length}/${wasmSections.length} Wasm sections`, + ); + } + } +} + +if (failures.length > 0) { + console.error(`uni-app/Wasm content parity failed (${failures.length} findings):`); + for (const failure of failures) console.error(`- ${failure}`); + process.exitCode = 1; +} else { + console.log('uni-app/Wasm content parity passed for every shared route.'); +} + +async function listMdxFiles(root) { + const output = []; + for (const entry of await readdir(root, { withFileTypes: true })) { + const absolutePath = path.join(root, entry.name); + if (entry.isDirectory()) output.push(...(await listMdxFiles(absolutePath))); + else if (entry.isFile() && entry.name.endsWith('.mdx')) output.push(absolutePath); + } + return output; +} + +function extractBody(source) { + const parts = source.split(/^---\s*$/m); + return parts.slice(2).join('---').trim(); +} + +function extractSections(body) { + return [...body.matchAll(/^##+\s+(.+)$/gm)].map((match) => match[1].trim()); +} + +function normalizedContentLength(body) { + return body + .replace(/@openim\/wasm-client-sdk|@\/uni_modules\/unix-openim-sdk/g, '') + .replace(/openimsdk\.|OpenIM\./g, '') + .replace(/\{\s*data\s*:\s*[^}]+\}/g, '') + .replace(/\s+/g, ' ') + .trim().length; +} diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index ebc63b9dc1..564b07e20e 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4194,10 +4194,10 @@ { "path": "/sdk/uniapp/getting-started/before-you-start", "title": "开始之前", - "description": "准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。", + "description": "准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,再开始认证或发送消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started before-you-start", - "content": "接入前先确定目标是 uni app 还是 uni app x App,并准备与 unix openim sdk 0.2.0 rc.3 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。 准备服务与账号 客户端初始化需要以下信息: | 数据 | 来源 | 要求 | | | | | | apiAddr | OpenIMServer HTTP API | 设备可访问的完整地址 | | wsAddr | OpenIMServer WebSocket | 设备可建立长连接的完整地址 | | userID | 业务后端的账号映射 | 与 Token 对应且在服务端存在 | | Token | 可信业务后端 | 只授予当前用户,不在客户端生成 | 业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。 真机测试时, apiAddr 和 wsAddr 不能使用开发机的 localhost 。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。 准备插件与构建环境 把插件安装在项目的 uni modules/unix openim sdk 。使用 HBuilderX/uni app 5.23 系列,并按目标平台准备: Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。 iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。 HarmonyOS:仅 uni app x 商业版,API 24;使用与插件合同一致的 HAR。 标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。 选择平台标识 初始化使用插件导出的常量,不直接写数字:Android 使用 OpenIMPlatformAndroid ,iPhone 使用 OpenIMPlatformIOS ,HarmonyOS 使用 OpenIMPlatformHarmony 。 systemType 是当前系统说明字符串,例如 android 、 ios 或 harmony ,不可省略。 发布前检查 在真实目标设备上完成初始化、登录、普通消息收发与退出。 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。 Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。 准备完成后,先阅读 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk ,再进入 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。" + "content": "在 uni app / uni app x App 中接入 unix openim sdk 前,需要先准备设备可访问的 OpenIMServer、可信的用户认证流程、UTS 插件和目标平台原生构建环境。这些条件同时适用于 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 和 发送第一条消息 /sdk/uniapp/getting started/send first message 。Web、H5 和小程序不能使用本 UTS 原生插件。 准备 OpenIMServer 如果还没有可用的 OpenIMServer,先按 Docker 部署指南 /docs/guides/quick deployment/docker 完成部署,并确认实际 Android、iPhone 或 HarmonyOS 设备可以访问 apiAddr 与 wsAddr 。 初始化 SDK 需要以下两个服务地址: | 字段 | 说明 | | | | | apiAddr | OpenIMServer 的 HTTP API 地址,用于登录、同步和资源请求。生产 App 应使用设备可访问且证书有效的 HTTPS 地址。 | | wsAddr | OpenIMServer 的 WebSocket 地址,用于建立长连接和接收实时事件。生产 App 通常使用 WSS 地址。 | 不要只验证服务在服务器本机或开发 Mac 上能够访问。真机不能使用开发机的 localhost ;还应从实际设备核对局域网或公网路由、TLS 证书、反向代理和 WebSocket 升级。 公共版客户端可以连接公共 OpenIMServer。若要使用信令、session、翻译或其他标记为商业版的能力,服务端也必须部署对应商业能力;不能用公共服务端的失败结果判断商业 API 的客户端实现。 准备用户和 Token userID 标识 OpenIMSDK 用户,Token 用于认证当前用户。创建或绑定 OpenIMSDK 用户、签发 Token 和校验业务权限都应由可信后端完成,App 不能保存管理员 Token、secret 或其他服务端凭据。 后端接入 OpenIMServer REST API 前,可先阅读 准备使用 Platform API /platform api/prepare to use api 和 签发会话 Token /platform api/user/managing session tokens/issue a session token 。如果产品已有账号体系,后端应把业务账号与 OpenIMSDK userID 建立稳定映射,并确保返回的 Token 与该 userID 对应。 建议由业务后端提供登录信息接口,App 只取得 SDK 登录所需的最小数据: type OpenIMSDKSession = userID : string token : string async function loadOpenIMSDKSession : Promise const response = await uni.request url: $ businessApiURL /openim/session , method: 'POST', if response.statusCode = 200 throw new Error 'Failed to load OpenIM SDK session' return parseTrustedSessionResponse response.data 业务接口必须先验证当前业务账号,再返回与该账号对应的 OpenIMSDK 登录信息;不能接受客户端任意传入的 userID 后直接为其签发 Token。 apiAddr 和 wsAddr 通常作为受控的 App 环境配置传给 initSDK ,不需要随每次用户登录响应改变。 准备 UTS 插件与原生运行环境 把插件安装在项目的 uni modules/unix openim sdk 。使用 HBuilderX/uni app 5.23 系列,并按目标平台准备原生环境: | 宿主 | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 | | uni app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 | | Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 | Android 需要匹配的 JDK、Android SDK 和插件声明的 AAR/Maven 依赖,并为目标设备包含正确 ABI。 iOS 需要匹配的 Xcode/CocoaPods,最终 App 必须正确链接、嵌入并签名插件 XCFramework。 HarmonyOS 仅声明 uni app x 商业版支持,使用与插件合同一致的 HAR 和 API 24 工程。 标准基座不包含这些原生依赖。开发阶段应构建包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共版和商业版的原生制品混装在同一个插件目录,也不要直接修改 SDK 的数据库或原生缓存文件。 不同宿主的生命周期、类型与文件路径差异见 按宿主和平台接入 /sdk/uniapp/getting started/environment specific implementation 。 选择平台标识 initSDK 的 platformID 使用插件导出的常量,不直接填写数字:Android 使用 OpenIMPlatformAndroid ,iPhone 使用 OpenIMPlatformIOS ,HarmonyOS 使用 OpenIMPlatformHarmony 。 初始化还必须提供 systemType ,例如 android 、 ios 或 harmony 。平台常量和 systemType 应与实际运行目标匹配;它们会参与服务端多端登录策略和原生运行诊断。 发布前检查 正式发布前,应在产品实际支持的平台和网络环境中验证: initSDK 成功,随后 login 成功并收到 onConnectSuccess 。 App 前后台、网络断开恢复、Token 失效和被踢下线符合产品状态机。 Android 安装包没有重复 class/JNI,并包含目标设备 ABI。 iOS 真机包可以完成 link/embed/sign,权限说明和隐私清单完整。 HarmonyOS 使用精确匹配合同的商业 HAR,并对平台不支持能力返回明确错误。 两个不同账号能完成普通消息收发、历史查询和退出后的状态隔离。 商业版连接对应商业服务端,完成所启用能力的真实链路测试。 日志、截图和自动化证据不包含 Token、secret、完整私聊内容或不必要的本机绝对路径。 继续接入 准备完成后,先完成 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 和 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。确认连接成功后,再按照 发送第一条消息 /sdk/uniapp/getting started/send first message 准备单聊用户或群组目标并验证消息链路。" }, { "path": "/sdk/uniapp/getting-started/environment-specific-implementation", @@ -4210,18 +4210,18 @@ { "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", "title": "认证与管理登录会话", - "description": "登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。", + "description": "登录 OpenIM、查询登录状态、处理连接与 Token 事件并安全退出当前账号。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started authenticate-and-manage-session", - "content": "完成 initSDK 后,先注册连接与账号事件,再调用 login userID, token 。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 onConnectSuccess 。 注册登录事件 每次 on... 调用都返回独立的 OpenIMSDKEventSubscription 。保存全部句柄,并在账号或应用作用域结束时逐个释放。 import off, onConnectFailed, onConnectSuccess, onConnecting, onKickedOffline, onUserTokenExpired, onUserTokenInvalid, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const subscriptions : Array = connectSubscription, onConnecting = console.log 'OpenIM connecting' , onConnectFailed error = console.error error.errCode, error.errMsg , onKickedOffline = clearCurrentAccount , onUserTokenExpired = requestFreshToken , onUserTokenInvalid error = console.error error.errCode, error.errMsg , function releaseSessionSubscriptions subscriptions.forEach subscription = off subscription subscriptions.length = 0 onKickedOffline 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 logout 。 登录 import login from '@/uni modules/unix openim sdk' await login userID, token login 的真实签名是 login userID, token ,不是对象参数。Token 必须来自可信后端,并且与 userID 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。 查询当前状态 import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID, from '@/uni modules/unix openim sdk' const status = await getLoginStatus if status == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreAccountState currentUserID getLoginStatus 返回 OpenIMLoginStatusLogout 、 OpenIMLoginStatusLogging 或 OpenIMLoginStatusLogged 。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。 上报前后台与网络变化 import networkStatusChanged, setAppBackgroundStatus, from '@/uni modules/unix openim sdk' await setAppBackgroundStatus true // 进入后台 await setAppBackgroundStatus false // 回到前台 await networkStatusChanged // 网络恢复或网络类型变化 把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。 主动退出与切换账号 import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount 切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。 商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见 更新 Token 与观察 SDK session /sdk/uniapp/getting started/update token and observe sdk session 。" + "content": "unix openim sdk 使用 login 建立当前用户的登录会话。开始认证前,请先按照 开始之前 /sdk/uniapp/getting started/before you start 准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,并完成 安装与初始化 /sdk/uniapp/getting started/install initialize and inspect sdk 。 完整登录流程按以下顺序执行: 1. 在 App 作用域初始化唯一的 OpenIM Core。 2. 在登录前订阅连接、Token 和账号下线事件,避免丢失登录阶段的状态。 3. 从可信后端取得相互匹配的 userID 和 OpenIMSDK Token。 4. 调用 login userID, token ,等待 Promise 成功,并继续等待 onConnectSuccess 确认连接可用。 5. 连接成功后再查询用户、好友、会话、群组和消息数据。 6. 用户主动退出或切换账号时调用 logout ,然后释放旧账号的订阅并清理应用状态。 初始化 SDK 插件安装后,在应用级 service 中调用一次 initSDK 。初始化配置、平台常量、 systemType 、SDK 版本和反初始化规则见 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 。 unix openim sdk 导出扁平函数;业务代码不创建 SDK 实例,也不要让不同页面用不同服务地址重复初始化 Core。OpenIMServer 地址在 initSDK 时固定,当前用户身份在 login 时建立。 初始化配置边界 initSDK 接收 OpenIMInitConfig ,其中包含平台 ID、API 地址、WebSocket 地址、日志选项和必填的 systemType 。这些字段属于 App 和部署环境,不属于某个用户;切换账号时继续复用同一次初始化,不要把初始化配置拼进 login 。 理解 UTS 插件 unix openim sdk 是原生 UTS 插件,不是 JavaScript 单例工厂。插件内部持有唯一 OpenIM Core,uni app 和 uni app x 都通过 @/uni modules/unix openim sdk 的扁平导出访问它。标准基座未包含插件原生依赖;开发与发布包都必须使用包含该插件的原生构建产物。 获取当前用户的登录信息 调用业务后端提供的登录信息接口,取得当前用户的 userID 和 Token: const session = await loadOpenIMSDKSession const userID = session.userID const token = session.token userID 只是 OpenIMSDK 用户标识,不是认证凭据。Token 必须由可信后端取得并且与该 userID 对应;App 不负责创建用户、签发 Token,也不得保存管理员 Token 或服务端 secret。 在登录前注册连接事件 连接事件应在 login 前注册。这样可以捕获登录阶段因网络、服务地址、Token 或服务端状态产生的错误,并把连接状态反馈给界面。 import off, onConnectFailed, onConnectSuccess, onConnecting, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sessionSubscriptions : Array = sessionSubscriptions.push onConnecting = setConnectionState 'connecting' sessionSubscriptions.push onConnectSuccess = setConnectionState 'connected' sessionSubscriptions.push onConnectFailed errCode, errMsg = setConnectionState 'failed' console.error 'OpenIM SDK 连接失败', errCode, errMsg onConnectFailed 的处理器接收两个独立参数 errCode 和 errMsg ,不是错误对象。每次 on... 调用都返回独立的 OpenIMSDKEventSubscription ,不能把返回值当作取消函数直接调用。 登录当前用户 import login from '@/uni modules/unix openim sdk' try await login userID, token catch error console.error 'OpenIM SDK 登录失败', userID, error throw error 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | userID | string | 是 | 当前 OpenIMSDK 用户 ID,必须与 Token 对应。它不是昵称、手机号或临时会话 ID。 | | token | string | 是 | 当前用户的 OpenIMSDK Token,由可信后端返回;不要在客户端自行签发。 | login 的 Promise 成功表示登录请求已经完成; onConnectSuccess 表示 SDK 长连接已经可用。两者是不同阶段,不能只因 Promise 成功就立即调用依赖连接的消息、会话、群组或用户 API。 重复点击登录时,应复用正在进行的登录请求及其 Promise,避免并发调用 login 。初始化配置中的平台 ID、API 地址和 WebSocket 地址不作为 login 的对象参数重复传入。 处理 API 调用结果 插件的异步 API 直接返回 Promise 中的业务值,不使用 Wasm 文档中的 data 响应包装。失败时 Promise 会抛出插件错误;业务可记录脱敏后的错误码、方法名和用户 ID,用于与原生日志对应。 import getSelfUserInfo from '@/uni modules/unix openim sdk' try const currentUser = await getSelfUserInfo if currentUser = null useCurrentUser currentUser catch error console.error 'getSelfUserInfo failed', error 查询 API 的返回值用于建立调用时的快照。状态变更 API 没有可用于刷新界面的业务对象时,应继续根据对应页面说明处理事件或重新查询。Promise 成功、事件到达和重新查询校准是三个不同阶段。 查询当前登录状态 getLoginStatus 和 getLoginUserID 都不接收业务参数: import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID, from '@/uni modules/unix openim sdk' const loginStatus = await getLoginStatus if loginStatus == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreSessionFor currentUserID 登录状态常量如下: | 状态 | 说明 | | | | | OpenIMLoginStatusLogout | 当前 Core 未登录。 | | OpenIMLoginStatusLogging | 登录流程正在进行,不要再次发起并行登录。 | | OpenIMLoginStatusLogged | Core 已登录;仍应结合连接事件判断当前网络连接是否可用。 | getLoginUserID 返回 Core 当前登录的用户 ID,适合校验应用账号与 SDK 账号是否一致,但不能替代业务身份认证。这两个查询都不会触发连接事件。 切换账号时不要直接用新参数覆盖当前登录。先调用 logout 完成旧账号退出,再清理旧账号的订阅和状态,最后使用新账号调用 login 。 上报 App 运行状态 Android、iOS 与 HarmonyOS 的前后台和网络状态应在 App 级生命周期中上报。进入后台时向 setAppBackgroundStatus 传 true ,回到前台时传 false ;设备网络恢复或网络类型变化时调用 networkStatusChanged 。 import networkStatusChanged, setAppBackgroundStatus, from '@/uni modules/unix openim sdk' async function reportAppBackground await setAppBackgroundStatus true async function reportAppForeground await setAppBackgroundStatus false async function reportNetworkAvailable await networkStatusChanged setAppBackgroundStatus 和 networkStatusChanged 只报告运行环境变化,不会建立新的登录会话,也不能替代 login 或 Token 刷新。普通页面进入、退出时不要重复调用这些 App 级操作。 如何把这些函数连接到 uni app / uni app x 生命周期,以及如何处理 Badge 和 FCM Token,见 处理 App 生命周期与设备状态 /sdk/uniapp/getting started/handle app lifecycle and device state 。 处理 Token 生命周期 OpenIMSDK Token 由可信后端签发。公共流程在 Token 过期或无效时重新向后端取 Token,并按产品策略重新认证;商业版还可以使用 updateToken 热更新,见 更新 Token 与观察 SDK session /sdk/uniapp/getting started/update token and observe sdk session 。 import onUserTokenExpired, onUserTokenInvalid, from '@/uni modules/unix openim sdk' sessionSubscriptions.push onUserTokenExpired = requestFreshTokenAndRelogin sessionSubscriptions.push onUserTokenInvalid errCode, errMsg = console.warn 'OpenIM SDK Token 无效', errCode, errMsg redirectToSignIn onUserTokenInvalid 与 onConnectFailed 一样接收 errCode, errMsg 。这些值只用于诊断和界面提示,不应据此绕过重新认证。不要在日志或事件状态中保存 Token。 Token 模型 客户端 login 接收的是当前用户的 OpenIMSDK Token。Token 的签发、有效期、刷新、撤销和多端策略由业务后端与 OpenIMServer 配置决定。若产品需要短期会话或一次性登录,应在后端实现,并让 App 根据 Token 生命周期事件重新认证。 处理账号被强制下线 还应订阅账号被踢下线事件。该事件通常表示同一账号在其他客户端登录,或服务端策略要求当前端结束会话。 import onKickedOffline from '@/uni modules/unix openim sdk' sessionSubscriptions.push onKickedOffline = clearCurrentAccount showSignedInElsewhereDialog 收到 onKickedOffline 时,SDK 已进入下线流程,不要再并发调用 logout 。处理器只清理应用保存的当前用户、会话、消息视图和页面状态,再根据产品策略提示重新登录。 主动退出 OpenIM 用户主动退出或切换账号时调用 logout ,再清理当前用户的会话列表、消息视图、未读数和业务状态。被 onKickedOffline 强制下线不属于主动退出,不执行这里的 logout 流程。 import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount logout 的 Promise 成功表示当前 SDK 登录会话已经退出。切换账号时先等待旧账号退出完成,再清理旧状态和订阅,然后注册新账号作用域的事件并调用 login 。不要让两个账号的登录与退出流程并发执行。 仅断开 WebSocket 插件不提供“仅断开 WebSocket、但保留登录会话”的公共操作。前后台或网络变化通过 App 生命周期 API 上报;需要主动结束用户会话时使用 logout 。 清理登录相关事件监听 本页是连接、Token 和账号下线事件的完整监听归属页。退出登录、切换账号或销毁拥有这些监听的应用 service 时,逐个传给 off subscription : function releaseSessionSubscriptions sessionSubscriptions.forEach subscription = off subscription sessionSubscriptions.length = 0 连接事件没有业务实体合并键,应按当前 Core 和登录用户隔离状态。业务页面首次进入时通过查询 API 建立快照,再通过各领域事件合并增量。 下一步 开始之前 /sdk/uniapp/getting started/before you start 发送第一条消息 /sdk/uniapp/getting started/send first message 事件概览 /sdk/uniapp/events/overview events 日志 /sdk/uniapp/logger" }, { "path": "/sdk/uniapp/getting-started/send-first-message", "title": "发送第一条消息", - "description": "在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。", + "description": "在 uni-app / uni-app x App 中初始化 SDK、登录并验证单聊或群聊的首条文本消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started send-first-message", - "content": "本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。 1. 初始化并登录 先按 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 初始化,再从可信后端取得 userID 和 Token。登录前注册连接事件,连接成功后才允许发送。 import off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = markOpenIMReady // 应用作用域结束时释放。 off connectSubscription 完整登录和事件清理见 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。 2. 准备目标 | 场景 | recvID | groupID | | | | | | 单聊 | 已存在的接收用户 ID | 空字符串 | | 群聊 | 空字符串 | 当前用户已加入的群 ID | 目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。 3. 创建并发送文本消息 import createTextMessage, sendMessage, from '@/uni modules/unix openim sdk' const message = await createTextMessage '你好,OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage = await sendMessage message, recvID: 'user b', groupID: '', appendOutgoingMessage sentMessage createTextMessage 只创建本地消息对象,不会发送。 sendMessage 成功后直接返回最终 OpenIMMessageItem ,不需要读取 data 。发送端按 clientMsgID 合并返回值;接收端通过新消息事件按同一标识去重。 群聊只需把 recvID 改为空字符串,并填入 groupID : const sentGroupMessage = await sendMessage message, recvID: '', groupID: 'group 123', 4. 双端验证 用两个不同账号和两个独立客户端验证: 1. A 端发送后获得非空 clientMsgID ,消息状态进入发送成功。 2. B 端收到新消息事件,并能解析到相同业务内容。 3. A、B 重新进入会话后,都能从历史消息中读取该消息。 4. 退出 SDK 后普通事件不再写入旧账号状态。 下一步阅读 发送消息 /sdk/uniapp/message/sending messages/send message 、 接收消息 /sdk/uniapp/message/receiving messages/receive messages 和 加载历史消息 /sdk/uniapp/message/retrieving messages/load older messages 。" + "content": "本页说明如何在 uni app / uni app x App 中安装并初始化 unix openim sdk ,登录后发送第一条文本消息。开始前,请先完成 开始之前 /sdk/uniapp/getting started/before you start 列出的服务、用户、Token、插件和原生构建环境准备。 OpenIMSDK 消息的发送对象可以是用户或群组。单聊消息使用目标用户 recvID ;群聊消息使用目标群组 groupID 。 准备消息目标 单聊测试需要一个已存在的接收方用户。群聊测试需要一个已存在并且当前用户有权发言的 groupID ;发送群聊消息时不再传接收方用户 ID,也不需要指定某个群成员。 | 场景 | 需要准备的目标标识 | | | | | 单聊 | 已存在的接收方用户 ID,发送时写入 recvID , groupID 为空字符串。 | | 群聊 | 已存在的群 ID,发送时写入 groupID , recvID 为空字符串。 | 确认目标可用 首条消息通常用于验证客户端、OpenIMServer 和另一客户端之间的完整链路。发送前确认: 单聊接收方用户已存在,且服务端策略允许当前用户向其发送消息。 群聊目标 groupID 已存在,当前用户已加入该群,并且没有被群状态或禁言策略禁止发言。 两个测试客户端使用不同用户登录;不要用同一账号的界面现象代替对端收件验证。 开始使用 按照下面步骤发送首条文本消息。 第 1 步:安装 UTS 插件 把 unix openim sdk 安装到项目的 uni modules/unix openim sdk 目录。插件包含原生依赖,标准基座不能直接加载;运行前需要构建包含该插件的自定义基座,或使用项目的本地 Android/iOS 原生构建流程。 业务页面统一从插件根路径扁平导入函数与类型: import createTextMessage, sendMessage, from '@/uni modules/unix openim sdk' 不需要创建 SDK 实例,也不要导入或直接调用 Android、iOS、HarmonyOS 平台目录中的实现文件。 第 2 步:初始化 OpenIM SDK 在 App 作用域调用一次 initSDK 。下面以 Android 为例;iOS 和 HarmonyOS 使用各自的平台常量与 systemType 。 import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' apiAddr 和 wsAddr 必须能从实际设备访问, systemType 不可省略。完整字段、iOS/HarmonyOS 常量、版本查询和反初始化规则见 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 。 第 3 步:连接到 OpenIMServer 使用 开始之前 /sdk/uniapp/getting started/before you start 约定的业务接口取得当前用户的 userID 和 Token。登录前先按 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 注册连接与 Token 事件;本页只保留首条消息主流程,不重复定义完整监听器。 import login from '@/uni modules/unix openim sdk' const session = await loadOpenIMSDKSession await login session.userID, session.token login 的 Promise 成功表示登录请求完成;收到由认证页面统一处理的 onConnectSuccess 后,再调用依赖连接的消息 API。uni app / uni app x 的 login 使用两个位置参数,不接受 Wasm 的对象式登录参数。 第 4 步:确定消息目标 单聊只需要接收方用户 ID。把已经确认存在的用户 ID 写入 recvID : const recvID = 'user b' const groupID = '' 群聊只使用群 ID。可以复用业务系统已有的 groupID ,也可以先通过管理后台、业务后端或群组 API 创建测试群,并保存返回的群 ID: const recvID = '' const groupID = 'group 123' 创建群组时可以设置初始成员,但发送群消息本身不再传某个接收用户 ID。 第 5 步:创建并发送消息 发送文本消息分两步:先用 createTextMessage 创建本地 OpenIMMessageItem ,再通过 sendMessage 发送到目标用户或群组。 import createTextMessage, sendMessage, type OpenIMMessageItem, from '@/uni modules/unix openim sdk' const message = await createTextMessage '你好,OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage : OpenIMMessageItem = await sendMessage recvID, groupID, message, appendOutgoingMessage sentMessage createTextMessage 的 Promise 只返回待发送消息对象,不会发送消息,也不会触发新消息事件。 sendMessage 直接返回发送后的 OpenIMMessageItem ,不需要读取 Wasm 响应中的 data 。 发送端应按 clientMsgID 用 sentMessage 替换本地待发送项;另一已登录客户端通过新消息事件获得消息对象。完整事件、批量与单条回调、清理和会话路由见 接收消息 /sdk/uniapp/message/receiving messages/receive messages ,本页不重复注册。 验证发送结果 使用两个账号和两个独立客户端验证以下阶段: 1. A 端 sendMessage 成功并返回非空 clientMsgID 。 2. A 端按 clientMsgID 合并返回消息,而不是向列表重复追加一条。 3. B 端收到新消息事件,并能读取相同业务内容。 4. A、B 重新进入会话后,都能从历史消息中查询到该消息。 Promise 成功和对端事件到达是两个阶段,应分别验证。排查失败时记录脱敏后的错误码、当前用户 ID、目标用户或群组 ID、 clientMsgID ,并与 OpenIMServer 日志对应;不要记录 Token 或完整私聊内容。 下一步 开始之前 /sdk/uniapp/getting started/before you start 用户认证 /sdk/uniapp/getting started/authenticate and manage session 按宿主和平台接入 /sdk/uniapp/getting started/environment specific implementation 发送消息 /sdk/uniapp/message/sending messages/send message 接收消息 /sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", @@ -4250,42 +4250,42 @@ { "path": "/sdk/uniapp/user/overview-user", "title": "用户概览", - "description": "理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。", + "description": "了解 uni-app / uni-app x SDK 中的用户资料、好友关系、黑名单和在线状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user overview-user", - "content": "用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。 userID 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。 核心模型 OpenIMUserInfo 的公共字段包括 userID 、 nickname 、 faceURL 、 ex 和可选 createTime 。 attachedInfo 与 globalRecvMsgOpt 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。 好友数据使用 OpenIMFriendUserItem ,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 OpenIMBlackUserItem 。好友申请使用 OpenIMFriendApplicationItem ,申请状态由接受、拒绝和删除事件增量更新。 快照与事件 页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 userID 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。 当前资料: 查询自己的资料 /sdk/uniapp/user/profile/get self user info 与 修改自己的资料 /sdk/uniapp/user/profile/set self info 在线状态: 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 好友: 分页查询好友 /sdk/uniapp/user/friends/get friend list page 好友申请: 查询收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 黑名单: 查询黑名单 /sdk/uniapp/user/blacklist/get black list 业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。" + "content": "unix openim sdk 使用 userID 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。 群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 userID 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。 用户类型 SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要接口 | | | | | | OpenIMUserInfo | 当前登录用户资料、设置页、当前账号头像和昵称 | getSelfUserInfo 、 setSelfInfo | | OpenIMPublicUserItem | 应用用户查询、好友候选人、陌生人资料卡;它是 OpenIMUserInfo 的公开别名 | getUsersInfo | | OpenIMFriendUserItem | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | OpenIMBlackUserItem | 当前用户黑名单中的用户 | getBlackList 、 addBlack 、 removeBlack | | OpenIMFriendApplicationItem | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API | | OpenIMUserStatusItem | 用户汇总在线状态和在线平台 | subscribeUsersStatus 、 getUserStatus | 同一个 userID 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 OpenIMFriendUserItem ;陌生人资料卡使用 OpenIMPublicUserItem ;群成员列表使用 OpenIMGroupMemberItem 。会话列表和聊天页标题属于会话数据,应使用 OpenIMConversationItem.showName 。 OpenIMUserInfo 的公共字段包括 userID 、 nickname 、 faceURL 、 ex 和可选 createTime 。 attachedInfo 与 globalRecvMsgOpt 是 商业版字段 ,读取前应判空,不要假定公共服务端一定返回。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于查找好友候选人或展示资料卡 | 获取用户资料 /sdk/uniapp/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page | | 发送或处理好友申请 | 发送好友申请 /sdk/uniapp/user/friend applications/add friend 、 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient | | 修改好友资料 | 更新好友资料 /sdk/uniapp/user/friends/update friends | | 删除好友关系 | 删除好友 /sdk/uniapp/user/friends/delete friend | | 查看和维护当前用户黑名单 | 获取黑名单 /sdk/uniapp/user/blacklist/get black list | | 读取或更新当前用户昵称、头像和扩展资料 | 更新当前用户资料 /sdk/uniapp/user/profile/set self info | | 设置账号级消息接收策略 | 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception | | 查看加好友权限的当前合同边界 | 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission | | 订阅和读取在线状态 | 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status | | 读取群成员、搜索成员或查询指定成员资料 | 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list | 业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。 状态更新 页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量: 当前用户资料变化:见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 好友申请变化:见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。 好友关系和资料变化:见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 。 黑名单变化:见 获取黑名单 /sdk/uniapp/user/blacklist/get black list 。 在线状态变化:见 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 。 这些列表都按 userID 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。" }, { "path": "/sdk/uniapp/user/profile/get-users-info", - "title": "批量查询用户资料", - "description": "按 userID 列表查询用户公开资料。", + "title": "获取用户资料", + "description": "按 userID 批量查询应用用户的公开资料。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", - "content": "使用 getUsersInfo 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 OpenIMUserListResult | null 。 import getUsersInfo from '@/uni modules/unix openim sdk' const result = await getUsersInfo 'user a', 'user b' const users = result?.users ?? users.forEach user = cacheUser user.userID, user 返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 OpenIMUserInfo 字段见 用户概览 /sdk/uniapp/user/overview user 。其中 attachedInfo 与 globalRecvMsgOpt 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 ex 或 attachedInfo 当作可信身份凭据。 大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。" + "content": "getUsersInfo 可以按 userID 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 查询公开资料 传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user Promise 成功后直接返回 OpenIMUserListResult | null ,其中 users 是查询到的 OpenIMUserInfo ; OpenIMPublicUserItem 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 页面常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | createTime | number \\| null (可选) | 用户记录创建时间。 | | ex | string | 账号级扩展字段,格式由业务约定。 | | attachedInfo 商业版字段 | string \\| null (可选) | 仅按已确认的商业业务协议解析。 | | globalRecvMsgOpt 商业版字段 | number \\| null (可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | ex 和 attachedInfo 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 setSelfInfo 更新。 调用结果与资料刷新 以返回的 users 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 userID ,去重后批量查询,再按 userID 合并结果。 SDK 没有面向任意公开用户资料的通用变更事件。 onSelfInfoUpdated 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 搜索添加好友 搜索并添加好友时,通常先由业务后端返回候选 userID ,再调用 getUsersInfo 展示公开资料。用户确认目标后,再进入好友申请流程。 async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? 如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 userID 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 按场景选择展示数据 | 场景 | 优先使用 | | | | | 应用用户搜索、陌生人资料卡 | OpenIMPublicUserItem / OpenIMUserInfo | | 好友列表、联系人页、好友备注 | OpenIMFriendUserItem | | 群成员列表、群内昵称、群角色 | OpenIMGroupMemberItem | 好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 、 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 和 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 下一步 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient" }, { "path": "/sdk/uniapp/user/profile/get-self-user-info", - "title": "查询自己的资料", - "description": "读取当前已登录用户的 OpenIM 资料。", + "title": "获取当前用户资料", + "description": "查询当前已登录用户的 OpenIM 资料快照。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", - "content": "getSelfUserInfo 查询当前 SDK 登录账号的资料,返回 OpenIMUserInfo | null 。调用前应确认 SDK 已登录且连接可用。 import getSelfUserInfo from '@/uni modules/unix openim sdk' const self = await getSelfUserInfo if self = null renderProfile self.nickname, self.faceURL 以返回的 userID 校验应用账号与 SDK 账号是否一致。 nickname 、 faceURL 和 ex 属于公共字段; attachedInfo 与 globalRecvMsgOpt 商业版 为可选扩展,不应在公共环境中强制解包。 资料变化由 修改自己的资料 /sdk/uniapp/user/profile/set self info 页面归属的 onSelfInfoUpdated 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。" + "content": "完成初始化、登录并确认连接可用后,调用 getSelfUserInfo 查询当前账号资料: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL 返回结果 Promise 成功后直接返回 OpenIMUserInfo | null ,没有 data 包装。非空对象字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number \\| null (可选) | 用户记录创建时间。 | | globalRecvMsgOpt 商业版字段 | number \\| null (可选) | 当前账号的全局消息接收方式;常量和语义见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。 | | attachedInfo 商业版字段 | string \\| null (可选) | SDK 附加信息;只按已确认的业务约定解析。 | | ex | string | 由业务约定的账号级扩展字符串。 | 以返回的 userID 校验应用账号与 SDK 当前账号是否一致。 null 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 onSelfInfoUpdated 合并和重新查询方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。" }, { "path": "/sdk/uniapp/user/profile/set-self-info", - "title": "修改自己的资料", - "description": "更新当前用户资料并处理 onSelfInfoUpdated 事件。", + "title": "更新当前用户资料", + "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", - "content": "setSelfInfo 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。 import off, onSelfInfoUpdated, setSelfInfo, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', off selfInfoSubscription OpenIMSetSelfInfoParams 支持 nickname 、 faceURL 、 ex ,以及商业版使用的 globalRecvMsgOpt 。Promise 成功表示服务端接受修改;界面最终状态以 onSelfInfoUpdated 或重新查询的资料为准。 事件返回完整 OpenIMUserInfo 。按 userID 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。" + "content": "setSelfInfo 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 null 代替“保持不变”。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string \\| null | 否 | 新昵称。 | | faceURL | string \\| null | 否 | 新头像地址。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | | globalRecvMsgOpt 商业版字段 | OpenIMSetSelfInfoRecvMsgOpt \\| null | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 setSelfInfo 也承载账号级 globalRecvMsgOpt ,但不应与普通资料一起保存。消息接收策略见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission 。 Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 onSelfInfoUpdated 或重新调用 getSelfUserInfo 校准。 监听当前用户资料变化 本页是 onSelfInfoUpdated 的完整监听归属页。事件携带更新后的完整 OpenIMUserInfo ,应按 userID 替换当前用户快照: import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription 不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 releaseSelfInfoSubscription 。" }, { "path": "/sdk/uniapp/user/profile/set-global-message-reception", - "title": "设置全局消息接收选项", - "description": "通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。", + "title": "设置全局消息接收方式", + "description": "设置当前账号在全部会话中的默认消息接收与通知方式。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", - "content": "globalRecvMsgOpt 商业版 是 OpenIMSetSelfInfoParams 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 recvMsgOpt 不同:前者影响账号全局,后者只影响指定会话。 import setSelfInfo from '@/uni modules/unix openim sdk' // 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。 await setSelfInfo globalRecvMsgOpt: 0 只传 globalRecvMsgOpt ,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用 查询自己的资料 /sdk/uniapp/user/profile/get self user info 确认最终值;当前插件没有为这一字段单独提供 setter。 公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。" + "content": "globalRecvMsgOpt 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 当前插件通过 setSelfInfo 更新该字段: import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, OpenIMSetSelfInfoRecvMsgOpt 的合同允许以下数值: | 数值 | 含义 | | | | | 0 | 正常接收消息,并允许离线推送或通知。 | | 1 | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 | | 2 | 接收消息,但不触发离线推送或通知,即全天免打扰。 | 只传 globalRecvMsgOpt ,避免在切换接收策略时意外覆盖昵称、头像或 ex 。当前插件没有为这一字段提供独立 setter。 单个会话的 recvMsgOpt 是更细粒度的会话设置,见 设置会话消息接收方式 /sdk/uniapp/conversation/managing conversations/set message receive option 。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。 Promise 成功表示设置请求完成,不等于 onSelfInfoUpdated 已经到达。事件监听和 getSelfUserInfo 校准方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。" }, { "path": "/sdk/uniapp/user/profile/set-friend-add-permission", @@ -4298,10 +4298,10 @@ { "path": "/sdk/uniapp/user/online-status/subscribe-users-status", "title": "订阅用户在线状态", - "description": "订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。", + "description": "订阅指定用户的在线状态,查询初始快照并合并状态事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user online-status subscribe-users-status", - "content": "subscribeUsersStatus 为指定用户建立状态订阅; getUserStatus 可立即查询这些用户的当前状态。 onUserStatusChanged 是本页的完整事件归属。 import getUserStatus, off, onUserStatusChanged, subscribeUsersStatus, from '@/uni modules/unix openim sdk' const statusSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status const userIDs = 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status off statusSubscription 先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 userID 和平台更新,不把一次离线事件等同于用户所有设备都离线。 只订阅当前界面或业务确实需要的用户,并在不再需要时调用 取消用户在线状态订阅 /sdk/uniapp/user/online status/unsubscribe users status 。" + "content": "在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看 App、某个会话或某条消息。建议只订阅当前界面和业务确实需要的用户;每个账号最多订阅 3000 个用户,不要一次订阅整个用户目录。 subscribeUsersStatus 在 unix SDK 中用于建立订阅,Promise 成功只返回字符串结果,不直接返回状态数组。建立订阅后再调用 getUserStatus 获取当前快照,后续变化通过 onUserStatusChanged 合并。 import getUserStatus, subscribeUsersStatus, from '@/uni modules/unix openim sdk' const userIDs = uniqueUserIDs 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status 先去除空值和重复 userID 。订阅成功、查询快照和后续事件是三个阶段,不能把 subscribeUsersStatus 的字符串返回值当成在线状态对象。 在线状态字段 getUserStatus 返回 OpenIMUserStatusListResult | null ,其中 statuses 的元素是 OpenIMUserStatusItem : | 字段 | 类型 | 说明 | | | | | | userID | string | 状态所属用户 ID,也是状态缓存的合并标识。 | | status | number | 汇总在线状态;应使用插件导出的在线状态常量解释,不要自行发明数值。 | | platformIDs | number | 当前在线平台列表;为空时不要推断具体设备或最后活跃时间。 | 一次平台离线不一定表示用户所有设备都离线。应用应同时查看汇总 status 与 platformIDs ,并按服务端多端策略展示。 监听在线状态变化 本页是 onUserStatusChanged 的完整监听归属页。为缩小注册与快照查询之间的丢失窗口,推荐先注册事件,再建立订阅和查询快照: import off, onUserStatusChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const statusSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status await subscribeUsersStatus userIDs const current = await getUserStatus userIDs current?.statuses.forEach status = replaceUserStatus status.userID, status function releaseStatusListener off statusSubscription 初始快照与事件都按 userID 幂等合并。退出登录、切换账号或销毁在线状态层时调用 releaseStatusListener ;不再需要某些用户状态时,还要调用 取消用户在线状态订阅 /sdk/uniapp/user/online status/unsubscribe users status ,避免长期占用订阅额度。" }, { "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", @@ -4321,11 +4321,11 @@ }, { "path": "/sdk/uniapp/user/friends/get-friend-list-page", - "title": "查询好友列表", - "description": "分页或一次性查询好友,并处理好友新增、删除与资料变化事件。", + "title": "分页获取好友列表", + "description": "使用 uni-app / uni-app x SDK 分页查询当前用户的好友列表。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends get-friend-list-page", - "content": "getFriendListPage 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 getFriendList 。本页同时归属好友新增、删除和资料变化事件。 import getFriendListPage, off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const friendAddedSubscription = onFriendAdded friend = upsertFriend friend.userID, friend const subscriptions : Array = friendAddedSubscription, onFriendDeleted friend = removeFriend friend.userID , onFriendInfoChanged friend = upsertFriend friend.userID, friend , const page = await getFriendListPage offset: 0, count: 100 replaceFriendSnapshot page?.friends ?? subscriptions.forEach subscription = off subscription offset 从 0 开始, count 是本页期望数量。继续分页直到返回数量小于 count ,并按 userID 去重。 getFriendList filterBlack 的 filterBlack 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。 事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。" + "content": "先注册好友事件,再调用 getFriendListPage 建立当前好友快照。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的好友数量。 | | filterBlack | boolean | 否 | 是否从结果中过滤黑名单用户。 | import getFriendListPage from '@/uni modules/unix openim sdk' const result = await getFriendListPage offset: 0, count: 50, filterBlack: true, Promise 成功后, result?.friends 是当前页 OpenIMFriendUserItem 。继续加载时按请求条目数增加 offset ;好友增删后重置分页。原生 API 直接返回 OpenIMFriendListResult | null ,不使用 data 包装。 好友资料字段 OpenIMFriendUserItem 表示当前账号与一个好友的关系资料: | 字段 | 类型 | 说明 | | | | | | userID | string | 好友的用户 ID,也是好友列表的稳定标识。 | | nickname | string | 好友的账号级昵称。 | | faceURL | string | 好友的账号级头像地址。 | | remark | string | 当前账号为该好友设置的备注。 | | isPinned | boolean | 该好友是否在联系人列表中置顶。 | | ownerUserID | string | 这条好友关系所属的用户 ID,通常是当前账号。 | | operatorUserID | string | 建立或更新这条关系的操作用户 ID。 | | addSource | number | 好友关系的添加来源值。 | | createTime | number | 好友关系创建时间。 | | ex | string | 好友关系扩展字符串。 | | attachedInfo | string | SDK 附加信息;只按已确认的业务约定解析。 | nickname 、 faceURL 是账号资料快照, remark 、 isPinned 、 ex 和 attachedInfo 属于好友关系。不要用 OpenIMFriendUserItem 覆盖陌生人的 OpenIMPublicUserItem ,也不要把好友备注写回账号昵称。 同步好友变化 本页是 onFriendAdded 、 onFriendInfoChanged 和 onFriendDeleted 的完整监听归属页。查询负责建立快照,事件负责按 userID 合并增量。 import off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const friendSubscriptions : Array = onFriendAdded friend = mergeFriend friend.userID, friend , onFriendInfoChanged friend = mergeFriend friend.userID, friend , onFriendDeleted friend = removeFriend friend.userID , function removeFriendListeners friendSubscriptions.forEach subscription = off subscription 退出登录、切换账号或销毁联系人状态层时调用 removeFriendListeners 。" }, { "path": "/sdk/uniapp/user/friends/search-friends", @@ -4333,7 +4333,7 @@ "description": "按用户 ID、昵称或备注搜索当前好友。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends search-friends", - "content": "searchFriends 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。 import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? keywordList 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 OpenIMFriendListResult ,按 userID 去重并结合最新好友事件更新。 搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用 查询指定好友资料 /sdk/uniapp/user/friends/get specified friends info 。" + "content": "searchFriends 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。 当前建议只使用一个去除首尾空格后的非空关键词。空关键词应在调用前拦截。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词数组;当前只使用第一个非空关键词。 | | isSearchUserID | boolean | 是 | 是否匹配好友用户 ID。 | | isSearchNickname | boolean | 是 | 是否匹配好友昵称。 | | isSearchRemark | boolean | 是 | 是否匹配当前用户设置的好友备注。 | import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? Promise 成功后直接返回 OpenIMFriendListResult | null ,从 friends 读取 OpenIMFriendUserItem 。好友字段见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 。 搜索结果只建立当前条件下的展示快照,不改变好友资料或服务端索引,也不应覆盖完整好友列表。按 userID 关联现有好友状态,并继续合并好友事件;需要查指定好友资料时使用 查询指定好友资料 /sdk/uniapp/user/friends/get specified friends info 。" }, { "path": "/sdk/uniapp/user/friends/get-specified-friends-info", @@ -4357,7 +4357,7 @@ "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends update-friends", - "content": "updateFriends 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: '项目成员', isPinned: true, friendUserIDs 不能为空。 remark 、 isPinned 和 ex 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 onFriendInfoChanged 或重新查询好友列表确认。 商业版还提供 updateFriend 商业版 ,参数为单个 userID ,字段名使用 pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: '负责人' 不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。" + "content": "updateFriends 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 | | remark | string \\| null | 否 | 新备注。 | | isPinned | boolean \\| null | 否 | 是否置顶好友。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: '项目成员', isPinned: true, friendUserIDs 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。 ex 是完整字符串,不会自动合并 JSON 字段。 Promise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 onFriendInfoChanged 按 userID 合并,完整监听见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page ;必要时重新查询校准。 商业版还提供 updateFriend 商业版 ,参数为单个 userID ,字段名使用 pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: '负责人' updateFriend 使用单个 userID ,并把置顶字段命名为 pinned ;其 remark 和 ex 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。" }, { "path": "/sdk/uniapp/user/friends/delete-friend", @@ -4377,11 +4377,11 @@ }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", - "title": "查询收到的好友申请", - "description": "分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。", + "title": "获取收到的好友申请", + "description": "分页查询当前用户收到的好友申请,并同步申请状态变化。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-recipient", - "content": "getFriendApplicationListAsRecipient 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。 import getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onFriendApplicationAdded item = upsertApplication item const subscriptions : Array = addedSubscription, onFriendApplicationAccepted item = upsertApplication item , onFriendApplicationRejected item = upsertApplication item , onFriendApplicationDeleted item = removeApplication item , const page = await getFriendApplicationListAsRecipient offset: 0, count: 50 replaceReceivedApplications page?.applications ?? subscriptions.forEach subscription = off subscription 参数可省略;显式分页时 offset 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。" + "content": "getFriendApplicationListAsRecipient 查询其他用户发给当前账号的好友申请。uni app / uni app x 的 OpenIMApplicationListParams 只提供分页字段,不包含 Wasm 版本的 handleResults 筛选;需要只展示待处理申请时,在返回后根据 handleResult 过滤。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsRecipient from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsRecipient offset: 0, count: 20, const applications = result?.applications ?? replaceReceivedApplications applications Promise 成功后直接返回 OpenIMFriendApplicationListResult | null ,其中 applications 是当前页 OpenIMFriendApplicationItem 。查询本身不会触发申请事件。 好友申请字段 | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称快照。 | | fromFaceURL | string | 申请发起人的头像快照。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称快照。 | | toFaceURL | string | 申请接收人的头像快照。 | | reqMsg | string | 申请附言。 | | handleResult | number | 当前处理结果: 0 待处理、 1 已同意、 1 已拒绝。 | | handlerUserID | string | 执行处理的用户 ID;未处理时可能为空。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间;未处理时不应当作有效时间展示。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | | attachedInfo | string | SDK 附加信息,只按已确认的业务约定解析。 | 申请记录使用 fromUserID:toUserID 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 userID 调用 getUsersInfo 。 同步好友申请变化 本页是 onFriendApplicationAdded 、 onFriendApplicationAccepted 、 onFriendApplicationRejected 和 onFriendApplicationDeleted 的完整监听归属页。推荐先注册事件,再查询快照: import off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const applicationSubscriptions : Array = onFriendApplicationAdded item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationAccepted item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationRejected item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationDeleted item = removeFriendApplication item.fromUserID, item.toUserID , function releaseFriendApplicationSubscriptions applicationSubscriptions.forEach subscription = off subscription applicationSubscriptions.length = 0 按当前用户是否为 toUserID ,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 归属的 onFriendAdded 合并。 收到申请后应调用接受或拒绝 API,不要只修改本地 handleResult 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 releaseFriendApplicationSubscriptions 。" }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", @@ -4389,7 +4389,7 @@ "description": "分页读取当前账号发出的好友申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-applicant", - "content": "getFriendApplicationListAsApplicant 查询当前账号发出的申请,返回 OpenIMFriendApplicationListResult | null 。 import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? 参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。 申请状态变化事件统一在 查询收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。" + "content": "getFriendApplicationListAsApplicant 查询当前账号发出的申请,返回 OpenIMFriendApplicationListResult | null 。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? Promise 成功后, applications 是当前页已发出的 OpenIMFriendApplicationItem ,字段含义见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。该查询本身不会触发申请事件。 分页结果可能在查询期间发生变化。事件按 fromUserID:toUserID 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。" }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", @@ -4421,15 +4421,15 @@ "description": "商业版批量删除指定好友申请记录。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications delete-friend-requests", - "content": "deleteFriendRequests 商业版 批量删除明确指定的好友申请记录。 import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , , friendRequests 中每项使用 OpenIMSimpleFriendRequest 的 fromUserID 与 toUserID 精确定位。删除申请记录不会自动解除已经建立的好友关系。 Promise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。" + "content": "deleteFriendRequests 商业版 批量删除明确指定的好友申请记录。 参数说明 该方法接收 OpenIMDeleteFriendRequestsParams ,其中 friendRequests 数组的每一项使用以下字段: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendRequests .fromUserID | string | 是 | 申请发起人的用户 ID。 | | friendRequests .toUserID | string | 是 | 申请接收人的用户 ID。 | import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , , 每项都是 OpenIMSimpleFriendRequest ,通过 fromUserID:toUserID 精确定位。删除申请记录不等于拒绝申请,也不会解除已经建立的好友关系;删除好友关系应使用好友删除 API。 Promise 成功表示删除请求已完成,随后可能收到 onFriendApplicationDeleted 。完整事件监听见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient ,按 fromUserID:toUserID 移除记录。 批量操作前应在 UI 中确认目标。失败时不要假定全部或部分记录已经删除;重新查询收到和发出的申请列表,以服务端快照校准。" }, { "path": "/sdk/uniapp/user/blacklist/get-black-list", - "title": "查询黑名单", - "description": "查询黑名单快照,并处理加入与移除黑名单事件。", + "title": "获取黑名单", + "description": "查询当前用户的黑名单快照,并处理加入与移除黑名单事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user blacklist get-black-list", - "content": "公共入口 getBlackList 返回 OpenIMBlackListResult | null 。本页同时归属 onBlackAdded 与 onBlackDeleted 。 import getBlackList, off, onBlackAdded, onBlackDeleted, from '@/uni modules/unix openim sdk' const blackAddedSubscription = onBlackAdded user = upsertBlackUser user const blackDeletedSubscription = onBlackDeleted user = removeBlackUser user.userID const result = await getBlackList replaceBlackList result?.blackUsers ?? off blackAddedSubscription off blackDeletedSubscription 商业版还提供 getBlacks 商业版 ,返回包装字段名为 blacks : import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlackList commercialResult?.blacks ?? 两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。" + "content": "OpenIMSDK 黑名单记录当前用户主动拉黑的用户。调用 getBlackList 可以获取完整列表,用于构建黑名单设置页、展示资料卡关系状态和限制聊天入口。 黑名单与群组管理是两类独立能力。禁言、移除群成员或调整群角色时,应使用群成员 API; getBlackList 只读取当前用户维护的黑名单。 获取黑名单 完成初始化、登录并确认连接可用后调用 getBlackList 。Promise 直接返回 OpenIMBlackListResult | null ; blackUsers 为空数组表示当前没有黑名单用户。 import getBlackList from '@/uni modules/unix openim sdk' const result = await getBlackList const blockedUsers = result?.blackUsers ?? replaceBlockedUsers blockedUsers 资料卡、会话操作菜单和联系人列表通常只需要判断某个 userID 是否在黑名单中。建议用 userID 建立集合,昵称和头像仅用于展示。 const blockedUserIDs = new Set blockedUsers.forEach user = blockedUserIDs.add user.userID function isBlocked userID : string : boolean return blockedUserIDs.has userID 商业版还提供 getBlacks 商业版 ,其包装字段名是 blacks : import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlockedUsers commercialResult?.blacks ?? 两个入口不要混用返回字段。一般业务选择一个与所安装版本一致的入口,不需要同时查询两份快照。 黑名单记录字段 blackUsers 中的每一项都是 OpenIMBlackUserItem : | 字段 | 类型 | 说明 | | | | | | userID | string | 被当前用户拉黑的目标用户 ID,也是列表和事件合并标识。 | | nickname | string | 目标用户昵称,用于展示。 | | faceURL | string | 目标用户头像地址。 | | ownerUserID | string | 这条黑名单关系的所有者,通常是当前登录用户。 | | operatorUserID | string | 执行拉黑操作的用户 ID。 | | createTime | number | 黑名单关系创建时间。 | | addSource | number | 黑名单关系的添加来源值。 | | ex | string | 扩展字段,只解析业务已经约定的内容。 | | attachedInfo | string | SDK 附加信息,只按已确认的业务约定解析。 | 若黑名单页还要展示公开资料或好友备注,应按 userID 合并,并明确区分 OpenIMBlackUserItem 、 OpenIMFriendUserItem 和 OpenIMPublicUserItem 的来源。 调用结果与增量变化 getBlackList 成功后,用返回数组完整替换当前黑名单快照。该查询本身不会触发新增或删除事件;首次进入页面、重新登录或用户主动刷新时,应重新查询完整列表。 本页是 onBlackAdded 和 onBlackDeleted 的完整监听归属页: import off, onBlackAdded, onBlackDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const blacklistSubscriptions : Array = onBlackAdded user = upsertBlockedUser user.userID, user , onBlackDeleted user = removeBlockedUser user.userID , function releaseBlacklistSubscriptions blacklistSubscriptions.forEach subscription = off subscription blacklistSubscriptions.length = 0 事件按 userID 合并。加入黑名单后,对方不能向当前用户发送消息,但当前用户仍可向对方发送;若产品要求双向限制,应由业务层额外控制。黑名单与好友关系仍是独立状态,客户端应分别查询,不能假定拉黑一定删除好友。 退出登录、切换账号或销毁黑名单状态层时调用 releaseBlacklistSubscriptions 。" }, { "path": "/sdk/uniapp/user/blacklist/add-black", @@ -5170,10 +5170,10 @@ { "path": "/sdk/uniapp/message/sending-messages/send-message", "title": "发送消息", - "description": "把已创建的消息发送给单聊用户或群组。", + "description": "使用 uni-app / uni-app x SDK 发送待发送消息对象。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message", - "content": "sendMessage 接收 OpenIMSendMessageOptions ,Promise 直接返回最终 OpenIMMessageItem 。 import sendMessage from '@/uni modules/unix openim sdk' const sent = await sendMessage message, recvID: 'user b', groupID: '', isOnlineOnly: false, upsertMessage sent.clientMsgID, sent 单聊填 recvID 、群聊填 groupID ,另一个传空字符串。 offlinePushInfo 可按产品推送策略提供; isOnlineOnly 为 true 时不按普通持久消息处理。 发送进度按 clientMsgID 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 clientMsgID 的重复消息,除非产品明确要求。" + "content": "sendMessage 发送由消息创建 API 返回的 OpenIMMessageItem 。单聊只填写 recvID ,群聊只填写 groupID 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写目标群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 待发送的消息对象。 | | offlinePushInfo | OpenIMOfflinePush | 否 | 离线推送配置。 | | isOnlineOnly | boolean | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessage from '@/uni modules/unix openim sdk' const sentMessage = await sendMessage recvID: receiverUserID, groupID: '', message, isOnlineOnly: false, Promise 成功后,直接返回服务端确认的 OpenIMMessageItem ,原生 UTS API 不使用 data 包装。发送端应使用返回对象按 clientMsgID 替换本地待发送项;常用字段和内容字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 其他客户端通过新消息事件接收。Promise 成功、接收事件到达和历史查询校准是不同阶段。提供失败重试时,应继续保留同一个 clientMsgID 下的待发送消息,除非产品明确创建一次新的发送。 资源已由业务上传并写入 URL 型消息时,使用 sendMessageNotOss /zh/sdk/uniapp/message/sending messages/send message not oss 。" }, { "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", @@ -5498,10 +5498,10 @@ { "path": "/sdk/uniapp/events/overview-events", "title": "事件概览", - "description": "管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。", + "description": "注册 uni-app / uni-app x SDK 事件,并按业务生命周期同步连接与数据状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp events overview-events", - "content": "每个 on... 调用同步返回独立 OpenIMSDKEventSubscription ,其中包含 id 与 eventName 。正常清理使用 off subscription ;不要继续使用旧版“监听函数直接返回取消闭包”的写法。 import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const startSubscription = onSyncServerStart reinstalled = beginSyncUI reinstalled const subscriptions : Array = startSubscription, onSyncServerProgress progress = updateSyncProgress progress , onSyncServerFinish reinstalled = finishSyncUI reinstalled , onSyncServerFailed reinstalled = failSyncUI reinstalled , subscriptions.forEach subscription = off subscription 同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。 offAll eventName 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。 HarmonyOS unsupported 事件 HarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、 onMessageKvInfoChanged 、 onStreamChange ,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。 事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。" + "content": "unix openim sdk 通过 on... 函数推送连接、同步、用户、好友、会话、群组、消息和商业信令相关事件。所有事件函数都从 @/uni modules/unix openim sdk 扁平导入,不需要为不同领域创建 SDK 实例或原生 listener 对象。 注册与移除事件 每次 on... 调用同步返回一个独立的 OpenIMSDKEventSubscription ,其中包含 id 与 eventName 。应用必须保存该句柄,并在拥有它的页面、状态层或账号作用域结束时传给 off subscription 。 import off, onConnectSuccess, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const connectionSubscription : OpenIMSDKEventSubscription = onConnectSuccess = setConnectionState 'connected' // 拥有该监听的作用域结束时执行。 off connectionSubscription 不要继续使用旧版“监听函数直接返回取消闭包”的写法,也不要调用 connectionSubscription 。同一个事件可以有多个订阅者; off 只删除传入句柄对应的处理器,不影响其他模块。 offAll eventName 会删除指定事件名的全部处理器,只适合应用整体销毁、可控测试重置或明确拥有该事件全部监听的基础设施。普通组件、页面和功能模块不得用它代替局部清理,否则会移除其他消费者的监听。 事件处理器应尽快返回。耗时查询、文件操作和网络请求应进入应用队列,并在写回状态前确认当前登录用户或商业版 session epoch 没有变化。每个事件的完整监听代码只放在下表链接的归属页面,本页不重复其他领域的业务处理器。 选择注册时机 | 事件范围 | 建议生命周期 | 对应页面 | | | | | | 连接和 Token | 在 login 前注册,切换账号时清理 | 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session | | 用户、好友和黑名单 | 联系人状态层初始化时注册 | 用户概览 /sdk/uniapp/user/overview user | | 会话列表 | 会话列表状态层初始化时注册 | 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list | | 会话未读数 | 应用角标状态层初始化时注册 | 维护总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count | | 群组列表 | 群组状态层初始化时注册 | 群组概览 /sdk/uniapp/group/overview group | | 群成员 | 群成员状态层初始化时注册 | 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list | | 入群申请 | 群申请状态层初始化时注册 | 获取收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient | | 消息 | 消息状态层初始化时注册 | 接收消息 /sdk/uniapp/message/receiving messages/receive messages | | 商业信令 | 通话功能初始化时注册 | 通话事件 /sdk/uniapp/calling/managing calls/handle call events | | SDK session | 依赖唯一 Core 的商业插件初始化时注册 | 更新 Token 与观察 SDK session /sdk/uniapp/getting started/update token and observe sdk session | 不要在每次组件渲染、 onShow 或列表刷新时重复注册。多次注册同一个逻辑会造成重复消息、未读数反复累加,或让旧账号的异步结果写入新账号界面。 查询 API 用于建立页面进入时的快照,事件用于合并后续增量。业务实体应使用稳定标识合并,例如消息使用 clientMsgID 、会话使用 conversationID 、好友与黑名单使用 userID 、群成员使用 groupID:userID 。不要使用数组下标或展示名称去重。 监听初始化同步 登录后 SDK 会同步 OpenIMServer 数据。以下事件适合驱动全局同步状态和进度展示: | 事件 | 处理器参数 | 含义 | | | | | | onSyncServerStart | reinstalled: boolean | 开始同步;布尔值表示本地库是否因重装或等价重建进入同步。 | | onSyncServerProgress | progress: number | 同步进度变化;用于展示,不承诺每个整数都会到达。 | | onSyncServerFinish | reinstalled: boolean | 本轮同步完成,可以重新查询依赖完整数据的页面。 | | onSyncServerFailed | reinstalled: boolean | 本轮同步失败,应记录当前同步上下文并等待重试或连接恢复。 | import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const syncSubscriptions : Array = onSyncServerStart reinstalled = setSyncState 'syncing', 0, reinstalled , onSyncServerProgress progress = setSyncProgress progress , onSyncServerFinish reinstalled = setSyncState 'ready', 100, reinstalled refreshVisibleSnapshots , onSyncServerFailed reinstalled = setSyncState 'failed', 0, reinstalled , function releaseSyncSubscriptions syncSubscriptions.forEach subscription = off subscription syncSubscriptions.length = 0 三个 boolean 回调参数都描述合同定义的重装/同步上下文,不是“操作是否成功”的通用返回值;完成或失败由事件名区分。同步事件描述 Core 的同步生命周期,不是某个查询 API 的 Promise 回调,也没有业务实体合并键;状态应按当前登录用户隔离。 本页是四个同步事件以及 off / offAll 控制语义的归属页。退出登录、切换账号或销毁 SDK 作用域时调用 releaseSyncSubscriptions 。同步完成后数据仍会继续变化:重新查询当前页面快照,并继续通过各领域归属页的增量事件更新同一状态层。 HarmonyOS 不支持事件 商业版 HarmonyOS 的锁定 HAR 缺少以下十个事件,因此订阅会稳定返回 platform unsupported ,不会伪造成功回调: onMigrationStart onMigrationProgress onMigrationFailed onMigrationFinished onRecvMessageExtensionsAdded onRecvMessageExtensionsChanged onRecvMessageExtensionsDeleted onMessageKvInfoChanged onStreamChange onGroupApplicationBadgeCountChanged 平台支持状态和“是否为商业版”是两个独立维度。应用应识别 platform unsupported 并关闭对应入口或采用平台替代方案,不要无限重试,也不要把未发生的事件模拟成成功。" }, { "path": "/sdk/uniapp/events/handle-data-migration-events", @@ -5514,10 +5514,10 @@ { "path": "/sdk/uniapp/logger", "title": "日志与诊断", - "description": "配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。", + "description": "配置 UTS 插件日志级别,使用 operationID 关联调用链路,并在用户同意后上传脱敏日志。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp logger", - "content": "初始化时通过 logLevel 、 isLogStandardOutput 和可选 logFilePath 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。 上传日志 uploadLogs 接收行数和扩展说明: import uploadLogs from '@/uni modules/unix openim sdk' const operationID = diagnostic $ Date.now await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , operationID, operationID 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。 上传进度由 onUploadLogsProgress 提供,完整订阅归 消息概览 /sdk/uniapp/message/overview message 。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。 安全要求 上传前取得用户同意,并说明日志范围与保留策略。 ex 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。 控制 line ,避免无界上传;失败时限次重试。 生产包不要长期启用 verbose 标准输出。 本地数据目录只用于诊断定位,不直接打包整个数据库上传。" + "content": "unix openim sdk 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。 日志链路通常包含 OpenIMInitConfig 中的日志配置、单次调用可选的 operationID 、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。 日志级别 日志级别在 initSDK 时通过 OpenIMInitConfig.logLevel 配置。从最详细到最简略依次为: | 常量 | 数值 | 说明 | | | | | | OpenIMLogLevelVerbose | 6 | 最详细的运行跟踪,只用于短期深度诊断。 | | OpenIMLogLevelDebug | 5 | 开发与联调信息。 | | OpenIMLogLevelInfo | 4 | 常规运行信息。 | | OpenIMLogLevelWarn | 3 | 警告信息。 | | OpenIMLogLevelError | 2 | 错误信息。 | | OpenIMLogLevelFatal | 1 | 严重错误。 | | OpenIMLogLevelPanic | 0 | 最严重级别。 | 生产环境不建议长期使用 Verbose 或 Debug 。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。 日志级别建议 | 场景 | 建议配置 | 说明 | | | | | | 本地开发 | OpenIMLogLevelDebug , isLogStandardOutput: true | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 | | 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 | | 生产默认 | OpenIMLogLevelWarn 或 OpenIMLogLevelError ,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 | | 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 | 配置日志 日志选项属于 SDK 初始化配置,不是 login 参数。下面以 Android 为例: import OpenIMLogLevelDebug, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelDebug, isLogStandardOutput: true, systemType: 'android', await initSDK config 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | logLevel | OpenIMLogLevel | 是 | 控制 Core 运行日志的详细程度。 | | isLogStandardOutput | boolean | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 | | logFilePath | string \\| null | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | apiAddr 、 wsAddr 、平台和 systemType 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。 使用 operationID 定位一次调用 operationID 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。 import getConversationListSplit from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID try const result = await getConversationListSplit offset: 0, count: 50 , operationID, appLogger.info 'openim api success', operationID, action: 'get conversation page', count: result?.conversations.length ?? 0, catch error appLogger.error 'openim api failed', operationID, action: 'get conversation page', error: sanitizeOpenIMError error , throw error 每次调用使用新的 operationID ,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、 conversationID 或 clientMsgID 。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。 记录业务上下文 应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 conversationID 或 clientMsgID 。不要记录: 用户 Token、管理员 Token、secret 或商业业务凭据。 完整消息正文、原始自定义消息 payload、私人文件 URL。 不必要的用户资料、通讯录、群成员清单。 SDK 数据库内容和完整本机沙盒路径。 日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。 上传日志 uploadLogs 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。 import uploadLogs from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , , operationID, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 | | ex | string | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 | Promise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。 观察上传进度 onUploadLogsProgress 返回独立订阅句柄。进度事件的完整业务归属在 消息概览 /sdk/uniapp/message/overview message ;日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 off subscription 释放。 上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。 相关页面 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 用户认证 /sdk/uniapp/getting started/authenticate and manage session 发送第一条消息 /sdk/uniapp/getting started/send first message 发送消息 /sdk/uniapp/message/sending messages/send message" }, { "path": "/sdk/wasm/overview", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 0a3c5f6946..43bd5abc72 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -4321,11 +4321,11 @@ }, { "path": "/sdk/uniapp/user/friends/get-friend-list-page", - "title": "List friends", - "description": "Load friends by page or snapshot and process friend changes.", + "title": "Get the friend list", + "description": "Page through the current user’s friend list with the uni-app / uni-app x SDK.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends get-friend-list-page", - "content": "Use getFriendListPage for pagination or getFriendList for a complete small snapshot. Register events before querying. import getFriendListPage, off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onFriendAdded friend = upsertFriend friend.userID, friend , onFriendDeleted friend = removeFriend friend.userID , onFriendInfoChanged friend = upsertFriend friend.userID, friend , const page = await getFriendListPage offset: 0, count: 100 replaceFriendSnapshot page?.friends ?? subscriptions.forEach subscription = off subscription Start offset at 0, continue until fewer than count items return, and deduplicate by userID . getFriendList filterBlack optionally filters blacklist entries but does not merge the two relationship types. Reload after login, reconnection, or state loss." + "content": "Register friend events before the initial query, then call getFriendListPage to establish the current snapshot. Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset. Pass 0 for the first page. | | count | number | Yes | Number of friends to request. | | filterBlack | boolean | No | Whether to exclude blacklisted users from the results. | import getFriendListPage from '@/uni modules/unix openim sdk' const result = await getFriendListPage offset: 0, count: 50, filterBlack: true, After the Promise succeeds, result?.friends is the current page of OpenIMFriendUserItem . Increase offset by the requested item count to load the next page. Reset pagination after a friend is added or removed. The native API returns OpenIMFriendListResult | null directly; there is no data wrapper. Friend profile fields OpenIMFriendUserItem describes the current account's relationship with one friend: | Field | Type | Description | | | | | | userID | string | The friend's user ID and the stable identifier in the friend list. | | nickname | string | The friend's account level nickname. | | faceURL | string | The friend's account level avatar URL. | | remark | string | A remark the current account assigned to this friend. | | isPinned | boolean | Whether the friend is pinned in the contacts list. | | ownerUserID | string | The user ID that owns this friendship, normally the current account. | | operatorUserID | string | The user ID that created or updated the relationship. | | addSource | number | Value describing the source through which the friendship was added. | | createTime | number | Time when the friendship was created. | | ex | string | Friendship extension string. | | attachedInfo | string | SDK attachment data. Parse it only according to a confirmed application contract. | nickname and faceURL are snapshots of the account profile. remark , isPinned , ex , and attachedInfo belong to the friendship. Do not overwrite a non friend's OpenIMPublicUserItem with an OpenIMFriendUserItem , and do not write a friend remark back to the account nickname. Synchronize friend changes This page owns the complete listeners for onFriendAdded , onFriendInfoChanged , and onFriendDeleted . The query establishes a snapshot; events merge incremental changes by userID . import off, onFriendAdded, onFriendDeleted, onFriendInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const friendSubscriptions : Array = onFriendAdded friend = mergeFriend friend.userID, friend , onFriendInfoChanged friend = mergeFriend friend.userID, friend , onFriendDeleted friend = removeFriend friend.userID , function removeFriendListeners friendSubscriptions.forEach subscription = off subscription Call removeFriendListeners when signing out, switching accounts, or destroying the contacts state layer." }, { "path": "/sdk/uniapp/user/friends/search-friends", @@ -5170,10 +5170,10 @@ { "path": "/sdk/uniapp/message/sending-messages/send-message", "title": "Send a message", - "description": "OpenIM uni-app / uni-app x SDK guide for Send a message.", + "description": "Send a pending message object with the uni-app / uni-app x SDK.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message", - "content": "import sendMessage from '@/uni modules/unix openim sdk' const sent = await sendMessage message, recvID: 'user b', groupID: '', isOnlineOnly: false upsertMessage sent.clientMsgID, sent Set recvID for direct chat or groupID for group chat and leave the other empty. The Promise resolves directly to OpenIMMessageItem . Preserve failed messages for retry under the same clientMsgID unless your product explicitly creates a new send." + "content": "sendMessage sends an OpenIMMessageItem returned by a message creation API. For a one to one chat, set only recvID ; for a group chat, set only groupID . Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Recipient's user ID for a one to one chat. Pass an empty string for a group chat. | | groupID | string | Conditional | Target group ID for a group chat. Pass an empty string for a one to one chat. | | message | OpenIMMessageItem | Yes | Pending message object to send. | | offlinePushInfo | OpenIMOfflinePush | No | Offline push configuration. | | isOnlineOnly | boolean | No | Whether to deliver only to online clients. Online only messages are not stored in local history. | import sendMessage from '@/uni modules/unix openim sdk' const sentMessage = await sendMessage recvID: receiverUserID, groupID: '', message, isOnlineOnly: false, When the Promise resolves, the returned value is the server confirmed OpenIMMessageItem ; the native UTS API does not wrap it in data . On the sending client, replace the local pending item by clientMsgID with the returned object. For common and content specific fields, see Message overview /sdk/uniapp/message/overview message . Other clients receive the message through new message events. Promise completion, arrival of the receiving event, and reconciliation through a history query are separate stages. Keep a failed pending message under the same clientMsgID when offering a retry unless the product deliberately creates a new send. If the resource has already been uploaded by your application and stored in a URL based message, use sendMessageNotOss /sdk/uniapp/message/sending messages/send message not oss ." }, { "path": "/sdk/uniapp/message/sending-messages/send-message-not-oss", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index 6b64991525..ddb2802973 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -573,18 +573,23 @@ "title": "OpenIM uni-app / uni-app x SDK 概览" }, "/sdk/uniapp/getting-started/before-you-start": { - "body": "接入前先确定目标是 uni-app 还是 uni-app x App,并准备与 `unix-openim-sdk 0.2.0-rc.3` 兼容的 OpenIMServer、用户与原生构建环境。Web、H5 和小程序不能使用本 UTS 原生插件。\n\n## 准备服务与账号\n\n客户端初始化需要以下信息:\n\n| 数据 | 来源 | 要求 |\n| --- | --- | --- |\n| `apiAddr` | OpenIMServer HTTP API | 设备可访问的完整地址 |\n| `wsAddr` | OpenIMServer WebSocket | 设备可建立长连接的完整地址 |\n| `userID` | 业务后端的账号映射 | 与 Token 对应且在服务端存在 |\n| Token | 可信业务后端 | 只授予当前用户,不在客户端生成 |\n\n业务后端应先验证自己的登录态,再为该业务账号返回 OpenIM 用户与 Token。App 不应持有管理员 Token 或服务端 secret。公共版客户端连接公共 OpenIMServer;使用信令、session 或其他商业能力时,应连接已部署相应服务的商业版环境。\n\n真机测试时,`apiAddr` 和 `wsAddr` 不能使用开发机的 `localhost`。还要确认设备与服务端网络互通、TLS 证书有效、反向代理允许 WebSocket 升级。\n\n## 准备插件与构建环境\n\n把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备:\n\n- Android:API 21+、JDK 与 Android SDK,构建产物需包含插件声明的 AAR/Maven 依赖和目标 ABI。\n- iOS:iOS 14+、匹配的 Xcode/CocoaPods,构建产物需正确链接并嵌入 XCFramework。\n- HarmonyOS:仅 uni-app x 商业版,API 24;使用与插件合同一致的 HAR。\n\n标准基座不包含这些原生依赖。开发阶段应打包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共与商业原生制品混装在同一个插件目录中。\n\n## 选择平台标识\n\n初始化使用插件导出的常量,不直接写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。`systemType` 是当前系统说明字符串,例如 `android`、`ios` 或 `harmony`,不可省略。\n\n## 发布前检查\n\n- 在真实目标设备上完成初始化、登录、普通消息收发与退出。\n- 验证 App 前后台、网络断开恢复、Token 失效和被踢下线。\n- Android 检查重复 class/JNI 与 ABI;iOS 检查签名、embed、隐私清单和真机链接。\n- 商业版额外验证信令与对应服务,不要用公共服务端结果判断商业 API。\n- 日志、截图和自动化证据中不得包含 Token、secret 或完整私聊内容。\n\n准备完成后,先阅读[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk),再进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。", - "description": "准备 OpenIMServer、用户 Token、UTS 插件和目标平台原生构建环境。", + "body": "在 uni-app / uni-app x App 中接入 `unix-openim-sdk` 前,需要先准备设备可访问的 OpenIMServer、可信的用户认证流程、UTS 插件和目标平台原生构建环境。这些条件同时适用于[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)和[发送第一条消息](/sdk/uniapp/getting-started/send-first-message)。Web、H5 和小程序不能使用本 UTS 原生插件。\n\n## 准备 OpenIMServer\n\n如果还没有可用的 OpenIMServer,先按 [Docker 部署指南](/docs/guides/quick-deployment/docker)完成部署,并确认实际 Android、iPhone 或 HarmonyOS 设备可以访问 `apiAddr` 与 `wsAddr`。\n\n初始化 SDK 需要以下两个服务地址:\n\n| 字段 | 说明 |\n| --- | --- |\n| `apiAddr` | OpenIMServer 的 HTTP API 地址,用于登录、同步和资源请求。生产 App 应使用设备可访问且证书有效的 HTTPS 地址。 |\n| `wsAddr` | OpenIMServer 的 WebSocket 地址,用于建立长连接和接收实时事件。生产 App 通常使用 WSS 地址。 |\n\n不要只验证服务在服务器本机或开发 Mac 上能够访问。真机不能使用开发机的 `localhost`;还应从实际设备核对局域网或公网路由、TLS 证书、反向代理和 WebSocket 升级。\n\n公共版客户端可以连接公共 OpenIMServer。若要使用信令、session、翻译或其他标记为商业版的能力,服务端也必须部署对应商业能力;不能用公共服务端的失败结果判断商业 API 的客户端实现。\n\n## 准备用户和 Token\n\n`userID` 标识 OpenIMSDK 用户,Token 用于认证当前用户。创建或绑定 OpenIMSDK 用户、签发 Token 和校验业务权限都应由可信后端完成,App 不能保存管理员 Token、secret 或其他服务端凭据。\n\n后端接入 OpenIMServer REST API 前,可先阅读[准备使用 Platform API](/platform-api/prepare-to-use-api)和[签发会话 Token](/platform-api/user/managing-session-tokens/issue-a-session-token)。如果产品已有账号体系,后端应把业务账号与 OpenIMSDK `userID` 建立稳定映射,并确保返回的 Token 与该 `userID` 对应。\n\n建议由业务后端提供登录信息接口,App 只取得 SDK 登录所需的最小数据:\n\n```uts\ntype OpenIMSDKSession = {\n userID : string\n token : string\n}\n\nasync function loadOpenIMSDKSession() : Promise {\n const response = await uni.request({\n url: `${businessApiURL}/openim/session`,\n method: 'POST',\n })\n\n if (response.statusCode != 200) {\n throw new Error('Failed to load OpenIM SDK session')\n }\n\n return parseTrustedSessionResponse(response.data)\n}\n```\n\n业务接口必须先验证当前业务账号,再返回与该账号对应的 OpenIMSDK 登录信息;不能接受客户端任意传入的 `userID` 后直接为其签发 Token。`apiAddr` 和 `wsAddr` 通常作为受控的 App 环境配置传给 `initSDK()`,不需要随每次用户登录响应改变。\n\n## 准备 UTS 插件与原生运行环境\n\n把插件安装在项目的 `uni_modules/unix-openim-sdk`。使用 HBuilderX/uni-app `5.23` 系列,并按目标平台准备原生环境:\n\n| 宿主 | Android | iOS | HarmonyOS |\n| --- | --- | --- | --- |\n| uni-app Vue 2 / Vue 3 | 支持,API 21+ | 支持,iOS 14+ | 暂不宣称支持 |\n| uni-app x | 支持,API 21+ | 支持,iOS 14+ | 商业版支持,API 24 |\n| Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 |\n\n- Android 需要匹配的 JDK、Android SDK 和插件声明的 AAR/Maven 依赖,并为目标设备包含正确 ABI。\n- iOS 需要匹配的 Xcode/CocoaPods,最终 App 必须正确链接、嵌入并签名插件 XCFramework。\n- HarmonyOS 仅声明 uni-app x 商业版支持,使用与插件合同一致的 HAR 和 API 24 工程。\n\n标准基座不包含这些原生依赖。开发阶段应构建包含插件的自定义基座,或使用项目提供的本地 Android/iOS 原生构建流程。不要把公共版和商业版的原生制品混装在同一个插件目录,也不要直接修改 SDK 的数据库或原生缓存文件。\n\n不同宿主的生命周期、类型与文件路径差异见[按宿主和平台接入](/sdk/uniapp/getting-started/environment-specific-implementation)。\n\n## 选择平台标识\n\n`initSDK()` 的 `platformID` 使用插件导出的常量,不直接填写数字:Android 使用 `OpenIMPlatformAndroid`,iPhone 使用 `OpenIMPlatformIOS`,HarmonyOS 使用 `OpenIMPlatformHarmony`。\n\n初始化还必须提供 `systemType`,例如 `android`、`ios` 或 `harmony`。平台常量和 `systemType` 应与实际运行目标匹配;它们会参与服务端多端登录策略和原生运行诊断。\n\n## 发布前检查\n\n正式发布前,应在产品实际支持的平台和网络环境中验证:\n\n- `initSDK()` 成功,随后 `login()` 成功并收到 `onConnectSuccess`。\n- App 前后台、网络断开恢复、Token 失效和被踢下线符合产品状态机。\n- Android 安装包没有重复 class/JNI,并包含目标设备 ABI。\n- iOS 真机包可以完成 link/embed/sign,权限说明和隐私清单完整。\n- HarmonyOS 使用精确匹配合同的商业 HAR,并对平台不支持能力返回明确错误。\n- 两个不同账号能完成普通消息收发、历史查询和退出后的状态隔离。\n- 商业版连接对应商业服务端,完成所启用能力的真实链路测试。\n- 日志、截图和自动化证据不包含 Token、secret、完整私聊内容或不必要的本机绝对路径。\n\n## 继续接入\n\n准备完成后,先完成[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)和[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。确认连接成功后,再按照[发送第一条消息](/sdk/uniapp/getting-started/send-first-message)准备单聊用户或群组目标并验证消息链路。", + "description": "准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,再开始认证或发送消息。", "headings": [ { "depth": 2, - "title": "准备服务与账号", - "url": "#准备服务与账号" + "title": "准备 OpenIMServer", + "url": "#准备-openimserver" }, { "depth": 2, - "title": "准备插件与构建环境", - "url": "#准备插件与构建环境" + "title": "准备用户和 Token", + "url": "#准备用户和-token" + }, + { + "depth": 2, + "title": "准备 UTS 插件与原生运行环境", + "url": "#准备-uts-插件与原生运行环境" }, { "depth": 2, @@ -595,6 +600,11 @@ "depth": 2, "title": "发布前检查", "url": "#发布前检查" + }, + { + "depth": 2, + "title": "继续接入", + "url": "#继续接入" } ], "sourcePath": "/sdk/uniapp/getting-started/before-you-start", @@ -639,61 +649,151 @@ "title": "按宿主和平台接入" }, "/sdk/uniapp/getting-started/authenticate-and-manage-session": { - "body": "完成 `initSDK()` 后,先注册连接与账号事件,再调用 `login(userID, token)`。Promise 成功表示登录请求完成;依赖长连接的查询和发送应等待 `onConnectSuccess`。\n\n## 注册登录事件\n\n每次 `on...` 调用都返回独立的 `OpenIMSDKEventSubscription`。保存全部句柄,并在账号或应用作用域结束时逐个释放。\n\n```uts\nimport {\n off,\n onConnectFailed,\n onConnectSuccess,\n onConnecting,\n onKickedOffline,\n onUserTokenExpired,\n onUserTokenInvalid,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n console.log('OpenIM connected')\n})\nconst subscriptions : Array = [\n connectSubscription,\n onConnecting(() => console.log('OpenIM connecting')),\n onConnectFailed((error) => console.error(error.errCode, error.errMsg)),\n onKickedOffline(() => clearCurrentAccount()),\n onUserTokenExpired(() => requestFreshToken()),\n onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)),\n]\n\nfunction releaseSessionSubscriptions() {\n subscriptions.forEach((subscription) => off(subscription))\n subscriptions.length = 0\n}\n```\n\n`onKickedOffline` 到达时,SDK 已进入下线流程。业务应清空旧账号界面与缓存引用,并引导重新认证,不要再并发调用一次 `logout()`。\n\n## 登录\n\n```uts\nimport { login } from '@/uni_modules/unix-openim-sdk'\n\nawait login(userID, token)\n```\n\n`login` 的真实签名是 `login(userID, token)`,不是对象参数。Token 必须来自可信后端,并且与 `userID` 对应。不要仅凭 Promise 成功就立即发送消息;应让连接事件驱动 ready 状态。\n\n## 查询当前状态\n\n```uts\nimport {\n OpenIMLoginStatusLogged,\n getLoginStatus,\n getLoginUserID,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst status = await getLoginStatus()\nif (status == OpenIMLoginStatusLogged) {\n const currentUserID = await getLoginUserID()\n restoreAccountState(currentUserID)\n}\n```\n\n`getLoginStatus()` 返回 `OpenIMLoginStatusLogout`、`OpenIMLoginStatusLogging` 或 `OpenIMLoginStatusLogged`。登录状态与网络连接状态不同:已登录账号在短暂断网时仍可能处于 Logged 状态。\n\n## 上报前后台与网络变化\n\n```uts\nimport {\n networkStatusChanged,\n setAppBackgroundStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nawait setAppBackgroundStatus(true) // 进入后台\nawait setAppBackgroundStatus(false) // 回到前台\nawait networkStatusChanged() // 网络恢复或网络类型变化\n```\n\n把这些调用接到 App 级生命周期,避免多个页面重复上报。它们不会创建新会话,也不能替代登录或 Token 更新。\n\n## 主动退出与切换账号\n\n```uts\nimport { logout } from '@/uni_modules/unix-openim-sdk'\n\nawait logout()\nreleaseSessionSubscriptions()\nclearCurrentAccount()\n```\n\n切换账号时必须等待旧账号退出和状态清理完成,再注册新账号作用域的事件并登录。不要让两个账号的登录、退出或查询并发执行。\n\n商业版可以不重新登录而更新 Token,并通过合成 session 快照校验 epoch,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。", - "description": "登录 OpenIM、处理连接与 Token 事件、查询登录状态并安全退出。", + "body": "`unix-openim-sdk` 使用 `login()` 建立当前用户的登录会话。开始认证前,请先按照[开始之前](/sdk/uniapp/getting-started/before-you-start)准备 OpenIMServer、用户登录信息、UTS 插件和目标平台原生运行环境,并完成[安装与初始化](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。\n\n完整登录流程按以下顺序执行:\n\n1. 在 App 作用域初始化唯一的 OpenIM Core。\n2. 在登录前订阅连接、Token 和账号下线事件,避免丢失登录阶段的状态。\n3. 从可信后端取得相互匹配的 `userID` 和 OpenIMSDK Token。\n4. 调用 `login(userID, token)`,等待 Promise 成功,并继续等待 `onConnectSuccess` 确认连接可用。\n5. 连接成功后再查询用户、好友、会话、群组和消息数据。\n6. 用户主动退出或切换账号时调用 `logout()`,然后释放旧账号的订阅并清理应用状态。\n\n## 初始化 SDK\n\n插件安装后,在应用级 service 中调用一次 `initSDK()`。初始化配置、平台常量、`systemType`、SDK 版本和反初始化规则见[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。\n\n`unix-openim-sdk` 导出扁平函数;业务代码不创建 SDK 实例,也不要让不同页面用不同服务地址重复初始化 Core。OpenIMServer 地址在 `initSDK()` 时固定,当前用户身份在 `login()` 时建立。\n\n### 初始化配置边界\n\n`initSDK()` 接收 `OpenIMInitConfig`,其中包含平台 ID、API 地址、WebSocket 地址、日志选项和必填的 `systemType`。这些字段属于 App 和部署环境,不属于某个用户;切换账号时继续复用同一次初始化,不要把初始化配置拼进 `login()`。\n\n### 理解 UTS 插件\n\n`unix-openim-sdk` 是原生 UTS 插件,不是 JavaScript 单例工厂。插件内部持有唯一 OpenIM Core,uni-app 和 uni-app x 都通过 `@/uni_modules/unix-openim-sdk` 的扁平导出访问它。标准基座未包含插件原生依赖;开发与发布包都必须使用包含该插件的原生构建产物。\n\n## 获取当前用户的登录信息\n\n调用业务后端提供的登录信息接口,取得当前用户的 `userID` 和 Token:\n\n```uts\nconst session = await loadOpenIMSDKSession()\nconst userID = session.userID\nconst token = session.token\n```\n\n`userID` 只是 OpenIMSDK 用户标识,不是认证凭据。Token 必须由可信后端取得并且与该 `userID` 对应;App 不负责创建用户、签发 Token,也不得保存管理员 Token 或服务端 secret。\n\n## 在登录前注册连接事件\n\n连接事件应在 `login()` 前注册。这样可以捕获登录阶段因网络、服务地址、Token 或服务端状态产生的错误,并把连接状态反馈给界面。\n\n```uts\nimport {\n off,\n onConnectFailed,\n onConnectSuccess,\n onConnecting,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sessionSubscriptions : Array = []\n\nsessionSubscriptions.push(onConnecting(() => {\n setConnectionState('connecting')\n}))\n\nsessionSubscriptions.push(onConnectSuccess(() => {\n setConnectionState('connected')\n}))\n\nsessionSubscriptions.push(onConnectFailed((errCode, errMsg) => {\n setConnectionState('failed')\n console.error('OpenIM SDK 连接失败', errCode, errMsg)\n}))\n```\n\n`onConnectFailed` 的处理器接收两个独立参数 `errCode` 和 `errMsg`,不是错误对象。每次 `on...()` 调用都返回独立的 `OpenIMSDKEventSubscription`,不能把返回值当作取消函数直接调用。\n\n## 登录当前用户\n\n```uts\nimport { login } from '@/uni_modules/unix-openim-sdk'\n\ntry {\n await login(userID, token)\n} catch (error) {\n console.error('OpenIM SDK 登录失败', userID, error)\n throw error\n}\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | `string` | 是 | 当前 OpenIMSDK 用户 ID,必须与 Token 对应。它不是昵称、手机号或临时会话 ID。 |\n| `token` | `string` | 是 | 当前用户的 OpenIMSDK Token,由可信后端返回;不要在客户端自行签发。 |\n\n`login()` 的 Promise 成功表示登录请求已经完成;`onConnectSuccess` 表示 SDK 长连接已经可用。两者是不同阶段,不能只因 Promise 成功就立即调用依赖连接的消息、会话、群组或用户 API。\n\n重复点击登录时,应复用正在进行的登录请求及其 Promise,避免并发调用 `login()`。初始化配置中的平台 ID、API 地址和 WebSocket 地址不作为 `login()` 的对象参数重复传入。\n\n## 处理 API 调用结果\n\n插件的异步 API 直接返回 Promise 中的业务值,不使用 Wasm 文档中的 `{ data }` 响应包装。失败时 Promise 会抛出插件错误;业务可记录脱敏后的错误码、方法名和用户 ID,用于与原生日志对应。\n\n```uts\nimport { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk'\n\ntry {\n const currentUser = await getSelfUserInfo()\n if (currentUser != null) {\n useCurrentUser(currentUser)\n }\n} catch (error) {\n console.error('getSelfUserInfo failed', error)\n}\n```\n\n查询 API 的返回值用于建立调用时的快照。状态变更 API 没有可用于刷新界面的业务对象时,应继续根据对应页面说明处理事件或重新查询。Promise 成功、事件到达和重新查询校准是三个不同阶段。\n\n## 查询当前登录状态\n\n`getLoginStatus()` 和 `getLoginUserID()` 都不接收业务参数:\n\n```uts\nimport {\n OpenIMLoginStatusLogged,\n getLoginStatus,\n getLoginUserID,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst loginStatus = await getLoginStatus()\nif (loginStatus == OpenIMLoginStatusLogged) {\n const currentUserID = await getLoginUserID()\n restoreSessionFor(currentUserID)\n}\n```\n\n登录状态常量如下:\n\n| 状态 | 说明 |\n| --- | --- |\n| `OpenIMLoginStatusLogout` | 当前 Core 未登录。 |\n| `OpenIMLoginStatusLogging` | 登录流程正在进行,不要再次发起并行登录。 |\n| `OpenIMLoginStatusLogged` | Core 已登录;仍应结合连接事件判断当前网络连接是否可用。 |\n\n`getLoginUserID()` 返回 Core 当前登录的用户 ID,适合校验应用账号与 SDK 账号是否一致,但不能替代业务身份认证。这两个查询都不会触发连接事件。\n\n切换账号时不要直接用新参数覆盖当前登录。先调用 `logout()` 完成旧账号退出,再清理旧账号的订阅和状态,最后使用新账号调用 `login()`。\n\n## 上报 App 运行状态\n\nAndroid、iOS 与 HarmonyOS 的前后台和网络状态应在 App 级生命周期中上报。进入后台时向 `setAppBackgroundStatus()` 传 `true`,回到前台时传 `false`;设备网络恢复或网络类型变化时调用 `networkStatusChanged()`。\n\n```uts\nimport {\n networkStatusChanged,\n setAppBackgroundStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nasync function reportAppBackground() {\n await setAppBackgroundStatus(true)\n}\n\nasync function reportAppForeground() {\n await setAppBackgroundStatus(false)\n}\n\nasync function reportNetworkAvailable() {\n await networkStatusChanged()\n}\n```\n\n`setAppBackgroundStatus()` 和 `networkStatusChanged()` 只报告运行环境变化,不会建立新的登录会话,也不能替代 `login()` 或 Token 刷新。普通页面进入、退出时不要重复调用这些 App 级操作。\n\n如何把这些函数连接到 uni-app / uni-app x 生命周期,以及如何处理 Badge 和 FCM Token,见[处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)。\n\n## 处理 Token 生命周期\n\nOpenIMSDK Token 由可信后端签发。公共流程在 Token 过期或无效时重新向后端取 Token,并按产品策略重新认证;商业版还可以使用 `updateToken()` 热更新,见[更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session)。\n\n```uts\nimport {\n onUserTokenExpired,\n onUserTokenInvalid,\n} from '@/uni_modules/unix-openim-sdk'\n\nsessionSubscriptions.push(onUserTokenExpired(() => {\n requestFreshTokenAndRelogin()\n}))\n\nsessionSubscriptions.push(onUserTokenInvalid((errCode, errMsg) => {\n console.warn('OpenIM SDK Token 无效', errCode, errMsg)\n redirectToSignIn()\n}))\n```\n\n`onUserTokenInvalid` 与 `onConnectFailed` 一样接收 `(errCode, errMsg)`。这些值只用于诊断和界面提示,不应据此绕过重新认证。不要在日志或事件状态中保存 Token。\n\n### Token 模型\n\n客户端 `login()` 接收的是当前用户的 OpenIMSDK Token。Token 的签发、有效期、刷新、撤销和多端策略由业务后端与 OpenIMServer 配置决定。若产品需要短期会话或一次性登录,应在后端实现,并让 App 根据 Token 生命周期事件重新认证。\n\n## 处理账号被强制下线\n\n还应订阅账号被踢下线事件。该事件通常表示同一账号在其他客户端登录,或服务端策略要求当前端结束会话。\n\n```uts\nimport { onKickedOffline } from '@/uni_modules/unix-openim-sdk'\n\nsessionSubscriptions.push(onKickedOffline(() => {\n clearCurrentAccount()\n showSignedInElsewhereDialog()\n}))\n```\n\n收到 `onKickedOffline` 时,SDK 已进入下线流程,不要再并发调用 `logout()`。处理器只清理应用保存的当前用户、会话、消息视图和页面状态,再根据产品策略提示重新登录。\n\n## 主动退出 OpenIM\n\n用户主动退出或切换账号时调用 `logout()`,再清理当前用户的会话列表、消息视图、未读数和业务状态。被 `onKickedOffline` 强制下线不属于主动退出,不执行这里的 `logout()` 流程。\n\n```uts\nimport { logout } from '@/uni_modules/unix-openim-sdk'\n\nawait logout()\nreleaseSessionSubscriptions()\nclearCurrentAccount()\n```\n\n`logout()` 的 Promise 成功表示当前 SDK 登录会话已经退出。切换账号时先等待旧账号退出完成,再清理旧状态和订阅,然后注册新账号作用域的事件并调用 `login()`。不要让两个账号的登录与退出流程并发执行。\n\n### 仅断开 WebSocket\n\n插件不提供“仅断开 WebSocket、但保留登录会话”的公共操作。前后台或网络变化通过 App 生命周期 API 上报;需要主动结束用户会话时使用 `logout()`。\n\n## 清理登录相关事件监听\n\n本页是连接、Token 和账号下线事件的完整监听归属页。退出登录、切换账号或销毁拥有这些监听的应用 service 时,逐个传给 `off(subscription)`:\n\n```uts\nfunction releaseSessionSubscriptions() {\n sessionSubscriptions.forEach((subscription) => off(subscription))\n sessionSubscriptions.length = 0\n}\n```\n\n连接事件没有业务实体合并键,应按当前 Core 和登录用户隔离状态。业务页面首次进入时通过查询 API 建立快照,再通过各领域事件合并增量。\n\n## 下一步\n\n- [开始之前](/sdk/uniapp/getting-started/before-you-start)\n- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message)\n- [事件概览](/sdk/uniapp/events/overview-events)\n- [日志](/sdk/uniapp/logger)", + "description": "登录 OpenIM、查询登录状态、处理连接与 Token 事件并安全退出当前账号。", "headings": [ { "depth": 2, - "title": "注册登录事件", - "url": "#注册登录事件" + "title": "初始化 SDK", + "url": "#初始化-sdk" + }, + { + "depth": 3, + "title": "初始化配置边界", + "url": "#初始化配置边界" + }, + { + "depth": 3, + "title": "理解 UTS 插件", + "url": "#理解-uts-插件" }, { "depth": 2, - "title": "登录", - "url": "#登录" + "title": "获取当前用户的登录信息", + "url": "#获取当前用户的登录信息" }, { "depth": 2, - "title": "查询当前状态", - "url": "#查询当前状态" + "title": "在登录前注册连接事件", + "url": "#在登录前注册连接事件" }, { "depth": 2, - "title": "上报前后台与网络变化", - "url": "#上报前后台与网络变化" + "title": "登录当前用户", + "url": "#登录当前用户" + }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "处理 API 调用结果", + "url": "#处理-api-调用结果" + }, + { + "depth": 2, + "title": "查询当前登录状态", + "url": "#查询当前登录状态" }, { "depth": 2, - "title": "主动退出与切换账号", - "url": "#主动退出与切换账号" + "title": "上报 App 运行状态", + "url": "#上报-app-运行状态" + }, + { + "depth": 2, + "title": "处理 Token 生命周期", + "url": "#处理-token-生命周期" + }, + { + "depth": 3, + "title": "Token 模型", + "url": "#token-模型" + }, + { + "depth": 2, + "title": "处理账号被强制下线", + "url": "#处理账号被强制下线" + }, + { + "depth": 2, + "title": "主动退出 OpenIM", + "url": "#主动退出-openim" + }, + { + "depth": 3, + "title": "仅断开 WebSocket", + "url": "#仅断开-websocket" + }, + { + "depth": 2, + "title": "清理登录相关事件监听", + "url": "#清理登录相关事件监听" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" } ], "sourcePath": "/sdk/uniapp/getting-started/authenticate-and-manage-session", "title": "认证与管理登录会话" }, "/sdk/uniapp/getting-started/send-first-message": { - "body": "本页把安装、初始化、登录和消息发送串成最小验证链路。正式项目应把 SDK 生命周期放在应用级 service,并按照各功能页拆分状态管理。\n\n## 1. 初始化并登录\n\n先按[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)初始化,再从可信后端取得 `userID` 和 Token。登录前注册连接事件,连接成功后才允许发送。\n\n```uts\nimport {\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n markOpenIMReady()\n})\n\n// 应用作用域结束时释放。\noff(connectSubscription)\n```\n\n完整登录和事件清理见[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。\n\n## 2. 准备目标\n\n| 场景 | `recvID` | `groupID` |\n| --- | --- | --- |\n| 单聊 | 已存在的接收用户 ID | 空字符串 |\n| 群聊 | 空字符串 | 当前用户已加入的群 ID |\n\n目标用户或群组必须在服务端存在。是否允许发送还会受到好友、群成员、禁言和服务端策略影响。\n\n## 3. 创建并发送文本消息\n\n```uts\nimport {\n createTextMessage,\n sendMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextMessage('你好,OpenIMSDK')\nif (message == null) {\n throw new Error('Failed to create text message')\n}\n\nconst sentMessage = await sendMessage({\n message,\n recvID: 'user_b',\n groupID: '',\n})\n\nappendOutgoingMessage(sentMessage)\n```\n\n`createTextMessage()` 只创建本地消息对象,不会发送。`sendMessage()` 成功后直接返回最终 `OpenIMMessageItem`,不需要读取 `{ data }`。发送端按 `clientMsgID` 合并返回值;接收端通过新消息事件按同一标识去重。\n\n群聊只需把 `recvID` 改为空字符串,并填入 `groupID`:\n\n```uts\nconst sentGroupMessage = await sendMessage({\n message,\n recvID: '',\n groupID: 'group_123',\n})\n```\n\n## 4. 双端验证\n\n用两个不同账号和两个独立客户端验证:\n\n1. A 端发送后获得非空 `clientMsgID`,消息状态进入发送成功。\n2. B 端收到新消息事件,并能解析到相同业务内容。\n3. A、B 重新进入会话后,都能从历史消息中读取该消息。\n4. 退出 SDK 后普通事件不再写入旧账号状态。\n\n下一步阅读[发送消息](/sdk/uniapp/message/sending-messages/send-message)、[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages)和[加载历史消息](/sdk/uniapp/message/retrieving-messages/load-older-messages)。", - "description": "在 uni-app / uni-app x App 中创建文本消息并验证单聊或群聊发送链路。", + "body": "本页说明如何在 uni-app / uni-app x App 中安装并初始化 `unix-openim-sdk`,登录后发送第一条文本消息。开始前,请先完成[开始之前](/sdk/uniapp/getting-started/before-you-start)列出的服务、用户、Token、插件和原生构建环境准备。\n\nOpenIMSDK 消息的发送对象可以是用户或群组。单聊消息使用目标用户 `recvID`;群聊消息使用目标群组 `groupID`。\n\n## 准备消息目标\n\n单聊测试需要一个已存在的接收方用户。群聊测试需要一个已存在并且当前用户有权发言的 `groupID`;发送群聊消息时不再传接收方用户 ID,也不需要指定某个群成员。\n\n| 场景 | 需要准备的目标标识 |\n| --- | --- |\n| 单聊 | 已存在的接收方用户 ID,发送时写入 `recvID`,`groupID` 为空字符串。 |\n| 群聊 | 已存在的群 ID,发送时写入 `groupID`,`recvID` 为空字符串。 |\n\n### 确认目标可用\n\n首条消息通常用于验证客户端、OpenIMServer 和另一客户端之间的完整链路。发送前确认:\n\n- 单聊接收方用户已存在,且服务端策略允许当前用户向其发送消息。\n- 群聊目标 `groupID` 已存在,当前用户已加入该群,并且没有被群状态或禁言策略禁止发言。\n- 两个测试客户端使用不同用户登录;不要用同一账号的界面现象代替对端收件验证。\n\n## 开始使用\n\n按照下面步骤发送首条文本消息。\n\n### 第 1 步:安装 UTS 插件\n\n把 `unix-openim-sdk` 安装到项目的 `uni_modules/unix-openim-sdk` 目录。插件包含原生依赖,标准基座不能直接加载;运行前需要构建包含该插件的自定义基座,或使用项目的本地 Android/iOS 原生构建流程。\n\n业务页面统一从插件根路径扁平导入函数与类型:\n\n```uts\nimport {\n createTextMessage,\n sendMessage,\n} from '@/uni_modules/unix-openim-sdk'\n```\n\n不需要创建 SDK 实例,也不要导入或直接调用 Android、iOS、HarmonyOS 平台目录中的实现文件。\n\n### 第 2 步:初始化 OpenIM SDK\n\n在 App 作用域调用一次 `initSDK()`。下面以 Android 为例;iOS 和 HarmonyOS 使用各自的平台常量与 `systemType`。\n\n```uts\nimport {\n OpenIMLogLevelInfo,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelInfo,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nconst initialized = await initSDK(config)\nif (!initialized) {\n throw new Error('OpenIM SDK initialization was not accepted')\n}\n```\n\n`apiAddr` 和 `wsAddr` 必须能从实际设备访问,`systemType` 不可省略。完整字段、iOS/HarmonyOS 常量、版本查询和反初始化规则见[安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)。\n\n### 第 3 步:连接到 OpenIMServer\n\n使用[开始之前](/sdk/uniapp/getting-started/before-you-start)约定的业务接口取得当前用户的 `userID` 和 Token。登录前先按[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)注册连接与 Token 事件;本页只保留首条消息主流程,不重复定义完整监听器。\n\n```uts\nimport { login } from '@/uni_modules/unix-openim-sdk'\n\nconst session = await loadOpenIMSDKSession()\nawait login(session.userID, session.token)\n```\n\n`login()` 的 Promise 成功表示登录请求完成;收到由认证页面统一处理的 `onConnectSuccess` 后,再调用依赖连接的消息 API。uni-app / uni-app x 的 `login()` 使用两个位置参数,不接受 Wasm 的对象式登录参数。\n\n### 第 4 步:确定消息目标\n\n单聊只需要接收方用户 ID。把已经确认存在的用户 ID 写入 `recvID`:\n\n```uts\nconst recvID = 'user_b'\nconst groupID = ''\n```\n\n群聊只使用群 ID。可以复用业务系统已有的 `groupID`,也可以先通过管理后台、业务后端或群组 API 创建测试群,并保存返回的群 ID:\n\n```uts\nconst recvID = ''\nconst groupID = 'group_123'\n```\n\n创建群组时可以设置初始成员,但发送群消息本身不再传某个接收用户 ID。\n\n### 第 5 步:创建并发送消息\n\n发送文本消息分两步:先用 `createTextMessage()` 创建本地 `OpenIMMessageItem`,再通过 `sendMessage()` 发送到目标用户或群组。\n\n```uts\nimport {\n createTextMessage,\n sendMessage,\n type OpenIMMessageItem,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextMessage('你好,OpenIMSDK')\nif (message == null) {\n throw new Error('Failed to create text message')\n}\n\nconst sentMessage : OpenIMMessageItem = await sendMessage({\n recvID,\n groupID,\n message,\n})\n\nappendOutgoingMessage(sentMessage)\n```\n\n`createTextMessage()` 的 Promise 只返回待发送消息对象,不会发送消息,也不会触发新消息事件。`sendMessage()` 直接返回发送后的 `OpenIMMessageItem`,不需要读取 Wasm 响应中的 `{ data }`。\n\n发送端应按 `clientMsgID` 用 `sentMessage` 替换本地待发送项;另一已登录客户端通过新消息事件获得消息对象。完整事件、批量与单条回调、清理和会话路由见[接收消息](/sdk/uniapp/message/receiving-messages/receive-messages),本页不重复注册。\n\n## 验证发送结果\n\n使用两个账号和两个独立客户端验证以下阶段:\n\n1. A 端 `sendMessage()` 成功并返回非空 `clientMsgID`。\n2. A 端按 `clientMsgID` 合并返回消息,而不是向列表重复追加一条。\n3. B 端收到新消息事件,并能读取相同业务内容。\n4. A、B 重新进入会话后,都能从历史消息中查询到该消息。\n\nPromise 成功和对端事件到达是两个阶段,应分别验证。排查失败时记录脱敏后的错误码、当前用户 ID、目标用户或群组 ID、`clientMsgID`,并与 OpenIMServer 日志对应;不要记录 Token 或完整私聊内容。\n\n## 下一步\n\n- [开始之前](/sdk/uniapp/getting-started/before-you-start)\n- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [按宿主和平台接入](/sdk/uniapp/getting-started/environment-specific-implementation)\n- [发送消息](/sdk/uniapp/message/sending-messages/send-message)\n- [接收消息](/sdk/uniapp/message/receiving-messages/receive-messages)", + "description": "在 uni-app / uni-app x App 中初始化 SDK、登录并验证单聊或群聊的首条文本消息。", "headings": [ { "depth": 2, - "title": "1. 初始化并登录", - "url": "#1-初始化并登录" + "title": "准备消息目标", + "url": "#准备消息目标" + }, + { + "depth": 3, + "title": "确认目标可用", + "url": "#确认目标可用" }, { "depth": 2, - "title": "2. 准备目标", - "url": "#2-准备目标" + "title": "开始使用", + "url": "#开始使用" + }, + { + "depth": 3, + "title": "第 1 步:安装 UTS 插件", + "url": "#第-1-步-安装-uts-插件" + }, + { + "depth": 3, + "title": "第 2 步:初始化 OpenIM SDK", + "url": "#第-2-步-初始化-openim-sdk" + }, + { + "depth": 3, + "title": "第 3 步:连接到 OpenIMServer", + "url": "#第-3-步-连接到-openimserver" + }, + { + "depth": 3, + "title": "第 4 步:确定消息目标", + "url": "#第-4-步-确定消息目标" + }, + { + "depth": 3, + "title": "第 5 步:创建并发送消息", + "url": "#第-5-步-创建并发送消息" }, { "depth": 2, - "title": "3. 创建并发送文本消息", - "url": "#3-创建并发送文本消息" + "title": "验证发送结果", + "url": "#验证发送结果" }, { "depth": 2, - "title": "4. 双端验证", - "url": "#4-双端验证" + "title": "下一步", + "url": "#下一步" } ], "sourcePath": "/sdk/uniapp/getting-started/send-first-message", @@ -779,50 +879,98 @@ "title": "更新 Token 与观察 SDK session" }, "/sdk/uniapp/user/overview-user": { - "body": "用户领域包含当前账号资料、其他用户公开资料、在线状态、好友关系、好友申请和黑名单。`userID` 是跨端稳定标识;昵称和头像可以变化,不能用作数据主键。\n\n## 核心模型\n\n`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版扩展字段,读取前应判空,不要假定公共服务端一定返回。\n\n好友数据使用 `OpenIMFriendUserItem`,在用户资料之外包含备注、置顶、扩展字段和关系时间。黑名单使用 `OpenIMBlackUserItem`。好友申请使用 `OpenIMFriendApplicationItem`,申请状态由接受、拒绝和删除事件增量更新。\n\n## 快照与事件\n\n页面首次进入时先调用对应查询 API 建立快照,再订阅该领域事件并按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线、重新登录和 App 被系统回收后,应重新查询。\n\n- 当前资料:[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)与[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)\n- 在线状态:[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)\n- 好友:[分页查询好友](/sdk/uniapp/user/friends/get-friend-list-page)\n- 好友申请:[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)\n- 黑名单:[查询黑名单](/sdk/uniapp/user/blacklist/get-black-list)\n\n业务后端仍是账号身份、实名信息和权限的权威来源。SDK 用户资料适合聊天展示,不应替代业务账号认证。", - "description": "理解 OpenIM 用户资料、在线状态、好友申请与黑名单的模型和同步边界。", + "body": "`unix-openim-sdk` 使用 `userID` 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。\n\n群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。`userID` 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。\n\n## 用户类型\n\nSDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要接口 |\n| --- | --- | --- |\n| `OpenIMUserInfo` | 当前登录用户资料、设置页、当前账号头像和昵称 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `OpenIMPublicUserItem` | 应用用户查询、好友候选人、陌生人资料卡;它是 `OpenIMUserInfo` 的公开别名 | `getUsersInfo()` |\n| `OpenIMFriendUserItem` | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` |\n| `OpenIMBlackUserItem` | 当前用户黑名单中的用户 | `getBlackList()`、`addBlack()`、`removeBlack()` |\n| `OpenIMFriendApplicationItem` | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API |\n| `OpenIMUserStatusItem` | 用户汇总在线状态和在线平台 | `subscribeUsersStatus()`、`getUserStatus()` |\n\n同一个 `userID` 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 `OpenIMFriendUserItem`;陌生人资料卡使用 `OpenIMPublicUserItem`;群成员列表使用 `OpenIMGroupMemberItem`。会话列表和聊天页标题属于会话数据,应使用 `OpenIMConversationItem.showName`。\n\n`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于查找好友候选人或展示资料卡 | [获取用户资料](/sdk/uniapp/user/profile/get-users-info) |\n| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page) |\n| 发送或处理好友申请 | [发送好友申请](/sdk/uniapp/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) |\n| 修改好友资料 | [更新好友资料](/sdk/uniapp/user/friends/update-friends) |\n| 删除好友关系 | [删除好友](/sdk/uniapp/user/friends/delete-friend) |\n| 查看和维护当前用户黑名单 | [获取黑名单](/sdk/uniapp/user/blacklist/get-black-list) |\n| 读取或更新当前用户昵称、头像和扩展资料 | [更新当前用户资料](/sdk/uniapp/user/profile/set-self-info) |\n| 设置账号级消息接收策略 | [设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception) |\n| 查看加好友权限的当前合同边界 | [设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission) |\n| 订阅和读取在线状态 | [订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) |\n| 读取群成员、搜索成员或查询指定成员资料 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) |\n\n业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。\n\n## 状态更新\n\n页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量:\n\n- 当前用户资料变化:见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n- 好友申请变化:见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。\n- 好友关系和资料变化:见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。\n- 黑名单变化:见[获取黑名单](/sdk/uniapp/user/blacklist/get-black-list)。\n- 在线状态变化:见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。\n\n这些列表都按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。", + "description": "了解 uni-app / uni-app x SDK 中的用户资料、好友关系、黑名单和在线状态。", "headings": [ { "depth": 2, - "title": "核心模型", - "url": "#核心模型" + "title": "用户类型", + "url": "#用户类型" + }, + { + "depth": 2, + "title": "功能入口", + "url": "#功能入口" }, { "depth": 2, - "title": "快照与事件", - "url": "#快照与事件" + "title": "状态更新", + "url": "#状态更新" } ], "sourcePath": "/sdk/uniapp/user/overview-user", "title": "用户概览" }, "/sdk/uniapp/user/profile/get-users-info": { - "body": "使用 `getUsersInfo()` 批量取得聊天展示所需的用户资料。参数是用户 ID 数组,Promise 返回 `OpenIMUserListResult | null`。\n\n```uts\nimport { getUsersInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getUsersInfo(['user_a', 'user_b'])\nconst users = result?.users ?? []\nusers.forEach((user) => cacheUser(user.userID, user))\n```\n\n返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n`OpenIMUserInfo` 字段见[用户概览](/sdk/uniapp/user/overview-user)。其中 `attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段;公共客户端必须把它们视为可选值。不要把用户资料响应中的 `ex` 或 `attachedInfo` 当作可信身份凭据。\n\n大量用户应按业务可接受的批次查询并缓存,避免列表滚动时为每一行单独请求。", - "description": "按 userID 列表查询用户公开资料。", - "headings": [], + "body": "`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。\n\n## 查询公开资料\n\n传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。\n\n```uts\nimport {\n getUsersInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDList : Array = uniqueUserIDs(['user_a', 'user_b'])\nconst result = await getUsersInfo(userIDList)\nconst users : Array = result?.users ?? []\n\nusers.forEach((user) => {\n cachePublicUser(user.userID, user)\n})\n```\n\nPromise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n页面常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `createTime` | `number \\| null`(可选) | 用户记录创建时间。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n| `attachedInfo` 商业版字段 | `string \\| null`(可选) | 仅按已确认的商业业务协议解析。 |\n| `globalRecvMsgOpt` 商业版字段 | `number \\| null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 |\n\n`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。\n\n## 调用结果与资料刷新\n\n以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。\n\nSDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n\n## 搜索添加好友\n\n搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。\n\n```uts\nasync function searchUsersForFriendRequest(keyword : string) : Promise> {\n const userIDs = await searchUserIDsFromBusinessBackend(keyword)\n if (userIDs.length == 0) {\n return []\n }\n\n const result = await getUsersInfo(uniqueUserIDs(userIDs))\n return result?.users ?? []\n}\n```\n\n如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。\n\n## 按场景选择展示数据\n\n| 场景 | 优先使用 |\n| --- | --- |\n| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` |\n| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` |\n| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` |\n\n好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。\n\n## 下一步\n\n- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)\n- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)\n- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)", + "description": "按 userID 批量查询应用用户的公开资料。", + "headings": [ + { + "depth": 2, + "title": "查询公开资料", + "url": "#查询公开资料" + }, + { + "depth": 2, + "title": "调用结果与资料刷新", + "url": "#调用结果与资料刷新" + }, + { + "depth": 2, + "title": "搜索添加好友", + "url": "#搜索添加好友" + }, + { + "depth": 2, + "title": "按场景选择展示数据", + "url": "#按场景选择展示数据" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" + } + ], "sourcePath": "/sdk/uniapp/user/profile/get-users-info", - "title": "批量查询用户资料" + "title": "获取用户资料" }, "/sdk/uniapp/user/profile/get-self-user-info": { - "body": "`getSelfUserInfo()` 查询当前 SDK 登录账号的资料,返回 `OpenIMUserInfo | null`。调用前应确认 SDK 已登录且连接可用。\n\n```uts\nimport { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst self = await getSelfUserInfo()\nif (self != null) {\n renderProfile(self.nickname, self.faceURL)\n}\n```\n\n以返回的 `userID` 校验应用账号与 SDK 账号是否一致。`nickname`、`faceURL` 和 `ex` 属于公共字段;`attachedInfo` 与 `globalRecvMsgOpt` 商业版 为可选扩展,不应在公共环境中强制解包。\n\n资料变化由[修改自己的资料](/sdk/uniapp/user/profile/set-self-info)页面归属的 `onSelfInfoUpdated` 事件推送。重新登录或事件可能遗漏时,重新调用本方法建立快照。", - "description": "读取当前已登录用户的 OpenIM 资料。", - "headings": [], + "body": "完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料:\n\n```uts\nimport {\n getSelfUserInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst currentUser : OpenIMUserInfo | null = await getSelfUserInfo()\nif (currentUser != null) {\n renderProfile(currentUser.nickname, currentUser.faceURL)\n}\n```\n\n## 返回结果\n\nPromise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number \\| null`(可选) | 用户记录创建时间。 |\n| `globalRecvMsgOpt` 商业版字段 | `number \\| null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 |\n| `attachedInfo` 商业版字段 | `string \\| null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。\n\n该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。", + "description": "查询当前已登录用户的 OpenIM 资料快照。", + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/user/profile/get-self-user-info", - "title": "查询自己的资料" + "title": "获取当前用户资料" }, "/sdk/uniapp/user/profile/set-self-info": { - "body": "`setSelfInfo()` 按提供的可选字段更新当前账号资料。不要用空字符串替代“保持不变”;只传本次确实要修改的字段。\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n setSelfInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n})\n\noff(selfInfoSubscription)\n```\n\n`OpenIMSetSelfInfoParams` 支持 `nickname`、`faceURL`、`ex`,以及商业版使用的 `globalRecvMsgOpt`。Promise 成功表示服务端接受修改;界面最终状态以 `onSelfInfoUpdated` 或重新查询的资料为准。\n\n事件返回完整 `OpenIMUserInfo`。按 `userID` 替换缓存,不要只修改发起请求的页面局部状态。多个页面需要该事件时,各自保存订阅句柄并释放,或由应用级用户 store 统一订阅。", - "description": "更新当前用户资料并处理 onSelfInfoUpdated 事件。", - "headings": [], + "body": "`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string \\| null` | 否 | 新昵称。 |\n| `faceURL` | `string \\| null` | 否 | 新头像地址。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt \\| null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 |\n\n至少传入一个实际要更新的字段。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n ex: mergedExtra,\n})\n```\n\n`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。\n\n`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。\n\nPromise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。\n\n## 监听当前用户资料变化\n\n本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照:\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nfunction releaseSelfInfoSubscription() {\n off(selfInfoSubscription)\n}\n```\n\n不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。", + "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "监听当前用户资料变化", + "url": "#监听当前用户资料变化" + } + ], "sourcePath": "/sdk/uniapp/user/profile/set-self-info", - "title": "修改自己的资料" + "title": "更新当前用户资料" }, "/sdk/uniapp/user/profile/set-global-message-reception": { - "body": "`globalRecvMsgOpt` 商业版 是 `OpenIMSetSelfInfoParams` 的可选字段,用于设置当前账号的全局消息接收策略。它与单个会话的 `recvMsgOpt` 不同:前者影响账号全局,后者只影响指定会话。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\n// 具体数值含义应以服务端部署策略和导出的 OpenIMSetSelfInfoRecvMsgOpt 常量为准。\nawait setSelfInfo({ globalRecvMsgOpt: 0 })\n```\n\n只传 `globalRecvMsgOpt`,避免同时覆盖昵称、头像或扩展字段。修改成功后,使用[查询自己的资料](/sdk/uniapp/user/profile/get-self-user-info)确认最终值;当前插件没有为这一字段单独提供 setter。\n\n公共版中该字段可能不存在。业务 UI 应根据实际能力配置显示入口,不要把缺失值解释为某个确定的接收策略。", - "description": "通过用户资料中的 globalRecvMsgOpt 设置当前账号的全局消息接收策略。", + "body": "`globalRecvMsgOpt` 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。\n\n当前插件通过 `setSelfInfo()` 更新该字段:\n\n```uts\nimport {\n setSelfInfo,\n type OpenIMSetSelfInfoRecvMsgOpt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2\nawait setSelfInfo({\n globalRecvMsgOpt: receiveWithoutNotification,\n})\n```\n\n`OpenIMSetSelfInfoRecvMsgOpt` 的合同允许以下数值:\n\n| 数值 | 含义 |\n| --- | --- |\n| `0` | 正常接收消息,并允许离线推送或通知。 |\n| `1` | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 |\n| `2` | 接收消息,但不触发离线推送或通知,即全天免打扰。 |\n\n只传 `globalRecvMsgOpt`,避免在切换接收策略时意外覆盖昵称、头像或 `ex`。当前插件没有为这一字段提供独立 setter。\n\n单个会话的 `recvMsgOpt` 是更细粒度的会话设置,见[设置会话消息接收方式](/sdk/uniapp/conversation/managing-conversations/set-message-receive-option)。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。\n\nPromise 成功表示设置请求完成,不等于 `onSelfInfoUpdated` 已经到达。事件监听和 `getSelfUserInfo()` 校准方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。", + "description": "设置当前账号在全部会话中的默认消息接收与通知方式。", "headings": [], "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", - "title": "设置全局消息接收选项" + "title": "设置全局消息接收方式" }, "/sdk/uniapp/user/profile/set-friend-add-permission": { "body": "加好友权限属于商业版账号策略。锁定的 `unix-openim-sdk 0.2.0-rc.3` 会在用户模型中公开相关商业字段,但当前 `OpenIMSetSelfInfoParams` 没有独立的 `addFriendPermission` 写入参数。\n\n因此本版本不能通过本插件伪造一个 setter,也不要把该值塞进 `ex`。需要修改时,应由商业版业务后端或已确认支持该字段的管理接口完成;客户端随后重新查询当前资料并刷新 UI。\n\n页面展示该开关前应进行能力判断。公共版、旧服务端或没有返回该字段时,把状态显示为“不可配置”,不要默认成“允许任何人添加”或“需要验证”。\n\n好友申请的客户端流程见[发起好友申请](/sdk/uniapp/user/friend-applications/add-friend)与[处理收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。", @@ -832,9 +980,20 @@ "title": "设置加好友权限" }, "/sdk/uniapp/user/online-status/subscribe-users-status": { - "body": "`subscribeUsersStatus()` 为指定用户建立状态订阅;`getUserStatus()` 可立即查询这些用户的当前状态。`onUserStatusChanged` 是本页的完整事件归属。\n\n```uts\nimport {\n getUserStatus,\n off,\n onUserStatusChanged,\n subscribeUsersStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst statusSubscription = onUserStatusChanged((result) => {\n result.statuses.forEach((status) => replaceUserStatus(status.userID, status))\n})\n\nconst userIDs = ['user_a', 'user_b']\nawait subscribeUsersStatus(userIDs)\nconst snapshot = await getUserStatus(userIDs)\nsnapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status))\n\noff(statusSubscription)\n```\n\n先注册事件,再订阅和查询快照,可缩小快照与事件之间的丢失窗口。状态项可能包含多平台在线明细;业务应按 `userID` 和平台更新,不把一次离线事件等同于用户所有设备都离线。\n\n只订阅当前界面或业务确实需要的用户,并在不再需要时调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status)。", - "description": "订阅指定用户在线状态,并用 onUserStatusChanged 合并增量。", - "headings": [], + "body": "在线状态只表示用户是否连接 OpenIMServer,不表示用户正在查看 App、某个会话或某条消息。建议只订阅当前界面和业务确实需要的用户;每个账号最多订阅 3000 个用户,不要一次订阅整个用户目录。\n\n`subscribeUsersStatus()` 在 unix SDK 中用于建立订阅,Promise 成功只返回字符串结果,不直接返回状态数组。建立订阅后再调用 `getUserStatus()` 获取当前快照,后续变化通过 `onUserStatusChanged` 合并。\n\n```uts\nimport {\n getUserStatus,\n subscribeUsersStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDs = uniqueUserIDs(['user_a', 'user_b'])\n\nawait subscribeUsersStatus(userIDs)\n\nconst snapshot = await getUserStatus(userIDs)\nsnapshot?.statuses.forEach((status) => {\n replaceUserStatus(status.userID, status)\n})\n```\n\n先去除空值和重复 `userID`。订阅成功、查询快照和后续事件是三个阶段,不能把 `subscribeUsersStatus()` 的字符串返回值当成在线状态对象。\n\n### 在线状态字段\n\n`getUserStatus()` 返回 `OpenIMUserStatusListResult | null`,其中 `statuses` 的元素是 `OpenIMUserStatusItem`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 状态所属用户 ID,也是状态缓存的合并标识。 |\n| `status` | `number` | 汇总在线状态;应使用插件导出的在线状态常量解释,不要自行发明数值。 |\n| `platformIDs` | `number[]` | 当前在线平台列表;为空时不要推断具体设备或最后活跃时间。 |\n\n一次平台离线不一定表示用户所有设备都离线。应用应同时查看汇总 `status` 与 `platformIDs`,并按服务端多端策略展示。\n\n## 监听在线状态变化\n\n本页是 `onUserStatusChanged` 的完整监听归属页。为缩小注册与快照查询之间的丢失窗口,推荐先注册事件,再建立订阅和查询快照:\n\n```uts\nimport {\n off,\n onUserStatusChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst statusSubscription = onUserStatusChanged((result) => {\n result.statuses.forEach((status) => {\n replaceUserStatus(status.userID, status)\n })\n})\n\nawait subscribeUsersStatus(userIDs)\n\nconst current = await getUserStatus(userIDs)\ncurrent?.statuses.forEach((status) => {\n replaceUserStatus(status.userID, status)\n})\n\nfunction releaseStatusListener() {\n off(statusSubscription)\n}\n```\n\n初始快照与事件都按 `userID` 幂等合并。退出登录、切换账号或销毁在线状态层时调用 `releaseStatusListener()`;不再需要某些用户状态时,还要调用[取消用户在线状态订阅](/sdk/uniapp/user/online-status/unsubscribe-users-status),避免长期占用订阅额度。", + "description": "订阅指定用户的在线状态,查询初始快照并合并状态事件。", + "headings": [ + { + "depth": 3, + "title": "在线状态字段", + "url": "#在线状态字段" + }, + { + "depth": 2, + "title": "监听在线状态变化", + "url": "#监听在线状态变化" + } + ], "sourcePath": "/sdk/uniapp/user/online-status/subscribe-users-status", "title": "订阅用户在线状态" }, @@ -853,16 +1012,38 @@ "title": "取消用户在线状态订阅" }, "/sdk/uniapp/user/friends/get-friend-list-page": { - "body": "`getFriendListPage()` 按偏移量分页读取好友;数据量较小或需要完整快照时,可用 `getFriendList()`。本页同时归属好友新增、删除和资料变化事件。\n\n```uts\nimport {\n getFriendListPage,\n off,\n onFriendAdded,\n onFriendDeleted,\n onFriendInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst friendAddedSubscription = onFriendAdded((friend) => upsertFriend(friend.userID, friend))\nconst subscriptions : Array = [\n friendAddedSubscription,\n onFriendDeleted((friend) => removeFriend(friend.userID)),\n onFriendInfoChanged((friend) => upsertFriend(friend.userID, friend)),\n]\n\nconst page = await getFriendListPage({ offset: 0, count: 100 })\nreplaceFriendSnapshot(page?.friends ?? [])\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`offset` 从 `0` 开始,`count` 是本页期望数量。继续分页直到返回数量小于 `count`,并按 `userID` 去重。`getFriendList(filterBlack)` 的 `filterBlack` 控制是否过滤黑名单用户;不要把黑名单和好友关系当作同一状态。\n\n事件与查询可能包含同一好友,应用必须幂等合并。重新登录、断线恢复或应用状态丢失后,重新查询快照。", - "description": "分页或一次性查询好友,并处理好友新增、删除与资料变化事件。", - "headings": [], + "body": "先注册好友事件,再调用 `getFriendListPage()` 建立当前好友快照。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次请求的好友数量。 |\n| `filterBlack` | `boolean` | 否 | 是否从结果中过滤黑名单用户。 |\n\n```uts\nimport { getFriendListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendListPage({\n offset: 0,\n count: 50,\n filterBlack: true,\n})\n```\n\nPromise 成功后,`result?.friends` 是当前页 `OpenIMFriendUserItem[]`。继续加载时按请求条目数增加 `offset`;好友增删后重置分页。原生 API 直接返回 `OpenIMFriendListResult | null`,不使用 `{ data }` 包装。\n\n### 好友资料字段\n\n`OpenIMFriendUserItem` 表示当前账号与一个好友的关系资料:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 好友的用户 ID,也是好友列表的稳定标识。 |\n| `nickname` | `string` | 好友的账号级昵称。 |\n| `faceURL` | `string` | 好友的账号级头像地址。 |\n| `remark` | `string` | 当前账号为该好友设置的备注。 |\n| `isPinned` | `boolean` | 该好友是否在联系人列表中置顶。 |\n| `ownerUserID` | `string` | 这条好友关系所属的用户 ID,通常是当前账号。 |\n| `operatorUserID` | `string` | 建立或更新这条关系的操作用户 ID。 |\n| `addSource` | `number` | 好友关系的添加来源值。 |\n| `createTime` | `number` | 好友关系创建时间。 |\n| `ex` | `string` | 好友关系扩展字符串。 |\n| `attachedInfo` | `string` | SDK 附加信息;只按已确认的业务约定解析。 |\n\n`nickname`、`faceURL` 是账号资料快照,`remark`、`isPinned`、`ex` 和 `attachedInfo` 属于好友关系。不要用 `OpenIMFriendUserItem` 覆盖陌生人的 `OpenIMPublicUserItem`,也不要把好友备注写回账号昵称。\n\n## 同步好友变化\n\n本页是 `onFriendAdded`、`onFriendInfoChanged` 和 `onFriendDeleted` 的完整监听归属页。查询负责建立快照,事件负责按 `userID` 合并增量。\n\n```uts\nimport {\n off,\n onFriendAdded,\n onFriendDeleted,\n onFriendInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst friendSubscriptions : Array = [\n onFriendAdded((friend) => mergeFriend(friend.userID, friend)),\n onFriendInfoChanged((friend) => mergeFriend(friend.userID, friend)),\n onFriendDeleted((friend) => removeFriend(friend.userID)),\n]\n\nfunction removeFriendListeners() {\n friendSubscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n退出登录、切换账号或销毁联系人状态层时调用 `removeFriendListeners()`。", + "description": "使用 uni-app / uni-app x SDK 分页查询当前用户的好友列表。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "好友资料字段", + "url": "#好友资料字段" + }, + { + "depth": 2, + "title": "同步好友变化", + "url": "#同步好友变化" + } + ], "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", - "title": "查询好友列表" + "title": "分页获取好友列表" }, "/sdk/uniapp/user/friends/search-friends": { - "body": "`searchFriends()` 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。\n\n```uts\nimport { searchFriends } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchFriends({\n keywordList: ['Alice'],\n isSearchUserID: true,\n isSearchNickname: true,\n isSearchRemark: true,\n})\n\nrenderFriends(result?.friends ?? [])\n```\n\n`keywordList` 可以包含多个关键词;空关键词的行为可能随 Core 变化,业务应在调用前拦截空搜索。结果使用 `OpenIMFriendListResult`,按 `userID` 去重并结合最新好友事件更新。\n\n搜索条件只影响本次查询,不改变好友资料或服务端索引。需要查指定好友的完整资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。", + "body": "`searchFriends()` 只搜索当前好友关系,不是全站用户搜索。通过布尔字段明确要匹配的属性。\n\n当前建议只使用一个去除首尾空格后的非空关键词。空关键词应在调用前拦截。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `keywordList` | `string[]` | 是 | 搜索关键词数组;当前只使用第一个非空关键词。 |\n| `isSearchUserID` | `boolean` | 是 | 是否匹配好友用户 ID。 |\n| `isSearchNickname` | `boolean` | 是 | 是否匹配好友昵称。 |\n| `isSearchRemark` | `boolean` | 是 | 是否匹配当前用户设置的好友备注。 |\n\n```uts\nimport { searchFriends } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchFriends({\n keywordList: ['Alice'],\n isSearchUserID: true,\n isSearchNickname: true,\n isSearchRemark: true,\n})\n\nrenderFriends(result?.friends ?? [])\n```\n\nPromise 成功后直接返回 `OpenIMFriendListResult | null`,从 `friends` 读取 `OpenIMFriendUserItem[]`。好友字段见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。\n\n搜索结果只建立当前条件下的展示快照,不改变好友资料或服务端索引,也不应覆盖完整好友列表。按 `userID` 关联现有好友状态,并继续合并好友事件;需要查指定好友资料时使用[查询指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)。", "description": "按用户 ID、昵称或备注搜索当前好友。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/user/friends/search-friends", "title": "搜索好友" }, @@ -881,9 +1062,15 @@ "title": "检查好友关系" }, "/sdk/uniapp/user/friends/update-friends": { - "body": "`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。\n\n```uts\nimport { updateFriends } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriends({\n friendUserIDs: ['user_a', 'user_b'],\n remark: '项目成员',\n isPinned: true,\n})\n```\n\n`friendUserIDs` 不能为空。`remark`、`isPinned` 和 `ex` 都是可选项;未提供表示保持原值。Promise 成功后,最终好友资料通过 `onFriendInfoChanged` 或重新查询好友列表确认。\n\n商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`:\n\n```uts\nimport { updateFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' })\n```\n\n不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。", + "body": "`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 |\n| `remark` | `string \\| null` | 否 | 新备注。 |\n| `isPinned` | `boolean \\| null` | 否 | 是否置顶好友。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n\n```uts\nimport { updateFriends } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriends({\n friendUserIDs: ['user_a', 'user_b'],\n remark: '项目成员',\n isPinned: true,\n})\n```\n\n`friendUserIDs` 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。`ex` 是完整字符串,不会自动合并 JSON 字段。\n\nPromise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 `onFriendInfoChanged` 按 `userID` 合并,完整监听见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page);必要时重新查询校准。\n\n商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`:\n\n```uts\nimport { updateFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' })\n```\n\n`updateFriend()` 使用单个 `userID`,并把置顶字段命名为 `pinned`;其 `remark` 和 `ex` 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。", "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/user/friends/update-friends", "title": "更新好友资料" }, @@ -902,16 +1089,38 @@ "title": "发起好友申请" }, "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": { - "body": "`getFriendApplicationListAsRecipient()` 读取其他用户发给当前账号的申请。本页归属四个好友申请事件,应用应先注册事件,再查询快照。\n\n```uts\nimport {\n getFriendApplicationListAsRecipient,\n off,\n onFriendApplicationAccepted,\n onFriendApplicationAdded,\n onFriendApplicationDeleted,\n onFriendApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onFriendApplicationAdded((item) => upsertApplication(item))\nconst subscriptions : Array = [\n addedSubscription,\n onFriendApplicationAccepted((item) => upsertApplication(item)),\n onFriendApplicationRejected((item) => upsertApplication(item)),\n onFriendApplicationDeleted((item) => removeApplication(item)),\n]\n\nconst page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 })\nreplaceReceivedApplications(page?.applications ?? [])\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n参数可省略;显式分页时 `offset` 从 0 开始。按申请双方标识与创建时间建立稳定 key,事件和查询结果幂等合并。收到申请后使用接受或拒绝 API处理,不直接修改本地状态冒充服务端成功。", - "description": "分页读取收到的申请,并处理申请新增、接受、拒绝和删除事件。", - "headings": [], + "body": "`getFriendApplicationListAsRecipient()` 查询其他用户发给当前账号的好友申请。uni-app / uni-app x 的 `OpenIMApplicationListParams` 只提供分页字段,不包含 Wasm 版本的 `handleResults` 筛选;需要只展示待处理申请时,在返回后根据 `handleResult` 过滤。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsRecipient({\n offset: 0,\n count: 20,\n})\n\nconst applications = result?.applications ?? []\nreplaceReceivedApplications(applications)\n```\n\nPromise 成功后直接返回 `OpenIMFriendApplicationListResult | null`,其中 `applications` 是当前页 `OpenIMFriendApplicationItem[]`。查询本身不会触发申请事件。\n\n### 好友申请字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `fromUserID` | `string` | 申请发起人的用户 ID。 |\n| `fromNickname` | `string` | 申请发起人的昵称快照。 |\n| `fromFaceURL` | `string` | 申请发起人的头像快照。 |\n| `toUserID` | `string` | 申请接收人的用户 ID。 |\n| `toNickname` | `string` | 申请接收人的昵称快照。 |\n| `toFaceURL` | `string` | 申请接收人的头像快照。 |\n| `reqMsg` | `string` | 申请附言。 |\n| `handleResult` | `number` | 当前处理结果:`0` 待处理、`1` 已同意、`-1` 已拒绝。 |\n| `handlerUserID` | `string` | 执行处理的用户 ID;未处理时可能为空。 |\n| `handleMsg` | `string` | 处理时填写的说明。 |\n| `handleTime` | `number` | 处理时间;未处理时不应当作有效时间展示。 |\n| `createTime` | `number` | 申请记录创建时间。 |\n| `ex` | `string` | 申请记录扩展字符串。 |\n| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 |\n\n申请记录使用 `fromUserID:toUserID` 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 `userID` 调用 `getUsersInfo()`。\n\n## 同步好友申请变化\n\n本页是 `onFriendApplicationAdded`、`onFriendApplicationAccepted`、`onFriendApplicationRejected` 和 `onFriendApplicationDeleted` 的完整监听归属页。推荐先注册事件,再查询快照:\n\n```uts\nimport {\n off,\n onFriendApplicationAccepted,\n onFriendApplicationAdded,\n onFriendApplicationDeleted,\n onFriendApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst applicationSubscriptions : Array = [\n onFriendApplicationAdded((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationAccepted((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationRejected((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationDeleted((item) => {\n removeFriendApplication(item.fromUserID, item.toUserID)\n }),\n]\n\nfunction releaseFriendApplicationSubscriptions() {\n applicationSubscriptions.forEach((subscription) => off(subscription))\n applicationSubscriptions.length = 0\n}\n```\n\n按当前用户是否为 `toUserID`,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)归属的 `onFriendAdded` 合并。\n\n收到申请后应调用接受或拒绝 API,不要只修改本地 `handleResult` 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 `releaseFriendApplicationSubscriptions()`。", + "description": "分页查询当前用户收到的好友申请,并同步申请状态变化。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "好友申请字段", + "url": "#好友申请字段" + }, + { + "depth": 2, + "title": "同步好友申请变化", + "url": "#同步好友申请变化" + } + ], "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient", - "title": "查询收到的好友申请" + "title": "获取收到的好友申请" }, "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": { - "body": "`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。\n\n```uts\nimport { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentApplications(result?.applications ?? [])\n```\n\n参数可以省略。分页结果可能在查询期间发生变化,应使用申请的用户标识和时间字段去重,而不是按数组下标更新。\n\n申请状态变化事件统一在[查询收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)说明。App 恢复、重新登录或事件可能遗漏时,重新查询本列表。", + "body": "`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentApplications(result?.applications ?? [])\n```\n\nPromise 成功后,`applications` 是当前页已发出的 `OpenIMFriendApplicationItem[]`,字段含义见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。该查询本身不会触发申请事件。\n\n分页结果可能在查询期间发生变化。事件按 `fromUserID:toUserID` 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。", "description": "分页读取当前账号发出的好友申请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", "title": "查询发出的好友申请" }, @@ -937,18 +1146,40 @@ "title": "拒绝好友申请" }, "/sdk/uniapp/user/friend-applications/delete-friend-requests": { - "body": "`deleteFriendRequests()` 商业版 批量删除明确指定的好友申请记录。\n\n```uts\nimport { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteFriendRequests({\n friendRequests: [\n { fromUserID: 'user_a', toUserID: 'user_b' },\n ],\n})\n```\n\n`friendRequests` 中每项使用 `OpenIMSimpleFriendRequest` 的 `fromUserID` 与 `toUserID` 精确定位。删除申请记录不会自动解除已经建立的好友关系。\n\nPromise 成功后重新查询申请列表和未处理数。批量操作应先在 UI 中确认目标,失败时不要假定部分记录已经删除;以新快照为准。", + "body": "`deleteFriendRequests()` 商业版 批量删除明确指定的好友申请记录。\n\n## 参数说明\n\n该方法接收 `OpenIMDeleteFriendRequestsParams`,其中 `friendRequests` 数组的每一项使用以下字段:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `friendRequests[].fromUserID` | `string` | 是 | 申请发起人的用户 ID。 |\n| `friendRequests[].toUserID` | `string` | 是 | 申请接收人的用户 ID。 |\n\n```uts\nimport { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteFriendRequests({\n friendRequests: [\n { fromUserID: 'user_a', toUserID: 'user_b' },\n ],\n})\n```\n\n每项都是 `OpenIMSimpleFriendRequest`,通过 `fromUserID:toUserID` 精确定位。删除申请记录不等于拒绝申请,也不会解除已经建立的好友关系;删除好友关系应使用好友删除 API。\n\nPromise 成功表示删除请求已完成,随后可能收到 `onFriendApplicationDeleted`。完整事件监听见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient),按 `fromUserID:toUserID` 移除记录。\n\n批量操作前应在 UI 中确认目标。失败时不要假定全部或部分记录已经删除;重新查询收到和发出的申请列表,以服务端快照校准。", "description": "商业版批量删除指定好友申请记录。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/user/friend-applications/delete-friend-requests", "title": "删除好友申请记录" }, "/sdk/uniapp/user/blacklist/get-black-list": { - "body": "公共入口 `getBlackList()` 返回 `OpenIMBlackListResult | null`。本页同时归属 `onBlackAdded` 与 `onBlackDeleted`。\n\n```uts\nimport {\n getBlackList,\n off,\n onBlackAdded,\n onBlackDeleted,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst blackAddedSubscription = onBlackAdded((user) => upsertBlackUser(user))\nconst blackDeletedSubscription = onBlackDeleted((user) => removeBlackUser(user.userID))\n\nconst result = await getBlackList()\nreplaceBlackList(result?.blackUsers ?? [])\n\noff(blackAddedSubscription)\noff(blackDeletedSubscription)\n```\n\n商业版还提供 `getBlacks()` 商业版,返回包装字段名为 `blacks`:\n\n```uts\nimport { getBlacks } from '@/uni_modules/unix-openim-sdk'\n\nconst commercialResult = await getBlacks()\nreplaceBlackList(commercialResult?.blacks ?? [])\n```\n\n两个入口不要混用返回字段。黑名单与好友关系是独立状态;加入黑名单是否自动影响好友关系取决于服务端策略,客户端应分别查询。", - "description": "查询黑名单快照,并处理加入与移除黑名单事件。", - "headings": [], + "body": "OpenIMSDK 黑名单记录当前用户主动拉黑的用户。调用 `getBlackList()` 可以获取完整列表,用于构建黑名单设置页、展示资料卡关系状态和限制聊天入口。\n\n黑名单与群组管理是两类独立能力。禁言、移除群成员或调整群角色时,应使用群成员 API;`getBlackList()` 只读取当前用户维护的黑名单。\n\n## 获取黑名单\n\n完成初始化、登录并确认连接可用后调用 `getBlackList()`。Promise 直接返回 `OpenIMBlackListResult | null`;`blackUsers` 为空数组表示当前没有黑名单用户。\n\n```uts\nimport { getBlackList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getBlackList()\nconst blockedUsers = result?.blackUsers ?? []\nreplaceBlockedUsers(blockedUsers)\n```\n\n资料卡、会话操作菜单和联系人列表通常只需要判断某个 `userID` 是否在黑名单中。建议用 `userID` 建立集合,昵称和头像仅用于展示。\n\n```uts\nconst blockedUserIDs = new Set()\nblockedUsers.forEach((user) => blockedUserIDs.add(user.userID))\n\nfunction isBlocked(userID : string) : boolean {\n return blockedUserIDs.has(userID)\n}\n```\n\n商业版还提供 `getBlacks()` 商业版,其包装字段名是 `blacks`:\n\n```uts\nimport { getBlacks } from '@/uni_modules/unix-openim-sdk'\n\nconst commercialResult = await getBlacks()\nreplaceBlockedUsers(commercialResult?.blacks ?? [])\n```\n\n两个入口不要混用返回字段。一般业务选择一个与所安装版本一致的入口,不需要同时查询两份快照。\n\n## 黑名单记录字段\n\n`blackUsers` 中的每一项都是 `OpenIMBlackUserItem`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 被当前用户拉黑的目标用户 ID,也是列表和事件合并标识。 |\n| `nickname` | `string` | 目标用户昵称,用于展示。 |\n| `faceURL` | `string` | 目标用户头像地址。 |\n| `ownerUserID` | `string` | 这条黑名单关系的所有者,通常是当前登录用户。 |\n| `operatorUserID` | `string` | 执行拉黑操作的用户 ID。 |\n| `createTime` | `number` | 黑名单关系创建时间。 |\n| `addSource` | `number` | 黑名单关系的添加来源值。 |\n| `ex` | `string` | 扩展字段,只解析业务已经约定的内容。 |\n| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 |\n\n若黑名单页还要展示公开资料或好友备注,应按 `userID` 合并,并明确区分 `OpenIMBlackUserItem`、`OpenIMFriendUserItem` 和 `OpenIMPublicUserItem` 的来源。\n\n## 调用结果与增量变化\n\n`getBlackList()` 成功后,用返回数组完整替换当前黑名单快照。该查询本身不会触发新增或删除事件;首次进入页面、重新登录或用户主动刷新时,应重新查询完整列表。\n\n本页是 `onBlackAdded` 和 `onBlackDeleted` 的完整监听归属页:\n\n```uts\nimport {\n off,\n onBlackAdded,\n onBlackDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst blacklistSubscriptions : Array = [\n onBlackAdded((user) => {\n upsertBlockedUser(user.userID, user)\n }),\n onBlackDeleted((user) => {\n removeBlockedUser(user.userID)\n }),\n]\n\nfunction releaseBlacklistSubscriptions() {\n blacklistSubscriptions.forEach((subscription) => off(subscription))\n blacklistSubscriptions.length = 0\n}\n```\n\n事件按 `userID` 合并。加入黑名单后,对方不能向当前用户发送消息,但当前用户仍可向对方发送;若产品要求双向限制,应由业务层额外控制。黑名单与好友关系仍是独立状态,客户端应分别查询,不能假定拉黑一定删除好友。\n\n退出登录、切换账号或销毁黑名单状态层时调用 `releaseBlacklistSubscriptions()`。", + "description": "查询当前用户的黑名单快照,并处理加入与移除黑名单事件。", + "headings": [ + { + "depth": 2, + "title": "获取黑名单", + "url": "#获取黑名单" + }, + { + "depth": 2, + "title": "黑名单记录字段", + "url": "#黑名单记录字段" + }, + { + "depth": 2, + "title": "调用结果与增量变化", + "url": "#调用结果与增量变化" + } + ], "sourcePath": "/sdk/uniapp/user/blacklist/get-black-list", - "title": "查询黑名单" + "title": "获取黑名单" }, "/sdk/uniapp/user/blacklist/add-black": { "body": "`addBlack()` 把目标用户加入黑名单,可附带双方约定的扩展字符串。\n\n```uts\nimport { addBlack } from '@/uni_modules/unix-openim-sdk'\n\nawait addBlack({ toUserID: 'user_b', ex: '' })\n```\n\nPromise 成功后,以 `onBlackAdded` 或重新查询黑名单确认最终状态。不要在 `ex` 中写入 Token、内部封禁证据或仅管理员可见的数据。\n\n加入黑名单不会自动删除本地历史消息。产品如需隐藏会话或解除好友,应作为独立操作并设计失败补偿。", @@ -1601,9 +1832,15 @@ "title": "创建合并转发消息" }, "/sdk/uniapp/message/sending-messages/send-message": { - "body": "`sendMessage()` 接收 `OpenIMSendMessageOptions`,Promise 直接返回最终 `OpenIMMessageItem`。\n\n```uts\nimport { sendMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst sent = await sendMessage({\n message,\n recvID: 'user_b',\n groupID: '',\n isOnlineOnly: false,\n})\nupsertMessage(sent.clientMsgID, sent)\n```\n\n单聊填 `recvID`、群聊填 `groupID`,另一个传空字符串。`offlinePushInfo` 可按产品推送策略提供;`isOnlineOnly` 为 true 时不按普通持久消息处理。\n\n发送进度按 `clientMsgID` 合并,最终成功以 Promise 为准。失败时保留消息和错误状态供用户重试,不重新创建不同 `clientMsgID` 的重复消息,除非产品明确要求。", - "description": "把已创建的消息发送给单聊用户或群组。", - "headings": [], + "body": "`sendMessage()` 发送由消息创建 API 返回的 `OpenIMMessageItem`。单聊只填写 `recvID`,群聊只填写 `groupID`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写目标群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 待发送的消息对象。 |\n| `offlinePushInfo` | `OpenIMOfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessage({\n recvID: receiverUserID,\n groupID: '',\n message,\n isOnlineOnly: false,\n})\n```\n\nPromise 成功后,直接返回服务端确认的 `OpenIMMessageItem`,原生 UTS API 不使用 `{ data }` 包装。发送端应使用返回对象按 `clientMsgID` 替换本地待发送项;常用字段和内容字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n其他客户端通过新消息事件接收。Promise 成功、接收事件到达和历史查询校准是不同阶段。提供失败重试时,应继续保留同一个 `clientMsgID` 下的待发送消息,除非产品明确创建一次新的发送。\n\n资源已由业务上传并写入 URL 型消息时,使用 [`sendMessageNotOss()`](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss)。", + "description": "使用 uni-app / uni-app x SDK 发送待发送消息对象。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/sending-messages/send-message", "title": "发送消息" }, @@ -1888,13 +2125,28 @@ "title": "发送自定义信令" }, "/sdk/uniapp/events/overview-events": { - "body": "每个 `on...()` 调用同步返回独立 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。正常清理使用 `off(subscription)`;不要继续使用旧版“监听函数直接返回取消闭包”的写法。\n\n```uts\nimport {\n off,\n onSyncServerFailed,\n onSyncServerFinish,\n onSyncServerProgress,\n onSyncServerStart,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst startSubscription = onSyncServerStart((reinstalled) => beginSyncUI(reinstalled))\nconst subscriptions : Array = [\n startSubscription,\n onSyncServerProgress((progress) => updateSyncProgress(progress)),\n onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)),\n onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n同步事件的 boolean 表示合同定义的重装/同步上下文,不应当作“成功”布尔值;成功与失败由事件名区分。进度值用于展示,不承诺每个整数都到达。\n\n`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体重置或受控测试。组件、页面和功能模块不得用它清理自己的单个监听,以免影响其他消费者。\n\n## HarmonyOS unsupported 事件\n\nHarmonyOS 当前有十个事件不受原生 HAR 支持:四个 migration 事件、三个消息 extensions 事件、`onMessageKvInfoChanged`、`onStreamChange`,以及合同中登记的 badge/消息扩展事件。注册这些事件只返回 unsupported subscription,不会伪造成功回调。具体商业事件页面会再次标注。\n\n事件处理器应快速返回,把耗时工作排入应用队列。账号切换和 dispose 时先停止接收业务写入,再逐个释放旧句柄。", - "description": "管理 OpenIMSDKEventSubscription、off/offAll 与同步生命周期事件。", + "body": "`unix-openim-sdk` 通过 `on...()` 函数推送连接、同步、用户、好友、会话、群组、消息和商业信令相关事件。所有事件函数都从 `@/uni_modules/unix-openim-sdk` 扁平导入,不需要为不同领域创建 SDK 实例或原生 listener 对象。\n\n## 注册与移除事件\n\n每次 `on...()` 调用同步返回一个独立的 `OpenIMSDKEventSubscription`,其中包含 `id` 与 `eventName`。应用必须保存该句柄,并在拥有它的页面、状态层或账号作用域结束时传给 `off(subscription)`。\n\n```uts\nimport {\n off,\n onConnectSuccess,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectionSubscription : OpenIMSDKEventSubscription = onConnectSuccess(() => {\n setConnectionState('connected')\n})\n\n// 拥有该监听的作用域结束时执行。\noff(connectionSubscription)\n```\n\n不要继续使用旧版“监听函数直接返回取消闭包”的写法,也不要调用 `connectionSubscription()`。同一个事件可以有多个订阅者;`off()` 只删除传入句柄对应的处理器,不影响其他模块。\n\n`offAll(eventName)` 会删除指定事件名的全部处理器,只适合应用整体销毁、可控测试重置或明确拥有该事件全部监听的基础设施。普通组件、页面和功能模块不得用它代替局部清理,否则会移除其他消费者的监听。\n\n事件处理器应尽快返回。耗时查询、文件操作和网络请求应进入应用队列,并在写回状态前确认当前登录用户或商业版 session epoch 没有变化。每个事件的完整监听代码只放在下表链接的归属页面,本页不重复其他领域的业务处理器。\n\n## 选择注册时机\n\n| 事件范围 | 建议生命周期 | 对应页面 |\n| --- | --- | --- |\n| 连接和 Token | 在 `login()` 前注册,切换账号时清理 | [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session) |\n| 用户、好友和黑名单 | 联系人状态层初始化时注册 | [用户概览](/sdk/uniapp/user/overview-user) |\n| 会话列表 | 会话列表状态层初始化时注册 | [获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) |\n| 会话未读数 | 应用角标状态层初始化时注册 | [维护总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count) |\n| 群组列表 | 群组状态层初始化时注册 | [群组概览](/sdk/uniapp/group/overview-group) |\n| 群成员 | 群成员状态层初始化时注册 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) |\n| 入群申请 | 群申请状态层初始化时注册 | [获取收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) |\n| 消息 | 消息状态层初始化时注册 | [接收消息](/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 商业信令 | 通话功能初始化时注册 | [通话事件](/sdk/uniapp/calling/managing-calls/handle-call-events) |\n| SDK session | 依赖唯一 Core 的商业插件初始化时注册 | [更新 Token 与观察 SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session) |\n\n不要在每次组件渲染、`onShow` 或列表刷新时重复注册。多次注册同一个逻辑会造成重复消息、未读数反复累加,或让旧账号的异步结果写入新账号界面。\n\n查询 API 用于建立页面进入时的快照,事件用于合并后续增量。业务实体应使用稳定标识合并,例如消息使用 `clientMsgID`、会话使用 `conversationID`、好友与黑名单使用 `userID`、群成员使用 `groupID:userID`。不要使用数组下标或展示名称去重。\n\n## 监听初始化同步\n\n登录后 SDK 会同步 OpenIMServer 数据。以下事件适合驱动全局同步状态和进度展示:\n\n| 事件 | 处理器参数 | 含义 |\n| --- | --- | --- |\n| `onSyncServerStart` | `reinstalled: boolean` | 开始同步;布尔值表示本地库是否因重装或等价重建进入同步。 |\n| `onSyncServerProgress` | `progress: number` | 同步进度变化;用于展示,不承诺每个整数都会到达。 |\n| `onSyncServerFinish` | `reinstalled: boolean` | 本轮同步完成,可以重新查询依赖完整数据的页面。 |\n| `onSyncServerFailed` | `reinstalled: boolean` | 本轮同步失败,应记录当前同步上下文并等待重试或连接恢复。 |\n\n```uts\nimport {\n off,\n onSyncServerFailed,\n onSyncServerFinish,\n onSyncServerProgress,\n onSyncServerStart,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst syncSubscriptions : Array = [\n onSyncServerStart((reinstalled) => {\n setSyncState('syncing', 0, reinstalled)\n }),\n onSyncServerProgress((progress) => {\n setSyncProgress(progress)\n }),\n onSyncServerFinish((reinstalled) => {\n setSyncState('ready', 100, reinstalled)\n refreshVisibleSnapshots()\n }),\n onSyncServerFailed((reinstalled) => {\n setSyncState('failed', 0, reinstalled)\n }),\n]\n\nfunction releaseSyncSubscriptions() {\n syncSubscriptions.forEach((subscription) => off(subscription))\n syncSubscriptions.length = 0\n}\n```\n\n三个 boolean 回调参数都描述合同定义的重装/同步上下文,不是“操作是否成功”的通用返回值;完成或失败由事件名区分。同步事件描述 Core 的同步生命周期,不是某个查询 API 的 Promise 回调,也没有业务实体合并键;状态应按当前登录用户隔离。\n\n本页是四个同步事件以及 `off()` / `offAll()` 控制语义的归属页。退出登录、切换账号或销毁 SDK 作用域时调用 `releaseSyncSubscriptions()`。同步完成后数据仍会继续变化:重新查询当前页面快照,并继续通过各领域归属页的增量事件更新同一状态层。\n\n## HarmonyOS 不支持事件\n\n商业版 HarmonyOS 的锁定 HAR 缺少以下十个事件,因此订阅会稳定返回 `platform-unsupported`,不会伪造成功回调:\n\n- `onMigrationStart`\n- `onMigrationProgress`\n- `onMigrationFailed`\n- `onMigrationFinished`\n- `onRecvMessageExtensionsAdded`\n- `onRecvMessageExtensionsChanged`\n- `onRecvMessageExtensionsDeleted`\n- `onMessageKvInfoChanged`\n- `onStreamChange`\n- `onGroupApplicationBadgeCountChanged`\n\n平台支持状态和“是否为商业版”是两个独立维度。应用应识别 `platform-unsupported` 并关闭对应入口或采用平台替代方案,不要无限重试,也不要把未发生的事件模拟成成功。", + "description": "注册 uni-app / uni-app x SDK 事件,并按业务生命周期同步连接与数据状态。", "headings": [ { "depth": 2, - "title": "HarmonyOS unsupported 事件", - "url": "#harmonyos-unsupported-事件" + "title": "注册与移除事件", + "url": "#注册与移除事件" + }, + { + "depth": 2, + "title": "选择注册时机", + "url": "#选择注册时机" + }, + { + "depth": 2, + "title": "监听初始化同步", + "url": "#监听初始化同步" + }, + { + "depth": 2, + "title": "HarmonyOS 不支持事件", + "url": "#harmonyos-不支持事件" } ], "sourcePath": "/sdk/uniapp/events/overview-events", @@ -1908,18 +2160,58 @@ "title": "处理数据迁移事件" }, "/sdk/uniapp/logger": { - "body": "初始化时通过 `logLevel`、`isLogStandardOutput` 和可选 `logFilePath` 配置 SDK 日志。生产环境使用满足诊断需要的最低级别,并对 Token、用户隐私、消息内容和商业凭据脱敏。\n\n## 上传日志\n\n`uploadLogs()` 接收行数和扩展说明:\n\n```uts\nimport { uploadLogs } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = `diagnostic-${Date.now()}`\nawait uploadLogs(\n { line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) },\n operationID,\n)\n```\n\n`operationID` 是可选诊断关联值。业务 API示例通常省略它;只有排查请求链路时为一次操作生成唯一值,并与服务端日志关联。它不是用户 ID、幂等键或认证凭据。\n\n上传进度由 `onUploadLogsProgress` 提供,完整订阅归[消息概览](/sdk/uniapp/message/overview-message)。Promise 成功表示上传请求完成,不代表问题已提交给支持团队。\n\n## 安全要求\n\n- 上传前取得用户同意,并说明日志范围与保留策略。\n- `ex` 只放脱敏场景信息,不写 Token、服务地址凭据或完整消息。\n- 控制 `line`,避免无界上传;失败时限次重试。\n- 生产包不要长期启用 verbose 标准输出。\n- 本地数据目录只用于诊断定位,不直接打包整个数据库上传。", - "description": "配置 SDK 日志、上传日志,并安全使用 operationID 关联问题。", + "body": "`unix-openim-sdk` 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。\n\n日志链路通常包含 `OpenIMInitConfig` 中的日志配置、单次调用可选的 `operationID`、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。\n\n## 日志级别\n\n日志级别在 `initSDK()` 时通过 `OpenIMInitConfig.logLevel` 配置。从最详细到最简略依次为:\n\n| 常量 | 数值 | 说明 |\n| --- | --- | --- |\n| `OpenIMLogLevelVerbose` | `6` | 最详细的运行跟踪,只用于短期深度诊断。 |\n| `OpenIMLogLevelDebug` | `5` | 开发与联调信息。 |\n| `OpenIMLogLevelInfo` | `4` | 常规运行信息。 |\n| `OpenIMLogLevelWarn` | `3` | 警告信息。 |\n| `OpenIMLogLevelError` | `2` | 错误信息。 |\n| `OpenIMLogLevelFatal` | `1` | 严重错误。 |\n| `OpenIMLogLevelPanic` | `0` | 最严重级别。 |\n\n生产环境不建议长期使用 `Verbose` 或 `Debug`。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。\n\n### 日志级别建议\n\n| 场景 | 建议配置 | 说明 |\n| --- | --- | --- |\n| 本地开发 | `OpenIMLogLevelDebug`,`isLogStandardOutput: true` | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 |\n| 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 |\n| 生产默认 | `OpenIMLogLevelWarn` 或 `OpenIMLogLevelError`,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 |\n| 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 |\n\n## 配置日志\n\n日志选项属于 SDK 初始化配置,不是 `login()` 参数。下面以 Android 为例:\n\n```uts\nimport {\n OpenIMLogLevelDebug,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelDebug,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nawait initSDK(config)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `logLevel` | `OpenIMLogLevel` | 是 | 控制 Core 运行日志的详细程度。 |\n| `isLogStandardOutput` | `boolean` | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 |\n| `logFilePath` | `string \\| null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 |\n\n`apiAddr`、`wsAddr`、平台和 `systemType` 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。\n\n## 使用 operationID 定位一次调用\n\n`operationID` 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。\n\n```uts\nimport { getConversationListSplit } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\ntry {\n const result = await getConversationListSplit(\n { offset: 0, count: 50 },\n operationID,\n )\n\n appLogger.info('openim_api_success', {\n operationID,\n action: 'get_conversation_page',\n count: result?.conversations.length ?? 0,\n })\n} catch (error) {\n appLogger.error('openim_api_failed', {\n operationID,\n action: 'get_conversation_page',\n error: sanitizeOpenIMError(error),\n })\n throw error\n}\n```\n\n每次调用使用新的 `operationID`,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、`conversationID` 或 `clientMsgID`。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。\n\n## 记录业务上下文\n\n应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 `conversationID` 或 `clientMsgID`。不要记录:\n\n- 用户 Token、管理员 Token、secret 或商业业务凭据。\n- 完整消息正文、原始自定义消息 payload、私人文件 URL。\n- 不必要的用户资料、通讯录、群成员清单。\n- SDK 数据库内容和完整本机沙盒路径。\n\n日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。\n\n## 上传日志\n\n`uploadLogs()` 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。\n\n```uts\nimport { uploadLogs } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\nawait uploadLogs(\n {\n line: 2000,\n ex: JSON.stringify({ scene: 'login-timeout' }),\n },\n operationID,\n)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 |\n| `ex` | `string` | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 |\n\nPromise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。\n\n## 观察上传进度\n\n`onUploadLogsProgress()` 返回独立订阅句柄。进度事件的完整业务归属在[消息概览](/sdk/uniapp/message/overview-message);日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 `off(subscription)` 释放。\n\n上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。\n\n## 相关页面\n\n- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)\n- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message)\n- [发送消息](/sdk/uniapp/message/sending-messages/send-message)", + "description": "配置 UTS 插件日志级别,使用 operationID 关联调用链路,并在用户同意后上传脱敏日志。", "headings": [ + { + "depth": 2, + "title": "日志级别", + "url": "#日志级别" + }, + { + "depth": 3, + "title": "日志级别建议", + "url": "#日志级别建议" + }, + { + "depth": 2, + "title": "配置日志", + "url": "#配置日志" + }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "使用 operationID 定位一次调用", + "url": "#使用-operationid-定位一次调用" + }, + { + "depth": 2, + "title": "记录业务上下文", + "url": "#记录业务上下文" + }, { "depth": 2, "title": "上传日志", "url": "#上传日志" }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明-2" + }, + { + "depth": 2, + "title": "观察上传进度", + "url": "#观察上传进度" + }, { "depth": 2, - "title": "安全要求", - "url": "#安全要求" + "title": "相关页面", + "url": "#相关页面" } ], "sourcePath": "/sdk/uniapp/logger", From 0b44e466fe6ce35ae057b16fdb37383d4efba23b Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:30:18 +0800 Subject: [PATCH 11/20] docs(uniapp): align Chinese SDK pages with wasm --- .../calling/managing-calls/accept-call.mdx | 17 +- .../calling/managing-calls/cancel-call.mdx | 4 +- .../managing-calls/handle-call-events.mdx | 21 +- .../calling/managing-calls/hang-up-call.mdx | 6 +- .../calling/managing-calls/reject-call.mdx | 6 +- .../managing-calls/start-group-call.mdx | 44 +- .../managing-calls/start-single-call.mdx | 65 +- .../sdk/uniapp/calling/overview-calling.mdx | 47 +- .../get-room-by-group-id.mdx | 17 +- .../get-token-by-room-id.mdx | 8 +- .../restore-pending-invitation.mdx | 10 +- .../send-a-custom-signal.mdx | 55 +- .../sdk/uniapp/file-uploads/upload-file.mdx | 51 +- .../sdk/uniapp/group/change-group-mute.mdx | 19 +- .../chat/sdk/uniapp/group/create-group.mdx | 21 +- .../chat/sdk/uniapp/group/dismiss-group.mdx | 4 + .../accept-group-application.mdx | 12 +- .../delete-group-requests.mdx | 13 +- ...et-group-application-list-as-applicant.mdx | 15 +- ...et-group-application-list-as-recipient.mdx | 39 +- .../refuse-group-application.mdx | 12 +- .../docs/chat/sdk/uniapp/group/join-group.mdx | 13 +- .../change-group-member-mute.mdx | 18 +- .../invite-user-to-group.mdx | 18 +- .../kick-group-member.mdx | 20 +- .../set-group-member-avatar.mdx | 12 +- .../set-group-member-extension.mdx | 17 +- .../set-group-member-nickname.mdx | 12 +- .../set-group-member-role-level.mdx | 18 +- .../transfer-group-owner.mdx | 15 +- .../chat/sdk/uniapp/group/overview-group.mdx | 32 +- .../docs/chat/sdk/uniapp/group/quit-group.mdx | 4 + .../get-group-member-list.mdx | 35 +- .../get-specified-group-members-info.mdx | 16 +- .../search-group-members.mdx | 18 +- .../get-joined-group-list-page.mdx | 40 +- .../get-specified-groups-info.mdx | 12 +- .../group/retrieving-groups/search-groups.mdx | 19 +- .../sdk/uniapp/group/set-group-extension.mdx | 16 +- .../group/set-group-join-verification.mdx | 12 +- .../set-group-member-friend-permission.mdx | 11 +- .../group/set-group-member-profile-access.mdx | 11 +- .../sdk/uniapp/group/update-group-profile.mdx | 23 +- .../check-speech-to-text.mdx | 14 +- .../composing-messages/transcribe-audio.mdx | 12 +- .../creating-messages/create-card-message.mdx | 17 +- .../create-custom-message.mdx | 22 +- .../create-file-message-by-url.mdx | 24 +- .../create-image-message-by-url.mdx | 31 +- .../create-location-message.mdx | 16 +- .../create-merger-message.mdx | 14 +- .../create-sound-message-by-url.mdx | 24 +- .../create-text-at-message.mdx | 35 +- .../create-video-message-by-url.mdx | 38 +- .../delete-saved-messages.mdx | 28 +- .../insert-local-group-message.mdx | 16 +- .../insert-local-single-message.mdx | 24 +- .../managing-messages/modify-a-message.mdx | 42 +- .../managing-messages/revoke-a-message.mdx | 38 +- .../set-message-local-ex.mdx | 18 +- .../managing-messages/set-message-pinned.mdx | 23 +- .../get-group-message-readers.mdx | 25 +- .../send-group-read-receipts.mdx | 21 +- .../sdk/uniapp/message/overview-message.mdx | 79 +- .../receiving-messages/receive-messages.mdx | 103 +- .../find-messages-by-id.mdx | 19 +- .../load-message-context.mdx | 16 +- .../load-older-messages.mdx | 32 +- .../searching-messages/search-messages.mdx | 119 +- .../sending-messages/send-message-not-oss.mdx | 22 +- src/generated/search-index-zh.json | 184 +-- src/generated/uniapp-sdk-zh-content.json | 1103 ++++++++++++++--- 72 files changed, 2547 insertions(+), 490 deletions(-) diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx index 8770e4795c..d89a9e5c14 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -4,14 +4,23 @@ description: '商业版接受邀请并取得房间凭据。' sourcePath: '/sdk/uniapp/calling/managing-calls/accept-call' --- -收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 `signalingAccept()`。 +从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`: ```uts import { signalingAccept } from '@/uni_modules/unix-openim-sdk' -const result = await signalingAccept({ invitation }) +const roomCredentials = await signalingAccept({ invitation }) ``` -返回的 `token`、`roomID`、`liveURL` 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。 +`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 -Promise 成功与对方接受事件、媒体真正连接是不同阶段。 +Promise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string \| null` | 本次通话的媒体房间 ID。 | +| `token` | `string \| null` | 加入媒体房间使用的短期凭据。 | +| `liveURL` | `string \| null` | 媒体服务返回的连接地址。 | +| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 服务端返回的邀请快照。 | + +这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx index bcda1a71b7..e2da2b429e 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx @@ -12,4 +12,6 @@ import { signalingCancel } from '@/uni_modules/unix-openim-sdk' await signalingCancel({ invitation }) ``` -取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。 +必须传本次通话的完整原始 `OpenIMSignalingInvitationInfo`,不能只构造一个 `roomID`。取消与挂断语义不同:取消用于尚未接通的邀请,挂断用于已经建立或正在建立的会话。 + +Promise 成功表示取消信令请求完成。应用还应结束本地的等待接听状态,并释放尚未使用的媒体资源;远端通过 `onInvitationCancelled` 更新。按钮应防止重复提交,并以取消、接受等竞态事件决定最终状态,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx index 749370303c..760daba130 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx @@ -4,7 +4,17 @@ description: '商业版统一接收邀请、接受、拒绝、取消、超时、 sourcePath: '/sdk/uniapp/calling/managing-calls/handle-call-events' --- -所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。 +通话状态层应集中监听邀请生命周期、参与者连接状态和媒体流变化,并按 `roomID` 合并到同一份本地状态。所有事件返回 raw JSON 字符串;回调应尽快完成,异步展示 UI,并先校验 JSON 再映射到应用自己的通话领域模型。 + +| 事件 | 用途 | +| --- | --- | +| `onReceiveNewInvitation` | 收到新的通话邀请。 | +| `onInviteeAccepted`、`onInviteeRejected` | 当前邀请被接受或拒绝。 | +| `onInvitationCancelled`、`onInvitationTimeout` | 邀请被取消或超时。 | +| `onInviteeAcceptedByOtherDevice`、`onInviteeRejectedByOtherDevice` | 同一账号的其他设备处理邀请。 | +| `onHangUp` | 通话参与者挂断。 | +| `onRoomParticipantConnected`、`onRoomParticipantDisconnected` | 房间参与者连接状态变化。 | +| `onStreamChange` | 参与者媒体流状态变化。 | ```uts import { @@ -46,7 +56,12 @@ const subscriptions : Array = [ onRoomParticipantDisconnected(handleCallPayload), onStreamChange(handleCallPayload), ] -subscriptions.forEach((subscription) => off(subscription)) + +function removeCallListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -HarmonyOS 当前不支持 `onStreamChange`,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。 +本页是以上 11 个通话事件的唯一完整监听归属页。参与者状态还要结合用户 ID 更新;不要按事件顺序、展示名称或数组下标合并。应用应使用 `roomID`、本地 session ID 和运行 generation 去重,过期事件不能打开新页面。退出登录、切换账号或销毁通话状态层时调用 `removeCallListeners()`。 + +HarmonyOS 当前不支持 `onStreamChange`,注册会返回 `platform-unsupported` subscription,不会伪造媒体流事件;其余本页信令事件支持。raw payload 与 RTC Token 不写入日志或持久化存储。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx index bf9940f56f..b191f54d1b 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx @@ -4,7 +4,7 @@ description: '商业版结束已接受的通话。' sourcePath: '/sdk/uniapp/calling/managing-calls/hang-up-call' --- -`signalingHungUp()` 使用当前会话的 invitation。 +通话已经建立后,参与者调用 `signalingHungUp()`。`invitation` 是本次通话使用的完整 `OpenIMSignalingInvitationInfo`,其中的 `roomID` 必须与当前媒体房间一致。 ```uts import { signalingHungUp } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,6 @@ import { signalingHungUp } from '@/uni_modules/unix-openim-sdk' await signalingHungUp({ invitation }) ``` -调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 `onHangUp`。 +Promise 成功只表示挂断信令请求完成。应用还需要停止本地采集、断开媒体房间,并释放摄像头、麦克风和页面资源。 + +调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。取消、拒绝、超时和挂断应进入同一套按 `roomID` 幂等的清理流程,并继续处理 `onHangUp`,完整监听见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx index 998b60d564..c7db7b3f90 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx @@ -4,7 +4,7 @@ description: '商业版拒绝当前邀请。' sourcePath: '/sdk/uniapp/calling/managing-calls/reject-call' --- -`signalingReject()` 使用收到的完整 invitation。 +用户拒绝来电时,将收到的原始 `OpenIMSignalingInvitationInfo` 交给 `signalingReject()`: ```uts import { signalingReject } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,6 @@ import { signalingReject } from '@/uni_modules/unix-openim-sdk' await signalingReject({ invitation }) ``` -拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 `roomID`。 +`invitation` 必须保留完整的原始通话信息,不要自行重建或修改 `roomID`。 + +Promise 成功只表示 OpenIMServer 已完成拒绝请求。拒绝后可以关闭本地来电 UI,并幂等处理对端和其他设备事件;发起端随后通过 `onInviteeRejected` 更新界面,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx index c8b439145d..6caadd6e46 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx @@ -4,21 +4,49 @@ description: '商业版向群成员发起群组通话邀请。' sourcePath: '/sdk/uniapp/calling/managing-calls/start-group-call' --- -`signalingInviteInGroup()` 商业版 使用同一邀请结构,但 invitation 必须包含 `groupID` 和目标成员。 +`signalingInviteInGroup()` 商业版 发起群聊通话,只邀请 `inviteeUserIDList` 明确列出的群成员,不会因为填写 `groupID` 自动邀请全群。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 | +| `invitation.inviterUserID` | `string` | 是 | 发起人的用户 ID。 | +| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请的群成员用户 ID;不要包含发起人。 | +| `invitation.groupID` | `string` | 是 | 群组 ID,群聊通话不能为空。 | +| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,所有参与端必须一致。 | +| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 | +| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 | +| `invitation.sessionType` | `number` | 是 | 工作群会话传 `OpenIMSessionTypeWriteGroup`。 | +| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | +| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 | +| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 | +| `invitation.busyLineUserIDList` | `string[]` | 否 | 发起新邀请时通常不填写。 | +| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 | ```uts -import { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMPlatformAndroid, + OpenIMSessionTypeWriteGroup, + signalingInviteInGroup, +} from '@/uni_modules/unix-openim-sdk' -const result = await signalingInviteInGroup({ +const roomCredentials = await signalingInviteInGroup({ invitation: { - inviterUserID: selfUserID, - inviteeUserIDList: selectedUserIDs, + inviterUserID: currentUserID, + inviteeUserIDList: selectedGroupMemberIDs, + customData: JSON.stringify({ source: 'group-call' }), groupID, - mediaType: 'audio', + roomID: groupID, + mediaType: 'video', timeout: 30, - sessionType: 2, + sessionType: OpenIMSessionTypeWriteGroup, + platformID: OpenIMPlatformAndroid, }, + offlinePushInfo, }) ``` -发送前确认成员仍在群内并去重。`busyLineUserIDList` 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。 +示例沿用群组 ID 作为房间 ID;若业务自行生成 `roomID`,所有参与端必须使用同一个值。iOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。发起前应排除当前用户、空值和重复成员,并确认目标仍在群内。 + +Promise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`,字段含义见[发起单聊通话](/zh/sdk/uniapp/calling/managing-calls/start-single-call)。`busyLineUserIDList` 只表示部分成员忙线,不应中止其他成员的邀请;成功也不代表其他成员已经接听,后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)合并。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx index 86cd697a4d..a849de3e20 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -4,21 +4,72 @@ description: '商业版向一个用户发起音频或视频邀请。' sourcePath: '/sdk/uniapp/calling/managing-calls/start-single-call' --- -`signalingInvite()` 商业版 使用 invitation 和可选离线推送信息。 +`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 | +| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 | +| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | +| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 | +| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | +| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 | +| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 | +| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 | +| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | +| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 | +| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 | +| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 | +| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 | +| `offlinePushInfo.title` | `string` | 否 | 推送标题。 | +| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 | +| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 | +| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 | ```uts -import { signalingInvite } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMPlatformAndroid, + OpenIMSessionTypeSingle, + signalingInvite, +} from '@/uni_modules/unix-openim-sdk' -const result = await signalingInvite({ +const roomCredentials = await signalingInvite({ invitation: { - inviterUserID: selfUserID, + inviterUserID: currentUserID, inviteeUserIDList: [peerUserID], + customData: JSON.stringify({ source: 'contact-card' }), + groupID: '', + roomID: createBusinessRoomID(), mediaType: 'video', timeout: 30, - sessionType: 1, + sessionType: OpenIMSessionTypeSingle, + platformID: OpenIMPlatformAndroid, + }, + offlinePushInfo: { + title: '视频通话', + desc: '你收到一个视频通话邀请', + ex: '', + iOSPushSound: 'default', + iOSBadgeCount: true, }, - offlinePushInfo: { title: '视频通话', desc: '收到新的通话邀请' }, }) ``` -返回值可能含 `roomID`、`token`、`liveURL` 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。 +iOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。 + +## 返回结果 + +Promise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string \| null` | 本次通话的媒体房间 ID。 | +| `token` | `string \| null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 | +| `liveURL` | `string \| null` | 媒体服务返回的房间连接地址。 | +| `busyLineUserIDList` | `string[] \| null` | 因忙线未能进入邀请流程的用户 ID。 | +| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 服务端返回的邀请快照。 | + +取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx b/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx index 3cda55f97c..185a8eb81a 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/overview-calling.mdx @@ -4,17 +4,46 @@ description: '商业版通话邀请、房间凭据、事件和 AV Runtime 的职 sourcePath: '/sdk/uniapp/calling/overview-calling' --- -本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。 +本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 提供发起邀请、接受、拒绝、取消、挂断、查询房间和同步通话状态所需的信令 API。它负责协调参与者、房间信息和通话生命周期,不负责采集摄像头画面、播放远端媒体流或渲染通话界面。 -需要完整通话与会议 UI 时,另行集成 `openim-av-runtime`。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。 +应用需要把返回的 `roomID`、`token` 和 `liveURL` 交给所选的实时音视频媒体引擎,并自行处理设备权限、媒体轨道、弱网策略和界面状态。信令 API 不是一套完整的 WebRTC 媒体 SDK。需要完整通话与会议 UI 时,可另行集成 `openim-av-runtime`;AV Runtime 复用本插件的唯一登录态,不初始化第二套 OpenIM Core。 -典型流程: +## 通话流程 -1. 应用登录 IM,并注册全部信令事件。 -2. 主叫构造 `OpenIMSignalingInvitationInfo` 后调用邀请。 -3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。 -4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。 -5. 双方使用返回的 room/token/liveURL 建立媒体连接。 -6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。 +1. 应用登录 IM 并注册全部信令事件,调用 `signalingInvite()` 发起单聊通话,或调用 `signalingInviteInGroup()` 发起群聊通话。 +2. 被邀请方从 `onReceiveNewInvitation` 获取 raw JSON 邀请,校验并映射为 `OpenIMSignalingInvitationInfo` 后展示来电。 +3. 接受方先申请媒体权限,再调用 `signalingAccept()`;拒绝则调用 `signalingReject()`。 +4. 双方使用返回的 `roomID`、`token` 和 `liveURL` 接入媒体引擎。 +5. 通话过程中根据参与者、媒体流和自定义信令事件更新本地状态。 +6. 发起方可以取消尚未接通的邀请;任一参与者都可以挂断已经建立的通话。 + +## 核心数据 + +| 数据 | 说明 | +| --- | --- | +| `OpenIMSignalingInvitationInfo` | 邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | +| `OpenIMSignalingInviteResult` | OpenIMServer 返回的 `roomID`、`token`、`liveURL` 和忙线用户列表。 | +| `OpenIMSignalingAcceptResult`、`OpenIMSignalingGetTokenByRoomIDResult` | 接受邀请或重新获取 Token 时返回的媒体房间凭据。 | +| `OpenIMSignalingGetRoomByGroupIDResult` | 按群组查询到的 `roomID` 和原始邀请快照。 | + +`customData` 和自定义信令只适合传递业务可公开的协商信息。不要在其中写入长期凭据、管理员密钥或其他敏感数据。 + +## 状态更新与事件归属 + +发起、接受、拒绝、取消和挂断等写操作需要分别处理 API 的 Promise 结果与通话事件。Promise 成功表示 OpenIMServer 已接受或完成当前信令请求;事件反映邀请方、被邀请方、其他设备或房间参与者看到的增量状态,两者不是同一个完成信号。 + +信令事件参数是 raw JSON 字符串,必须先校验再进入应用状态。邀请生命周期、成员进出房间、挂断和媒体流变化的完整监听统一见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events);自定义信令事件见[发送自定义信令](/zh/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal)。查询房间、重新获取 Token 和恢复待处理邀请只通过 Promise 返回调用时的快照。 + +概览页不注册事件处理器。通话状态以 `roomID` 为主键,参与者状态还要结合用户 ID;重新登录后的通话变化由事件同步,需要显示当前房间快照时再查询房间信息。 + +## 按任务查找页面 + +| 任务 | 页面 | +| --- | --- | +| 发起单聊或群聊通话 | [发起单聊通话](/zh/sdk/uniapp/calling/managing-calls/start-single-call)、[发起群聊通话](/zh/sdk/uniapp/calling/managing-calls/start-group-call) | +| 接受或拒绝邀请 | [接受通话](/zh/sdk/uniapp/calling/managing-calls/accept-call)、[拒绝通话](/zh/sdk/uniapp/calling/managing-calls/reject-call) | +| 取消邀请或挂断通话 | [取消通话邀请](/zh/sdk/uniapp/calling/managing-calls/cancel-call)、[挂断通话](/zh/sdk/uniapp/calling/managing-calls/hang-up-call) | +| 恢复房间或待处理邀请 | [查询群组通话房间](/zh/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id)、[获取通话房间 Token](/zh/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id)、[恢复待处理的通话邀请](/zh/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation) | +| 处理通话事件和业务协商 | [通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)、[发送自定义信令](/zh/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal) | 同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx index 8da55685ef..e380413149 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -4,12 +4,23 @@ description: '商业版查询群当前关联的 roomID 与邀请。' sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id' --- -`signalingGetRoomByGroupID()` 返回可选 `roomID` 和 invitation。 +`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`: ```uts import { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk' -const result = await signalingGetRoomByGroupID({ groupID }) +const room = await signalingGetRoomByGroupID({ groupID }) ``` -空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。 +## 返回结果 + +Promise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `roomID` | `string \| null` | 当前群通话的房间 ID。 | +| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 当前房间对应的原始邀请信息。 | + +当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。 + +空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx index 461451684c..88d7459ee2 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -4,12 +4,14 @@ description: '商业版为指定 roomID 获取 RTC Token 和 liveURL。' sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id' --- -`signalingGetTokenByRoomID()` 返回可选 Token 与 liveURL。 +已经知道 `roomID`、但需要重新获取入会凭据时,调用 `signalingGetTokenByRoomID()`: ```uts import { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk' -const result = await signalingGetTokenByRoomID({ roomID }) +const roomCredentials = await signalingGetTokenByRoomID({ roomID }) ``` -凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。 +Promise 成功后,`roomCredentials` 是 `OpenIMSignalingGetTokenByRoomIDResult | null`,包含可选的 `token` 和 `liveURL`,不重复返回 `roomID`。只有取得有效 Token 后,才能使用本次查询参数中的 `roomID` 连接媒体引擎。 + +房间 Token 是短期敏感凭据,只保存在内存并立即交给媒体层,不要写入日志、URL、分析事件、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx index b3b28665df..f498793cd9 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -4,7 +4,7 @@ description: '商业版在 SDK 启动后查询可能遗漏的当前邀请。' sourcePath: '/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation' --- -事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,恢复初始化前到达的邀请。 +事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,返回应用启动或恢复时需要处理的邀请快照: ```uts import { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk' @@ -13,4 +13,10 @@ const result = await signalingGetInvitationInfoStartApp() if (result?.invitation != null) recoverInvitation(result.invitation) ``` -可选参数 `userID` 只用于明确查询用户。无邀请时合法返回 `null`,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。 +可选参数 `{ userID }` 只用于明确查询用户;通常由当前登录态决定,不需要传入。 + +## 返回结果 + +Promise 成功后,结果是 `OpenIMSignalingGetInvitationInfoStartAppResult | null`,其中 `invitation` 为 `OpenIMSignalingInvitationInfo | null`。无邀请时合法返回 `null` 或 `invitation: null`,不是错误。 + +该查询只取得当前快照,不会触发通话事件。只在 invitation 非空且 `roomID` 有效时恢复来电界面;恢复结果与实时邀请可能重复,应按 `roomID` 和本地 session 标识去重。每次 runtime 初始化只查询一次,随后仍需监听取消、超时、接受和挂断,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx index 31876d9440..59bf58ae4b 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -4,7 +4,11 @@ description: '商业版向房间发送业务自定义信令,并安全解析接 sourcePath: '/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal' --- -`signalingSendCustomSignaling()` 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。 +`signalingSendCustomSignaling()` 用于向指定通话房间发送轻量级业务协商数据,例如举手、切换布局提示或业务侧状态同步。它不是聊天消息接口,也不能替代媒体引擎的数据通道。 + +## 发送信令 + +`customInfo` 是字符串。需要传递结构化数据时,先定义稳定的数据格式并序列化为 JSON。 ```uts import { @@ -14,16 +18,53 @@ import { signalingSendCustomSignaling, } from '@/uni_modules/unix-openim-sdk' -const signalSubscription = onReceiveCustomSignal((payload) => handleValidatedSignal(payload)) -const signalingSubscription = onReceiveCustomSignaling((payload) => handleValidatedSignal(payload)) +const signal = { + version: 1, + eventID: createBusinessEventID(), + type: 'hand-raised', + userID: currentUserID, + sentAt: Date.now(), +} await signalingSendCustomSignaling({ roomID, - customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }), + customInfo: JSON.stringify(signal), }) +``` + +Promise 成功表示 OpenIMServer 已接受本次发送,不等于其他参与者已经处理该数据。`customInfo` 应保持精简,并包含协议版本和业务幂等 ID。大文件、聊天记录、长期状态和敏感凭据不应放入其中。 + +## 接收信令 + +`onReceiveCustomSignal` 和 `onReceiveCustomSignaling` 是兼容不同 Core/商业服务版本的 raw JSON 事件。实际部署只订阅其中真实产生的一种;若为了兼容同时订阅,必须按 `roomID:eventID` 去重。 -off(signalSubscription) -off(signalingSubscription) +```uts +function handleValidatedSignal(payload : string) { + try { + const event = JSON.parseObject(payload) + if (event == null) return + + const eventRoomID = event.getString('roomID') + const customInfo = event.getString('customInfo') + if (eventRoomID != activeRoomID || customInfo == null) return + + const signal = JSON.parseObject(customInfo) + if (signal == null) return + applyValidatedCallSignal(eventRoomID, signal) + } catch (_) { + console.warn('无法解析通话自定义信令') + } +} + +const signalSubscription = onReceiveCustomSignal(handleValidatedSignal) +const signalingSubscription = onReceiveCustomSignaling(handleValidatedSignal) + +function removeCustomSignalListeners() { + off(signalSubscription) + off(signalingSubscription) +} ``` -接收端用事件 ID/内容哈希去重,校验 `type`、`version` 和字段。`customInfo` 不承担权限认证,不含 Token 或秘密。 +解析函数应检查 JSON 结构、协议版本、`eventID`、`type` 和业务字段,再返回已验证的应用内对象。本页是两个兼容事件的完整监听示例归属页。离开通话页、退出登录或切换账号时调用 `removeCustomSignalListeners()`。 + +自定义信令不承担权限认证。不要信任客户端信令来授予主持人、付费或隐私权限;需要权威校验的状态应由可信后端保存和判断。连接恢复后,通过房间查询或业务后端校准长期状态,不要把自定义信令当作可重放的权威记录。 diff --git a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx index 82be75b19e..b424fcd376 100644 --- a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx +++ b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -4,10 +4,32 @@ description: '上传本地文件、观察进度,并在商业版取消上传。 sourcePath: '/sdk/uniapp/file-uploads/upload-file' --- -`uploadFile()` 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。 +`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 | +| `name` | `string` | 是 | 文件名。 | +| `contentType` | `string` | 是 | MIME 类型。 | +| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 | +| `cancelID` | `string \| null` | 否 | 用于取消本次上传的稳定 ID。 | +| `cause` | `string \| null` | 否 | 业务侧记录的上传用途或原因。 | + +如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。 ```uts -import { uploadFile } from '@/uni_modules/unix-openim-sdk' +import { + off, + onUploadFileProgress, + uploadFile, +} from '@/uni_modules/unix-openim-sdk' + +const progressSubscription = onUploadFileProgress((event) => { + if (event == null) return + updateUploadProgress(event.progress) +}) const result = await uploadFile({ filepath: '/data/user/0/app/cache/report.pdf', @@ -16,9 +38,32 @@ const result = await uploadFile({ uuid: createStableUploadUUID(), cancelID: 'upload-report-1', }) + +function removeUploadListener() { + off(progressSubscription) +} ``` -路径必须是原生可读的完整路径。`unifile://` 先转换;不要把网络 URL 作为 `filepath`。上传进度由[消息概览](/sdk/uniapp/message/overview-message)归属的 `onUploadFileProgress` 提供。 +路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 + +## 返回结果 + +Promise 成功后,结果是 `OpenIMUploadFileResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `url` | `string \| null` | 上传后的远端资源 URL。 | +| `uri` | `string \| null` | 服务端返回的资源 URI。 | +| `uuid` | `string \| null` | 本次上传的任务标识。 | +| `size` | `number \| null` | 文件大小。 | +| `typ` | `number \| null` | 服务端返回的资源类型。 | +| `mediaID` | `string \| null` | 媒体资源 ID。 | + +使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 + +## 监听上传进度 + +`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。 商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`: diff --git a/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx b/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx index 8e9dbea5ee..386524f7b7 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/change-group-mute.mdx @@ -4,7 +4,14 @@ description: '修改群组全员禁言状态。' sourcePath: '/sdk/uniapp/group/change-group-mute' --- -`changeGroupMute()` 修改群组全员禁言。 +`changeGroupMute()` 控制群组整体禁言。群主和管理员可以按 OpenIMServer 权限执行该操作。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要修改的群 ID。 | +| `isMute` | `boolean` | 是 | `true` 开启全员禁言,`false` 关闭。 | ```uts import { changeGroupMute } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +19,12 @@ import { changeGroupMute } from '@/uni_modules/unix-openim-sdk' await changeGroupMute({ groupID, isMute: true }) ``` -权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。 +只有群主或具备服务端权限的管理员可以操作,最终权限和群状态由服务端校验。不要仅根据本地角色显示结果;服务端仍可能因群状态、角色变化或并发操作拒绝。群主和管理员通常仍可发送消息,因此群组禁言不表示所有用户都无法发言。 + +Wasm 文档中的 `muteBypassUserIDs` 商业扩展没有进入当前 uni-app / uni-app x 合同,请勿向 `changeGroupMute()` 传入该字段。商业服务端即使支持例外用户,也应以当前插件公开的类型和后续群资料为准。 + +## 返回结果 + +Promise 成功直接返回字符串结果,表示服务端完成本次群禁言设置,不等于所有成员界面已经更新。群资料随后可能通过 `onGroupInfoChanged` 到达,应按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时重新查询群资料。 + +全员禁言与单个成员禁言是不同能力。商业版群资料可能包含禁言例外用户列表;公共客户端把缺失扩展视为“没有可用扩展数据”,不能自行推断例外权限。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx index 41bd284926..65c1c1d61e 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx @@ -6,6 +6,19 @@ sourcePath: '/sdk/uniapp/group/create-group' `createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupInfo.groupName` | `string` | 是 | 群名称。 | +| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 | +| `groupInfo.notification` | `string \| null` | 否 | 初始群公告。 | +| `groupInfo.introduction` | `string \| null` | 否 | 群简介。 | +| `groupInfo.faceURL` | `string \| null` | 否 | 群头像 URL。 | +| `groupInfo.ex` | `string \| null` | 否 | 群扩展字符串,完整写入。 | +| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 | +| `adminUserIDs` | `string[] \| null` | 否 | 初始管理员用户 ID。 | + ```uts import { createGroup } from '@/uni_modules/unix-openim-sdk' @@ -16,4 +29,10 @@ const group = await createGroup({ }) ``` -群类型、验证方式和其他 `OpenIMCreateGroupInfo` 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。 +成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。 + +## 返回结果 + +Promise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。 + +Promise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx index 5559e540ec..1e3839dc78 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/dismiss-group.mdx @@ -13,3 +13,7 @@ await dismissGroup(groupID) ``` 这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。 + +Promise 成功表示解散请求完成,不代表每个客户端都已处理事件。当前客户端继续等待 `onGroupDismissed` / `onJoinedGroupDeleted` 或重新查询,按 `groupID` 移除群、成员和聊天入口。 + +提交前展示群名和成员影响范围,并防止重复点击。Promise 失败时保留当前群状态;权限和群状态最终由服务端校验,不能只依赖本地 `ownerUserID`。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx index d14d9e7171..e7ed2c605f 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx @@ -6,10 +6,20 @@ sourcePath: '/sdk/uniapp/group/group-applications/accept-group-application' `acceptGroupApplication()` 由有权限的群成员处理申请。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 申请目标群 ID。 | +| `fromUserID` | `string` | 是 | 申请人的用户 ID。 | +| `handleMsg` | `string` | 是 | 处理说明;可能向申请人展示,不写内部风控信息。 | + ```uts import { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk' await acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '已通过' }) ``` -成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。 +Promise 成功表示接受请求已经完成,不等于申请事件和成员事件都已到达。成功后分别刷新申请列表和群成员列表,或等待 `onGroupApplicationAccepted` 与 `onGroupMemberAdded` 按各自主键合并。 + +UI 在请求期间锁定该申请,避免接受与拒绝并发。处理权限、申请状态、群人数和重复成员由服务端校验;失败时保留原申请并重新查询,不只改本地 `handleResult`。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx index f1cf23010f..314a22ba08 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/group/group-applications/delete-group-requests' `deleteGroupRequests()` 商业版 删除明确指定的申请记录。 +## 参数说明 + +`groupRequests` 是非空数组,每项 `OpenIMSimpleGroupRequest` 包含: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 申请目标群 ID。 | +| `fromUserID` | `string` | 是 | 申请人的用户 ID。 | + ```uts import { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk' @@ -14,4 +23,6 @@ await deleteGroupRequests({ }) ``` -使用 `OpenIMSimpleGroupRequest` 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。 +使用 `groupID:fromUserID` 精确定位,提交前去重。删除申请记录不等于拒绝申请,也不会移除已经加入的成员;移除成员应使用群成员 API。 + +Promise 成功表示删除请求完成,随后可能收到申请删除事件。完整监听见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。批量失败时不要假定每一项都已删除;重新查询申请列表与数量。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx index 22ca6a00a7..4117da7860 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as- `getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。 +## 参数说明 + +参数可省略;显式分页时使用: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number \| null` | 否 | 本次读取数量。 | + ```uts import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' @@ -13,4 +22,8 @@ const result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 } renderSentGroupApplications(result?.applications ?? []) ``` -参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。 +## 返回结果 + +Promise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。 + +按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx index 66331f1320..bf09fc2093 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx @@ -6,6 +6,10 @@ sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as- `getGroupApplicationListAsRecipient()` 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。 +## 参数说明 + +参数对象可以省略;显式分页时使用可选的 `offset` 和 `count`。`offset` 首页为 `0`,`count` 是本次读取数量。unix SDK 的参数不包含 Wasm 页面中的 `handleResults` 筛选,需要在返回后按 `handleResult` 过滤。 + ```uts import { getGroupApplicationListAsRecipient, @@ -30,4 +34,37 @@ replaceReceivedGroupApplications(result?.applications ?? []) subscriptions.forEach((subscription) => off(subscription)) ``` -事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。 +## 返回结果 + +Promise 成功直接返回 `OpenIMGroupApplicationListResult | null`,从 `applications` 读取当前页。 + +返回 `null` 时不要伪造成“没有申请”的空状态;结合登录状态和错误诊断决定保留旧快照或展示加载失败。空 `applications` 才表示当前页没有记录。分页加载期间若处理了申请,应重置 offset 并重新查询,避免同一记录跨页重复。 + +### 入群申请字段 + +`OpenIMGroupApplicationItem` 同时包含群快照和申请人信息: + +| 字段 | 说明 | +| --- | --- | +| `groupID`、`groupName`、`groupFaceURL` | 目标群 ID、名称和头像快照。 | +| `notification`、`introduction` | 群公告和简介快照。 | +| `ownerUserID`、`creatorUserID` | 群主和创建人用户 ID。 | +| `groupType`、`status`、`memberCount` | 群类型、状态和成员数快照。 | +| `userID`、`nickname`、`userFaceURL` | 申请人 ID、昵称和头像快照。 | +| `handleResult` | 当前处理结果:待处理、已同意或已拒绝。 | +| `reqMsg`、`reqTime` | 申请说明和申请时间。 | +| `joinSource`、`inviterUserID` | 入群来源和邀请人。 | +| `handleUserID`、`handledMsg`、`handledTime` | 处理人、处理说明和处理时间。 | +| `ex`、`attachedInfo` | 扩展与附加信息,只按已确认协议解析。 | + +使用 `groupID:userID` 作为申请合并标识。昵称、头像和群名都是申请同步时的快照;需要最新资料时重新查询群或用户。 + +## 监听申请变化 + +本页是 `onGroupApplicationAdded`、`onGroupApplicationAccepted`、`onGroupApplicationRejected` 和 `onGroupApplicationDeleted` 的完整归属页。查询和事件按 `groupID:userID` 幂等合并,删除事件移除对应记录。 + +处理权限和申请状态由服务端校验,不要只修改本地 `handleResult` 冒充成功。管理员或群主身份变化后重新查询;分页期间收到事件时可重置分页。退出登录、切换账号或销毁申请 store 时逐个释放句柄。 + +按当前用户是否拥有处理权限,把收到的申请与自己发出的申请分开存储。事件中的群资料和申请人资料都是快照;群资料变化或用户改名时,不依赖旧申请记录刷新其他页面。 + +接受或拒绝操作的 Promise 成功后仍等待相应事件,或重新查询本页确认最终 `handleResult`。申请被同意后,群列表和成员列表分别由自己的事件与查询更新;不要仅从申请项推断当前用户已经加入群。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx index dfecb1d4e3..237d426d08 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx @@ -6,10 +6,20 @@ sourcePath: '/sdk/uniapp/group/group-applications/refuse-group-application' `refuseGroupApplication()` 使用与接受相同的定位字段。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 申请目标群 ID。 | +| `fromUserID` | `string` | 是 | 申请人的用户 ID。 | +| `handleMsg` | `string` | 是 | 拒绝说明;可能向申请人展示。 | + ```uts import { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk' await refuseGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '暂不通过' }) ``` -处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。 +处理说明可能对申请人可见,不写内部风控信息、内部账号或敏感审核依据。UI 在请求期间锁定该申请,避免接受与拒绝并发。 + +Promise 成功表示拒绝请求完成,不等于 `onGroupApplicationRejected` 已经到达。最终状态以申请事件或重新查询为准;失败时不要仅在本地隐藏申请。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx index 0318017e6f..077ba1493c 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/group/join-group' `joinGroup()` 提交入群申请。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要申请加入的群 ID。 | +| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 | +| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 | +| `ex` | `string \| null` | 否 | 申请扩展字符串,只按已确认协议填写。 | + ```uts import { joinGroup } from '@/uni_modules/unix-openim-sdk' @@ -17,4 +26,6 @@ await joinGroup({ }) ``` -`joinSource` 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 `ex` 不包含敏感信息。 +申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 + +Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx index 8675f3923a..4abea02410 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx @@ -4,12 +4,24 @@ description: '按秒设置指定群成员的禁言时长。' sourcePath: '/sdk/uniapp/group/managing-group-members/change-group-member-mute' --- -`changeGroupMemberMute()` 使用 `mutedSeconds` 设置禁言时长。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userID` | `string` | 是 | 目标成员用户 ID。 | +| `mutedSeconds` | `number` | 是 | 禁言时长,单位为秒;传 `0` 解除禁言。 | ```uts import { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk' -await changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 3600 }) +await changeGroupMemberMute({ + groupID, + userID: targetUserID, + mutedSeconds: 3600, +}) ``` -解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。 +群主可以禁言管理员和普通成员;管理员只能禁言普通成员,最终权限由 OpenIMServer 校验。 + +Promise 成功表示服务端完成设置。最终状态以成员资料中的 `muteEndTime` 为准,不要只按提交的秒数推算。`onGroupMemberInfoChanged` 的处理见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx index 57b4d37d81..84ad92d499 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx @@ -4,16 +4,26 @@ description: '邀请一个或多个用户加入指定群。' sourcePath: '/sdk/uniapp/group/managing-group-members/invite-user-to-group' --- -`inviteUserToGroup()` 提交用户列表和邀请原因。 +群主和管理员可以在 OpenIMServer 授予的权限范围内管理群成员。客户端可以根据成员资料中的 `roleLevel` 控制操作入口,但服务端仍负责最终权限校验。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `reason` | `string` | 是 | 邀请说明;没有说明时传空字符串。 | +| `userIDList` | `string[]` | 是 | 要邀请的用户 ID。 | ```uts import { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk' await inviteUserToGroup({ groupID, - reason: '加入项目讨论', - userIDList: ['user_b', 'user_c'], + reason: '邀请加入项目讨论组', + userIDList: ['user-002', 'user-003'], }) ``` -用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。 +提交前应先对 `userIDList` 去重。邀请原因可能对目标用户可见,不要写入 Token 等敏感信息。 + +Promise 成功表示服务端接受了邀请请求,不代表所有用户已经出现在成员列表。需要审核时可能先产生申请事件;成员真正加入后再按 `onGroupMemberAdded` 合并。成员事件的完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx index 1a12c77339..7bcbd680b6 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx @@ -4,12 +4,26 @@ description: '把一个或多个成员移出指定群。' sourcePath: '/sdk/uniapp/group/managing-group-members/kick-group-member' --- -`kickGroupMember()` 使用 `OpenIMGroupInviteParams` 相同结构定位成员和填写原因。 +有权限的群主或管理员可以调用 `kickGroupMember()`。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要移除成员的群组 ID。 | +| `reason` | `string` | 是 | 移除原因;没有补充说明时传空字符串。 | +| `userIDList` | `string[]` | 是 | 要移除的成员用户 ID 列表。 | ```uts import { kickGroupMember } from '@/uni_modules/unix-openim-sdk' -await kickGroupMember({ groupID, reason: '成员调整', userIDList: ['user_b'] }) +await kickGroupMember({ + groupID, + reason: '已离开项目', + userIDList: [targetUserID], +}) ``` -这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。 +不能用该方法移除群主;应先转让群主身份。服务端会校验管理员能否操作目标成员。 + +Promise 成功表示移除请求已经完成。`onGroupMemberDeleted` 随后可能到达,应按 `groupID:userID` 移除成员;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx index 952a6cbc69..1d7acf1d4a 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx @@ -4,12 +4,18 @@ description: '通过 setGroupMemberInfo 更新成员在群内的头像。' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-avatar' --- -通过 `faceURL` 更新群成员资料中的头像。 +`faceURL` 是群成员资料中的头像地址,只作用于指定群组。 ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL }) +await setGroupMemberInfo({ + groupID, + userID: targetUserID, + faceURL: avatarURL, +}) ``` -先把本地图片上传到业务可访问的 HTTPS 地址。不要传 `unifile://` 或本地沙盒路径作为远端头像 URL。 +群内头像与用户账号头像是不同数据。需要修改当前用户的账号头像时,使用[更新当前用户资料](/zh/sdk/uniapp/user/profile/set-self-info)。先把本地图片上传到业务可访问的 HTTPS 地址,不要把 `unifile://` 或沙盒路径写入远端资料。 + +Promise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx index 0d6989f39d..69a51cf311 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx @@ -4,12 +4,23 @@ description: '通过 setGroupMemberInfo 更新成员 ex。' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-extension' --- -成员 `ex` 是整段业务扩展字符串。 +`ex` 是完整字符串,SDK 不会自动合并 JSON。写入前应保留其他业务模块的命名空间。 ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) }) +const previous = JSON.parse(member.ex || '{}') + +await setGroupMemberInfo({ + groupID, + userID: targetUserID, + ex: JSON.stringify({ + ...previous, + title: 'maintainer', + }), +}) ``` -修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。 +扩展字段对有权查看成员资料的用户可见,不要存放 Token 等秘密。 + +Promise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx index f02e16b4a7..9c1236f215 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx @@ -4,12 +4,18 @@ description: '更新成员在指定群内的昵称。' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-nickname' --- -`setGroupMemberInfo()` 是成员资料统一更新入口。 +群内昵称只影响指定群组中的成员资料,不会修改用户的账号昵称。 ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupMemberInfo({ groupID, userID: 'user_b', nickname: '项目负责人' }) +await setGroupMemberInfo({ + groupID, + userID: targetUserID, + nickname: '项目负责人', +}) ``` -群昵称不同于用户全局昵称。只传本次字段,最终资料以 `onGroupMemberInfoChanged` 为准。 +`groupID` 和 `userID` 共同定位目标成员。当前用户是否可以修改本人或其他成员的群内昵称,由 OpenIMServer 根据群角色和策略校验。 + +Promise 成功表示服务端完成请求;随后可能收到 `onGroupMemberInfoChanged`,应按 `groupID:userID` 合并。完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx index a8cd848324..37e98da810 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx @@ -4,12 +4,24 @@ description: '通过 setGroupMemberInfo 更新成员角色等级。' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-role-level' --- -通过 `roleLevel` 更新群主、管理员或普通成员角色。 +通过 `roleLevel` 将普通群成员设置为管理员,或取消其管理员身份。 ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 }) +await setGroupMemberInfo({ + groupID, + userID: targetUserID, + roleLevel: 60, +}) ``` -使用 `OpenIMGroupMemberRoleLevel` 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。 +| `roleLevel` | 含义 | +| --- | --- | +| `20` | 普通群成员。 | +| `60` | 群管理员。 | +| `100` | 群主,只用于识别当前角色。 | + +传入 `60` 可设置管理员,传入 `20` 可取消管理员身份。`OpenIMGroupMemberRoleLevel` 的类型范围是 `20 | 60 | 100`,但不能通过写入 `100` 完成群主变更;请使用[转让群主](/zh/sdk/uniapp/group/managing-group-members/transfer-group-owner)。高风险角色变更应在 UI 中二次确认,最终权限由服务端校验。 + +Promise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并,完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx index f790edfbdf..280ef92832 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx @@ -4,12 +4,21 @@ description: '把群主权限转让给指定成员。' sourcePath: '/sdk/uniapp/group/managing-group-members/transfer-group-owner' --- -`transferGroupOwner()` 是不可轻易撤销的高风险操作。 +只有当前群主可以调用 `transferGroupOwner()`。`groupID` 是目标群组 ID,`newOwnerUserID` 是新群主的用户 ID;目标用户必须是该群组中的有效成员。 ```uts import { transferGroupOwner } from '@/uni_modules/unix-openim-sdk' -await transferGroupOwner({ groupID, newOwnerUserID: 'user_b' }) +await transferGroupOwner({ + groupID, + newOwnerUserID: targetUserID, +}) ``` -目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。 +## 调用后的状态变化 + +Promise 成功表示 OpenIMServer 已完成群主转让:原群主变为普通成员,新群主获得群主角色。成员角色变化通过 `onGroupMemberInfoChanged` 增量同步,事件参数是单个 `OpenIMGroupMemberItem`;一次转让可能涉及原群主和新群主两条成员记录,均按 `groupID:userID` 合并。 + +完整监听和清理代码见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。不要只依赖事件数量判断转让结果;需要确认当前角色时,应重新调用 `getSpecifiedGroupMembersInfo()` 获取相关成员快照。 + +群主需要退出群组时,必须先完成转让,再调用 `quitGroup()`。如果群组不再需要,群主也可以选择 `dismissGroup()`,但解散会影响所有成员,不能替代普通转让。UI 应提供二次确认并说明角色变化。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx index abc3df0243..fd9ea1f6bb 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -6,6 +6,34 @@ sourcePath: '/sdk/uniapp/group/overview-group' 群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 +## 核心数据类型 + +| 类型 | 用途 | +| --- | --- | +| `OpenIMGroupItem` | 已加入群组列表、群资料页和群状态。 | +| `OpenIMCreateGroupInfo` | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 | +| `OpenIMGroupMemberItem` | 群成员资料、角色、入群来源和禁言结束时间。 | +| `OpenIMGroupApplicationItem` | 入群申请及其申请人与处理状态。 | + +`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。 + +成员对象使用 `groupID:userID` 作为稳定合并标识。群内 `nickname` 和 `faceURL` 属于成员快照,不应被写回为用户账号级资料。 + +## 按任务查找页面 + +| 需求 | 页面 | +| --- | --- | +| 创建、更新、解散或退出群组 | [创建群组](/sdk/uniapp/group/create-group)、[更新群资料](/sdk/uniapp/group/update-group-profile)、[解散群组](/sdk/uniapp/group/dismiss-group)、[退出群组](/sdk/uniapp/group/quit-group) | +| 分页查询已加入群组或指定群资料 | [分页查询已加入群组](/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)、[查询指定群资料](/sdk/uniapp/group/retrieving-groups/get-specified-groups-info) | +| 查询、搜索和管理群成员 | [查询群成员列表](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)、[搜索群成员](/sdk/uniapp/group/retrieving-group-members/search-group-members) | +| 邀请或移除成员、转让群主 | [邀请用户入群](/sdk/uniapp/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/uniapp/group/managing-group-members/kick-group-member)、[转让群主](/sdk/uniapp/group/managing-group-members/transfer-group-owner) | +| 发送、查询和处理入群申请 | [申请加入群组](/sdk/uniapp/group/join-group)、[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) | +| 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 | + +## 状态更新 + +本页归属群资料与已加入群列表的四个事件: + ```uts import { off, @@ -29,4 +57,6 @@ subscriptions.forEach((subscription) => off(subscription)) 先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 -`OpenIMGroupItem` 的 `attachedInfo` 以及 `displayIsRead`、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。 +`onGroupInfoChanged` 更新资料,`onGroupDismissed` 表示群已解散,`onJoinedGroupAdded` / `onJoinedGroupDeleted` 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。 + +群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 `off(subscription)`。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx index 9bd2f7047e..d3e04e8a67 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/quit-group.mdx @@ -13,3 +13,7 @@ await quitGroup(groupID) ``` 群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。 + +Promise 成功表示退出请求完成,不等于群列表和成员事件已经到达。当前用户退出后,按 `groupID` 清理群聊天入口、成员分页和发送权限;其他成员仍保留群组。 + +群主转让与退出应串行执行:先确认新群主事件或重新查询结果,再调用退出。失败时保留聊天与群状态,不要仅因用户点击确认就删除本地数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx index d796665b2e..56d7370b38 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx @@ -6,6 +6,15 @@ sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-group-member-list' `getGroupMemberList()` 按过滤条件分页读取成员。本页归属三个成员事件。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群 ID。 | +| `filter` | `number` | 是 | 服务端定义的成员过滤值;不要用 UI 下标替代。 | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次读取成员数量。 | + ```uts import { getGroupMemberList, @@ -28,4 +37,28 @@ replaceMembers(result?.members ?? []) subscriptions.forEach((subscription) => off(subscription)) ``` -`filter` 使用服务端定义的成员过滤值。按 `groupID:userID` 去重;分页与事件并发时不要按数组位置更新。 +Promise 成功直接返回 `OpenIMGroupMemberListResult | null`,从 `members` 读取当前页。 + +### 群成员字段 + +| 字段 | 说明 | +| --- | --- | +| `groupID`、`userID` | 成员稳定标识,组合为 `groupID:userID`。 | +| `nickname`、`faceURL` | 群内成员展示资料。 | +| `roleLevel` | 群主、管理员或普通成员角色值。 | +| `joinTime`、`joinSource`、`inviterUserID` | 入群时间、来源和邀请人。 | +| `muteEndTime` | 禁言结束时间;结合当前时间判断是否仍在禁言。 | +| `operatorUserID` | 最近相关操作人。 | +| `ex`、`attachedInfo` | 扩展信息,只按业务约定解析。 | + +群内昵称与用户账号昵称可以不同。成员列表使用成员对象展示,不要用 `getUsersInfo()` 返回的账号资料覆盖 `nickname`。角色和禁言状态也只属于该群,不能跨群复用。 + +分页时继续增加 offset,直到返回数量少于 count。成员加入、退出、被移除或角色变化会改变分页边界;事件到达时按主键合并,并在需要完整顺序时从 offset 0 重新查询。 + +## 监听成员变化 + +本页是 `onGroupMemberAdded`、`onGroupMemberDeleted` 和 `onGroupMemberInfoChanged` 的完整监听归属页。按 `groupID:userID` 新增、删除或替换;分页与事件并发时不要按数组位置更新。 + +成员变化可能影响权限、成员数和当前聊天页。删除事件若指向当前用户,应停止发送并刷新群列表;角色或禁言变化应重新计算可用操作。退出登录、切换账号或销毁成员 store 时逐个释放订阅句柄。 + +查询 Promise 成功只建立当前页快照,不触发成员事件。邀请、移除和资料修改操作则分别等待 Promise、成员事件或重新查询,不能把本地对象修改当作服务端确认。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx index 49fd578a70..faf236c1a2 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -4,15 +4,25 @@ description: '按用户 ID 列表批量读取指定群成员。' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info' --- -`getSpecifiedGroupMembersInfo()` 批量查询群内用户。 +`getSpecifiedGroupMembersInfo()` 批量查询指定用户在目标群组中的成员资料。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `userIDList` | `string[]` | 是 | 要查询的成员用户 ID。 | ```uts import { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk' const result = await getSpecifiedGroupMembersInfo({ groupID, - userIDList: ['user_a', 'user_b'], + userIDList, }) +const members = result?.members ?? [] ``` -结果可能少于输入,按 `userID` 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。 +Promise 成功后,`result?.members` 是匹配的 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。返回数组不保证与输入 ID 按位置一一对应;结果也可能少于输入,未返回用户可能不在群内或不可访问。 + +同一用户在不同群中的昵称、角色和禁言状态可能不同,应按 `groupID:userID` 缓存,不要使用普通用户资料替代群成员资料。查询不会触发成员事件;后续增量见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx index f3a0131ff5..f10d0fd497 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx @@ -4,17 +4,29 @@ description: '按用户 ID 或群昵称搜索群成员。' sourcePath: '/sdk/uniapp/group/retrieving-group-members/search-group-members' --- -`searchGroupMembers()` 在指定群内搜索。 +`searchGroupMembers()` 适合在指定群组中搜索成员或获取 @ 候选人。当前接口只使用 `keywordList` 的第一个关键词。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `keywordList` | `string[]` | 是 | 搜索关键词数组。 | +| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 | +| `isSearchMemberNickname` | `boolean` | 是 | 是否匹配群内昵称。 | ```uts import { searchGroupMembers } from '@/uni_modules/unix-openim-sdk' const result = await searchGroupMembers({ groupID, - keywordList: ['Alice'], + keywordList: [keyword.trim()], isSearchUserID: true, isSearchMemberNickname: true, }) +const members = result?.members ?? [] ``` -空关键词由 UI 拦截。结果按 `groupID:userID` 去重;它不是全局用户搜索。 +uni-app / uni-app x 接口没有 Wasm 版的 `offset` 和 `count` 参数,返回当前匹配结果。空关键词应由 UI 拦截,关键词变化时替换搜索快照。 + +Promise 成功后,`result?.members` 是匹配的 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。结果按 `groupID:userID` 去重,只用于当前关键词下的成员快照,不应替换完整成员列表;它也不是全局用户搜索。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx index 8b71600a51..bbc8bf92b6 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -6,6 +6,13 @@ sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page' `getJoinedGroupListPage()` 适合群数量较大的账号。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次读取的群数量。 | + ```uts import { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk' @@ -13,6 +20,35 @@ const result = await getJoinedGroupListPage({ offset: 0, count: 100 }) appendGroups(result?.groups ?? []) ``` -`offset` 从 0 开始,直到返回数量小于 `count`。分页期间群事件可能改变列表,应按 `groupID` 去重,而不是依赖页内位置。 +## 返回结果 + +Promise 成功直接返回 `OpenIMGroupListResult | null`,从 `groups` 读取当前页 `OpenIMGroupItem[]`。`offset` 从 0 开始,直到返回数量小于 `count`。 + +### 群资料字段 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `groupID` | `string` | 群稳定标识。 | +| `groupName` | `string` | 群名称。 | +| `notification` | `string` | 群公告。 | +| `introduction` | `string` | 群简介。 | +| `faceURL` | `string` | 群头像地址。 | +| `ownerUserID` | `string` | 当前群主用户 ID。 | +| `creatorUserID` | `string` | 群创建人用户 ID。 | +| `createTime` | `number` | 群创建时间。 | +| `memberCount` | `number` | 当前成员数快照。 | +| `status` | `number` | 群状态。 | +| `groupType` | `number` | 群类型。 | +| `needVerification` | `number` | 入群验证策略。 | +| `lookMemberInfo` | `number` | 普通成员查看成员资料的策略。 | +| `applyMemberFriend` | `number` | 群成员之间申请好友的策略。 | +| `notificationUpdateTime` | `number` | 群公告更新时间。 | +| `notificationUserID` | `string` | 最近更新群公告的用户 ID。 | +| `ex` | `string` | 群扩展字符串。 | +| `attachedInfo` 商业版字段 | `string` | 商业附加信息,只按已确认协议解析。 | + +`memberCount` 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见[群组概览](/sdk/uniapp/group/overview-group)。 + +分页期间群事件可能改变列表,应先把结果写入以 `groupID` 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。 -`displayIsRead` 和部分禁言扩展字段商业版,缺失时按可选值处理。 +第一页应替换当前账号快照,后续页按 `groupID` 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx index 4cabfe6fd9..8565ad3b9a 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx @@ -4,13 +4,19 @@ description: '按 groupID 列表批量查询群资料。' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-specified-groups-info' --- -`getSpecifiedGroupsInfo()` 批量查询群资料。 +群组查询只建立调用时的快照,不会触发群组事件。公开群发现、跨业务目录和复杂权限过滤应由业务后端提供;SDK 查询面向已知群组和当前账号已加入的群组。 + +`getSpecifiedGroupsInfo()` 接收群组 ID 数组: ```uts import { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk' -const result = await getSpecifiedGroupsInfo(['group_a', 'group_b']) +const result = await getSpecifiedGroupsInfo(groupIDs) const groups = result?.groups ?? [] ``` -结果不保证与输入顺序一致,按 `groupID` 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。 +读取单个群组时仍传数组,并检查 `groups[0]` 是否存在。群组没有 URL 或 slug 字段,业务路由应先解析为稳定的 `groupID`。 + +Promise 成功后,`result?.groups` 是匹配的 `OpenIMGroupItem[]`,字段含义见[分页获取已加入群组](/zh/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)。结果不保证与输入 ID 按位置一一对应,应按 `groupID` 合并;未返回群可能不存在、已解散或当前无权访问。大量 ID 应分批查询。 + +后续变化按 `groupID` 合并,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx index 740121b3ba..5ea681701f 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx @@ -4,16 +4,29 @@ description: '按群 ID 或群名称搜索本地群组。' sourcePath: '/sdk/uniapp/group/retrieving-groups/search-groups' --- -`searchGroups()` 搜索当前可见的群资料。 +`searchGroups()` 只搜索当前用户已加入且已经同步到本地的群组。当前接口只使用 `keywordList` 的第一个关键词。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | 是 | 搜索关键词数组;传一个去除首尾空格的非空关键词。 | +| `isSearchGroupID` | `boolean` | 是 | 是否匹配 `groupID`。 | +| `isSearchGroupName` | `boolean` | 是 | 是否匹配群名称。 | ```uts import { searchGroups } from '@/uni_modules/unix-openim-sdk' const result = await searchGroups({ - keywordList: ['项目'], + keywordList: [keyword.trim()], isSearchGroupID: true, isSearchGroupName: true, }) +const groups = result?.groups ?? [] ``` -空关键词由 UI 拦截。结果按 `groupID` 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。 +## 返回结果 + +Promise 成功后,`result?.groups` 是匹配的 `OpenIMGroupItem[]`,字段含义见[分页获取已加入群组](/zh/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)。空关键词应由 UI 拦截;结果按 `groupID` 去重,只建立当前关键词下的快照,不应覆盖完整的已加入群组列表。 + +公开群发现、复杂分类和权限过滤不属于该方法,应由业务后端实现。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx index 92709e6869..da236d91da 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-extension.mdx @@ -4,12 +4,22 @@ description: '通过 setGroupInfo 更新群组 ex。' sourcePath: '/sdk/uniapp/group/set-group-extension' --- -群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。 +群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。`ex` 是完整字符串,SDK 不会按 JSON 字段自动合并。 ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) }) +const previous = JSON.parse(group.ex || '{}') + +await setGroupInfo({ + groupID, + ex: JSON.stringify({ + ...previous, + projectID: 'project-42', + }), +}) ``` -`ex` 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。 +多个模块共用时,应划分稳定命名空间,并在写入前保留其他模块的数据。解析失败时不要覆盖原值;扩展数据对有权读取群资料的成员可见,不要存放秘密。 + +Promise 成功后,通过 `onGroupInfoChanged` 按 `groupID` 合并最新群资料;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx index 2604994b1d..73a2bdaad5 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx @@ -4,7 +4,7 @@ description: '设置群成员加入时的验证策略。' sourcePath: '/sdk/uniapp/group/set-group-join-verification' --- -通过 `setGroupInfo()` 的 `needVerification` 更新入群验证策略。 +通过 `setGroupInfo()` 的 `needVerification` 更新申请和邀请用户加入群组时的验证策略。 ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,12 @@ import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, needVerification: 1 }) ``` -使用 `OpenIMGroupNeedVerification` 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。 +| `needVerification` | 含义 | +| --- | --- | +| `0` | 用户申请需要审核;群成员邀请可直接入群。 | +| `1` | 申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | +| `2` | 申请或邀请均可直接入群。 | + +`OpenIMGroupNeedVerification` 的类型范围是 `0 | 1 | 2`。客户端应根据该策略展示申请提示,但最终是否允许加入仍由 OpenIMServer 判断。策略只影响后续申请;已有申请和成员不会自动重新处理。 + +Promise 成功后,通过 `onGroupInfoChanged` 合并最新群资料,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx index 37206930fc..2b18951d00 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx @@ -4,7 +4,7 @@ description: '控制群成员之间是否可以发起好友申请。' sourcePath: '/sdk/uniapp/group/set-group-member-friend-permission' --- -通过 `setGroupInfo()` 的 `applyMemberFriend` 更新群成员加好友策略。 +通过 `setGroupInfo()` 的 `applyMemberFriend` 控制群成员能否通过群组向其他成员发送好友申请。 ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,11 @@ import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, applyMemberFriend: 1 }) ``` -使用 `OpenIMGroupOption` 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。 +| `applyMemberFriend` | 含义 | +| --- | --- | +| `0` | 允许通过群成员关系发起好友申请。 | +| `1` | 不允许通过群成员关系发起好友申请。 | + +`OpenIMGroupOption` 的类型范围是 `0 | 1`。该字段只控制从群成员关系发起好友申请的入口,不等同于隐藏成员资料。设置由服务端执行,客户端 UI 不是安全边界。 + +Promise 成功表示设置请求完成。最新状态通过 `onGroupInfoChanged` 按 `groupID` 合并,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx index 8508dac994..5622fdb130 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx @@ -4,7 +4,7 @@ description: '控制群成员是否可以查看其他成员资料。' sourcePath: '/sdk/uniapp/group/set-group-member-profile-access' --- -通过 `setGroupInfo()` 的 `lookMemberInfo` 设置群成员资料可见策略。 +`lookMemberInfo` 控制群成员能否通过群组查看其他成员资料。 ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' @@ -12,4 +12,11 @@ import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, lookMemberInfo: 1 }) ``` -使用 `OpenIMGroupOption` 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。 +| `lookMemberInfo` | 含义 | +| --- | --- | +| `0` | 允许成员查看其他成员资料。 | +| `1` | 不允许成员查看其他成员资料。 | + +`OpenIMGroupOption` 的类型范围是 `0 | 1`。不要把这组值当作常见的布尔型 `0 = false、1 = true`。 + +该设置与“是否允许通过群组添加好友”相互独立,也不替代业务后端的隐私与权限校验。Promise 成功后,通过 `onGroupInfoChanged` 合并最新群资料,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx index f916b3344c..7ebfc05573 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -4,19 +4,32 @@ description: '通过 setGroupInfo 更新群名、公告、介绍、头像和策 sourcePath: '/sdk/uniapp/group/update-group-profile' --- -`setGroupInfo()` 只更新提供的可选字段。 +群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `groupID` | `string` | 是 | 要更新的群组 ID。 | +| `groupName` | `string \| null` | 否 | 新群名称。 | +| `introduction` | `string \| null` | 否 | 新群简介。 | +| `faceURL` | `string \| null` | 否 | 新群头像地址。 | + +除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, - groupName: '新的群名', - introduction: '项目协作群', - faceURL: 'https://cdn.example.com/group.png', + groupName: groupName.trim(), + introduction: introduction.trim(), + faceURL, }) ``` -群主和管理员权限由服务端校验。Promise 成功后通过 `onGroupInfoChanged` 或重新查询刷新,不直接覆盖未提交字段。 +不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 + +Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。 `displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx index 7760e6ba1c..16ddb30bc5 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -12,4 +12,16 @@ import { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk' const capabilities = await getSpeechToTextCapabilities() ``` -在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。 +Promise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `format` | `string[] \| null` | 支持的音频格式。 | +| `sampleRateHz` | `number[] \| null` | 支持的音频采样率,单位为赫兹。 | +| `maxRecordTimeMs` | `number \| null` | 最大录音时长,单位为毫秒。 | +| `maxFileSize` | `number \| null` | 最大文件大小,单位为字节。 | +| `provider` | `string \| null` | 当前语音识别服务提供方。 | +| `requestType` | `string \| null` | 服务端要求的请求类型。 | +| `crossDomain` | `boolean \| null` | 是否允许跨域处理。 | + +在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx index 68f0f10572..f89aa1d5bb 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx @@ -4,12 +4,18 @@ description: '商业版提交音频文件名和数据进行语音转写。' sourcePath: '/sdk/uniapp/message/composing-messages/transcribe-audio' --- -`speechToText()` 商业版 使用文件名和音频数据。 +`speechToText()` 商业版 使用文件名和音频数据。原生文件不能直接作为 UTS 跨层参数,需按商业服务协议编码为字符串再提交。 ```uts import { speechToText } from '@/uni_modules/unix-openim-sdk' -const result = await speechToText({ filename: 'voice.m4a', data: audioBase64 }) +const result = await speechToText({ + filename: 'voice.m4a', + data: audioBase64, +}) +if (result?.text != null) setTranscript(result.text) ``` -先检查能力,限制音频大小和格式。`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。 +Promise 成功返回 `OpenIMSpeechToTextResult | null`,其中 `text` 是可选的识别文本。调用前先[查询语音识别能力](/zh/sdk/uniapp/message/composing-messages/check-speech-to-text),限制音频大小、格式、采样率和时长。 + +`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写不会自动修改原语音消息,也不触发消息事件。转写结果需要用户确认,不用于高风险自动决策;需要本地保存结果时见[保存语音转写结果](/zh/sdk/uniapp/message/composing-messages/save-local-transcript)。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx index d833599919..d650d727e2 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -4,17 +4,26 @@ description: '使用 OpenIMCardElem 创建用户名片消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' --- -`createCardMessage()` 接收 `OpenIMCardElem`。 +## 参数说明 + +`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: + +| 参数 | 类型 | 建议 | 说明 | +| --- | --- | --- | --- | +| `userID` | `string \| null` | 必填 | 名片对应的用户 ID。 | +| `nickname` | `string \| null` | 必填 | 名片中保存的展示名称。 | +| `faceURL` | `string \| null` | 必填 | 名片中保存的头像地址。 | +| `ex` | `string \| null` | 必填 | 名片扩展信息;没有内容时传空字符串。 | ```uts import { createCardMessage } from '@/uni_modules/unix-openim-sdk' const message = await createCardMessage({ userID: 'user_b', - nickname: 'Alice', - faceURL: 'https://cdn.example.com/alice.png', + nickname: 'Alex', + faceURL: 'https://example.com/avatar.png', ex: '', }) ``` -名片是发送时快照,接收方点击后应按 `userID` 查询最新资料。不要把名片字段当作可信身份认证。 +Promise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx index c5d68c4c6a..e31d04e645 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx @@ -4,18 +4,30 @@ description: '创建业务自定义消息或带实体范围的高级文本。' sourcePath: '/sdk/uniapp/message/creating-messages/create-custom-message' --- -`createCustomMessage()` 用于双方已约定 schema 的业务载荷: +`createCustomMessage()` 适合订单、任务、邀请或投票等双方已约定 schema 的业务消息。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `data` | `string` | 是 | 业务载荷的完整字符串,通常保存序列化后的 JSON。 | +| `extension` | `string` | 是 | 业务扩展信息的完整字符串。 | +| `descriptionText` | `string` | 是 | 消息类型说明或不支持该类型时的降级展示文本。 | ```uts import { createCustomMessage } from '@/uni_modules/unix-openim-sdk' const message = await createCustomMessage({ - data: JSON.stringify({ orderID: 'order_123' }), - extension: '', - descriptionText: '订单卡片', + data: JSON.stringify({ type: 'task', taskID: 'task_42' }), + extension: JSON.stringify({ schemaVersion: 1 }), + descriptionText: '任务卡片', }) ``` -`data`、`extension`、`descriptionText` 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。 +`data` 是业务载荷,`extension` 是扩展信息,`descriptionText` 用于类型说明或降级展示。三者都会发给接收方,不能包含秘密;接收端应校验协议版本、大小和字段,再映射业务模型,不要执行不可信内容。 + +当前 uni-app / uni-app x 合同没有 Wasm 商业扩展中的 `searchText` 参数,不要传入该字段。Promise 成功只返回待发送的 `OpenIMMessageItem | null`;发送与自定义业务事件是不同链路。 + +## 高级文本消息 `createAdvancedTextMessage()` 使用 `OpenIMCreateAdvancedTextMessageParams` 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx index f95d6719bd..9afad33c5d 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -4,12 +4,30 @@ description: '使用已上传文件的 OpenIMFileElem 创建消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' --- -`createFileMessageByURL()` 接收 `OpenIMFileElem`。 +`createFileMessageByURL()` 使用已经上传的文件信息创建消息。 + +## 参数说明 + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `filePath` | `string \| null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `fileName` | `string \| null` | 对外展示的文件名。 | +| `uuid` | `string \| null` | 文件资源的唯一标识。 | +| `sourceUrl` | `string \| null` | 已上传文件的可访问地址。 | +| `fileSize` | `number \| null` | 文件大小,单位为字节。 | ```uts import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createFileMessageByURL(fileElem) +const message = await createFileMessageByURL({ + filePath: '', + fileName: 'report.pdf', + uuid: createBusinessUUID(), + sourceUrl: uploaded.url, + fileSize: uploaded.size, +}) ``` -文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。 +文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。 + +Promise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx index ce4d04bb17..e16ebdf1b7 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -4,12 +4,37 @@ description: '使用已上传图片的 elem 信息创建消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' --- -`createImageMessageByURL()` 适合图片已由业务上传并取得可访问 URL 的场景。 +`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 + +## 参数说明 + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `sourcePicture` | `OpenIMPicture \| null` | 原图信息。 | +| `bigPicture` | `OpenIMPicture \| null` | 大图信息。 | +| `snapshotPicture` | `OpenIMPicture \| null` | 缩略图信息。 | +| `sourcePath` | `string \| null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | + +三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。 ```uts import { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createImageMessageByURL(pictureElem) +const picture = { + uuid: createBusinessUUID(), + type: 'image/jpeg', + size: 120000, + width: 1280, + height: 720, + url: uploaded.url, +} + +const message = await createImageMessageByURL({ + sourcePicture: picture, + bigPicture: picture, + snapshotPicture: picture, + sourcePath: '', +}) ``` -`OpenIMPictureElem` 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。 +URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx index e5b1fa9f82..201b698bef 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx @@ -4,16 +4,22 @@ description: '使用经纬度和描述创建位置消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-location-message' --- -`createLocationMessage()` 使用描述、经度和纬度。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `descriptionText` | `string` | 是 | 位置名称或地址描述。 | +| `longitude` | `number` | 是 | 经度。 | +| `latitude` | `number` | 是 | 纬度。 | ```uts import { createLocationMessage } from '@/uni_modules/unix-openim-sdk' const message = await createLocationMessage({ - descriptionText: '会议室 A', - longitude: 121.47, - latitude: 31.23, + descriptionText: '上海市浦东新区', + longitude: 121.4737, + latitude: 31.2304, }) ``` -调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。 +业务层应在获得用户授权后获取定位,并根据产品隐私规则控制精度。位置属于敏感数据,发送前明确提示接收范围,不要在日志中记录精确坐标。Promise 成功只返回待发送的 `OpenIMMessageItem | null`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx index 36f505458b..ff0a336099 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx @@ -4,16 +4,22 @@ description: '把多条消息合并为摘要与消息列表。' sourcePath: '/sdk/uniapp/message/creating-messages/create-merger-message' --- -`createMergerMessage()` 使用标题、摘要和原消息列表创建合并转发。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `messageList` | `OpenIMMessageItem[]` | 是 | 要合并的已发送消息列表。 | +| `title` | `string` | 是 | 合并消息卡片标题。 | +| `abstractList` | `string[]` | 是 | 卡片摘要列表。 | ```uts import { createMergerMessage } from '@/uni_modules/unix-openim-sdk' const merger = await createMergerMessage({ messageList: selectedMessages, - title: '聊天记录', - abstractList: ['Alice: 方案已确认'], + title: '项目讨论记录', + abstractList: selectedMessages.slice(0, 4).map(buildSummary), }) ``` -摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。 +Promise 成功只返回新的待发送对象,不修改原消息。摘要由业务生成但不可与实际消息矛盾,应为无法解析的消息类型提供降级文本。转发前检查每条消息的可分享权限和敏感信息;大型列表还应限制条数与总大小。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx index 30d30257a5..ac423be968 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -4,12 +4,30 @@ description: '使用已上传音频的 OpenIMSoundElem 创建消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' --- -`createSoundMessageByURL()` 接收完整 `OpenIMSoundElem`。 +`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。 + +## 参数说明 + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `uuid` | `string \| null` | 音频资源的唯一标识。 | +| `soundPath` | `string \| null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `sourceUrl` | `string \| null` | 已上传音频的可访问地址。 | +| `dataSize` | `number \| null` | 音频大小,单位为字节。 | +| `duration` | `number \| null` | 音频时长,单位按服务端协议约定。 | ```uts import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createSoundMessageByURL(soundElem) +const message = await createSoundMessageByURL({ + uuid: createBusinessUUID(), + soundPath: '', + sourceUrl: uploaded.url, + dataSize: uploaded.size, + duration, +}) ``` -URL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。 +URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。 + +Promise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx index 452f3a419a..c5d5c5204b 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -4,19 +4,42 @@ description: '在群聊中创建带 @ 用户信息的文本消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' --- -`createTextAtMessage()` 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 | +| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 | +| `atUsersInfo` | `OpenIMAtUsersInfoItem[] \| null` | 否 | 用户 ID 与群内展示名信息。 | +| `quoteMessage` | `OpenIMMessageItem \| null` | 否 | 被引用的原消息。 | ```uts import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' const message = await createTextAtMessage({ - text: '@Alice 请确认', + text: '@user_a 请确认', atUserIDList: ['user_a'], - atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }], - quoteMessage: null, + atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }], }) ``` -字段以 `OpenIMCreateTextAtMessageParams` 为准,用户列表和显示信息保持一致。商业版 `getAtAllTag()` 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。 +Promise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。 + +## 提及全体成员 + +不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`: + +```uts +import { getAtAllTag } from '@/uni_modules/unix-openim-sdk' + +const atAllResult = await getAtAllTag() +const atAllTag = atAllResult?.tag +if (atAllTag != null) { + const message = await createTextAtMessage({ + text: `${atAllTag} 请查看群公告`, + atUserIDList: [atAllTag], + }) +} +``` -创建后仍需调用发送 API并填写目标群 ID。 +`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx index f9d46a3c91..7c6976a19e 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -4,12 +4,44 @@ description: '使用已上传视频和封面的 OpenIMVideoElem 创建消息。' sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' --- -`createVideoMessageByURL()` 接收 `OpenIMVideoElem`。 +`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。 + +## 参数说明 + +| 参数 | 类型 | 说明 | +| --- | --- | --- | +| `videoPath` | `string \| null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `duration` | `number \| null` | 视频时长。 | +| `videoType` | `string \| null` | 视频 MIME 类型。 | +| `videoUUID` | `string \| null` | 视频资源的唯一标识。 | +| `videoUrl` | `string \| null` | 已上传视频的可访问地址。 | +| `videoSize` | `number \| null` | 视频大小,单位为字节。 | +| `snapshotPath` | `string \| null` | 快照文件的本地名称或业务路径。 | +| `snapshotUUID` | `string \| null` | 快照资源的唯一标识。 | +| `snapshotSize` | `number \| null` | 快照大小,单位为字节。 | +| `snapshotUrl` | `string \| null` | 已上传快照的可访问地址。 | +| `snapshotWidth` | `number \| null` | 快照宽度,单位为像素。 | +| `snapshotHeight` | `number \| null` | 快照高度,单位为像素。 | ```uts import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createVideoMessageByURL(videoElem) +const message = await createVideoMessageByURL({ + videoPath: '', + duration, + videoType: uploadedVideo.contentType, + videoUUID: createBusinessUUID(), + videoUrl: uploadedVideo.url, + videoSize: uploadedVideo.size, + snapshotPath: '', + snapshotUUID: createBusinessUUID(), + snapshotSize: uploadedSnapshot.size, + snapshotUrl: uploadedSnapshot.url, + snapshotWidth, + snapshotHeight, +}) ``` -视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。 +视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。 + +Promise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx index 5e19e532a8..bfe3b055cf 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx @@ -4,7 +4,15 @@ description: '商业版批量删除消息,并处理 onMsgDeleted。' sourcePath: '/sdk/uniapp/message/managing-messages/delete-saved-messages' --- -`deleteMessages()` 商业版 批量删除明确指定的消息。本页归属公共 `onMsgDeleted` 事件。 +`deleteMessages()` 商业版 批量删除当前账号在同一会话中明确指定的消息。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要删除消息所在的会话 ID。 | +| `clientMsgIDs` | `string[]` | 是 | 要删除的消息 ID;同一批 ID 必须属于同一会话。 | +| `IsSync` | `boolean` | 是 | 是否把删除动作同步到当前账号的其他客户端;字段名首字母为大写。 | ```uts import { @@ -14,11 +22,21 @@ import { } from '@/uni_modules/unix-openim-sdk' const deletedSubscription = onMsgDeleted((message) => { - removeMessageByID(message.clientMsgID) + if (message == null) return + removeMessage(resolveConversationID(message), message.clientMsgID) }) -await deleteMessages(deleteParams) -off(deletedSubscription) +await deleteMessages({ + conversationID, + clientMsgIDs: selectedMessageIDs, + IsSync: true, +}) + +function removeMessageDeletedListener() { + off(deletedSubscription) +} ``` -`deleteParams` 使用锁定的 `OpenIMDeleteMessagesParams`,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。 +`IsSync: false` 删除当前设备及当前账号服务端记录;`true` 还请求把删除动作同步到其他客户端。它不会删除其他会话成员的副本,也不会产生撤回提示。 + +Promise 成功表示删除请求已经完成;同步开启时,这不代表其他客户端已经收到事件或完成界面更新。公共事件 `onMsgDeleted` 是本页归属事件,参数是 `OpenIMMessageItem | null`;结合消息路由确定会话后按 `clientMsgID` 幂等移除。组件卸载、退出登录或切换账号时调用 `removeMessageDeletedListener()`;需要校准时重新查询对应会话的历史消息。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx index 30177171a1..dbd1dbefc2 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx @@ -4,12 +4,22 @@ description: '把业务生成的消息插入群聊本地历史。' sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-group-message' --- -`insertGroupMessageToLocalStorage()` 只写本机群聊历史。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `message` | `OpenIMMessageItem` | 是 | 要写入本地数据库的完整消息对象。 | +| `groupID` | `string` | 是 | 目标群组 ID。 | +| `sendID` | `string` | 是 | 消息发送方的用户 ID。 | ```uts import { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' -await insertGroupMessageToLocalStorage(insertParams) +await insertGroupMessageToLocalStorage({ + message, + groupID, + sendID: currentUserID, +}) ``` -参数使用 `OpenIMInsertGroupMessageParams`,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。 +Promise 成功只修改当前设备的本地数据库,不发送给群成员,也不触发新消息事件。适合迁移或本地提示,不应用于伪造服务端已投递消息;需要服务端投递、离线推送或多端同步时使用发送 API。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx index 32a295e202..9ee9ed2578 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx @@ -4,12 +4,28 @@ description: '把业务生成的消息插入单聊本地历史。' sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-single-message' --- -`insertSingleMessageToLocalStorage()` 只写当前设备本地数据库,不发送给对方。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `message` | `OpenIMMessageItem` | 是 | 要写入本地数据库的完整消息对象。 | +| `recvID` | `string` | 是 | 单聊接收方的用户 ID。 | +| `sendID` | `string` | 是 | 消息发送方的用户 ID。 | ```uts -import { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' +import { + createTextMessage, + insertSingleMessageToLocalStorage, +} from '@/uni_modules/unix-openim-sdk' -await insertSingleMessageToLocalStorage(insertParams) +const message = await createTextMessage('本地提示') +if (message != null) { + await insertSingleMessageToLocalStorage({ + message, + recvID: targetUserID, + sendID: currentUserID, + }) +} ``` -`insertParams` 使用真实 `OpenIMInsertSingleMessageParams`,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。 +Promise 成功只表示当前设备本地数据库已写入,不发送消息,也不触发新消息事件。`createTextMessage()` 只是准备参数,其正文归属[创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)页面。该能力适合系统迁移或本地提示,不用于伪造已发送消息,并应确保消息 ID 不与现有记录冲突。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx index f8c1ac3c68..03d44656f5 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx @@ -4,7 +4,16 @@ description: '商业版修改消息,并处理 modified/edited raw 事件。' sourcePath: '/sdk/uniapp/message/managing-messages/modify-a-message' --- -`modifyMessage()`、`onMessageModified` 和 `onMessageEdited` 属于商业版。两个事件都是 raw 字符串。 +`modifyMessage()` 商业版 用于修改一条已存在消息的内容。它和[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)不同:删除影响当前账号可见性,撤回让会话成员看到撤回态,修改则替换消息内容并同步给其他客户端。 + +## 修改消息内容 + +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所属的会话 ID。 | +| `message` | `OpenIMMessageItem` | 是 | 修改后的完整消息对象;必须保留原 `clientMsgID`。 | ```uts import { @@ -17,9 +26,32 @@ import { const modifiedSubscription = onMessageModified((payload) => refreshModifiedMessage(payload)) const editedSubscription = onMessageEdited((payload) => refreshModifiedMessage(payload)) -const result = await modifyMessage(modifyParams) -off(modifiedSubscription) -off(editedSubscription) +const result = await modifyMessage({ + conversationID, + message: buildEditedMessage(message, editedText), +}) +if (result?.message != null) replaceMessage(result.message) + +function removeMessageModifiedListeners() { + off(modifiedSubscription) + off(editedSubscription) +} ``` -`modifyParams` 按 `OpenIMModifyMessageParams` 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。 +该方法不是局部更新。应从当前消息复制并只修改目标内容,保留 `clientMsgID` 和其他消息字段。允许修改的发送者、时间窗口和消息类型由 OpenIMServer 校验;失败时不要只在本地保留编辑结果。 + +## 返回结果 + +Promise 成功后,`result?.message` 是服务端确认的修改后 `OpenIMMessageItem | null`。调用端可先用返回值替换当前列表中的同 `clientMsgID` 消息;这不代表所有端界面已经更新。 + +## 监听消息修改 + +`onMessageModified` 和 `onMessageEdited` 都属于商业版,参数是 raw JSON 字符串。部署可能按版本使用其中一种,若同时监听必须按稳定消息 ID 和版本去重。先验证 JSON,再查询或替换消息;不要记录完整正文。组件卸载、退出登录或切换账号时调用 `removeMessageModifiedListeners()`,多端编辑按服务端最终版本解决冲突。 + +## 相关页面 + +- [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages) +- [撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message) +- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message) +- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id) +- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx index 42c1eef83b..8795a3b939 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx @@ -4,7 +4,11 @@ description: '撤回指定消息,并处理消息撤回事件。' sourcePath: '/sdk/uniapp/message/managing-messages/revoke-a-message' --- -`revokeMessage()` 使用会话和客户端消息 ID。 +如果界面需要让其他会话成员看到“消息已撤回”,使用 `revokeMessage()`,不要用普通删除替代。删除只影响当前账号侧可见性,见[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)。修改已发送消息内容见[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)。 + +## 撤回一条消息 + +`revokeMessage()` 接收消息所在的 `conversationID` 和目标 `clientMsgID`: ```uts import { @@ -13,9 +17,35 @@ import { revokeMessage, } from '@/uni_modules/unix-openim-sdk' -const revokedSubscription = onNewRecvMessageRevoked((info) => mergeRevokedInfo(info)) +const revokedSubscription = onNewRecvMessageRevoked((info) => { + if (info == null) return + markMessageRevoked(info.clientMsgID, info) +}) await revokeMessage({ conversationID, clientMsgID }) -off(revokedSubscription) + +function removeRevokeListener() { + off(revokedSubscription) +} ``` -服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。 +Promise 成功后,调用端可以先把当前列表中的同 `clientMsgID` 消息更新为撤回态。在线客户端随后通过 `onNewRecvMessageRevoked` 收到撤回信息,接收端应更新对应气泡,而不是直接从列表中删除。 + +允许撤回的发送者、时间窗口和消息类型由 OpenIMServer 校验;调用失败时不要只在本地保留撤回展示。Promise 成功代表当前请求已完成,不代表所有端界面已经更新。 + +## 返回结果 + +`revokeMessage()` 成功直接返回字符串结果,不返回被撤回消息对象。调用端继续使用请求中的 `clientMsgID` 更新本地气泡,并以撤回事件校准其他客户端状态。 + +## 监听撤回事件 + +本页是 `onNewRecvMessageRevoked` 的完整监听示例归属页。事件参数是 `OpenIMMessageRevokedItem | null`,使用 `clientMsgID` 合并;`isAdminRevoke` 表示是否由管理员撤回,可用于选择系统提示文案。事件可能先于 Promise 到达,处理必须幂等。 + +组件卸载、退出登录或切换账号时调用 `removeRevokeListener()`;重新登录后的撤回变化由消息事件同步。 + +## 相关页面 + +- [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages) +- [修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message) +- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message) +- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id) +- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx index e9e16ded54..779a38e7e5 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx @@ -4,12 +4,24 @@ description: '更新一条消息在当前设备的 localEx。' sourcePath: '/sdk/uniapp/message/managing-messages/set-message-local-ex' --- -`setMessageLocalEx()` 使用会话和消息 ID 更新本地扩展。 +`localEx` 只保存在当前客户端,适合折叠、选中或本地来源标记,不会同步给其他用户或设备。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 目标消息所在的会话 ID。 | +| `clientMsgID` | `string` | 是 | 目标消息 ID。 | +| `localEx` | `string` | 是 | 要写入的完整字符串。 | ```uts import { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk' -await setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) }) +await setMessageLocalEx({ + conversationID, + clientMsgID, + localEx: JSON.stringify({ selected: true }), +}) ``` -`localEx` 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。 +Promise 成功表示本地数据已更新。该方法不会自动合并旧 JSON,也不会触发共享消息事件;需要保留旧字段时先在业务层合并,并限制大小。不要在 `localEx` 中存放 Token 或不可恢复的重要业务数据。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx index 2ad7923090..bcb7a42946 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx @@ -6,6 +6,14 @@ sourcePath: '/sdk/uniapp/message/managing-messages/set-message-pinned' `setConversationPinnedMsg()` 与 `onChangedPinnedMsg` 属于商业版。 +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 消息所在的会话 ID。 | +| `clientMsgID` | `string` | 是 | 要置顶或取消置顶的消息 ID。 | +| `pinned` | `boolean` | 是 | `true` 表示置顶,`false` 表示取消置顶。 | + ```uts import { off, @@ -16,8 +24,17 @@ import { const pinnedSubscription = onChangedPinnedMsg((payload) => { refreshPinnedMessagesAfterValidJson(payload) }) -await setConversationPinnedMsg(pinParams) -off(pinnedSubscription) +await setConversationPinnedMsg({ + conversationID, + clientMsgID: message.clientMsgID, + pinned: true, +}) + +function removePinnedListener() { + off(pinnedSubscription) +} ``` -参数使用 `OpenIMSetConversationPinnedMsgParams`。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。 +权限、消息类型和数量限制由 OpenIMServer 校验。Promise 成功表示置顶请求已完成,不表示变化事件已经到达。 + +本页唯一归属 `onChangedPinnedMsg`。事件是 raw JSON 字符串,应先校验,再按 `conversationID` 替换置顶集合并按消息 `clientMsgID` 去重;不要把未验证 payload 强转为消息对象。组件卸载、退出登录或切换账号时调用 `removePinnedListener()`。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx index e0544166a9..5ef93a612c 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx @@ -4,12 +4,31 @@ description: '商业版分页查询读过指定群消息的成员。' sourcePath: '/sdk/uniapp/message/managing-read-status/get-group-message-readers' --- -`getGroupMessageReaderList()` 商业版 使用 `OpenIMGetGroupMessageReaderListParams` 查询。 +`getGroupMessageReaderList()` 商业版 分页查询指定群消息的已读或未读成员。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 群聊会话 ID。 | +| `clientMsgID` | `string` | 是 | 要查询阅读成员的消息 ID。 | +| `filter` | `number` | 是 | `0` 查询已读成员,`1` 查询未读成员。 | +| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 | +| `count` | `number` | 是 | 本次请求的成员数量。 | ```uts import { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk' -const result = await getGroupMessageReaderList(readerParams) +const result = await getGroupMessageReaderList({ + conversationID, + clientMsgID, + filter: 0, + offset: 0, + count: 50, +}) +const readers = result?.readers ?? [] ``` -按返回 DTO 的分页字段继续加载,并按 `userID` 去重。已读成员数据可能随新回执变化,打开详情时重新查询。 +Promise 成功后,`result?.readers` 是当前页 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。按 `groupID:userID` 去重,需要完整列表时继续增加 `offset` 分页。 + +查询建立调用时快照,不触发回执事件。已读成员数据可能随新回执变化,打开详情时应重新查询。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx index df195bd9db..5abb1ffca9 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx @@ -13,9 +13,22 @@ import { sendGroupMessageReadReceipt, } from '@/uni_modules/unix-openim-sdk' -const receiptSubscription = onRecvGroupReadReceipt((payload) => refreshReadState(payload)) -await sendGroupMessageReadReceipt(receiptParams) -off(receiptSubscription) +const receiptSubscription = onRecvGroupReadReceipt((payload) => { + mergeValidatedGroupReadReceipt(payload) +}) + +await sendGroupMessageReadReceipt({ + conversationID, + clientMsgIDs: visibleUnreadMessageIDs, +}) + +function removeGroupReadReceiptListener() { + off(receiptSubscription) +} ``` -参数使用 `OpenIMSendGroupMessageReadReceiptParams`。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。 +同一批消息必须属于目标群会话。Promise 成功只表示服务端接受上报,不等于其他客户端界面已更新;会话未读数仍由 `markConversationMessageAsRead()` 独立维护。 + +其他客户端通过 raw JSON 事件 `onRecvGroupReadReceipt` 接收群聊成员级已读变化。本页是该事件的完整监听归属页;先校验 JSON,再按 `conversationID + clientMsgID` 合并消息的已读计数、未读计数和成员信息。组件卸载、退出登录或切换账号时调用 `removeGroupReadReceiptListener()`。 + +上报 Promise、群回执事件和[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers)得到的成员快照是三个独立阶段。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx index ed8544a2b6..e67d1ec681 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -4,9 +4,60 @@ description: '理解消息创建、发送、接收、历史、状态和进度事 sourcePath: '/sdk/uniapp/message/overview-message' --- -OpenIM 消息以 `clientMsgID` 作为客户端稳定标识,服务端消息还包含 `serverMsgID`、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表。 +uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 -创建消息只生成 `OpenIMMessageItem`,不会发送;随后调用 `sendMessage()` 指定 `recvID` 或 `groupID`。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。 +接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。 + +## 消息处理流程 + +| 阶段 | 主要操作 | 说明 | +| --- | --- | --- | +| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 | +| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 | +| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 | +| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | +| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | + +从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。 + +## OpenIMMessageItem 返回结构 + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `clientMsgID` | `string \| null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | +| `serverMsgID` | `string \| null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 | +| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 | +| `sendID`、`recvID`、`groupID` | `string \| null` | 发送者及单聊/群聊路由字段。 | +| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 | +| `createTime`、`sendTime` | `number` | 创建和发送时间。 | +| `seq` | `number` | 服务端消息序号。 | +| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 | +| `senderNickname`、`senderFaceUrl` | `string \| null` | 发送者资料快照。 | +| `status` | `OpenIMMessageStatus` | 当前发送状态。 | +| `isRead` | `boolean` | 当前已读状态快照。 | +| `offlinePush` | `OpenIMOfflinePush \| null` | 发送时的离线推送配置。 | +| `content`、`attachedInfo` | `string \| null` | SDK 序列化内容和附加信息。 | +| `ex` | `string \| null` | 随消息同步的扩展字符串。 | +| `localEx` | `string \| null` | 只保存在当前设备的扩展字符串。 | + +消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。 + +`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。 + +## 创建不同内容的消息 + +| 内容 | 页面 | 注意事项 | +| --- | --- | --- | +| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 | +| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 | +| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | +| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 | +| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 | +| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 | + +只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。 + +## 进度事件 本页归属发送、文件上传和日志上传进度事件: @@ -28,9 +79,29 @@ const subscriptions : Array = [ onUploadLogsProgress((event) => updateLogUpload(event.progress)), ] -subscriptions.forEach((subscription) => off(subscription)) +function removeProgressListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。 +进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。 文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。 + +## 按任务查找页面 + +| 任务 | 页面 | +| --- | --- | +| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) | +| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) | +| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) | +| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) | +| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) | +| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) | +| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) | + +## 状态同步边界 + +新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 + +会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx index 87767f3bfa..cea3f8575b 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx @@ -4,7 +4,46 @@ description: '订阅单条、批量、离线和只在线消息事件。' sourcePath: '/sdk/uniapp/message/receiving-messages/receive-messages' --- -不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 `conversationID:clientMsgID` 去重。 +消息页通常同时处理实时新消息、应用进入后台后到达的离线消息、只在线投递的消息,以及首次进入会话时主动读取的历史消息。事件提供增量,历史 API 按 `conversationID` 建立快照。 + +不同 Core 版本或恢复路径可能使用单条或批量事件。为保证完整性,可以同时订阅五个入口,但必须按 `conversationID:clientMsgID` 去重。在组件卸载、退出登录或切换账号前使用订阅句柄调用 `off()`,避免同一批消息被重复合并。 + +## 消息类型 + +每条 `OpenIMMessageItem` 根据 `contentType` 和对应 elem 选择渲染方式:文本读取 `textElem`,@ 文本读取 `atTextElem`,自定义消息读取 `customElem`,图片、音频、视频和文件分别读取对应媒体 elem。未知类型应显示降级内容,而不是执行未校验的 `content`。 + +```uts +function renderMessage(message : OpenIMMessageItem) { + if (message.textElem != null) return renderTextMessage(message) + if (message.atTextElem != null) return renderMentionMessage(message) + if (message.customElem != null) return renderCustomMessage(message) + if ( + message.pictureElem != null || + message.soundElem != null || + message.videoElem != null || + message.fileElem != null + ) { + return renderFileLikeMessage(message) + } + return renderUnsupportedMessage(message) +} +``` + +消息事件可能包含当前用户没有打开的会话。`OpenIMMessageItem` 不直接提供 `conversationID`;应根据 `sessionType`、`sendID`、`recvID` 和 `groupID` 计算或查询目标会话,再按 `clientMsgID` 去重。 + +```uts +function mergeMessage(message : OpenIMMessageItem) { + const targetConversationID = getConversationIDForMessage(message) + if (targetConversationID.length == 0) return + mergeMessageByClientMsgID(targetConversationID, message) +} +``` + +### 图片、音频、视频和文件消息 + +接收端无需重新上传文件,只需读取消息中已有的资源地址、大小、名称、时长或快照图并展示。如果产品一次发送多个文件,通常连续发送多条文件消息,或用一条经过版本校验的自定义消息承载文件组;每条消息仍以 `clientMsgID` 作为稳定标识。 + +## 事件处理器 ```uts import { @@ -14,19 +53,67 @@ import { onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage, + type OpenIMMessageItem, type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const newMessageSubscription = onRecvNewMessage((message) => mergeMessage(message)) +const newMessageSubscription = onRecvNewMessage((message) => { + if (message != null) mergeMessage(message) +}) const subscriptions : Array = [ newMessageSubscription, - onRecvOfflineNewMessage((message) => mergeMessage(message)), - onRecvOnlineOnlyMessage((message) => mergeOnlineOnlyMessage(message)), - onRecvNewMessages((result) => result.messages.forEach(mergeMessage)), - onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)), + onRecvOfflineNewMessage((message) => { + if (message != null) mergeMessage(message) + }), + onRecvOnlineOnlyMessage((message) => { + if (message != null) mergeOnlineOnlyMessage(message) + }), + onRecvNewMessages((result) => { + if (result != null) result.messages.forEach(mergeMessage) + }), + onRecvOfflineNewMessages((result) => { + if (result != null) result.messages.forEach(mergeMessage) + }), ] -subscriptions.forEach((subscription) => off(subscription)) +function removeMessageListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。 +`onRecvNewMessages` 和 `onRecvOfflineNewMessages` 返回 `OpenIMMessageListResult | null`,其中 `messages` 是数组;三个单条事件返回 `OpenIMMessageItem | null`。单数和复数入口可能描述同一消息,所以不能按事件次数插入。 + +调用 `setAppBackgroundStatus(true)` 后到达的消息通常走离线入口;回到前台时再设置为 `false`。离线消息与实时消息复用同一个合并函数,筛选当前会话、按 `clientMsgID` 去重并保持时间顺序。 + +只在线消息由发送方设置 `isOnlineOnly: true`。它不会进入 SDK 本地消息存储,也不能通过历史接口回放,通常只适合临时提示或业务通知;是否加入当前界面由产品规则决定,不应把它当作可靠聊天记录。 + +本页是五个接收事件的完整归属页。先根据消息路由字段确定会话,再用“目标会话 + `clientMsgID`”幂等合并。不要在多个页面重复注册同一组全局事件,推荐由消息 store 统一持有;状态层销毁时调用 `removeMessageListeners()`。 + +撤回消息通过 `onNewRecvMessageRevoked` 更新为撤回态,处理见[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)。 + +## 首次进入会话时读取历史 + +事件只负责新到达的消息。首次进入会话、向上翻页或需要补齐断线期间的列表时,应另外读取历史快照,参数和返回结构见[加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)。历史结果和事件可能包含同一条消息,两条路径必须使用相同的去重规则。 + +如果事件注册在全局消息状态层,不要在每次进入同一个聊天页面时重复注册。需要显示当前会话历史时,只读取该会话的边界快照;重新登录后的消息变化由新的登录作用域事件同步,不要把事件到达视为某次历史查询的完成回调。 + +## 将群聊会话标记为已读 + +用户进入群聊并看到最新消息后,可以清理会话未读数。这个操作不等同于群消息成员级已读回执,调用方式见[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)。会话列表和总未读角标分别由会话域事件最终同步。 + +## 验证接收流程 + +- 用另一个已登录账号向目标会话发送消息,确认前台入口收到且列表只渲染一次。 +- 设置后台状态后再次发送,确认离线入口合并;回到前台后恢复状态。 +- 发送只在线消息,确认它不会进入本地历史。 +- 撤回一条消息,确认对应 `clientMsgID` 更新为撤回态。 +- 标记会话已读,确认会话未读数和总角标随事件更新。 + +测试单条和批量入口时,只断言每个 `clientMsgID` 最终出现一次,不应要求固定使用某一个入口。后台恢复测试还应确认前后台状态调用成对执行,退出账号后旧订阅不再改变新账号状态。 + +## 相关页面 + +- [消息概览](/zh/sdk/uniapp/message/overview-message) +- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message) +- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages) +- [标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read) diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx index 3df5609e3c..e887b8f99c 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx @@ -4,14 +4,27 @@ description: '在多个会话中按 clientMsgID 批量定位消息。' sourcePath: '/sdk/uniapp/message/retrieving-messages/find-messages-by-id' --- -`findMessageList()` 接收查询数组,每项包含会话 ID 与消息 ID 列表。 +搜索结果、引用消息或通知跳转应保存消息的 `conversationID` 和 `clientMsgID`,再用 `findMessageList()` 取回本地已经同步的消息。 + +## 参数说明 + +`findMessageList()` 接收查询条件数组,每一项结构如下: + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `items[].conversationID` | `string` | 是 | 目标消息所属的会话 ID。 | +| `items[].clientMsgIDList` | `string[]` | 是 | 要在该会话中查找的消息 ID。 | ```uts import { findMessageList } from '@/uni_modules/unix-openim-sdk' const result = await findMessageList([ - { conversationID, clientMsgIDList: ['msg_a', 'msg_b'] }, + { conversationID, clientMsgIDList: [clientMsgID] }, ]) + +const targetMessage = result?.findResultItems[0]?.messageList[0] ``` -返回 `OpenIMFindMessageResult`,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。 +Promise 成功后,结果是 `OpenIMFindMessageResult | null`,包含 `totalCount` 和 `findResultItems`。每个结果项提供 `conversationID`、`conversationType`、会话展示资料、`messageCount` 和 `messageList`。 + +一次调用可以包含多个会话条件。不要假设响应项与输入数组位置一致,应按结果的 `conversationID` 和消息的 `clientMsgID` 对应。缓存未同步、消息已删除或 ID 不存在时可能没有结果;查询不会触发消息事件。需要加载消息前后文时使用[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context)。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx index bcd261ad51..30d472405d 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx @@ -4,7 +4,16 @@ description: '商业版围绕一条锚点消息读取前后文。' sourcePath: '/sdk/uniapp/message/retrieving-messages/load-message-context' --- -`fetchSurroundingMessages()` 商业版 围绕完整锚点消息读取前后文。 +从搜索结果或引用消息跳入聊天上下文时,把已经取得的完整 `OpenIMMessageItem` 作为锚点。`fetchSurroundingMessages()` 属于商业版。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `startMessage` | `OpenIMMessageItem` | 是 | 已经取得的锚点消息。 | +| `viewType` | `number` | 是 | 上下文查看方向,使用服务端约定值。 | +| `before` | `number` | 是 | 锚点之前最多读取的消息数量。 | +| `after` | `number` | 是 | 锚点之后最多读取的消息数量。 | ```uts import { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk' @@ -15,6 +24,9 @@ const result = await fetchSurroundingMessages({ before: 20, after: 20, }) +const surroundingMessages = result?.messages ?? [] ``` -`viewType` 使用产品/合同定义值。结果与实时事件可能重复,按 `clientMsgID` 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。 +Promise 成功后,`result?.messages` 是锚点前后取得的 `OpenIMMessageItem[]`,字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。当前 uni-app / uni-app x 返回字段名是 `messages`,不是 Wasm 的 `messageList`。 + +`before` 和 `after` 分别限制锚点前后的数量。返回结果可能少于请求总数,例如锚点靠近边界或部分消息已删除。结果与实时事件可能重复,应按 `conversationID:clientMsgID` 去重并保持时间顺序。不要使用只包含 ID 的伪消息作为锚点;需要先定位时见[按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx index 53d1a7ea83..983bb94ea5 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -4,18 +4,40 @@ description: '按会话和 clientMsgID 游标读取历史消息。' sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' --- -公共入口 `getAdvancedHistoryMessageList()` 读取历史: +聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 | +| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 | +| `count` | `number` | 是 | 本次读取的消息数量。 | +| `lastMinSeq` | `number \| null` | 否 | 上一页返回的最小序号,用于连续分页。 | ```uts import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' const page = await getAdvancedHistoryMessageList({ conversationID, - startClientMsgID: '', - count: 50, + startClientMsgID: oldestMessage?.clientMsgID ?? '', + count: 30, + lastMinSeq, }) ``` -第一页用空 `startClientMsgID`,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 `clientMsgID` 去重。 +## 返回结果 + +Promise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 | +| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 | +| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 | +| `errCode` | `number` | 历史读取结果状态码。 | +| `errMsg` | `string` | 与状态码对应的说明。 | + +只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。 -商业版 `getHistoryMessageList()` 商业版 额外支持 `isReverse`、`viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。 +商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx index 0b7aa159fe..4e17c9c650 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -4,22 +4,129 @@ description: '按关键词、发送者、类型和时间范围搜索消息。' sourcePath: '/sdk/uniapp/message/searching-messages/search-messages' --- -`searchLocalMessages()` 在 SDK 本地数据中搜索。 +`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。 + +搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。 + +## 创建搜索查询 + +`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 ```uts -import { searchLocalMessages } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMMessageTypeAtText, + OpenIMMessageTypeText, + searchLocalMessages, + type OpenIMMessageItem, + type OpenIMSearchMessageResult, +} from '@/uni_modules/unix-openim-sdk' const result = await searchLocalMessages({ conversationID, - keywordList: ['发布'], + keywordList: [keyword.trim()], keywordListMatchType: 0, senderUserIDList: [], - messageTypeList: [], + messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText], searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, - count: 50, + count: 20, +}) +``` + +## 高级搜索 + +可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。 + +```uts +const result = await searchLocalMessages({ + conversationID, + keywordList: ['release'], + keywordListMatchType: 0, + senderUserIDList: [senderUserID], + messageTypeList: [OpenIMMessageTypeText], + searchTimePosition, + searchTimePeriod, + pageIndex: 1, + count: 20, }) ``` -匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。 +### 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `conversationID` | `string \| null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | +| `keywordList` | `string[]` | 是 | 关键词列表。 | +| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | +| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | +| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 | +| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | +| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | +| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 | +| `count` | `number` | 是 | 每页返回数量。 | + +如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。 + +## 处理分页结果 + +Promise 成功后,结果是 `OpenIMSearchMessageResult | null`: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `totalCount` | `number` | 当前条件下匹配的消息总数。 | +| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 | + +每个结果项包含: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `conversationID` | `string` | 结果所属会话 ID。 | +| `conversationType` | `OpenIMSessionType` | 会话类型。 | +| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 | +| `latestMsgSendTime` | `number \| null` | 当前结果会话的最新消息时间。 | +| `messageCount` | `number` | 当前结果项的匹配消息数量。 | +| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 | + +可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: + +```uts +type SearchMessageRow = { + conversationID : string + clientMsgID : string + message : OpenIMMessageItem +} + +function toSearchRows(result : OpenIMSearchMessageResult) : Array { + const rows : Array = [] + result.searchResultItems.forEach((item) => { + item.messageList.forEach((message) => { + const clientMsgID = message.clientMsgID + if (clientMsgID != null) { + rows.push({ + conversationID: item.conversationID, + clientMsgID, + message, + }) + } + }) + }) + return rows +} +``` + +分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。 + +## 处理搜索结果变化 + +命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。 + +跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。 + +需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 + +## 相关页面 + +- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id) +- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages) +- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx index 7b96271f9e..a81ffe3182 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -4,12 +4,28 @@ description: '发送已经准备好远端资源信息的消息。' sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' --- -`sendMessageNotOss()` 与 `sendMessage()` 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。 +`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 + +## 参数说明 + +| 参数 | 类型 | 是否必填 | 说明 | +| --- | --- | --- | --- | +| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | +| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | +| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | +| `offlinePushInfo` | `OpenIMOfflinePush \| null` | 否 | 离线推送标题、描述和平台配置。 | +| `isOnlineOnly` | `boolean \| null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | ```uts import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' -const sent = await sendMessageNotOss({ message, recvID, groupID }) +const sentMessage = await sendMessageNotOss({ + recvID: receiverUserID, + groupID: '', + message: urlMessage, +}) ``` -只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 `sendMessage()`。 +资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。 + +该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。 diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 564b07e20e..419d2dfc68 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4202,10 +4202,10 @@ { "path": "/sdk/uniapp/getting-started/environment-specific-implementation", "title": "按宿主和平台接入", - "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。", + "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的调用、生命周期和原生构建边界。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started environment-specific-implementation", - "content": "unix openim sdk 的业务函数在 uni app 与 uni app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。 支持矩阵 | 宿主 | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 | | uni app x | API 21+ | iOS 14+ | 商业版 API 24 | | H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 | uni app 传统 uni app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。 import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus // 应用 service 销毁时执行。 off connectSubscription uni app x uni app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。 import getLoginStatus, type OpenIMLoginStatus, from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus 解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 UTSJSONObject 强制转换成业务 DTO。 Android 与 iOS Android 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。 文件消息使用本机可读的完整路径。 unifile:// 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。 HarmonyOS HarmonyOS 仅声明 uni app x 商业版支持。当前以下操作会稳定返回 platform unsupported : updateFcmToken 、 updateToken 、 translateText 、 translateMessage 。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见 事件概览 /sdk/uniapp/events/overview events 。 平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。 生命周期归属 SDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 unInitSDK 。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。" + "content": "unix openim sdk 的业务函数在 uni app 与 uni app x 中保持一致,差异主要发生在语言类型、页面生命周期、文件路径和原生构建方式。所有宿主都从同一个插件根路径扁平导入,且共享宿主进程中唯一的 OpenIM Core。 支持矩阵 | 宿主 | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 | | uni app x | API 21+ | iOS 14+ | 商业版 API 24 | | Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 | 接入和本地编译使用 HBuilderX/uni app 5.23 系列。公共与商业能力是否可用还取决于所安装的插件版本、原生制品和 OpenIMServer 部署,不能只根据宿主名称判断。 使用统一插件入口 uni app 和 uni app x 都从 @/uni modules/unix openim sdk 导入。不要使用裸包名,也不要直接导入 utssdk/app android 、 app ios 或 HarmonyOS 实现。 import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' Promise 成功直接返回业务值,不读取 data ;事件返回 OpenIMSDKEventSubscription ,使用 off subscription 清理。 uni app Vue 2 / Vue 3 传统 uni app 页面可以在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的完整静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 初始化、登录和全局监听放在应用级 service 中,避免页面反复初始化。 import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus // 拥有监听的应用 service 销毁时执行。 off connectSubscription Vue 组件销毁只释放该组件或 service 拥有的订阅,不调用 unInitSDK 。若多个页面依赖同一事件,优先由 store 统一订阅并向页面分发状态。 uni app x uni app x 使用 UTS 类型。初始化参数、消息对象和事件 payload 应直接导入插件公开类型,不要复制一套会随 SDK 漂移的本地接口。 import getLoginStatus, type OpenIMLoginStatus, from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus UTS 的可空值需要显式处理。若返回类型是 OpenIMUserInfo | null 或结果包装中的数组可空,不要用不安全强制转换绕过合同。 商业信令事件返回 raw JSON 字符串。先确认字符串非空,再通过经过校验的 UTS JSON 解析读取已知字段;不要把未经校验的 UTSJSONObject 强制转换成完整业务 DTO。 App 生命周期 SDK Core 在 App 作用域只初始化一次。页面进入和退出只管理该页面拥有的订阅;用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。 前后台、网络、Badge 与推送状态应由 App 生命周期统一上报,不要让多个页面重复调用。完整示例见 处理 App 生命周期与设备状态 /sdk/uniapp/getting started/handle app lifecycle and device state 。 Android Android 最低 API 21。构建产物需要包含插件声明的 Maven/AAR 依赖和目标 ABI;标准基座没有这些原生制品,应使用包含插件的自定义基座或本地原生工程。 发布前至少检查: manifest merge 后的网络、通知和存储等权限符合产品需求。 每个目标 ABI 只有一套 OpenIM Core native library。 release/R8 构建没有 duplicate class、duplicate JNI 或反射裁剪问题。 真机可以访问 apiAddr / wsAddr ,后台恢复符合系统限制。 SDK 不会自动替业务申请相册、相机、麦克风或通知权限。普通 IM 功能按实际使用场景声明;AV Runtime 的媒体权限属于另一个插件边界。 iOS iOS 最低版本为 14。构建时需要正确链接、嵌入并签名插件 XCFramework;使用与插件版本匹配的 CocoaPods/Xcode 环境。 发布前在真机检查 framework slice、embed/sign、隐私清单、权限说明和 App Store 构建。模拟器通过不能替代 device arm64 链接。若宿主还安装其他原生插件,应扫描重复 framework 和同名 module。 SDK 日志和数据库位于应用沙盒中。不要把模拟器绝对路径写入业务配置,也不要直接移动或修改 Core 数据库。 HarmonyOS HarmonyOS 仅声明 uni app x 商业版支持,最低 API 24,并要求与插件合同一致的商业 HAR。 当前以下操作稳定返回 platform unsupported : updateFcmToken updateToken translateText translateMessage 十个不支持事件只返回 unsupported subscription,不会伪造回调,完整清单见 事件概览 /sdk/uniapp/events/overview events 。平台不支持不等于商业版鉴权失败;业务应按稳定错误区分能力缺失、登录状态、网络和服务端错误。 文件路径 图片、语音、视频和文件消息使用本机可读的完整路径。 unifile:// 、相册临时地址或页面沙盒虚拟路径应先通过 uni API 转换为原生 Core 可访问的本地路径。 不要把 HTTP URL 当作本地路径传给 by file / full path 创建接口。 确认临时文件在消息创建和上传完成前不会被系统清理。 iOS 与 Android 沙盒路径不同,不要把一个平台的绝对路径持久化后交给另一平台。 文件访问、相册和媒体权限由宿主申请并向用户解释。 对应消息页会分别说明 URL 创建与本地完整路径创建的区别。 本地构建与自定义基座 原生 UTS 插件必须进入原生编译。开发时可选择: 1. 使用 HBuilderX 5.23 构建包含插件的自定义基座。 2. 使用项目维护的 Android/iOS 本地原生工程完成编译、安装和自动化测试。 本地流程应锁定 HBuilderX、DCloud 原生 SDK、JDK/Android SDK、Xcode/CocoaPods 和插件版本,避免“开发机能跑但发布包使用另一套依赖”。标准基座只能用于不含该原生插件的页面,不能据此判断 SDK 能力。 共享 SDK service 建议在业务代码中封装一个 App 级 SDK service,统一负责初始化状态、当前登录用户、全局订阅句柄和销毁顺序。页面只调用这个 service 的业务方法并订阅应用状态,不自行决定 Core 是否需要重新初始化。 该 service 仍应暴露插件的真实 Promise 与错误语义:不要重新包装成 Wasm 的 data ,不要吞掉 platform unsupported ,也不要用 offAll 清理并非自己拥有的监听。切换账号时先停止旧账号写入,再等待 logout 、释放旧句柄、清空状态,最后登录新账号。 不适用范围 本插件不支持 Web、H5 和小程序。它依赖 Android、iOS 或 HarmonyOS 原生 Core、本地数据库和原生网络生命周期,不能通过条件编译把同一导入直接运行在浏览器。 若同一项目还有 H5 或小程序端,应在业务适配层选择相应 Web/Wasm/小程序 SDK,并分别管理初始化、登录、事件和存储,不要让两个 SDK 实例竞争同一 App 端登录状态。 验证与排查 在目标平台确认 initSDK 成功, login 后收到 onConnectSuccess 。 验证查询 API 直接返回业务值,事件句柄可以在异步使用后通过 off 清理。 真机验证网络断开恢复、前后台、被踢、Token 失效和重新登录。 文件消息在 release 包中使用真实相册/文件路径测试,不只验证固定沙盒样例。 商业 API 连接商业服务端;HarmonyOS 对不支持能力明确返回错误。 Android/iOS 最终安装包执行重复原生依赖、签名和 ABI/slice 扫描。 常见问题 | 现象 | 可能原因 | 处理方式 | | | | | | 标准基座提示原生插件不可用 | 基座未包含插件原生依赖 | 构建自定义基座或使用本地原生工程。 | | 真机无法连接、模拟器可以 | 服务地址使用 localhost 、TLS 或局域网路由不通 | 从真机验证 API/WSS 地址、证书和反向代理。 | | 事件重复执行 | 页面或 onShow 重复注册,旧句柄未释放 | 把监听提升到稳定 service,并逐个 off subscription 。 | | 文件创建失败 | 传入 unifile:// 、临时 URL 或 Core 无权读取的路径 | 转换为原生可读完整路径并保证文件生命周期。 | | HarmonyOS 某 API 始终失败 | 锁定 HAR 没有该能力 | 识别 platform unsupported ,关闭入口或采用替代流程。 | | iOS 模拟器成功、真机链接失败 | device slice、embed、签名或最低版本不匹配 | 用 iPhone device 构建检查 XCFramework 与签名。 | 下一步 开始之前 /sdk/uniapp/getting started/before you start 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 处理 App 生命周期与设备状态 /sdk/uniapp/getting started/handle app lifecycle and device state" }, { "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", @@ -4453,7 +4453,7 @@ "description": "理解会话快照、增量事件、未读数、草稿和会话分组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation overview-conversation", - "content": "会话是单聊、群聊或其他消息流的本地索引。 conversationID 是稳定主键;单聊同时有 userID ,群聊同时有 groupID 。界面标题、头像和最新消息都是可变快照,不能替代主键。 OpenIMConversationItem 包含 conversationType 、 showName 、 faceURL 、 unreadCount 、 latestMsg 、草稿、置顶、接收选项和消息序列边界。 latestMsg 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。 建议数据流 1. 注册 onNewConversation 与 onConversationChanged 。 2. 查询完整或分页会话快照。 3. 按 conversationID 幂等插入或替换事件项。 4. 按 isPinned 、时间和业务排序规则展示。 5. App 恢复或重新登录时重新查询,不仅依赖事件。 会话未读数和消息已读是相关但不同的状态。清零会话未读见 标记会话已读 /sdk/uniapp/conversation/managing conversations/mark conversation read ,总未读见 获取总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count 。 商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见 会话分组概览 /sdk/uniapp/conversation/managing conversation groups/overview conversation groups 。" + "content": "会话是单聊、群聊或其他消息流的本地索引。 conversationID 是稳定主键;单聊同时有 userID ,群聊同时有 groupID 。界面标题、头像和最新消息都是可变快照,不能替代主键。 会话标识 conversationID 是列表、事件、未读数和消息查询之间的稳定关联键。按目标查询时,单聊使用对端 userID 和单聊类型,群聊使用 groupID 和对应群会话类型;不要只按 userID 或 groupID 覆盖其他类型的会话。 会话项中的 showName 和 faceURL 是当前展示快照。好友备注、群名称或头像变化后它们可能改变;业务不应把展示名称作为缓存主键。 会话数据 OpenIMConversationItem 主要包含: | 数据 | 用途 | | | | | conversationType 、 userID 、 groupID | 判断会话类型和目标。 | | showName 、 faceURL | 展示标题与头像。 | | unreadCount | 当前会话未读数。 | | latestMsg 、 latestMsgSendTime | 最新消息摘要与排序时间。 | | draftText 、 draftTextTime | 当前设备保存的草稿。 | | isPinned | 置顶状态。 | | recvMsgOpt | 会话级消息接收与通知策略。 | | isPrivateChat 、 burnDuration | 阅后即焚模式和时长。 | | minSeq 、 maxSeq 、 msgDestructTime | 消息序列与商业版销毁状态边界。 | latestMsg 是序列化消息字符串。解析失败时保留会话并显示降级摘要,不要因为一条未知消息类型删除整个会话。商业版扩展字段在公共环境中可能缺失,使用前判空。 排序与展示 会话列表常见排序先处理 isPinned ,再使用 latestMsgSendTime 、草稿时间或产品定义的稳定规则。不要使用当前数组下标作为持久顺序;任何新消息、置顶或草稿变化都可能改变位置。 列表摘要应从 latestMsg 安全解析已知消息类型。遇到未知 contentType、自定义消息或解析失败时显示通用摘要,并保留未读数、会话目标和进入聊天页的能力。不要把原始 JSON 直接展示给用户或写入公开日志。 未读与接收策略 unreadCount 是单个会话快照,总未读数由独立 API 与事件维护。标记已读后,分别处理操作 Promise、会话变化和总未读事件;其他设备或服务端并发新消息可能让未读数再次增加。 recvMsgOpt 只描述该会话的接收策略,还可能受账号级 globalRecvMsgOpt 影响。界面应展示服务端返回的最终会话状态,而不是仅根据用户刚点击的本地开关推断成功。 按任务查找页面 | 需求 | 页面 | | | | | 分页获取列表并同步新增、变化事件 | 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list | | 按用户或群组目标查询会话 | 按目标查询会话 /sdk/uniapp/conversation/retrieving conversations/get conversation by target | | 按会话 ID 查询一个或多个会话 | 按会话 ID 查询 /sdk/uniapp/conversation/retrieving conversations/get conversations by id | | 搜索本地会话 | 搜索会话 /sdk/uniapp/conversation/retrieving conversations/search conversations | | 标记一个或全部会话已读 | 标记会话已读 /sdk/uniapp/conversation/managing conversations/mark conversation read 、 标记全部会话已读 /sdk/uniapp/conversation/managing conversations/mark all conversations read | | 管理草稿、置顶、备注和扩展 | 对应“管理会话”页面 | | 使用商业版会话分组 | 会话分组概览 /sdk/uniapp/conversation/managing conversation groups/overview conversation groups | 删除和清理 隐藏会话、删除会话、删除会话及消息、清空会话消息和清除全部本地消息是不同操作: 隐藏只移除列表入口,消息保留,新消息可能让会话重新出现。 删除会话不应被描述为删除好友或退出群组。 删除会话及消息会影响本地会话与消息记录,应在 UI 中二次确认。 清空消息与服务端消息销毁策略也不是同一能力。 选择操作前明确产品语义,Promise 失败时不要先行清除本地状态;完成后用事件或重新查询校准。 状态更新 建议数据流如下: 1. 注册 onNewConversation 与 onConversationChanged ,保存各自订阅句柄。 2. 分页查询会话快照。 3. 按 conversationID 幂等插入或替换事件项。 4. 按 isPinned 、时间和业务排序规则展示。 5. App 恢复、同步完成或重新登录时重新查询,不仅依赖事件。 会话未读数和消息已读是相关但不同的状态。清零会话未读见 标记会话已读 /sdk/uniapp/conversation/managing conversations/mark conversation read ,总未读见 获取总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count 。 查询用于建立快照,事件用于合并增量,Promise 成功只说明当前操作完成。完整监听与句柄清理统一见 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 。 切换账号时先停止旧 store 写入,释放旧订阅并清空会话、未读和草稿内存状态。不要让旧账号分页或事件异步结果写入新账号;商业版依赖插件还应比较 SDK session epoch。" }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", @@ -4461,7 +4461,7 @@ "description": "按目标 ID 和会话类型查询一个会话。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-by-target", - "content": "getOneConversation 使用目标 ID 和 OpenIMSessionType 查询单个会话,返回 OpenIMConversationItem | null 。 import OpenIMSessionTypeSingle, getOneConversation, from '@/uni modules/unix openim sdk' const conversation = await getOneConversation sourceID: 'user b', sessionType: OpenIMSessionTypeSingle, 单聊的 sourceID 是对方 userID ,群聊是 groupID 。使用插件导出的会话类型常量,不直接写数字。 null 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。 返回值按 conversationID 合并到 store,不要用 sourceID 直接覆盖其他会话类型。" + "content": "getOneConversation 使用目标 ID 和 OpenIMSessionType 查询单个会话,返回 OpenIMConversationItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | sourceID | string | 是 | 会话目标 ID:单聊为对方 userID ,群聊为 groupID 。 | | sessionType | OpenIMSessionType | 是 | 会话类型,使用插件导出的 OpenIMSessionTypeSingle 、群聊等常量。 | import OpenIMSessionTypeSingle, getOneConversation, from '@/uni modules/unix openim sdk' const conversation = await getOneConversation sourceID: 'user b', sessionType: OpenIMSessionTypeSingle, 同一个字符串在不同 sessionType 下可能表示不同目标,必须同时传入正确类型。不要直接写数字,也不要把 conversationID 当成 sourceID 传入;已经知道会话 ID 时使用按会话 ID 查询 API。 Promise 成功直接返回 OpenIMConversationItem | null 。 null 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。查询本身不会创建会话,也不会触发会话事件。 返回值按 conversationID 合并到 store,不要用 sourceID 直接覆盖其他会话类型。" }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", @@ -4485,7 +4485,7 @@ "description": "查询完整或分页会话快照,并处理新增与变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations retrieve-conversation-list", - "content": "getAllConversationList 返回完整本地会话快照;列表较大时使用 getConversationListSplit 分页。本页归属 onNewConversation 和 onConversationChanged 。 import getConversationListSplit, off, onConversationChanged, onNewConversation, from '@/uni modules/unix openim sdk' const newConversationSubscription = onNewConversation result = result.conversations.forEach item = upsertConversation item.conversationID, item const changedSubscription = onConversationChanged result = result.conversations.forEach item = upsertConversation item.conversationID, item const firstPage = await getConversationListSplit offset: 0, count: 100 replaceConversationSnapshot firstPage?.conversations ?? off newConversationSubscription off changedSubscription 分页时继续增加 offset ,直到返回数量少于 count 。查询与事件可能包含相同会话,必须按 conversationID 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。 不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。" + "content": "会话列表应使用 getConversationListSplit 分页建立本地快照。虽然 Private 合同仍导出非分页 getAllConversationList 作为兼容能力,面向真实应用和公开文档的推荐流程统一使用分页,避免会话较多时一次加载全部本地记录。 分页获取会话 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次读取数量;根据页面和设备性能设置合理上限。 | import getConversationListSplit, off, onConversationChanged, onNewConversation, from '@/uni modules/unix openim sdk' const newConversationSubscription = onNewConversation result = result.conversations.forEach item = upsertConversation item.conversationID, item const changedSubscription = onConversationChanged result = result.conversations.forEach item = upsertConversation item.conversationID, item const firstPage = await getConversationListSplit offset: 0, count: 100 replaceConversationSnapshot firstPage?.conversations ?? off newConversationSubscription off changedSubscription Promise 成功直接返回 OpenIMConversationListResult | null ,从 conversations 读取当前页。第一页用于替换当前账号快照;后续页按 conversationID 合并。返回 null 时不要伪造成功的空列表,应结合登录状态和错误诊断决定保留旧快照还是展示加载失败。 分页时继续增加 offset ,直到返回数量少于 count 。在前一页加载期间收到会话事件后,列表排序和分页边界可能变化;应让 store 按主键合并,并在刷新或同步完成时从 offset 0 重新建立快照。不要只把后续页追加到数组后永久依赖旧 offset。 会话字段 OpenIMConversationItem 中常用字段如下: | 字段 | 说明 | | | | | conversationID | 会话稳定主键,列表与事件都按该字段合并。 | | conversationType | 单聊、群聊或通知会话类型。 | | userID / groupID | 单聊对端用户或群聊群组 ID,根据会话类型使用。 | | showName / faceURL | 当前会话展示名称与头像快照。 | | unreadCount | 当前会话未读数。 | | latestMsg | 最新消息序列化字符串;解析失败时保留会话并展示降级摘要。 | | latestMsgSendTime | 最新消息发送时间,可参与普通会话排序。 | | draftText / draftTextTime | 本地草稿内容和更新时间。 | | isPinned | 是否置顶。排序时先应用置顶规则,再处理时间。 | | recvMsgOpt | 会话级消息接收选项。 | 完整字段及商业扩展见 会话概览 /sdk/uniapp/conversation/overview conversation 。不要根据本地数组位置更新;置顶、最新消息、草稿和未读变化都会改变排序。 列表排序 推荐先把分页与事件结果写入以 conversationID 为键的映射,再计算展示数组。通常先显示置顶会话,组内按最新消息或草稿时间排序,并为时间相同项提供稳定的 ID 次序。不要直接在事件回调中对页面数组做局部交换。 latestMsg 解析失败不影响会话存在。保留该项并显示未知消息摘要;收到后续可识别消息或重新查询时自然更新。 保持列表同步 本页是 onNewConversation 和 onConversationChanged 的完整监听归属页。应先注册事件,再查询第一页,缩小登录同步期间的丢失窗口。两种事件都携带 OpenIMConversationListResult ,即使通常只变化一个会话,也要遍历全部 conversations 。 Promise 成功、事件到达和重新查询是不同阶段。App 前台恢复、同步完成、断线重连或切换账号后重新查询快照;退出登录或销毁会话 store 时分别 off newConversationSubscription 和 off changedSubscription 。 切换账号时,在启动新账号查询前停止旧账号分页请求的状态写入。即使旧 Promise 迟到,也不能把旧 conversationID 列表合入新账号;可使用应用账号世代或商业版 sdkSessionEpoch 做完成前校验。" }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", @@ -4533,7 +4533,7 @@ "description": "保存或清空指定会话的本地草稿文本。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-draft", - "content": "setConversationDraft 保存会话草稿;传空字符串清除草稿。 import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText 草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。 会话项中的 draftText 和 draftTextTime 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。" + "content": "setConversationDraft 保存会话草稿;传空字符串清除草稿。 用户离开聊天页、切换会话或输入框内容变化时可以保存草稿。输入过程中先维护编辑器状态并对 SDK 写入做防抖;离开页面前立即提交一次最新文本,避免每次按键写库或旧请求后完成覆盖新草稿。 import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText 清空草稿时明确传入空字符串: await setConversationDraft conversationID, draftText: '' 调用后的状态变化 Promise 成功表示草稿已经保存。SDK 通过 onConversationChanged 同步变化后的会话,按 conversationID 合并 draftText 和 draftTextTime 。完整事件注册与清理见 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 。 草稿属于当前设备的会话状态,不应假定同步到其他设备。退出账号时还要清理编辑器内存状态,避免把旧账号草稿带入新账号。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", @@ -4541,7 +4541,7 @@ "description": "通过 setConversation 修改单个会话的 recvMsgOpt。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-receive-option", - "content": "recvMsgOpt 控制单个会话的消息接收策略,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。 更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。" + "content": "recvMsgOpt 控制单个会话的消息接收策略,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 常用值为 0 (正常接收并允许通知)和 2 (接收消息但不通知)。合同类型还允许 1 表示不接收消息,但只有产品和服务端明确支持该策略时使用;业务应集中定义含义,不在页面中散落裸数字。 该设置只作用于指定会话。账号级默认策略由 globalRecvMsgOpt 设置,见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。最终有效行为可能同时受账号级和会话级策略影响。 Promise 成功、 onConversationChanged 到达和重新查询是三个阶段。更新后按 conversationID 合并事件或重新查询确认,不要仅修改当前页面开关。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", @@ -4557,7 +4557,7 @@ "description": "清理会话未读数,并处理单聊已读回执事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation-read", - "content": "markConversationMessageAsRead 把指定会话标为已读。本页同时归属单聊已读回执 onRecvC2CReadReceipt 。 import markConversationMessageAsRead, off, onRecvC2CReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt result = result.receipts.forEach receipt = mergeReadReceipt receipt await markConversationMessageAsRead conversationID off receiptSubscription 商业版还提供 resetConversationUnread 商业版 ,可把多个会话的未读数重置为指定值: import resetConversationUnread from '@/uni modules/unix openim sdk' await resetConversationUnread conversationIDs: conversationID , num: 0 本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。" + "content": "markConversationMessageAsRead 把指定会话标为已读。本页同时归属单聊已读回执 onRecvC2CReadReceipt 。 用户打开会话并阅读完当前可见消息后再调用。不要在只预览通知、后台收到消息或尚未展示聊天页时提前标记已读。 import markConversationMessageAsRead, off, onRecvC2CReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt result = result.receipts.forEach receipt = mergeReadReceipt receipt await markConversationMessageAsRead conversationID off receiptSubscription 商业版还提供 resetConversationUnread 商业版 ,可把多个会话的未读数重置为指定值: import resetConversationUnread from '@/uni modules/unix openim sdk' await resetConversationUnread conversationIDs: conversationID , num: 0 本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。 Promise 成功后,通过 onConversationChanged 取得最新会话并按 conversationID 合并未读数;需要立即校准时重新查询该会话。单聊回执中的 receipts 应先定位对端用户对应的单聊,再按每项消息 ID 列表更新已读状态。 群聊中调用本 API 只清理当前账号的会话未读数。需要上报群成员级已读状态时,另见 上报群消息已读 /sdk/uniapp/message/managing read status/send group read receipts 。组件卸载、退出登录或切换账号时释放 receiptSubscription 。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", @@ -4565,7 +4565,7 @@ "description": "清零当前账号的全部会话未读数。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-all-conversations-read", - "content": "markAllConversationMessageAsRead 标记当前账号的全部会话已读。 import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead 这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。 该调用不会删除消息,也不会修改单个会话的消息接收选项。" + "content": "markAllConversationMessageAsRead 标记当前账号的全部会话已读。 import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead 这是范围较大的状态变更,UI 应二次确认。Promise 成功表示 SDK 已完成本次找到的全部未读会话处理,不等于相关会话事件已经到达,也不保证其他客户端界面已同步完成。 完成后不要只把角标设为 0;通过 onConversationChanged 按 conversationID 合并各会话状态,并通过 onTotalUnreadMessageCountChanged 更新总未读数。完整监听分别见 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 和 获取会话总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count 。必要时重新查询两份快照,处理服务端或其他设备并发产生的新未读消息。 该调用不会删除消息,也不会修改单个会话的消息接收选项。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", @@ -4589,7 +4589,7 @@ "description": "商业版设置会话的 burnDuration。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-burn-duration", - "content": "burnDuration 商业版 表示阅后即焚时长,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。 关闭能力时使用产品约定的关闭值,并重新查询会话确认。" + "content": "burnDuration 商业版 表示阅后即焚时长,通过 setConversation 更新。 import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 burnDuration 的单位为秒,只描述阅后即焚模式的时长。启用或关闭模式还需要设置 isPrivateChat ,见 开启或关闭阅后即焚 /sdk/uniapp/conversation/managing conversations/set private chat 。 不要把 burnDuration 与服务端消息定期删除周期 msgDestructTime 混用,也不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端行为呈现。 Promise 成功表示设置请求完成。通过 onConversationChanged 按 conversationID 合并最新 burnDuration ,或重新查询会话确认。关闭能力时按产品协议设置私聊模式和时长,不用本地开关伪造服务端状态。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", @@ -4597,7 +4597,7 @@ "description": "说明商业版会话消息销毁字段的当前写入边界。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-destruct", - "content": "OpenIMConversationItem 包含 isMsgDestruct 与 msgDestructTime 商业版 状态,但当前 OpenIMSetConversationParams 没有这两个写入字段。 因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 ex 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。 客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。" + "content": "OpenIMConversationItem 包含 isMsgDestruct 与 msgDestructTime 商业版 状态,但当前 OpenIMSetConversationParams 没有这两个写入字段。 服务端消息定期删除由这两个字段共同描述: isMsgDestruct 是开关, msgDestructTime 是删除周期。它不是阅后即焚;阅后即焚使用 isPrivateChat 和 burnDuration 。 因此本插件版本只能读取并展示服务端返回的销毁状态,不能照搬 Wasm 的 setConversation isMsgDestruct, msgDestructTime ,也不能通过相近字段或 ex 模拟 setter。需要修改时使用已经确认并鉴权的商业业务接口,并在完成后重新查询会话。 达到删除周期后,服务端策略清理的是服务端保存的消息,不代表当前设备或其他已经同步过消息的客户端会立即删除本地副本。客户端卸载重装、清除数据或在新设备同步时,已被服务端清理的消息可能无法再次拉取。 客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。该页保留与 Wasm 相同的业务边界,但明确记录当前 unix 源码合同没有写入能力,避免发布不存在的 API。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", @@ -4605,7 +4605,7 @@ "description": "从当前会话列表隐藏一个会话而不删除消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-a-conversation", - "content": "hideConversation 从会话列表隐藏指定会话。 import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID 隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 完成后通过会话事件或重新查询移除本地项,不只操作页面数组。" + "content": "hideConversation 从会话列表隐藏指定会话。 import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID 该操作只影响当前登录用户的会话入口,不会删除单聊关系、退出群组或影响其他用户。隐藏不会删除本地或服务端历史消息;后续收到新消息或完成重新同步时,会话可能重新出现在列表中。需要清理会话及消息时选择对应删除 API,并在 UI 中明确差异。 调用后的状态变化 Promise 成功表示本次隐藏请求已经完成。调用端可以按 conversationID 从当前会话列表移除对应项,但仍需合并 onConversationChanged ,或重新查询会话列表校准。完整监听见 获取会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 。 不要把隐藏操作描述为删除聊天关系,也不要只操作页面数组而跳过 store;同一会话再次出现时,按 conversationID 恢复或更新原状态。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", @@ -4613,7 +4613,7 @@ "description": "隐藏当前账号的全部会话但保留消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-all-conversations", - "content": "hideAllConversations 隐藏当前账号的全部会话。 import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations 这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。" + "content": "hideAllConversations 重置当前账号全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中。 import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations 这是范围操作,调用前应二次确认。Promise 成功只表示本地会话状态已完成重置;它不会删除本地或服务端消息、群组、好友关系,也不会修改其他客户端的会话。 后续收到新消息或重新建立有效状态时,相应会话仍可能再次出现。完成后重新查询 会话列表 /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 和 会话总未读数 /sdk/uniapp/conversation/managing conversations/get total unread count ,不要把 Promise 成功当成远端事件或永久删除。" }, { "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", @@ -4645,7 +4645,7 @@ "description": "商业版会话分组模型、raw 事件解析和生命周期。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups overview-conversation-groups", - "content": "会话分组属于 商业版 ,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 OpenIMConversationGroupItem 的字段均可选。读取 conversationGroupID 后再作为主键; conversationIDs 可能为 null ,完整成员应以分页查询为准。 五个分组事件返回 opaque JSON 字符串,不是类型化对象: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription 校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。" + "content": "会话分组属于 商业版 ,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 分组类型 创建分组时使用 OpenIMConversationGroupType ,查询分组时使用 OpenIMConversationGroupQueryType 。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。 同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。 分组数据 OpenIMConversationGroupItem 的字段均可选: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string \\| null | 分组稳定标识;非空后才能作为缓存主键。 | | name | string \\| null | 分组名称。 | | order | number \\| null | 分组排序值。 | | ex | string \\| null | 业务扩展字符串,只按已约定格式解析。 | | conversationGroupType | number \\| null | 分组类型。 | | hidden | boolean \\| null | 当前分组是否隐藏。 | | unreadCount | number \\| null | 分组维度的未读数快照。 | | conversationIDs | string \\| null | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | 读取非空 conversationGroupID 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。 可用操作 | 需求 | 页面 | | | | | 创建分组并可选加入初始会话 | 创建会话分组 /sdk/uniapp/conversation/managing conversation groups/create conversation group | | 查询分组列表 | 查询会话分组 /sdk/uniapp/conversation/managing conversation groups/get conversation groups | | 查询分组资料、成员与总数 | 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations | | 查询一个会话所属的全部分组 | 查询会话所属分组 /sdk/uniapp/conversation/managing conversation groups/get conversation group by conversation id | | 加入或移出分组 | 把会话加入分组 /sdk/uniapp/conversation/managing conversation groups/add conversations to groups 、 把会话移出分组 /sdk/uniapp/conversation/managing conversation groups/remove conversations from groups | | 更新名称、扩展和隐藏状态 | 更新会话分组 /sdk/uniapp/conversation/managing conversation groups/update conversation group | | 调整分组顺序 | 设置会话分组顺序 /sdk/uniapp/conversation/managing conversation groups/set conversation group order | | 删除分组 | 删除会话分组 /sdk/uniapp/conversation/managing conversation groups/delete conversation group | 页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。 监听分组变化 五个分组事件返回 opaque JSON 字符串,不是类型化对象: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription onConversationGroupAdded 、 onConversationGroupChanged 和 onConversationGroupDeleted 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。 校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 ex 或其他字段可能包含业务数据。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", @@ -4653,7 +4653,7 @@ "description": "商业版创建自定义会话分组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups create-conversation-group", - "content": "createConversationGroup 商业版 创建分组,并可把一个会话作为初始成员。 import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: '重要会话', order: 100, conversationGroupType: 0, conversationID: conversationID, ex: '', const group = result?.conversationGroup 分组类型使用插件导出的合同值。 conversationID 可省略; ex 是整段业务扩展。返回分组可能为 null ,最终列表以分组事件或重新查询为准。" + "content": "createConversationGroup 商业版 创建分组,并可把一个会话作为初始成员。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。提交前按产品规则校验空值和长度。 | | order | number | 是 | 分组排序值;排序方向应在业务中保持一致。 | | conversationGroupType | OpenIMConversationGroupType | 是 | 分组类型,使用插件合同允许的值。 | | conversationID | string \\| null | 否 | 创建时加入分组的初始会话 ID。 | | ex | string \\| null | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: '重要会话', order: 100, conversationGroupType: 0, conversationID: conversationID, ex: '', const group = result?.conversationGroup 返回结果 Promise 成功直接返回 OpenIMCreateConversationGroupResult | null 。非空结果的 conversationGroup 是新分组快照,也可能为 null ;先校验非空 conversationGroupID 再加入本地索引。 Promise 成功和 onConversationGroupAdded 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 conversationID ,成员关系也应以查询结果校准。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", @@ -4661,7 +4661,7 @@ "description": "商业版按分组查询类型读取会话分组快照。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-groups", - "content": "getConversationGroups 商业版 按 conversationGroupType 查询分组。 import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups conversationGroupType: 0 const groups = result?.conversationGroups ?? 按非空 conversationGroupID 去重并排序。分组项中的 conversationIDs 可能只是当前快照;需要成员和总数时使用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。" + "content": "getConversationGroups 商业版 按 conversationGroupType 查询分组。 conversationGroupType 是必填的 OpenIMConversationGroupQueryType 。使用合同允许的查询值,不把分组创建类型、展示 tab 下标或本地枚举直接混用。 import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups conversationGroupType: 0 const groups = result?.conversationGroups ?? 返回结果 Promise 成功直接返回 OpenIMGetConversationGroupsResult | null ,从 conversationGroups 读取分组快照。按非空 conversationGroupID 去重并使用 order 排序。 会话分组字段 OpenIMConversationGroupItem 的字段均可空,包括 conversationGroupID 、 name 、 order 、 ex 、 conversationGroupType 、 hidden 、 unreadCount 和 conversationIDs 。先校验 ID 再缓存; conversationIDs 可能只是当前快照,需要成员、分页和总数时使用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", @@ -4669,7 +4669,7 @@ "description": "商业版分页读取一个会话分组及其成员会话。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-info-with-conversations", - "content": "getConversationGroupInfoWithConversations 商业版 返回分组资料、会话总数和一页会话。 import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , pageNumber 从服务端约定的第一页开始,本合同示例使用 1; showNumber 是页大小。返回字段 ConversationTotal 首字母大写,应按真实字段名读取。会话按 conversationID 去重,分组为 null 时不要继续分页。" + "content": "getConversationGroupInfoWithConversations 商业版 返回分组资料、会话总数和一页会话。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码;本合同示例从 1 开始。 | | pagination.showNumber | number | 是 | 每页会话数量。 | import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , 返回结果 Promise 成功直接返回 OpenIMGetConversationGroupInfoWithConversationsResult | null : | 字段 | 类型 | 说明 | | | | | | conversationGroup | OpenIMConversationGroupItem \\| null | 当前分组资料;为 null 时不要继续分页。 | | ConversationTotal | number \\| null (可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | | conversations | OpenIMConversationItem | 当前页会话。 | 分页期间成员可能变化。按 conversationID 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 ConversationTotal 。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", @@ -4685,7 +4685,7 @@ "description": "商业版更新分组名称、扩展字段或隐藏状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups update-conversation-group", - "content": "updateConversationGroup 商业版 只更新提供的字段。 import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: '重点跟进', hidden: false, name 、 ex 和 hidden 都可选。 ex 是整段替换,先合并已有业务字段。返回 conversationGroup 可能为空,最终状态以事件或重新查询为准。" + "content": "updateConversationGroup 商业版 只更新提供的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的分组 ID。 | | name | string \\| null | 否 | 新分组名称。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | | hidden | boolean \\| null | 否 | 是否在业务界面隐藏该分组。 | import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: '重点跟进', hidden: false, 除 conversationGroupID 外,至少提供一个实际更新字段。 ex 是整段替换,多个模块共用时先读取并合并已有业务字段。 返回结果 Promise 成功直接返回 OpenIMUpdateConversationGroupResult | null ,其中 conversationGroup 是更新后的分组快照或 null 。只有非空且带有效 ID 时才立即合并;最终状态通过 onConversationGroupChanged 或重新查询校准。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", @@ -4693,7 +4693,7 @@ "description": "商业版批量更新会话分组排序值。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups set-conversation-group-order", - "content": "setConversationGroupOrder 商业版 批量提交分组 ID 与顺序值。 import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupOrders: conversationGroupID: 'group a', order: 100 , conversationGroupID: 'group b', order: 200 , , 拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。" + "content": "setConversationGroupOrder 商业版 批量提交分组 ID 与顺序值。 参数说明 conversationGroupOrders 是非空数组,每项包含: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要调整的分组 ID。 | | order | number | 是 | 新排序值;同一批次应避免重复值或不稳定规则。 | import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupOrders: conversationGroupID: 'group a', order: 100 , conversationGroupID: 'group b', order: 200 , , 拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。提交前按 conversationGroupID 去重,并用稳定算法计算所有受影响分组的值。 返回结果 Promise 成功直接返回字符串结果,表示排序更新请求完成。重新查询分组或等待分组变更事件确认最终排序;并发编辑时以服务端最终 order 为准,不只保留本地拖拽顺序。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", @@ -4701,7 +4701,7 @@ "description": "商业版把多个会话加入一个或多个分组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups add-conversations-to-groups", - "content": "addConversationsToGroups 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。 import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。" + "content": "addConversationsToGroups 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要加入分组的会话 ID 列表。 | | conversationGroupIDs | string | 是 | 目标会话分组 ID 列表。每个会话会加入每个目标分组。 | import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 两个数组都不能为空,并应先去除空值和重复项。一个会话可以属于多个分组;该操作不会改变会话消息或删除其他分组关系。 返回结果 Promise 成功直接返回 Core 的字符串结果,表示成员更新请求已经完成,不等于分组成员事件已经到达。通过 onConversationGroupMemberAdded 或重新查询分组确认最终关系;不要在失败时保留仅本地的成员关系。完整 raw 事件处理见 会话分组概览 /sdk/uniapp/conversation/managing conversation groups/overview conversation groups 。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", @@ -4709,7 +4709,7 @@ "description": "商业版从一个或多个分组移除多个会话。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups remove-conversations-from-groups", - "content": "removeConversationsFromGroups 商业版 使用与加入相同的成员参数。 import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。" + "content": "removeConversationsFromGroups 商业版 使用与加入相同的成员参数。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationIDs | string | 是 | 要移出分组的会话 ID 列表。 | | conversationGroupIDs | string | 是 | 要移出的目标分组 ID 列表。 | import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , 两个数组都不能为空,并应先去重。移出分组不会删除会话、消息或该会话在其他分组中的成员关系。 返回结果 Promise 成功直接返回字符串结果,表示请求完成,不等于本地分组快照已经更新。随后处理 onConversationGroupMemberDeleted 或重新查询分组。重复移除按服务端最终状态处理,不做无限重试,也不在失败时伪造本地成功。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", @@ -4717,7 +4717,7 @@ "description": "商业版删除指定会话分组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups delete-conversation-group", - "content": "deleteConversationGroup 商业版 删除一个分组。 import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID: groupID 删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。" + "content": "deleteConversationGroup 商业版 删除一个分组。 参数对象只包含必填的 conversationGroupID 。删除前应确认该 ID 来自当前账号的分组快照,而不是名称或数组下标。 import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID: groupID 返回结果 Promise 成功直接返回字符串结果,表示删除请求已完成。删除分组不会删除其中的会话或消息,也不会删除会话本身。 UI 应二次确认;成功后通过 onConversationGroupDeleted 或重新查询,按 conversationGroupID 清理本地分组与成员索引。Promise 失败时不要先行隐藏分组;若事件与本地快照不一致,以重新查询为准。" }, { "path": "/sdk/uniapp/group/overview-group", @@ -4725,7 +4725,7 @@ "description": "理解群资料、成员、申请、权限和群组事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group overview-group", - "content": "群组领域以 groupID 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription 先订阅事件,再查询已加入群组快照。按 groupID 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 OpenIMGroupItem 的 attachedInfo 以及 displayIsRead 、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。" + "content": "群组领域以 groupID 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 核心数据类型 | 类型 | 用途 | | | | | OpenIMGroupItem | 已加入群组列表、群资料页和群状态。 | | OpenIMCreateGroupInfo | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 | | OpenIMGroupMemberItem | 群成员资料、角色、入群来源和禁言结束时间。 | | OpenIMGroupApplicationItem | 入群申请及其申请人与处理状态。 | OpenIMGroupItem 常用字段包括 groupID 、 groupName 、 notification 、 introduction 、 faceURL 、 ownerUserID 、 memberCount 、 status 、 groupType 、 needVerification 、 lookMemberInfo 、 applyMemberFriend 和 ex 。 attachedInfo 是 商业版字段 ,只按已确认协议解析。 成员对象使用 groupID:userID 作为稳定合并标识。群内 nickname 和 faceURL 属于成员快照,不应被写回为用户账号级资料。 按任务查找页面 | 需求 | 页面 | | | | | 创建、更新、解散或退出群组 | 创建群组 /sdk/uniapp/group/create group 、 更新群资料 /sdk/uniapp/group/update group profile 、 解散群组 /sdk/uniapp/group/dismiss group 、 退出群组 /sdk/uniapp/group/quit group | | 分页查询已加入群组或指定群资料 | 分页查询已加入群组 /sdk/uniapp/group/retrieving groups/get joined group list page 、 查询指定群资料 /sdk/uniapp/group/retrieving groups/get specified groups info | | 查询、搜索和管理群成员 | 查询群成员列表 /sdk/uniapp/group/retrieving group members/get group member list 、 搜索群成员 /sdk/uniapp/group/retrieving group members/search group members | | 邀请或移除成员、转让群主 | 邀请用户入群 /sdk/uniapp/group/managing group members/invite user to group 、 移除群成员 /sdk/uniapp/group/managing group members/kick group member 、 转让群主 /sdk/uniapp/group/managing group members/transfer group owner | | 发送、查询和处理入群申请 | 申请加入群组 /sdk/uniapp/group/join group 、 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient | | 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 | 状态更新 本页归属群资料与已加入群列表的四个事件: import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription 先订阅事件,再查询已加入群组快照。按 groupID 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 onGroupInfoChanged 更新资料, onGroupDismissed 表示群已解散, onJoinedGroupAdded / onJoinedGroupDeleted 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。 群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 off subscription 。" }, { "path": "/sdk/uniapp/group/create-group", @@ -4733,7 +4733,7 @@ "description": "创建群资料并设置初始成员与管理员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group create-group", - "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 群类型、验证方式和其他 OpenIMCreateGroupInfo 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。" + "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupInfo.groupName | string | 是 | 群名称。 | | groupInfo.groupType | 2 | 是 | 当前合同支持的群类型固定为 2 。 | | groupInfo.notification | string \\| null | 否 | 初始群公告。 | | groupInfo.introduction | string \\| null | 否 | 群简介。 | | groupInfo.faceURL | string \\| null | 否 | 群头像 URL。 | | groupInfo.ex | string \\| null | 否 | 群扩展字符串,完整写入。 | | memberUserIDs | string | 是 | 初始普通成员用户 ID。 | | adminUserIDs | string \\| null | 否 | 初始管理员用户 ID。 | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。 ex 不会自动合并 JSON。 返回结果 Promise 成功直接返回 OpenIMGroupItem | null 。非空结果可以按 groupID 合入群组 store;返回 null 时不要创建仅本地群。 Promise 成功只表示创建请求完成。群列表最终通过 onJoinedGroupAdded 、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。" }, { "path": "/sdk/uniapp/group/update-group-profile", @@ -4741,7 +4741,7 @@ "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", - "content": "setGroupInfo 只更新提供的可选字段。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: '新的群名', introduction: '项目协作群', faceURL: 'https://cdn.example.com/group.png', 群主和管理员权限由服务端校验。Promise 成功后通过 onGroupInfoChanged 或重新查询刷新,不直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" + "content": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。 setGroupInfo 只更新本次提供的可选字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string \\| null | 否 | 新群名称。 | | introduction | string \\| null | 否 | 新群简介。 | | faceURL | string \\| null | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, 不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 onGroupInfoChanged 按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时调用 getSpecifiedGroupsInfo ,不要直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" }, { "path": "/sdk/uniapp/group/set-group-announcement", @@ -4757,7 +4757,7 @@ "description": "通过 setGroupInfo 更新群组 ex。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-extension", - "content": "群组业务扩展使用 setGroupInfo 的 ex 字符串。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, ex: JSON.stringify department: 'R&D' ex 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。" + "content": "群组业务扩展使用 setGroupInfo 的 ex 字符串。 ex 是完整字符串,SDK 不会按 JSON 字段自动合并。 import setGroupInfo from '@/uni modules/unix openim sdk' const previous = JSON.parse group.ex || ' ' await setGroupInfo groupID, ex: JSON.stringify ...previous, projectID: 'project 42', , 多个模块共用时,应划分稳定命名空间,并在写入前保留其他模块的数据。解析失败时不要覆盖原值;扩展数据对有权读取群资料的成员可见,不要存放秘密。 Promise 成功后,通过 onGroupInfoChanged 按 groupID 合并最新群资料;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。" }, { "path": "/sdk/uniapp/group/set-group-join-verification", @@ -4765,7 +4765,7 @@ "description": "设置群成员加入时的验证策略。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-join-verification", - "content": "通过 setGroupInfo 的 needVerification 更新入群验证策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 使用 OpenIMGroupNeedVerification 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。" + "content": "通过 setGroupInfo 的 needVerification 更新申请和邀请用户加入群组时的验证策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 | needVerification | 含义 | | | | | 0 | 用户申请需要审核;群成员邀请可直接入群。 | | 1 | 申请和普通成员邀请都需要审核;群主或管理员邀请除外。 | | 2 | 申请或邀请均可直接入群。 | OpenIMGroupNeedVerification 的类型范围是 0 | 1 | 2 。客户端应根据该策略展示申请提示,但最终是否允许加入仍由 OpenIMServer 判断。策略只影响后续申请;已有申请和成员不会自动重新处理。 Promise 成功后,通过 onGroupInfoChanged 合并最新群资料,完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。" }, { "path": "/sdk/uniapp/group/set-group-member-profile-access", @@ -4773,7 +4773,7 @@ "description": "控制群成员是否可以查看其他成员资料。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-profile-access", - "content": "通过 setGroupInfo 的 lookMemberInfo 设置群成员资料可见策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 使用 OpenIMGroupOption 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。" + "content": "lookMemberInfo 控制群成员能否通过群组查看其他成员资料。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 | lookMemberInfo | 含义 | | | | | 0 | 允许成员查看其他成员资料。 | | 1 | 不允许成员查看其他成员资料。 | OpenIMGroupOption 的类型范围是 0 | 1 。不要把这组值当作常见的布尔型 0 = false、1 = true 。 该设置与“是否允许通过群组添加好友”相互独立,也不替代业务后端的隐私与权限校验。Promise 成功后,通过 onGroupInfoChanged 合并最新群资料,完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。" }, { "path": "/sdk/uniapp/group/set-group-member-friend-permission", @@ -4781,7 +4781,7 @@ "description": "控制群成员之间是否可以发起好友申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-friend-permission", - "content": "通过 setGroupInfo 的 applyMemberFriend 更新群成员加好友策略。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 使用 OpenIMGroupOption 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。" + "content": "通过 setGroupInfo 的 applyMemberFriend 控制群成员能否通过群组向其他成员发送好友申请。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 | applyMemberFriend | 含义 | | | | | 0 | 允许通过群成员关系发起好友申请。 | | 1 | 不允许通过群成员关系发起好友申请。 | OpenIMGroupOption 的类型范围是 0 | 1 。该字段只控制从群成员关系发起好友申请的入口,不等同于隐藏成员资料。设置由服务端执行,客户端 UI 不是安全边界。 Promise 成功表示设置请求完成。最新状态通过 onGroupInfoChanged 按 groupID 合并,完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。" }, { "path": "/sdk/uniapp/group/change-group-mute", @@ -4789,7 +4789,7 @@ "description": "修改群组全员禁言状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group change-group-mute", - "content": "changeGroupMute 修改群组全员禁言。 import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true 权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。" + "content": "changeGroupMute 控制群组整体禁言。群主和管理员可以按 OpenIMServer 权限执行该操作。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要修改的群 ID。 | | isMute | boolean | 是 | true 开启全员禁言, false 关闭。 | import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true 只有群主或具备服务端权限的管理员可以操作,最终权限和群状态由服务端校验。不要仅根据本地角色显示结果;服务端仍可能因群状态、角色变化或并发操作拒绝。群主和管理员通常仍可发送消息,因此群组禁言不表示所有用户都无法发言。 Wasm 文档中的 muteBypassUserIDs 商业扩展没有进入当前 uni app / uni app x 合同,请勿向 changeGroupMute 传入该字段。商业服务端即使支持例外用户,也应以当前插件公开的类型和后续群资料为准。 返回结果 Promise 成功直接返回字符串结果,表示服务端完成本次群禁言设置,不等于所有成员界面已经更新。群资料随后可能通过 onGroupInfoChanged 到达,应按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时重新查询群资料。 全员禁言与单个成员禁言是不同能力。商业版群资料可能包含禁言例外用户列表;公共客户端把缺失扩展视为“没有可用扩展数据”,不能自行推断例外权限。" }, { "path": "/sdk/uniapp/group/join-group", @@ -4797,7 +4797,7 @@ "description": "向指定群发送加入申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group join-group", - "content": "joinGroup 提交入群申请。 import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', joinSource 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 ex 不包含敏感信息。" + "content": "joinGroup 提交入群申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要申请加入的群 ID。 | | reqMsg | string | 是 | 申请说明,可能向群主或管理员展示。 | | joinSource | number | 是 | 入群来源值,使用产品与服务端约定。 | | ex | string \\| null | 否 | 申请扩展字符串,只按已确认协议填写。 | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', 申请文案和 ex 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、 onJoinedGroupAdded 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。" }, { "path": "/sdk/uniapp/group/quit-group", @@ -4805,7 +4805,7 @@ "description": "当前用户主动退出指定群。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group quit-group", - "content": "quitGroup 让当前用户退出群组。 import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID 群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。" + "content": "quitGroup 让当前用户退出群组。 import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID 群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。 Promise 成功表示退出请求完成,不等于群列表和成员事件已经到达。当前用户退出后,按 groupID 清理群聊天入口、成员分页和发送权限;其他成员仍保留群组。 群主转让与退出应串行执行:先确认新群主事件或重新查询结果,再调用退出。失败时保留聊天与群状态,不要仅因用户点击确认就删除本地数据。" }, { "path": "/sdk/uniapp/group/dismiss-group", @@ -4813,7 +4813,7 @@ "description": "群主解散指定群组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group dismiss-group", - "content": "dismissGroup 解散群组。 import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID 这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。" + "content": "dismissGroup 解散群组。 import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID 这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。 Promise 成功表示解散请求完成,不代表每个客户端都已处理事件。当前客户端继续等待 onGroupDismissed / onJoinedGroupDeleted 或重新查询,按 groupID 移除群、成员和聊天入口。 提交前展示群名和成员影响范围,并防止重复点击。Promise 失败时保留当前群状态;权限和群状态最终由服务端校验,不能只依赖本地 ownerUserID 。" }, { "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", @@ -4821,7 +4821,7 @@ "description": "按 groupID 列表批量查询群资料。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-specified-groups-info", - "content": "getSpecifiedGroupsInfo 批量查询群资料。 import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo 'group a', 'group b' const groups = result?.groups ?? 结果不保证与输入顺序一致,按 groupID 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。" + "content": "群组查询只建立调用时的快照,不会触发群组事件。公开群发现、跨业务目录和复杂权限过滤应由业务后端提供;SDK 查询面向已知群组和当前账号已加入的群组。 getSpecifiedGroupsInfo 接收群组 ID 数组: import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo groupIDs const groups = result?.groups ?? 读取单个群组时仍传数组,并检查 groups 0 是否存在。群组没有 URL 或 slug 字段,业务路由应先解析为稳定的 groupID 。 Promise 成功后, result?.groups 是匹配的 OpenIMGroupItem ,字段含义见 分页获取已加入群组 /zh/sdk/uniapp/group/retrieving groups/get joined group list page 。结果不保证与输入 ID 按位置一一对应,应按 groupID 合并;未返回群可能不存在、已解散或当前无权访问。大量 ID 应分批查询。 后续变化按 groupID 合并,完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。" }, { "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", @@ -4837,7 +4837,7 @@ "description": "按 offset 和 count 分页读取已加入群组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", - "content": "getJoinedGroupListPage 适合群数量较大的账号。 import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? offset 从 0 开始,直到返回数量小于 count 。分页期间群事件可能改变列表,应按 groupID 去重,而不是依赖页内位置。 displayIsRead 和部分禁言扩展字段 商业版 ,缺失时按可选值处理。" + "content": "getJoinedGroupListPage 适合群数量较大的账号。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次读取的群数量。 | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? 返回结果 Promise 成功直接返回 OpenIMGroupListResult | null ,从 groups 读取当前页 OpenIMGroupItem 。 offset 从 0 开始,直到返回数量小于 count 。 群资料字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群稳定标识。 | | groupName | string | 群名称。 | | notification | string | 群公告。 | | introduction | string | 群简介。 | | faceURL | string | 群头像地址。 | | ownerUserID | string | 当前群主用户 ID。 | | creatorUserID | string | 群创建人用户 ID。 | | createTime | number | 群创建时间。 | | memberCount | number | 当前成员数快照。 | | status | number | 群状态。 | | groupType | number | 群类型。 | | needVerification | number | 入群验证策略。 | | lookMemberInfo | number | 普通成员查看成员资料的策略。 | | applyMemberFriend | number | 群成员之间申请好友的策略。 | | notificationUpdateTime | number | 群公告更新时间。 | | notificationUserID | string | 最近更新群公告的用户 ID。 | | ex | string | 群扩展字符串。 | | attachedInfo 商业版字段 | string | 商业附加信息,只按已确认协议解析。 | memberCount 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见 群组概览 /sdk/uniapp/group/overview group 。 分页期间群事件可能改变列表,应先把结果写入以 groupID 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。 第一页应替换当前账号快照,后续页按 groupID 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。" }, { "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", @@ -4853,7 +4853,7 @@ "description": "按群 ID 或群名称搜索本地群组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups search-groups", - "content": "searchGroups 搜索当前可见的群资料。 import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: '项目' , isSearchGroupID: true, isSearchGroupName: true, 空关键词由 UI 拦截。结果按 groupID 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。" + "content": "searchGroups 只搜索当前用户已加入且已经同步到本地的群组。当前接口只使用 keywordList 的第一个关键词。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | keywordList | string | 是 | 搜索关键词数组;传一个去除首尾空格的非空关键词。 | | isSearchGroupID | boolean | 是 | 是否匹配 groupID 。 | | isSearchGroupName | boolean | 是 | 是否匹配群名称。 | import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: keyword.trim , isSearchGroupID: true, isSearchGroupName: true, const groups = result?.groups ?? 返回结果 Promise 成功后, result?.groups 是匹配的 OpenIMGroupItem ,字段含义见 分页获取已加入群组 /zh/sdk/uniapp/group/retrieving groups/get joined group list page 。空关键词应由 UI 拦截;结果按 groupID 去重,只建立当前关键词下的快照,不应覆盖完整的已加入群组列表。 公开群发现、复杂分类和权限过滤不属于该方法,应由业务后端实现。" }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", @@ -4861,7 +4861,7 @@ "description": "分页查询待管理的入群申请,并处理申请事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-recipient", - "content": "getGroupApplicationListAsRecipient 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。 import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupApplicationAdded item = upsertGroupApplication item const subscriptions : Array = addedSubscription, onGroupApplicationAccepted item = upsertGroupApplication item , onGroupApplicationRejected item = upsertGroupApplication item , onGroupApplicationDeleted item = removeGroupApplication item , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceReceivedGroupApplications result?.applications ?? subscriptions.forEach subscription = off subscription 事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。" + "content": "getGroupApplicationListAsRecipient 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。 参数说明 参数对象可以省略;显式分页时使用可选的 offset 和 count 。 offset 首页为 0 , count 是本次读取数量。unix SDK 的参数不包含 Wasm 页面中的 handleResults 筛选,需要在返回后按 handleResult 过滤。 import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupApplicationAdded item = upsertGroupApplication item const subscriptions : Array = addedSubscription, onGroupApplicationAccepted item = upsertGroupApplication item , onGroupApplicationRejected item = upsertGroupApplication item , onGroupApplicationDeleted item = removeGroupApplication item , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceReceivedGroupApplications result?.applications ?? subscriptions.forEach subscription = off subscription 返回结果 Promise 成功直接返回 OpenIMGroupApplicationListResult | null ,从 applications 读取当前页。 返回 null 时不要伪造成“没有申请”的空状态;结合登录状态和错误诊断决定保留旧快照或展示加载失败。空 applications 才表示当前页没有记录。分页加载期间若处理了申请,应重置 offset 并重新查询,避免同一记录跨页重复。 入群申请字段 OpenIMGroupApplicationItem 同时包含群快照和申请人信息: | 字段 | 说明 | | | | | groupID 、 groupName 、 groupFaceURL | 目标群 ID、名称和头像快照。 | | notification 、 introduction | 群公告和简介快照。 | | ownerUserID 、 creatorUserID | 群主和创建人用户 ID。 | | groupType 、 status 、 memberCount | 群类型、状态和成员数快照。 | | userID 、 nickname 、 userFaceURL | 申请人 ID、昵称和头像快照。 | | handleResult | 当前处理结果:待处理、已同意或已拒绝。 | | reqMsg 、 reqTime | 申请说明和申请时间。 | | joinSource 、 inviterUserID | 入群来源和邀请人。 | | handleUserID 、 handledMsg 、 handledTime | 处理人、处理说明和处理时间。 | | ex 、 attachedInfo | 扩展与附加信息,只按已确认协议解析。 | 使用 groupID:userID 作为申请合并标识。昵称、头像和群名都是申请同步时的快照;需要最新资料时重新查询群或用户。 监听申请变化 本页是 onGroupApplicationAdded 、 onGroupApplicationAccepted 、 onGroupApplicationRejected 和 onGroupApplicationDeleted 的完整归属页。查询和事件按 groupID:userID 幂等合并,删除事件移除对应记录。 处理权限和申请状态由服务端校验,不要只修改本地 handleResult 冒充成功。管理员或群主身份变化后重新查询;分页期间收到事件时可重置分页。退出登录、切换账号或销毁申请 store 时逐个释放句柄。 按当前用户是否拥有处理权限,把收到的申请与自己发出的申请分开存储。事件中的群资料和申请人资料都是快照;群资料变化或用户改名时,不依赖旧申请记录刷新其他页面。 接受或拒绝操作的 Promise 成功后仍等待相应事件,或重新查询本页确认最终 handleResult 。申请被同意后,群列表和成员列表分别由自己的事件与查询更新;不要仅从申请项推断当前用户已经加入群。" }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", @@ -4869,7 +4869,7 @@ "description": "分页查询当前账号发出的入群申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", - "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。" + "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 参数说明 参数可省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次读取数量。 | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 返回结果 Promise 成功后,从 applications 读取当前账号发出的 OpenIMGroupApplicationItem 。字段含义见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。查询本身不会触发申请事件。 按 groupID:userID 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。" }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", @@ -4893,7 +4893,7 @@ "description": "接受指定用户加入指定群。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications accept-group-application", - "content": "acceptGroupApplication 由有权限的群成员处理申请。 import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID: 'user b', handleMsg: '已通过' 成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。" + "content": "acceptGroupApplication 由有权限的群成员处理申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请目标群 ID。 | | fromUserID | string | 是 | 申请人的用户 ID。 | | handleMsg | string | 是 | 处理说明;可能向申请人展示,不写内部风控信息。 | import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID: 'user b', handleMsg: '已通过' Promise 成功表示接受请求已经完成,不等于申请事件和成员事件都已到达。成功后分别刷新申请列表和群成员列表,或等待 onGroupApplicationAccepted 与 onGroupMemberAdded 按各自主键合并。 UI 在请求期间锁定该申请,避免接受与拒绝并发。处理权限、申请状态、群人数和重复成员由服务端校验;失败时保留原申请并重新查询,不只改本地 handleResult 。" }, { "path": "/sdk/uniapp/group/group-applications/refuse-group-application", @@ -4901,7 +4901,7 @@ "description": "拒绝指定用户加入指定群。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications refuse-group-application", - "content": "refuseGroupApplication 使用与接受相同的定位字段。 import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID: 'user b', handleMsg: '暂不通过' 处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。" + "content": "refuseGroupApplication 使用与接受相同的定位字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请目标群 ID。 | | fromUserID | string | 是 | 申请人的用户 ID。 | | handleMsg | string | 是 | 拒绝说明;可能向申请人展示。 | import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID: 'user b', handleMsg: '暂不通过' 处理说明可能对申请人可见,不写内部风控信息、内部账号或敏感审核依据。UI 在请求期间锁定该申请,避免接受与拒绝并发。 Promise 成功表示拒绝请求完成,不等于 onGroupApplicationRejected 已经到达。最终状态以申请事件或重新查询为准;失败时不要仅在本地隐藏申请。" }, { "path": "/sdk/uniapp/group/group-applications/delete-group-requests", @@ -4909,7 +4909,7 @@ "description": "商业版批量删除指定入群申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications delete-group-requests", - "content": "deleteGroupRequests 商业版 删除明确指定的申请记录。 import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID: 'user b' , 使用 OpenIMSimpleGroupRequest 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。" + "content": "deleteGroupRequests 商业版 删除明确指定的申请记录。 参数说明 groupRequests 是非空数组,每项 OpenIMSimpleGroupRequest 包含: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 申请目标群 ID。 | | fromUserID | string | 是 | 申请人的用户 ID。 | import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID: 'user b' , 使用 groupID:fromUserID 精确定位,提交前去重。删除申请记录不等于拒绝申请,也不会移除已经加入的成员;移除成员应使用群成员 API。 Promise 成功表示删除请求完成,随后可能收到申请删除事件。完整监听见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。批量失败时不要假定每一项都已删除;重新查询申请列表与数量。" }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", @@ -4917,7 +4917,7 @@ "description": "分页查询群成员,并处理成员新增、删除和资料变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-group-member-list", - "content": "getGroupMemberList 按过滤条件分页读取成员。本页归属三个成员事件。 import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupMemberAdded member = upsertMember member const subscriptions : Array = addedSubscription, onGroupMemberDeleted member = removeMember member.groupID, member.userID , onGroupMemberInfoChanged member = upsertMember member , const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? subscriptions.forEach subscription = off subscription filter 使用服务端定义的成员过滤值。按 groupID:userID 去重;分页与事件并发时不要按数组位置更新。" + "content": "getGroupMemberList 按过滤条件分页读取成员。本页归属三个成员事件。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群 ID。 | | filter | number | 是 | 服务端定义的成员过滤值;不要用 UI 下标替代。 | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次读取成员数量。 | import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupMemberAdded member = upsertMember member const subscriptions : Array = addedSubscription, onGroupMemberDeleted member = removeMember member.groupID, member.userID , onGroupMemberInfoChanged member = upsertMember member , const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? subscriptions.forEach subscription = off subscription Promise 成功直接返回 OpenIMGroupMemberListResult | null ,从 members 读取当前页。 群成员字段 | 字段 | 说明 | | | | | groupID 、 userID | 成员稳定标识,组合为 groupID:userID 。 | | nickname 、 faceURL | 群内成员展示资料。 | | roleLevel | 群主、管理员或普通成员角色值。 | | joinTime 、 joinSource 、 inviterUserID | 入群时间、来源和邀请人。 | | muteEndTime | 禁言结束时间;结合当前时间判断是否仍在禁言。 | | operatorUserID | 最近相关操作人。 | | ex 、 attachedInfo | 扩展信息,只按业务约定解析。 | 群内昵称与用户账号昵称可以不同。成员列表使用成员对象展示,不要用 getUsersInfo 返回的账号资料覆盖 nickname 。角色和禁言状态也只属于该群,不能跨群复用。 分页时继续增加 offset,直到返回数量少于 count。成员加入、退出、被移除或角色变化会改变分页边界;事件到达时按主键合并,并在需要完整顺序时从 offset 0 重新查询。 监听成员变化 本页是 onGroupMemberAdded 、 onGroupMemberDeleted 和 onGroupMemberInfoChanged 的完整监听归属页。按 groupID:userID 新增、删除或替换;分页与事件并发时不要按数组位置更新。 成员变化可能影响权限、成员数和当前聊天页。删除事件若指向当前用户,应停止发送并刷新群列表;角色或禁言变化应重新计算可用操作。退出登录、切换账号或销毁成员 store 时逐个释放订阅句柄。 查询 Promise 成功只建立当前页快照,不触发成员事件。邀请、移除和资料修改操作则分别等待 Promise、成员事件或重新查询,不能把本地对象修改当作服务端确认。" }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", @@ -4925,7 +4925,7 @@ "description": "按用户 ID 列表批量读取指定群成员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-specified-group-members-info", - "content": "getSpecifiedGroupMembersInfo 批量查询群内用户。 import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList: 'user a', 'user b' , 结果可能少于输入,按 userID 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。" + "content": "getSpecifiedGroupMembersInfo 批量查询指定用户在目标群组中的成员资料。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userIDList | string | 是 | 要查询的成员用户 ID。 | import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList, const members = result?.members ?? Promise 成功后, result?.members 是匹配的 OpenIMGroupMemberItem ,字段含义见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。返回数组不保证与输入 ID 按位置一一对应;结果也可能少于输入,未返回用户可能不在群内或不可访问。 同一用户在不同群中的昵称、角色和禁言状态可能不同,应按 groupID:userID 缓存,不要使用普通用户资料替代群成员资料。查询不会触发成员事件;后续增量见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", @@ -4941,7 +4941,7 @@ "description": "按用户 ID 或群昵称搜索群成员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members search-group-members", - "content": "searchGroupMembers 在指定群内搜索。 import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: 'Alice' , isSearchUserID: true, isSearchMemberNickname: true, 空关键词由 UI 拦截。结果按 groupID:userID 去重;它不是全局用户搜索。" + "content": "searchGroupMembers 适合在指定群组中搜索成员或获取 @ 候选人。当前接口只使用 keywordList 的第一个关键词。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | keywordList | string | 是 | 搜索关键词数组。 | | isSearchUserID | boolean | 是 | 是否匹配用户 ID。 | | isSearchMemberNickname | boolean | 是 | 是否匹配群内昵称。 | import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: keyword.trim , isSearchUserID: true, isSearchMemberNickname: true, const members = result?.members ?? uni app / uni app x 接口没有 Wasm 版的 offset 和 count 参数,返回当前匹配结果。空关键词应由 UI 拦截,关键词变化时替换搜索快照。 Promise 成功后, result?.members 是匹配的 OpenIMGroupMemberItem ,字段含义见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。结果按 groupID:userID 去重,只用于当前关键词下的成员快照,不应替换完整成员列表;它也不是全局用户搜索。" }, { "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", @@ -4949,7 +4949,7 @@ "description": "邀请一个或多个用户加入指定群。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members invite-user-to-group", - "content": "inviteUserToGroup 提交用户列表和邀请原因。 import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, reason: '加入项目讨论', userIDList: 'user b', 'user c' , 用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。" + "content": "群主和管理员可以在 OpenIMServer 授予的权限范围内管理群成员。客户端可以根据成员资料中的 roleLevel 控制操作入口,但服务端仍负责最终权限校验。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | reason | string | 是 | 邀请说明;没有说明时传空字符串。 | | userIDList | string | 是 | 要邀请的用户 ID。 | import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, reason: '邀请加入项目讨论组', userIDList: 'user 002', 'user 003' , 提交前应先对 userIDList 去重。邀请原因可能对目标用户可见,不要写入 Token 等敏感信息。 Promise 成功表示服务端接受了邀请请求,不代表所有用户已经出现在成员列表。需要审核时可能先产生申请事件;成员真正加入后再按 onGroupMemberAdded 合并。成员事件的完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", @@ -4957,7 +4957,7 @@ "description": "把一个或多个成员移出指定群。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members kick-group-member", - "content": "kickGroupMember 使用 OpenIMGroupInviteParams 相同结构定位成员和填写原因。 import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, reason: '成员调整', userIDList: 'user b' 这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。" + "content": "有权限的群主或管理员可以调用 kickGroupMember 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要移除成员的群组 ID。 | | reason | string | 是 | 移除原因;没有补充说明时传空字符串。 | | userIDList | string | 是 | 要移除的成员用户 ID 列表。 | import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, reason: '已离开项目', userIDList: targetUserID , 不能用该方法移除群主;应先转让群主身份。服务端会校验管理员能否操作目标成员。 Promise 成功表示移除请求已经完成。 onGroupMemberDeleted 随后可能到达,应按 groupID:userID 移除成员;完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", @@ -4965,7 +4965,7 @@ "description": "更新成员在指定群内的昵称。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-nickname", - "content": "setGroupMemberInfo 是成员资料统一更新入口。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', nickname: '项目负责人' 群昵称不同于用户全局昵称。只传本次字段,最终资料以 onGroupMemberInfoChanged 为准。" + "content": "群内昵称只影响指定群组中的成员资料,不会修改用户的账号昵称。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: targetUserID, nickname: '项目负责人', groupID 和 userID 共同定位目标成员。当前用户是否可以修改本人或其他成员的群内昵称,由 OpenIMServer 根据群角色和策略校验。 Promise 成功表示服务端完成请求;随后可能收到 onGroupMemberInfoChanged ,应按 groupID:userID 合并。完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", @@ -4973,7 +4973,7 @@ "description": "通过 setGroupMemberInfo 更新成员角色等级。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-role-level", - "content": "通过 roleLevel 更新群主、管理员或普通成员角色。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', roleLevel: 60 使用 OpenIMGroupMemberRoleLevel 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。" + "content": "通过 roleLevel 将普通群成员设置为管理员,或取消其管理员身份。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: targetUserID, roleLevel: 60, | roleLevel | 含义 | | | | | 20 | 普通群成员。 | | 60 | 群管理员。 | | 100 | 群主,只用于识别当前角色。 | 传入 60 可设置管理员,传入 20 可取消管理员身份。 OpenIMGroupMemberRoleLevel 的类型范围是 20 | 60 | 100 ,但不能通过写入 100 完成群主变更;请使用 转让群主 /zh/sdk/uniapp/group/managing group members/transfer group owner 。高风险角色变更应在 UI 中二次确认,最终权限由服务端校验。 Promise 成功后,通过 onGroupMemberInfoChanged 按 groupID:userID 合并,完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", @@ -4981,7 +4981,7 @@ "description": "通过 setGroupMemberInfo 更新成员在群内的头像。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-avatar", - "content": "通过 faceURL 更新群成员资料中的头像。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', faceURL: avatarURL 先把本地图片上传到业务可访问的 HTTPS 地址。不要传 unifile:// 或本地沙盒路径作为远端头像 URL。" + "content": "faceURL 是群成员资料中的头像地址,只作用于指定群组。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: targetUserID, faceURL: avatarURL, 群内头像与用户账号头像是不同数据。需要修改当前用户的账号头像时,使用 更新当前用户资料 /zh/sdk/uniapp/user/profile/set self info 。先把本地图片上传到业务可访问的 HTTPS 地址,不要把 unifile:// 或沙盒路径写入远端资料。 Promise 成功后,通过 onGroupMemberInfoChanged 按 groupID:userID 合并;完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", @@ -4989,7 +4989,7 @@ "description": "通过 setGroupMemberInfo 更新成员 ex。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-extension", - "content": "成员 ex 是整段业务扩展字符串。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', ex: JSON.stringify title: 'PM' 修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。" + "content": "ex 是完整字符串,SDK 不会自动合并 JSON。写入前应保留其他业务模块的命名空间。 import setGroupMemberInfo from '@/uni modules/unix openim sdk' const previous = JSON.parse member.ex || ' ' await setGroupMemberInfo groupID, userID: targetUserID, ex: JSON.stringify ...previous, title: 'maintainer', , 扩展字段对有权查看成员资料的用户可见,不要存放 Token 等秘密。 Promise 成功后,通过 onGroupMemberInfoChanged 按 groupID:userID 合并;完整监听见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", @@ -4997,7 +4997,7 @@ "description": "把群主权限转让给指定成员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members transfer-group-owner", - "content": "transferGroupOwner 是不可轻易撤销的高风险操作。 import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: 'user b' 目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。" + "content": "只有当前群主可以调用 transferGroupOwner 。 groupID 是目标群组 ID, newOwnerUserID 是新群主的用户 ID;目标用户必须是该群组中的有效成员。 import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: targetUserID, 调用后的状态变化 Promise 成功表示 OpenIMServer 已完成群主转让:原群主变为普通成员,新群主获得群主角色。成员角色变化通过 onGroupMemberInfoChanged 增量同步,事件参数是单个 OpenIMGroupMemberItem ;一次转让可能涉及原群主和新群主两条成员记录,均按 groupID:userID 合并。 完整监听和清理代码见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。不要只依赖事件数量判断转让结果;需要确认当前角色时,应重新调用 getSpecifiedGroupMembersInfo 获取相关成员快照。 群主需要退出群组时,必须先完成转让,再调用 quitGroup 。如果群组不再需要,群主也可以选择 dismissGroup ,但解散会影响所有成员,不能替代普通转让。UI 应提供二次确认并说明角色变化。" }, { "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", @@ -5005,7 +5005,7 @@ "description": "按秒设置指定群成员的禁言时长。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members change-group-member-mute", - "content": "changeGroupMemberMute 使用 mutedSeconds 设置禁言时长。 import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: 'user b', mutedSeconds: 3600 解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 目标群组 ID。 | | userID | string | 是 | 目标成员用户 ID。 | | mutedSeconds | number | 是 | 禁言时长,单位为秒;传 0 解除禁言。 | import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: targetUserID, mutedSeconds: 3600, 群主可以禁言管理员和普通成员;管理员只能禁言普通成员,最终权限由 OpenIMServer 校验。 Promise 成功表示服务端完成设置。最终状态以成员资料中的 muteEndTime 为准,不要只按提交的秒数推算。 onGroupMemberInfoChanged 的处理见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。" }, { "path": "/sdk/uniapp/group/check-full-sync-state", @@ -5021,7 +5021,7 @@ "description": "理解消息创建、发送、接收、历史、状态和进度事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message overview-message", - "content": "OpenIM 消息以 clientMsgID 作为客户端稳定标识,服务端消息还包含 serverMsgID 、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表。 创建消息只生成 OpenIMMessageItem ,不会发送;随后调用 sendMessage 指定 recvID 或 groupID 。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。" + "content": "uni app / uni app x 插件使用 OpenIMMessageItem 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表; conversationID 确定所属会话, clientMsgID 定位具体消息。 消息处理流程 | 阶段 | 主要操作 | 说明 | | | | | | 创建 | 调用对应的 create Message | 返回待发送的 OpenIMMessageItem ,不会写入服务端或触发新消息事件。 | | 发送 | 调用 sendMessage 或 sendMessageNotOss | 单聊填写 recvID ,群聊填写 groupID ;另一个目标字段传空字符串。 | | 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 clientMsgID 幂等合并。 | | 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | | 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | 从原生完整路径创建的图片、音频、视频和文件消息,通过 sendMessage 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 create MessageByURL 创建消息,再通过 sendMessageNotOss 发送,避免重复上传。 OpenIMMessageItem 返回结构 | 字段 | 类型 | 说明 | | | | | | clientMsgID | string \\| null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | | serverMsgID | string \\| null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | sessionType | OpenIMSessionType | 消息所属会话类型。 | | sendID 、 recvID 、 groupID | string \\| null | 发送者及单聊/群聊路由字段。 | | contentType | OpenIMMessageType | 消息内容类型,决定读取哪个 elem。 | | createTime 、 sendTime | number | 创建和发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | OpenIMPlatform | 发送端平台。 | | senderNickname 、 senderFaceUrl | string \\| null | 发送者资料快照。 | | status | OpenIMMessageStatus | 当前发送状态。 | | isRead | boolean | 当前已读状态快照。 | | offlinePush | OpenIMOfflinePush \\| null | 发送时的离线推送配置。 | | content 、 attachedInfo | string \\| null | SDK 序列化内容和附加信息。 | | ex | string \\| null | 随消息同步的扩展字符串。 | | localEx | string \\| null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 contentType 对应的字段中:文本使用 textElem ,图片/音频/视频/文件使用 pictureElem 、 soundElem 、 videoElem 、 fileElem ,@ 与回复使用 atTextElem 、 quoteElem ,合并与自定义消息使用 mergeElem 、 customElem ,名片/位置/表情使用 cardElem 、 locationElem 、 faceElem ,高级文本、输入状态和通知分别使用 advancedTextElem 、 typingElem 、 notificationElem 。不要通过展示文本或数组位置判断消息类型。 conversationID 用于确定所属会话,但不是 OpenIMMessageItem 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 conversationID:clientMsgID 合并。 创建不同内容的消息 | 内容 | 页面 | 注意事项 | | | | | | 文本与 Markdown | 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 、 创建 Markdown 消息 /zh/sdk/uniapp/message/creating messages/create markdown message | Markdown 内容需要由接收端安全渲染。 | | 群聊 @ 消息 | 创建 @ 消息 /zh/sdk/uniapp/message/creating messages/create text at message | 只能发送到群聊。 | | 图片、音频、视频和文件 | 使用完整路径创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message from full path 、 使用 URL 创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message by url | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | | 名片、位置与表情 | 创建名片消息 /zh/sdk/uniapp/message/creating messages/create card message 、 创建位置消息 /zh/sdk/uniapp/message/creating messages/create location message 、 创建表情消息 /zh/sdk/uniapp/message/creating messages/create face message | 创建时保存内容快照。 | | 回复、转发与合并 | 创建回复消息 /zh/sdk/uniapp/message/creating messages/create quote message 、 创建转发消息 /zh/sdk/uniapp/message/creating messages/create forward message 、 创建合并消息 /zh/sdk/uniapp/message/creating messages/create merger message | 创建结果仍需显式发送。 | | 自定义业务内容 | 创建自定义消息 /zh/sdk/uniapp/message/creating messages/create custom message | 接收端必须校验业务 schema。 | 只影响当前客户端展示的状态应写入 localEx ,不要放入需要同步给其他用户的业务内容,见 设置消息本地扩展 /zh/sdk/uniapp/message/managing messages/set message local ex 。 进度事件 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 removeProgressListeners 。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。 按任务查找页面 | 任务 | 页面 | | | | | 发送普通消息或已上传媒体 | 发送消息 /zh/sdk/uniapp/message/sending messages/send message 、 发送已上传的媒体消息 /zh/sdk/uniapp/message/sending messages/send message not oss | | 接收在线、离线和只在线消息 | 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages | | 加载历史或读取消息上下文 | 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 、 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context | | 按 ID 定位或搜索本地消息 | 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 、 搜索消息 /zh/sdk/uniapp/message/searching messages/search messages | | 删除、撤回、修改或置顶 | 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 、 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 、 置顶消息 /zh/sdk/uniapp/message/managing messages/set message pinned | | 群聊成员级已读 | 上报群消息已读 /zh/sdk/uniapp/message/managing read status/send group read receipts 、 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers | | 输入状态或语音识别 | 上报输入状态 /zh/sdk/uniapp/message/composing messages/update typing status 、 识别音频文字 /zh/sdk/uniapp/message/composing messages/transcribe audio | 状态同步边界 新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 、 维护总未读数 /zh/sdk/uniapp/conversation/managing conversations/get total unread count 和 获取会话列表 /zh/sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 中的事件处理器维护。" }, { "path": "/sdk/uniapp/message/creating-messages/create-text-message", @@ -5037,7 +5037,7 @@ "description": "在群聊中创建带 @ 用户信息的文本消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", - "content": "createTextAtMessage 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。 import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@Alice 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alice' , quoteMessage: null, 字段以 OpenIMCreateTextAtMessageParams 为准,用户列表和显示信息保持一致。商业版 getAtAllTag 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。 创建后仍需调用发送 API并填写目标群 ID。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 消息正文;建议使用稳定的 @userID 标记。 | | atUserIDList | string | 是 | 被提及用户 ID;@ 全体时先调用 getAtAllTag 获取专用标记。 | | atUsersInfo | OpenIMAtUsersInfoItem \\| null | 否 | 用户 ID 与群内展示名信息。 | | quoteMessage | OpenIMMessageItem \\| null | 否 | 被引用的原消息。 | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , Promise 成功只返回待发送的 OpenIMMessageItem | null 。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。 atUserIDList 与 atUsersInfo 中的用户应保持一致。 提及全体成员 不要在业务代码中写死全体成员标记。商业版先调用 getAtAllTag 商业版 取得当前标记,再将它同时放入正文和 atUserIDList : import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag 请查看群公告 , atUserIDList: atAllTag , getAtAllTag 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。" }, { "path": "/sdk/uniapp/message/creating-messages/create-custom-message", @@ -5045,7 +5045,7 @@ "description": "创建业务自定义消息或带实体范围的高级文本。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-custom-message", - "content": "createCustomMessage 用于双方已约定 schema 的业务载荷: import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify orderID: 'order 123' , extension: '', descriptionText: '订单卡片', data 、 extension 、 descriptionText 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。 createAdvancedTextMessage 使用 OpenIMCreateAdvancedTextMessageParams 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。" + "content": "createCustomMessage 适合订单、任务、邀请或投票等双方已约定 schema 的业务消息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | data | string | 是 | 业务载荷的完整字符串,通常保存序列化后的 JSON。 | | extension | string | 是 | 业务扩展信息的完整字符串。 | | descriptionText | string | 是 | 消息类型说明或不支持该类型时的降级展示文本。 | import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify schemaVersion: 1 , descriptionText: '任务卡片', data 是业务载荷, extension 是扩展信息, descriptionText 用于类型说明或降级展示。三者都会发给接收方,不能包含秘密;接收端应校验协议版本、大小和字段,再映射业务模型,不要执行不可信内容。 当前 uni app / uni app x 合同没有 Wasm 商业扩展中的 searchText 参数,不要传入该字段。Promise 成功只返回待发送的 OpenIMMessageItem | null ;发送与自定义业务事件是不同链路。 高级文本消息 createAdvancedTextMessage 使用 OpenIMCreateAdvancedTextMessageParams 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。" }, { "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", @@ -5061,7 +5061,7 @@ "description": "使用已上传图片的 elem 信息创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", - "content": "createImageMessageByURL 适合图片已由业务上传并取得可访问 URL 的场景。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const message = await createImageMessageByURL pictureElem OpenIMPictureElem 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。" + "content": "createImageMessageByURL 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 参数说明 | 参数 | 类型 | 说明 | | | | | | sourcePicture | OpenIMPicture \\| null | 原图信息。 | | bigPicture | OpenIMPicture \\| null | 大图信息。 | | snapshotPicture | OpenIMPicture \\| null | 缩略图信息。 | | sourcePath | string \\| null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段: uuid 、 type 、 size 、 width 、 height 和 url ,均为可选值;创建完整可展示消息时应填写真实上传结果。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", @@ -5077,7 +5077,7 @@ "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", - "content": "createSoundMessageByURL 接收完整 OpenIMSoundElem 。 import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL soundElem URL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。" + "content": "createSoundMessageByURL 使用已经上传的音频信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | uuid | string \\| null | 音频资源的唯一标识。 | | soundPath | string \\| null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | sourceUrl | string \\| null | 已上传音频的可访问地址。 | | dataSize | number \\| null | 音频大小,单位为字节。 | | duration | number \\| null | 音频时长,单位按服务端协议约定。 | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 OpenIMSoundElem 不包含 Wasm 版的 soundType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", @@ -5093,7 +5093,7 @@ "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", - "content": "createVideoMessageByURL 接收 OpenIMVideoElem 。 import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoElem 视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。" + "content": "createVideoMessageByURL 使用已经上传的视频和快照信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | videoPath | string \\| null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | duration | number \\| null | 视频时长。 | | videoType | string \\| null | 视频 MIME 类型。 | | videoUUID | string \\| null | 视频资源的唯一标识。 | | videoUrl | string \\| null | 已上传视频的可访问地址。 | | videoSize | number \\| null | 视频大小,单位为字节。 | | snapshotPath | string \\| null | 快照文件的本地名称或业务路径。 | | snapshotUUID | string \\| null | 快照资源的唯一标识。 | | snapshotSize | number \\| null | 快照大小,单位为字节。 | | snapshotUrl | string \\| null | 已上传快照的可访问地址。 | | snapshotWidth | number \\| null | 快照宽度,单位为像素。 | | snapshotHeight | number \\| null | 快照高度,单位为像素。 | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, 视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 OpenIMVideoElem 不包含 Wasm 版的 snapShotType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", @@ -5109,7 +5109,7 @@ "description": "使用已上传文件的 OpenIMFileElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", - "content": "createFileMessageByURL 接收 OpenIMFileElem 。 import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL fileElem 文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。" + "content": "createFileMessageByURL 使用已经上传的文件信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | filePath | string \\| null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | | fileName | string \\| null | 对外展示的文件名。 | | uuid | string \\| null | 文件资源的唯一标识。 | | sourceUrl | string \\| null | 已上传文件的可访问地址。 | | fileSize | number \\| null | 文件大小,单位为字节。 | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, 文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 OpenIMFileElem 不包含 Wasm 版的 fileType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null 。由于资源已经上传,发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-card-message", @@ -5117,7 +5117,7 @@ "description": "使用 OpenIMCardElem 创建用户名片消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", - "content": "createCardMessage 接收 OpenIMCardElem 。 import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '', 名片是发送时快照,接收方点击后应按 userID 查询最新资料。不要把名片字段当作可信身份认证。" + "content": "参数说明 createCardMessage 接收 OpenIMCardElem 。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: | 参数 | 类型 | 建议 | 说明 | | | | | | | userID | string \\| null | 必填 | 名片对应的用户 ID。 | | nickname | string \\| null | 必填 | 名片中保存的展示名称。 | | faceURL | string \\| null | 必填 | 名片中保存的头像地址。 | | ex | string \\| null | 必填 | 名片扩展信息;没有内容时传空字符串。 | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', Promise 成功只创建 OpenIMMessageItem | null ,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 userID 查询最新资料,也不要把名片字段当作可信身份认证。" }, { "path": "/sdk/uniapp/message/creating-messages/create-location-message", @@ -5125,7 +5125,7 @@ "description": "使用经纬度和描述创建位置消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-location-message", - "content": "createLocationMessage 使用描述、经度和纬度。 import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: '会议室 A', longitude: 121.47, latitude: 31.23, 调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | descriptionText | string | 是 | 位置名称或地址描述。 | | longitude | number | 是 | 经度。 | | latitude | number | 是 | 纬度。 | import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: '上海市浦东新区', longitude: 121.4737, latitude: 31.2304, 业务层应在获得用户授权后获取定位,并根据产品隐私规则控制精度。位置属于敏感数据,发送前明确提示接收范围,不要在日志中记录精确坐标。Promise 成功只返回待发送的 OpenIMMessageItem | null 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-face-message", @@ -5165,7 +5165,7 @@ "description": "把多条消息合并为摘要与消息列表。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-merger-message", - "content": "createMergerMessage 使用标题、摘要和原消息列表创建合并转发。 import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: '聊天记录', abstractList: 'Alice: 方案已确认' , 摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | messageList | OpenIMMessageItem | 是 | 要合并的已发送消息列表。 | | title | string | 是 | 合并消息卡片标题。 | | abstractList | string | 是 | 卡片摘要列表。 | import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: '项目讨论记录', abstractList: selectedMessages.slice 0, 4 .map buildSummary , Promise 成功只返回新的待发送对象,不修改原消息。摘要由业务生成但不可与实际消息矛盾,应为无法解析的消息类型提供降级文本。转发前检查每条消息的可分享权限和敏感信息;大型列表还应限制条数与总大小。" }, { "path": "/sdk/uniapp/message/sending-messages/send-message", @@ -5181,7 +5181,7 @@ "description": "发送已经准备好远端资源信息的消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", - "content": "sendMessageNotOss 与 sendMessage 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。 import sendMessageNotOss from '@/uni modules/unix openim sdk' const sent = await sendMessageNotOss message, recvID, groupID 只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 sendMessage 。" + "content": "sendMessageNotOss 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | | offlinePushInfo | OpenIMOfflinePush \\| null | 否 | 离线推送标题、描述和平台配置。 | | isOnlineOnly | boolean \\| null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, 资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 OpenIMMessageItem ,应用按 clientMsgID 合并返回对象;字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 sendMessage 。" }, { "path": "/sdk/uniapp/message/receiving-messages/receive-messages", @@ -5189,7 +5189,7 @@ "description": "订阅单条、批量、离线和只在线消息事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-messages", - "content": "不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 conversationID:clientMsgID 去重。 import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const newMessageSubscription = onRecvNewMessage message = mergeMessage message const subscriptions : Array = newMessageSubscription, onRecvOfflineNewMessage message = mergeMessage message , onRecvOnlineOnlyMessage message = mergeOnlineOnlyMessage message , onRecvNewMessages result = result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = result.messages.forEach mergeMessage , subscriptions.forEach subscription = off subscription 只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。" + "content": "消息页通常同时处理实时新消息、应用进入后台后到达的离线消息、只在线投递的消息,以及首次进入会话时主动读取的历史消息。事件提供增量,历史 API 按 conversationID 建立快照。 不同 Core 版本或恢复路径可能使用单条或批量事件。为保证完整性,可以同时订阅五个入口,但必须按 conversationID:clientMsgID 去重。在组件卸载、退出登录或切换账号前使用订阅句柄调用 off ,避免同一批消息被重复合并。 消息类型 每条 OpenIMMessageItem 根据 contentType 和对应 elem 选择渲染方式:文本读取 textElem ,@ 文本读取 atTextElem ,自定义消息读取 customElem ,图片、音频、视频和文件分别读取对应媒体 elem。未知类型应显示降级内容,而不是执行未校验的 content 。 function renderMessage message : OpenIMMessageItem if message.textElem = null return renderTextMessage message if message.atTextElem = null return renderMentionMessage message if message.customElem = null return renderCustomMessage message if message.pictureElem = null || message.soundElem = null || message.videoElem = null || message.fileElem = null return renderFileLikeMessage message return renderUnsupportedMessage message 消息事件可能包含当前用户没有打开的会话。 OpenIMMessageItem 不直接提供 conversationID ;应根据 sessionType 、 sendID 、 recvID 和 groupID 计算或查询目标会话,再按 clientMsgID 去重。 function mergeMessage message : OpenIMMessageItem const targetConversationID = getConversationIDForMessage message if targetConversationID.length == 0 return mergeMessageByClientMsgID targetConversationID, message 图片、音频、视频和文件消息 接收端无需重新上传文件,只需读取消息中已有的资源地址、大小、名称、时长或快照图并展示。如果产品一次发送多个文件,通常连续发送多条文件消息,或用一条经过版本校验的自定义消息承载文件组;每条消息仍以 clientMsgID 作为稳定标识。 事件处理器 import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage, type OpenIMMessageItem, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const newMessageSubscription = onRecvNewMessage message = if message = null mergeMessage message const subscriptions : Array = newMessageSubscription, onRecvOfflineNewMessage message = if message = null mergeMessage message , onRecvOnlineOnlyMessage message = if message = null mergeOnlineOnlyMessage message , onRecvNewMessages result = if result = null result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = if result = null result.messages.forEach mergeMessage , function removeMessageListeners subscriptions.forEach subscription = off subscription onRecvNewMessages 和 onRecvOfflineNewMessages 返回 OpenIMMessageListResult | null ,其中 messages 是数组;三个单条事件返回 OpenIMMessageItem | null 。单数和复数入口可能描述同一消息,所以不能按事件次数插入。 调用 setAppBackgroundStatus true 后到达的消息通常走离线入口;回到前台时再设置为 false 。离线消息与实时消息复用同一个合并函数,筛选当前会话、按 clientMsgID 去重并保持时间顺序。 只在线消息由发送方设置 isOnlineOnly: true 。它不会进入 SDK 本地消息存储,也不能通过历史接口回放,通常只适合临时提示或业务通知;是否加入当前界面由产品规则决定,不应把它当作可靠聊天记录。 本页是五个接收事件的完整归属页。先根据消息路由字段确定会话,再用“目标会话 + clientMsgID ”幂等合并。不要在多个页面重复注册同一组全局事件,推荐由消息 store 统一持有;状态层销毁时调用 removeMessageListeners 。 撤回消息通过 onNewRecvMessageRevoked 更新为撤回态,处理见 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 。 首次进入会话时读取历史 事件只负责新到达的消息。首次进入会话、向上翻页或需要补齐断线期间的列表时,应另外读取历史快照,参数和返回结构见 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 。历史结果和事件可能包含同一条消息,两条路径必须使用相同的去重规则。 如果事件注册在全局消息状态层,不要在每次进入同一个聊天页面时重复注册。需要显示当前会话历史时,只读取该会话的边界快照;重新登录后的消息变化由新的登录作用域事件同步,不要把事件到达视为某次历史查询的完成回调。 将群聊会话标记为已读 用户进入群聊并看到最新消息后,可以清理会话未读数。这个操作不等同于群消息成员级已读回执,调用方式见 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 。会话列表和总未读角标分别由会话域事件最终同步。 验证接收流程 用另一个已登录账号向目标会话发送消息,确认前台入口收到且列表只渲染一次。 设置后台状态后再次发送,确认离线入口合并;回到前台后恢复状态。 发送只在线消息,确认它不会进入本地历史。 撤回一条消息,确认对应 clientMsgID 更新为撤回态。 标记会话已读,确认会话未读数和总角标随事件更新。 测试单条和批量入口时,只断言每个 clientMsgID 最终出现一次,不应要求固定使用某一个入口。后台恢复测试还应确认前后台状态调用成对执行,退出账号后旧订阅不再改变新账号状态。 相关页面 消息概览 /zh/sdk/uniapp/message/overview message 发送消息 /zh/sdk/uniapp/message/sending messages/send message 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read" }, { "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", @@ -5205,7 +5205,7 @@ "description": "按会话和 clientMsgID 游标读取历史消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", - "content": "公共入口 getAdvancedHistoryMessageList 读取历史: import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: '', count: 50, 第一页用空 startClientMsgID ,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 clientMsgID 去重。 商业版 getHistoryMessageList 商业版 额外支持 isReverse 、 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" + "content": "聊天页面进入会话时使用公共入口 getAdvancedHistoryMessageList 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 clientMsgID 作为下一页游标。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | lastMinSeq | number \\| null | 否 | 上一页返回的最小序号,用于连续分页。 | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, 返回结果 Promise 成功后,结果是 OpenIMAdvancedHistoryMessageListResult | null : | 字段 | 类型 | 说明 | | | | | | messageList | OpenIMMessageItem | 当前页消息。 | | lastMinSeq | number | 继续读取时传回的最小序号。 | | isEnd | boolean | 是否到达当前加载方向的历史边界。 | | errCode | number | 历史读取结果状态码。 | | errMsg | string | 与状态码对应的说明。 | 只有 errCode 表示成功时才合并 messageList ;Promise 被拒绝时仍按通用错误处理。按 conversationID 限定列表,并以 clientMsgID 去重;查询不会触发新消息事件。 商业版 getHistoryMessageList 商业版 额外要求 isReverse ,并支持可选 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" }, { "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", @@ -5213,7 +5213,7 @@ "description": "在多个会话中按 clientMsgID 批量定位消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages find-messages-by-id", - "content": "findMessageList 接收查询数组,每项包含会话 ID 与消息 ID 列表。 import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: 'msg a', 'msg b' , 返回 OpenIMFindMessageResult ,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。" + "content": "搜索结果、引用消息或通知跳转应保存消息的 conversationID 和 clientMsgID ,再用 findMessageList 取回本地已经同步的消息。 参数说明 findMessageList 接收查询条件数组,每一项结构如下: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | items .conversationID | string | 是 | 目标消息所属的会话 ID。 | | items .clientMsgIDList | string | 是 | 要在该会话中查找的消息 ID。 | import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: clientMsgID , const targetMessage = result?.findResultItems 0 ?.messageList 0 Promise 成功后,结果是 OpenIMFindMessageResult | null ,包含 totalCount 和 findResultItems 。每个结果项提供 conversationID 、 conversationType 、会话展示资料、 messageCount 和 messageList 。 一次调用可以包含多个会话条件。不要假设响应项与输入数组位置一致,应按结果的 conversationID 和消息的 clientMsgID 对应。缓存未同步、消息已删除或 ID 不存在时可能没有结果;查询不会触发消息事件。需要加载消息前后文时使用 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context 。" }, { "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", @@ -5221,7 +5221,7 @@ "description": "商业版围绕一条锚点消息读取前后文。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-message-context", - "content": "fetchSurroundingMessages 商业版 围绕完整锚点消息读取前后文。 import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20, viewType 使用产品/合同定义值。结果与实时事件可能重复,按 clientMsgID 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。" + "content": "从搜索结果或引用消息跳入聊天上下文时,把已经取得的完整 OpenIMMessageItem 作为锚点。 fetchSurroundingMessages 属于 商业版 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | startMessage | OpenIMMessageItem | 是 | 已经取得的锚点消息。 | | viewType | number | 是 | 上下文查看方向,使用服务端约定值。 | | before | number | 是 | 锚点之前最多读取的消息数量。 | | after | number | 是 | 锚点之后最多读取的消息数量。 | import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20, const surroundingMessages = result?.messages ?? Promise 成功后, result?.messages 是锚点前后取得的 OpenIMMessageItem ,字段见 消息概览 /zh/sdk/uniapp/message/overview message 。当前 uni app / uni app x 返回字段名是 messages ,不是 Wasm 的 messageList 。 before 和 after 分别限制锚点前后的数量。返回结果可能少于请求总数,例如锚点靠近边界或部分消息已删除。结果与实时事件可能重复,应按 conversationID:clientMsgID 去重并保持时间顺序。不要使用只包含 ID 的伪消息作为锚点;需要先定位时见 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 。" }, { "path": "/sdk/uniapp/message/searching-messages/search-messages", @@ -5229,7 +5229,7 @@ "description": "按关键词、发送者、类型和时间范围搜索消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", - "content": "searchLocalMessages 在 SDK 本地数据中搜索。 import searchLocalMessages from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: '发布' , keywordListMatchType: 0, senderUserIDList: , messageTypeList: , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 50, 匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。" + "content": "searchLocalMessages 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 conversationID ,不是发送消息时使用的 groupID ;如果只保存了群 ID,先按 获取会话 ID /zh/sdk/uniapp/conversation/retrieving conversations/get conversation id 取得群会话 ID。 搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 conversationID 和 clientMsgID 返回客户端定位。 创建搜索查询 keywordList 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, 高级搜索 可以使用发送者、消息类型和时间窗口缩小范围。当前 OpenIMSearchLocalMessagesParams 除 conversationID 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 0 。 const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string \\| null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | keywordList | string | 是 | 关键词列表。 | | keywordListMatchType | number | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | senderUserIDList | string | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | | messageTypeList | OpenIMMessageType | 是 | 只搜索指定类型;不限制时传空数组。 | | searchTimePosition | number | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | | pageIndex | number | 是 | 搜索结果页码,第一页传 1 。 | | count | number | 是 | 每页返回数量。 | 如果搜索入口允许图片、文件或自定义消息,把相应 OpenIMMessageType 常量加入 messageTypeList 。匹配类型、时间单位和页码必须服从合同及服务端约定。 处理分页结果 Promise 成功后,结果是 OpenIMSearchMessageResult | null : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下匹配的消息总数。 | | searchResultItems | OpenIMSearchMessageResultItem | 按会话分组的搜索结果。 | 每个结果项包含: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 结果所属会话 ID。 | | conversationType | OpenIMSessionType | 会话类型。 | | showName 、 faceURL | string | 会话展示名称与头像快照。 | | latestMsgSendTime | number \\| null | 当前结果会话的最新消息时间。 | | messageCount | number | 当前结果项的匹配消息数量。 | | messageList | OpenIMMessageItem | 匹配消息。 | 可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message, return rows 分页时保持相同的会话、关键词和筛选条件,只递增 pageIndex 。用户修改任一条件时,把页码重置为 1 并清空旧结果。同一搜索页按 conversationID:clientMsgID 去重,不要按结果位置保存选中项。查询不会触发消息事件。 处理搜索结果变化 命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages 、 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 和 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message ;本页只负责查询和分页,不重复注册消息事件。 跳转时使用结果中的 conversationID 和 clientMsgID 定位。需要展示前后聊天记录时,把命中的完整 OpenIMMessageItem 作为起点读取 消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context ,不要用 findMessageList 拼接附近记录。 需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 相关页面 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/composing-messages/update-typing-status", @@ -5253,7 +5253,7 @@ "description": "商业版查询当前语音转写能力。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", - "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities 在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。" + "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities Promise 成功后,结果是 OpenIMSpeechToTextCapabilitiesResult | null : | 字段 | 类型 | 说明 | | | | | | format | string \\| null | 支持的音频格式。 | | sampleRateHz | number \\| null | 支持的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number \\| null | 最大录音时长,单位为毫秒。 | | maxFileSize | number \\| null | 最大文件大小,单位为字节。 | | provider | string \\| null | 当前语音识别服务提供方。 | | requestType | string \\| null | 服务端要求的请求类型。 | | crossDomain | boolean \\| null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。" }, { "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", @@ -5261,7 +5261,7 @@ "description": "商业版提交音频文件名和数据进行语音转写。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages transcribe-audio", - "content": "speechToText 商业版 使用文件名和音频数据。 import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText filename: 'voice.m4a', data: audioBase64 先检查能力,限制音频大小和格式。 data 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。" + "content": "speechToText 商业版 使用文件名和音频数据。原生文件不能直接作为 UTS 跨层参数,需按商业服务协议编码为字符串再提交。 import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText filename: 'voice.m4a', data: audioBase64, if result?.text = null setTranscript result.text Promise 成功返回 OpenIMSpeechToTextResult | null ,其中 text 是可选的识别文本。调用前先 查询语音识别能力 /zh/sdk/uniapp/message/composing messages/check speech to text ,限制音频大小、格式、采样率和时长。 data 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写不会自动修改原语音消息,也不触发消息事件。转写结果需要用户确认,不用于高风险自动决策;需要本地保存结果时见 保存语音转写结果 /zh/sdk/uniapp/message/composing messages/save local transcript 。" }, { "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", @@ -5293,7 +5293,7 @@ "description": "商业版批量删除消息,并处理 onMsgDeleted。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-saved-messages", - "content": "deleteMessages 商业版 批量删除明确指定的消息。本页归属公共 onMsgDeleted 事件。 import deleteMessages, off, onMsgDeleted, from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = removeMessageByID message.clientMsgID await deleteMessages deleteParams off deletedSubscription deleteParams 使用锁定的 OpenIMDeleteMessagesParams ,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。" + "content": "deleteMessages 商业版 批量删除当前账号在同一会话中明确指定的消息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要删除消息所在的会话 ID。 | | clientMsgIDs | string | 是 | 要删除的消息 ID;同一批 ID 必须属于同一会话。 | | IsSync | boolean | 是 | 是否把删除动作同步到当前账号的其他客户端;字段名首字母为大写。 | import deleteMessages, off, onMsgDeleted, from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = if message == null return removeMessage resolveConversationID message , message.clientMsgID await deleteMessages conversationID, clientMsgIDs: selectedMessageIDs, IsSync: true, function removeMessageDeletedListener off deletedSubscription IsSync: false 删除当前设备及当前账号服务端记录; true 还请求把删除动作同步到其他客户端。它不会删除其他会话成员的副本,也不会产生撤回提示。 Promise 成功表示删除请求已经完成;同步开启时,这不代表其他客户端已经收到事件或完成界面更新。公共事件 onMsgDeleted 是本页归属事件,参数是 OpenIMMessageItem | null ;结合消息路由确定会话后按 clientMsgID 幂等移除。组件卸载、退出登录或切换账号时调用 removeMessageDeletedListener ;需要校准时重新查询对应会话的历史消息。" }, { "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", @@ -5309,7 +5309,7 @@ "description": "撤回指定消息,并处理消息撤回事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages revoke-a-message", - "content": "revokeMessage 使用会话和客户端消息 ID。 import off, onNewRecvMessageRevoked, revokeMessage, from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked info = mergeRevokedInfo info await revokeMessage conversationID, clientMsgID off revokedSubscription 服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。" + "content": "如果界面需要让其他会话成员看到“消息已撤回”,使用 revokeMessage ,不要用普通删除替代。删除只影响当前账号侧可见性,见 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 。修改已发送消息内容见 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 。 撤回一条消息 revokeMessage 接收消息所在的 conversationID 和目标 clientMsgID : import off, onNewRecvMessageRevoked, revokeMessage, from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked info = if info == null return markMessageRevoked info.clientMsgID, info await revokeMessage conversationID, clientMsgID function removeRevokeListener off revokedSubscription Promise 成功后,调用端可以先把当前列表中的同 clientMsgID 消息更新为撤回态。在线客户端随后通过 onNewRecvMessageRevoked 收到撤回信息,接收端应更新对应气泡,而不是直接从列表中删除。 允许撤回的发送者、时间窗口和消息类型由 OpenIMServer 校验;调用失败时不要只在本地保留撤回展示。Promise 成功代表当前请求已完成,不代表所有端界面已经更新。 返回结果 revokeMessage 成功直接返回字符串结果,不返回被撤回消息对象。调用端继续使用请求中的 clientMsgID 更新本地气泡,并以撤回事件校准其他客户端状态。 监听撤回事件 本页是 onNewRecvMessageRevoked 的完整监听示例归属页。事件参数是 OpenIMMessageRevokedItem | null ,使用 clientMsgID 合并; isAdminRevoke 表示是否由管理员撤回,可用于选择系统提示文案。事件可能先于 Promise 到达,处理必须幂等。 组件卸载、退出登录或切换账号时调用 removeRevokeListener ;重新登录后的撤回变化由消息事件同步。 相关页面 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 发送消息 /zh/sdk/uniapp/message/sending messages/send message 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/managing-messages/modify-a-message", @@ -5317,7 +5317,7 @@ "description": "商业版修改消息,并处理 modified/edited raw 事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages modify-a-message", - "content": "modifyMessage 、 onMessageModified 和 onMessageEdited 属于 商业版 。两个事件都是 raw 字符串。 import modifyMessage, off, onMessageEdited, onMessageModified, from '@/uni modules/unix openim sdk' const modifiedSubscription = onMessageModified payload = refreshModifiedMessage payload const editedSubscription = onMessageEdited payload = refreshModifiedMessage payload const result = await modifyMessage modifyParams off modifiedSubscription off editedSubscription modifyParams 按 OpenIMModifyMessageParams 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。" + "content": "modifyMessage 商业版 用于修改一条已存在消息的内容。它和 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 不同:删除影响当前账号可见性,撤回让会话成员看到撤回态,修改则替换消息内容并同步给其他客户端。 修改消息内容 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所属的会话 ID。 | | message | OpenIMMessageItem | 是 | 修改后的完整消息对象;必须保留原 clientMsgID 。 | import modifyMessage, off, onMessageEdited, onMessageModified, from '@/uni modules/unix openim sdk' const modifiedSubscription = onMessageModified payload = refreshModifiedMessage payload const editedSubscription = onMessageEdited payload = refreshModifiedMessage payload const result = await modifyMessage conversationID, message: buildEditedMessage message, editedText , if result?.message = null replaceMessage result.message function removeMessageModifiedListeners off modifiedSubscription off editedSubscription 该方法不是局部更新。应从当前消息复制并只修改目标内容,保留 clientMsgID 和其他消息字段。允许修改的发送者、时间窗口和消息类型由 OpenIMServer 校验;失败时不要只在本地保留编辑结果。 返回结果 Promise 成功后, result?.message 是服务端确认的修改后 OpenIMMessageItem | null 。调用端可先用返回值替换当前列表中的同 clientMsgID 消息;这不代表所有端界面已经更新。 监听消息修改 onMessageModified 和 onMessageEdited 都属于 商业版 ,参数是 raw JSON 字符串。部署可能按版本使用其中一种,若同时监听必须按稳定消息 ID 和版本去重。先验证 JSON,再查询或替换消息;不要记录完整正文。组件卸载、退出登录或切换账号时调用 removeMessageModifiedListeners ,多端编辑按服务端最终版本解决冲突。 相关页面 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 发送消息 /zh/sdk/uniapp/message/sending messages/send message 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", @@ -5333,7 +5333,7 @@ "description": "商业版修改会话消息置顶状态并处理变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-pinned", - "content": "setConversationPinnedMsg 与 onChangedPinnedMsg 属于 商业版 。 import off, onChangedPinnedMsg, setConversationPinnedMsg, from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg pinParams off pinnedSubscription 参数使用 OpenIMSetConversationPinnedMsgParams 。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。" + "content": "setConversationPinnedMsg 与 onChangedPinnedMsg 属于 商业版 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 消息所在的会话 ID。 | | clientMsgID | string | 是 | 要置顶或取消置顶的消息 ID。 | | pinned | boolean | 是 | true 表示置顶, false 表示取消置顶。 | import off, onChangedPinnedMsg, setConversationPinnedMsg, from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg conversationID, clientMsgID: message.clientMsgID, pinned: true, function removePinnedListener off pinnedSubscription 权限、消息类型和数量限制由 OpenIMServer 校验。Promise 成功表示置顶请求已完成,不表示变化事件已经到达。 本页唯一归属 onChangedPinnedMsg 。事件是 raw JSON 字符串,应先校验,再按 conversationID 替换置顶集合并按消息 clientMsgID 去重;不要把未验证 payload 强转为消息对象。组件卸载、退出登录或切换账号时调用 removePinnedListener 。" }, { "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", @@ -5341,7 +5341,7 @@ "description": "把业务生成的消息插入单聊本地历史。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-single-message", - "content": "insertSingleMessageToLocalStorage 只写当前设备本地数据库,不发送给对方。 import insertSingleMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertSingleMessageToLocalStorage insertParams insertParams 使用真实 OpenIMInsertSingleMessageParams ,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | OpenIMMessageItem | 是 | 要写入本地数据库的完整消息对象。 | | recvID | string | 是 | 单聊接收方的用户 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | import createTextMessage, insertSingleMessageToLocalStorage, from '@/uni modules/unix openim sdk' const message = await createTextMessage '本地提示' if message = null await insertSingleMessageToLocalStorage message, recvID: targetUserID, sendID: currentUserID, Promise 成功只表示当前设备本地数据库已写入,不发送消息,也不触发新消息事件。 createTextMessage 只是准备参数,其正文归属 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 页面。该能力适合系统迁移或本地提示,不用于伪造已发送消息,并应确保消息 ID 不与现有记录冲突。" }, { "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", @@ -5349,7 +5349,7 @@ "description": "把业务生成的消息插入群聊本地历史。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-group-message", - "content": "insertGroupMessageToLocalStorage 只写本机群聊历史。 import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage insertParams 参数使用 OpenIMInsertGroupMessageParams ,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | message | OpenIMMessageItem | 是 | 要写入本地数据库的完整消息对象。 | | groupID | string | 是 | 目标群组 ID。 | | sendID | string | 是 | 消息发送方的用户 ID。 | import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage message, groupID, sendID: currentUserID, Promise 成功只修改当前设备的本地数据库,不发送给群成员,也不触发新消息事件。适合迁移或本地提示,不应用于伪造服务端已投递消息;需要服务端投递、离线推送或多端同步时使用发送 API。" }, { "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", @@ -5373,7 +5373,7 @@ "description": "更新一条消息在当前设备的 localEx。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-local-ex", - "content": "setMessageLocalEx 使用会话和消息 ID 更新本地扩展。 import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify localState localEx 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。" + "content": "localEx 只保存在当前客户端,适合折叠、选中或本地来源标记,不会同步给其他用户或设备。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 目标消息所在的会话 ID。 | | clientMsgID | string | 是 | 目标消息 ID。 | | localEx | string | 是 | 要写入的完整字符串。 | import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify selected: true , Promise 成功表示本地数据已更新。该方法不会自动合并旧 JSON,也不会触发共享消息事件;需要保留旧字段时先在业务层合并,并限制大小。不要在 localEx 中存放 Token 或不可恢复的重要业务数据。" }, { "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", @@ -5381,7 +5381,7 @@ "description": "商业版发送群消息已读回执并处理 raw 回执事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status send-group-read-receipts", - "content": "sendGroupMessageReadReceipt 与 onRecvGroupReadReceipt 属于 商业版 。 import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt payload = refreshReadState payload await sendGroupMessageReadReceipt receiptParams off receiptSubscription 参数使用 OpenIMSendGroupMessageReadReceiptParams 。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。" + "content": "sendGroupMessageReadReceipt 与 onRecvGroupReadReceipt 属于 商业版 。 import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt, from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt payload = mergeValidatedGroupReadReceipt payload await sendGroupMessageReadReceipt conversationID, clientMsgIDs: visibleUnreadMessageIDs, function removeGroupReadReceiptListener off receiptSubscription 同一批消息必须属于目标群会话。Promise 成功只表示服务端接受上报,不等于其他客户端界面已更新;会话未读数仍由 markConversationMessageAsRead 独立维护。 其他客户端通过 raw JSON 事件 onRecvGroupReadReceipt 接收群聊成员级已读变化。本页是该事件的完整监听归属页;先校验 JSON,再按 conversationID + clientMsgID 合并消息的已读计数、未读计数和成员信息。组件卸载、退出登录或切换账号时调用 removeGroupReadReceiptListener 。 上报 Promise、群回执事件和 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers 得到的成员快照是三个独立阶段。" }, { "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", @@ -5389,7 +5389,7 @@ "description": "商业版分页查询读过指定群消息的成员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status get-group-message-readers", - "content": "getGroupMessageReaderList 商业版 使用 OpenIMGetGroupMessageReaderListParams 查询。 import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList readerParams 按返回 DTO 的分页字段继续加载,并按 userID 去重。已读成员数据可能随新回执变化,打开详情时重新查询。" + "content": "getGroupMessageReaderList 商业版 分页查询指定群消息的已读或未读成员。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 群聊会话 ID。 | | clientMsgID | string | 是 | 要查询阅读成员的消息 ID。 | | filter | number | 是 | 0 查询已读成员, 1 查询未读成员。 | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次请求的成员数量。 | import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList conversationID, clientMsgID, filter: 0, offset: 0, count: 50, const readers = result?.readers ?? Promise 成功后, result?.readers 是当前页 OpenIMGroupMemberItem ,字段含义见 分页查询群成员 /zh/sdk/uniapp/group/retrieving group members/get group member list 。按 groupID:userID 去重,需要完整列表时继续增加 offset 分页。 查询建立调用时快照,不触发回执事件。已读成员数据可能随新回执变化,打开详情时应重新查询。" }, { "path": "/sdk/uniapp/file-uploads/upload-file", @@ -5397,7 +5397,7 @@ "description": "上传本地文件、观察进度,并在商业版取消上传。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", - "content": "uploadFile 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。 import uploadFile from '@/uni modules/unix openim sdk' const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', 路径必须是原生可读的完整路径。 unifile:// 先转换;不要把网络 URL 作为 filepath 。上传进度由 消息概览 /sdk/uniapp/message/overview message 归属的 onUploadFileProgress 提供。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" + "content": "uploadFile 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filepath | string | 是 | 原生层可读取的本地完整路径。 | | name | string | 是 | 文件名。 | | contentType | string | 是 | MIME 类型。 | | uuid | string | 是 | 业务为本次上传生成的稳定任务 ID。 | | cancelID | string \\| null | 否 | 用于取消本次上传的稳定 ID。 | | cause | string \\| null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 uploadFile 前注册进度事件,避免较小文件在监听建立前完成上传。 import off, onUploadFileProgress, uploadFile, from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription 路径必须是原生可读的完整路径。 unifile:// 先转换为平台沙盒路径;不要把网络 URL 作为 filepath 。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 返回结果 Promise 成功后,结果是 OpenIMUploadFileResult | null : | 字段 | 类型 | 说明 | | | | | | url | string \\| null | 上传后的远端资源 URL。 | | uri | string \\| null | 服务端返回的资源 URI。 | | uuid | string \\| null | 本次上传的任务标识。 | | size | number \\| null | 文件大小。 | | typ | number \\| null | 服务端返回的资源类型。 | | mediaID | string \\| null | 媒体资源 ID。 | 使用 result?.url 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 监听上传进度 onUploadFileProgress 返回 OpenIMSDKEventSubscription ,事件只包含 progress 。当前 uni app / uni app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 removeUploadListener 。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" }, { "path": "/sdk/uniapp/calling/overview-calling", @@ -5405,7 +5405,7 @@ "description": "商业版通话邀请、房间凭据、事件和 AV Runtime 的职责边界。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling overview-calling", - "content": "本节全部能力属于 商业版 ,要求商业版 OpenIMServer 信令服务。 unix openim sdk 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。 需要完整通话与会议 UI 时,另行集成 openim av runtime 。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。 典型流程: 1. 应用登录 IM,并注册全部信令事件。 2. 主叫构造 OpenIMSignalingInvitationInfo 后调用邀请。 3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。 4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。 5. 双方使用返回的 room/token/liveURL 建立媒体连接。 6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。 同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。" + "content": "本节全部能力属于 商业版 ,要求商业版 OpenIMServer 信令服务。 unix openim sdk 提供发起邀请、接受、拒绝、取消、挂断、查询房间和同步通话状态所需的信令 API。它负责协调参与者、房间信息和通话生命周期,不负责采集摄像头画面、播放远端媒体流或渲染通话界面。 应用需要把返回的 roomID 、 token 和 liveURL 交给所选的实时音视频媒体引擎,并自行处理设备权限、媒体轨道、弱网策略和界面状态。信令 API 不是一套完整的 WebRTC 媒体 SDK。需要完整通话与会议 UI 时,可另行集成 openim av runtime ;AV Runtime 复用本插件的唯一登录态,不初始化第二套 OpenIM Core。 通话流程 1. 应用登录 IM 并注册全部信令事件,调用 signalingInvite 发起单聊通话,或调用 signalingInviteInGroup 发起群聊通话。 2. 被邀请方从 onReceiveNewInvitation 获取 raw JSON 邀请,校验并映射为 OpenIMSignalingInvitationInfo 后展示来电。 3. 接受方先申请媒体权限,再调用 signalingAccept ;拒绝则调用 signalingReject 。 4. 双方使用返回的 roomID 、 token 和 liveURL 接入媒体引擎。 5. 通话过程中根据参与者、媒体流和自定义信令事件更新本地状态。 6. 发起方可以取消尚未接通的邀请;任一参与者都可以挂断已经建立的通话。 核心数据 | 数据 | 说明 | | | | | OpenIMSignalingInvitationInfo | 邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 | | OpenIMSignalingInviteResult | OpenIMServer 返回的 roomID 、 token 、 liveURL 和忙线用户列表。 | | OpenIMSignalingAcceptResult 、 OpenIMSignalingGetTokenByRoomIDResult | 接受邀请或重新获取 Token 时返回的媒体房间凭据。 | | OpenIMSignalingGetRoomByGroupIDResult | 按群组查询到的 roomID 和原始邀请快照。 | customData 和自定义信令只适合传递业务可公开的协商信息。不要在其中写入长期凭据、管理员密钥或其他敏感数据。 状态更新与事件归属 发起、接受、拒绝、取消和挂断等写操作需要分别处理 API 的 Promise 结果与通话事件。Promise 成功表示 OpenIMServer 已接受或完成当前信令请求;事件反映邀请方、被邀请方、其他设备或房间参与者看到的增量状态,两者不是同一个完成信号。 信令事件参数是 raw JSON 字符串,必须先校验再进入应用状态。邀请生命周期、成员进出房间、挂断和媒体流变化的完整监听统一见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events ;自定义信令事件见 发送自定义信令 /zh/sdk/uniapp/calling/sending custom signals/send a custom signal 。查询房间、重新获取 Token 和恢复待处理邀请只通过 Promise 返回调用时的快照。 概览页不注册事件处理器。通话状态以 roomID 为主键,参与者状态还要结合用户 ID;重新登录后的通话变化由事件同步,需要显示当前房间快照时再查询房间信息。 按任务查找页面 | 任务 | 页面 | | | | | 发起单聊或群聊通话 | 发起单聊通话 /zh/sdk/uniapp/calling/managing calls/start single call 、 发起群聊通话 /zh/sdk/uniapp/calling/managing calls/start group call | | 接受或拒绝邀请 | 接受通话 /zh/sdk/uniapp/calling/managing calls/accept call 、 拒绝通话 /zh/sdk/uniapp/calling/managing calls/reject call | | 取消邀请或挂断通话 | 取消通话邀请 /zh/sdk/uniapp/calling/managing calls/cancel call 、 挂断通话 /zh/sdk/uniapp/calling/managing calls/hang up call | | 恢复房间或待处理邀请 | 查询群组通话房间 /zh/sdk/uniapp/calling/retrieving call information/get room by group id 、 获取通话房间 Token /zh/sdk/uniapp/calling/retrieving call information/get token by room id 、 恢复待处理的通话邀请 /zh/sdk/uniapp/calling/retrieving call information/restore pending invitation | | 处理通话事件和业务协商 | 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 、 发送自定义信令 /zh/sdk/uniapp/calling/sending custom signals/send a custom signal | 同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。" }, { "path": "/sdk/uniapp/calling/managing-calls/start-single-call", @@ -5413,7 +5413,7 @@ "description": "商业版向一个用户发起音频或视频邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", - "content": "signalingInvite 商业版 使用 invitation 和可选离线推送信息。 import signalingInvite from '@/uni modules/unix openim sdk' const result = await signalingInvite invitation: inviterUserID: selfUserID, inviteeUserIDList: peerUserID , mediaType: 'video', timeout: 30, sessionType: 1, , offlinePushInfo: title: '视频通话', desc: '收到新的通话邀请' , 返回值可能含 roomID 、 token 、 liveURL 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" + "content": "signalingInvite 商业版 发起单聊通话。 unix openim sdk 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 当前登录用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | | invitation.groupID | string | 是 | 单聊固定传空字符串。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 单聊传 OpenIMSessionTypeSingle 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表;发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | | offlinePushInfo.title | string | 否 | 推送标题。 | | offlinePushInfo.desc | string | 否 | 推送正文。 | | offlinePushInfo.ex | string | 否 | 推送扩展字符串。 | | offlinePushInfo.iOSPushSound | string | 否 | iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 否 | 是否更新 iOS 角标。 | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: '视频通话', desc: '你收到一个视频通话邀请', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , iOS 端将 platformID 改为 OpenIMPlatformIOS 。房间 ID 应由业务生成并在本次通话各参与端保持一致。 返回结果 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 本次通话的媒体房间 ID。 | | token | string \\| null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | | liveURL | string \\| null | 媒体服务返回的房间连接地址。 | | busyLineUserIDList | string \\| null | 因忙线未能进入邀请流程的用户 ID。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 服务端返回的邀请快照。 | 取得有效的 token 和 roomID 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" }, { "path": "/sdk/uniapp/calling/managing-calls/start-group-call", @@ -5421,7 +5421,7 @@ "description": "商业版向群成员发起群组通话邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-group-call", - "content": "signalingInviteInGroup 商业版 使用同一邀请结构,但 invitation 必须包含 groupID 和目标成员。 import signalingInviteInGroup from '@/uni modules/unix openim sdk' const result = await signalingInviteInGroup invitation: inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2, , 发送前确认成员仍在群内并去重。 busyLineUserIDList 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。" + "content": "signalingInviteInGroup 商业版 发起群聊通话,只邀请 inviteeUserIDList 明确列出的群成员,不会因为填写 groupID 自动邀请全群。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 发起人的用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请的群成员用户 ID;不要包含发起人。 | | invitation.groupID | string | 是 | 群组 ID,群聊通话不能为空。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,所有参与端必须一致。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 工作群会话传 OpenIMSessionTypeWriteGroup 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | import OpenIMPlatformAndroid, OpenIMSessionTypeWriteGroup, signalingInviteInGroup, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: selectedGroupMemberIDs, customData: JSON.stringify source: 'group call' , groupID, roomID: groupID, mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeWriteGroup, platformID: OpenIMPlatformAndroid, , offlinePushInfo, 示例沿用群组 ID 作为房间 ID;若业务自行生成 roomID ,所有参与端必须使用同一个值。iOS 端将 platformID 改为 OpenIMPlatformIOS 。发起前应排除当前用户、空值和重复成员,并确认目标仍在群内。 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null ,字段含义见 发起单聊通话 /zh/sdk/uniapp/calling/managing calls/start single call 。 busyLineUserIDList 只表示部分成员忙线,不应中止其他成员的邀请;成功也不代表其他成员已经接听,后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 合并。" }, { "path": "/sdk/uniapp/calling/managing-calls/accept-call", @@ -5429,7 +5429,7 @@ "description": "商业版接受邀请并取得房间凭据。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", - "content": "收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 signalingAccept 。 import signalingAccept from '@/uni modules/unix openim sdk' const result = await signalingAccept invitation 返回的 token 、 roomID 、 liveURL 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。 Promise 成功与对方接受事件、媒体真正连接是不同阶段。" + "content": "从 onReceiveNewInvitation 取得原始 OpenIMSignalingInvitationInfo 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 signalingAccept : import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation invitation 必须保留收到的原始 roomID 、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 Promise 成功后, roomCredentials 是 OpenIMSignalingAcceptResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 本次通话的媒体房间 ID。 | | token | string \\| null | 加入媒体房间使用的短期凭据。 | | liveURL | string \\| null | 媒体服务返回的连接地址。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 token 和 roomID 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 继续合并。" }, { "path": "/sdk/uniapp/calling/managing-calls/reject-call", @@ -5437,7 +5437,7 @@ "description": "商业版拒绝当前邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls reject-call", - "content": "signalingReject 使用收到的完整 invitation。 import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation 拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 roomID 。" + "content": "用户拒绝来电时,将收到的原始 OpenIMSignalingInvitationInfo 交给 signalingReject : import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation invitation 必须保留完整的原始通话信息,不要自行重建或修改 roomID 。 Promise 成功只表示 OpenIMServer 已完成拒绝请求。拒绝后可以关闭本地来电 UI,并幂等处理对端和其他设备事件;发起端随后通过 onInviteeRejected 更新界面,完整处理见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。" }, { "path": "/sdk/uniapp/calling/managing-calls/cancel-call", @@ -5445,7 +5445,7 @@ "description": "商业版由主叫取消尚未接通的邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls cancel-call", - "content": "主叫在对方接受前使用 signalingCancel 。 import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation 取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。" + "content": "主叫在对方接受前使用 signalingCancel 。 import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation 必须传本次通话的完整原始 OpenIMSignalingInvitationInfo ,不能只构造一个 roomID 。取消与挂断语义不同:取消用于尚未接通的邀请,挂断用于已经建立或正在建立的会话。 Promise 成功表示取消信令请求完成。应用还应结束本地的等待接听状态,并释放尚未使用的媒体资源;远端通过 onInvitationCancelled 更新。按钮应防止重复提交,并以取消、接受等竞态事件决定最终状态,完整处理见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。" }, { "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", @@ -5453,7 +5453,7 @@ "description": "商业版结束已接受的通话。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls hang-up-call", - "content": "signalingHungUp 使用当前会话的 invitation。 import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation 调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 onHangUp 。" + "content": "通话已经建立后,参与者调用 signalingHungUp 。 invitation 是本次通话使用的完整 OpenIMSignalingInvitationInfo ,其中的 roomID 必须与当前媒体房间一致。 import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation Promise 成功只表示挂断信令请求完成。应用还需要停止本地采集、断开媒体房间,并释放摄像头、麦克风和页面资源。 调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。取消、拒绝、超时和挂断应进入同一套按 roomID 幂等的清理流程,并继续处理 onHangUp ,完整监听见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。" }, { "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", @@ -5461,7 +5461,7 @@ "description": "商业版统一接收邀请、接受、拒绝、取消、超时、挂断和房间事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls handle-call-events", - "content": "所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。 import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeAcceptedByOtherDevice, onInviteeRejected, onInviteeRejectedByOtherDevice, onReceiveNewInvitation, onRoomParticipantConnected, onRoomParticipantDisconnected, onStreamChange, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const invitationSubscription = onReceiveNewInvitation handleCallPayload const subscriptions : Array = invitationSubscription, onInviteeAccepted handleCallPayload , onInviteeAcceptedByOtherDevice handleCallPayload , onInviteeRejected handleCallPayload , onInviteeRejectedByOtherDevice handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , onRoomParticipantConnected handleCallPayload , onRoomParticipantDisconnected handleCallPayload , onStreamChange handleCallPayload , subscriptions.forEach subscription = off subscription HarmonyOS 当前不支持 onStreamChange ,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。" + "content": "通话状态层应集中监听邀请生命周期、参与者连接状态和媒体流变化,并按 roomID 合并到同一份本地状态。所有事件返回 raw JSON 字符串;回调应尽快完成,异步展示 UI,并先校验 JSON 再映射到应用自己的通话领域模型。 | 事件 | 用途 | | | | | onReceiveNewInvitation | 收到新的通话邀请。 | | onInviteeAccepted 、 onInviteeRejected | 当前邀请被接受或拒绝。 | | onInvitationCancelled 、 onInvitationTimeout | 邀请被取消或超时。 | | onInviteeAcceptedByOtherDevice 、 onInviteeRejectedByOtherDevice | 同一账号的其他设备处理邀请。 | | onHangUp | 通话参与者挂断。 | | onRoomParticipantConnected 、 onRoomParticipantDisconnected | 房间参与者连接状态变化。 | | onStreamChange | 参与者媒体流状态变化。 | import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeAcceptedByOtherDevice, onInviteeRejected, onInviteeRejectedByOtherDevice, onReceiveNewInvitation, onRoomParticipantConnected, onRoomParticipantDisconnected, onStreamChange, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const invitationSubscription = onReceiveNewInvitation handleCallPayload const subscriptions : Array = invitationSubscription, onInviteeAccepted handleCallPayload , onInviteeAcceptedByOtherDevice handleCallPayload , onInviteeRejected handleCallPayload , onInviteeRejectedByOtherDevice handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , onRoomParticipantConnected handleCallPayload , onRoomParticipantDisconnected handleCallPayload , onStreamChange handleCallPayload , function removeCallListeners subscriptions.forEach subscription = off subscription 本页是以上 11 个通话事件的唯一完整监听归属页。参与者状态还要结合用户 ID 更新;不要按事件顺序、展示名称或数组下标合并。应用应使用 roomID 、本地 session ID 和运行 generation 去重,过期事件不能打开新页面。退出登录、切换账号或销毁通话状态层时调用 removeCallListeners 。 HarmonyOS 当前不支持 onStreamChange ,注册会返回 platform unsupported subscription,不会伪造媒体流事件;其余本页信令事件支持。raw payload 与 RTC Token 不写入日志或持久化存储。" }, { "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", @@ -5469,7 +5469,7 @@ "description": "商业版在 SDK 启动后查询可能遗漏的当前邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information restore-pending-invitation", - "content": "事件监听建立后调用一次 signalingGetInvitationInfoStartApp ,恢复初始化前到达的邀请。 import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation 可选参数 userID 只用于明确查询用户。无邀请时合法返回 null ,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。" + "content": "事件监听建立后调用一次 signalingGetInvitationInfoStartApp ,返回应用启动或恢复时需要处理的邀请快照: import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation 可选参数 userID 只用于明确查询用户;通常由当前登录态决定,不需要传入。 返回结果 Promise 成功后,结果是 OpenIMSignalingGetInvitationInfoStartAppResult | null ,其中 invitation 为 OpenIMSignalingInvitationInfo | null 。无邀请时合法返回 null 或 invitation: null ,不是错误。 该查询只取得当前快照,不会触发通话事件。只在 invitation 非空且 roomID 有效时恢复来电界面;恢复结果与实时邀请可能重复,应按 roomID 和本地 session 标识去重。每次 runtime 初始化只查询一次,随后仍需监听取消、超时、接受和挂断,完整处理见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。" }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", @@ -5477,7 +5477,7 @@ "description": "商业版查询群当前关联的 roomID 与邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", - "content": "signalingGetRoomByGroupID 返回可选 roomID 和 invitation。 import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const result = await signalingGetRoomByGroupID groupID 空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。" + "content": "signalingGetRoomByGroupID 的参数是群组 ID,不是自定义 roomID : import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID 返回结果 Promise 成功后,结果是 OpenIMSignalingGetRoomByGroupIDResult | null 快照: | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 当前群通话的房间 ID。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 当前房间对应的原始邀请信息。 | 当前 uni app / uni app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 participant 字段。 空结果或空 roomID 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 signalingGetTokenByRoomID 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 groupID 调用本方法,再按返回或已保存的 roomID 合并通话状态。" }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", @@ -5485,7 +5485,7 @@ "description": "商业版为指定 roomID 获取 RTC Token 和 liveURL。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-token-by-room-id", - "content": "signalingGetTokenByRoomID 返回可选 Token 与 liveURL。 import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const result = await signalingGetTokenByRoomID roomID 凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。" + "content": "已经知道 roomID 、但需要重新获取入会凭据时,调用 signalingGetTokenByRoomID : import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const roomCredentials = await signalingGetTokenByRoomID roomID Promise 成功后, roomCredentials 是 OpenIMSignalingGetTokenByRoomIDResult | null ,包含可选的 token 和 liveURL ,不重复返回 roomID 。只有取得有效 Token 后,才能使用本次查询参数中的 roomID 连接媒体引擎。 房间 Token 是短期敏感凭据,只保存在内存并立即交给媒体层,不要写入日志、URL、分析事件、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。" }, { "path": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", @@ -5493,7 +5493,7 @@ "description": "商业版向房间发送业务自定义信令,并安全解析接收事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling sending-custom-signals send-a-custom-signal", - "content": "signalingSendCustomSignaling 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。 import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling, from '@/uni modules/unix openim sdk' const signalSubscription = onReceiveCustomSignal payload = handleValidatedSignal payload const signalingSubscription = onReceiveCustomSignaling payload = handleValidatedSignal payload await signalingSendCustomSignaling roomID, customInfo: JSON.stringify type: 'raise hand', version: 1 , off signalSubscription off signalingSubscription 接收端用事件 ID/内容哈希去重,校验 type 、 version 和字段。 customInfo 不承担权限认证,不含 Token 或秘密。" + "content": "signalingSendCustomSignaling 用于向指定通话房间发送轻量级业务协商数据,例如举手、切换布局提示或业务侧状态同步。它不是聊天消息接口,也不能替代媒体引擎的数据通道。 发送信令 customInfo 是字符串。需要传递结构化数据时,先定义稳定的数据格式并序列化为 JSON。 import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling, from '@/uni modules/unix openim sdk' const signal = version: 1, eventID: createBusinessEventID , type: 'hand raised', userID: currentUserID, sentAt: Date.now , await signalingSendCustomSignaling roomID, customInfo: JSON.stringify signal , Promise 成功表示 OpenIMServer 已接受本次发送,不等于其他参与者已经处理该数据。 customInfo 应保持精简,并包含协议版本和业务幂等 ID。大文件、聊天记录、长期状态和敏感凭据不应放入其中。 接收信令 onReceiveCustomSignal 和 onReceiveCustomSignaling 是兼容不同 Core/商业服务版本的 raw JSON 事件。实际部署只订阅其中真实产生的一种;若为了兼容同时订阅,必须按 roomID:eventID 去重。 function handleValidatedSignal payload : string try const event = JSON.parseObject payload if event == null return const eventRoomID = event.getString 'roomID' const customInfo = event.getString 'customInfo' if eventRoomID = activeRoomID || customInfo == null return const signal = JSON.parseObject customInfo if signal == null return applyValidatedCallSignal eventRoomID, signal catch console.warn '无法解析通话自定义信令' const signalSubscription = onReceiveCustomSignal handleValidatedSignal const signalingSubscription = onReceiveCustomSignaling handleValidatedSignal function removeCustomSignalListeners off signalSubscription off signalingSubscription 解析函数应检查 JSON 结构、协议版本、 eventID 、 type 和业务字段,再返回已验证的应用内对象。本页是两个兼容事件的完整监听示例归属页。离开通话页、退出登录或切换账号时调用 removeCustomSignalListeners 。 自定义信令不承担权限认证。不要信任客户端信令来授予主持人、付费或隐私权限;需要权威校验的状态应由可信后端保存和判断。连接恢复后,通过房间查询或业务后端校准长期状态,不要把自定义信令当作可重放的权威记录。" }, { "path": "/sdk/uniapp/events/overview-events", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index ddb2802973..04abc333e6 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -611,8 +611,8 @@ "title": "开始之前" }, "/sdk/uniapp/getting-started/environment-specific-implementation": { - "body": "`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期和原生构建方式。所有平台都从同一个插件根路径扁平导入。\n\n## 支持矩阵\n\n| 宿主 | Android | iOS | HarmonyOS |\n| --- | --- | --- | --- |\n| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 |\n| uni-app x | API 21+ | iOS 14+ | 商业版 API 24 |\n| H5 / Web / 小程序 | 不支持 | 不支持 | 不支持 |\n\n## uni-app\n\n传统 uni-app 页面可在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 生命周期放在应用级 service 中,避免页面反复初始化。\n\n```javascript\nimport {\n getLoginStatus,\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n console.log('OpenIM connected')\n})\n\nconst status = await getLoginStatus()\n\n// 应用 service 销毁时执行。\noff(connectSubscription)\n```\n\n## uni-app x\n\nuni-app x 使用 UTS 类型。对初始化参数、消息对象和事件 payload,应直接导入插件公开类型,不要自行复制一份可能漂移的接口。\n\n```uts\nimport {\n getLoginStatus,\n type OpenIMLoginStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst status : OpenIMLoginStatus = await getLoginStatus()\n```\n\n解析商业信令的 raw JSON 时,先校验字符串和字段存在性,再把值映射到应用自己的 UTS 类型;不要把未经校验的 `UTSJSONObject` 强制转换成业务 DTO。\n\n## Android 与 iOS\n\nAndroid 和 iOS 都支持公共与商业接口,但插件必须进入自定义基座或本地原生工程。权限、通知和后台能力由宿主 App 声明;SDK 不会自动替业务申请通知、相册、摄像头或麦克风权限。\n\n文件消息使用本机可读的完整路径。`unifile://` 应先通过 uni API 转为可访问的本地路径;不要把临时 URL、网络 URL 或只在页面沙盒中有效的虚拟路径直接传给原生 Core。\n\n## HarmonyOS\n\nHarmonyOS 仅声明 uni-app x 商业版支持。当前以下操作会稳定返回 `platform-unsupported`:`updateFcmToken`、`updateToken`、`translateText`、`translateMessage`。十个缺失事件也只返回 unsupported subscription,不会伪造成功事件;具体清单见[事件概览](/sdk/uniapp/events/overview-events)。\n\n平台不支持不等于商业版鉴权失败。业务应按错误码区分能力缺失、登录状态、网络和服务端错误,不要对 unsupported 无限重试。\n\n## 生命周期归属\n\nSDK Core 在应用作用域内只初始化一次。页面进入和退出只管理该页面拥有的订阅,不调用 `unInitSDK()`。用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。", - "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的运行和构建边界。", + "body": "`unix-openim-sdk` 的业务函数在 uni-app 与 uni-app x 中保持一致,差异主要发生在语言类型、页面生命周期、文件路径和原生构建方式。所有宿主都从同一个插件根路径扁平导入,且共享宿主进程中唯一的 OpenIM Core。\n\n## 支持矩阵\n\n| 宿主 | Android | iOS | HarmonyOS |\n| --- | --- | --- | --- |\n| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | 暂不宣称支持 |\n| uni-app x | API 21+ | iOS 14+ | 商业版 API 24 |\n| Web / H5 / 小程序 | 不支持 | 不支持 | 不支持 |\n\n接入和本地编译使用 HBuilderX/uni-app `5.23` 系列。公共与商业能力是否可用还取决于所安装的插件版本、原生制品和 OpenIMServer 部署,不能只根据宿主名称判断。\n\n## 使用统一插件入口\n\nuni-app 和 uni-app x 都从 `@/uni_modules/unix-openim-sdk` 导入。不要使用裸包名,也不要直接导入 `utssdk/app-android`、`app-ios` 或 HarmonyOS 实现。\n\n```uts\nimport {\n getLoginStatus,\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n```\n\nPromise 成功直接返回业务值,不读取 `{ data }`;事件返回 `OpenIMSDKEventSubscription`,使用 `off(subscription)` 清理。\n\n## uni-app Vue 2 / Vue 3\n\n传统 uni-app 页面可以在 Vue 2 或 Vue 3 生命周期中调用插件。JavaScript 不提供 UTS 的完整静态类型检查,但 Promise 返回值和事件句柄语义相同。建议把 SDK 初始化、登录和全局监听放在应用级 service 中,避免页面反复初始化。\n\n```javascript\nimport {\n getLoginStatus,\n off,\n onConnectSuccess,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst connectSubscription = onConnectSuccess(() => {\n console.log('OpenIM connected')\n})\n\nconst status = await getLoginStatus()\n\n// 拥有监听的应用 service 销毁时执行。\noff(connectSubscription)\n```\n\nVue 组件销毁只释放该组件或 service 拥有的订阅,不调用 `unInitSDK()`。若多个页面依赖同一事件,优先由 store 统一订阅并向页面分发状态。\n\n## uni-app x\n\nuni-app x 使用 UTS 类型。初始化参数、消息对象和事件 payload 应直接导入插件公开类型,不要复制一套会随 SDK 漂移的本地接口。\n\n```uts\nimport {\n getLoginStatus,\n type OpenIMLoginStatus,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst status : OpenIMLoginStatus = await getLoginStatus()\n```\n\nUTS 的可空值需要显式处理。若返回类型是 `OpenIMUserInfo | null` 或结果包装中的数组可空,不要用不安全强制转换绕过合同。\n\n商业信令事件返回 raw JSON 字符串。先确认字符串非空,再通过经过校验的 UTS JSON 解析读取已知字段;不要把未经校验的 `UTSJSONObject` 强制转换成完整业务 DTO。\n\n## App 生命周期\n\nSDK Core 在 App 作用域只初始化一次。页面进入和退出只管理该页面拥有的订阅;用户切换账号时先退出旧账号、清理旧订阅与状态,再登录新账号;App 确定不再使用 SDK 时才反初始化。\n\n前后台、网络、Badge 与推送状态应由 App 生命周期统一上报,不要让多个页面重复调用。完整示例见[处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)。\n\n## Android\n\nAndroid 最低 API 21。构建产物需要包含插件声明的 Maven/AAR 依赖和目标 ABI;标准基座没有这些原生制品,应使用包含插件的自定义基座或本地原生工程。\n\n发布前至少检查:\n\n- manifest merge 后的网络、通知和存储等权限符合产品需求。\n- 每个目标 ABI 只有一套 OpenIM Core native library。\n- release/R8 构建没有 duplicate class、duplicate JNI 或反射裁剪问题。\n- 真机可以访问 `apiAddr` / `wsAddr`,后台恢复符合系统限制。\n\nSDK 不会自动替业务申请相册、相机、麦克风或通知权限。普通 IM 功能按实际使用场景声明;AV Runtime 的媒体权限属于另一个插件边界。\n\n## iOS\n\niOS 最低版本为 14。构建时需要正确链接、嵌入并签名插件 XCFramework;使用与插件版本匹配的 CocoaPods/Xcode 环境。\n\n发布前在真机检查 framework slice、embed/sign、隐私清单、权限说明和 App Store 构建。模拟器通过不能替代 device arm64 链接。若宿主还安装其他原生插件,应扫描重复 framework 和同名 module。\n\nSDK 日志和数据库位于应用沙盒中。不要把模拟器绝对路径写入业务配置,也不要直接移动或修改 Core 数据库。\n\n## HarmonyOS\n\nHarmonyOS 仅声明 uni-app x 商业版支持,最低 API 24,并要求与插件合同一致的商业 HAR。\n\n当前以下操作稳定返回 `platform-unsupported`:\n\n- `updateFcmToken`\n- `updateToken`\n- `translateText`\n- `translateMessage`\n\n十个不支持事件只返回 unsupported subscription,不会伪造回调,完整清单见[事件概览](/sdk/uniapp/events/overview-events)。平台不支持不等于商业版鉴权失败;业务应按稳定错误区分能力缺失、登录状态、网络和服务端错误。\n\n## 文件路径\n\n图片、语音、视频和文件消息使用本机可读的完整路径。`unifile://`、相册临时地址或页面沙盒虚拟路径应先通过 uni API 转换为原生 Core 可访问的本地路径。\n\n- 不要把 HTTP URL 当作本地路径传给 `by-file` / full-path 创建接口。\n- 确认临时文件在消息创建和上传完成前不会被系统清理。\n- iOS 与 Android 沙盒路径不同,不要把一个平台的绝对路径持久化后交给另一平台。\n- 文件访问、相册和媒体权限由宿主申请并向用户解释。\n\n对应消息页会分别说明 URL 创建与本地完整路径创建的区别。\n\n## 本地构建与自定义基座\n\n原生 UTS 插件必须进入原生编译。开发时可选择:\n\n1. 使用 HBuilderX 5.23 构建包含插件的自定义基座。\n2. 使用项目维护的 Android/iOS 本地原生工程完成编译、安装和自动化测试。\n\n本地流程应锁定 HBuilderX、DCloud 原生 SDK、JDK/Android SDK、Xcode/CocoaPods 和插件版本,避免“开发机能跑但发布包使用另一套依赖”。标准基座只能用于不含该原生插件的页面,不能据此判断 SDK 能力。\n\n### 共享 SDK service\n\n建议在业务代码中封装一个 App 级 SDK service,统一负责初始化状态、当前登录用户、全局订阅句柄和销毁顺序。页面只调用这个 service 的业务方法并订阅应用状态,不自行决定 Core 是否需要重新初始化。\n\n该 service 仍应暴露插件的真实 Promise 与错误语义:不要重新包装成 Wasm 的 `{ data }`,不要吞掉 `platform-unsupported`,也不要用 `offAll()` 清理并非自己拥有的监听。切换账号时先停止旧账号写入,再等待 `logout()`、释放旧句柄、清空状态,最后登录新账号。\n\n## 不适用范围\n\n本插件不支持 Web、H5 和小程序。它依赖 Android、iOS 或 HarmonyOS 原生 Core、本地数据库和原生网络生命周期,不能通过条件编译把同一导入直接运行在浏览器。\n\n若同一项目还有 H5 或小程序端,应在业务适配层选择相应 Web/Wasm/小程序 SDK,并分别管理初始化、登录、事件和存储,不要让两个 SDK 实例竞争同一 App 端登录状态。\n\n## 验证与排查\n\n- 在目标平台确认 `initSDK()` 成功,`login()` 后收到 `onConnectSuccess`。\n- 验证查询 API 直接返回业务值,事件句柄可以在异步使用后通过 `off()` 清理。\n- 真机验证网络断开恢复、前后台、被踢、Token 失效和重新登录。\n- 文件消息在 release 包中使用真实相册/文件路径测试,不只验证固定沙盒样例。\n- 商业 API 连接商业服务端;HarmonyOS 对不支持能力明确返回错误。\n- Android/iOS 最终安装包执行重复原生依赖、签名和 ABI/slice 扫描。\n\n## 常见问题\n\n| 现象 | 可能原因 | 处理方式 |\n| --- | --- | --- |\n| 标准基座提示原生插件不可用 | 基座未包含插件原生依赖 | 构建自定义基座或使用本地原生工程。 |\n| 真机无法连接、模拟器可以 | 服务地址使用 `localhost`、TLS 或局域网路由不通 | 从真机验证 API/WSS 地址、证书和反向代理。 |\n| 事件重复执行 | 页面或 `onShow` 重复注册,旧句柄未释放 | 把监听提升到稳定 service,并逐个 `off(subscription)`。 |\n| 文件创建失败 | 传入 `unifile://`、临时 URL 或 Core 无权读取的路径 | 转换为原生可读完整路径并保证文件生命周期。 |\n| HarmonyOS 某 API 始终失败 | 锁定 HAR 没有该能力 | 识别 `platform-unsupported`,关闭入口或采用替代流程。 |\n| iOS 模拟器成功、真机链接失败 | device slice、embed、签名或最低版本不匹配 | 用 iPhone device 构建检查 XCFramework 与签名。 |\n\n## 下一步\n\n- [开始之前](/sdk/uniapp/getting-started/before-you-start)\n- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)\n- [认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [处理 App 生命周期与设备状态](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state)", + "description": "区分 uni-app、uni-app x、Android、iOS 与 HarmonyOS 的调用、生命周期和原生构建边界。", "headings": [ { "depth": 2, @@ -621,8 +621,13 @@ }, { "depth": 2, - "title": "uni-app", - "url": "#uni-app" + "title": "使用统一插件入口", + "url": "#使用统一插件入口" + }, + { + "depth": 2, + "title": "uni-app Vue 2 / Vue 3", + "url": "#uni-app-vue-2-vue-3" }, { "depth": 2, @@ -631,8 +636,18 @@ }, { "depth": 2, - "title": "Android 与 iOS", - "url": "#android-与-ios" + "title": "App 生命周期", + "url": "#app-生命周期" + }, + { + "depth": 2, + "title": "Android", + "url": "#android" + }, + { + "depth": 2, + "title": "iOS", + "url": "#ios" }, { "depth": 2, @@ -641,8 +656,38 @@ }, { "depth": 2, - "title": "生命周期归属", - "url": "#生命周期归属" + "title": "文件路径", + "url": "#文件路径" + }, + { + "depth": 2, + "title": "本地构建与自定义基座", + "url": "#本地构建与自定义基座" + }, + { + "depth": 3, + "title": "共享 SDK service", + "url": "#共享-sdk-service" + }, + { + "depth": 2, + "title": "不适用范围", + "url": "#不适用范围" + }, + { + "depth": 2, + "title": "验证与排查", + "url": "#验证与排查" + }, + { + "depth": 2, + "title": "常见问题", + "url": "#常见问题" + }, + { + "depth": 2, + "title": "下一步", + "url": "#下一步" } ], "sourcePath": "/sdk/uniapp/getting-started/environment-specific-implementation", @@ -1196,22 +1241,58 @@ "title": "移出黑名单" }, "/sdk/uniapp/conversation/overview-conversation": { - "body": "会话是单聊、群聊或其他消息流的本地索引。`conversationID` 是稳定主键;单聊同时有 `userID`,群聊同时有 `groupID`。界面标题、头像和最新消息都是可变快照,不能替代主键。\n\n`OpenIMConversationItem` 包含 `conversationType`、`showName`、`faceURL`、`unreadCount`、`latestMsg`、草稿、置顶、接收选项和消息序列边界。`latestMsg` 是序列化消息字符串,解析失败时保留会话并显示降级摘要,不要删除该项。\n\n## 建议数据流\n\n1. 注册 `onNewConversation` 与 `onConversationChanged`。\n2. 查询完整或分页会话快照。\n3. 按 `conversationID` 幂等插入或替换事件项。\n4. 按 `isPinned`、时间和业务排序规则展示。\n5. App 恢复或重新登录时重新查询,不仅依赖事件。\n\n会话未读数和消息已读是相关但不同的状态。清零会话未读见[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read),总未读见[获取总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。\n\n商业版会话分组用于把会话组织到自定义、置顶或标记等组中,详见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。", + "body": "会话是单聊、群聊或其他消息流的本地索引。`conversationID` 是稳定主键;单聊同时有 `userID`,群聊同时有 `groupID`。界面标题、头像和最新消息都是可变快照,不能替代主键。\n\n## 会话标识\n\n`conversationID` 是列表、事件、未读数和消息查询之间的稳定关联键。按目标查询时,单聊使用对端 `userID` 和单聊类型,群聊使用 `groupID` 和对应群会话类型;不要只按 `userID` 或 `groupID` 覆盖其他类型的会话。\n\n会话项中的 `showName` 和 `faceURL` 是当前展示快照。好友备注、群名称或头像变化后它们可能改变;业务不应把展示名称作为缓存主键。\n\n## 会话数据\n\n`OpenIMConversationItem` 主要包含:\n\n| 数据 | 用途 |\n| --- | --- |\n| `conversationType`、`userID`、`groupID` | 判断会话类型和目标。 |\n| `showName`、`faceURL` | 展示标题与头像。 |\n| `unreadCount` | 当前会话未读数。 |\n| `latestMsg`、`latestMsgSendTime` | 最新消息摘要与排序时间。 |\n| `draftText`、`draftTextTime` | 当前设备保存的草稿。 |\n| `isPinned` | 置顶状态。 |\n| `recvMsgOpt` | 会话级消息接收与通知策略。 |\n| `isPrivateChat`、`burnDuration` | 阅后即焚模式和时长。 |\n| `minSeq`、`maxSeq`、`msgDestructTime` | 消息序列与商业版销毁状态边界。 |\n\n`latestMsg` 是序列化消息字符串。解析失败时保留会话并显示降级摘要,不要因为一条未知消息类型删除整个会话。商业版扩展字段在公共环境中可能缺失,使用前判空。\n\n### 排序与展示\n\n会话列表常见排序先处理 `isPinned`,再使用 `latestMsgSendTime`、草稿时间或产品定义的稳定规则。不要使用当前数组下标作为持久顺序;任何新消息、置顶或草稿变化都可能改变位置。\n\n列表摘要应从 `latestMsg` 安全解析已知消息类型。遇到未知 contentType、自定义消息或解析失败时显示通用摘要,并保留未读数、会话目标和进入聊天页的能力。不要把原始 JSON 直接展示给用户或写入公开日志。\n\n### 未读与接收策略\n\n`unreadCount` 是单个会话快照,总未读数由独立 API 与事件维护。标记已读后,分别处理操作 Promise、会话变化和总未读事件;其他设备或服务端并发新消息可能让未读数再次增加。\n\n`recvMsgOpt` 只描述该会话的接收策略,还可能受账号级 `globalRecvMsgOpt` 影响。界面应展示服务端返回的最终会话状态,而不是仅根据用户刚点击的本地开关推断成功。\n\n## 按任务查找页面\n\n| 需求 | 页面 |\n| --- | --- |\n| 分页获取列表并同步新增、变化事件 | [获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) |\n| 按用户或群组目标查询会话 | [按目标查询会话](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target) |\n| 按会话 ID 查询一个或多个会话 | [按会话 ID 查询](/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id) |\n| 搜索本地会话 | [搜索会话](/sdk/uniapp/conversation/retrieving-conversations/search-conversations) |\n| 标记一个或全部会话已读 | [标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[标记全部会话已读](/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read) |\n| 管理草稿、置顶、备注和扩展 | 对应“管理会话”页面 |\n| 使用商业版会话分组 | [会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups) |\n\n## 删除和清理\n\n隐藏会话、删除会话、删除会话及消息、清空会话消息和清除全部本地消息是不同操作:\n\n- 隐藏只移除列表入口,消息保留,新消息可能让会话重新出现。\n- 删除会话不应被描述为删除好友或退出群组。\n- 删除会话及消息会影响本地会话与消息记录,应在 UI 中二次确认。\n- 清空消息与服务端消息销毁策略也不是同一能力。\n\n选择操作前明确产品语义,Promise 失败时不要先行清除本地状态;完成后用事件或重新查询校准。\n\n## 状态更新\n\n建议数据流如下:\n\n1. 注册 `onNewConversation` 与 `onConversationChanged`,保存各自订阅句柄。\n2. 分页查询会话快照。\n3. 按 `conversationID` 幂等插入或替换事件项。\n4. 按 `isPinned`、时间和业务排序规则展示。\n5. App 恢复、同步完成或重新登录时重新查询,不仅依赖事件。\n\n会话未读数和消息已读是相关但不同的状态。清零会话未读见[标记会话已读](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read),总未读见[获取总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。\n\n查询用于建立快照,事件用于合并增量,Promise 成功只说明当前操作完成。完整监听与句柄清理统一见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。\n\n切换账号时先停止旧 store 写入,释放旧订阅并清空会话、未读和草稿内存状态。不要让旧账号分页或事件异步结果写入新账号;商业版依赖插件还应比较 SDK session epoch。", "description": "理解会话快照、增量事件、未读数、草稿和会话分组。", "headings": [ { "depth": 2, - "title": "建议数据流", - "url": "#建议数据流" + "title": "会话标识", + "url": "#会话标识" + }, + { + "depth": 2, + "title": "会话数据", + "url": "#会话数据" + }, + { + "depth": 3, + "title": "排序与展示", + "url": "#排序与展示" + }, + { + "depth": 3, + "title": "未读与接收策略", + "url": "#未读与接收策略" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + }, + { + "depth": 2, + "title": "删除和清理", + "url": "#删除和清理" + }, + { + "depth": 2, + "title": "状态更新", + "url": "#状态更新" } ], "sourcePath": "/sdk/uniapp/conversation/overview-conversation", "title": "会话概览" }, "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target": { - "body": "`getOneConversation()` 使用目标 ID 和 `OpenIMSessionType` 查询单个会话,返回 `OpenIMConversationItem | null`。\n\n```uts\nimport {\n OpenIMSessionTypeSingle,\n getOneConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst conversation = await getOneConversation({\n sourceID: 'user_b',\n sessionType: OpenIMSessionTypeSingle,\n})\n```\n\n单聊的 `sourceID` 是对方 `userID`,群聊是 `groupID`。使用插件导出的会话类型常量,不直接写数字。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。\n\n返回值按 `conversationID` 合并到 store,不要用 `sourceID` 直接覆盖其他会话类型。", + "body": "`getOneConversation()` 使用目标 ID 和 `OpenIMSessionType` 查询单个会话,返回 `OpenIMConversationItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `sourceID` | `string` | 是 | 会话目标 ID:单聊为对方 `userID`,群聊为 `groupID`。 |\n| `sessionType` | `OpenIMSessionType` | 是 | 会话类型,使用插件导出的 `OpenIMSessionTypeSingle`、群聊等常量。 |\n\n```uts\nimport {\n OpenIMSessionTypeSingle,\n getOneConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst conversation = await getOneConversation({\n sourceID: 'user_b',\n sessionType: OpenIMSessionTypeSingle,\n})\n```\n\n同一个字符串在不同 `sessionType` 下可能表示不同目标,必须同时传入正确类型。不要直接写数字,也不要把 `conversationID` 当成 `sourceID` 传入;已经知道会话 ID 时使用按会话 ID 查询 API。\n\nPromise 成功直接返回 `OpenIMConversationItem | null`。`null` 可能表示本地尚无该会话;发送首条消息或收到消息后,会话可由事件创建。查询本身不会创建会话,也不会触发会话事件。\n\n返回值按 `conversationID` 合并到 store,不要用 `sourceID` 直接覆盖其他会话类型。", "description": "按目标 ID 和会话类型查询一个会话。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", "title": "按目标查询会话" }, @@ -1230,9 +1311,35 @@ "title": "批量查询会话" }, "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list": { - "body": "`getAllConversationList()` 返回完整本地会话快照;列表较大时使用 `getConversationListSplit()` 分页。本页归属 `onNewConversation` 和 `onConversationChanged`。\n\n```uts\nimport {\n getConversationListSplit,\n off,\n onConversationChanged,\n onNewConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newConversationSubscription = onNewConversation((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\nconst changedSubscription = onConversationChanged((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\n\nconst firstPage = await getConversationListSplit({ offset: 0, count: 100 })\nreplaceConversationSnapshot(firstPage?.conversations ?? [])\n\noff(newConversationSubscription)\noff(changedSubscription)\n```\n\n分页时继续增加 `offset`,直到返回数量少于 `count`。查询与事件可能包含相同会话,必须按 `conversationID` 幂等合并。事件 payload 是列表,即使通常只变化一项也要遍历全部项目。\n\n不要根据本地数组位置更新;置顶、最新消息和未读变化都会改变排序。", + "body": "会话列表应使用 `getConversationListSplit()` 分页建立本地快照。虽然 Private 合同仍导出非分页 `getAllConversationList()` 作为兼容能力,面向真实应用和公开文档的推荐流程统一使用分页,避免会话较多时一次加载全部本地记录。\n\n## 分页获取会话\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次读取数量;根据页面和设备性能设置合理上限。 |\n\n```uts\nimport {\n getConversationListSplit,\n off,\n onConversationChanged,\n onNewConversation,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newConversationSubscription = onNewConversation((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\nconst changedSubscription = onConversationChanged((result) => {\n result.conversations.forEach((item) => upsertConversation(item.conversationID, item))\n})\n\nconst firstPage = await getConversationListSplit({ offset: 0, count: 100 })\nreplaceConversationSnapshot(firstPage?.conversations ?? [])\n\noff(newConversationSubscription)\noff(changedSubscription)\n```\n\nPromise 成功直接返回 `OpenIMConversationListResult | null`,从 `conversations` 读取当前页。第一页用于替换当前账号快照;后续页按 `conversationID` 合并。返回 `null` 时不要伪造成功的空列表,应结合登录状态和错误诊断决定保留旧快照还是展示加载失败。\n\n分页时继续增加 `offset`,直到返回数量少于 `count`。在前一页加载期间收到会话事件后,列表排序和分页边界可能变化;应让 store 按主键合并,并在刷新或同步完成时从 offset 0 重新建立快照。不要只把后续页追加到数组后永久依赖旧 offset。\n\n### 会话字段\n\n`OpenIMConversationItem` 中常用字段如下:\n\n| 字段 | 说明 |\n| --- | --- |\n| `conversationID` | 会话稳定主键,列表与事件都按该字段合并。 |\n| `conversationType` | 单聊、群聊或通知会话类型。 |\n| `userID` / `groupID` | 单聊对端用户或群聊群组 ID,根据会话类型使用。 |\n| `showName` / `faceURL` | 当前会话展示名称与头像快照。 |\n| `unreadCount` | 当前会话未读数。 |\n| `latestMsg` | 最新消息序列化字符串;解析失败时保留会话并展示降级摘要。 |\n| `latestMsgSendTime` | 最新消息发送时间,可参与普通会话排序。 |\n| `draftText` / `draftTextTime` | 本地草稿内容和更新时间。 |\n| `isPinned` | 是否置顶。排序时先应用置顶规则,再处理时间。 |\n| `recvMsgOpt` | 会话级消息接收选项。 |\n\n完整字段及商业扩展见[会话概览](/sdk/uniapp/conversation/overview-conversation)。不要根据本地数组位置更新;置顶、最新消息、草稿和未读变化都会改变排序。\n\n### 列表排序\n\n推荐先把分页与事件结果写入以 `conversationID` 为键的映射,再计算展示数组。通常先显示置顶会话,组内按最新消息或草稿时间排序,并为时间相同项提供稳定的 ID 次序。不要直接在事件回调中对页面数组做局部交换。\n\n`latestMsg` 解析失败不影响会话存在。保留该项并显示未知消息摘要;收到后续可识别消息或重新查询时自然更新。\n\n## 保持列表同步\n\n本页是 `onNewConversation` 和 `onConversationChanged` 的完整监听归属页。应先注册事件,再查询第一页,缩小登录同步期间的丢失窗口。两种事件都携带 `OpenIMConversationListResult`,即使通常只变化一个会话,也要遍历全部 `conversations`。\n\nPromise 成功、事件到达和重新查询是不同阶段。App 前台恢复、同步完成、断线重连或切换账号后重新查询快照;退出登录或销毁会话 store 时分别 `off(newConversationSubscription)` 和 `off(changedSubscription)`。\n\n切换账号时,在启动新账号查询前停止旧账号分页请求的状态写入。即使旧 Promise 迟到,也不能把旧 `conversationID` 列表合入新账号;可使用应用账号世代或商业版 `sdkSessionEpoch` 做完成前校验。", "description": "查询完整或分页会话快照,并处理新增与变化事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "分页获取会话", + "url": "#分页获取会话" + }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "会话字段", + "url": "#会话字段" + }, + { + "depth": 3, + "title": "列表排序", + "url": "#列表排序" + }, + { + "depth": 2, + "title": "保持列表同步", + "url": "#保持列表同步" + } + ], "sourcePath": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", "title": "查询会话列表" }, @@ -1272,14 +1379,20 @@ "title": "设置会话扩展字段" }, "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft": { - "body": "`setConversationDraft()` 保存会话草稿;传空字符串清除草稿。\n\n```uts\nimport { setConversationDraft } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationDraft({ conversationID, draftText: editorText })\n```\n\n草稿属于当前设备的会话状态,不应假定会同步到其他设备。输入框频繁变化时做防抖并串行写入,避免旧请求后完成覆盖新草稿。\n\n会话项中的 `draftText` 和 `draftTextTime` 用于恢复与排序提示。退出账号时不要把旧账号草稿带入新账号状态。", + "body": "`setConversationDraft()` 保存会话草稿;传空字符串清除草稿。\n\n用户离开聊天页、切换会话或输入框内容变化时可以保存草稿。输入过程中先维护编辑器状态并对 SDK 写入做防抖;离开页面前立即提交一次最新文本,避免每次按键写库或旧请求后完成覆盖新草稿。\n\n```uts\nimport { setConversationDraft } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationDraft({ conversationID, draftText: editorText })\n```\n\n清空草稿时明确传入空字符串:\n\n```uts\nawait setConversationDraft({ conversationID, draftText: '' })\n```\n\n## 调用后的状态变化\n\nPromise 成功表示草稿已经保存。SDK 通过 `onConversationChanged` 同步变化后的会话,按 `conversationID` 合并 `draftText` 和 `draftTextTime`。完整事件注册与清理见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。\n\n草稿属于当前设备的会话状态,不应假定同步到其他设备。退出账号时还要清理编辑器内存状态,避免把旧账号草稿带入新账号。", "description": "保存或清空指定会话的本地草稿文本。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "调用后的状态变化", + "url": "#调用后的状态变化" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", "title": "保存会话草稿" }, "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option": { - "body": "`recvMsgOpt` 控制单个会话的消息接收策略,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, recvMsgOpt: 1 })\n```\n\n具体数值含义使用插件导出的接收选项常量或服务端约定,不在业务代码中散落裸数字。该设置与账号全局接收策略不同,最终有效行为可能同时受两者影响。\n\n更新后以会话变化事件或重新查询确认,不要仅修改当前页面开关。", + "body": "`recvMsgOpt` 控制单个会话的消息接收策略,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, recvMsgOpt: 1 })\n```\n\n常用值为 `0`(正常接收并允许通知)和 `2`(接收消息但不通知)。合同类型还允许 `1` 表示不接收消息,但只有产品和服务端明确支持该策略时使用;业务应集中定义含义,不在页面中散落裸数字。\n\n该设置只作用于指定会话。账号级默认策略由 `globalRecvMsgOpt` 设置,见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。最终有效行为可能同时受账号级和会话级策略影响。\n\nPromise 成功、`onConversationChanged` 到达和重新查询是三个阶段。更新后按 `conversationID` 合并事件或重新查询确认,不要仅修改当前页面开关。", "description": "通过 setConversation 修改单个会话的 recvMsgOpt。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", @@ -1293,14 +1406,14 @@ "title": "清除群聊提及状态" }, "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read": { - "body": "`markConversationMessageAsRead()` 把指定会话标为已读。本页同时归属单聊已读回执 `onRecvC2CReadReceipt`。\n\n```uts\nimport {\n markConversationMessageAsRead,\n off,\n onRecvC2CReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvC2CReadReceipt((result) => {\n result.receipts.forEach((receipt) => mergeReadReceipt(receipt))\n})\n\nawait markConversationMessageAsRead(conversationID)\noff(receiptSubscription)\n```\n\n商业版还提供 `resetConversationUnread()` 商业版,可把多个会话的未读数重置为指定值:\n\n```uts\nimport { resetConversationUnread } from '@/uni_modules/unix-openim-sdk'\n\nawait resetConversationUnread({ conversationIDs: [conversationID], num: 0 })\n```\n\n本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。", + "body": "`markConversationMessageAsRead()` 把指定会话标为已读。本页同时归属单聊已读回执 `onRecvC2CReadReceipt`。\n\n用户打开会话并阅读完当前可见消息后再调用。不要在只预览通知、后台收到消息或尚未展示聊天页时提前标记已读。\n\n```uts\nimport {\n markConversationMessageAsRead,\n off,\n onRecvC2CReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvC2CReadReceipt((result) => {\n result.receipts.forEach((receipt) => mergeReadReceipt(receipt))\n})\n\nawait markConversationMessageAsRead(conversationID)\noff(receiptSubscription)\n```\n\n商业版还提供 `resetConversationUnread()` 商业版,可把多个会话的未读数重置为指定值:\n\n```uts\nimport { resetConversationUnread } from '@/uni_modules/unix-openim-sdk'\n\nawait resetConversationUnread({ conversationIDs: [conversationID], num: 0 })\n```\n\n本地会话未读清零与对端收到已读回执不是同一步。Promise、会话变化和回执事件分别处理。\n\nPromise 成功后,通过 `onConversationChanged` 取得最新会话并按 `conversationID` 合并未读数;需要立即校准时重新查询该会话。单聊回执中的 `receipts` 应先定位对端用户对应的单聊,再按每项消息 ID 列表更新已读状态。\n\n群聊中调用本 API 只清理当前账号的会话未读数。需要上报群成员级已读状态时,另见[上报群消息已读](/sdk/uniapp/message/managing-read-status/send-group-read-receipts)。组件卸载、退出登录或切换账号时释放 `receiptSubscription`。", "description": "清理会话未读数,并处理单聊已读回执事件。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", "title": "标记会话已读" }, "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read": { - "body": "`markAllConversationMessageAsRead()` 标记当前账号的全部会话已读。\n\n```uts\nimport { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk'\n\nawait markAllConversationMessageAsRead()\n```\n\n这是范围较大的状态变更,UI 应二次确认。完成后不要只把角标设为 0;以会话变化和总未读事件刷新 store,处理服务端或其他设备并发产生的新未读消息。\n\n该调用不会删除消息,也不会修改单个会话的消息接收选项。", + "body": "`markAllConversationMessageAsRead()` 标记当前账号的全部会话已读。\n\n```uts\nimport { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk'\n\nawait markAllConversationMessageAsRead()\n```\n\n这是范围较大的状态变更,UI 应二次确认。Promise 成功表示 SDK 已完成本次找到的全部未读会话处理,不等于相关会话事件已经到达,也不保证其他客户端界面已同步完成。\n\n完成后不要只把角标设为 0;通过 `onConversationChanged` 按 `conversationID` 合并各会话状态,并通过 `onTotalUnreadMessageCountChanged` 更新总未读数。完整监听分别见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[获取会话总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)。必要时重新查询两份快照,处理服务端或其他设备并发产生的新未读消息。\n\n该调用不会删除消息,也不会修改单个会话的消息接收选项。", "description": "清零当前账号的全部会话未读数。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", @@ -1321,28 +1434,34 @@ "title": "设置私聊模式" }, "/sdk/uniapp/conversation/managing-conversations/set-burn-duration": { - "body": "`burnDuration` 商业版 表示阅后即焚时长,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, burnDuration: 30 })\n```\n\n时长单位和允许范围以商业版服务端协议为准。不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端事件呈现。\n\n关闭能力时使用产品约定的关闭值,并重新查询会话确认。", + "body": "`burnDuration` 商业版 表示阅后即焚时长,通过 `setConversation()` 更新。\n\n```uts\nimport { setConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversation({ conversationID, burnDuration: 30 })\n```\n\n`burnDuration` 的单位为秒,只描述阅后即焚模式的时长。启用或关闭模式还需要设置 `isPrivateChat`,见[开启或关闭阅后即焚](/sdk/uniapp/conversation/managing-conversations/set-private-chat)。\n\n不要把 `burnDuration` 与服务端消息定期删除周期 `msgDestructTime` 混用,也不要在客户端自行倒计时后直接删除服务端消息;界面应结合消息状态和服务端行为呈现。\n\nPromise 成功表示设置请求完成。通过 `onConversationChanged` 按 `conversationID` 合并最新 `burnDuration`,或重新查询会话确认。关闭能力时按产品协议设置私聊模式和时长,不用本地开关伪造服务端状态。", "description": "商业版设置会话的 burnDuration。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", "title": "设置阅后即焚时长" }, "/sdk/uniapp/conversation/managing-conversations/set-message-destruct": { - "body": "`OpenIMConversationItem` 包含 `isMsgDestruct` 与 `msgDestructTime` 商业版 状态,但当前 `OpenIMSetConversationParams` 没有这两个写入字段。\n\n因此本插件版本只能读取并展示服务端返回的销毁状态,不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已确认的商业版业务接口,并在完成后重新查询会话。\n\n客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。", + "body": "`OpenIMConversationItem` 包含 `isMsgDestruct` 与 `msgDestructTime` 商业版 状态,但当前 `OpenIMSetConversationParams` 没有这两个写入字段。\n\n服务端消息定期删除由这两个字段共同描述:`isMsgDestruct` 是开关,`msgDestructTime` 是删除周期。它不是阅后即焚;阅后即焚使用 `isPrivateChat` 和 `burnDuration`。\n\n因此本插件版本只能读取并展示服务端返回的销毁状态,不能照搬 Wasm 的 `setConversation({ isMsgDestruct, msgDestructTime })`,也不能通过相近字段或 `ex` 模拟 setter。需要修改时使用已经确认并鉴权的商业业务接口,并在完成后重新查询会话。\n\n达到删除周期后,服务端策略清理的是服务端保存的消息,不代表当前设备或其他已经同步过消息的客户端会立即删除本地副本。客户端卸载重装、清除数据或在新设备同步时,已被服务端清理的消息可能无法再次拉取。\n\n客户端倒计时只负责展示,消息是否真正销毁必须以 Core/服务端状态为准。该页保留与 Wasm 相同的业务边界,但明确记录当前 unix 源码合同没有写入能力,避免发布不存在的 API。", "description": "说明商业版会话消息销毁字段的当前写入边界。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", "title": "设置消息销毁" }, "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation": { - "body": "`hideConversation()` 从会话列表隐藏指定会话。\n\n```uts\nimport { hideConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait hideConversation(conversationID)\n```\n\n隐藏不会删除历史消息;后续收到新消息时,会话可能重新出现在列表中。需要永久清理会话及消息时选择对应删除 API,并在 UI 中明确差异。\n\n完成后通过会话事件或重新查询移除本地项,不只操作页面数组。", + "body": "`hideConversation()` 从会话列表隐藏指定会话。\n\n```uts\nimport { hideConversation } from '@/uni_modules/unix-openim-sdk'\n\nawait hideConversation(conversationID)\n```\n\n该操作只影响当前登录用户的会话入口,不会删除单聊关系、退出群组或影响其他用户。隐藏不会删除本地或服务端历史消息;后续收到新消息或完成重新同步时,会话可能重新出现在列表中。需要清理会话及消息时选择对应删除 API,并在 UI 中明确差异。\n\n## 调用后的状态变化\n\nPromise 成功表示本次隐藏请求已经完成。调用端可以按 `conversationID` 从当前会话列表移除对应项,但仍需合并 `onConversationChanged`,或重新查询会话列表校准。完整监听见[获取会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)。\n\n不要把隐藏操作描述为删除聊天关系,也不要只操作页面数组而跳过 store;同一会话再次出现时,按 `conversationID` 恢复或更新原状态。", "description": "从当前会话列表隐藏一个会话而不删除消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "调用后的状态变化", + "url": "#调用后的状态变化" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", "title": "隐藏会话" }, "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations": { - "body": "`hideAllConversations()` 隐藏当前账号的全部会话。\n\n```uts\nimport { hideAllConversations } from '@/uni_modules/unix-openim-sdk'\n\nawait hideAllConversations()\n```\n\n这是范围操作,调用前应二次确认。它不会删除历史消息,后续消息可能重新创建可见会话。完成后重新查询会话快照,避免本地状态与 Core 不一致。", + "body": "`hideAllConversations()` 重置当前账号全部会话的列表状态、未读数、最新消息摘要和草稿,使这些会话不再出现在分页会话列表中。\n\n```uts\nimport { hideAllConversations } from '@/uni_modules/unix-openim-sdk'\n\nawait hideAllConversations()\n```\n\n这是范围操作,调用前应二次确认。Promise 成功只表示本地会话状态已完成重置;它不会删除本地或服务端消息、群组、好友关系,也不会修改其他客户端的会话。\n\n后续收到新消息或重新建立有效状态时,相应会话仍可能再次出现。完成后重新查询[会话列表](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)和[会话总未读数](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count),不要把 Promise 成功当成远端事件或永久删除。", "description": "隐藏当前账号的全部会话但保留消息。", "headings": [], "sourcePath": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", @@ -1370,30 +1489,84 @@ "title": "清空会话消息" }, "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": { - "body": "会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。\n\n`OpenIMConversationGroupItem` 的字段均可选。读取 `conversationGroupID` 后再作为主键;`conversationIDs` 可能为 `null`,完整成员应以分页查询为准。\n\n五个分组事件返回 opaque JSON 字符串,不是类型化对象:\n\n```uts\nimport {\n off,\n onConversationGroupAdded,\n onConversationGroupChanged,\n onConversationGroupDeleted,\n onConversationGroupMemberAdded,\n onConversationGroupMemberDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction refreshFromRawGroupEvent(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationGroups()\n } catch (_) {\n console.error('Invalid conversation group event payload')\n }\n}\n\nconst addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent)\nconst subscriptions : Array = [\n addedSubscription,\n onConversationGroupChanged(refreshFromRawGroupEvent),\n onConversationGroupDeleted(refreshFromRawGroupEvent),\n onConversationGroupMemberAdded(refreshFromRawGroupEvent),\n onConversationGroupMemberDeleted(refreshFromRawGroupEvent),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n校验 JSON 后仍建议重新查询快照,不依赖未冻结的 raw 字段。日志不要输出完整 payload,因为扩展字段可能包含业务数据。", + "body": "会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。\n\n## 分组类型\n\n创建分组时使用 `OpenIMConversationGroupType`,查询分组时使用 `OpenIMConversationGroupQueryType`。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。\n\n同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。\n\n## 分组数据\n\n`OpenIMConversationGroupItem` 的字段均可选:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroupID` | `string \\| null` | 分组稳定标识;非空后才能作为缓存主键。 |\n| `name` | `string \\| null` | 分组名称。 |\n| `order` | `number \\| null` | 分组排序值。 |\n| `ex` | `string \\| null` | 业务扩展字符串,只按已约定格式解析。 |\n| `conversationGroupType` | `number \\| null` | 分组类型。 |\n| `hidden` | `boolean \\| null` | 当前分组是否隐藏。 |\n| `unreadCount` | `number \\| null` | 分组维度的未读数快照。 |\n| `conversationIDs` | `string[] \\| null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 |\n\n读取非空 `conversationGroupID` 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。\n\n## 可用操作\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建分组并可选加入初始会话 | [创建会话分组](/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group) |\n| 查询分组列表 | [查询会话分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups) |\n| 查询分组资料、成员与总数 | [查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) |\n| 查询一个会话所属的全部分组 | [查询会话所属分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id) |\n| 加入或移出分组 | [把会话加入分组](/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups)、[把会话移出分组](/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups) |\n| 更新名称、扩展和隐藏状态 | [更新会话分组](/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group) |\n| 调整分组顺序 | [设置会话分组顺序](/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order) |\n| 删除分组 | [删除会话分组](/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group) |\n\n页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。\n\n## 监听分组变化\n\n五个分组事件返回 opaque JSON 字符串,不是类型化对象:\n\n```uts\nimport {\n off,\n onConversationGroupAdded,\n onConversationGroupChanged,\n onConversationGroupDeleted,\n onConversationGroupMemberAdded,\n onConversationGroupMemberDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction refreshFromRawGroupEvent(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationGroups()\n } catch (_) {\n console.error('Invalid conversation group event payload')\n }\n}\n\nconst addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent)\nconst subscriptions : Array = [\n addedSubscription,\n onConversationGroupChanged(refreshFromRawGroupEvent),\n onConversationGroupDeleted(refreshFromRawGroupEvent),\n onConversationGroupMemberAdded(refreshFromRawGroupEvent),\n onConversationGroupMemberDeleted(refreshFromRawGroupEvent),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`onConversationGroupAdded`、`onConversationGroupChanged` 和 `onConversationGroupDeleted` 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。\n\n校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 `ex` 或其他字段可能包含业务数据。", "description": "商业版会话分组模型、raw 事件解析和生命周期。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "分组类型", + "url": "#分组类型" + }, + { + "depth": 2, + "title": "分组数据", + "url": "#分组数据" + }, + { + "depth": 2, + "title": "可用操作", + "url": "#可用操作" + }, + { + "depth": 2, + "title": "监听分组变化", + "url": "#监听分组变化" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", "title": "会话分组概览" }, "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": { - "body": "`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。\n\n```uts\nimport { createConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await createConversationGroup({\n name: '重要会话',\n order: 100,\n conversationGroupType: 0,\n conversationID: conversationID,\n ex: '',\n})\n\nconst group = result?.conversationGroup\n```\n\n分组类型使用插件导出的合同值。`conversationID` 可省略;`ex` 是整段业务扩展。返回分组可能为 `null`,最终列表以分组事件或重新查询为准。", + "body": "`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `name` | `string` | 是 | 分组名称。提交前按产品规则校验空值和长度。 |\n| `order` | `number` | 是 | 分组排序值;排序方向应在业务中保持一致。 |\n| `conversationGroupType` | `OpenIMConversationGroupType` | 是 | 分组类型,使用插件合同允许的值。 |\n| `conversationID` | `string \\| null` | 否 | 创建时加入分组的初始会话 ID。 |\n| `ex` | `string \\| null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 |\n\n```uts\nimport { createConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await createConversationGroup({\n name: '重要会话',\n order: 100,\n conversationGroupType: 0,\n conversationID: conversationID,\n ex: '',\n})\n\nconst group = result?.conversationGroup\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMCreateConversationGroupResult | null`。非空结果的 `conversationGroup` 是新分组快照,也可能为 `null`;先校验非空 `conversationGroupID` 再加入本地索引。\n\nPromise 成功和 `onConversationGroupAdded` 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 `conversationID`,成员关系也应以查询结果校准。", "description": "商业版创建自定义会话分组。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", "title": "创建会话分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups": { - "body": "`getConversationGroups()` 商业版 按 `conversationGroupType` 查询分组。\n\n```uts\nimport { getConversationGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroups({ conversationGroupType: 0 })\nconst groups = result?.conversationGroups ?? []\n```\n\n按非空 `conversationGroupID` 去重并排序。分组项中的 `conversationIDs` 可能只是当前快照;需要成员和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。", + "body": "`getConversationGroups()` 商业版 按 `conversationGroupType` 查询分组。\n\n`conversationGroupType` 是必填的 `OpenIMConversationGroupQueryType`。使用合同允许的查询值,不把分组创建类型、展示 tab 下标或本地枚举直接混用。\n\n```uts\nimport { getConversationGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroups({ conversationGroupType: 0 })\nconst groups = result?.conversationGroups ?? []\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGetConversationGroupsResult | null`,从 `conversationGroups` 读取分组快照。按非空 `conversationGroupID` 去重并使用 `order` 排序。\n\n### 会话分组字段\n\n`OpenIMConversationGroupItem` 的字段均可空,包括 `conversationGroupID`、`name`、`order`、`ex`、`conversationGroupType`、`hidden`、`unreadCount` 和 `conversationIDs`。先校验 ID 再缓存;`conversationIDs` 可能只是当前快照,需要成员、分页和总数时使用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。", "description": "商业版按分组查询类型读取会话分组快照。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 3, + "title": "会话分组字段", + "url": "#会话分组字段" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", "title": "查询会话分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": { - "body": "`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。\n\n```uts\nimport { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupInfoWithConversations({\n conversationGroupID: groupID,\n pagination: { pageNumber: 1, showNumber: 100 },\n})\n```\n\n`pageNumber` 从服务端约定的第一页开始,本合同示例使用 1;`showNumber` 是页大小。返回字段 `ConversationTotal` 首字母大写,应按真实字段名读取。会话按 `conversationID` 去重,分组为 `null` 时不要继续分页。", + "body": "`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 |\n| `pagination.pageNumber` | `number` | 是 | 页码;本合同示例从 `1` 开始。 |\n| `pagination.showNumber` | `number` | 是 | 每页会话数量。 |\n\n```uts\nimport { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupInfoWithConversations({\n conversationGroupID: groupID,\n pagination: { pageNumber: 1, showNumber: 100 },\n})\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGetConversationGroupInfoWithConversationsResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroup` | `OpenIMConversationGroupItem \\| null` | 当前分组资料;为 `null` 时不要继续分页。 |\n| `ConversationTotal` | `number \\| null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 |\n| `conversations` | `OpenIMConversationItem[]` | 当前页会话。 |\n\n分页期间成员可能变化。按 `conversationID` 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 `ConversationTotal`。", "description": "商业版分页读取一个会话分组及其成员会话。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", "title": "查询分组及会话" }, @@ -1405,58 +1578,141 @@ "title": "查询会话所属分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": { - "body": "`updateConversationGroup()` 商业版 只更新提供的字段。\n\n```uts\nimport { updateConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await updateConversationGroup({\n conversationGroupID: groupID,\n name: '重点跟进',\n hidden: false,\n})\n```\n\n`name`、`ex` 和 `hidden` 都可选。`ex` 是整段替换,先合并已有业务字段。返回 `conversationGroup` 可能为空,最终状态以事件或重新查询为准。", + "body": "`updateConversationGroup()` 商业版 只更新提供的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要更新的分组 ID。 |\n| `name` | `string \\| null` | 否 | 新分组名称。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `hidden` | `boolean \\| null` | 否 | 是否在业务界面隐藏该分组。 |\n\n```uts\nimport { updateConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await updateConversationGroup({\n conversationGroupID: groupID,\n name: '重点跟进',\n hidden: false,\n})\n```\n\n除 `conversationGroupID` 外,至少提供一个实际更新字段。`ex` 是整段替换,多个模块共用时先读取并合并已有业务字段。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMUpdateConversationGroupResult | null`,其中 `conversationGroup` 是更新后的分组快照或 `null`。只有非空且带有效 ID 时才立即合并;最终状态通过 `onConversationGroupChanged` 或重新查询校准。", "description": "商业版更新分组名称、扩展字段或隐藏状态。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", "title": "更新会话分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order": { - "body": "`setConversationGroupOrder()` 商业版 批量提交分组 ID 与顺序值。\n\n```uts\nimport { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationGroupOrder({\n conversationGroupOrders: [\n { conversationGroupID: 'group_a', order: 100 },\n { conversationGroupID: 'group_b', order: 200 },\n ],\n})\n```\n\n拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。成功后重新查询分组排序;并发编辑时以服务端最终值为准。", + "body": "`setConversationGroupOrder()` 商业版 批量提交分组 ID 与顺序值。\n\n## 参数说明\n\n`conversationGroupOrders` 是非空数组,每项包含:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要调整的分组 ID。 |\n| `order` | `number` | 是 | 新排序值;同一批次应避免重复值或不稳定规则。 |\n\n```uts\nimport { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk'\n\nawait setConversationGroupOrder({\n conversationGroupOrders: [\n { conversationGroupID: 'group_a', order: 100 },\n { conversationGroupID: 'group_b', order: 200 },\n ],\n})\n```\n\n拖拽结束后一次提交完整受影响集合,避免每次移动都发请求。提交前按 `conversationGroupID` 去重,并用稳定算法计算所有受影响分组的值。\n\n## 返回结果\n\nPromise 成功直接返回字符串结果,表示排序更新请求完成。重新查询分组或等待分组变更事件确认最终排序;并发编辑时以服务端最终 `order` 为准,不只保留本地拖拽顺序。", "description": "商业版批量更新会话分组排序值。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", "title": "设置会话分组顺序" }, "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups": { - "body": "`addConversationsToGroups()` 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。\n\n```uts\nimport { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait addConversationsToGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n两个数组都不能为空,并应先去重。Promise 成功后通过成员新增事件或重新查询确认;不要在失败时保留仅本地的成员关系。", + "body": "`addConversationsToGroups()` 商业版 使用会话 ID 与分组 ID 的集合更新成员关系。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationIDs` | `string[]` | 是 | 要加入分组的会话 ID 列表。 |\n| `conversationGroupIDs` | `string[]` | 是 | 目标会话分组 ID 列表。每个会话会加入每个目标分组。 |\n\n```uts\nimport { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait addConversationsToGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n两个数组都不能为空,并应先去除空值和重复项。一个会话可以属于多个分组;该操作不会改变会话消息或删除其他分组关系。\n\n## 返回结果\n\nPromise 成功直接返回 Core 的字符串结果,表示成员更新请求已经完成,不等于分组成员事件已经到达。通过 `onConversationGroupMemberAdded` 或重新查询分组确认最终关系;不要在失败时保留仅本地的成员关系。完整 raw 事件处理见[会话分组概览](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups)。", "description": "商业版把多个会话加入一个或多个分组。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", "title": "把会话加入分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups": { - "body": "`removeConversationsFromGroups()` 商业版 使用与加入相同的成员参数。\n\n```uts\nimport { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait removeConversationsFromGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n移出分组不会删除会话或消息。成功后处理成员删除事件或重新查询分组;重复移除按服务端状态处理,不做无限重试。", + "body": "`removeConversationsFromGroups()` 商业版 使用与加入相同的成员参数。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationIDs` | `string[]` | 是 | 要移出分组的会话 ID 列表。 |\n| `conversationGroupIDs` | `string[]` | 是 | 要移出的目标分组 ID 列表。 |\n\n```uts\nimport { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk'\n\nawait removeConversationsFromGroups({\n conversationIDs: [conversationID],\n conversationGroupIDs: ['group_a'],\n})\n```\n\n两个数组都不能为空,并应先去重。移出分组不会删除会话、消息或该会话在其他分组中的成员关系。\n\n## 返回结果\n\nPromise 成功直接返回字符串结果,表示请求完成,不等于本地分组快照已经更新。随后处理 `onConversationGroupMemberDeleted` 或重新查询分组。重复移除按服务端最终状态处理,不做无限重试,也不在失败时伪造本地成功。", "description": "商业版从一个或多个分组移除多个会话。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", "title": "把会话移出分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group": { - "body": "`deleteConversationGroup()` 商业版 删除一个分组。\n\n```uts\nimport { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteConversationGroup({ conversationGroupID: groupID })\n```\n\n删除分组不会删除其中的会话或消息。UI 应二次确认;成功后以分组删除事件或重新查询清理本地分组与成员索引。", + "body": "`deleteConversationGroup()` 商业版 删除一个分组。\n\n参数对象只包含必填的 `conversationGroupID`。删除前应确认该 ID 来自当前账号的分组快照,而不是名称或数组下标。\n\n```uts\nimport { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteConversationGroup({ conversationGroupID: groupID })\n```\n\n## 返回结果\n\nPromise 成功直接返回字符串结果,表示删除请求已完成。删除分组不会删除其中的会话或消息,也不会删除会话本身。\n\nUI 应二次确认;成功后通过 `onConversationGroupDeleted` 或重新查询,按 `conversationGroupID` 清理本地分组与成员索引。Promise 失败时不要先行隐藏分组;若事件与本地快照不一致,以重新查询为准。", "description": "商业版删除指定会话分组。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", "title": "删除会话分组" }, "/sdk/uniapp/group/overview-group": { - "body": "群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。\n\n```uts\nimport {\n off,\n onGroupDismissed,\n onGroupInfoChanged,\n onJoinedGroupAdded,\n onJoinedGroupDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group))\nconst subscriptions : Array = [\n infoSubscription,\n onGroupDismissed((group) => removeGroup(group.groupID)),\n onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)),\n onJoinedGroupDeleted((group) => removeGroup(group.groupID)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。\n\n`OpenIMGroupItem` 的 `attachedInfo` 以及 `displayIsRead`、禁言例外等扩展能力可能依赖商业版。字段缺失时降级,不伪造默认权限。", + "body": "群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。\n\n## 核心数据类型\n\n| 类型 | 用途 |\n| --- | --- |\n| `OpenIMGroupItem` | 已加入群组列表、群资料页和群状态。 |\n| `OpenIMCreateGroupInfo` | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 |\n| `OpenIMGroupMemberItem` | 群成员资料、角色、入群来源和禁言结束时间。 |\n| `OpenIMGroupApplicationItem` | 入群申请及其申请人与处理状态。 |\n\n`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。\n\n成员对象使用 `groupID:userID` 作为稳定合并标识。群内 `nickname` 和 `faceURL` 属于成员快照,不应被写回为用户账号级资料。\n\n## 按任务查找页面\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建、更新、解散或退出群组 | [创建群组](/sdk/uniapp/group/create-group)、[更新群资料](/sdk/uniapp/group/update-group-profile)、[解散群组](/sdk/uniapp/group/dismiss-group)、[退出群组](/sdk/uniapp/group/quit-group) |\n| 分页查询已加入群组或指定群资料 | [分页查询已加入群组](/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)、[查询指定群资料](/sdk/uniapp/group/retrieving-groups/get-specified-groups-info) |\n| 查询、搜索和管理群成员 | [查询群成员列表](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)、[搜索群成员](/sdk/uniapp/group/retrieving-group-members/search-group-members) |\n| 邀请或移除成员、转让群主 | [邀请用户入群](/sdk/uniapp/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/uniapp/group/managing-group-members/kick-group-member)、[转让群主](/sdk/uniapp/group/managing-group-members/transfer-group-owner) |\n| 发送、查询和处理入群申请 | [申请加入群组](/sdk/uniapp/group/join-group)、[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) |\n| 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 |\n\n## 状态更新\n\n本页归属群资料与已加入群列表的四个事件:\n\n```uts\nimport {\n off,\n onGroupDismissed,\n onGroupInfoChanged,\n onJoinedGroupAdded,\n onJoinedGroupDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group))\nconst subscriptions : Array = [\n infoSubscription,\n onGroupDismissed((group) => removeGroup(group.groupID)),\n onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)),\n onJoinedGroupDeleted((group) => removeGroup(group.groupID)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。\n\n`onGroupInfoChanged` 更新资料,`onGroupDismissed` 表示群已解散,`onJoinedGroupAdded` / `onJoinedGroupDeleted` 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。\n\n群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 `off(subscription)`。", "description": "理解群资料、成员、申请、权限和群组事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "核心数据类型", + "url": "#核心数据类型" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + }, + { + "depth": 2, + "title": "状态更新", + "url": "#状态更新" + } + ], "sourcePath": "/sdk/uniapp/group/overview-group", "title": "群组概览" }, "/sdk/uniapp/group/create-group": { - "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n群类型、验证方式和其他 `OpenIMCreateGroupInfo` 字段使用插件合同值。成员与管理员先去重,管理员必须符合服务端规则。返回为空时不要创建仅本地群;以 Promise、群新增事件和重新查询共同确认。", + "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupInfo.groupName` | `string` | 是 | 群名称。 |\n| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 |\n| `groupInfo.notification` | `string \\| null` | 否 | 初始群公告。 |\n| `groupInfo.introduction` | `string \\| null` | 否 | 群简介。 |\n| `groupInfo.faceURL` | `string \\| null` | 否 | 群头像 URL。 |\n| `groupInfo.ex` | `string \\| null` | 否 | 群扩展字符串,完整写入。 |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 |\n| `adminUserIDs` | `string[] \\| null` | 否 | 初始管理员用户 ID。 |\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。\n\nPromise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。", "description": "创建群资料并设置初始成员与管理员。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/group/create-group", "title": "创建群组" }, "/sdk/uniapp/group/update-group-profile": { - "body": "`setGroupInfo()` 只更新提供的可选字段。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: '新的群名',\n introduction: '项目协作群',\n faceURL: 'https://cdn.example.com/group.png',\n})\n```\n\n群主和管理员权限由服务端校验。Promise 成功后通过 `onGroupInfoChanged` 或重新查询刷新,不直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", + "body": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | `string \\| null` | 否 | 新群名称。 |\n| `introduction` | `string \\| null` | 否 | 新群简介。 |\n| `faceURL` | `string \\| null` | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n})\n```\n\n不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。\n\nPromise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/update-group-profile", "title": "更新群资料" }, @@ -1468,63 +1724,80 @@ "title": "设置群公告" }, "/sdk/uniapp/group/set-group-extension": { - "body": "群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) })\n```\n\n`ex` 是整段替换。先读取并校验已有 JSON,再合并本模块字段;解析失败时不要覆盖原值。扩展数据对有权读取群资料的成员可见,不存放秘密。", + "body": "群组业务扩展使用 `setGroupInfo()` 的 `ex` 字符串。`ex` 是完整字符串,SDK 不会按 JSON 字段自动合并。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst previous = JSON.parse(group.ex || '{}')\n\nawait setGroupInfo({\n groupID,\n ex: JSON.stringify({\n ...previous,\n projectID: 'project-42',\n }),\n})\n```\n\n多个模块共用时,应划分稳定命名空间,并在写入前保留其他模块的数据。解析失败时不要覆盖原值;扩展数据对有权读取群资料的成员可见,不要存放秘密。\n\nPromise 成功后,通过 `onGroupInfoChanged` 按 `groupID` 合并最新群资料;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。", "description": "通过 setGroupInfo 更新群组 ex。", "headings": [], "sourcePath": "/sdk/uniapp/group/set-group-extension", "title": "设置群扩展字段" }, "/sdk/uniapp/group/set-group-join-verification": { - "body": "通过 `setGroupInfo()` 的 `needVerification` 更新入群验证策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, needVerification: 1 })\n```\n\n使用 `OpenIMGroupNeedVerification` 对应常量,不散落裸数字。策略只影响后续申请;已有申请和成员不会自动重新处理。最终值以群资料事件为准。", + "body": "通过 `setGroupInfo()` 的 `needVerification` 更新申请和邀请用户加入群组时的验证策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, needVerification: 1 })\n```\n\n| `needVerification` | 含义 |\n| --- | --- |\n| `0` | 用户申请需要审核;群成员邀请可直接入群。 |\n| `1` | 申请和普通成员邀请都需要审核;群主或管理员邀请除外。 |\n| `2` | 申请或邀请均可直接入群。 |\n\n`OpenIMGroupNeedVerification` 的类型范围是 `0 | 1 | 2`。客户端应根据该策略展示申请提示,但最终是否允许加入仍由 OpenIMServer 判断。策略只影响后续申请;已有申请和成员不会自动重新处理。\n\nPromise 成功后,通过 `onGroupInfoChanged` 合并最新群资料,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。", "description": "设置群成员加入时的验证策略。", "headings": [], "sourcePath": "/sdk/uniapp/group/set-group-join-verification", "title": "设置入群验证" }, "/sdk/uniapp/group/set-group-member-profile-access": { - "body": "通过 `setGroupInfo()` 的 `lookMemberInfo` 设置群成员资料可见策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, lookMemberInfo: 1 })\n```\n\n使用 `OpenIMGroupOption` 合法值。该策略不替代业务后端的隐私与权限校验;客户端隐藏 UI 也不能视为安全边界。", + "body": "`lookMemberInfo` 控制群成员能否通过群组查看其他成员资料。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, lookMemberInfo: 1 })\n```\n\n| `lookMemberInfo` | 含义 |\n| --- | --- |\n| `0` | 允许成员查看其他成员资料。 |\n| `1` | 不允许成员查看其他成员资料。 |\n\n`OpenIMGroupOption` 的类型范围是 `0 | 1`。不要把这组值当作常见的布尔型 `0 = false、1 = true`。\n\n该设置与“是否允许通过群组添加好友”相互独立,也不替代业务后端的隐私与权限校验。Promise 成功后,通过 `onGroupInfoChanged` 合并最新群资料,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。", "description": "控制群成员是否可以查看其他成员资料。", "headings": [], "sourcePath": "/sdk/uniapp/group/set-group-member-profile-access", "title": "设置群成员资料可见性" }, "/sdk/uniapp/group/set-group-member-friend-permission": { - "body": "通过 `setGroupInfo()` 的 `applyMemberFriend` 更新群成员加好友策略。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, applyMemberFriend: 1 })\n```\n\n使用 `OpenIMGroupOption` 合法值。该字段由服务端执行,UI 只负责展示;策略变化后以群资料事件刷新。", + "body": "通过 `setGroupInfo()` 的 `applyMemberFriend` 控制群成员能否通过群组向其他成员发送好友申请。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({ groupID, applyMemberFriend: 1 })\n```\n\n| `applyMemberFriend` | 含义 |\n| --- | --- |\n| `0` | 允许通过群成员关系发起好友申请。 |\n| `1` | 不允许通过群成员关系发起好友申请。 |\n\n`OpenIMGroupOption` 的类型范围是 `0 | 1`。该字段只控制从群成员关系发起好友申请的入口,不等同于隐藏成员资料。设置由服务端执行,客户端 UI 不是安全边界。\n\nPromise 成功表示设置请求完成。最新状态通过 `onGroupInfoChanged` 按 `groupID` 合并,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。", "description": "控制群成员之间是否可以发起好友申请。", "headings": [], "sourcePath": "/sdk/uniapp/group/set-group-member-friend-permission", "title": "设置群成员加好友权限" }, "/sdk/uniapp/group/change-group-mute": { - "body": "`changeGroupMute()` 修改群组全员禁言。\n\n```uts\nimport { changeGroupMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMute({ groupID, isMute: true })\n```\n\n权限和群状态由服务端校验。Promise 成功后通过群资料事件或重新查询更新 UI。商业版群资料可能包含禁言例外用户列表;公共客户端应把缺失字段视为无扩展信息,而非自行推断。", + "body": "`changeGroupMute()` 控制群组整体禁言。群主和管理员可以按 OpenIMServer 权限执行该操作。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要修改的群 ID。 |\n| `isMute` | `boolean` | 是 | `true` 开启全员禁言,`false` 关闭。 |\n\n```uts\nimport { changeGroupMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMute({ groupID, isMute: true })\n```\n\n只有群主或具备服务端权限的管理员可以操作,最终权限和群状态由服务端校验。不要仅根据本地角色显示结果;服务端仍可能因群状态、角色变化或并发操作拒绝。群主和管理员通常仍可发送消息,因此群组禁言不表示所有用户都无法发言。\n\nWasm 文档中的 `muteBypassUserIDs` 商业扩展没有进入当前 uni-app / uni-app x 合同,请勿向 `changeGroupMute()` 传入该字段。商业服务端即使支持例外用户,也应以当前插件公开的类型和后续群资料为准。\n\n## 返回结果\n\nPromise 成功直接返回字符串结果,表示服务端完成本次群禁言设置,不等于所有成员界面已经更新。群资料随后可能通过 `onGroupInfoChanged` 到达,应按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时重新查询群资料。\n\n全员禁言与单个成员禁言是不同能力。商业版群资料可能包含禁言例外用户列表;公共客户端把缺失扩展视为“没有可用扩展数据”,不能自行推断例外权限。", "description": "修改群组全员禁言状态。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/group/change-group-mute", "title": "开启或关闭全员禁言" }, "/sdk/uniapp/group/join-group": { - "body": "`joinGroup()` 提交入群申请。\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n`joinSource` 使用产品与服务端约定值。Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。申请文案和 `ex` 不包含敏感信息。", + "body": "`joinGroup()` 提交入群申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要申请加入的群 ID。 |\n| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 |\n| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 |\n| `ex` | `string \\| null` | 否 | 申请扩展字符串,只按已确认协议填写。 |\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。\n\nPromise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。", "description": "向指定群发送加入申请。", - "headings": [], - "sourcePath": "/sdk/uniapp/group/join-group", - "title": "申请加入群组" - }, - "/sdk/uniapp/group/quit-group": { - "body": "`quitGroup()` 让当前用户退出群组。\n\n```uts\nimport { quitGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait quitGroup(groupID)\n```\n\n群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。", - "description": "当前用户主动退出指定群。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/uniapp/group/join-group", + "title": "申请加入群组" + }, + "/sdk/uniapp/group/quit-group": { + "body": "`quitGroup()` 让当前用户退出群组。\n\n```uts\nimport { quitGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait quitGroup(groupID)\n```\n\n群主通常不能直接退出,需先转让群主或解散群。UI 应二次确认;成功后关闭群聊页,并以已加入群删除事件或重新查询清理状态。\n\nPromise 成功表示退出请求完成,不等于群列表和成员事件已经到达。当前用户退出后,按 `groupID` 清理群聊天入口、成员分页和发送权限;其他成员仍保留群组。\n\n群主转让与退出应串行执行:先确认新群主事件或重新查询结果,再调用退出。失败时保留聊天与群状态,不要仅因用户点击确认就删除本地数据。", + "description": "当前用户主动退出指定群。", + "headings": [], "sourcePath": "/sdk/uniapp/group/quit-group", "title": "退出群组" }, "/sdk/uniapp/group/dismiss-group": { - "body": "`dismissGroup()` 解散群组。\n\n```uts\nimport { dismissGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait dismissGroup(groupID)\n```\n\n这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。", + "body": "`dismissGroup()` 解散群组。\n\n```uts\nimport { dismissGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait dismissGroup(groupID)\n```\n\n这是不可逆的高风险操作,只允许有权限的群主执行。成功后所有成员会收到群解散/已加入群删除相关事件;关闭聊天与管理页面,不再发送群消息。\n\nPromise 成功表示解散请求完成,不代表每个客户端都已处理事件。当前客户端继续等待 `onGroupDismissed` / `onJoinedGroupDeleted` 或重新查询,按 `groupID` 移除群、成员和聊天入口。\n\n提交前展示群名和成员影响范围,并防止重复点击。Promise 失败时保留当前群状态;权限和群状态最终由服务端校验,不能只依赖本地 `ownerUserID`。", "description": "群主解散指定群组。", "headings": [], "sourcePath": "/sdk/uniapp/group/dismiss-group", "title": "解散群组" }, "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info": { - "body": "`getSpecifiedGroupsInfo()` 批量查询群资料。\n\n```uts\nimport { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupsInfo(['group_a', 'group_b'])\nconst groups = result?.groups ?? []\n```\n\n结果不保证与输入顺序一致,按 `groupID` 映射。未返回群可能不存在、已解散或当前无权访问。大量 ID 分批查询。", + "body": "群组查询只建立调用时的快照,不会触发群组事件。公开群发现、跨业务目录和复杂权限过滤应由业务后端提供;SDK 查询面向已知群组和当前账号已加入的群组。\n\n`getSpecifiedGroupsInfo()` 接收群组 ID 数组:\n\n```uts\nimport { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupsInfo(groupIDs)\nconst groups = result?.groups ?? []\n```\n\n读取单个群组时仍传数组,并检查 `groups[0]` 是否存在。群组没有 URL 或 slug 字段,业务路由应先解析为稳定的 `groupID`。\n\nPromise 成功后,`result?.groups` 是匹配的 `OpenIMGroupItem[]`,字段含义见[分页获取已加入群组](/zh/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)。结果不保证与输入 ID 按位置一一对应,应按 `groupID` 合并;未返回群可能不存在、已解散或当前无权访问。大量 ID 应分批查询。\n\n后续变化按 `groupID` 合并,完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。", "description": "按 groupID 列表批量查询群资料。", "headings": [], "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", @@ -1538,9 +1811,25 @@ "title": "查询已加入群组" }, "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": { - "body": "`getJoinedGroupListPage()` 适合群数量较大的账号。\n\n```uts\nimport { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupListPage({ offset: 0, count: 100 })\nappendGroups(result?.groups ?? [])\n```\n\n`offset` 从 0 开始,直到返回数量小于 `count`。分页期间群事件可能改变列表,应按 `groupID` 去重,而不是依赖页内位置。\n\n`displayIsRead` 和部分禁言扩展字段商业版,缺失时按可选值处理。", + "body": "`getJoinedGroupListPage()` 适合群数量较大的账号。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的群数量。 |\n\n```uts\nimport { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupListPage({ offset: 0, count: 100 })\nappendGroups(result?.groups ?? [])\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupListResult | null`,从 `groups` 读取当前页 `OpenIMGroupItem[]`。`offset` 从 0 开始,直到返回数量小于 `count`。\n\n### 群资料字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 群稳定标识。 |\n| `groupName` | `string` | 群名称。 |\n| `notification` | `string` | 群公告。 |\n| `introduction` | `string` | 群简介。 |\n| `faceURL` | `string` | 群头像地址。 |\n| `ownerUserID` | `string` | 当前群主用户 ID。 |\n| `creatorUserID` | `string` | 群创建人用户 ID。 |\n| `createTime` | `number` | 群创建时间。 |\n| `memberCount` | `number` | 当前成员数快照。 |\n| `status` | `number` | 群状态。 |\n| `groupType` | `number` | 群类型。 |\n| `needVerification` | `number` | 入群验证策略。 |\n| `lookMemberInfo` | `number` | 普通成员查看成员资料的策略。 |\n| `applyMemberFriend` | `number` | 群成员之间申请好友的策略。 |\n| `notificationUpdateTime` | `number` | 群公告更新时间。 |\n| `notificationUserID` | `string` | 最近更新群公告的用户 ID。 |\n| `ex` | `string` | 群扩展字符串。 |\n| `attachedInfo` 商业版字段 | `string` | 商业附加信息,只按已确认协议解析。 |\n\n`memberCount` 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见[群组概览](/sdk/uniapp/group/overview-group)。\n\n分页期间群事件可能改变列表,应先把结果写入以 `groupID` 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。\n\n第一页应替换当前账号快照,后续页按 `groupID` 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。", "description": "按 offset 和 count 分页读取已加入群组。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 3, + "title": "群资料字段", + "url": "#群资料字段" + } + ], "sourcePath": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", "title": "分页查询已加入群组" }, @@ -1552,23 +1841,66 @@ "title": "检查是否已加入群组" }, "/sdk/uniapp/group/retrieving-groups/search-groups": { - "body": "`searchGroups()` 搜索当前可见的群资料。\n\n```uts\nimport { searchGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroups({\n keywordList: ['项目'],\n isSearchGroupID: true,\n isSearchGroupName: true,\n})\n```\n\n空关键词由 UI 拦截。结果按 `groupID` 去重;该 API不是全站群发现接口,是否仅搜索已加入群由 Core 与服务端数据范围决定。", + "body": "`searchGroups()` 只搜索当前用户已加入且已经同步到本地的群组。当前接口只使用 `keywordList` 的第一个关键词。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `keywordList` | `string[]` | 是 | 搜索关键词数组;传一个去除首尾空格的非空关键词。 |\n| `isSearchGroupID` | `boolean` | 是 | 是否匹配 `groupID`。 |\n| `isSearchGroupName` | `boolean` | 是 | 是否匹配群名称。 |\n\n```uts\nimport { searchGroups } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroups({\n keywordList: [keyword.trim()],\n isSearchGroupID: true,\n isSearchGroupName: true,\n})\nconst groups = result?.groups ?? []\n```\n\n## 返回结果\n\nPromise 成功后,`result?.groups` 是匹配的 `OpenIMGroupItem[]`,字段含义见[分页获取已加入群组](/zh/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)。空关键词应由 UI 拦截;结果按 `groupID` 去重,只建立当前关键词下的快照,不应覆盖完整的已加入群组列表。\n\n公开群发现、复杂分类和权限过滤不属于该方法,应由业务后端实现。", "description": "按群 ID 或群名称搜索本地群组。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/group/retrieving-groups/search-groups", "title": "搜索已加入群组" }, "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient": { - "body": "`getGroupApplicationListAsRecipient()` 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。\n\n```uts\nimport {\n getGroupApplicationListAsRecipient,\n off,\n onGroupApplicationAccepted,\n onGroupApplicationAdded,\n onGroupApplicationDeleted,\n onGroupApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupApplicationAdded((item) => upsertGroupApplication(item))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupApplicationAccepted((item) => upsertGroupApplication(item)),\n onGroupApplicationRejected((item) => upsertGroupApplication(item)),\n onGroupApplicationDeleted((item) => removeGroupApplication(item)),\n]\n\nconst result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 })\nreplaceReceivedGroupApplications(result?.applications ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n事件与查询幂等合并。处理权限与申请状态由服务端校验;管理员变更后重新查询。", + "body": "`getGroupApplicationListAsRecipient()` 查询当前账号有权处理的入群申请。本页归属新增、接受、拒绝和删除事件。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用可选的 `offset` 和 `count`。`offset` 首页为 `0`,`count` 是本次读取数量。unix SDK 的参数不包含 Wasm 页面中的 `handleResults` 筛选,需要在返回后按 `handleResult` 过滤。\n\n```uts\nimport {\n getGroupApplicationListAsRecipient,\n off,\n onGroupApplicationAccepted,\n onGroupApplicationAdded,\n onGroupApplicationDeleted,\n onGroupApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupApplicationAdded((item) => upsertGroupApplication(item))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupApplicationAccepted((item) => upsertGroupApplication(item)),\n onGroupApplicationRejected((item) => upsertGroupApplication(item)),\n onGroupApplicationDeleted((item) => removeGroupApplication(item)),\n]\n\nconst result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 })\nreplaceReceivedGroupApplications(result?.applications ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupApplicationListResult | null`,从 `applications` 读取当前页。\n\n返回 `null` 时不要伪造成“没有申请”的空状态;结合登录状态和错误诊断决定保留旧快照或展示加载失败。空 `applications` 才表示当前页没有记录。分页加载期间若处理了申请,应重置 offset 并重新查询,避免同一记录跨页重复。\n\n### 入群申请字段\n\n`OpenIMGroupApplicationItem` 同时包含群快照和申请人信息:\n\n| 字段 | 说明 |\n| --- | --- |\n| `groupID`、`groupName`、`groupFaceURL` | 目标群 ID、名称和头像快照。 |\n| `notification`、`introduction` | 群公告和简介快照。 |\n| `ownerUserID`、`creatorUserID` | 群主和创建人用户 ID。 |\n| `groupType`、`status`、`memberCount` | 群类型、状态和成员数快照。 |\n| `userID`、`nickname`、`userFaceURL` | 申请人 ID、昵称和头像快照。 |\n| `handleResult` | 当前处理结果:待处理、已同意或已拒绝。 |\n| `reqMsg`、`reqTime` | 申请说明和申请时间。 |\n| `joinSource`、`inviterUserID` | 入群来源和邀请人。 |\n| `handleUserID`、`handledMsg`、`handledTime` | 处理人、处理说明和处理时间。 |\n| `ex`、`attachedInfo` | 扩展与附加信息,只按已确认协议解析。 |\n\n使用 `groupID:userID` 作为申请合并标识。昵称、头像和群名都是申请同步时的快照;需要最新资料时重新查询群或用户。\n\n## 监听申请变化\n\n本页是 `onGroupApplicationAdded`、`onGroupApplicationAccepted`、`onGroupApplicationRejected` 和 `onGroupApplicationDeleted` 的完整归属页。查询和事件按 `groupID:userID` 幂等合并,删除事件移除对应记录。\n\n处理权限和申请状态由服务端校验,不要只修改本地 `handleResult` 冒充成功。管理员或群主身份变化后重新查询;分页期间收到事件时可重置分页。退出登录、切换账号或销毁申请 store 时逐个释放句柄。\n\n按当前用户是否拥有处理权限,把收到的申请与自己发出的申请分开存储。事件中的群资料和申请人资料都是快照;群资料变化或用户改名时,不依赖旧申请记录刷新其他页面。\n\n接受或拒绝操作的 Promise 成功后仍等待相应事件,或重新查询本页确认最终 `handleResult`。申请被同意后,群列表和成员列表分别由自己的事件与查询更新;不要仅从申请项推断当前用户已经加入群。", "description": "分页查询待管理的入群申请,并处理申请事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 3, + "title": "入群申请字段", + "url": "#入群申请字段" + }, + { + "depth": 2, + "title": "监听申请变化", + "url": "#监听申请变化" + } + ], "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", "title": "查询收到的入群申请" }, "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": { - "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n参数可省略。按群、申请人和时间字段建立稳定 key;断线恢复后重新查询状态。", + "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n## 参数说明\n\n参数可省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次读取数量。 |\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n## 返回结果\n\nPromise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。\n\n按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。", "description": "分页查询当前账号发出的入群申请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", "title": "查询发出的入群申请" }, @@ -1587,37 +1919,77 @@ "title": "观察群申请角标变化" }, "/sdk/uniapp/group/group-applications/accept-group-application": { - "body": "`acceptGroupApplication()` 由有权限的群成员处理申请。\n\n```uts\nimport { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '已通过' })\n```\n\n成功后分别刷新申请列表和群成员列表。UI 在请求期间锁定该申请,避免接受与拒绝并发。", + "body": "`acceptGroupApplication()` 由有权限的群成员处理申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 申请目标群 ID。 |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID。 |\n| `handleMsg` | `string` | 是 | 处理说明;可能向申请人展示,不写内部风控信息。 |\n\n```uts\nimport { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '已通过' })\n```\n\nPromise 成功表示接受请求已经完成,不等于申请事件和成员事件都已到达。成功后分别刷新申请列表和群成员列表,或等待 `onGroupApplicationAccepted` 与 `onGroupMemberAdded` 按各自主键合并。\n\nUI 在请求期间锁定该申请,避免接受与拒绝并发。处理权限、申请状态、群人数和重复成员由服务端校验;失败时保留原申请并重新查询,不只改本地 `handleResult`。", "description": "接受指定用户加入指定群。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/group-applications/accept-group-application", "title": "接受入群申请" }, "/sdk/uniapp/group/group-applications/refuse-group-application": { - "body": "`refuseGroupApplication()` 使用与接受相同的定位字段。\n\n```uts\nimport { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait refuseGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '暂不通过' })\n```\n\n处理说明可能对申请人可见,不写内部风控信息。最终状态以申请事件或重新查询为准。", + "body": "`refuseGroupApplication()` 使用与接受相同的定位字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 申请目标群 ID。 |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID。 |\n| `handleMsg` | `string` | 是 | 拒绝说明;可能向申请人展示。 |\n\n```uts\nimport { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk'\n\nawait refuseGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: '暂不通过' })\n```\n\n处理说明可能对申请人可见,不写内部风控信息、内部账号或敏感审核依据。UI 在请求期间锁定该申请,避免接受与拒绝并发。\n\nPromise 成功表示拒绝请求完成,不等于 `onGroupApplicationRejected` 已经到达。最终状态以申请事件或重新查询为准;失败时不要仅在本地隐藏申请。", "description": "拒绝指定用户加入指定群。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/group-applications/refuse-group-application", "title": "拒绝入群申请" }, "/sdk/uniapp/group/group-applications/delete-group-requests": { - "body": "`deleteGroupRequests()` 商业版 删除明确指定的申请记录。\n\n```uts\nimport { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteGroupRequests({\n groupRequests: [{ groupID, fromUserID: 'user_b' }],\n})\n```\n\n使用 `OpenIMSimpleGroupRequest` 的真实字段定位目标。删除记录不会移除已加入成员。完成后重新查询申请列表与数量。", + "body": "`deleteGroupRequests()` 商业版 删除明确指定的申请记录。\n\n## 参数说明\n\n`groupRequests` 是非空数组,每项 `OpenIMSimpleGroupRequest` 包含:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 申请目标群 ID。 |\n| `fromUserID` | `string` | 是 | 申请人的用户 ID。 |\n\n```uts\nimport { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk'\n\nawait deleteGroupRequests({\n groupRequests: [{ groupID, fromUserID: 'user_b' }],\n})\n```\n\n使用 `groupID:fromUserID` 精确定位,提交前去重。删除申请记录不等于拒绝申请,也不会移除已经加入的成员;移除成员应使用群成员 API。\n\nPromise 成功表示删除请求完成,随后可能收到申请删除事件。完整监听见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。批量失败时不要假定每一项都已删除;重新查询申请列表与数量。", "description": "商业版批量删除指定入群申请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/group-applications/delete-group-requests", "title": "删除入群申请记录" }, "/sdk/uniapp/group/retrieving-group-members/get-group-member-list": { - "body": "`getGroupMemberList()` 按过滤条件分页读取成员。本页归属三个成员事件。\n\n```uts\nimport {\n getGroupMemberList,\n off,\n onGroupMemberAdded,\n onGroupMemberDeleted,\n onGroupMemberInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupMemberAdded((member) => upsertMember(member))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupMemberDeleted((member) => removeMember(member.groupID, member.userID)),\n onGroupMemberInfoChanged((member) => upsertMember(member)),\n]\n\nconst result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 })\nreplaceMembers(result?.members ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`filter` 使用服务端定义的成员过滤值。按 `groupID:userID` 去重;分页与事件并发时不要按数组位置更新。", + "body": "`getGroupMemberList()` 按过滤条件分页读取成员。本页归属三个成员事件。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群 ID。 |\n| `filter` | `number` | 是 | 服务端定义的成员过滤值;不要用 UI 下标替代。 |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次读取成员数量。 |\n\n```uts\nimport {\n getGroupMemberList,\n off,\n onGroupMemberAdded,\n onGroupMemberDeleted,\n onGroupMemberInfoChanged,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst addedSubscription = onGroupMemberAdded((member) => upsertMember(member))\nconst subscriptions : Array = [\n addedSubscription,\n onGroupMemberDeleted((member) => removeMember(member.groupID, member.userID)),\n onGroupMemberInfoChanged((member) => upsertMember(member)),\n]\n\nconst result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 })\nreplaceMembers(result?.members ?? [])\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\nPromise 成功直接返回 `OpenIMGroupMemberListResult | null`,从 `members` 读取当前页。\n\n### 群成员字段\n\n| 字段 | 说明 |\n| --- | --- |\n| `groupID`、`userID` | 成员稳定标识,组合为 `groupID:userID`。 |\n| `nickname`、`faceURL` | 群内成员展示资料。 |\n| `roleLevel` | 群主、管理员或普通成员角色值。 |\n| `joinTime`、`joinSource`、`inviterUserID` | 入群时间、来源和邀请人。 |\n| `muteEndTime` | 禁言结束时间;结合当前时间判断是否仍在禁言。 |\n| `operatorUserID` | 最近相关操作人。 |\n| `ex`、`attachedInfo` | 扩展信息,只按业务约定解析。 |\n\n群内昵称与用户账号昵称可以不同。成员列表使用成员对象展示,不要用 `getUsersInfo()` 返回的账号资料覆盖 `nickname`。角色和禁言状态也只属于该群,不能跨群复用。\n\n分页时继续增加 offset,直到返回数量少于 count。成员加入、退出、被移除或角色变化会改变分页边界;事件到达时按主键合并,并在需要完整顺序时从 offset 0 重新查询。\n\n## 监听成员变化\n\n本页是 `onGroupMemberAdded`、`onGroupMemberDeleted` 和 `onGroupMemberInfoChanged` 的完整监听归属页。按 `groupID:userID` 新增、删除或替换;分页与事件并发时不要按数组位置更新。\n\n成员变化可能影响权限、成员数和当前聊天页。删除事件若指向当前用户,应停止发送并刷新群列表;角色或禁言变化应重新计算可用操作。退出登录、切换账号或销毁成员 store 时逐个释放订阅句柄。\n\n查询 Promise 成功只建立当前页快照,不触发成员事件。邀请、移除和资料修改操作则分别等待 Promise、成员事件或重新查询,不能把本地对象修改当作服务端确认。", "description": "分页查询群成员,并处理成员新增、删除和资料变化事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 3, + "title": "群成员字段", + "url": "#群成员字段" + }, + { + "depth": 2, + "title": "监听成员变化", + "url": "#监听成员变化" + } + ], "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", "title": "查询群成员列表" }, "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info": { - "body": "`getSpecifiedGroupMembersInfo()` 批量查询群内用户。\n\n```uts\nimport { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupMembersInfo({\n groupID,\n userIDList: ['user_a', 'user_b'],\n})\n```\n\n结果可能少于输入,按 `userID` 建立映射。未返回用户可能不在群内或不可访问;不要使用普通用户资料替代群昵称、角色和禁言状态。", + "body": "`getSpecifiedGroupMembersInfo()` 批量查询指定用户在目标群组中的成员资料。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userIDList` | `string[]` | 是 | 要查询的成员用户 ID。 |\n\n```uts\nimport { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getSpecifiedGroupMembersInfo({\n groupID,\n userIDList,\n})\nconst members = result?.members ?? []\n```\n\nPromise 成功后,`result?.members` 是匹配的 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。返回数组不保证与输入 ID 按位置一一对应;结果也可能少于输入,未返回用户可能不在群内或不可访问。\n\n同一用户在不同群中的昵称、角色和禁言状态可能不同,应按 `groupID:userID` 缓存,不要使用普通用户资料替代群成员资料。查询不会触发成员事件;后续增量见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "按用户 ID 列表批量读取指定群成员。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", "title": "查询指定群成员资料" }, @@ -1629,65 +2001,95 @@ "title": "筛选群内用户" }, "/sdk/uniapp/group/retrieving-group-members/search-group-members": { - "body": "`searchGroupMembers()` 在指定群内搜索。\n\n```uts\nimport { searchGroupMembers } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroupMembers({\n groupID,\n keywordList: ['Alice'],\n isSearchUserID: true,\n isSearchMemberNickname: true,\n})\n```\n\n空关键词由 UI 拦截。结果按 `groupID:userID` 去重;它不是全局用户搜索。", + "body": "`searchGroupMembers()` 适合在指定群组中搜索成员或获取 @ 候选人。当前接口只使用 `keywordList` 的第一个关键词。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `keywordList` | `string[]` | 是 | 搜索关键词数组。 |\n| `isSearchUserID` | `boolean` | 是 | 是否匹配用户 ID。 |\n| `isSearchMemberNickname` | `boolean` | 是 | 是否匹配群内昵称。 |\n\n```uts\nimport { searchGroupMembers } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchGroupMembers({\n groupID,\n keywordList: [keyword.trim()],\n isSearchUserID: true,\n isSearchMemberNickname: true,\n})\nconst members = result?.members ?? []\n```\n\nuni-app / uni-app x 接口没有 Wasm 版的 `offset` 和 `count` 参数,返回当前匹配结果。空关键词应由 UI 拦截,关键词变化时替换搜索快照。\n\nPromise 成功后,`result?.members` 是匹配的 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。结果按 `groupID:userID` 去重,只用于当前关键词下的成员快照,不应替换完整成员列表;它也不是全局用户搜索。", "description": "按用户 ID 或群昵称搜索群成员。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/retrieving-group-members/search-group-members", "title": "搜索群成员" }, "/sdk/uniapp/group/managing-group-members/invite-user-to-group": { - "body": "`inviteUserToGroup()` 提交用户列表和邀请原因。\n\n```uts\nimport { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait inviteUserToGroup({\n groupID,\n reason: '加入项目讨论',\n userIDList: ['user_b', 'user_c'],\n})\n```\n\n用户列表先去重。Promise 成功后以成员新增事件或重新查询确认;邀请原因可能对目标用户可见,不含敏感信息。", + "body": "群主和管理员可以在 OpenIMServer 授予的权限范围内管理群成员。客户端可以根据成员资料中的 `roleLevel` 控制操作入口,但服务端仍负责最终权限校验。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `reason` | `string` | 是 | 邀请说明;没有说明时传空字符串。 |\n| `userIDList` | `string[]` | 是 | 要邀请的用户 ID。 |\n\n```uts\nimport { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait inviteUserToGroup({\n groupID,\n reason: '邀请加入项目讨论组',\n userIDList: ['user-002', 'user-003'],\n})\n```\n\n提交前应先对 `userIDList` 去重。邀请原因可能对目标用户可见,不要写入 Token 等敏感信息。\n\nPromise 成功表示服务端接受了邀请请求,不代表所有用户已经出现在成员列表。需要审核时可能先产生申请事件;成员真正加入后再按 `onGroupMemberAdded` 合并。成员事件的完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "邀请一个或多个用户加入指定群。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", "title": "邀请用户入群" }, "/sdk/uniapp/group/managing-group-members/kick-group-member": { - "body": "`kickGroupMember()` 使用 `OpenIMGroupInviteParams` 相同结构定位成员和填写原因。\n\n```uts\nimport { kickGroupMember } from '@/uni_modules/unix-openim-sdk'\n\nawait kickGroupMember({ groupID, reason: '成员调整', userIDList: ['user_b'] })\n```\n\n这是管理操作,调用前确认权限和目标。不能移除群主;管理员规则由服务端执行。成功后以成员删除事件刷新列表。", + "body": "有权限的群主或管理员可以调用 `kickGroupMember()`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要移除成员的群组 ID。 |\n| `reason` | `string` | 是 | 移除原因;没有补充说明时传空字符串。 |\n| `userIDList` | `string[]` | 是 | 要移除的成员用户 ID 列表。 |\n\n```uts\nimport { kickGroupMember } from '@/uni_modules/unix-openim-sdk'\n\nawait kickGroupMember({\n groupID,\n reason: '已离开项目',\n userIDList: [targetUserID],\n})\n```\n\n不能用该方法移除群主;应先转让群主身份。服务端会校验管理员能否操作目标成员。\n\nPromise 成功表示移除请求已经完成。`onGroupMemberDeleted` 随后可能到达,应按 `groupID:userID` 移除成员;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "把一个或多个成员移出指定群。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/managing-group-members/kick-group-member", "title": "移除群成员" }, "/sdk/uniapp/group/managing-group-members/set-group-member-nickname": { - "body": "`setGroupMemberInfo()` 是成员资料统一更新入口。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', nickname: '项目负责人' })\n```\n\n群昵称不同于用户全局昵称。只传本次字段,最终资料以 `onGroupMemberInfoChanged` 为准。", + "body": "群内昵称只影响指定群组中的成员资料,不会修改用户的账号昵称。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({\n groupID,\n userID: targetUserID,\n nickname: '项目负责人',\n})\n```\n\n`groupID` 和 `userID` 共同定位目标成员。当前用户是否可以修改本人或其他成员的群内昵称,由 OpenIMServer 根据群角色和策略校验。\n\nPromise 成功表示服务端完成请求;随后可能收到 `onGroupMemberInfoChanged`,应按 `groupID:userID` 合并。完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "更新成员在指定群内的昵称。", "headings": [], "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", "title": "设置群成员昵称" }, "/sdk/uniapp/group/managing-group-members/set-group-member-role-level": { - "body": "通过 `roleLevel` 更新群主、管理员或普通成员角色。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 })\n```\n\n使用 `OpenIMGroupMemberRoleLevel` 合法常量(20、60、100 对应具体角色以合同定义为准)。高风险角色变更需二次确认;服务端校验操作者权限。", + "body": "通过 `roleLevel` 将普通群成员设置为管理员,或取消其管理员身份。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({\n groupID,\n userID: targetUserID,\n roleLevel: 60,\n})\n```\n\n| `roleLevel` | 含义 |\n| --- | --- |\n| `20` | 普通群成员。 |\n| `60` | 群管理员。 |\n| `100` | 群主,只用于识别当前角色。 |\n\n传入 `60` 可设置管理员,传入 `20` 可取消管理员身份。`OpenIMGroupMemberRoleLevel` 的类型范围是 `20 | 60 | 100`,但不能通过写入 `100` 完成群主变更;请使用[转让群主](/zh/sdk/uniapp/group/managing-group-members/transfer-group-owner)。高风险角色变更应在 UI 中二次确认,最终权限由服务端校验。\n\nPromise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并,完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "通过 setGroupMemberInfo 更新成员角色等级。", "headings": [], "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", "title": "设置群成员角色" }, "/sdk/uniapp/group/managing-group-members/set-group-member-avatar": { - "body": "通过 `faceURL` 更新群成员资料中的头像。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL })\n```\n\n先把本地图片上传到业务可访问的 HTTPS 地址。不要传 `unifile://` 或本地沙盒路径作为远端头像 URL。", + "body": "`faceURL` 是群成员资料中的头像地址,只作用于指定群组。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({\n groupID,\n userID: targetUserID,\n faceURL: avatarURL,\n})\n```\n\n群内头像与用户账号头像是不同数据。需要修改当前用户的账号头像时,使用[更新当前用户资料](/zh/sdk/uniapp/user/profile/set-self-info)。先把本地图片上传到业务可访问的 HTTPS 地址,不要把 `unifile://` 或沙盒路径写入远端资料。\n\nPromise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "通过 setGroupMemberInfo 更新成员在群内的头像。", "headings": [], "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", "title": "设置群成员头像" }, "/sdk/uniapp/group/managing-group-members/set-group-member-extension": { - "body": "成员 `ex` 是整段业务扩展字符串。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) })\n```\n\n修改前合并已有值,不覆盖其他模块字段。扩展对有权查看成员资料的用户可见,不存秘密。", + "body": "`ex` 是完整字符串,SDK 不会自动合并 JSON。写入前应保留其他业务模块的命名空间。\n\n```uts\nimport { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk'\n\nconst previous = JSON.parse(member.ex || '{}')\n\nawait setGroupMemberInfo({\n groupID,\n userID: targetUserID,\n ex: JSON.stringify({\n ...previous,\n title: 'maintainer',\n }),\n})\n```\n\n扩展字段对有权查看成员资料的用户可见,不要存放 Token 等秘密。\n\nPromise 成功后,通过 `onGroupMemberInfoChanged` 按 `groupID:userID` 合并;完整监听见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "通过 setGroupMemberInfo 更新成员 ex。", "headings": [], "sourcePath": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", "title": "设置群成员扩展字段" }, "/sdk/uniapp/group/managing-group-members/transfer-group-owner": { - "body": "`transferGroupOwner()` 是不可轻易撤销的高风险操作。\n\n```uts\nimport { transferGroupOwner } from '@/uni_modules/unix-openim-sdk'\n\nawait transferGroupOwner({ groupID, newOwnerUserID: 'user_b' })\n```\n\n目标必须是有效群成员。UI 二次确认并说明当前群主角色会变化;成功后重新查询群资料和双方成员角色。", + "body": "只有当前群主可以调用 `transferGroupOwner()`。`groupID` 是目标群组 ID,`newOwnerUserID` 是新群主的用户 ID;目标用户必须是该群组中的有效成员。\n\n```uts\nimport { transferGroupOwner } from '@/uni_modules/unix-openim-sdk'\n\nawait transferGroupOwner({\n groupID,\n newOwnerUserID: targetUserID,\n})\n```\n\n## 调用后的状态变化\n\nPromise 成功表示 OpenIMServer 已完成群主转让:原群主变为普通成员,新群主获得群主角色。成员角色变化通过 `onGroupMemberInfoChanged` 增量同步,事件参数是单个 `OpenIMGroupMemberItem`;一次转让可能涉及原群主和新群主两条成员记录,均按 `groupID:userID` 合并。\n\n完整监听和清理代码见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。不要只依赖事件数量判断转让结果;需要确认当前角色时,应重新调用 `getSpecifiedGroupMembersInfo()` 获取相关成员快照。\n\n群主需要退出群组时,必须先完成转让,再调用 `quitGroup()`。如果群组不再需要,群主也可以选择 `dismissGroup()`,但解散会影响所有成员,不能替代普通转让。UI 应提供二次确认并说明角色变化。", "description": "把群主权限转让给指定成员。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "调用后的状态变化", + "url": "#调用后的状态变化" + } + ], "sourcePath": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", "title": "转让群主" }, "/sdk/uniapp/group/managing-group-members/change-group-member-mute": { - "body": "`changeGroupMemberMute()` 使用 `mutedSeconds` 设置禁言时长。\n\n```uts\nimport { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 3600 })\n```\n\n解除禁言使用服务端约定的 0 秒。权限、最大时长和特殊角色限制由服务端校验;最终成员状态以事件或重新查询为准。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `userID` | `string` | 是 | 目标成员用户 ID。 |\n| `mutedSeconds` | `number` | 是 | 禁言时长,单位为秒;传 `0` 解除禁言。 |\n\n```uts\nimport { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk'\n\nawait changeGroupMemberMute({\n groupID,\n userID: targetUserID,\n mutedSeconds: 3600,\n})\n```\n\n群主可以禁言管理员和普通成员;管理员只能禁言普通成员,最终权限由 OpenIMServer 校验。\n\nPromise 成功表示服务端完成设置。最终状态以成员资料中的 `muteEndTime` 为准,不要只按提交的秒数推算。`onGroupMemberInfoChanged` 的处理见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。", "description": "按秒设置指定群成员的禁言时长。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", "title": "设置成员禁言" }, @@ -1699,9 +2101,40 @@ "title": "检查群组 full-sync 状态" }, "/sdk/uniapp/message/overview-message": { - "body": "OpenIM 消息以 `clientMsgID` 作为客户端稳定标识,服务端消息还包含 `serverMsgID`、会话路由、发送者、时间、内容类型与具体 elem。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表。\n\n创建消息只生成 `OpenIMMessageItem`,不会发送;随后调用 `sendMessage()` 指定 `recvID` 或 `groupID`。接收方通过消息事件获得增量,首次进入和翻页通过历史 API建立快照。\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。", + "body": "uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。\n\n接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。\n\n## 消息处理流程\n\n| 阶段 | 主要操作 | 说明 |\n| --- | --- | --- |\n| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 |\n| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 |\n| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 |\n| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 |\n| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 |\n\n从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。\n\n## OpenIMMessageItem 返回结构\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | `string \\| null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 |\n| `serverMsgID` | `string \\| null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 |\n| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 |\n| `sendID`、`recvID`、`groupID` | `string \\| null` | 发送者及单聊/群聊路由字段。 |\n| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 |\n| `createTime`、`sendTime` | `number` | 创建和发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 |\n| `senderNickname`、`senderFaceUrl` | `string \\| null` | 发送者资料快照。 |\n| `status` | `OpenIMMessageStatus` | 当前发送状态。 |\n| `isRead` | `boolean` | 当前已读状态快照。 |\n| `offlinePush` | `OpenIMOfflinePush \\| null` | 发送时的离线推送配置。 |\n| `content`、`attachedInfo` | `string \\| null` | SDK 序列化内容和附加信息。 |\n| `ex` | `string \\| null` | 随消息同步的扩展字符串。 |\n| `localEx` | `string \\| null` | 只保存在当前设备的扩展字符串。 |\n\n消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。\n\n`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。\n\n## 创建不同内容的消息\n\n| 内容 | 页面 | 注意事项 |\n| --- | --- | --- |\n| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 |\n| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 |\n| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 |\n| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 |\n| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 |\n| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 |\n\n只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。\n\n## 进度事件\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nfunction removeProgressListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) |\n| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) |\n| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) |\n| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) |\n| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) |\n| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) |\n\n## 状态同步边界\n\n新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。\n\n会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。", "description": "理解消息创建、发送、接收、历史、状态和进度事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "消息处理流程", + "url": "#消息处理流程" + }, + { + "depth": 2, + "title": "OpenIMMessageItem 返回结构", + "url": "#openimmessageitem-返回结构" + }, + { + "depth": 2, + "title": "创建不同内容的消息", + "url": "#创建不同内容的消息" + }, + { + "depth": 2, + "title": "进度事件", + "url": "#进度事件" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + }, + { + "depth": 2, + "title": "状态同步边界", + "url": "#状态同步边界" + } + ], "sourcePath": "/sdk/uniapp/message/overview-message", "title": "消息概览" }, @@ -1713,16 +2146,38 @@ "title": "创建文本消息" }, "/sdk/uniapp/message/creating-messages/create-text-at-message": { - "body": "`createTextAtMessage()` 创建群聊 @ 消息,参数包含正文、被 @ 用户和可选引用信息。\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@Alice 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }],\n quoteMessage: null,\n})\n```\n\n字段以 `OpenIMCreateTextAtMessageParams` 为准,用户列表和显示信息保持一致。商业版 `getAtAllTag()` 商业版 可查询当前服务端使用的“@所有人”标签;HarmonyOS 支持该本地/企业入口。\n\n创建后仍需调用发送 API并填写目标群 ID。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 |\n| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 |\n| `atUsersInfo` | `OpenIMAtUsersInfoItem[] \\| null` | 否 | 用户 ID 与群内展示名信息。 |\n| `quoteMessage` | `OpenIMMessageItem \\| null` | 否 | 被引用的原消息。 |\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@user_a 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }],\n})\n```\n\nPromise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。\n\n## 提及全体成员\n\n不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`:\n\n```uts\nimport { getAtAllTag } from '@/uni_modules/unix-openim-sdk'\n\nconst atAllResult = await getAtAllTag()\nconst atAllTag = atAllResult?.tag\nif (atAllTag != null) {\n const message = await createTextAtMessage({\n text: `${atAllTag} 请查看群公告`,\n atUserIDList: [atAllTag],\n })\n}\n```\n\n`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。", "description": "在群聊中创建带 @ 用户信息的文本消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "提及全体成员", + "url": "#提及全体成员" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-text-at-message", "title": "创建 @ 文本消息" }, "/sdk/uniapp/message/creating-messages/create-custom-message": { - "body": "`createCustomMessage()` 用于双方已约定 schema 的业务载荷:\n\n```uts\nimport { createCustomMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCustomMessage({\n data: JSON.stringify({ orderID: 'order_123' }),\n extension: '',\n descriptionText: '订单卡片',\n})\n```\n\n`data`、`extension`、`descriptionText` 都会发给接收方,不能包含秘密。接收端先验证内容类型和 JSON 字段,再映射业务模型。\n\n`createAdvancedTextMessage()` 使用 `OpenIMCreateAdvancedTextMessageParams` 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。", + "body": "`createCustomMessage()` 适合订单、任务、邀请或投票等双方已约定 schema 的业务消息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `data` | `string` | 是 | 业务载荷的完整字符串,通常保存序列化后的 JSON。 |\n| `extension` | `string` | 是 | 业务扩展信息的完整字符串。 |\n| `descriptionText` | `string` | 是 | 消息类型说明或不支持该类型时的降级展示文本。 |\n\n```uts\nimport { createCustomMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCustomMessage({\n data: JSON.stringify({ type: 'task', taskID: 'task_42' }),\n extension: JSON.stringify({ schemaVersion: 1 }),\n descriptionText: '任务卡片',\n})\n```\n\n`data` 是业务载荷,`extension` 是扩展信息,`descriptionText` 用于类型说明或降级展示。三者都会发给接收方,不能包含秘密;接收端应校验协议版本、大小和字段,再映射业务模型,不要执行不可信内容。\n\n当前 uni-app / uni-app x 合同没有 Wasm 商业扩展中的 `searchText` 参数,不要传入该字段。Promise 成功只返回待发送的 `OpenIMMessageItem | null`;发送与自定义业务事件是不同链路。\n\n## 高级文本消息\n\n`createAdvancedTextMessage()` 使用 `OpenIMCreateAdvancedTextMessageParams` 创建带文本实体/样式范围的消息。范围必须对应原始文本索引,越界数据应在调用前拒绝。两种入口都只创建消息,不发送。", "description": "创建业务自定义消息或带实体范围的高级文本。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "高级文本消息", + "url": "#高级文本消息" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-custom-message", "title": "创建自定义或高级文本消息" }, @@ -1734,9 +2189,15 @@ "title": "从完整路径创建图片消息" }, "/sdk/uniapp/message/creating-messages/create-image-message-by-url": { - "body": "`createImageMessageByURL()` 适合图片已由业务上传并取得可访问 URL 的场景。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createImageMessageByURL(pictureElem)\n```\n\n`OpenIMPictureElem` 应包含源图及缩略图等合同字段。URL 必须能被消息参与者访问,尺寸、大小和类型与真实资源一致。不要把本地路径填入 URL 字段。", + "body": "`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `sourcePicture` | `OpenIMPicture \\| null` | 原图信息。 |\n| `bigPicture` | `OpenIMPicture \\| null` | 大图信息。 |\n| `snapshotPicture` | `OpenIMPicture \\| null` | 缩略图信息。 |\n| `sourcePath` | `string \\| null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n\n三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst picture = {\n uuid: createBusinessUUID(),\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: uploaded.url,\n}\n\nconst message = await createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n})\n```\n\nURL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。", "description": "使用已上传图片的 elem 信息创建消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-image-message-by-url", "title": "从 URL 创建图片消息" }, @@ -1748,9 +2209,15 @@ "title": "从完整路径创建语音消息" }, "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": { - "body": "`createSoundMessageByURL()` 接收完整 `OpenIMSoundElem`。\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL(soundElem)\n```\n\nURL、UUID、大小、时长和类型应与上传结果一致。资源需对接收方可访问;不要把本地沙盒路径当成远端 URL。", + "body": "`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `uuid` | `string \\| null` | 音频资源的唯一标识。 |\n| `soundPath` | `string \\| null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | `string \\| null` | 已上传音频的可访问地址。 |\n| `dataSize` | `number \\| null` | 音频大小,单位为字节。 |\n| `duration` | `number \\| null` | 音频时长,单位按服务端协议约定。 |\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL({\n uuid: createBusinessUUID(),\n soundPath: '',\n sourceUrl: uploaded.url,\n dataSize: uploaded.size,\n duration,\n})\n```\n\nURL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-sound-message-by-url", "title": "从 URL 创建语音消息" }, @@ -1762,9 +2229,15 @@ "title": "从完整路径创建视频消息" }, "/sdk/uniapp/message/creating-messages/create-video-message-by-url": { - "body": "`createVideoMessageByURL()` 接收 `OpenIMVideoElem`。\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL(videoElem)\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型使用上传后的真实值。接收方必须能访问两个资源。", + "body": "`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `videoPath` | `string \\| null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `duration` | `number \\| null` | 视频时长。 |\n| `videoType` | `string \\| null` | 视频 MIME 类型。 |\n| `videoUUID` | `string \\| null` | 视频资源的唯一标识。 |\n| `videoUrl` | `string \\| null` | 已上传视频的可访问地址。 |\n| `videoSize` | `number \\| null` | 视频大小,单位为字节。 |\n| `snapshotPath` | `string \\| null` | 快照文件的本地名称或业务路径。 |\n| `snapshotUUID` | `string \\| null` | 快照资源的唯一标识。 |\n| `snapshotSize` | `number \\| null` | 快照大小,单位为字节。 |\n| `snapshotUrl` | `string \\| null` | 已上传快照的可访问地址。 |\n| `snapshotWidth` | `number \\| null` | 快照宽度,单位为像素。 |\n| `snapshotHeight` | `number \\| null` | 快照高度,单位为像素。 |\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL({\n videoPath: '',\n duration,\n videoType: uploadedVideo.contentType,\n videoUUID: createBusinessUUID(),\n videoUrl: uploadedVideo.url,\n videoSize: uploadedVideo.size,\n snapshotPath: '',\n snapshotUUID: createBusinessUUID(),\n snapshotSize: uploadedSnapshot.size,\n snapshotUrl: uploadedSnapshot.url,\n snapshotWidth,\n snapshotHeight,\n})\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-video-message-by-url", "title": "从 URL 创建视频消息" }, @@ -1776,23 +2249,41 @@ "title": "从完整路径创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-file-message-by-url": { - "body": "`createFileMessageByURL()` 接收 `OpenIMFileElem`。\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL(fileElem)\n```\n\n文件 URL、名称、UUID、大小和类型应来自可信上传结果。URL 需要接收方可访问,不直接暴露私有存储凭据。", + "body": "`createFileMessageByURL()` 使用已经上传的文件信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `filePath` | `string \\| null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `fileName` | `string \\| null` | 对外展示的文件名。 |\n| `uuid` | `string \\| null` | 文件资源的唯一标识。 |\n| `sourceUrl` | `string \\| null` | 已上传文件的可访问地址。 |\n| `fileSize` | `number \\| null` | 文件大小,单位为字节。 |\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL({\n filePath: '',\n fileName: 'report.pdf',\n uuid: createBusinessUUID(),\n sourceUrl: uploaded.url,\n fileSize: uploaded.size,\n})\n```\n\n文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。", "description": "使用已上传文件的 OpenIMFileElem 创建消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-file-message-by-url", "title": "从 URL 创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-card-message": { - "body": "`createCardMessage()` 接收 `OpenIMCardElem`。\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alice',\n faceURL: 'https://cdn.example.com/alice.png',\n ex: '',\n})\n```\n\n名片是发送时快照,接收方点击后应按 `userID` 查询最新资料。不要把名片字段当作可信身份认证。", + "body": "## 参数说明\n\n`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照:\n\n| 参数 | 类型 | 建议 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | `string \\| null` | 必填 | 名片对应的用户 ID。 |\n| `nickname` | `string \\| null` | 必填 | 名片中保存的展示名称。 |\n| `faceURL` | `string \\| null` | 必填 | 名片中保存的头像地址。 |\n| `ex` | `string \\| null` | 必填 | 名片扩展信息;没有内容时传空字符串。 |\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alex',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n})\n```\n\nPromise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。", "description": "使用 OpenIMCardElem 创建用户名片消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-card-message", "title": "创建名片消息" }, "/sdk/uniapp/message/creating-messages/create-location-message": { - "body": "`createLocationMessage()` 使用描述、经度和纬度。\n\n```uts\nimport { createLocationMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createLocationMessage({\n descriptionText: '会议室 A',\n longitude: 121.47,\n latitude: 31.23,\n})\n```\n\n调用前取得用户授权并校验范围。位置属于敏感数据,发送前明确提示接收范围;不要在日志中记录精确坐标。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `descriptionText` | `string` | 是 | 位置名称或地址描述。 |\n| `longitude` | `number` | 是 | 经度。 |\n| `latitude` | `number` | 是 | 纬度。 |\n\n```uts\nimport { createLocationMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createLocationMessage({\n descriptionText: '上海市浦东新区',\n longitude: 121.4737,\n latitude: 31.2304,\n})\n```\n\n业务层应在获得用户授权后获取定位,并根据产品隐私规则控制精度。位置属于敏感数据,发送前明确提示接收范围,不要在日志中记录精确坐标。Promise 成功只返回待发送的 `OpenIMMessageItem | null`。", "description": "使用经纬度和描述创建位置消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/creating-messages/create-location-message", "title": "创建位置消息" }, @@ -1825,15 +2316,21 @@ "title": "创建逐条转发消息" }, "/sdk/uniapp/message/creating-messages/create-merger-message": { - "body": "`createMergerMessage()` 使用标题、摘要和原消息列表创建合并转发。\n\n```uts\nimport { createMergerMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst merger = await createMergerMessage({\n messageList: selectedMessages,\n title: '聊天记录',\n abstractList: ['Alice: 方案已确认'],\n})\n```\n\n摘要由业务生成但不可与实际消息矛盾。转发前检查每条消息的可分享权限和敏感信息;大型列表限制条数与总大小。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 是 | 要合并的已发送消息列表。 |\n| `title` | `string` | 是 | 合并消息卡片标题。 |\n| `abstractList` | `string[]` | 是 | 卡片摘要列表。 |\n\n```uts\nimport { createMergerMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst merger = await createMergerMessage({\n messageList: selectedMessages,\n title: '项目讨论记录',\n abstractList: selectedMessages.slice(0, 4).map(buildSummary),\n})\n```\n\nPromise 成功只返回新的待发送对象,不修改原消息。摘要由业务生成但不可与实际消息矛盾,应为无法解析的消息类型提供降级文本。转发前检查每条消息的可分享权限和敏感信息;大型列表还应限制条数与总大小。", "description": "把多条消息合并为摘要与消息列表。", - "headings": [], - "sourcePath": "/sdk/uniapp/message/creating-messages/create-merger-message", - "title": "创建合并转发消息" - }, - "/sdk/uniapp/message/sending-messages/send-message": { - "body": "`sendMessage()` 发送由消息创建 API 返回的 `OpenIMMessageItem`。单聊只填写 `recvID`,群聊只填写 `groupID`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写目标群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 待发送的消息对象。 |\n| `offlinePushInfo` | `OpenIMOfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessage({\n recvID: receiverUserID,\n groupID: '',\n message,\n isOnlineOnly: false,\n})\n```\n\nPromise 成功后,直接返回服务端确认的 `OpenIMMessageItem`,原生 UTS API 不使用 `{ data }` 包装。发送端应使用返回对象按 `clientMsgID` 替换本地待发送项;常用字段和内容字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n其他客户端通过新消息事件接收。Promise 成功、接收事件到达和历史查询校准是不同阶段。提供失败重试时,应继续保留同一个 `clientMsgID` 下的待发送消息,除非产品明确创建一次新的发送。\n\n资源已由业务上传并写入 URL 型消息时,使用 [`sendMessageNotOss()`](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss)。", - "description": "使用 uni-app / uni-app x SDK 发送待发送消息对象。", + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], + "sourcePath": "/sdk/uniapp/message/creating-messages/create-merger-message", + "title": "创建合并转发消息" + }, + "/sdk/uniapp/message/sending-messages/send-message": { + "body": "`sendMessage()` 发送由消息创建 API 返回的 `OpenIMMessageItem`。单聊只填写 `recvID`,群聊只填写 `groupID`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写目标群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 待发送的消息对象。 |\n| `offlinePushInfo` | `OpenIMOfflinePush` | 否 | 离线推送配置。 |\n| `isOnlineOnly` | `boolean` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessage({\n recvID: receiverUserID,\n groupID: '',\n message,\n isOnlineOnly: false,\n})\n```\n\nPromise 成功后,直接返回服务端确认的 `OpenIMMessageItem`,原生 UTS API 不使用 `{ data }` 包装。发送端应使用返回对象按 `clientMsgID` 替换本地待发送项;常用字段和内容字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n其他客户端通过新消息事件接收。Promise 成功、接收事件到达和历史查询校准是不同阶段。提供失败重试时,应继续保留同一个 `clientMsgID` 下的待发送消息,除非产品明确创建一次新的发送。\n\n资源已由业务上传并写入 URL 型消息时,使用 [`sendMessageNotOss()`](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss)。", + "description": "使用 uni-app / uni-app x SDK 发送待发送消息对象。", "headings": [ { "depth": 2, @@ -1845,16 +2342,58 @@ "title": "发送消息" }, "/sdk/uniapp/message/sending-messages/send-message-not-oss": { - "body": "`sendMessageNotOss()` 与 `sendMessage()` 使用同一 options,但跳过普通 OSS 上传流程,适合消息 elem 已包含可访问远端资源的场景。\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sent = await sendMessageNotOss({ message, recvID, groupID })\n```\n\n只有确认资源 URL、大小、类型和权限均完整时使用。把本地路径消息误交给本入口会导致接收方无法访问媒体。普通本地文件优先使用 `sendMessage()`。", + "body": "`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 |\n| `offlinePushInfo` | `OpenIMOfflinePush \\| null` | 否 | 离线推送标题、描述和平台配置。 |\n| `isOnlineOnly` | `boolean \\| null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: urlMessage,\n})\n```\n\n资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。", "description": "发送已经准备好远端资源信息的消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/sending-messages/send-message-not-oss", "title": "发送非 OSS 消息" }, "/sdk/uniapp/message/receiving-messages/receive-messages": { - "body": "不同平台或恢复路径可能使用单条或批量事件。为保证完整性,同时订阅五个入口,并按 `conversationID:clientMsgID` 去重。\n\n```uts\nimport {\n off,\n onRecvNewMessage,\n onRecvNewMessages,\n onRecvOfflineNewMessage,\n onRecvOfflineNewMessages,\n onRecvOnlineOnlyMessage,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newMessageSubscription = onRecvNewMessage((message) => mergeMessage(message))\nconst subscriptions : Array = [\n newMessageSubscription,\n onRecvOfflineNewMessage((message) => mergeMessage(message)),\n onRecvOnlineOnlyMessage((message) => mergeOnlineOnlyMessage(message)),\n onRecvNewMessages((result) => result.messages.forEach(mergeMessage)),\n onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n只在线消息按产品语义展示,不假定可从历史恢复。事件只提供增量;首次进入、断线恢复和向上翻页仍查询历史。不要在多个页面重复注册同一组全局消息事件,推荐由消息 store 统一持有。", + "body": "消息页通常同时处理实时新消息、应用进入后台后到达的离线消息、只在线投递的消息,以及首次进入会话时主动读取的历史消息。事件提供增量,历史 API 按 `conversationID` 建立快照。\n\n不同 Core 版本或恢复路径可能使用单条或批量事件。为保证完整性,可以同时订阅五个入口,但必须按 `conversationID:clientMsgID` 去重。在组件卸载、退出登录或切换账号前使用订阅句柄调用 `off()`,避免同一批消息被重复合并。\n\n## 消息类型\n\n每条 `OpenIMMessageItem` 根据 `contentType` 和对应 elem 选择渲染方式:文本读取 `textElem`,@ 文本读取 `atTextElem`,自定义消息读取 `customElem`,图片、音频、视频和文件分别读取对应媒体 elem。未知类型应显示降级内容,而不是执行未校验的 `content`。\n\n```uts\nfunction renderMessage(message : OpenIMMessageItem) {\n if (message.textElem != null) return renderTextMessage(message)\n if (message.atTextElem != null) return renderMentionMessage(message)\n if (message.customElem != null) return renderCustomMessage(message)\n if (\n message.pictureElem != null ||\n message.soundElem != null ||\n message.videoElem != null ||\n message.fileElem != null\n ) {\n return renderFileLikeMessage(message)\n }\n return renderUnsupportedMessage(message)\n}\n```\n\n消息事件可能包含当前用户没有打开的会话。`OpenIMMessageItem` 不直接提供 `conversationID`;应根据 `sessionType`、`sendID`、`recvID` 和 `groupID` 计算或查询目标会话,再按 `clientMsgID` 去重。\n\n```uts\nfunction mergeMessage(message : OpenIMMessageItem) {\n const targetConversationID = getConversationIDForMessage(message)\n if (targetConversationID.length == 0) return\n mergeMessageByClientMsgID(targetConversationID, message)\n}\n```\n\n### 图片、音频、视频和文件消息\n\n接收端无需重新上传文件,只需读取消息中已有的资源地址、大小、名称、时长或快照图并展示。如果产品一次发送多个文件,通常连续发送多条文件消息,或用一条经过版本校验的自定义消息承载文件组;每条消息仍以 `clientMsgID` 作为稳定标识。\n\n## 事件处理器\n\n```uts\nimport {\n off,\n onRecvNewMessage,\n onRecvNewMessages,\n onRecvOfflineNewMessage,\n onRecvOfflineNewMessages,\n onRecvOnlineOnlyMessage,\n type OpenIMMessageItem,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst newMessageSubscription = onRecvNewMessage((message) => {\n if (message != null) mergeMessage(message)\n})\nconst subscriptions : Array = [\n newMessageSubscription,\n onRecvOfflineNewMessage((message) => {\n if (message != null) mergeMessage(message)\n }),\n onRecvOnlineOnlyMessage((message) => {\n if (message != null) mergeOnlineOnlyMessage(message)\n }),\n onRecvNewMessages((result) => {\n if (result != null) result.messages.forEach(mergeMessage)\n }),\n onRecvOfflineNewMessages((result) => {\n if (result != null) result.messages.forEach(mergeMessage)\n }),\n]\n\nfunction removeMessageListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n`onRecvNewMessages` 和 `onRecvOfflineNewMessages` 返回 `OpenIMMessageListResult | null`,其中 `messages` 是数组;三个单条事件返回 `OpenIMMessageItem | null`。单数和复数入口可能描述同一消息,所以不能按事件次数插入。\n\n调用 `setAppBackgroundStatus(true)` 后到达的消息通常走离线入口;回到前台时再设置为 `false`。离线消息与实时消息复用同一个合并函数,筛选当前会话、按 `clientMsgID` 去重并保持时间顺序。\n\n只在线消息由发送方设置 `isOnlineOnly: true`。它不会进入 SDK 本地消息存储,也不能通过历史接口回放,通常只适合临时提示或业务通知;是否加入当前界面由产品规则决定,不应把它当作可靠聊天记录。\n\n本页是五个接收事件的完整归属页。先根据消息路由字段确定会话,再用“目标会话 + `clientMsgID`”幂等合并。不要在多个页面重复注册同一组全局事件,推荐由消息 store 统一持有;状态层销毁时调用 `removeMessageListeners()`。\n\n撤回消息通过 `onNewRecvMessageRevoked` 更新为撤回态,处理见[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)。\n\n## 首次进入会话时读取历史\n\n事件只负责新到达的消息。首次进入会话、向上翻页或需要补齐断线期间的列表时,应另外读取历史快照,参数和返回结构见[加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)。历史结果和事件可能包含同一条消息,两条路径必须使用相同的去重规则。\n\n如果事件注册在全局消息状态层,不要在每次进入同一个聊天页面时重复注册。需要显示当前会话历史时,只读取该会话的边界快照;重新登录后的消息变化由新的登录作用域事件同步,不要把事件到达视为某次历史查询的完成回调。\n\n## 将群聊会话标记为已读\n\n用户进入群聊并看到最新消息后,可以清理会话未读数。这个操作不等同于群消息成员级已读回执,调用方式见[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)。会话列表和总未读角标分别由会话域事件最终同步。\n\n## 验证接收流程\n\n- 用另一个已登录账号向目标会话发送消息,确认前台入口收到且列表只渲染一次。\n- 设置后台状态后再次发送,确认离线入口合并;回到前台后恢复状态。\n- 发送只在线消息,确认它不会进入本地历史。\n- 撤回一条消息,确认对应 `clientMsgID` 更新为撤回态。\n- 标记会话已读,确认会话未读数和总角标随事件更新。\n\n测试单条和批量入口时,只断言每个 `clientMsgID` 最终出现一次,不应要求固定使用某一个入口。后台恢复测试还应确认前后台状态调用成对执行,退出账号后旧订阅不再改变新账号状态。\n\n## 相关页面\n\n- [消息概览](/zh/sdk/uniapp/message/overview-message)\n- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)", "description": "订阅单条、批量、离线和只在线消息事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "消息类型", + "url": "#消息类型" + }, + { + "depth": 3, + "title": "图片、音频、视频和文件消息", + "url": "#图片-音频-视频和文件消息" + }, + { + "depth": 2, + "title": "事件处理器", + "url": "#事件处理器" + }, + { + "depth": 2, + "title": "首次进入会话时读取历史", + "url": "#首次进入会话时读取历史" + }, + { + "depth": 2, + "title": "将群聊会话标记为已读", + "url": "#将群聊会话标记为已读" + }, + { + "depth": 2, + "title": "验证接收流程", + "url": "#验证接收流程" + }, + { + "depth": 2, + "title": "相关页面", + "url": "#相关页面" + } + ], "sourcePath": "/sdk/uniapp/message/receiving-messages/receive-messages", "title": "接收消息" }, @@ -1866,30 +2405,84 @@ "title": "接收自定义业务与消息扩展事件" }, "/sdk/uniapp/message/retrieving-messages/load-older-messages": { - "body": "公共入口 `getAdvancedHistoryMessageList()` 读取历史:\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: '',\n count: 50,\n})\n```\n\n第一页用空 `startClientMsgID`,后续使用当前最早边界消息的 ID。读取结果中的结束标记与消息列表,按 `clientMsgID` 去重。\n\n商业版 `getHistoryMessageList()` 商业版 额外支持 `isReverse`、`viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", + "body": "聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `lastMinSeq` | `number \\| null` | 否 | 上一页返回的最小序号,用于连续分页。 |\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n lastMinSeq,\n})\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 |\n| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 |\n| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 |\n| `errCode` | `number` | 历史读取结果状态码。 |\n| `errMsg` | `string` | 与状态码对应的说明。 |\n\n只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。\n\n商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", "description": "按会话和 clientMsgID 游标读取历史消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-older-messages", "title": "加载历史消息" }, "/sdk/uniapp/message/retrieving-messages/find-messages-by-id": { - "body": "`findMessageList()` 接收查询数组,每项包含会话 ID 与消息 ID 列表。\n\n```uts\nimport { findMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await findMessageList([\n { conversationID, clientMsgIDList: ['msg_a', 'msg_b'] },\n])\n```\n\n返回 `OpenIMFindMessageResult`,按原查询的会话与消息标识建立映射。未找到项不应导致整个结果失效。需要加载消息前后文时使用商业版上下文查询。", + "body": "搜索结果、引用消息或通知跳转应保存消息的 `conversationID` 和 `clientMsgID`,再用 `findMessageList()` 取回本地已经同步的消息。\n\n## 参数说明\n\n`findMessageList()` 接收查询条件数组,每一项结构如下:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `items[].conversationID` | `string` | 是 | 目标消息所属的会话 ID。 |\n| `items[].clientMsgIDList` | `string[]` | 是 | 要在该会话中查找的消息 ID。 |\n\n```uts\nimport { findMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await findMessageList([\n { conversationID, clientMsgIDList: [clientMsgID] },\n])\n\nconst targetMessage = result?.findResultItems[0]?.messageList[0]\n```\n\nPromise 成功后,结果是 `OpenIMFindMessageResult | null`,包含 `totalCount` 和 `findResultItems`。每个结果项提供 `conversationID`、`conversationType`、会话展示资料、`messageCount` 和 `messageList`。\n\n一次调用可以包含多个会话条件。不要假设响应项与输入数组位置一致,应按结果的 `conversationID` 和消息的 `clientMsgID` 对应。缓存未同步、消息已删除或 ID 不存在时可能没有结果;查询不会触发消息事件。需要加载消息前后文时使用[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context)。", "description": "在多个会话中按 clientMsgID 批量定位消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", "title": "按 ID 查找消息" }, "/sdk/uniapp/message/retrieving-messages/load-message-context": { - "body": "`fetchSurroundingMessages()` 商业版 围绕完整锚点消息读取前后文。\n\n```uts\nimport { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await fetchSurroundingMessages({\n startMessage: targetMessage,\n viewType: 0,\n before: 20,\n after: 20,\n})\n```\n\n`viewType` 使用产品/合同定义值。结果与实时事件可能重复,按 `clientMsgID` 去重并保持时间顺序。不要用只包含 ID 的伪消息作为锚点。", + "body": "从搜索结果或引用消息跳入聊天上下文时,把已经取得的完整 `OpenIMMessageItem` 作为锚点。`fetchSurroundingMessages()` 属于商业版。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `startMessage` | `OpenIMMessageItem` | 是 | 已经取得的锚点消息。 |\n| `viewType` | `number` | 是 | 上下文查看方向,使用服务端约定值。 |\n| `before` | `number` | 是 | 锚点之前最多读取的消息数量。 |\n| `after` | `number` | 是 | 锚点之后最多读取的消息数量。 |\n\n```uts\nimport { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await fetchSurroundingMessages({\n startMessage: targetMessage,\n viewType: 0,\n before: 20,\n after: 20,\n})\nconst surroundingMessages = result?.messages ?? []\n```\n\nPromise 成功后,`result?.messages` 是锚点前后取得的 `OpenIMMessageItem[]`,字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。当前 uni-app / uni-app x 返回字段名是 `messages`,不是 Wasm 的 `messageList`。\n\n`before` 和 `after` 分别限制锚点前后的数量。返回结果可能少于请求总数,例如锚点靠近边界或部分消息已删除。结果与实时事件可能重复,应按 `conversationID:clientMsgID` 去重并保持时间顺序。不要使用只包含 ID 的伪消息作为锚点;需要先定位时见[按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)。", "description": "商业版围绕一条锚点消息读取前后文。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/retrieving-messages/load-message-context", "title": "加载消息上下文" }, "/sdk/uniapp/message/searching-messages/search-messages": { - "body": "`searchLocalMessages()` 在 SDK 本地数据中搜索。\n\n```uts\nimport { searchLocalMessages } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['发布'],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 50,\n})\n```\n\n匹配类型、时间单位和页码使用合同/服务端约定。搜索只覆盖已同步到本地且可索引的内容;不要承诺服务器全量历史。结果按会话与消息 ID 去重。", + "body": "`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。\n\n搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。\n\n## 创建搜索查询\n\n`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。\n\n```uts\nimport {\n OpenIMMessageTypeAtText,\n OpenIMMessageTypeText,\n searchLocalMessages,\n type OpenIMMessageItem,\n type OpenIMSearchMessageResult,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: [keyword.trim()],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 20,\n})\n```\n\n## 高级搜索\n\n可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。\n\n```uts\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['release'],\n keywordListMatchType: 0,\n senderUserIDList: [senderUserID],\n messageTypeList: [OpenIMMessageTypeText],\n searchTimePosition,\n searchTimePeriod,\n pageIndex: 1,\n count: 20,\n})\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string \\| null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 |\n| `keywordList` | `string[]` | 是 | 关键词列表。 |\n| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 |\n| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 |\n| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 |\n| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 |\n| `count` | `number` | 是 | 每页返回数量。 |\n\n如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。\n\n## 处理分页结果\n\nPromise 成功后,结果是 `OpenIMSearchMessageResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下匹配的消息总数。 |\n| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 |\n\n每个结果项包含:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationID` | `string` | 结果所属会话 ID。 |\n| `conversationType` | `OpenIMSessionType` | 会话类型。 |\n| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 |\n| `latestMsgSendTime` | `number \\| null` | 当前结果会话的最新消息时间。 |\n| `messageCount` | `number` | 当前结果项的匹配消息数量。 |\n| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 |\n\n可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID:\n\n```uts\ntype SearchMessageRow = {\n conversationID : string\n clientMsgID : string\n message : OpenIMMessageItem\n}\n\nfunction toSearchRows(result : OpenIMSearchMessageResult) : Array {\n const rows : Array = []\n result.searchResultItems.forEach((item) => {\n item.messageList.forEach((message) => {\n const clientMsgID = message.clientMsgID\n if (clientMsgID != null) {\n rows.push({\n conversationID: item.conversationID,\n clientMsgID,\n message,\n })\n }\n })\n })\n return rows\n}\n```\n\n分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。\n\n## 处理搜索结果变化\n\n命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。\n\n跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。\n\n需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。\n\n## 相关页面\n\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", "description": "按关键词、发送者、类型和时间范围搜索消息。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "创建搜索查询", + "url": "#创建搜索查询" + }, + { + "depth": 2, + "title": "高级搜索", + "url": "#高级搜索" + }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "处理分页结果", + "url": "#处理分页结果" + }, + { + "depth": 2, + "title": "处理搜索结果变化", + "url": "#处理搜索结果变化" + }, + { + "depth": 2, + "title": "相关页面", + "url": "#相关页面" + } + ], "sourcePath": "/sdk/uniapp/message/searching-messages/search-messages", "title": "搜索本地消息" }, @@ -1908,14 +2501,14 @@ "title": "查询输入状态" }, "/sdk/uniapp/message/composing-messages/check-speech-to-text": { - "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\n在展示转写入口前查询并缓存当前 session 的结果。能力可能随服务端、语言或账号变化;重新登录后刷新。没有能力时隐藏入口,不发送必然失败的请求。", + "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\nPromise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | `string[] \\| null` | 支持的音频格式。 |\n| `sampleRateHz` | `number[] \\| null` | 支持的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | `number \\| null` | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | `number \\| null` | 最大文件大小,单位为字节。 |\n| `provider` | `string \\| null` | 当前语音识别服务提供方。 |\n| `requestType` | `string \\| null` | 服务端要求的请求类型。 |\n| `crossDomain` | `boolean \\| null` | 是否允许跨域处理。 |\n\n在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。", "description": "商业版查询当前语音转写能力。", "headings": [], "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", "title": "检查语音转文字能力" }, "/sdk/uniapp/message/composing-messages/transcribe-audio": { - "body": "`speechToText()` 商业版 使用文件名和音频数据。\n\n```uts\nimport { speechToText } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await speechToText({ filename: 'voice.m4a', data: audioBase64 })\n```\n\n先检查能力,限制音频大小和格式。`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写结果需要用户确认,不用于高风险自动决策。", + "body": "`speechToText()` 商业版 使用文件名和音频数据。原生文件不能直接作为 UTS 跨层参数,需按商业服务协议编码为字符串再提交。\n\n```uts\nimport { speechToText } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await speechToText({\n filename: 'voice.m4a',\n data: audioBase64,\n})\nif (result?.text != null) setTranscript(result.text)\n```\n\nPromise 成功返回 `OpenIMSpeechToTextResult | null`,其中 `text` 是可选的识别文本。调用前先[查询语音识别能力](/zh/sdk/uniapp/message/composing-messages/check-speech-to-text),限制音频大小、格式、采样率和时长。\n\n`data` 的编码以商业服务协议为准;不要记录完整音频或 Base64。转写不会自动修改原语音消息,也不触发消息事件。转写结果需要用户确认,不用于高风险自动决策;需要本地保存结果时见[保存语音转写结果](/zh/sdk/uniapp/message/composing-messages/save-local-transcript)。", "description": "商业版提交音频文件名和数据进行语音转写。", "headings": [], "sourcePath": "/sdk/uniapp/message/composing-messages/transcribe-audio", @@ -1943,9 +2536,15 @@ "title": "删除本地消息" }, "/sdk/uniapp/message/managing-messages/delete-saved-messages": { - "body": "`deleteMessages()` 商业版 批量删除明确指定的消息。本页归属公共 `onMsgDeleted` 事件。\n\n```uts\nimport {\n deleteMessages,\n off,\n onMsgDeleted,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst deletedSubscription = onMsgDeleted((message) => {\n removeMessageByID(message.clientMsgID)\n})\n\nawait deleteMessages(deleteParams)\noff(deletedSubscription)\n```\n\n`deleteParams` 使用锁定的 `OpenIMDeleteMessagesParams`,不要只传本地数组。事件和请求结果幂等合并;是否影响其他设备由商业服务语义决定。", + "body": "`deleteMessages()` 商业版 批量删除当前账号在同一会话中明确指定的消息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要删除消息所在的会话 ID。 |\n| `clientMsgIDs` | `string[]` | 是 | 要删除的消息 ID;同一批 ID 必须属于同一会话。 |\n| `IsSync` | `boolean` | 是 | 是否把删除动作同步到当前账号的其他客户端;字段名首字母为大写。 |\n\n```uts\nimport {\n deleteMessages,\n off,\n onMsgDeleted,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst deletedSubscription = onMsgDeleted((message) => {\n if (message == null) return\n removeMessage(resolveConversationID(message), message.clientMsgID)\n})\n\nawait deleteMessages({\n conversationID,\n clientMsgIDs: selectedMessageIDs,\n IsSync: true,\n})\n\nfunction removeMessageDeletedListener() {\n off(deletedSubscription)\n}\n```\n\n`IsSync: false` 删除当前设备及当前账号服务端记录;`true` 还请求把删除动作同步到其他客户端。它不会删除其他会话成员的副本,也不会产生撤回提示。\n\nPromise 成功表示删除请求已经完成;同步开启时,这不代表其他客户端已经收到事件或完成界面更新。公共事件 `onMsgDeleted` 是本页归属事件,参数是 `OpenIMMessageItem | null`;结合消息路由确定会话后按 `clientMsgID` 幂等移除。组件卸载、退出登录或切换账号时调用 `removeMessageDeletedListener()`;需要校准时重新查询对应会话的历史消息。", "description": "商业版批量删除消息,并处理 onMsgDeleted。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/delete-saved-messages", "title": "删除已保存消息" }, @@ -1957,16 +2556,63 @@ "title": "删除用户在会话中的全部消息" }, "/sdk/uniapp/message/managing-messages/revoke-a-message": { - "body": "`revokeMessage()` 使用会话和客户端消息 ID。\n\n```uts\nimport {\n off,\n onNewRecvMessageRevoked,\n revokeMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst revokedSubscription = onNewRecvMessageRevoked((info) => mergeRevokedInfo(info))\nawait revokeMessage({ conversationID, clientMsgID })\noff(revokedSubscription)\n```\n\n服务端校验发送者、时限与权限。撤回后保留消息占位和撤回信息,不简单删除数组项。事件可能先于 Promise 到达,处理需幂等。", + "body": "如果界面需要让其他会话成员看到“消息已撤回”,使用 `revokeMessage()`,不要用普通删除替代。删除只影响当前账号侧可见性,见[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)。修改已发送消息内容见[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)。\n\n## 撤回一条消息\n\n`revokeMessage()` 接收消息所在的 `conversationID` 和目标 `clientMsgID`:\n\n```uts\nimport {\n off,\n onNewRecvMessageRevoked,\n revokeMessage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst revokedSubscription = onNewRecvMessageRevoked((info) => {\n if (info == null) return\n markMessageRevoked(info.clientMsgID, info)\n})\nawait revokeMessage({ conversationID, clientMsgID })\n\nfunction removeRevokeListener() {\n off(revokedSubscription)\n}\n```\n\nPromise 成功后,调用端可以先把当前列表中的同 `clientMsgID` 消息更新为撤回态。在线客户端随后通过 `onNewRecvMessageRevoked` 收到撤回信息,接收端应更新对应气泡,而不是直接从列表中删除。\n\n允许撤回的发送者、时间窗口和消息类型由 OpenIMServer 校验;调用失败时不要只在本地保留撤回展示。Promise 成功代表当前请求已完成,不代表所有端界面已经更新。\n\n## 返回结果\n\n`revokeMessage()` 成功直接返回字符串结果,不返回被撤回消息对象。调用端继续使用请求中的 `clientMsgID` 更新本地气泡,并以撤回事件校准其他客户端状态。\n\n## 监听撤回事件\n\n本页是 `onNewRecvMessageRevoked` 的完整监听示例归属页。事件参数是 `OpenIMMessageRevokedItem | null`,使用 `clientMsgID` 合并;`isAdminRevoke` 表示是否由管理员撤回,可用于选择系统提示文案。事件可能先于 Promise 到达,处理必须幂等。\n\n组件卸载、退出登录或切换账号时调用 `removeRevokeListener()`;重新登录后的撤回变化由消息事件同步。\n\n## 相关页面\n\n- [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)\n- [修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)\n- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", "description": "撤回指定消息,并处理消息撤回事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "撤回一条消息", + "url": "#撤回一条消息" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "监听撤回事件", + "url": "#监听撤回事件" + }, + { + "depth": 2, + "title": "相关页面", + "url": "#相关页面" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/revoke-a-message", "title": "撤回消息" }, "/sdk/uniapp/message/managing-messages/modify-a-message": { - "body": "`modifyMessage()`、`onMessageModified` 和 `onMessageEdited` 属于商业版。两个事件都是 raw 字符串。\n\n```uts\nimport {\n modifyMessage,\n off,\n onMessageEdited,\n onMessageModified,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst modifiedSubscription = onMessageModified((payload) => refreshModifiedMessage(payload))\nconst editedSubscription = onMessageEdited((payload) => refreshModifiedMessage(payload))\n\nconst result = await modifyMessage(modifyParams)\noff(modifiedSubscription)\noff(editedSubscription)\n```\n\n`modifyParams` 按 `OpenIMModifyMessageParams` 构造。raw 事件先校验 JSON,再按稳定消息 ID查询或更新;不要记录完整正文。多端编辑按服务端最终版本解决冲突。", + "body": "`modifyMessage()` 商业版 用于修改一条已存在消息的内容。它和[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)不同:删除影响当前账号可见性,撤回让会话成员看到撤回态,修改则替换消息内容并同步给其他客户端。\n\n## 修改消息内容\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所属的会话 ID。 |\n| `message` | `OpenIMMessageItem` | 是 | 修改后的完整消息对象;必须保留原 `clientMsgID`。 |\n\n```uts\nimport {\n modifyMessage,\n off,\n onMessageEdited,\n onMessageModified,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst modifiedSubscription = onMessageModified((payload) => refreshModifiedMessage(payload))\nconst editedSubscription = onMessageEdited((payload) => refreshModifiedMessage(payload))\n\nconst result = await modifyMessage({\n conversationID,\n message: buildEditedMessage(message, editedText),\n})\nif (result?.message != null) replaceMessage(result.message)\n\nfunction removeMessageModifiedListeners() {\n off(modifiedSubscription)\n off(editedSubscription)\n}\n```\n\n该方法不是局部更新。应从当前消息复制并只修改目标内容,保留 `clientMsgID` 和其他消息字段。允许修改的发送者、时间窗口和消息类型由 OpenIMServer 校验;失败时不要只在本地保留编辑结果。\n\n## 返回结果\n\nPromise 成功后,`result?.message` 是服务端确认的修改后 `OpenIMMessageItem | null`。调用端可先用返回值替换当前列表中的同 `clientMsgID` 消息;这不代表所有端界面已经更新。\n\n## 监听消息修改\n\n`onMessageModified` 和 `onMessageEdited` 都属于商业版,参数是 raw JSON 字符串。部署可能按版本使用其中一种,若同时监听必须按稳定消息 ID 和版本去重。先验证 JSON,再查询或替换消息;不要记录完整正文。组件卸载、退出登录或切换账号时调用 `removeMessageModifiedListeners()`,多端编辑按服务端最终版本解决冲突。\n\n## 相关页面\n\n- [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)\n- [撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)\n- [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", "description": "商业版修改消息,并处理 modified/edited raw 事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "修改消息内容", + "url": "#修改消息内容" + }, + { + "depth": 3, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "监听消息修改", + "url": "#监听消息修改" + }, + { + "depth": 2, + "title": "相关页面", + "url": "#相关页面" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/modify-a-message", "title": "修改消息" }, @@ -1978,23 +2624,41 @@ "title": "查询置顶消息" }, "/sdk/uniapp/message/managing-messages/set-message-pinned": { - "body": "`setConversationPinnedMsg()` 与 `onChangedPinnedMsg` 属于商业版。\n\n```uts\nimport {\n off,\n onChangedPinnedMsg,\n setConversationPinnedMsg,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst pinnedSubscription = onChangedPinnedMsg((payload) => {\n refreshPinnedMessagesAfterValidJson(payload)\n})\nawait setConversationPinnedMsg(pinParams)\noff(pinnedSubscription)\n```\n\n参数使用 `OpenIMSetConversationPinnedMsgParams`。事件是 raw 字符串,校验后重新查询置顶列表;不要把未验证 payload 强转为消息对象。", + "body": "`setConversationPinnedMsg()` 与 `onChangedPinnedMsg` 属于商业版。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 消息所在的会话 ID。 |\n| `clientMsgID` | `string` | 是 | 要置顶或取消置顶的消息 ID。 |\n| `pinned` | `boolean` | 是 | `true` 表示置顶,`false` 表示取消置顶。 |\n\n```uts\nimport {\n off,\n onChangedPinnedMsg,\n setConversationPinnedMsg,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst pinnedSubscription = onChangedPinnedMsg((payload) => {\n refreshPinnedMessagesAfterValidJson(payload)\n})\nawait setConversationPinnedMsg({\n conversationID,\n clientMsgID: message.clientMsgID,\n pinned: true,\n})\n\nfunction removePinnedListener() {\n off(pinnedSubscription)\n}\n```\n\n权限、消息类型和数量限制由 OpenIMServer 校验。Promise 成功表示置顶请求已完成,不表示变化事件已经到达。\n\n本页唯一归属 `onChangedPinnedMsg`。事件是 raw JSON 字符串,应先校验,再按 `conversationID` 替换置顶集合并按消息 `clientMsgID` 去重;不要把未验证 payload 强转为消息对象。组件卸载、退出登录或切换账号时调用 `removePinnedListener()`。", "description": "商业版修改会话消息置顶状态并处理变化事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-pinned", "title": "置顶或取消置顶消息" }, "/sdk/uniapp/message/managing-messages/insert-local-single-message": { - "body": "`insertSingleMessageToLocalStorage()` 只写当前设备本地数据库,不发送给对方。\n\n```uts\nimport { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait insertSingleMessageToLocalStorage(insertParams)\n```\n\n`insertParams` 使用真实 `OpenIMInsertSingleMessageParams`,包含消息、发送方和接收方。适合系统迁移或本地提示,不用于伪造已发送消息。确保 ID 不与现有消息冲突。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `OpenIMMessageItem` | 是 | 要写入本地数据库的完整消息对象。 |\n| `recvID` | `string` | 是 | 单聊接收方的用户 ID。 |\n| `sendID` | `string` | 是 | 消息发送方的用户 ID。 |\n\n```uts\nimport {\n createTextMessage,\n insertSingleMessageToLocalStorage,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextMessage('本地提示')\nif (message != null) {\n await insertSingleMessageToLocalStorage({\n message,\n recvID: targetUserID,\n sendID: currentUserID,\n })\n}\n```\n\nPromise 成功只表示当前设备本地数据库已写入,不发送消息,也不触发新消息事件。`createTextMessage()` 只是准备参数,其正文归属[创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)页面。该能力适合系统迁移或本地提示,不用于伪造已发送消息,并应确保消息 ID 不与现有记录冲突。", "description": "把业务生成的消息插入单聊本地历史。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-single-message", "title": "插入本地单聊消息" }, "/sdk/uniapp/message/managing-messages/insert-local-group-message": { - "body": "`insertGroupMessageToLocalStorage()` 只写本机群聊历史。\n\n```uts\nimport { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait insertGroupMessageToLocalStorage(insertParams)\n```\n\n参数使用 `OpenIMInsertGroupMessageParams`,包含群、发送方和消息。它不广播给群成员;需要真实投递使用发送 API。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `message` | `OpenIMMessageItem` | 是 | 要写入本地数据库的完整消息对象。 |\n| `groupID` | `string` | 是 | 目标群组 ID。 |\n| `sendID` | `string` | 是 | 消息发送方的用户 ID。 |\n\n```uts\nimport { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk'\n\nawait insertGroupMessageToLocalStorage({\n message,\n groupID,\n sendID: currentUserID,\n})\n```\n\nPromise 成功只修改当前设备的本地数据库,不发送给群成员,也不触发新消息事件。适合迁移或本地提示,不应用于伪造服务端已投递消息;需要服务端投递、离线推送或多端同步时使用发送 API。", "description": "把业务生成的消息插入群聊本地历史。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/insert-local-group-message", "title": "插入本地群聊消息" }, @@ -2013,114 +2677,203 @@ "title": "清空本地与服务端消息" }, "/sdk/uniapp/message/managing-messages/set-message-local-ex": { - "body": "`setMessageLocalEx()` 使用会话和消息 ID 更新本地扩展。\n\n```uts\nimport { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk'\n\nawait setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) })\n```\n\n`localEx` 不同步到对端。它是整段替换,合并已有 JSON 并限制大小;不存 Token 或不可恢复的重要业务数据。", + "body": "`localEx` 只保存在当前客户端,适合折叠、选中或本地来源标记,不会同步给其他用户或设备。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 目标消息所在的会话 ID。 |\n| `clientMsgID` | `string` | 是 | 目标消息 ID。 |\n| `localEx` | `string` | 是 | 要写入的完整字符串。 |\n\n```uts\nimport { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk'\n\nawait setMessageLocalEx({\n conversationID,\n clientMsgID,\n localEx: JSON.stringify({ selected: true }),\n})\n```\n\nPromise 成功表示本地数据已更新。该方法不会自动合并旧 JSON,也不会触发共享消息事件;需要保留旧字段时先在业务层合并,并限制大小。不要在 `localEx` 中存放 Token 或不可恢复的重要业务数据。", "description": "更新一条消息在当前设备的 localEx。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-messages/set-message-local-ex", "title": "设置消息本地扩展" }, "/sdk/uniapp/message/managing-read-status/send-group-read-receipts": { - "body": "`sendGroupMessageReadReceipt()` 与 `onRecvGroupReadReceipt` 属于商业版。\n\n```uts\nimport {\n off,\n onRecvGroupReadReceipt,\n sendGroupMessageReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvGroupReadReceipt((payload) => refreshReadState(payload))\nawait sendGroupMessageReadReceipt(receiptParams)\noff(receiptSubscription)\n```\n\n参数使用 `OpenIMSendGroupMessageReadReceiptParams`。事件为 raw JSON,校验后按消息 ID合并;Promise 成功、事件到达和成员列表查询是不同阶段。", + "body": "`sendGroupMessageReadReceipt()` 与 `onRecvGroupReadReceipt` 属于商业版。\n\n```uts\nimport {\n off,\n onRecvGroupReadReceipt,\n sendGroupMessageReadReceipt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiptSubscription = onRecvGroupReadReceipt((payload) => {\n mergeValidatedGroupReadReceipt(payload)\n})\n\nawait sendGroupMessageReadReceipt({\n conversationID,\n clientMsgIDs: visibleUnreadMessageIDs,\n})\n\nfunction removeGroupReadReceiptListener() {\n off(receiptSubscription)\n}\n```\n\n同一批消息必须属于目标群会话。Promise 成功只表示服务端接受上报,不等于其他客户端界面已更新;会话未读数仍由 `markConversationMessageAsRead()` 独立维护。\n\n其他客户端通过 raw JSON 事件 `onRecvGroupReadReceipt` 接收群聊成员级已读变化。本页是该事件的完整监听归属页;先校验 JSON,再按 `conversationID + clientMsgID` 合并消息的已读计数、未读计数和成员信息。组件卸载、退出登录或切换账号时调用 `removeGroupReadReceiptListener()`。\n\n上报 Promise、群回执事件和[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers)得到的成员快照是三个独立阶段。", "description": "商业版发送群消息已读回执并处理 raw 回执事件。", "headings": [], "sourcePath": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", "title": "上报群消息已读" }, "/sdk/uniapp/message/managing-read-status/get-group-message-readers": { - "body": "`getGroupMessageReaderList()` 商业版 使用 `OpenIMGetGroupMessageReaderListParams` 查询。\n\n```uts\nimport { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupMessageReaderList(readerParams)\n```\n\n按返回 DTO 的分页字段继续加载,并按 `userID` 去重。已读成员数据可能随新回执变化,打开详情时重新查询。", + "body": "`getGroupMessageReaderList()` 商业版 分页查询指定群消息的已读或未读成员。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 群聊会话 ID。 |\n| `clientMsgID` | `string` | 是 | 要查询阅读成员的消息 ID。 |\n| `filter` | `number` | 是 | `0` 查询已读成员,`1` 查询未读成员。 |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次请求的成员数量。 |\n\n```uts\nimport { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupMessageReaderList({\n conversationID,\n clientMsgID,\n filter: 0,\n offset: 0,\n count: 50,\n})\nconst readers = result?.readers ?? []\n```\n\nPromise 成功后,`result?.readers` 是当前页 `OpenIMGroupMemberItem[]`,字段含义见[分页查询群成员](/zh/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。按 `groupID:userID` 去重,需要完整列表时继续增加 `offset` 分页。\n\n查询建立调用时快照,不触发回执事件。已读成员数据可能随新回执变化,打开详情时应重新查询。", "description": "商业版分页查询读过指定群消息的成员。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", "title": "查询群消息已读成员" }, "/sdk/uniapp/file-uploads/upload-file": { - "body": "`uploadFile()` 上传原生层可读的本地文件,返回 URL/URI、UUID、大小和媒体信息。\n\n```uts\nimport { uploadFile } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换;不要把网络 URL 作为 `filepath`。上传进度由[消息概览](/sdk/uniapp/message/overview-message)归属的 `onUploadFileProgress` 提供。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", + "body": "`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 |\n| `name` | `string` | 是 | 文件名。 |\n| `contentType` | `string` | 是 | MIME 类型。 |\n| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 |\n| `cancelID` | `string \\| null` | 否 | 用于取消本次上传的稳定 ID。 |\n| `cause` | `string \\| null` | 否 | 业务侧记录的上传用途或原因。 |\n\n如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。\n\n```uts\nimport {\n off,\n onUploadFileProgress,\n uploadFile,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst progressSubscription = onUploadFileProgress((event) => {\n if (event == null) return\n updateUploadProgress(event.progress)\n})\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n\nfunction removeUploadListener() {\n off(progressSubscription)\n}\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMUploadFileResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `url` | `string \\| null` | 上传后的远端资源 URL。 |\n| `uri` | `string \\| null` | 服务端返回的资源 URI。 |\n| `uuid` | `string \\| null` | 本次上传的任务标识。 |\n| `size` | `number \\| null` | 文件大小。 |\n| `typ` | `number \\| null` | 服务端返回的资源类型。 |\n| `mediaID` | `string \\| null` | 媒体资源 ID。 |\n\n使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。\n\n## 监听上传进度\n\n`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", "description": "上传本地文件、观察进度,并在商业版取消上传。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + }, + { + "depth": 2, + "title": "监听上传进度", + "url": "#监听上传进度" + } + ], "sourcePath": "/sdk/uniapp/file-uploads/upload-file", "title": "上传文件" }, "/sdk/uniapp/calling/overview-calling": { - "body": "本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 负责邀请、接受、拒绝、取消、挂断、房间凭据和信令事件;它不提供通话 UI、摄像头或音频渲染。\n\n需要完整通话与会议 UI 时,另行集成 `openim-av-runtime`。AV Runtime 复用本插件的唯一登录态,通过类型化 Host RPC调用这些信令 API,不初始化第二套 OpenIM Core。\n\n典型流程:\n\n1. 应用登录 IM,并注册全部信令事件。\n2. 主叫构造 `OpenIMSignalingInvitationInfo` 后调用邀请。\n3. 被叫收到 raw 邀请事件,校验 JSON 并展示来电。\n4. 被叫申请媒体权限后再接受;拒绝则直接发送 reject。\n5. 双方使用返回的 room/token/liveURL 建立媒体连接。\n6. 取消、超时、挂断和多设备事件驱动统一 session 状态机。\n\n同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。", + "body": "本节全部能力属于商业版,要求商业版 OpenIMServer 信令服务。`unix-openim-sdk` 提供发起邀请、接受、拒绝、取消、挂断、查询房间和同步通话状态所需的信令 API。它负责协调参与者、房间信息和通话生命周期,不负责采集摄像头画面、播放远端媒体流或渲染通话界面。\n\n应用需要把返回的 `roomID`、`token` 和 `liveURL` 交给所选的实时音视频媒体引擎,并自行处理设备权限、媒体轨道、弱网策略和界面状态。信令 API 不是一套完整的 WebRTC 媒体 SDK。需要完整通话与会议 UI 时,可另行集成 `openim-av-runtime`;AV Runtime 复用本插件的唯一登录态,不初始化第二套 OpenIM Core。\n\n## 通话流程\n\n1. 应用登录 IM 并注册全部信令事件,调用 `signalingInvite()` 发起单聊通话,或调用 `signalingInviteInGroup()` 发起群聊通话。\n2. 被邀请方从 `onReceiveNewInvitation` 获取 raw JSON 邀请,校验并映射为 `OpenIMSignalingInvitationInfo` 后展示来电。\n3. 接受方先申请媒体权限,再调用 `signalingAccept()`;拒绝则调用 `signalingReject()`。\n4. 双方使用返回的 `roomID`、`token` 和 `liveURL` 接入媒体引擎。\n5. 通话过程中根据参与者、媒体流和自定义信令事件更新本地状态。\n6. 发起方可以取消尚未接通的邀请;任一参与者都可以挂断已经建立的通话。\n\n## 核心数据\n\n| 数据 | 说明 |\n| --- | --- |\n| `OpenIMSignalingInvitationInfo` | 邀请人、被邀请人、群组、房间、媒体类型、超时时间和会话类型。 |\n| `OpenIMSignalingInviteResult` | OpenIMServer 返回的 `roomID`、`token`、`liveURL` 和忙线用户列表。 |\n| `OpenIMSignalingAcceptResult`、`OpenIMSignalingGetTokenByRoomIDResult` | 接受邀请或重新获取 Token 时返回的媒体房间凭据。 |\n| `OpenIMSignalingGetRoomByGroupIDResult` | 按群组查询到的 `roomID` 和原始邀请快照。 |\n\n`customData` 和自定义信令只适合传递业务可公开的协商信息。不要在其中写入长期凭据、管理员密钥或其他敏感数据。\n\n## 状态更新与事件归属\n\n发起、接受、拒绝、取消和挂断等写操作需要分别处理 API 的 Promise 结果与通话事件。Promise 成功表示 OpenIMServer 已接受或完成当前信令请求;事件反映邀请方、被邀请方、其他设备或房间参与者看到的增量状态,两者不是同一个完成信号。\n\n信令事件参数是 raw JSON 字符串,必须先校验再进入应用状态。邀请生命周期、成员进出房间、挂断和媒体流变化的完整监听统一见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events);自定义信令事件见[发送自定义信令](/zh/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal)。查询房间、重新获取 Token 和恢复待处理邀请只通过 Promise 返回调用时的快照。\n\n概览页不注册事件处理器。通话状态以 `roomID` 为主键,参与者状态还要结合用户 ID;重新登录后的通话变化由事件同步,需要显示当前房间快照时再查询房间信息。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发起单聊或群聊通话 | [发起单聊通话](/zh/sdk/uniapp/calling/managing-calls/start-single-call)、[发起群聊通话](/zh/sdk/uniapp/calling/managing-calls/start-group-call) |\n| 接受或拒绝邀请 | [接受通话](/zh/sdk/uniapp/calling/managing-calls/accept-call)、[拒绝通话](/zh/sdk/uniapp/calling/managing-calls/reject-call) |\n| 取消邀请或挂断通话 | [取消通话邀请](/zh/sdk/uniapp/calling/managing-calls/cancel-call)、[挂断通话](/zh/sdk/uniapp/calling/managing-calls/hang-up-call) |\n| 恢复房间或待处理邀请 | [查询群组通话房间](/zh/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id)、[获取通话房间 Token](/zh/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id)、[恢复待处理的通话邀请](/zh/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation) |\n| 处理通话事件和业务协商 | [通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)、[发送自定义信令](/zh/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal) |\n\n同一账号/运行时只维护一个活动通话或会议。Token、liveURL 和 raw 信令 payload 不写日志或持久化。", "description": "商业版通话邀请、房间凭据、事件和 AV Runtime 的职责边界。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "通话流程", + "url": "#通话流程" + }, + { + "depth": 2, + "title": "核心数据", + "url": "#核心数据" + }, + { + "depth": 2, + "title": "状态更新与事件归属", + "url": "#状态更新与事件归属" + }, + { + "depth": 2, + "title": "按任务查找页面", + "url": "#按任务查找页面" + } + ], "sourcePath": "/sdk/uniapp/calling/overview-calling", "title": "音视频信令概览" }, "/sdk/uniapp/calling/managing-calls/start-single-call": { - "body": "`signalingInvite()` 商业版 使用 invitation 和可选离线推送信息。\n\n```uts\nimport { signalingInvite } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingInvite({\n invitation: {\n inviterUserID: selfUserID,\n inviteeUserIDList: [peerUserID],\n mediaType: 'video',\n timeout: 30,\n sessionType: 1,\n },\n offlinePushInfo: { title: '视频通话', desc: '收到新的通话邀请' },\n})\n```\n\n返回值可能含 `roomID`、`token`、`liveURL` 和忙线用户列表,全部按可选字段处理。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", + "body": "`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 |\n| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 否 | 推送标题。 |\n| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 |\n| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeSingle,\n signalingInvite,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n customData: JSON.stringify({ source: 'contact-card' }),\n groupID: '',\n roomID: createBusinessRoomID(),\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeSingle,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo: {\n title: '视频通话',\n desc: '你收到一个视频通话邀请',\n ex: '',\n iOSPushSound: 'default',\n iOSBadgeCount: true,\n },\n})\n```\n\niOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。\n\n## 返回结果\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 本次通话的媒体房间 ID。 |\n| `token` | `string \\| null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 |\n| `liveURL` | `string \\| null` | 媒体服务返回的房间连接地址。 |\n| `busyLineUserIDList` | `string[] \\| null` | 因忙线未能进入邀请流程的用户 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 服务端返回的邀请快照。 |\n\n取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", "description": "商业版向一个用户发起音频或视频邀请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + }, + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/calling/managing-calls/start-single-call", "title": "发起单人通话" }, "/sdk/uniapp/calling/managing-calls/start-group-call": { - "body": "`signalingInviteInGroup()` 商业版 使用同一邀请结构,但 invitation 必须包含 `groupID` 和目标成员。\n\n```uts\nimport { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingInviteInGroup({\n invitation: {\n inviterUserID: selfUserID,\n inviteeUserIDList: selectedUserIDs,\n groupID,\n mediaType: 'audio',\n timeout: 30,\n sessionType: 2,\n },\n})\n```\n\n发送前确认成员仍在群内并去重。`busyLineUserIDList` 只表示本次忙线结果,其他用户仍可能后续接受、拒绝或超时。", + "body": "`signalingInviteInGroup()` 商业版 发起群聊通话,只邀请 `inviteeUserIDList` 明确列出的群成员,不会因为填写 `groupID` 自动邀请全群。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 发起人的用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请的群成员用户 ID;不要包含发起人。 |\n| `invitation.groupID` | `string` | 是 | 群组 ID,群聊通话不能为空。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,所有参与端必须一致。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 工作群会话传 `OpenIMSessionTypeWriteGroup`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeWriteGroup,\n signalingInviteInGroup,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInviteInGroup({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: selectedGroupMemberIDs,\n customData: JSON.stringify({ source: 'group-call' }),\n groupID,\n roomID: groupID,\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeWriteGroup,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo,\n})\n```\n\n示例沿用群组 ID 作为房间 ID;若业务自行生成 `roomID`,所有参与端必须使用同一个值。iOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。发起前应排除当前用户、空值和重复成员,并确认目标仍在群内。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`,字段含义见[发起单聊通话](/zh/sdk/uniapp/calling/managing-calls/start-single-call)。`busyLineUserIDList` 只表示部分成员忙线,不应中止其他成员的邀请;成功也不代表其他成员已经接听,后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)合并。", "description": "商业版向群成员发起群组通话邀请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "参数说明", + "url": "#参数说明" + } + ], "sourcePath": "/sdk/uniapp/calling/managing-calls/start-group-call", "title": "发起群通话" }, "/sdk/uniapp/calling/managing-calls/accept-call": { - "body": "收到邀请后,先校验当前 session、请求麦克风/摄像头权限,再调用 `signalingAccept()`。\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingAccept({ invitation })\n```\n\n返回的 `token`、`roomID`、`liveURL` 均可选且敏感,只保存在内存中。权限失败时不得发送 accept;应按产品策略拒绝或提示用户。\n\nPromise 成功与对方接受事件、媒体真正连接是不同阶段。", + "body": "从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`:\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingAccept({ invitation })\n```\n\n`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 本次通话的媒体房间 ID。 |\n| `token` | `string \\| null` | 加入媒体房间使用的短期凭据。 |\n| `liveURL` | `string \\| null` | 媒体服务返回的连接地址。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 服务端返回的邀请快照。 |\n\n这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。", "description": "商业版接受邀请并取得房间凭据。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", "title": "接受通话" }, "/sdk/uniapp/calling/managing-calls/reject-call": { - "body": "`signalingReject()` 使用收到的完整 invitation。\n\n```uts\nimport { signalingReject } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingReject({ invitation })\n```\n\n拒绝后立即关闭本地来电 UI,并等待/幂等处理对端和其他设备事件。不要自行重建 invitation 或修改 `roomID`。", + "body": "用户拒绝来电时,将收到的原始 `OpenIMSignalingInvitationInfo` 交给 `signalingReject()`:\n\n```uts\nimport { signalingReject } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingReject({ invitation })\n```\n\n`invitation` 必须保留完整的原始通话信息,不要自行重建或修改 `roomID`。\n\nPromise 成功只表示 OpenIMServer 已完成拒绝请求。拒绝后可以关闭本地来电 UI,并幂等处理对端和其他设备事件;发起端随后通过 `onInviteeRejected` 更新界面,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。", "description": "商业版拒绝当前邀请。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/reject-call", "title": "拒绝通话" }, "/sdk/uniapp/calling/managing-calls/cancel-call": { - "body": "主叫在对方接受前使用 `signalingCancel()`。\n\n```uts\nimport { signalingCancel } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingCancel({ invitation })\n```\n\n取消与挂断语义不同:取消用于未接通邀请,挂断用于已建立或正在建立的会话。按钮防重复,并以取消/接受竞态事件决定最终状态。", + "body": "主叫在对方接受前使用 `signalingCancel()`。\n\n```uts\nimport { signalingCancel } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingCancel({ invitation })\n```\n\n必须传本次通话的完整原始 `OpenIMSignalingInvitationInfo`,不能只构造一个 `roomID`。取消与挂断语义不同:取消用于尚未接通的邀请,挂断用于已经建立或正在建立的会话。\n\nPromise 成功表示取消信令请求完成。应用还应结束本地的等待接听状态,并释放尚未使用的媒体资源;远端通过 `onInvitationCancelled` 更新。按钮应防止重复提交,并以取消、接受等竞态事件决定最终状态,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。", "description": "商业版由主叫取消尚未接通的邀请。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/cancel-call", "title": "取消通话邀请" }, "/sdk/uniapp/calling/managing-calls/hang-up-call": { - "body": "`signalingHungUp()` 使用当前会话的 invitation。\n\n```uts\nimport { signalingHungUp } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingHungUp({ invitation })\n```\n\n调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。发送后关闭媒体连接、释放页面资源,并幂等处理 `onHangUp`。", + "body": "通话已经建立后,参与者调用 `signalingHungUp()`。`invitation` 是本次通话使用的完整 `OpenIMSignalingInvitationInfo`,其中的 `roomID` 必须与当前媒体房间一致。\n\n```uts\nimport { signalingHungUp } from '@/uni_modules/unix-openim-sdk'\n\nawait signalingHungUp({ invitation })\n```\n\nPromise 成功只表示挂断信令请求完成。应用还需要停止本地采集、断开媒体房间,并释放摄像头、麦克风和页面资源。\n\n调用前先锁定结束流程,避免本地按钮、远端挂断和网络错误重复执行。取消、拒绝、超时和挂断应进入同一套按 `roomID` 幂等的清理流程,并继续处理 `onHangUp`,完整监听见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。", "description": "商业版结束已接受的通话。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/hang-up-call", "title": "挂断通话" }, "/sdk/uniapp/calling/managing-calls/handle-call-events": { - "body": "所有事件返回 raw JSON 字符串。注册后立即 ACK,异步展示 UI;先校验 JSON,再映射到应用自己的通话领域模型。\n\n```uts\nimport {\n off,\n onHangUp,\n onInvitationCancelled,\n onInvitationTimeout,\n onInviteeAccepted,\n onInviteeAcceptedByOtherDevice,\n onInviteeRejected,\n onInviteeRejectedByOtherDevice,\n onReceiveNewInvitation,\n onRoomParticipantConnected,\n onRoomParticipantDisconnected,\n onStreamChange,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction handleCallPayload(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) routeValidatedCallEvent(value)\n } catch (_) {\n console.error('Invalid call event payload')\n }\n}\n\nconst invitationSubscription = onReceiveNewInvitation(handleCallPayload)\nconst subscriptions : Array = [\n invitationSubscription,\n onInviteeAccepted(handleCallPayload),\n onInviteeAcceptedByOtherDevice(handleCallPayload),\n onInviteeRejected(handleCallPayload),\n onInviteeRejectedByOtherDevice(handleCallPayload),\n onInvitationCancelled(handleCallPayload),\n onInvitationTimeout(handleCallPayload),\n onHangUp(handleCallPayload),\n onRoomParticipantConnected(handleCallPayload),\n onRoomParticipantDisconnected(handleCallPayload),\n onStreamChange(handleCallPayload),\n]\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\nHarmonyOS 当前不支持 `onStreamChange`,注册会返回 unsupported subscription;其余信令事件支持。应用用 room/session ID 和运行 generation 去重,过期事件不能打开新页面。raw payload 与 RTC Token 不落日志。", + "body": "通话状态层应集中监听邀请生命周期、参与者连接状态和媒体流变化,并按 `roomID` 合并到同一份本地状态。所有事件返回 raw JSON 字符串;回调应尽快完成,异步展示 UI,并先校验 JSON 再映射到应用自己的通话领域模型。\n\n| 事件 | 用途 |\n| --- | --- |\n| `onReceiveNewInvitation` | 收到新的通话邀请。 |\n| `onInviteeAccepted`、`onInviteeRejected` | 当前邀请被接受或拒绝。 |\n| `onInvitationCancelled`、`onInvitationTimeout` | 邀请被取消或超时。 |\n| `onInviteeAcceptedByOtherDevice`、`onInviteeRejectedByOtherDevice` | 同一账号的其他设备处理邀请。 |\n| `onHangUp` | 通话参与者挂断。 |\n| `onRoomParticipantConnected`、`onRoomParticipantDisconnected` | 房间参与者连接状态变化。 |\n| `onStreamChange` | 参与者媒体流状态变化。 |\n\n```uts\nimport {\n off,\n onHangUp,\n onInvitationCancelled,\n onInvitationTimeout,\n onInviteeAccepted,\n onInviteeAcceptedByOtherDevice,\n onInviteeRejected,\n onInviteeRejectedByOtherDevice,\n onReceiveNewInvitation,\n onRoomParticipantConnected,\n onRoomParticipantDisconnected,\n onStreamChange,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction handleCallPayload(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) routeValidatedCallEvent(value)\n } catch (_) {\n console.error('Invalid call event payload')\n }\n}\n\nconst invitationSubscription = onReceiveNewInvitation(handleCallPayload)\nconst subscriptions : Array = [\n invitationSubscription,\n onInviteeAccepted(handleCallPayload),\n onInviteeAcceptedByOtherDevice(handleCallPayload),\n onInviteeRejected(handleCallPayload),\n onInviteeRejectedByOtherDevice(handleCallPayload),\n onInvitationCancelled(handleCallPayload),\n onInvitationTimeout(handleCallPayload),\n onHangUp(handleCallPayload),\n onRoomParticipantConnected(handleCallPayload),\n onRoomParticipantDisconnected(handleCallPayload),\n onStreamChange(handleCallPayload),\n]\n\nfunction removeCallListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n本页是以上 11 个通话事件的唯一完整监听归属页。参与者状态还要结合用户 ID 更新;不要按事件顺序、展示名称或数组下标合并。应用应使用 `roomID`、本地 session ID 和运行 generation 去重,过期事件不能打开新页面。退出登录、切换账号或销毁通话状态层时调用 `removeCallListeners()`。\n\nHarmonyOS 当前不支持 `onStreamChange`,注册会返回 `platform-unsupported` subscription,不会伪造媒体流事件;其余本页信令事件支持。raw payload 与 RTC Token 不写入日志或持久化存储。", "description": "商业版统一接收邀请、接受、拒绝、取消、超时、挂断和房间事件。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/handle-call-events", "title": "处理通话事件" }, "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation": { - "body": "事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,恢复初始化前到达的邀请。\n\n```uts\nimport { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetInvitationInfoStartApp()\nif (result?.invitation != null) recoverInvitation(result.invitation)\n```\n\n可选参数 `userID` 只用于明确查询用户。无邀请时合法返回 `null`,不是错误。恢复结果与实时邀请可能重复,按 room/session 标识去重;每次 runtime 初始化只查询一次。", + "body": "事件监听建立后调用一次 `signalingGetInvitationInfoStartApp()`,返回应用启动或恢复时需要处理的邀请快照:\n\n```uts\nimport { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetInvitationInfoStartApp()\nif (result?.invitation != null) recoverInvitation(result.invitation)\n```\n\n可选参数 `{ userID }` 只用于明确查询用户;通常由当前登录态决定,不需要传入。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetInvitationInfoStartAppResult | null`,其中 `invitation` 为 `OpenIMSignalingInvitationInfo | null`。无邀请时合法返回 `null` 或 `invitation: null`,不是错误。\n\n该查询只取得当前快照,不会触发通话事件。只在 invitation 非空且 `roomID` 有效时恢复来电界面;恢复结果与实时邀请可能重复,应按 `roomID` 和本地 session 标识去重。每次 runtime 初始化只查询一次,随后仍需监听取消、超时、接受和挂断,完整处理见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。", "description": "商业版在 SDK 启动后查询可能遗漏的当前邀请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", "title": "恢复启动时邀请" }, "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": { - "body": "`signalingGetRoomByGroupID()` 返回可选 `roomID` 和 invitation。\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetRoomByGroupID({ groupID })\n```\n\n空值表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并获取有效 Token。", + "body": "`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`:\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst room = await signalingGetRoomByGroupID({ groupID })\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 当前群通话的房间 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 当前房间对应的原始邀请信息。 |\n\n当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。\n\n空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。", "description": "商业版查询群当前关联的 roomID 与邀请。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "返回结果", + "url": "#返回结果" + } + ], "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", "title": "按群查询通话房间" }, "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id": { - "body": "`signalingGetTokenByRoomID()` 返回可选 Token 与 liveURL。\n\n```uts\nimport { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await signalingGetTokenByRoomID({ roomID })\n```\n\n凭据只保存在内存并立即交给媒体层,不写日志、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。", + "body": "已经知道 `roomID`、但需要重新获取入会凭据时,调用 `signalingGetTokenByRoomID()`:\n\n```uts\nimport { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingGetTokenByRoomID({ roomID })\n```\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingGetTokenByRoomIDResult | null`,包含可选的 `token` 和 `liveURL`,不重复返回 `roomID`。只有取得有效 Token 后,才能使用本次查询参数中的 `roomID` 连接媒体引擎。\n\n房间 Token 是短期敏感凭据,只保存在内存并立即交给媒体层,不要写入日志、URL、分析事件、文件或持久化 storage。空字段或服务端过期时停止加入流程并重新获取,不复用旧 Token。", "description": "商业版为指定 roomID 获取 RTC Token 和 liveURL。", "headings": [], "sourcePath": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", "title": "按房间获取 Token" }, "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal": { - "body": "`signalingSendCustomSignaling()` 发送房间内自定义字符串。两个兼容接收事件可能随平台/版本使用其一,业务应去重而不是重复处理。\n\n```uts\nimport {\n off,\n onReceiveCustomSignal,\n onReceiveCustomSignaling,\n signalingSendCustomSignaling,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst signalSubscription = onReceiveCustomSignal((payload) => handleValidatedSignal(payload))\nconst signalingSubscription = onReceiveCustomSignaling((payload) => handleValidatedSignal(payload))\n\nawait signalingSendCustomSignaling({\n roomID,\n customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }),\n})\n\noff(signalSubscription)\noff(signalingSubscription)\n```\n\n接收端用事件 ID/内容哈希去重,校验 `type`、`version` 和字段。`customInfo` 不承担权限认证,不含 Token 或秘密。", + "body": "`signalingSendCustomSignaling()` 用于向指定通话房间发送轻量级业务协商数据,例如举手、切换布局提示或业务侧状态同步。它不是聊天消息接口,也不能替代媒体引擎的数据通道。\n\n## 发送信令\n\n`customInfo` 是字符串。需要传递结构化数据时,先定义稳定的数据格式并序列化为 JSON。\n\n```uts\nimport {\n off,\n onReceiveCustomSignal,\n onReceiveCustomSignaling,\n signalingSendCustomSignaling,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst signal = {\n version: 1,\n eventID: createBusinessEventID(),\n type: 'hand-raised',\n userID: currentUserID,\n sentAt: Date.now(),\n}\n\nawait signalingSendCustomSignaling({\n roomID,\n customInfo: JSON.stringify(signal),\n})\n```\n\nPromise 成功表示 OpenIMServer 已接受本次发送,不等于其他参与者已经处理该数据。`customInfo` 应保持精简,并包含协议版本和业务幂等 ID。大文件、聊天记录、长期状态和敏感凭据不应放入其中。\n\n## 接收信令\n\n`onReceiveCustomSignal` 和 `onReceiveCustomSignaling` 是兼容不同 Core/商业服务版本的 raw JSON 事件。实际部署只订阅其中真实产生的一种;若为了兼容同时订阅,必须按 `roomID:eventID` 去重。\n\n```uts\nfunction handleValidatedSignal(payload : string) {\n try {\n const event = JSON.parseObject(payload)\n if (event == null) return\n\n const eventRoomID = event.getString('roomID')\n const customInfo = event.getString('customInfo')\n if (eventRoomID != activeRoomID || customInfo == null) return\n\n const signal = JSON.parseObject(customInfo)\n if (signal == null) return\n applyValidatedCallSignal(eventRoomID, signal)\n } catch (_) {\n console.warn('无法解析通话自定义信令')\n }\n}\n\nconst signalSubscription = onReceiveCustomSignal(handleValidatedSignal)\nconst signalingSubscription = onReceiveCustomSignaling(handleValidatedSignal)\n\nfunction removeCustomSignalListeners() {\n off(signalSubscription)\n off(signalingSubscription)\n}\n```\n\n解析函数应检查 JSON 结构、协议版本、`eventID`、`type` 和业务字段,再返回已验证的应用内对象。本页是两个兼容事件的完整监听示例归属页。离开通话页、退出登录或切换账号时调用 `removeCustomSignalListeners()`。\n\n自定义信令不承担权限认证。不要信任客户端信令来授予主持人、付费或隐私权限;需要权威校验的状态应由可信后端保存和判断。连接恢复后,通过房间查询或业务后端校准长期状态,不要把自定义信令当作可重放的权威记录。", "description": "商业版向房间发送业务自定义信令,并安全解析接收事件。", - "headings": [], + "headings": [ + { + "depth": 2, + "title": "发送信令", + "url": "#发送信令" + }, + { + "depth": 2, + "title": "接收信令", + "url": "#接收信令" + } + ], "sourcePath": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", "title": "发送自定义信令" }, From 1d5278e5981f38c33a755bca4e1444ae937cc7ac Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:36:06 +0800 Subject: [PATCH 12/20] docs(uniapp): fix union types in markdown tables --- .../calling/managing-calls/accept-call.mdx | 8 ++-- .../managing-calls/start-single-call.mdx | 10 ++--- .../get-room-by-group-id.mdx | 4 +- .../sdk/uniapp/file-uploads/upload-file.mdx | 16 ++++---- .../chat/sdk/uniapp/group/create-group.mdx | 10 ++--- ...et-group-application-list-as-applicant.mdx | 4 +- .../docs/chat/sdk/uniapp/group/join-group.mdx | 2 +- .../sdk/uniapp/group/update-group-profile.mdx | 6 +-- .../check-speech-to-text.mdx | 14 +++---- .../creating-messages/create-card-message.mdx | 8 ++-- .../create-file-message-by-url.mdx | 10 ++--- .../create-image-message-by-url.mdx | 8 ++-- .../create-sound-message-by-url.mdx | 10 ++--- .../create-text-at-message.mdx | 4 +- .../create-video-message-by-url.mdx | 24 ++++++------ .../sdk/uniapp/message/overview-message.mdx | 16 ++++---- .../load-older-messages.mdx | 2 +- .../searching-messages/search-messages.mdx | 4 +- .../sending-messages/send-message-not-oss.mdx | 4 +- src/generated/search-index-zh.json | 38 +++++++++---------- src/generated/uniapp-sdk-zh-content.json | 38 +++++++++---------- 21 files changed, 120 insertions(+), 120 deletions(-) diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx index d89a9e5c14..2fedc7bb3a 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -18,9 +18,9 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null` | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | `string \| null` | 本次通话的媒体房间 ID。 | -| `token` | `string \| null` | 加入媒体房间使用的短期凭据。 | -| `liveURL` | `string \| null` | 媒体服务返回的连接地址。 | -| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 服务端返回的邀请快照。 | +| `roomID` | string | null | 本次通话的媒体房间 ID。 | +| `token` | string | null | 加入媒体房间使用的短期凭据。 | +| `liveURL` | string | null | 媒体服务返回的连接地址。 | +| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx index a849de3e20..f08333aaf2 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -66,10 +66,10 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null` | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | `string \| null` | 本次通话的媒体房间 ID。 | -| `token` | `string \| null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 | -| `liveURL` | `string \| null` | 媒体服务返回的房间连接地址。 | -| `busyLineUserIDList` | `string[] \| null` | 因忙线未能进入邀请流程的用户 ID。 | -| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 服务端返回的邀请快照。 | +| `roomID` | string | null | 本次通话的媒体房间 ID。 | +| `token` | string | null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | +| `liveURL` | string | null | 媒体服务返回的房间连接地址。 | +| `busyLineUserIDList` | string[] | null | 因忙线未能进入邀请流程的用户 ID。 | +| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 | 取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx index e380413149..13c31988a7 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -18,8 +18,8 @@ Promise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快 | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | `string \| null` | 当前群通话的房间 ID。 | -| `invitation` | `OpenIMSignalingInvitationInfo \| null` | 当前房间对应的原始邀请信息。 | +| `roomID` | string | null | 当前群通话的房间 ID。 | +| `invitation` | OpenIMSignalingInvitationInfo | null | 当前房间对应的原始邀请信息。 | 当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。 diff --git a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx index b424fcd376..824e23b54a 100644 --- a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx +++ b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -14,8 +14,8 @@ sourcePath: '/sdk/uniapp/file-uploads/upload-file' | `name` | `string` | 是 | 文件名。 | | `contentType` | `string` | 是 | MIME 类型。 | | `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 | -| `cancelID` | `string \| null` | 否 | 用于取消本次上传的稳定 ID。 | -| `cause` | `string \| null` | 否 | 业务侧记录的上传用途或原因。 | +| `cancelID` | string | null | 否 | 用于取消本次上传的稳定 ID。 | +| `cause` | string | null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。 @@ -52,12 +52,12 @@ Promise 成功后,结果是 `OpenIMUploadFileResult | null`: | 字段 | 类型 | 说明 | | --- | --- | --- | -| `url` | `string \| null` | 上传后的远端资源 URL。 | -| `uri` | `string \| null` | 服务端返回的资源 URI。 | -| `uuid` | `string \| null` | 本次上传的任务标识。 | -| `size` | `number \| null` | 文件大小。 | -| `typ` | `number \| null` | 服务端返回的资源类型。 | -| `mediaID` | `string \| null` | 媒体资源 ID。 | +| `url` | string | null | 上传后的远端资源 URL。 | +| `uri` | string | null | 服务端返回的资源 URI。 | +| `uuid` | string | null | 本次上传的任务标识。 | +| `size` | number | null | 文件大小。 | +| `typ` | number | null | 服务端返回的资源类型。 | +| `mediaID` | string | null | 媒体资源 ID。 | 使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx index 65c1c1d61e..1251d2b6cc 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx @@ -12,12 +12,12 @@ sourcePath: '/sdk/uniapp/group/create-group' | --- | --- | --- | --- | | `groupInfo.groupName` | `string` | 是 | 群名称。 | | `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 | -| `groupInfo.notification` | `string \| null` | 否 | 初始群公告。 | -| `groupInfo.introduction` | `string \| null` | 否 | 群简介。 | -| `groupInfo.faceURL` | `string \| null` | 否 | 群头像 URL。 | -| `groupInfo.ex` | `string \| null` | 否 | 群扩展字符串,完整写入。 | +| `groupInfo.notification` | string | null | 否 | 初始群公告。 | +| `groupInfo.introduction` | string | null | 否 | 群简介。 | +| `groupInfo.faceURL` | string | null | 否 | 群头像 URL。 | +| `groupInfo.ex` | string | null | 否 | 群扩展字符串,完整写入。 | | `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 | -| `adminUserIDs` | `string[] \| null` | 否 | 初始管理员用户 ID。 | +| `adminUserIDs` | string[] | null | 否 | 初始管理员用户 ID。 | ```uts import { createGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx index 4117da7860..ce22ce714b 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -12,8 +12,8 @@ sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as- | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | -| `count` | `number \| null` | 否 | 本次读取数量。 | +| `offset` | number | null | 否 | 分页偏移量,首页传 `0`。 | +| `count` | number | null | 否 | 本次读取数量。 | ```uts import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx index 077ba1493c..d4940d72f0 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx @@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/group/join-group' | `groupID` | `string` | 是 | 要申请加入的群 ID。 | | `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 | | `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 | -| `ex` | `string \| null` | 否 | 申请扩展字符串,只按已确认协议填写。 | +| `ex` | string | null | 否 | 申请扩展字符串,只按已确认协议填写。 | ```uts import { joinGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx index 7ebfc05573..1eeb1199e6 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -11,9 +11,9 @@ sourcePath: '/sdk/uniapp/group/update-group-profile' | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | | `groupID` | `string` | 是 | 要更新的群组 ID。 | -| `groupName` | `string \| null` | 否 | 新群名称。 | -| `introduction` | `string \| null` | 否 | 新群简介。 | -| `faceURL` | `string \| null` | 否 | 新群头像地址。 | +| `groupName` | string | null | 否 | 新群名称。 | +| `introduction` | string | null | 否 | 新群简介。 | +| `faceURL` | string | null | 否 | 新群头像地址。 | 除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx index 16ddb30bc5..26b5a4fa5c 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -16,12 +16,12 @@ Promise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`: | 字段 | 类型 | 说明 | | --- | --- | --- | -| `format` | `string[] \| null` | 支持的音频格式。 | -| `sampleRateHz` | `number[] \| null` | 支持的音频采样率,单位为赫兹。 | -| `maxRecordTimeMs` | `number \| null` | 最大录音时长,单位为毫秒。 | -| `maxFileSize` | `number \| null` | 最大文件大小,单位为字节。 | -| `provider` | `string \| null` | 当前语音识别服务提供方。 | -| `requestType` | `string \| null` | 服务端要求的请求类型。 | -| `crossDomain` | `boolean \| null` | 是否允许跨域处理。 | +| `format` | string[] | null | 支持的音频格式。 | +| `sampleRateHz` | number[] | null | 支持的音频采样率,单位为赫兹。 | +| `maxRecordTimeMs` | number | null | 最大录音时长,单位为毫秒。 | +| `maxFileSize` | number | null | 最大文件大小,单位为字节。 | +| `provider` | string | null | 当前语音识别服务提供方。 | +| `requestType` | string | null | 服务端要求的请求类型。 | +| `crossDomain` | boolean | null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx index d650d727e2..2f85dd9756 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' | 参数 | 类型 | 建议 | 说明 | | --- | --- | --- | --- | -| `userID` | `string \| null` | 必填 | 名片对应的用户 ID。 | -| `nickname` | `string \| null` | 必填 | 名片中保存的展示名称。 | -| `faceURL` | `string \| null` | 必填 | 名片中保存的头像地址。 | -| `ex` | `string \| null` | 必填 | 名片扩展信息;没有内容时传空字符串。 | +| `userID` | string | null | 必填 | 名片对应的用户 ID。 | +| `nickname` | string | null | 必填 | 名片中保存的展示名称。 | +| `faceURL` | string | null | 必填 | 名片中保存的头像地址。 | +| `ex` | string | null | 必填 | 名片扩展信息;没有内容时传空字符串。 | ```uts import { createCardMessage } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx index 9afad33c5d..6b588521ff 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -10,11 +10,11 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `filePath` | `string \| null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `fileName` | `string \| null` | 对外展示的文件名。 | -| `uuid` | `string \| null` | 文件资源的唯一标识。 | -| `sourceUrl` | `string \| null` | 已上传文件的可访问地址。 | -| `fileSize` | `number \| null` | 文件大小,单位为字节。 | +| `filePath` | string | null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `fileName` | string | null | 对外展示的文件名。 | +| `uuid` | string | null | 文件资源的唯一标识。 | +| `sourceUrl` | string | null | 已上传文件的可访问地址。 | +| `fileSize` | number | null | 文件大小,单位为字节。 | ```uts import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx index e16ebdf1b7..6a3f61b14b 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `sourcePicture` | `OpenIMPicture \| null` | 原图信息。 | -| `bigPicture` | `OpenIMPicture \| null` | 大图信息。 | -| `snapshotPicture` | `OpenIMPicture \| null` | 缩略图信息。 | -| `sourcePath` | `string \| null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `sourcePicture` | OpenIMPicture | null | 原图信息。 | +| `bigPicture` | OpenIMPicture | null | 大图信息。 | +| `snapshotPicture` | OpenIMPicture | null | 缩略图信息。 | +| `sourcePath` | string | null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx index ac423be968..a15f5ba7b2 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -10,11 +10,11 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `uuid` | `string \| null` | 音频资源的唯一标识。 | -| `soundPath` | `string \| null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `sourceUrl` | `string \| null` | 已上传音频的可访问地址。 | -| `dataSize` | `number \| null` | 音频大小,单位为字节。 | -| `duration` | `number \| null` | 音频时长,单位按服务端协议约定。 | +| `uuid` | string | null | 音频资源的唯一标识。 | +| `soundPath` | string | null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `sourceUrl` | string | null | 已上传音频的可访问地址。 | +| `dataSize` | number | null | 音频大小,单位为字节。 | +| `duration` | number | null | 音频时长,单位按服务端协议约定。 | ```uts import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx index c5d5c5204b..4572015abc 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -10,8 +10,8 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' | --- | --- | --- | --- | | `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 | | `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 | -| `atUsersInfo` | `OpenIMAtUsersInfoItem[] \| null` | 否 | 用户 ID 与群内展示名信息。 | -| `quoteMessage` | `OpenIMMessageItem \| null` | 否 | 被引用的原消息。 | +| `atUsersInfo` | OpenIMAtUsersInfoItem[] | null | 否 | 用户 ID 与群内展示名信息。 | +| `quoteMessage` | OpenIMMessageItem | null | 否 | 被引用的原消息。 | ```uts import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx index 7c6976a19e..8877e2719d 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -10,18 +10,18 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `videoPath` | `string \| null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `duration` | `number \| null` | 视频时长。 | -| `videoType` | `string \| null` | 视频 MIME 类型。 | -| `videoUUID` | `string \| null` | 视频资源的唯一标识。 | -| `videoUrl` | `string \| null` | 已上传视频的可访问地址。 | -| `videoSize` | `number \| null` | 视频大小,单位为字节。 | -| `snapshotPath` | `string \| null` | 快照文件的本地名称或业务路径。 | -| `snapshotUUID` | `string \| null` | 快照资源的唯一标识。 | -| `snapshotSize` | `number \| null` | 快照大小,单位为字节。 | -| `snapshotUrl` | `string \| null` | 已上传快照的可访问地址。 | -| `snapshotWidth` | `number \| null` | 快照宽度,单位为像素。 | -| `snapshotHeight` | `number \| null` | 快照高度,单位为像素。 | +| `videoPath` | string | null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `duration` | number | null | 视频时长。 | +| `videoType` | string | null | 视频 MIME 类型。 | +| `videoUUID` | string | null | 视频资源的唯一标识。 | +| `videoUrl` | string | null | 已上传视频的可访问地址。 | +| `videoSize` | number | null | 视频大小,单位为字节。 | +| `snapshotPath` | string | null | 快照文件的本地名称或业务路径。 | +| `snapshotUUID` | string | null | 快照资源的唯一标识。 | +| `snapshotSize` | number | null | 快照大小,单位为字节。 | +| `snapshotUrl` | string | null | 已上传快照的可访问地址。 | +| `snapshotWidth` | number | null | 快照宽度,单位为像素。 | +| `snapshotHeight` | number | null | 快照高度,单位为像素。 | ```uts import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx index e67d1ec681..4f01ccbec7 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -24,21 +24,21 @@ uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送 | 字段 | 类型 | 说明 | | --- | --- | --- | -| `clientMsgID` | `string \| null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | -| `serverMsgID` | `string \| null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 | +| `clientMsgID` | string | null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | +| `serverMsgID` | string | null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 | -| `sendID`、`recvID`、`groupID` | `string \| null` | 发送者及单聊/群聊路由字段。 | +| `sendID`、`recvID`、`groupID` | string | null | 发送者及单聊/群聊路由字段。 | | `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 | | `createTime`、`sendTime` | `number` | 创建和发送时间。 | | `seq` | `number` | 服务端消息序号。 | | `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 | -| `senderNickname`、`senderFaceUrl` | `string \| null` | 发送者资料快照。 | +| `senderNickname`、`senderFaceUrl` | string | null | 发送者资料快照。 | | `status` | `OpenIMMessageStatus` | 当前发送状态。 | | `isRead` | `boolean` | 当前已读状态快照。 | -| `offlinePush` | `OpenIMOfflinePush \| null` | 发送时的离线推送配置。 | -| `content`、`attachedInfo` | `string \| null` | SDK 序列化内容和附加信息。 | -| `ex` | `string \| null` | 随消息同步的扩展字符串。 | -| `localEx` | `string \| null` | 只保存在当前设备的扩展字符串。 | +| `offlinePush` | OpenIMOfflinePush | null | 发送时的离线推送配置。 | +| `content`、`attachedInfo` | string | null | SDK 序列化内容和附加信息。 | +| `ex` | string | null | 随消息同步的扩展字符串。 | +| `localEx` | string | null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx index 983bb94ea5..a3329eddfd 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' | `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 | | `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 | | `count` | `number` | 是 | 本次读取的消息数量。 | -| `lastMinSeq` | `number \| null` | 否 | 上一页返回的最小序号,用于连续分页。 | +| `lastMinSeq` | number | null | 否 | 上一页返回的最小序号,用于连续分页。 | ```uts import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx index 4e17c9c650..f51d241213 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -56,7 +56,7 @@ const result = await searchLocalMessages({ | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `conversationID` | `string \| null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | +| `conversationID` | string | null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | `keywordList` | `string[]` | 是 | 关键词列表。 | | `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | @@ -84,7 +84,7 @@ Promise 成功后,结果是 `OpenIMSearchMessageResult | null`: | `conversationID` | `string` | 结果所属会话 ID。 | | `conversationType` | `OpenIMSessionType` | 会话类型。 | | `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 | -| `latestMsgSendTime` | `number \| null` | 当前结果会话的最新消息时间。 | +| `latestMsgSendTime` | number | null | 当前结果会话的最新消息时间。 | | `messageCount` | `number` | 当前结果项的匹配消息数量。 | | `messageList` | `OpenIMMessageItem[]` | 匹配消息。 | diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx index a81ffe3182..523bcf50ad 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -13,8 +13,8 @@ sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' | `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | -| `offlinePushInfo` | `OpenIMOfflinePush \| null` | 否 | 离线推送标题、描述和平台配置。 | -| `isOnlineOnly` | `boolean \| null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | +| `offlinePushInfo` | OpenIMOfflinePush | null | 否 | 离线推送标题、描述和平台配置。 | +| `isOnlineOnly` | boolean | null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | ```uts import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 419d2dfc68..639dd3e05a 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4733,7 +4733,7 @@ "description": "创建群资料并设置初始成员与管理员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group create-group", - "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupInfo.groupName | string | 是 | 群名称。 | | groupInfo.groupType | 2 | 是 | 当前合同支持的群类型固定为 2 。 | | groupInfo.notification | string \\| null | 否 | 初始群公告。 | | groupInfo.introduction | string \\| null | 否 | 群简介。 | | groupInfo.faceURL | string \\| null | 否 | 群头像 URL。 | | groupInfo.ex | string \\| null | 否 | 群扩展字符串,完整写入。 | | memberUserIDs | string | 是 | 初始普通成员用户 ID。 | | adminUserIDs | string \\| null | 否 | 初始管理员用户 ID。 | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。 ex 不会自动合并 JSON。 返回结果 Promise 成功直接返回 OpenIMGroupItem | null 。非空结果可以按 groupID 合入群组 store;返回 null 时不要创建仅本地群。 Promise 成功只表示创建请求完成。群列表最终通过 onJoinedGroupAdded 、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。" + "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupInfo.groupName | string | 是 | 群名称。 | | groupInfo.groupType | 2 | 是 | 当前合同支持的群类型固定为 2 。 | | groupInfo.notification | string & 124; null | 否 | 初始群公告。 | | groupInfo.introduction | string & 124; null | 否 | 群简介。 | | groupInfo.faceURL | string & 124; null | 否 | 群头像 URL。 | | groupInfo.ex | string & 124; null | 否 | 群扩展字符串,完整写入。 | | memberUserIDs | string | 是 | 初始普通成员用户 ID。 | | adminUserIDs | string & 124; null | 否 | 初始管理员用户 ID。 | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。 ex 不会自动合并 JSON。 返回结果 Promise 成功直接返回 OpenIMGroupItem | null 。非空结果可以按 groupID 合入群组 store;返回 null 时不要创建仅本地群。 Promise 成功只表示创建请求完成。群列表最终通过 onJoinedGroupAdded 、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。" }, { "path": "/sdk/uniapp/group/update-group-profile", @@ -4741,7 +4741,7 @@ "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", - "content": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。 setGroupInfo 只更新本次提供的可选字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string \\| null | 否 | 新群名称。 | | introduction | string \\| null | 否 | 新群简介。 | | faceURL | string \\| null | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, 不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 onGroupInfoChanged 按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时调用 getSpecifiedGroupsInfo ,不要直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" + "content": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。 setGroupInfo 只更新本次提供的可选字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string & 124; null | 否 | 新群名称。 | | introduction | string & 124; null | 否 | 新群简介。 | | faceURL | string & 124; null | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, 不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 onGroupInfoChanged 按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时调用 getSpecifiedGroupsInfo ,不要直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" }, { "path": "/sdk/uniapp/group/set-group-announcement", @@ -4797,7 +4797,7 @@ "description": "向指定群发送加入申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group join-group", - "content": "joinGroup 提交入群申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要申请加入的群 ID。 | | reqMsg | string | 是 | 申请说明,可能向群主或管理员展示。 | | joinSource | number | 是 | 入群来源值,使用产品与服务端约定。 | | ex | string \\| null | 否 | 申请扩展字符串,只按已确认协议填写。 | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', 申请文案和 ex 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、 onJoinedGroupAdded 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。" + "content": "joinGroup 提交入群申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要申请加入的群 ID。 | | reqMsg | string | 是 | 申请说明,可能向群主或管理员展示。 | | joinSource | number | 是 | 入群来源值,使用产品与服务端约定。 | | ex | string & 124; null | 否 | 申请扩展字符串,只按已确认协议填写。 | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', 申请文案和 ex 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、 onJoinedGroupAdded 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。" }, { "path": "/sdk/uniapp/group/quit-group", @@ -4869,7 +4869,7 @@ "description": "分页查询当前账号发出的入群申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", - "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 参数说明 参数可省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次读取数量。 | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 返回结果 Promise 成功后,从 applications 读取当前账号发出的 OpenIMGroupApplicationItem 。字段含义见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。查询本身不会触发申请事件。 按 groupID:userID 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。" + "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 参数说明 参数可省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number & 124; null | 否 | 分页偏移量,首页传 0 。 | | count | number & 124; null | 否 | 本次读取数量。 | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 返回结果 Promise 成功后,从 applications 读取当前账号发出的 OpenIMGroupApplicationItem 。字段含义见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。查询本身不会触发申请事件。 按 groupID:userID 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。" }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", @@ -5021,7 +5021,7 @@ "description": "理解消息创建、发送、接收、历史、状态和进度事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message overview-message", - "content": "uni app / uni app x 插件使用 OpenIMMessageItem 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表; conversationID 确定所属会话, clientMsgID 定位具体消息。 消息处理流程 | 阶段 | 主要操作 | 说明 | | | | | | 创建 | 调用对应的 create Message | 返回待发送的 OpenIMMessageItem ,不会写入服务端或触发新消息事件。 | | 发送 | 调用 sendMessage 或 sendMessageNotOss | 单聊填写 recvID ,群聊填写 groupID ;另一个目标字段传空字符串。 | | 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 clientMsgID 幂等合并。 | | 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | | 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | 从原生完整路径创建的图片、音频、视频和文件消息,通过 sendMessage 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 create MessageByURL 创建消息,再通过 sendMessageNotOss 发送,避免重复上传。 OpenIMMessageItem 返回结构 | 字段 | 类型 | 说明 | | | | | | clientMsgID | string \\| null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | | serverMsgID | string \\| null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | sessionType | OpenIMSessionType | 消息所属会话类型。 | | sendID 、 recvID 、 groupID | string \\| null | 发送者及单聊/群聊路由字段。 | | contentType | OpenIMMessageType | 消息内容类型,决定读取哪个 elem。 | | createTime 、 sendTime | number | 创建和发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | OpenIMPlatform | 发送端平台。 | | senderNickname 、 senderFaceUrl | string \\| null | 发送者资料快照。 | | status | OpenIMMessageStatus | 当前发送状态。 | | isRead | boolean | 当前已读状态快照。 | | offlinePush | OpenIMOfflinePush \\| null | 发送时的离线推送配置。 | | content 、 attachedInfo | string \\| null | SDK 序列化内容和附加信息。 | | ex | string \\| null | 随消息同步的扩展字符串。 | | localEx | string \\| null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 contentType 对应的字段中:文本使用 textElem ,图片/音频/视频/文件使用 pictureElem 、 soundElem 、 videoElem 、 fileElem ,@ 与回复使用 atTextElem 、 quoteElem ,合并与自定义消息使用 mergeElem 、 customElem ,名片/位置/表情使用 cardElem 、 locationElem 、 faceElem ,高级文本、输入状态和通知分别使用 advancedTextElem 、 typingElem 、 notificationElem 。不要通过展示文本或数组位置判断消息类型。 conversationID 用于确定所属会话,但不是 OpenIMMessageItem 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 conversationID:clientMsgID 合并。 创建不同内容的消息 | 内容 | 页面 | 注意事项 | | | | | | 文本与 Markdown | 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 、 创建 Markdown 消息 /zh/sdk/uniapp/message/creating messages/create markdown message | Markdown 内容需要由接收端安全渲染。 | | 群聊 @ 消息 | 创建 @ 消息 /zh/sdk/uniapp/message/creating messages/create text at message | 只能发送到群聊。 | | 图片、音频、视频和文件 | 使用完整路径创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message from full path 、 使用 URL 创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message by url | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | | 名片、位置与表情 | 创建名片消息 /zh/sdk/uniapp/message/creating messages/create card message 、 创建位置消息 /zh/sdk/uniapp/message/creating messages/create location message 、 创建表情消息 /zh/sdk/uniapp/message/creating messages/create face message | 创建时保存内容快照。 | | 回复、转发与合并 | 创建回复消息 /zh/sdk/uniapp/message/creating messages/create quote message 、 创建转发消息 /zh/sdk/uniapp/message/creating messages/create forward message 、 创建合并消息 /zh/sdk/uniapp/message/creating messages/create merger message | 创建结果仍需显式发送。 | | 自定义业务内容 | 创建自定义消息 /zh/sdk/uniapp/message/creating messages/create custom message | 接收端必须校验业务 schema。 | 只影响当前客户端展示的状态应写入 localEx ,不要放入需要同步给其他用户的业务内容,见 设置消息本地扩展 /zh/sdk/uniapp/message/managing messages/set message local ex 。 进度事件 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 removeProgressListeners 。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。 按任务查找页面 | 任务 | 页面 | | | | | 发送普通消息或已上传媒体 | 发送消息 /zh/sdk/uniapp/message/sending messages/send message 、 发送已上传的媒体消息 /zh/sdk/uniapp/message/sending messages/send message not oss | | 接收在线、离线和只在线消息 | 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages | | 加载历史或读取消息上下文 | 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 、 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context | | 按 ID 定位或搜索本地消息 | 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 、 搜索消息 /zh/sdk/uniapp/message/searching messages/search messages | | 删除、撤回、修改或置顶 | 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 、 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 、 置顶消息 /zh/sdk/uniapp/message/managing messages/set message pinned | | 群聊成员级已读 | 上报群消息已读 /zh/sdk/uniapp/message/managing read status/send group read receipts 、 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers | | 输入状态或语音识别 | 上报输入状态 /zh/sdk/uniapp/message/composing messages/update typing status 、 识别音频文字 /zh/sdk/uniapp/message/composing messages/transcribe audio | 状态同步边界 新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 、 维护总未读数 /zh/sdk/uniapp/conversation/managing conversations/get total unread count 和 获取会话列表 /zh/sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 中的事件处理器维护。" + "content": "uni app / uni app x 插件使用 OpenIMMessageItem 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表; conversationID 确定所属会话, clientMsgID 定位具体消息。 消息处理流程 | 阶段 | 主要操作 | 说明 | | | | | | 创建 | 调用对应的 create Message | 返回待发送的 OpenIMMessageItem ,不会写入服务端或触发新消息事件。 | | 发送 | 调用 sendMessage 或 sendMessageNotOss | 单聊填写 recvID ,群聊填写 groupID ;另一个目标字段传空字符串。 | | 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 clientMsgID 幂等合并。 | | 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | | 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | 从原生完整路径创建的图片、音频、视频和文件消息,通过 sendMessage 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 create MessageByURL 创建消息,再通过 sendMessageNotOss 发送,避免重复上传。 OpenIMMessageItem 返回结构 | 字段 | 类型 | 说明 | | | | | | clientMsgID | string & 124; null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | | serverMsgID | string & 124; null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | sessionType | OpenIMSessionType | 消息所属会话类型。 | | sendID 、 recvID 、 groupID | string & 124; null | 发送者及单聊/群聊路由字段。 | | contentType | OpenIMMessageType | 消息内容类型,决定读取哪个 elem。 | | createTime 、 sendTime | number | 创建和发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | OpenIMPlatform | 发送端平台。 | | senderNickname 、 senderFaceUrl | string & 124; null | 发送者资料快照。 | | status | OpenIMMessageStatus | 当前发送状态。 | | isRead | boolean | 当前已读状态快照。 | | offlinePush | OpenIMOfflinePush & 124; null | 发送时的离线推送配置。 | | content 、 attachedInfo | string & 124; null | SDK 序列化内容和附加信息。 | | ex | string & 124; null | 随消息同步的扩展字符串。 | | localEx | string & 124; null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 contentType 对应的字段中:文本使用 textElem ,图片/音频/视频/文件使用 pictureElem 、 soundElem 、 videoElem 、 fileElem ,@ 与回复使用 atTextElem 、 quoteElem ,合并与自定义消息使用 mergeElem 、 customElem ,名片/位置/表情使用 cardElem 、 locationElem 、 faceElem ,高级文本、输入状态和通知分别使用 advancedTextElem 、 typingElem 、 notificationElem 。不要通过展示文本或数组位置判断消息类型。 conversationID 用于确定所属会话,但不是 OpenIMMessageItem 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 conversationID:clientMsgID 合并。 创建不同内容的消息 | 内容 | 页面 | 注意事项 | | | | | | 文本与 Markdown | 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 、 创建 Markdown 消息 /zh/sdk/uniapp/message/creating messages/create markdown message | Markdown 内容需要由接收端安全渲染。 | | 群聊 @ 消息 | 创建 @ 消息 /zh/sdk/uniapp/message/creating messages/create text at message | 只能发送到群聊。 | | 图片、音频、视频和文件 | 使用完整路径创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message from full path 、 使用 URL 创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message by url | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | | 名片、位置与表情 | 创建名片消息 /zh/sdk/uniapp/message/creating messages/create card message 、 创建位置消息 /zh/sdk/uniapp/message/creating messages/create location message 、 创建表情消息 /zh/sdk/uniapp/message/creating messages/create face message | 创建时保存内容快照。 | | 回复、转发与合并 | 创建回复消息 /zh/sdk/uniapp/message/creating messages/create quote message 、 创建转发消息 /zh/sdk/uniapp/message/creating messages/create forward message 、 创建合并消息 /zh/sdk/uniapp/message/creating messages/create merger message | 创建结果仍需显式发送。 | | 自定义业务内容 | 创建自定义消息 /zh/sdk/uniapp/message/creating messages/create custom message | 接收端必须校验业务 schema。 | 只影响当前客户端展示的状态应写入 localEx ,不要放入需要同步给其他用户的业务内容,见 设置消息本地扩展 /zh/sdk/uniapp/message/managing messages/set message local ex 。 进度事件 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 removeProgressListeners 。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。 按任务查找页面 | 任务 | 页面 | | | | | 发送普通消息或已上传媒体 | 发送消息 /zh/sdk/uniapp/message/sending messages/send message 、 发送已上传的媒体消息 /zh/sdk/uniapp/message/sending messages/send message not oss | | 接收在线、离线和只在线消息 | 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages | | 加载历史或读取消息上下文 | 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 、 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context | | 按 ID 定位或搜索本地消息 | 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 、 搜索消息 /zh/sdk/uniapp/message/searching messages/search messages | | 删除、撤回、修改或置顶 | 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 、 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 、 置顶消息 /zh/sdk/uniapp/message/managing messages/set message pinned | | 群聊成员级已读 | 上报群消息已读 /zh/sdk/uniapp/message/managing read status/send group read receipts 、 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers | | 输入状态或语音识别 | 上报输入状态 /zh/sdk/uniapp/message/composing messages/update typing status 、 识别音频文字 /zh/sdk/uniapp/message/composing messages/transcribe audio | 状态同步边界 新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 、 维护总未读数 /zh/sdk/uniapp/conversation/managing conversations/get total unread count 和 获取会话列表 /zh/sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 中的事件处理器维护。" }, { "path": "/sdk/uniapp/message/creating-messages/create-text-message", @@ -5037,7 +5037,7 @@ "description": "在群聊中创建带 @ 用户信息的文本消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", - "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 消息正文;建议使用稳定的 @userID 标记。 | | atUserIDList | string | 是 | 被提及用户 ID;@ 全体时先调用 getAtAllTag 获取专用标记。 | | atUsersInfo | OpenIMAtUsersInfoItem \\| null | 否 | 用户 ID 与群内展示名信息。 | | quoteMessage | OpenIMMessageItem \\| null | 否 | 被引用的原消息。 | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , Promise 成功只返回待发送的 OpenIMMessageItem | null 。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。 atUserIDList 与 atUsersInfo 中的用户应保持一致。 提及全体成员 不要在业务代码中写死全体成员标记。商业版先调用 getAtAllTag 商业版 取得当前标记,再将它同时放入正文和 atUserIDList : import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag 请查看群公告 , atUserIDList: atAllTag , getAtAllTag 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 消息正文;建议使用稳定的 @userID 标记。 | | atUserIDList | string | 是 | 被提及用户 ID;@ 全体时先调用 getAtAllTag 获取专用标记。 | | atUsersInfo | OpenIMAtUsersInfoItem & 124; null | 否 | 用户 ID 与群内展示名信息。 | | quoteMessage | OpenIMMessageItem & 124; null | 否 | 被引用的原消息。 | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , Promise 成功只返回待发送的 OpenIMMessageItem | null 。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。 atUserIDList 与 atUsersInfo 中的用户应保持一致。 提及全体成员 不要在业务代码中写死全体成员标记。商业版先调用 getAtAllTag 商业版 取得当前标记,再将它同时放入正文和 atUserIDList : import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag 请查看群公告 , atUserIDList: atAllTag , getAtAllTag 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。" }, { "path": "/sdk/uniapp/message/creating-messages/create-custom-message", @@ -5061,7 +5061,7 @@ "description": "使用已上传图片的 elem 信息创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", - "content": "createImageMessageByURL 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 参数说明 | 参数 | 类型 | 说明 | | | | | | sourcePicture | OpenIMPicture \\| null | 原图信息。 | | bigPicture | OpenIMPicture \\| null | 大图信息。 | | snapshotPicture | OpenIMPicture \\| null | 缩略图信息。 | | sourcePath | string \\| null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段: uuid 、 type 、 size 、 width 、 height 和 url ,均为可选值;创建完整可展示消息时应填写真实上传结果。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 sendMessageNotOss 。" + "content": "createImageMessageByURL 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 参数说明 | 参数 | 类型 | 说明 | | | | | | sourcePicture | OpenIMPicture & 124; null | 原图信息。 | | bigPicture | OpenIMPicture & 124; null | 大图信息。 | | snapshotPicture | OpenIMPicture & 124; null | 缩略图信息。 | | sourcePath | string & 124; null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段: uuid 、 type 、 size 、 width 、 height 和 url ,均为可选值;创建完整可展示消息时应填写真实上传结果。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", @@ -5077,7 +5077,7 @@ "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", - "content": "createSoundMessageByURL 使用已经上传的音频信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | uuid | string \\| null | 音频资源的唯一标识。 | | soundPath | string \\| null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | sourceUrl | string \\| null | 已上传音频的可访问地址。 | | dataSize | number \\| null | 音频大小,单位为字节。 | | duration | number \\| null | 音频时长,单位按服务端协议约定。 | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 OpenIMSoundElem 不包含 Wasm 版的 soundType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" + "content": "createSoundMessageByURL 使用已经上传的音频信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | uuid | string & 124; null | 音频资源的唯一标识。 | | soundPath | string & 124; null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | sourceUrl | string & 124; null | 已上传音频的可访问地址。 | | dataSize | number & 124; null | 音频大小,单位为字节。 | | duration | number & 124; null | 音频时长,单位按服务端协议约定。 | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 OpenIMSoundElem 不包含 Wasm 版的 soundType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", @@ -5093,7 +5093,7 @@ "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", - "content": "createVideoMessageByURL 使用已经上传的视频和快照信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | videoPath | string \\| null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | duration | number \\| null | 视频时长。 | | videoType | string \\| null | 视频 MIME 类型。 | | videoUUID | string \\| null | 视频资源的唯一标识。 | | videoUrl | string \\| null | 已上传视频的可访问地址。 | | videoSize | number \\| null | 视频大小,单位为字节。 | | snapshotPath | string \\| null | 快照文件的本地名称或业务路径。 | | snapshotUUID | string \\| null | 快照资源的唯一标识。 | | snapshotSize | number \\| null | 快照大小,单位为字节。 | | snapshotUrl | string \\| null | 已上传快照的可访问地址。 | | snapshotWidth | number \\| null | 快照宽度,单位为像素。 | | snapshotHeight | number \\| null | 快照高度,单位为像素。 | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, 视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 OpenIMVideoElem 不包含 Wasm 版的 snapShotType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" + "content": "createVideoMessageByURL 使用已经上传的视频和快照信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | videoPath | string & 124; null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | duration | number & 124; null | 视频时长。 | | videoType | string & 124; null | 视频 MIME 类型。 | | videoUUID | string & 124; null | 视频资源的唯一标识。 | | videoUrl | string & 124; null | 已上传视频的可访问地址。 | | videoSize | number & 124; null | 视频大小,单位为字节。 | | snapshotPath | string & 124; null | 快照文件的本地名称或业务路径。 | | snapshotUUID | string & 124; null | 快照资源的唯一标识。 | | snapshotSize | number & 124; null | 快照大小,单位为字节。 | | snapshotUrl | string & 124; null | 已上传快照的可访问地址。 | | snapshotWidth | number & 124; null | 快照宽度,单位为像素。 | | snapshotHeight | number & 124; null | 快照高度,单位为像素。 | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, 视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 OpenIMVideoElem 不包含 Wasm 版的 snapShotType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", @@ -5109,7 +5109,7 @@ "description": "使用已上传文件的 OpenIMFileElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", - "content": "createFileMessageByURL 使用已经上传的文件信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | filePath | string \\| null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | | fileName | string \\| null | 对外展示的文件名。 | | uuid | string \\| null | 文件资源的唯一标识。 | | sourceUrl | string \\| null | 已上传文件的可访问地址。 | | fileSize | number \\| null | 文件大小,单位为字节。 | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, 文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 OpenIMFileElem 不包含 Wasm 版的 fileType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null 。由于资源已经上传,发送时使用 sendMessageNotOss 。" + "content": "createFileMessageByURL 使用已经上传的文件信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | filePath | string & 124; null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | | fileName | string & 124; null | 对外展示的文件名。 | | uuid | string & 124; null | 文件资源的唯一标识。 | | sourceUrl | string & 124; null | 已上传文件的可访问地址。 | | fileSize | number & 124; null | 文件大小,单位为字节。 | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, 文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 OpenIMFileElem 不包含 Wasm 版的 fileType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null 。由于资源已经上传,发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-card-message", @@ -5117,7 +5117,7 @@ "description": "使用 OpenIMCardElem 创建用户名片消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", - "content": "参数说明 createCardMessage 接收 OpenIMCardElem 。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: | 参数 | 类型 | 建议 | 说明 | | | | | | | userID | string \\| null | 必填 | 名片对应的用户 ID。 | | nickname | string \\| null | 必填 | 名片中保存的展示名称。 | | faceURL | string \\| null | 必填 | 名片中保存的头像地址。 | | ex | string \\| null | 必填 | 名片扩展信息;没有内容时传空字符串。 | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', Promise 成功只创建 OpenIMMessageItem | null ,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 userID 查询最新资料,也不要把名片字段当作可信身份认证。" + "content": "参数说明 createCardMessage 接收 OpenIMCardElem 。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: | 参数 | 类型 | 建议 | 说明 | | | | | | | userID | string & 124; null | 必填 | 名片对应的用户 ID。 | | nickname | string & 124; null | 必填 | 名片中保存的展示名称。 | | faceURL | string & 124; null | 必填 | 名片中保存的头像地址。 | | ex | string & 124; null | 必填 | 名片扩展信息;没有内容时传空字符串。 | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', Promise 成功只创建 OpenIMMessageItem | null ,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 userID 查询最新资料,也不要把名片字段当作可信身份认证。" }, { "path": "/sdk/uniapp/message/creating-messages/create-location-message", @@ -5181,7 +5181,7 @@ "description": "发送已经准备好远端资源信息的消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", - "content": "sendMessageNotOss 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | | offlinePushInfo | OpenIMOfflinePush \\| null | 否 | 离线推送标题、描述和平台配置。 | | isOnlineOnly | boolean \\| null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, 资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 OpenIMMessageItem ,应用按 clientMsgID 合并返回对象;字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 sendMessage 。" + "content": "sendMessageNotOss 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | | offlinePushInfo | OpenIMOfflinePush & 124; null | 否 | 离线推送标题、描述和平台配置。 | | isOnlineOnly | boolean & 124; null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, 资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 OpenIMMessageItem ,应用按 clientMsgID 合并返回对象;字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 sendMessage 。" }, { "path": "/sdk/uniapp/message/receiving-messages/receive-messages", @@ -5205,7 +5205,7 @@ "description": "按会话和 clientMsgID 游标读取历史消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", - "content": "聊天页面进入会话时使用公共入口 getAdvancedHistoryMessageList 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 clientMsgID 作为下一页游标。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | lastMinSeq | number \\| null | 否 | 上一页返回的最小序号,用于连续分页。 | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, 返回结果 Promise 成功后,结果是 OpenIMAdvancedHistoryMessageListResult | null : | 字段 | 类型 | 说明 | | | | | | messageList | OpenIMMessageItem | 当前页消息。 | | lastMinSeq | number | 继续读取时传回的最小序号。 | | isEnd | boolean | 是否到达当前加载方向的历史边界。 | | errCode | number | 历史读取结果状态码。 | | errMsg | string | 与状态码对应的说明。 | 只有 errCode 表示成功时才合并 messageList ;Promise 被拒绝时仍按通用错误处理。按 conversationID 限定列表,并以 clientMsgID 去重;查询不会触发新消息事件。 商业版 getHistoryMessageList 商业版 额外要求 isReverse ,并支持可选 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" + "content": "聊天页面进入会话时使用公共入口 getAdvancedHistoryMessageList 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 clientMsgID 作为下一页游标。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | lastMinSeq | number & 124; null | 否 | 上一页返回的最小序号,用于连续分页。 | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, 返回结果 Promise 成功后,结果是 OpenIMAdvancedHistoryMessageListResult | null : | 字段 | 类型 | 说明 | | | | | | messageList | OpenIMMessageItem | 当前页消息。 | | lastMinSeq | number | 继续读取时传回的最小序号。 | | isEnd | boolean | 是否到达当前加载方向的历史边界。 | | errCode | number | 历史读取结果状态码。 | | errMsg | string | 与状态码对应的说明。 | 只有 errCode 表示成功时才合并 messageList ;Promise 被拒绝时仍按通用错误处理。按 conversationID 限定列表,并以 clientMsgID 去重;查询不会触发新消息事件。 商业版 getHistoryMessageList 商业版 额外要求 isReverse ,并支持可选 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" }, { "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", @@ -5229,7 +5229,7 @@ "description": "按关键词、发送者、类型和时间范围搜索消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", - "content": "searchLocalMessages 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 conversationID ,不是发送消息时使用的 groupID ;如果只保存了群 ID,先按 获取会话 ID /zh/sdk/uniapp/conversation/retrieving conversations/get conversation id 取得群会话 ID。 搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 conversationID 和 clientMsgID 返回客户端定位。 创建搜索查询 keywordList 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, 高级搜索 可以使用发送者、消息类型和时间窗口缩小范围。当前 OpenIMSearchLocalMessagesParams 除 conversationID 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 0 。 const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string \\| null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | keywordList | string | 是 | 关键词列表。 | | keywordListMatchType | number | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | senderUserIDList | string | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | | messageTypeList | OpenIMMessageType | 是 | 只搜索指定类型;不限制时传空数组。 | | searchTimePosition | number | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | | pageIndex | number | 是 | 搜索结果页码,第一页传 1 。 | | count | number | 是 | 每页返回数量。 | 如果搜索入口允许图片、文件或自定义消息,把相应 OpenIMMessageType 常量加入 messageTypeList 。匹配类型、时间单位和页码必须服从合同及服务端约定。 处理分页结果 Promise 成功后,结果是 OpenIMSearchMessageResult | null : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下匹配的消息总数。 | | searchResultItems | OpenIMSearchMessageResultItem | 按会话分组的搜索结果。 | 每个结果项包含: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 结果所属会话 ID。 | | conversationType | OpenIMSessionType | 会话类型。 | | showName 、 faceURL | string | 会话展示名称与头像快照。 | | latestMsgSendTime | number \\| null | 当前结果会话的最新消息时间。 | | messageCount | number | 当前结果项的匹配消息数量。 | | messageList | OpenIMMessageItem | 匹配消息。 | 可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message, return rows 分页时保持相同的会话、关键词和筛选条件,只递增 pageIndex 。用户修改任一条件时,把页码重置为 1 并清空旧结果。同一搜索页按 conversationID:clientMsgID 去重,不要按结果位置保存选中项。查询不会触发消息事件。 处理搜索结果变化 命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages 、 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 和 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message ;本页只负责查询和分页,不重复注册消息事件。 跳转时使用结果中的 conversationID 和 clientMsgID 定位。需要展示前后聊天记录时,把命中的完整 OpenIMMessageItem 作为起点读取 消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context ,不要用 findMessageList 拼接附近记录。 需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 相关页面 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" + "content": "searchLocalMessages 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 conversationID ,不是发送消息时使用的 groupID ;如果只保存了群 ID,先按 获取会话 ID /zh/sdk/uniapp/conversation/retrieving conversations/get conversation id 取得群会话 ID。 搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 conversationID 和 clientMsgID 返回客户端定位。 创建搜索查询 keywordList 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, 高级搜索 可以使用发送者、消息类型和时间窗口缩小范围。当前 OpenIMSearchLocalMessagesParams 除 conversationID 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 0 。 const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string & 124; null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | keywordList | string | 是 | 关键词列表。 | | keywordListMatchType | number | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | senderUserIDList | string | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | | messageTypeList | OpenIMMessageType | 是 | 只搜索指定类型;不限制时传空数组。 | | searchTimePosition | number | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | | pageIndex | number | 是 | 搜索结果页码,第一页传 1 。 | | count | number | 是 | 每页返回数量。 | 如果搜索入口允许图片、文件或自定义消息,把相应 OpenIMMessageType 常量加入 messageTypeList 。匹配类型、时间单位和页码必须服从合同及服务端约定。 处理分页结果 Promise 成功后,结果是 OpenIMSearchMessageResult | null : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下匹配的消息总数。 | | searchResultItems | OpenIMSearchMessageResultItem | 按会话分组的搜索结果。 | 每个结果项包含: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 结果所属会话 ID。 | | conversationType | OpenIMSessionType | 会话类型。 | | showName 、 faceURL | string | 会话展示名称与头像快照。 | | latestMsgSendTime | number & 124; null | 当前结果会话的最新消息时间。 | | messageCount | number | 当前结果项的匹配消息数量。 | | messageList | OpenIMMessageItem | 匹配消息。 | 可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message, return rows 分页时保持相同的会话、关键词和筛选条件,只递增 pageIndex 。用户修改任一条件时,把页码重置为 1 并清空旧结果。同一搜索页按 conversationID:clientMsgID 去重,不要按结果位置保存选中项。查询不会触发消息事件。 处理搜索结果变化 命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages 、 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 和 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message ;本页只负责查询和分页,不重复注册消息事件。 跳转时使用结果中的 conversationID 和 clientMsgID 定位。需要展示前后聊天记录时,把命中的完整 OpenIMMessageItem 作为起点读取 消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context ,不要用 findMessageList 拼接附近记录。 需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 相关页面 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/composing-messages/update-typing-status", @@ -5253,7 +5253,7 @@ "description": "商业版查询当前语音转写能力。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", - "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities Promise 成功后,结果是 OpenIMSpeechToTextCapabilitiesResult | null : | 字段 | 类型 | 说明 | | | | | | format | string \\| null | 支持的音频格式。 | | sampleRateHz | number \\| null | 支持的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number \\| null | 最大录音时长,单位为毫秒。 | | maxFileSize | number \\| null | 最大文件大小,单位为字节。 | | provider | string \\| null | 当前语音识别服务提供方。 | | requestType | string \\| null | 服务端要求的请求类型。 | | crossDomain | boolean \\| null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。" + "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities Promise 成功后,结果是 OpenIMSpeechToTextCapabilitiesResult | null : | 字段 | 类型 | 说明 | | | | | | format | string & 124; null | 支持的音频格式。 | | sampleRateHz | number & 124; null | 支持的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number & 124; null | 最大录音时长,单位为毫秒。 | | maxFileSize | number & 124; null | 最大文件大小,单位为字节。 | | provider | string & 124; null | 当前语音识别服务提供方。 | | requestType | string & 124; null | 服务端要求的请求类型。 | | crossDomain | boolean & 124; null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。" }, { "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", @@ -5397,7 +5397,7 @@ "description": "上传本地文件、观察进度,并在商业版取消上传。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", - "content": "uploadFile 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filepath | string | 是 | 原生层可读取的本地完整路径。 | | name | string | 是 | 文件名。 | | contentType | string | 是 | MIME 类型。 | | uuid | string | 是 | 业务为本次上传生成的稳定任务 ID。 | | cancelID | string \\| null | 否 | 用于取消本次上传的稳定 ID。 | | cause | string \\| null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 uploadFile 前注册进度事件,避免较小文件在监听建立前完成上传。 import off, onUploadFileProgress, uploadFile, from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription 路径必须是原生可读的完整路径。 unifile:// 先转换为平台沙盒路径;不要把网络 URL 作为 filepath 。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 返回结果 Promise 成功后,结果是 OpenIMUploadFileResult | null : | 字段 | 类型 | 说明 | | | | | | url | string \\| null | 上传后的远端资源 URL。 | | uri | string \\| null | 服务端返回的资源 URI。 | | uuid | string \\| null | 本次上传的任务标识。 | | size | number \\| null | 文件大小。 | | typ | number \\| null | 服务端返回的资源类型。 | | mediaID | string \\| null | 媒体资源 ID。 | 使用 result?.url 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 监听上传进度 onUploadFileProgress 返回 OpenIMSDKEventSubscription ,事件只包含 progress 。当前 uni app / uni app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 removeUploadListener 。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" + "content": "uploadFile 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filepath | string | 是 | 原生层可读取的本地完整路径。 | | name | string | 是 | 文件名。 | | contentType | string | 是 | MIME 类型。 | | uuid | string | 是 | 业务为本次上传生成的稳定任务 ID。 | | cancelID | string & 124; null | 否 | 用于取消本次上传的稳定 ID。 | | cause | string & 124; null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 uploadFile 前注册进度事件,避免较小文件在监听建立前完成上传。 import off, onUploadFileProgress, uploadFile, from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription 路径必须是原生可读的完整路径。 unifile:// 先转换为平台沙盒路径;不要把网络 URL 作为 filepath 。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 返回结果 Promise 成功后,结果是 OpenIMUploadFileResult | null : | 字段 | 类型 | 说明 | | | | | | url | string & 124; null | 上传后的远端资源 URL。 | | uri | string & 124; null | 服务端返回的资源 URI。 | | uuid | string & 124; null | 本次上传的任务标识。 | | size | number & 124; null | 文件大小。 | | typ | number & 124; null | 服务端返回的资源类型。 | | mediaID | string & 124; null | 媒体资源 ID。 | 使用 result?.url 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 监听上传进度 onUploadFileProgress 返回 OpenIMSDKEventSubscription ,事件只包含 progress 。当前 uni app / uni app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 removeUploadListener 。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" }, { "path": "/sdk/uniapp/calling/overview-calling", @@ -5413,7 +5413,7 @@ "description": "商业版向一个用户发起音频或视频邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", - "content": "signalingInvite 商业版 发起单聊通话。 unix openim sdk 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 当前登录用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | | invitation.groupID | string | 是 | 单聊固定传空字符串。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 单聊传 OpenIMSessionTypeSingle 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表;发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | | offlinePushInfo.title | string | 否 | 推送标题。 | | offlinePushInfo.desc | string | 否 | 推送正文。 | | offlinePushInfo.ex | string | 否 | 推送扩展字符串。 | | offlinePushInfo.iOSPushSound | string | 否 | iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 否 | 是否更新 iOS 角标。 | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: '视频通话', desc: '你收到一个视频通话邀请', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , iOS 端将 platformID 改为 OpenIMPlatformIOS 。房间 ID 应由业务生成并在本次通话各参与端保持一致。 返回结果 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 本次通话的媒体房间 ID。 | | token | string \\| null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | | liveURL | string \\| null | 媒体服务返回的房间连接地址。 | | busyLineUserIDList | string \\| null | 因忙线未能进入邀请流程的用户 ID。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 服务端返回的邀请快照。 | 取得有效的 token 和 roomID 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" + "content": "signalingInvite 商业版 发起单聊通话。 unix openim sdk 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 当前登录用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | | invitation.groupID | string | 是 | 单聊固定传空字符串。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 单聊传 OpenIMSessionTypeSingle 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表;发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | | offlinePushInfo.title | string | 否 | 推送标题。 | | offlinePushInfo.desc | string | 否 | 推送正文。 | | offlinePushInfo.ex | string | 否 | 推送扩展字符串。 | | offlinePushInfo.iOSPushSound | string | 否 | iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 否 | 是否更新 iOS 角标。 | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: '视频通话', desc: '你收到一个视频通话邀请', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , iOS 端将 platformID 改为 OpenIMPlatformIOS 。房间 ID 应由业务生成并在本次通话各参与端保持一致。 返回结果 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 本次通话的媒体房间 ID。 | | token | string & 124; null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | | liveURL | string & 124; null | 媒体服务返回的房间连接地址。 | | busyLineUserIDList | string & 124; null | 因忙线未能进入邀请流程的用户 ID。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 服务端返回的邀请快照。 | 取得有效的 token 和 roomID 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" }, { "path": "/sdk/uniapp/calling/managing-calls/start-group-call", @@ -5429,7 +5429,7 @@ "description": "商业版接受邀请并取得房间凭据。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", - "content": "从 onReceiveNewInvitation 取得原始 OpenIMSignalingInvitationInfo 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 signalingAccept : import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation invitation 必须保留收到的原始 roomID 、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 Promise 成功后, roomCredentials 是 OpenIMSignalingAcceptResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 本次通话的媒体房间 ID。 | | token | string \\| null | 加入媒体房间使用的短期凭据。 | | liveURL | string \\| null | 媒体服务返回的连接地址。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 token 和 roomID 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 继续合并。" + "content": "从 onReceiveNewInvitation 取得原始 OpenIMSignalingInvitationInfo 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 signalingAccept : import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation invitation 必须保留收到的原始 roomID 、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 Promise 成功后, roomCredentials 是 OpenIMSignalingAcceptResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 本次通话的媒体房间 ID。 | | token | string & 124; null | 加入媒体房间使用的短期凭据。 | | liveURL | string & 124; null | 媒体服务返回的连接地址。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 token 和 roomID 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 继续合并。" }, { "path": "/sdk/uniapp/calling/managing-calls/reject-call", @@ -5477,7 +5477,7 @@ "description": "商业版查询群当前关联的 roomID 与邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", - "content": "signalingGetRoomByGroupID 的参数是群组 ID,不是自定义 roomID : import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID 返回结果 Promise 成功后,结果是 OpenIMSignalingGetRoomByGroupIDResult | null 快照: | 字段 | 类型 | 说明 | | | | | | roomID | string \\| null | 当前群通话的房间 ID。 | | invitation | OpenIMSignalingInvitationInfo \\| null | 当前房间对应的原始邀请信息。 | 当前 uni app / uni app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 participant 字段。 空结果或空 roomID 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 signalingGetTokenByRoomID 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 groupID 调用本方法,再按返回或已保存的 roomID 合并通话状态。" + "content": "signalingGetRoomByGroupID 的参数是群组 ID,不是自定义 roomID : import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID 返回结果 Promise 成功后,结果是 OpenIMSignalingGetRoomByGroupIDResult | null 快照: | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 当前群通话的房间 ID。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 当前房间对应的原始邀请信息。 | 当前 uni app / uni app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 participant 字段。 空结果或空 roomID 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 signalingGetTokenByRoomID 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 groupID 调用本方法,再按返回或已保存的 roomID 合并通话状态。" }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index 04abc333e6..6aac2024b7 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -1686,7 +1686,7 @@ "title": "群组概览" }, "/sdk/uniapp/group/create-group": { - "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupInfo.groupName` | `string` | 是 | 群名称。 |\n| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 |\n| `groupInfo.notification` | `string \\| null` | 否 | 初始群公告。 |\n| `groupInfo.introduction` | `string \\| null` | 否 | 群简介。 |\n| `groupInfo.faceURL` | `string \\| null` | 否 | 群头像 URL。 |\n| `groupInfo.ex` | `string \\| null` | 否 | 群扩展字符串,完整写入。 |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 |\n| `adminUserIDs` | `string[] \\| null` | 否 | 初始管理员用户 ID。 |\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。\n\nPromise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。", + "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupInfo.groupName` | `string` | 是 | 群名称。 |\n| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 |\n| `groupInfo.notification` | string | null | 否 | 初始群公告。 |\n| `groupInfo.introduction` | string | null | 否 | 群简介。 |\n| `groupInfo.faceURL` | string | null | 否 | 群头像 URL。 |\n| `groupInfo.ex` | string | null | 否 | 群扩展字符串,完整写入。 |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 |\n| `adminUserIDs` | string[] | null | 否 | 初始管理员用户 ID。 |\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。\n\nPromise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。", "description": "创建群资料并设置初始成员与管理员。", "headings": [ { @@ -1704,7 +1704,7 @@ "title": "创建群组" }, "/sdk/uniapp/group/update-group-profile": { - "body": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | `string \\| null` | 否 | 新群名称。 |\n| `introduction` | `string \\| null` | 否 | 新群简介。 |\n| `faceURL` | `string \\| null` | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n})\n```\n\n不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。\n\nPromise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", + "body": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | string | null | 否 | 新群名称。 |\n| `introduction` | string | null | 否 | 新群简介。 |\n| `faceURL` | string | null | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n})\n```\n\n不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。\n\nPromise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", "headings": [ { @@ -1770,7 +1770,7 @@ "title": "开启或关闭全员禁言" }, "/sdk/uniapp/group/join-group": { - "body": "`joinGroup()` 提交入群申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要申请加入的群 ID。 |\n| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 |\n| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 |\n| `ex` | `string \\| null` | 否 | 申请扩展字符串,只按已确认协议填写。 |\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。\n\nPromise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。", + "body": "`joinGroup()` 提交入群申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要申请加入的群 ID。 |\n| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 |\n| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 |\n| `ex` | string | null | 否 | 申请扩展字符串,只按已确认协议填写。 |\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。\n\nPromise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。", "description": "向指定群发送加入申请。", "headings": [ { @@ -1887,7 +1887,7 @@ "title": "查询收到的入群申请" }, "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": { - "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n## 参数说明\n\n参数可省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次读取数量。 |\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n## 返回结果\n\nPromise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。\n\n按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。", + "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n## 参数说明\n\n参数可省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | number | null | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | number | null | 否 | 本次读取数量。 |\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n## 返回结果\n\nPromise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。\n\n按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。", "description": "分页查询当前账号发出的入群申请。", "headings": [ { @@ -2101,7 +2101,7 @@ "title": "检查群组 full-sync 状态" }, "/sdk/uniapp/message/overview-message": { - "body": "uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。\n\n接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。\n\n## 消息处理流程\n\n| 阶段 | 主要操作 | 说明 |\n| --- | --- | --- |\n| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 |\n| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 |\n| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 |\n| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 |\n| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 |\n\n从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。\n\n## OpenIMMessageItem 返回结构\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | `string \\| null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 |\n| `serverMsgID` | `string \\| null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 |\n| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 |\n| `sendID`、`recvID`、`groupID` | `string \\| null` | 发送者及单聊/群聊路由字段。 |\n| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 |\n| `createTime`、`sendTime` | `number` | 创建和发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 |\n| `senderNickname`、`senderFaceUrl` | `string \\| null` | 发送者资料快照。 |\n| `status` | `OpenIMMessageStatus` | 当前发送状态。 |\n| `isRead` | `boolean` | 当前已读状态快照。 |\n| `offlinePush` | `OpenIMOfflinePush \\| null` | 发送时的离线推送配置。 |\n| `content`、`attachedInfo` | `string \\| null` | SDK 序列化内容和附加信息。 |\n| `ex` | `string \\| null` | 随消息同步的扩展字符串。 |\n| `localEx` | `string \\| null` | 只保存在当前设备的扩展字符串。 |\n\n消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。\n\n`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。\n\n## 创建不同内容的消息\n\n| 内容 | 页面 | 注意事项 |\n| --- | --- | --- |\n| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 |\n| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 |\n| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 |\n| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 |\n| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 |\n| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 |\n\n只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。\n\n## 进度事件\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nfunction removeProgressListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) |\n| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) |\n| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) |\n| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) |\n| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) |\n| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) |\n\n## 状态同步边界\n\n新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。\n\n会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。", + "body": "uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。\n\n接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。\n\n## 消息处理流程\n\n| 阶段 | 主要操作 | 说明 |\n| --- | --- | --- |\n| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 |\n| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 |\n| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 |\n| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 |\n| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 |\n\n从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。\n\n## OpenIMMessageItem 返回结构\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | string | null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 |\n| `serverMsgID` | string | null | 服务端消息 ID;待发送或失败消息可能没有有效值。 |\n| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 |\n| `sendID`、`recvID`、`groupID` | string | null | 发送者及单聊/群聊路由字段。 |\n| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 |\n| `createTime`、`sendTime` | `number` | 创建和发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 |\n| `senderNickname`、`senderFaceUrl` | string | null | 发送者资料快照。 |\n| `status` | `OpenIMMessageStatus` | 当前发送状态。 |\n| `isRead` | `boolean` | 当前已读状态快照。 |\n| `offlinePush` | OpenIMOfflinePush | null | 发送时的离线推送配置。 |\n| `content`、`attachedInfo` | string | null | SDK 序列化内容和附加信息。 |\n| `ex` | string | null | 随消息同步的扩展字符串。 |\n| `localEx` | string | null | 只保存在当前设备的扩展字符串。 |\n\n消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。\n\n`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。\n\n## 创建不同内容的消息\n\n| 内容 | 页面 | 注意事项 |\n| --- | --- | --- |\n| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 |\n| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 |\n| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 |\n| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 |\n| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 |\n| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 |\n\n只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。\n\n## 进度事件\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nfunction removeProgressListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) |\n| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) |\n| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) |\n| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) |\n| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) |\n| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) |\n\n## 状态同步边界\n\n新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。\n\n会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。", "description": "理解消息创建、发送、接收、历史、状态和进度事件。", "headings": [ { @@ -2146,7 +2146,7 @@ "title": "创建文本消息" }, "/sdk/uniapp/message/creating-messages/create-text-at-message": { - "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 |\n| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 |\n| `atUsersInfo` | `OpenIMAtUsersInfoItem[] \\| null` | 否 | 用户 ID 与群内展示名信息。 |\n| `quoteMessage` | `OpenIMMessageItem \\| null` | 否 | 被引用的原消息。 |\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@user_a 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }],\n})\n```\n\nPromise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。\n\n## 提及全体成员\n\n不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`:\n\n```uts\nimport { getAtAllTag } from '@/uni_modules/unix-openim-sdk'\n\nconst atAllResult = await getAtAllTag()\nconst atAllTag = atAllResult?.tag\nif (atAllTag != null) {\n const message = await createTextAtMessage({\n text: `${atAllTag} 请查看群公告`,\n atUserIDList: [atAllTag],\n })\n}\n```\n\n`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 |\n| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 |\n| `atUsersInfo` | OpenIMAtUsersInfoItem[] | null | 否 | 用户 ID 与群内展示名信息。 |\n| `quoteMessage` | OpenIMMessageItem | null | 否 | 被引用的原消息。 |\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@user_a 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }],\n})\n```\n\nPromise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。\n\n## 提及全体成员\n\n不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`:\n\n```uts\nimport { getAtAllTag } from '@/uni_modules/unix-openim-sdk'\n\nconst atAllResult = await getAtAllTag()\nconst atAllTag = atAllResult?.tag\nif (atAllTag != null) {\n const message = await createTextAtMessage({\n text: `${atAllTag} 请查看群公告`,\n atUserIDList: [atAllTag],\n })\n}\n```\n\n`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。", "description": "在群聊中创建带 @ 用户信息的文本消息。", "headings": [ { @@ -2189,7 +2189,7 @@ "title": "从完整路径创建图片消息" }, "/sdk/uniapp/message/creating-messages/create-image-message-by-url": { - "body": "`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `sourcePicture` | `OpenIMPicture \\| null` | 原图信息。 |\n| `bigPicture` | `OpenIMPicture \\| null` | 大图信息。 |\n| `snapshotPicture` | `OpenIMPicture \\| null` | 缩略图信息。 |\n| `sourcePath` | `string \\| null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n\n三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst picture = {\n uuid: createBusinessUUID(),\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: uploaded.url,\n}\n\nconst message = await createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n})\n```\n\nURL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。", + "body": "`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `sourcePicture` | OpenIMPicture | null | 原图信息。 |\n| `bigPicture` | OpenIMPicture | null | 大图信息。 |\n| `snapshotPicture` | OpenIMPicture | null | 缩略图信息。 |\n| `sourcePath` | string | null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n\n三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst picture = {\n uuid: createBusinessUUID(),\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: uploaded.url,\n}\n\nconst message = await createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n})\n```\n\nURL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。", "description": "使用已上传图片的 elem 信息创建消息。", "headings": [ { @@ -2209,7 +2209,7 @@ "title": "从完整路径创建语音消息" }, "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": { - "body": "`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `uuid` | `string \\| null` | 音频资源的唯一标识。 |\n| `soundPath` | `string \\| null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | `string \\| null` | 已上传音频的可访问地址。 |\n| `dataSize` | `number \\| null` | 音频大小,单位为字节。 |\n| `duration` | `number \\| null` | 音频时长,单位按服务端协议约定。 |\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL({\n uuid: createBusinessUUID(),\n soundPath: '',\n sourceUrl: uploaded.url,\n dataSize: uploaded.size,\n duration,\n})\n```\n\nURL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", + "body": "`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `uuid` | string | null | 音频资源的唯一标识。 |\n| `soundPath` | string | null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | string | null | 已上传音频的可访问地址。 |\n| `dataSize` | number | null | 音频大小,单位为字节。 |\n| `duration` | number | null | 音频时长,单位按服务端协议约定。 |\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL({\n uuid: createBusinessUUID(),\n soundPath: '',\n sourceUrl: uploaded.url,\n dataSize: uploaded.size,\n duration,\n})\n```\n\nURL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", "headings": [ { @@ -2229,7 +2229,7 @@ "title": "从完整路径创建视频消息" }, "/sdk/uniapp/message/creating-messages/create-video-message-by-url": { - "body": "`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `videoPath` | `string \\| null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `duration` | `number \\| null` | 视频时长。 |\n| `videoType` | `string \\| null` | 视频 MIME 类型。 |\n| `videoUUID` | `string \\| null` | 视频资源的唯一标识。 |\n| `videoUrl` | `string \\| null` | 已上传视频的可访问地址。 |\n| `videoSize` | `number \\| null` | 视频大小,单位为字节。 |\n| `snapshotPath` | `string \\| null` | 快照文件的本地名称或业务路径。 |\n| `snapshotUUID` | `string \\| null` | 快照资源的唯一标识。 |\n| `snapshotSize` | `number \\| null` | 快照大小,单位为字节。 |\n| `snapshotUrl` | `string \\| null` | 已上传快照的可访问地址。 |\n| `snapshotWidth` | `number \\| null` | 快照宽度,单位为像素。 |\n| `snapshotHeight` | `number \\| null` | 快照高度,单位为像素。 |\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL({\n videoPath: '',\n duration,\n videoType: uploadedVideo.contentType,\n videoUUID: createBusinessUUID(),\n videoUrl: uploadedVideo.url,\n videoSize: uploadedVideo.size,\n snapshotPath: '',\n snapshotUUID: createBusinessUUID(),\n snapshotSize: uploadedSnapshot.size,\n snapshotUrl: uploadedSnapshot.url,\n snapshotWidth,\n snapshotHeight,\n})\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", + "body": "`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `videoPath` | string | null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `duration` | number | null | 视频时长。 |\n| `videoType` | string | null | 视频 MIME 类型。 |\n| `videoUUID` | string | null | 视频资源的唯一标识。 |\n| `videoUrl` | string | null | 已上传视频的可访问地址。 |\n| `videoSize` | number | null | 视频大小,单位为字节。 |\n| `snapshotPath` | string | null | 快照文件的本地名称或业务路径。 |\n| `snapshotUUID` | string | null | 快照资源的唯一标识。 |\n| `snapshotSize` | number | null | 快照大小,单位为字节。 |\n| `snapshotUrl` | string | null | 已上传快照的可访问地址。 |\n| `snapshotWidth` | number | null | 快照宽度,单位为像素。 |\n| `snapshotHeight` | number | null | 快照高度,单位为像素。 |\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL({\n videoPath: '',\n duration,\n videoType: uploadedVideo.contentType,\n videoUUID: createBusinessUUID(),\n videoUrl: uploadedVideo.url,\n videoSize: uploadedVideo.size,\n snapshotPath: '',\n snapshotUUID: createBusinessUUID(),\n snapshotSize: uploadedSnapshot.size,\n snapshotUrl: uploadedSnapshot.url,\n snapshotWidth,\n snapshotHeight,\n})\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", "headings": [ { @@ -2249,7 +2249,7 @@ "title": "从完整路径创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-file-message-by-url": { - "body": "`createFileMessageByURL()` 使用已经上传的文件信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `filePath` | `string \\| null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `fileName` | `string \\| null` | 对外展示的文件名。 |\n| `uuid` | `string \\| null` | 文件资源的唯一标识。 |\n| `sourceUrl` | `string \\| null` | 已上传文件的可访问地址。 |\n| `fileSize` | `number \\| null` | 文件大小,单位为字节。 |\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL({\n filePath: '',\n fileName: 'report.pdf',\n uuid: createBusinessUUID(),\n sourceUrl: uploaded.url,\n fileSize: uploaded.size,\n})\n```\n\n文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。", + "body": "`createFileMessageByURL()` 使用已经上传的文件信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `filePath` | string | null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `fileName` | string | null | 对外展示的文件名。 |\n| `uuid` | string | null | 文件资源的唯一标识。 |\n| `sourceUrl` | string | null | 已上传文件的可访问地址。 |\n| `fileSize` | number | null | 文件大小,单位为字节。 |\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL({\n filePath: '',\n fileName: 'report.pdf',\n uuid: createBusinessUUID(),\n sourceUrl: uploaded.url,\n fileSize: uploaded.size,\n})\n```\n\n文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。", "description": "使用已上传文件的 OpenIMFileElem 创建消息。", "headings": [ { @@ -2262,7 +2262,7 @@ "title": "从 URL 创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-card-message": { - "body": "## 参数说明\n\n`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照:\n\n| 参数 | 类型 | 建议 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | `string \\| null` | 必填 | 名片对应的用户 ID。 |\n| `nickname` | `string \\| null` | 必填 | 名片中保存的展示名称。 |\n| `faceURL` | `string \\| null` | 必填 | 名片中保存的头像地址。 |\n| `ex` | `string \\| null` | 必填 | 名片扩展信息;没有内容时传空字符串。 |\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alex',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n})\n```\n\nPromise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。", + "body": "## 参数说明\n\n`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照:\n\n| 参数 | 类型 | 建议 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | string | null | 必填 | 名片对应的用户 ID。 |\n| `nickname` | string | null | 必填 | 名片中保存的展示名称。 |\n| `faceURL` | string | null | 必填 | 名片中保存的头像地址。 |\n| `ex` | string | null | 必填 | 名片扩展信息;没有内容时传空字符串。 |\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alex',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n})\n```\n\nPromise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。", "description": "使用 OpenIMCardElem 创建用户名片消息。", "headings": [ { @@ -2342,7 +2342,7 @@ "title": "发送消息" }, "/sdk/uniapp/message/sending-messages/send-message-not-oss": { - "body": "`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 |\n| `offlinePushInfo` | `OpenIMOfflinePush \\| null` | 否 | 离线推送标题、描述和平台配置。 |\n| `isOnlineOnly` | `boolean \\| null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: urlMessage,\n})\n```\n\n资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。", + "body": "`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 |\n| `offlinePushInfo` | OpenIMOfflinePush | null | 否 | 离线推送标题、描述和平台配置。 |\n| `isOnlineOnly` | boolean | null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: urlMessage,\n})\n```\n\n资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。", "description": "发送已经准备好远端资源信息的消息。", "headings": [ { @@ -2405,7 +2405,7 @@ "title": "接收自定义业务与消息扩展事件" }, "/sdk/uniapp/message/retrieving-messages/load-older-messages": { - "body": "聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `lastMinSeq` | `number \\| null` | 否 | 上一页返回的最小序号,用于连续分页。 |\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n lastMinSeq,\n})\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 |\n| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 |\n| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 |\n| `errCode` | `number` | 历史读取结果状态码。 |\n| `errMsg` | `string` | 与状态码对应的说明。 |\n\n只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。\n\n商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", + "body": "聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `lastMinSeq` | number | null | 否 | 上一页返回的最小序号,用于连续分页。 |\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n lastMinSeq,\n})\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 |\n| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 |\n| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 |\n| `errCode` | `number` | 历史读取结果状态码。 |\n| `errMsg` | `string` | 与状态码对应的说明。 |\n\n只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。\n\n商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", "description": "按会话和 clientMsgID 游标读取历史消息。", "headings": [ { @@ -2449,7 +2449,7 @@ "title": "加载消息上下文" }, "/sdk/uniapp/message/searching-messages/search-messages": { - "body": "`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。\n\n搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。\n\n## 创建搜索查询\n\n`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。\n\n```uts\nimport {\n OpenIMMessageTypeAtText,\n OpenIMMessageTypeText,\n searchLocalMessages,\n type OpenIMMessageItem,\n type OpenIMSearchMessageResult,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: [keyword.trim()],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 20,\n})\n```\n\n## 高级搜索\n\n可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。\n\n```uts\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['release'],\n keywordListMatchType: 0,\n senderUserIDList: [senderUserID],\n messageTypeList: [OpenIMMessageTypeText],\n searchTimePosition,\n searchTimePeriod,\n pageIndex: 1,\n count: 20,\n})\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string \\| null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 |\n| `keywordList` | `string[]` | 是 | 关键词列表。 |\n| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 |\n| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 |\n| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 |\n| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 |\n| `count` | `number` | 是 | 每页返回数量。 |\n\n如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。\n\n## 处理分页结果\n\nPromise 成功后,结果是 `OpenIMSearchMessageResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下匹配的消息总数。 |\n| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 |\n\n每个结果项包含:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationID` | `string` | 结果所属会话 ID。 |\n| `conversationType` | `OpenIMSessionType` | 会话类型。 |\n| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 |\n| `latestMsgSendTime` | `number \\| null` | 当前结果会话的最新消息时间。 |\n| `messageCount` | `number` | 当前结果项的匹配消息数量。 |\n| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 |\n\n可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID:\n\n```uts\ntype SearchMessageRow = {\n conversationID : string\n clientMsgID : string\n message : OpenIMMessageItem\n}\n\nfunction toSearchRows(result : OpenIMSearchMessageResult) : Array {\n const rows : Array = []\n result.searchResultItems.forEach((item) => {\n item.messageList.forEach((message) => {\n const clientMsgID = message.clientMsgID\n if (clientMsgID != null) {\n rows.push({\n conversationID: item.conversationID,\n clientMsgID,\n message,\n })\n }\n })\n })\n return rows\n}\n```\n\n分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。\n\n## 处理搜索结果变化\n\n命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。\n\n跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。\n\n需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。\n\n## 相关页面\n\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", + "body": "`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。\n\n搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。\n\n## 创建搜索查询\n\n`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。\n\n```uts\nimport {\n OpenIMMessageTypeAtText,\n OpenIMMessageTypeText,\n searchLocalMessages,\n type OpenIMMessageItem,\n type OpenIMSearchMessageResult,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: [keyword.trim()],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 20,\n})\n```\n\n## 高级搜索\n\n可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。\n\n```uts\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['release'],\n keywordListMatchType: 0,\n senderUserIDList: [senderUserID],\n messageTypeList: [OpenIMMessageTypeText],\n searchTimePosition,\n searchTimePeriod,\n pageIndex: 1,\n count: 20,\n})\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | string | null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 |\n| `keywordList` | `string[]` | 是 | 关键词列表。 |\n| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 |\n| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 |\n| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 |\n| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 |\n| `count` | `number` | 是 | 每页返回数量。 |\n\n如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。\n\n## 处理分页结果\n\nPromise 成功后,结果是 `OpenIMSearchMessageResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下匹配的消息总数。 |\n| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 |\n\n每个结果项包含:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationID` | `string` | 结果所属会话 ID。 |\n| `conversationType` | `OpenIMSessionType` | 会话类型。 |\n| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 |\n| `latestMsgSendTime` | number | null | 当前结果会话的最新消息时间。 |\n| `messageCount` | `number` | 当前结果项的匹配消息数量。 |\n| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 |\n\n可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID:\n\n```uts\ntype SearchMessageRow = {\n conversationID : string\n clientMsgID : string\n message : OpenIMMessageItem\n}\n\nfunction toSearchRows(result : OpenIMSearchMessageResult) : Array {\n const rows : Array = []\n result.searchResultItems.forEach((item) => {\n item.messageList.forEach((message) => {\n const clientMsgID = message.clientMsgID\n if (clientMsgID != null) {\n rows.push({\n conversationID: item.conversationID,\n clientMsgID,\n message,\n })\n }\n })\n })\n return rows\n}\n```\n\n分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。\n\n## 处理搜索结果变化\n\n命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。\n\n跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。\n\n需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。\n\n## 相关页面\n\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", "description": "按关键词、发送者、类型和时间范围搜索消息。", "headings": [ { @@ -2501,7 +2501,7 @@ "title": "查询输入状态" }, "/sdk/uniapp/message/composing-messages/check-speech-to-text": { - "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\nPromise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | `string[] \\| null` | 支持的音频格式。 |\n| `sampleRateHz` | `number[] \\| null` | 支持的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | `number \\| null` | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | `number \\| null` | 最大文件大小,单位为字节。 |\n| `provider` | `string \\| null` | 当前语音识别服务提供方。 |\n| `requestType` | `string \\| null` | 服务端要求的请求类型。 |\n| `crossDomain` | `boolean \\| null` | 是否允许跨域处理。 |\n\n在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。", + "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\nPromise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | string[] | null | 支持的音频格式。 |\n| `sampleRateHz` | number[] | null | 支持的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | number | null | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | number | null | 最大文件大小,单位为字节。 |\n| `provider` | string | null | 当前语音识别服务提供方。 |\n| `requestType` | string | null | 服务端要求的请求类型。 |\n| `crossDomain` | boolean | null | 是否允许跨域处理。 |\n\n在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。", "description": "商业版查询当前语音转写能力。", "headings": [], "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", @@ -2710,7 +2710,7 @@ "title": "查询群消息已读成员" }, "/sdk/uniapp/file-uploads/upload-file": { - "body": "`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 |\n| `name` | `string` | 是 | 文件名。 |\n| `contentType` | `string` | 是 | MIME 类型。 |\n| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 |\n| `cancelID` | `string \\| null` | 否 | 用于取消本次上传的稳定 ID。 |\n| `cause` | `string \\| null` | 否 | 业务侧记录的上传用途或原因。 |\n\n如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。\n\n```uts\nimport {\n off,\n onUploadFileProgress,\n uploadFile,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst progressSubscription = onUploadFileProgress((event) => {\n if (event == null) return\n updateUploadProgress(event.progress)\n})\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n\nfunction removeUploadListener() {\n off(progressSubscription)\n}\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMUploadFileResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `url` | `string \\| null` | 上传后的远端资源 URL。 |\n| `uri` | `string \\| null` | 服务端返回的资源 URI。 |\n| `uuid` | `string \\| null` | 本次上传的任务标识。 |\n| `size` | `number \\| null` | 文件大小。 |\n| `typ` | `number \\| null` | 服务端返回的资源类型。 |\n| `mediaID` | `string \\| null` | 媒体资源 ID。 |\n\n使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。\n\n## 监听上传进度\n\n`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", + "body": "`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 |\n| `name` | `string` | 是 | 文件名。 |\n| `contentType` | `string` | 是 | MIME 类型。 |\n| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 |\n| `cancelID` | string | null | 否 | 用于取消本次上传的稳定 ID。 |\n| `cause` | string | null | 否 | 业务侧记录的上传用途或原因。 |\n\n如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。\n\n```uts\nimport {\n off,\n onUploadFileProgress,\n uploadFile,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst progressSubscription = onUploadFileProgress((event) => {\n if (event == null) return\n updateUploadProgress(event.progress)\n})\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n\nfunction removeUploadListener() {\n off(progressSubscription)\n}\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMUploadFileResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `url` | string | null | 上传后的远端资源 URL。 |\n| `uri` | string | null | 服务端返回的资源 URI。 |\n| `uuid` | string | null | 本次上传的任务标识。 |\n| `size` | number | null | 文件大小。 |\n| `typ` | number | null | 服务端返回的资源类型。 |\n| `mediaID` | string | null | 媒体资源 ID。 |\n\n使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。\n\n## 监听上传进度\n\n`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", "description": "上传本地文件、观察进度,并在商业版取消上传。", "headings": [ { @@ -2761,7 +2761,7 @@ "title": "音视频信令概览" }, "/sdk/uniapp/calling/managing-calls/start-single-call": { - "body": "`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 |\n| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 否 | 推送标题。 |\n| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 |\n| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeSingle,\n signalingInvite,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n customData: JSON.stringify({ source: 'contact-card' }),\n groupID: '',\n roomID: createBusinessRoomID(),\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeSingle,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo: {\n title: '视频通话',\n desc: '你收到一个视频通话邀请',\n ex: '',\n iOSPushSound: 'default',\n iOSBadgeCount: true,\n },\n})\n```\n\niOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。\n\n## 返回结果\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 本次通话的媒体房间 ID。 |\n| `token` | `string \\| null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 |\n| `liveURL` | `string \\| null` | 媒体服务返回的房间连接地址。 |\n| `busyLineUserIDList` | `string[] \\| null` | 因忙线未能进入邀请流程的用户 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 服务端返回的邀请快照。 |\n\n取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", + "body": "`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 |\n| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 否 | 推送标题。 |\n| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 |\n| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeSingle,\n signalingInvite,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n customData: JSON.stringify({ source: 'contact-card' }),\n groupID: '',\n roomID: createBusinessRoomID(),\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeSingle,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo: {\n title: '视频通话',\n desc: '你收到一个视频通话邀请',\n ex: '',\n iOSPushSound: 'default',\n iOSBadgeCount: true,\n },\n})\n```\n\niOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。\n\n## 返回结果\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 本次通话的媒体房间 ID。 |\n| `token` | string | null | 加入媒体房间使用的短期凭据,只应保存在内存中。 |\n| `liveURL` | string | null | 媒体服务返回的房间连接地址。 |\n| `busyLineUserIDList` | string[] | null | 因忙线未能进入邀请流程的用户 ID。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 |\n\n取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", "description": "商业版向一个用户发起音频或视频邀请。", "headings": [ { @@ -2792,7 +2792,7 @@ "title": "发起群通话" }, "/sdk/uniapp/calling/managing-calls/accept-call": { - "body": "从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`:\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingAccept({ invitation })\n```\n\n`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 本次通话的媒体房间 ID。 |\n| `token` | `string \\| null` | 加入媒体房间使用的短期凭据。 |\n| `liveURL` | `string \\| null` | 媒体服务返回的连接地址。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 服务端返回的邀请快照。 |\n\n这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。", + "body": "从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`:\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingAccept({ invitation })\n```\n\n`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 本次通话的媒体房间 ID。 |\n| `token` | string | null | 加入媒体房间使用的短期凭据。 |\n| `liveURL` | string | null | 媒体服务返回的连接地址。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 |\n\n这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。", "description": "商业版接受邀请并取得房间凭据。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", @@ -2840,7 +2840,7 @@ "title": "恢复启动时邀请" }, "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": { - "body": "`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`:\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst room = await signalingGetRoomByGroupID({ groupID })\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string \\| null` | 当前群通话的房间 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo \\| null` | 当前房间对应的原始邀请信息。 |\n\n当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。\n\n空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。", + "body": "`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`:\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst room = await signalingGetRoomByGroupID({ groupID })\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 当前群通话的房间 ID。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 当前房间对应的原始邀请信息。 |\n\n当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。\n\n空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。", "description": "商业版查询群当前关联的 roomID 与邀请。", "headings": [ { From f67e4a5ed994b9b8712782f3c3027d784602a7fa Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:39:46 +0800 Subject: [PATCH 13/20] docs(uniapp): render nullable table types safely --- .../calling/managing-calls/accept-call.mdx | 8 ++-- .../managing-calls/start-single-call.mdx | 10 ++--- .../get-room-by-group-id.mdx | 4 +- .../sdk/uniapp/file-uploads/upload-file.mdx | 16 ++++---- .../chat/sdk/uniapp/group/create-group.mdx | 10 ++--- ...et-group-application-list-as-applicant.mdx | 4 +- .../docs/chat/sdk/uniapp/group/join-group.mdx | 2 +- .../sdk/uniapp/group/update-group-profile.mdx | 6 +-- .../check-speech-to-text.mdx | 14 +++---- .../creating-messages/create-card-message.mdx | 8 ++-- .../create-file-message-by-url.mdx | 10 ++--- .../create-image-message-by-url.mdx | 8 ++-- .../create-sound-message-by-url.mdx | 10 ++--- .../create-text-at-message.mdx | 4 +- .../create-video-message-by-url.mdx | 24 ++++++------ .../sdk/uniapp/message/overview-message.mdx | 16 ++++---- .../load-older-messages.mdx | 2 +- .../searching-messages/search-messages.mdx | 4 +- .../sending-messages/send-message-not-oss.mdx | 4 +- src/generated/search-index-zh.json | 38 +++++++++---------- src/generated/uniapp-sdk-zh-content.json | 38 +++++++++---------- 21 files changed, 120 insertions(+), 120 deletions(-) diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx index 2fedc7bb3a..ecbeba8fcb 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -18,9 +18,9 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null` | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | string | null | 本次通话的媒体房间 ID。 | -| `token` | string | null | 加入媒体房间使用的短期凭据。 | -| `liveURL` | string | null | 媒体服务返回的连接地址。 | -| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 | +| `roomID` | `string` 或 `null` | 本次通话的媒体房间 ID。 | +| `token` | `string` 或 `null` | 加入媒体房间使用的短期凭据。 | +| `liveURL` | `string` 或 `null` | 媒体服务返回的连接地址。 | +| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx index f08333aaf2..1aa8a9d7b5 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -66,10 +66,10 @@ Promise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null` | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | string | null | 本次通话的媒体房间 ID。 | -| `token` | string | null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | -| `liveURL` | string | null | 媒体服务返回的房间连接地址。 | -| `busyLineUserIDList` | string[] | null | 因忙线未能进入邀请流程的用户 ID。 | -| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 | +| `roomID` | `string` 或 `null` | 本次通话的媒体房间 ID。 | +| `token` | `string` 或 `null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 | +| `liveURL` | `string` 或 `null` | 媒体服务返回的房间连接地址。 | +| `busyLineUserIDList` | `string[]` 或 `null` | 因忙线未能进入邀请流程的用户 ID。 | +| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 服务端返回的邀请快照。 | 取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。 diff --git a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx index 13c31988a7..df115d46ee 100644 --- a/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx +++ b/content/zh/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -18,8 +18,8 @@ Promise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快 | 字段 | 类型 | 说明 | | --- | --- | --- | -| `roomID` | string | null | 当前群通话的房间 ID。 | -| `invitation` | OpenIMSignalingInvitationInfo | null | 当前房间对应的原始邀请信息。 | +| `roomID` | `string` 或 `null` | 当前群通话的房间 ID。 | +| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 当前房间对应的原始邀请信息。 | 当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。 diff --git a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx index 824e23b54a..9cd32dbd35 100644 --- a/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx +++ b/content/zh/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -14,8 +14,8 @@ sourcePath: '/sdk/uniapp/file-uploads/upload-file' | `name` | `string` | 是 | 文件名。 | | `contentType` | `string` | 是 | MIME 类型。 | | `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 | -| `cancelID` | string | null | 否 | 用于取消本次上传的稳定 ID。 | -| `cause` | string | null | 否 | 业务侧记录的上传用途或原因。 | +| `cancelID` | `string` 或 `null` | 否 | 用于取消本次上传的稳定 ID。 | +| `cause` | `string` 或 `null` | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。 @@ -52,12 +52,12 @@ Promise 成功后,结果是 `OpenIMUploadFileResult | null`: | 字段 | 类型 | 说明 | | --- | --- | --- | -| `url` | string | null | 上传后的远端资源 URL。 | -| `uri` | string | null | 服务端返回的资源 URI。 | -| `uuid` | string | null | 本次上传的任务标识。 | -| `size` | number | null | 文件大小。 | -| `typ` | number | null | 服务端返回的资源类型。 | -| `mediaID` | string | null | 媒体资源 ID。 | +| `url` | `string` 或 `null` | 上传后的远端资源 URL。 | +| `uri` | `string` 或 `null` | 服务端返回的资源 URI。 | +| `uuid` | `string` 或 `null` | 本次上传的任务标识。 | +| `size` | `number` 或 `null` | 文件大小。 | +| `typ` | `number` 或 `null` | 服务端返回的资源类型。 | +| `mediaID` | `string` 或 `null` | 媒体资源 ID。 | 使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx index 1251d2b6cc..58974a65a6 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/create-group.mdx @@ -12,12 +12,12 @@ sourcePath: '/sdk/uniapp/group/create-group' | --- | --- | --- | --- | | `groupInfo.groupName` | `string` | 是 | 群名称。 | | `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 | -| `groupInfo.notification` | string | null | 否 | 初始群公告。 | -| `groupInfo.introduction` | string | null | 否 | 群简介。 | -| `groupInfo.faceURL` | string | null | 否 | 群头像 URL。 | -| `groupInfo.ex` | string | null | 否 | 群扩展字符串,完整写入。 | +| `groupInfo.notification` | `string` 或 `null` | 否 | 初始群公告。 | +| `groupInfo.introduction` | `string` 或 `null` | 否 | 群简介。 | +| `groupInfo.faceURL` | `string` 或 `null` | 否 | 群头像 URL。 | +| `groupInfo.ex` | `string` 或 `null` | 否 | 群扩展字符串,完整写入。 | | `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 | -| `adminUserIDs` | string[] | null | 否 | 初始管理员用户 ID。 | +| `adminUserIDs` | `string[]` 或 `null` | 否 | 初始管理员用户 ID。 | ```uts import { createGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx index ce22ce714b..dbe8d630ec 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -12,8 +12,8 @@ sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as- | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `offset` | number | null | 否 | 分页偏移量,首页传 `0`。 | -| `count` | number | null | 否 | 本次读取数量。 | +| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number` 或 `null` | 否 | 本次读取数量。 | ```uts import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx index d4940d72f0..cc9ef5b32a 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/join-group.mdx @@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/group/join-group' | `groupID` | `string` | 是 | 要申请加入的群 ID。 | | `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 | | `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 | -| `ex` | string | null | 否 | 申请扩展字符串,只按已确认协议填写。 | +| `ex` | `string` 或 `null` | 否 | 申请扩展字符串,只按已确认协议填写。 | ```uts import { joinGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx index 1eeb1199e6..fcdf9a4fb3 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -11,9 +11,9 @@ sourcePath: '/sdk/uniapp/group/update-group-profile' | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | | `groupID` | `string` | 是 | 要更新的群组 ID。 | -| `groupName` | string | null | 否 | 新群名称。 | -| `introduction` | string | null | 否 | 新群简介。 | -| `faceURL` | string | null | 否 | 新群头像地址。 | +| `groupName` | `string` 或 `null` | 否 | 新群名称。 | +| `introduction` | `string` 或 `null` | 否 | 新群简介。 | +| `faceURL` | `string` 或 `null` | 否 | 新群头像地址。 | 除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx index 26b5a4fa5c..31111e31c5 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -16,12 +16,12 @@ Promise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`: | 字段 | 类型 | 说明 | | --- | --- | --- | -| `format` | string[] | null | 支持的音频格式。 | -| `sampleRateHz` | number[] | null | 支持的音频采样率,单位为赫兹。 | -| `maxRecordTimeMs` | number | null | 最大录音时长,单位为毫秒。 | -| `maxFileSize` | number | null | 最大文件大小,单位为字节。 | -| `provider` | string | null | 当前语音识别服务提供方。 | -| `requestType` | string | null | 服务端要求的请求类型。 | -| `crossDomain` | boolean | null | 是否允许跨域处理。 | +| `format` | `string[]` 或 `null` | 支持的音频格式。 | +| `sampleRateHz` | `number[]` 或 `null` | 支持的音频采样率,单位为赫兹。 | +| `maxRecordTimeMs` | `number` 或 `null` | 最大录音时长,单位为毫秒。 | +| `maxFileSize` | `number` 或 `null` | 最大文件大小,单位为字节。 | +| `provider` | `string` 或 `null` | 当前语音识别服务提供方。 | +| `requestType` | `string` 或 `null` | 服务端要求的请求类型。 | +| `crossDomain` | `boolean` 或 `null` | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx index 2f85dd9756..68dc7ca9c6 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' | 参数 | 类型 | 建议 | 说明 | | --- | --- | --- | --- | -| `userID` | string | null | 必填 | 名片对应的用户 ID。 | -| `nickname` | string | null | 必填 | 名片中保存的展示名称。 | -| `faceURL` | string | null | 必填 | 名片中保存的头像地址。 | -| `ex` | string | null | 必填 | 名片扩展信息;没有内容时传空字符串。 | +| `userID` | `string` 或 `null` | 必填 | 名片对应的用户 ID。 | +| `nickname` | `string` 或 `null` | 必填 | 名片中保存的展示名称。 | +| `faceURL` | `string` 或 `null` | 必填 | 名片中保存的头像地址。 | +| `ex` | `string` 或 `null` | 必填 | 名片扩展信息;没有内容时传空字符串。 | ```uts import { createCardMessage } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx index 6b588521ff..97b0110b80 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -10,11 +10,11 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `filePath` | string | null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `fileName` | string | null | 对外展示的文件名。 | -| `uuid` | string | null | 文件资源的唯一标识。 | -| `sourceUrl` | string | null | 已上传文件的可访问地址。 | -| `fileSize` | number | null | 文件大小,单位为字节。 | +| `filePath` | `string` 或 `null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `fileName` | `string` 或 `null` | 对外展示的文件名。 | +| `uuid` | `string` 或 `null` | 文件资源的唯一标识。 | +| `sourceUrl` | `string` 或 `null` | 已上传文件的可访问地址。 | +| `fileSize` | `number` 或 `null` | 文件大小,单位为字节。 | ```uts import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx index 6a3f61b14b..136235f8b2 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `sourcePicture` | OpenIMPicture | null | 原图信息。 | -| `bigPicture` | OpenIMPicture | null | 大图信息。 | -| `snapshotPicture` | OpenIMPicture | null | 缩略图信息。 | -| `sourcePath` | string | null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `sourcePicture` | `OpenIMPicture` 或 `null` | 原图信息。 | +| `bigPicture` | `OpenIMPicture` 或 `null` | 大图信息。 | +| `snapshotPicture` | `OpenIMPicture` 或 `null` | 缩略图信息。 | +| `sourcePath` | `string` 或 `null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx index a15f5ba7b2..8e40921ddb 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -10,11 +10,11 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `uuid` | string | null | 音频资源的唯一标识。 | -| `soundPath` | string | null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `sourceUrl` | string | null | 已上传音频的可访问地址。 | -| `dataSize` | number | null | 音频大小,单位为字节。 | -| `duration` | number | null | 音频时长,单位按服务端协议约定。 | +| `uuid` | `string` 或 `null` | 音频资源的唯一标识。 | +| `soundPath` | `string` 或 `null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `sourceUrl` | `string` 或 `null` | 已上传音频的可访问地址。 | +| `dataSize` | `number` 或 `null` | 音频大小,单位为字节。 | +| `duration` | `number` 或 `null` | 音频时长,单位按服务端协议约定。 | ```uts import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx index 4572015abc..8427643d29 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -10,8 +10,8 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' | --- | --- | --- | --- | | `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 | | `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 | -| `atUsersInfo` | OpenIMAtUsersInfoItem[] | null | 否 | 用户 ID 与群内展示名信息。 | -| `quoteMessage` | OpenIMMessageItem | null | 否 | 被引用的原消息。 | +| `atUsersInfo` | `OpenIMAtUsersInfoItem[]` 或 `null` | 否 | 用户 ID 与群内展示名信息。 | +| `quoteMessage` | `OpenIMMessageItem` 或 `null` | 否 | 被引用的原消息。 | ```uts import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx index 8877e2719d..0f449ba0ab 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -10,18 +10,18 @@ sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' | 参数 | 类型 | 说明 | | --- | --- | --- | -| `videoPath` | string | null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | -| `duration` | number | null | 视频时长。 | -| `videoType` | string | null | 视频 MIME 类型。 | -| `videoUUID` | string | null | 视频资源的唯一标识。 | -| `videoUrl` | string | null | 已上传视频的可访问地址。 | -| `videoSize` | number | null | 视频大小,单位为字节。 | -| `snapshotPath` | string | null | 快照文件的本地名称或业务路径。 | -| `snapshotUUID` | string | null | 快照资源的唯一标识。 | -| `snapshotSize` | number | null | 快照大小,单位为字节。 | -| `snapshotUrl` | string | null | 已上传快照的可访问地址。 | -| `snapshotWidth` | number | null | 快照宽度,单位为像素。 | -| `snapshotHeight` | number | null | 快照高度,单位为像素。 | +| `videoPath` | `string` 或 `null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | +| `duration` | `number` 或 `null` | 视频时长。 | +| `videoType` | `string` 或 `null` | 视频 MIME 类型。 | +| `videoUUID` | `string` 或 `null` | 视频资源的唯一标识。 | +| `videoUrl` | `string` 或 `null` | 已上传视频的可访问地址。 | +| `videoSize` | `number` 或 `null` | 视频大小,单位为字节。 | +| `snapshotPath` | `string` 或 `null` | 快照文件的本地名称或业务路径。 | +| `snapshotUUID` | `string` 或 `null` | 快照资源的唯一标识。 | +| `snapshotSize` | `number` 或 `null` | 快照大小,单位为字节。 | +| `snapshotUrl` | `string` 或 `null` | 已上传快照的可访问地址。 | +| `snapshotWidth` | `number` 或 `null` | 快照宽度,单位为像素。 | +| `snapshotHeight` | `number` 或 `null` | 快照高度,单位为像素。 | ```uts import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx index 4f01ccbec7..1df8b517ff 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -24,21 +24,21 @@ uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送 | 字段 | 类型 | 说明 | | --- | --- | --- | -| `clientMsgID` | string | null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | -| `serverMsgID` | string | null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | +| `clientMsgID` | `string` 或 `null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | +| `serverMsgID` | `string` 或 `null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 | -| `sendID`、`recvID`、`groupID` | string | null | 发送者及单聊/群聊路由字段。 | +| `sendID`、`recvID`、`groupID` | `string` 或 `null` | 发送者及单聊/群聊路由字段。 | | `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 | | `createTime`、`sendTime` | `number` | 创建和发送时间。 | | `seq` | `number` | 服务端消息序号。 | | `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 | -| `senderNickname`、`senderFaceUrl` | string | null | 发送者资料快照。 | +| `senderNickname`、`senderFaceUrl` | `string` 或 `null` | 发送者资料快照。 | | `status` | `OpenIMMessageStatus` | 当前发送状态。 | | `isRead` | `boolean` | 当前已读状态快照。 | -| `offlinePush` | OpenIMOfflinePush | null | 发送时的离线推送配置。 | -| `content`、`attachedInfo` | string | null | SDK 序列化内容和附加信息。 | -| `ex` | string | null | 随消息同步的扩展字符串。 | -| `localEx` | string | null | 只保存在当前设备的扩展字符串。 | +| `offlinePush` | `OpenIMOfflinePush` 或 `null` | 发送时的离线推送配置。 | +| `content`、`attachedInfo` | `string` 或 `null` | SDK 序列化内容和附加信息。 | +| `ex` | `string` 或 `null` | 随消息同步的扩展字符串。 | +| `localEx` | `string` 或 `null` | 只保存在当前设备的扩展字符串。 | 消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。 diff --git a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx index a3329eddfd..11c3dc452e 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' | `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 | | `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 | | `count` | `number` | 是 | 本次读取的消息数量。 | -| `lastMinSeq` | number | null | 否 | 上一页返回的最小序号,用于连续分页。 | +| `lastMinSeq` | `number` 或 `null` | 否 | 上一页返回的最小序号,用于连续分页。 | ```uts import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx index f51d241213..065a3a2604 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -56,7 +56,7 @@ const result = await searchLocalMessages({ | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `conversationID` | string | null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | +| `conversationID` | `string` 或 `null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | `keywordList` | `string[]` | 是 | 关键词列表。 | | `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | @@ -84,7 +84,7 @@ Promise 成功后,结果是 `OpenIMSearchMessageResult | null`: | `conversationID` | `string` | 结果所属会话 ID。 | | `conversationType` | `OpenIMSessionType` | 会话类型。 | | `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 | -| `latestMsgSendTime` | number | null | 当前结果会话的最新消息时间。 | +| `latestMsgSendTime` | `number` 或 `null` | 当前结果会话的最新消息时间。 | | `messageCount` | `number` | 当前结果项的匹配消息数量。 | | `messageList` | `OpenIMMessageItem[]` | 匹配消息。 | diff --git a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx index 523bcf50ad..1357e05028 100644 --- a/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx +++ b/content/zh/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -13,8 +13,8 @@ sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' | `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | -| `offlinePushInfo` | OpenIMOfflinePush | null | 否 | 离线推送标题、描述和平台配置。 | -| `isOnlineOnly` | boolean | null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | +| `offlinePushInfo` | `OpenIMOfflinePush` 或 `null` | 否 | 离线推送标题、描述和平台配置。 | +| `isOnlineOnly` | `boolean` 或 `null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | ```uts import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 639dd3e05a..62eede030c 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4733,7 +4733,7 @@ "description": "创建群资料并设置初始成员与管理员。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group create-group", - "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupInfo.groupName | string | 是 | 群名称。 | | groupInfo.groupType | 2 | 是 | 当前合同支持的群类型固定为 2 。 | | groupInfo.notification | string & 124; null | 否 | 初始群公告。 | | groupInfo.introduction | string & 124; null | 否 | 群简介。 | | groupInfo.faceURL | string & 124; null | 否 | 群头像 URL。 | | groupInfo.ex | string & 124; null | 否 | 群扩展字符串,完整写入。 | | memberUserIDs | string | 是 | 初始普通成员用户 ID。 | | adminUserIDs | string & 124; null | 否 | 初始管理员用户 ID。 | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。 ex 不会自动合并 JSON。 返回结果 Promise 成功直接返回 OpenIMGroupItem | null 。非空结果可以按 groupID 合入群组 store;返回 null 时不要创建仅本地群。 Promise 成功只表示创建请求完成。群列表最终通过 onJoinedGroupAdded 、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。" + "content": "createGroup 接收群资料、初始成员和可选管理员,返回 OpenIMGroupItem | null 。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupInfo.groupName | string | 是 | 群名称。 | | groupInfo.groupType | 2 | 是 | 当前合同支持的群类型固定为 2 。 | | groupInfo.notification | string 或 null | 否 | 初始群公告。 | | groupInfo.introduction | string 或 null | 否 | 群简介。 | | groupInfo.faceURL | string 或 null | 否 | 群头像 URL。 | | groupInfo.ex | string 或 null | 否 | 群扩展字符串,完整写入。 | | memberUserIDs | string | 是 | 初始普通成员用户 ID。 | | adminUserIDs | string 或 null | 否 | 初始管理员用户 ID。 | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: '项目群', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , 成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。 ex 不会自动合并 JSON。 返回结果 Promise 成功直接返回 OpenIMGroupItem | null 。非空结果可以按 groupID 合入群组 store;返回 null 时不要创建仅本地群。 Promise 成功只表示创建请求完成。群列表最终通过 onJoinedGroupAdded 、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。" }, { "path": "/sdk/uniapp/group/update-group-profile", @@ -4741,7 +4741,7 @@ "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", - "content": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。 setGroupInfo 只更新本次提供的可选字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string & 124; null | 否 | 新群名称。 | | introduction | string & 124; null | 否 | 新群简介。 | | faceURL | string & 124; null | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, 不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 onGroupInfoChanged 按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时调用 getSpecifiedGroupsInfo ,不要直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" + "content": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。 setGroupInfo 只更新本次提供的可选字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要更新的群组 ID。 | | groupName | string 或 null | 否 | 新群名称。 | | introduction | string 或 null | 否 | 新群简介。 | | faceURL | string 或 null | 否 | 新群头像地址。 | 除 groupID 外,至少传入一个实际要修改的资料字段。未传字段保持原值。 import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, 不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。 Promise 成功表示 OpenIMServer 已完成请求。群资料变化通过 onGroupInfoChanged 按 groupID 合并;完整监听见 群组概览 /zh/sdk/uniapp/group/overview group 。需要立即校准时调用 getSpecifiedGroupsInfo ,不要直接覆盖未提交字段。 displayIsRead 商业版 是字段级扩展;公共服务端不支持时不要发送。" }, { "path": "/sdk/uniapp/group/set-group-announcement", @@ -4797,7 +4797,7 @@ "description": "向指定群发送加入申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group join-group", - "content": "joinGroup 提交入群申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要申请加入的群 ID。 | | reqMsg | string | 是 | 申请说明,可能向群主或管理员展示。 | | joinSource | number | 是 | 入群来源值,使用产品与服务端约定。 | | ex | string & 124; null | 否 | 申请扩展字符串,只按已确认协议填写。 | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', 申请文案和 ex 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、 onJoinedGroupAdded 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。" + "content": "joinGroup 提交入群申请。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | groupID | string | 是 | 要申请加入的群 ID。 | | reqMsg | string | 是 | 申请说明,可能向群主或管理员展示。 | | joinSource | number | 是 | 入群来源值,使用产品与服务端约定。 | | ex | string 或 null | 否 | 申请扩展字符串,只按已确认协议填写。 | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: '申请加入项目群', joinSource: 2, ex: '', 申请文案和 ex 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。 Promise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、 onJoinedGroupAdded 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。" }, { "path": "/sdk/uniapp/group/quit-group", @@ -4869,7 +4869,7 @@ "description": "分页查询当前账号发出的入群申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", - "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 参数说明 参数可省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number & 124; null | 否 | 分页偏移量,首页传 0 。 | | count | number & 124; null | 否 | 本次读取数量。 | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 返回结果 Promise 成功后,从 applications 读取当前账号发出的 OpenIMGroupApplicationItem 。字段含义见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。查询本身不会触发申请事件。 按 groupID:userID 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。" + "content": "getGroupApplicationListAsApplicant 返回 OpenIMGroupApplicationListResult | null 。 参数说明 参数可省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number 或 null | 否 | 分页偏移量,首页传 0 。 | | count | number 或 null | 否 | 本次读取数量。 | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 renderSentGroupApplications result?.applications ?? 返回结果 Promise 成功后,从 applications 读取当前账号发出的 OpenIMGroupApplicationItem 。字段含义见 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient 。查询本身不会触发申请事件。 按 groupID:userID 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。" }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", @@ -5021,7 +5021,7 @@ "description": "理解消息创建、发送、接收、历史、状态和进度事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message overview-message", - "content": "uni app / uni app x 插件使用 OpenIMMessageItem 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表; conversationID 确定所属会话, clientMsgID 定位具体消息。 消息处理流程 | 阶段 | 主要操作 | 说明 | | | | | | 创建 | 调用对应的 create Message | 返回待发送的 OpenIMMessageItem ,不会写入服务端或触发新消息事件。 | | 发送 | 调用 sendMessage 或 sendMessageNotOss | 单聊填写 recvID ,群聊填写 groupID ;另一个目标字段传空字符串。 | | 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 clientMsgID 幂等合并。 | | 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | | 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | 从原生完整路径创建的图片、音频、视频和文件消息,通过 sendMessage 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 create MessageByURL 创建消息,再通过 sendMessageNotOss 发送,避免重复上传。 OpenIMMessageItem 返回结构 | 字段 | 类型 | 说明 | | | | | | clientMsgID | string & 124; null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | | serverMsgID | string & 124; null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | sessionType | OpenIMSessionType | 消息所属会话类型。 | | sendID 、 recvID 、 groupID | string & 124; null | 发送者及单聊/群聊路由字段。 | | contentType | OpenIMMessageType | 消息内容类型,决定读取哪个 elem。 | | createTime 、 sendTime | number | 创建和发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | OpenIMPlatform | 发送端平台。 | | senderNickname 、 senderFaceUrl | string & 124; null | 发送者资料快照。 | | status | OpenIMMessageStatus | 当前发送状态。 | | isRead | boolean | 当前已读状态快照。 | | offlinePush | OpenIMOfflinePush & 124; null | 发送时的离线推送配置。 | | content 、 attachedInfo | string & 124; null | SDK 序列化内容和附加信息。 | | ex | string & 124; null | 随消息同步的扩展字符串。 | | localEx | string & 124; null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 contentType 对应的字段中:文本使用 textElem ,图片/音频/视频/文件使用 pictureElem 、 soundElem 、 videoElem 、 fileElem ,@ 与回复使用 atTextElem 、 quoteElem ,合并与自定义消息使用 mergeElem 、 customElem ,名片/位置/表情使用 cardElem 、 locationElem 、 faceElem ,高级文本、输入状态和通知分别使用 advancedTextElem 、 typingElem 、 notificationElem 。不要通过展示文本或数组位置判断消息类型。 conversationID 用于确定所属会话,但不是 OpenIMMessageItem 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 conversationID:clientMsgID 合并。 创建不同内容的消息 | 内容 | 页面 | 注意事项 | | | | | | 文本与 Markdown | 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 、 创建 Markdown 消息 /zh/sdk/uniapp/message/creating messages/create markdown message | Markdown 内容需要由接收端安全渲染。 | | 群聊 @ 消息 | 创建 @ 消息 /zh/sdk/uniapp/message/creating messages/create text at message | 只能发送到群聊。 | | 图片、音频、视频和文件 | 使用完整路径创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message from full path 、 使用 URL 创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message by url | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | | 名片、位置与表情 | 创建名片消息 /zh/sdk/uniapp/message/creating messages/create card message 、 创建位置消息 /zh/sdk/uniapp/message/creating messages/create location message 、 创建表情消息 /zh/sdk/uniapp/message/creating messages/create face message | 创建时保存内容快照。 | | 回复、转发与合并 | 创建回复消息 /zh/sdk/uniapp/message/creating messages/create quote message 、 创建转发消息 /zh/sdk/uniapp/message/creating messages/create forward message 、 创建合并消息 /zh/sdk/uniapp/message/creating messages/create merger message | 创建结果仍需显式发送。 | | 自定义业务内容 | 创建自定义消息 /zh/sdk/uniapp/message/creating messages/create custom message | 接收端必须校验业务 schema。 | 只影响当前客户端展示的状态应写入 localEx ,不要放入需要同步给其他用户的业务内容,见 设置消息本地扩展 /zh/sdk/uniapp/message/managing messages/set message local ex 。 进度事件 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 removeProgressListeners 。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。 按任务查找页面 | 任务 | 页面 | | | | | 发送普通消息或已上传媒体 | 发送消息 /zh/sdk/uniapp/message/sending messages/send message 、 发送已上传的媒体消息 /zh/sdk/uniapp/message/sending messages/send message not oss | | 接收在线、离线和只在线消息 | 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages | | 加载历史或读取消息上下文 | 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 、 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context | | 按 ID 定位或搜索本地消息 | 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 、 搜索消息 /zh/sdk/uniapp/message/searching messages/search messages | | 删除、撤回、修改或置顶 | 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 、 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 、 置顶消息 /zh/sdk/uniapp/message/managing messages/set message pinned | | 群聊成员级已读 | 上报群消息已读 /zh/sdk/uniapp/message/managing read status/send group read receipts 、 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers | | 输入状态或语音识别 | 上报输入状态 /zh/sdk/uniapp/message/composing messages/update typing status 、 识别音频文字 /zh/sdk/uniapp/message/composing messages/transcribe audio | 状态同步边界 新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 、 维护总未读数 /zh/sdk/uniapp/conversation/managing conversations/get total unread count 和 获取会话列表 /zh/sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 中的事件处理器维护。" + "content": "uni app / uni app x 插件使用 OpenIMMessageItem 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。 接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 conversationID:clientMsgID 组合键幂等合并发送结果、实时事件和历史列表; conversationID 确定所属会话, clientMsgID 定位具体消息。 消息处理流程 | 阶段 | 主要操作 | 说明 | | | | | | 创建 | 调用对应的 create Message | 返回待发送的 OpenIMMessageItem ,不会写入服务端或触发新消息事件。 | | 发送 | 调用 sendMessage 或 sendMessageNotOss | 单聊填写 recvID ,群聊填写 groupID ;另一个目标字段传空字符串。 | | 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 clientMsgID 幂等合并。 | | 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 | | 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 | 从原生完整路径创建的图片、音频、视频和文件消息,通过 sendMessage 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 create MessageByURL 创建消息,再通过 sendMessageNotOss 发送,避免重复上传。 OpenIMMessageItem 返回结构 | 字段 | 类型 | 说明 | | | | | | clientMsgID | string 或 null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 | | serverMsgID | string 或 null | 服务端消息 ID;待发送或失败消息可能没有有效值。 | | sessionType | OpenIMSessionType | 消息所属会话类型。 | | sendID 、 recvID 、 groupID | string 或 null | 发送者及单聊/群聊路由字段。 | | contentType | OpenIMMessageType | 消息内容类型,决定读取哪个 elem。 | | createTime 、 sendTime | number | 创建和发送时间。 | | seq | number | 服务端消息序号。 | | senderPlatformID | OpenIMPlatform | 发送端平台。 | | senderNickname 、 senderFaceUrl | string 或 null | 发送者资料快照。 | | status | OpenIMMessageStatus | 当前发送状态。 | | isRead | boolean | 当前已读状态快照。 | | offlinePush | OpenIMOfflinePush 或 null | 发送时的离线推送配置。 | | content 、 attachedInfo | string 或 null | SDK 序列化内容和附加信息。 | | ex | string 或 null | 随消息同步的扩展字符串。 | | localEx | string 或 null | 只保存在当前设备的扩展字符串。 | 消息正文位于与 contentType 对应的字段中:文本使用 textElem ,图片/音频/视频/文件使用 pictureElem 、 soundElem 、 videoElem 、 fileElem ,@ 与回复使用 atTextElem 、 quoteElem ,合并与自定义消息使用 mergeElem 、 customElem ,名片/位置/表情使用 cardElem 、 locationElem 、 faceElem ,高级文本、输入状态和通知分别使用 advancedTextElem 、 typingElem 、 notificationElem 。不要通过展示文本或数组位置判断消息类型。 conversationID 用于确定所属会话,但不是 OpenIMMessageItem 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 conversationID:clientMsgID 合并。 创建不同内容的消息 | 内容 | 页面 | 注意事项 | | | | | | 文本与 Markdown | 创建文本消息 /zh/sdk/uniapp/message/creating messages/create text message 、 创建 Markdown 消息 /zh/sdk/uniapp/message/creating messages/create markdown message | Markdown 内容需要由接收端安全渲染。 | | 群聊 @ 消息 | 创建 @ 消息 /zh/sdk/uniapp/message/creating messages/create text at message | 只能发送到群聊。 | | 图片、音频、视频和文件 | 使用完整路径创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message from full path 、 使用 URL 创建图片消息 /zh/sdk/uniapp/message/creating messages/create image message by url | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 | | 名片、位置与表情 | 创建名片消息 /zh/sdk/uniapp/message/creating messages/create card message 、 创建位置消息 /zh/sdk/uniapp/message/creating messages/create location message 、 创建表情消息 /zh/sdk/uniapp/message/creating messages/create face message | 创建时保存内容快照。 | | 回复、转发与合并 | 创建回复消息 /zh/sdk/uniapp/message/creating messages/create quote message 、 创建转发消息 /zh/sdk/uniapp/message/creating messages/create forward message 、 创建合并消息 /zh/sdk/uniapp/message/creating messages/create merger message | 创建结果仍需显式发送。 | | 自定义业务内容 | 创建自定义消息 /zh/sdk/uniapp/message/creating messages/create custom message | 接收端必须校验业务 schema。 | 只影响当前客户端展示的状态应写入 localEx ,不要放入需要同步给其他用户的业务内容,见 设置消息本地扩展 /zh/sdk/uniapp/message/managing messages/set message local ex 。 进度事件 本页归属发送、文件上传和日志上传进度事件: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription 进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 removeProgressListeners 。 文件消息的本地完整路径必须能被原生层读取。 unifile:// 先转为真实沙盒路径;网络 URL 使用对应 by URL 创建入口。 按任务查找页面 | 任务 | 页面 | | | | | 发送普通消息或已上传媒体 | 发送消息 /zh/sdk/uniapp/message/sending messages/send message 、 发送已上传的媒体消息 /zh/sdk/uniapp/message/sending messages/send message not oss | | 接收在线、离线和只在线消息 | 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages | | 加载历史或读取消息上下文 | 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 、 读取消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context | | 按 ID 定位或搜索本地消息 | 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 、 搜索消息 /zh/sdk/uniapp/message/searching messages/search messages | | 删除、撤回、修改或置顶 | 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 、 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message 、 修改消息 /zh/sdk/uniapp/message/managing messages/modify a message 、 置顶消息 /zh/sdk/uniapp/message/managing messages/set message pinned | | 群聊成员级已读 | 上报群消息已读 /zh/sdk/uniapp/message/managing read status/send group read receipts 、 查询群消息已读成员 /zh/sdk/uniapp/message/managing read status/get group message readers | | 输入状态或语音识别 | 上报输入状态 /zh/sdk/uniapp/message/composing messages/update typing status 、 识别音频文字 /zh/sdk/uniapp/message/composing messages/transcribe audio | 状态同步边界 新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。 会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由 标记会话已读 /zh/sdk/uniapp/conversation/managing conversations/mark conversation read 、 维护总未读数 /zh/sdk/uniapp/conversation/managing conversations/get total unread count 和 获取会话列表 /zh/sdk/uniapp/conversation/retrieving conversations/retrieve conversation list 中的事件处理器维护。" }, { "path": "/sdk/uniapp/message/creating-messages/create-text-message", @@ -5037,7 +5037,7 @@ "description": "在群聊中创建带 @ 用户信息的文本消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", - "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 消息正文;建议使用稳定的 @userID 标记。 | | atUserIDList | string | 是 | 被提及用户 ID;@ 全体时先调用 getAtAllTag 获取专用标记。 | | atUsersInfo | OpenIMAtUsersInfoItem & 124; null | 否 | 用户 ID 与群内展示名信息。 | | quoteMessage | OpenIMMessageItem & 124; null | 否 | 被引用的原消息。 | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , Promise 成功只返回待发送的 OpenIMMessageItem | null 。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。 atUserIDList 与 atUsersInfo 中的用户应保持一致。 提及全体成员 不要在业务代码中写死全体成员标记。商业版先调用 getAtAllTag 商业版 取得当前标记,再将它同时放入正文和 atUserIDList : import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag 请查看群公告 , atUserIDList: atAllTag , getAtAllTag 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。" + "content": "参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | text | string | 是 | 消息正文;建议使用稳定的 @userID 标记。 | | atUserIDList | string | 是 | 被提及用户 ID;@ 全体时先调用 getAtAllTag 获取专用标记。 | | atUsersInfo | OpenIMAtUsersInfoItem 或 null | 否 | 用户 ID 与群内展示名信息。 | | quoteMessage | OpenIMMessageItem 或 null | 否 | 被引用的原消息。 | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a 请确认', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , Promise 成功只返回待发送的 OpenIMMessageItem | null 。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。 atUserIDList 与 atUsersInfo 中的用户应保持一致。 提及全体成员 不要在业务代码中写死全体成员标记。商业版先调用 getAtAllTag 商业版 取得当前标记,再将它同时放入正文和 atUserIDList : import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag 请查看群公告 , atUserIDList: atAllTag , getAtAllTag 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。" }, { "path": "/sdk/uniapp/message/creating-messages/create-custom-message", @@ -5061,7 +5061,7 @@ "description": "使用已上传图片的 elem 信息创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", - "content": "createImageMessageByURL 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 参数说明 | 参数 | 类型 | 说明 | | | | | | sourcePicture | OpenIMPicture & 124; null | 原图信息。 | | bigPicture | OpenIMPicture & 124; null | 大图信息。 | | snapshotPicture | OpenIMPicture & 124; null | 缩略图信息。 | | sourcePath | string & 124; null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段: uuid 、 type 、 size 、 width 、 height 和 url ,均为可选值;创建完整可展示消息时应填写真实上传结果。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 sendMessageNotOss 。" + "content": "createImageMessageByURL 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。 参数说明 | 参数 | 类型 | 说明 | | | | | | sourcePicture | OpenIMPicture 或 null | 原图信息。 | | bigPicture | OpenIMPicture 或 null | 大图信息。 | | snapshotPicture | OpenIMPicture 或 null | 缩略图信息。 | | sourcePath | string 或 null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 | 三个图片对象使用相同字段: uuid 、 type 、 size 、 width 、 height 和 url ,均为可选值;创建完整可展示消息时应填写真实上传结果。 import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", @@ -5077,7 +5077,7 @@ "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", - "content": "createSoundMessageByURL 使用已经上传的音频信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | uuid | string & 124; null | 音频资源的唯一标识。 | | soundPath | string & 124; null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | sourceUrl | string & 124; null | 已上传音频的可访问地址。 | | dataSize | number & 124; null | 音频大小,单位为字节。 | | duration | number & 124; null | 音频时长,单位按服务端协议约定。 | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 OpenIMSoundElem 不包含 Wasm 版的 soundType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" + "content": "createSoundMessageByURL 使用已经上传的音频信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | uuid | string 或 null | 音频资源的唯一标识。 | | soundPath | string 或 null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | sourceUrl | string 或 null | 已上传音频的可访问地址。 | | dataSize | number 或 null | 音频大小,单位为字节。 | | duration | number 或 null | 音频时长,单位按服务端协议约定。 | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, URL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 OpenIMSoundElem 不包含 Wasm 版的 soundType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", @@ -5093,7 +5093,7 @@ "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", - "content": "createVideoMessageByURL 使用已经上传的视频和快照信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | videoPath | string & 124; null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | duration | number & 124; null | 视频时长。 | | videoType | string & 124; null | 视频 MIME 类型。 | | videoUUID | string & 124; null | 视频资源的唯一标识。 | | videoUrl | string & 124; null | 已上传视频的可访问地址。 | | videoSize | number & 124; null | 视频大小,单位为字节。 | | snapshotPath | string & 124; null | 快照文件的本地名称或业务路径。 | | snapshotUUID | string & 124; null | 快照资源的唯一标识。 | | snapshotSize | number & 124; null | 快照大小,单位为字节。 | | snapshotUrl | string & 124; null | 已上传快照的可访问地址。 | | snapshotWidth | number & 124; null | 快照宽度,单位为像素。 | | snapshotHeight | number & 124; null | 快照高度,单位为像素。 | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, 视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 OpenIMVideoElem 不包含 Wasm 版的 snapShotType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" + "content": "createVideoMessageByURL 使用已经上传的视频和快照信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | videoPath | string 或 null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 | | duration | number 或 null | 视频时长。 | | videoType | string 或 null | 视频 MIME 类型。 | | videoUUID | string 或 null | 视频资源的唯一标识。 | | videoUrl | string 或 null | 已上传视频的可访问地址。 | | videoSize | number 或 null | 视频大小,单位为字节。 | | snapshotPath | string 或 null | 快照文件的本地名称或业务路径。 | | snapshotUUID | string 或 null | 快照资源的唯一标识。 | | snapshotSize | number 或 null | 快照大小,单位为字节。 | | snapshotUrl | string 或 null | 已上传快照的可访问地址。 | | snapshotWidth | number 或 null | 快照宽度,单位为像素。 | | snapshotHeight | number 或 null | 快照高度,单位为像素。 | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, 视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 OpenIMVideoElem 不包含 Wasm 版的 snapShotType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null ;发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", @@ -5109,7 +5109,7 @@ "description": "使用已上传文件的 OpenIMFileElem 创建消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", - "content": "createFileMessageByURL 使用已经上传的文件信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | filePath | string & 124; null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | | fileName | string & 124; null | 对外展示的文件名。 | | uuid | string & 124; null | 文件资源的唯一标识。 | | sourceUrl | string & 124; null | 已上传文件的可访问地址。 | | fileSize | number & 124; null | 文件大小,单位为字节。 | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, 文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 OpenIMFileElem 不包含 Wasm 版的 fileType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null 。由于资源已经上传,发送时使用 sendMessageNotOss 。" + "content": "createFileMessageByURL 使用已经上传的文件信息创建消息。 参数说明 | 参数 | 类型 | 说明 | | | | | | filePath | string 或 null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 | | fileName | string 或 null | 对外展示的文件名。 | | uuid | string 或 null | 文件资源的唯一标识。 | | sourceUrl | string 或 null | 已上传文件的可访问地址。 | | fileSize | number 或 null | 文件大小,单位为字节。 | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, 文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 OpenIMFileElem 不包含 Wasm 版的 fileType 字段,不要传入未公开字段。 Promise 成功只创建待发送的 OpenIMMessageItem | null 。由于资源已经上传,发送时使用 sendMessageNotOss 。" }, { "path": "/sdk/uniapp/message/creating-messages/create-card-message", @@ -5117,7 +5117,7 @@ "description": "使用 OpenIMCardElem 创建用户名片消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", - "content": "参数说明 createCardMessage 接收 OpenIMCardElem 。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: | 参数 | 类型 | 建议 | 说明 | | | | | | | userID | string & 124; null | 必填 | 名片对应的用户 ID。 | | nickname | string & 124; null | 必填 | 名片中保存的展示名称。 | | faceURL | string & 124; null | 必填 | 名片中保存的头像地址。 | | ex | string & 124; null | 必填 | 名片扩展信息;没有内容时传空字符串。 | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', Promise 成功只创建 OpenIMMessageItem | null ,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 userID 查询最新资料,也不要把名片字段当作可信身份认证。" + "content": "参数说明 createCardMessage 接收 OpenIMCardElem 。合同字段都是可选值,但创建可展示名片时应提供以下完整快照: | 参数 | 类型 | 建议 | 说明 | | | | | | | userID | string 或 null | 必填 | 名片对应的用户 ID。 | | nickname | string 或 null | 必填 | 名片中保存的展示名称。 | | faceURL | string 或 null | 必填 | 名片中保存的头像地址。 | | ex | string 或 null | 必填 | 名片扩展信息;没有内容时传空字符串。 | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', Promise 成功只创建 OpenIMMessageItem | null ,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 userID 查询最新资料,也不要把名片字段当作可信身份认证。" }, { "path": "/sdk/uniapp/message/creating-messages/create-location-message", @@ -5181,7 +5181,7 @@ "description": "发送已经准备好远端资源信息的消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", - "content": "sendMessageNotOss 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | | offlinePushInfo | OpenIMOfflinePush & 124; null | 否 | 离线推送标题、描述和平台配置。 | | isOnlineOnly | boolean & 124; null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, 资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 OpenIMMessageItem ,应用按 clientMsgID 合并返回对象;字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 sendMessage 。" + "content": "sendMessageNotOss 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | recvID | string | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 | | groupID | string | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 | | message | OpenIMMessageItem | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 | | offlinePushInfo | OpenIMOfflinePush 或 null | 否 | 离线推送标题、描述和平台配置。 | | isOnlineOnly | boolean 或 null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, 资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 OpenIMMessageItem ,应用按 clientMsgID 合并返回对象;字段见 消息概览 /zh/sdk/uniapp/message/overview message 。 该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 sendMessage 。" }, { "path": "/sdk/uniapp/message/receiving-messages/receive-messages", @@ -5205,7 +5205,7 @@ "description": "按会话和 clientMsgID 游标读取历史消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", - "content": "聊天页面进入会话时使用公共入口 getAdvancedHistoryMessageList 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 clientMsgID 作为下一页游标。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | lastMinSeq | number & 124; null | 否 | 上一页返回的最小序号,用于连续分页。 | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, 返回结果 Promise 成功后,结果是 OpenIMAdvancedHistoryMessageListResult | null : | 字段 | 类型 | 说明 | | | | | | messageList | OpenIMMessageItem | 当前页消息。 | | lastMinSeq | number | 继续读取时传回的最小序号。 | | isEnd | boolean | 是否到达当前加载方向的历史边界。 | | errCode | number | 历史读取结果状态码。 | | errMsg | string | 与状态码对应的说明。 | 只有 errCode 表示成功时才合并 messageList ;Promise 被拒绝时仍按通用错误处理。按 conversationID 限定列表,并以 clientMsgID 去重;查询不会触发新消息事件。 商业版 getHistoryMessageList 商业版 额外要求 isReverse ,并支持可选 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" + "content": "聊天页面进入会话时使用公共入口 getAdvancedHistoryMessageList 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 clientMsgID 作为下一页游标。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string | 是 | 要读取历史消息的会话 ID。 | | startClientMsgID | string | 是 | 分页锚点消息 ID;第一页传空字符串。 | | count | number | 是 | 本次读取的消息数量。 | | lastMinSeq | number 或 null | 否 | 上一页返回的最小序号,用于连续分页。 | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, 返回结果 Promise 成功后,结果是 OpenIMAdvancedHistoryMessageListResult | null : | 字段 | 类型 | 说明 | | | | | | messageList | OpenIMMessageItem | 当前页消息。 | | lastMinSeq | number | 继续读取时传回的最小序号。 | | isEnd | boolean | 是否到达当前加载方向的历史边界。 | | errCode | number | 历史读取结果状态码。 | | errMsg | string | 与状态码对应的说明。 | 只有 errCode 表示成功时才合并 messageList ;Promise 被拒绝时仍按通用错误处理。按 conversationID 限定列表,并以 clientMsgID 去重;查询不会触发新消息事件。 商业版 getHistoryMessageList 商业版 额外要求 isReverse ,并支持可选 viewType 和 lastMinSeq 。不要把它等同于已删除的单独 reverse history 页面;方向通过参数表达。" }, { "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", @@ -5229,7 +5229,7 @@ "description": "按关键词、发送者、类型和时间范围搜索消息。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", - "content": "searchLocalMessages 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 conversationID ,不是发送消息时使用的 groupID ;如果只保存了群 ID,先按 获取会话 ID /zh/sdk/uniapp/conversation/retrieving conversations/get conversation id 取得群会话 ID。 搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 conversationID 和 clientMsgID 返回客户端定位。 创建搜索查询 keywordList 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, 高级搜索 可以使用发送者、消息类型和时间窗口缩小范围。当前 OpenIMSearchLocalMessagesParams 除 conversationID 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 0 。 const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string & 124; null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | keywordList | string | 是 | 关键词列表。 | | keywordListMatchType | number | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | senderUserIDList | string | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | | messageTypeList | OpenIMMessageType | 是 | 只搜索指定类型;不限制时传空数组。 | | searchTimePosition | number | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | | pageIndex | number | 是 | 搜索结果页码,第一页传 1 。 | | count | number | 是 | 每页返回数量。 | 如果搜索入口允许图片、文件或自定义消息,把相应 OpenIMMessageType 常量加入 messageTypeList 。匹配类型、时间单位和页码必须服从合同及服务端约定。 处理分页结果 Promise 成功后,结果是 OpenIMSearchMessageResult | null : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下匹配的消息总数。 | | searchResultItems | OpenIMSearchMessageResultItem | 按会话分组的搜索结果。 | 每个结果项包含: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 结果所属会话 ID。 | | conversationType | OpenIMSessionType | 会话类型。 | | showName 、 faceURL | string | 会话展示名称与头像快照。 | | latestMsgSendTime | number & 124; null | 当前结果会话的最新消息时间。 | | messageCount | number | 当前结果项的匹配消息数量。 | | messageList | OpenIMMessageItem | 匹配消息。 | 可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message, return rows 分页时保持相同的会话、关键词和筛选条件,只递增 pageIndex 。用户修改任一条件时,把页码重置为 1 并清空旧结果。同一搜索页按 conversationID:clientMsgID 去重,不要按结果位置保存选中项。查询不会触发消息事件。 处理搜索结果变化 命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages 、 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 和 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message ;本页只负责查询和分页,不重复注册消息事件。 跳转时使用结果中的 conversationID 和 clientMsgID 定位。需要展示前后聊天记录时,把命中的完整 OpenIMMessageItem 作为起点读取 消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context ,不要用 findMessageList 拼接附近记录。 需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 相关页面 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" + "content": "searchLocalMessages 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 conversationID ,不是发送消息时使用的 groupID ;如果只保存了群 ID,先按 获取会话 ID /zh/sdk/uniapp/conversation/retrieving conversations/get conversation id 取得群会话 ID。 搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 conversationID 和 clientMsgID 返回客户端定位。 创建搜索查询 keywordList 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。 import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, 高级搜索 可以使用发送者、消息类型和时间窗口缩小范围。当前 OpenIMSearchLocalMessagesParams 除 conversationID 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 0 。 const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationID | string 或 null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 | | keywordList | string | 是 | 关键词列表。 | | keywordListMatchType | number | 是 | 多关键词匹配方式,使用 SDK 数字约定。 | | senderUserIDList | string | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 | | messageTypeList | OpenIMMessageType | 是 | 只搜索指定类型;不限制时传空数组。 | | searchTimePosition | number | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 | | searchTimePeriod | number | 是 | 从结束位置向前搜索的时间范围,单位为秒。 | | pageIndex | number | 是 | 搜索结果页码,第一页传 1 。 | | count | number | 是 | 每页返回数量。 | 如果搜索入口允许图片、文件或自定义消息,把相应 OpenIMMessageType 常量加入 messageTypeList 。匹配类型、时间单位和页码必须服从合同及服务端约定。 处理分页结果 Promise 成功后,结果是 OpenIMSearchMessageResult | null : | 字段 | 类型 | 说明 | | | | | | totalCount | number | 当前条件下匹配的消息总数。 | | searchResultItems | OpenIMSearchMessageResultItem | 按会话分组的搜索结果。 | 每个结果项包含: | 字段 | 类型 | 说明 | | | | | | conversationID | string | 结果所属会话 ID。 | | conversationType | OpenIMSessionType | 会话类型。 | | showName 、 faceURL | string | 会话展示名称与头像快照。 | | latestMsgSendTime | number 或 null | 当前结果会话的最新消息时间。 | | messageCount | number | 当前结果项的匹配消息数量。 | | messageList | OpenIMMessageItem | 匹配消息。 | 可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message, return rows 分页时保持相同的会话、关键词和筛选条件,只递增 pageIndex 。用户修改任一条件时,把页码重置为 1 并清空旧结果。同一搜索页按 conversationID:clientMsgID 去重,不要按结果位置保存选中项。查询不会触发消息事件。 处理搜索结果变化 命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages 、 批量删除消息 /zh/sdk/uniapp/message/managing messages/delete saved messages 和 撤回消息 /zh/sdk/uniapp/message/managing messages/revoke a message ;本页只负责查询和分页,不重复注册消息事件。 跳转时使用结果中的 conversationID 和 clientMsgID 定位。需要展示前后聊天记录时,把命中的完整 OpenIMMessageItem 作为起点读取 消息上下文 /zh/sdk/uniapp/message/retrieving messages/load message context ,不要用 findMessageList 拼接附近记录。 需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。 相关页面 按 ID 查找消息 /zh/sdk/uniapp/message/retrieving messages/find messages by id 加载历史消息 /zh/sdk/uniapp/message/retrieving messages/load older messages 接收消息 /zh/sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/composing-messages/update-typing-status", @@ -5253,7 +5253,7 @@ "description": "商业版查询当前语音转写能力。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", - "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities Promise 成功后,结果是 OpenIMSpeechToTextCapabilitiesResult | null : | 字段 | 类型 | 说明 | | | | | | format | string & 124; null | 支持的音频格式。 | | sampleRateHz | number & 124; null | 支持的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number & 124; null | 最大录音时长,单位为毫秒。 | | maxFileSize | number & 124; null | 最大文件大小,单位为字节。 | | provider | string & 124; null | 当前语音识别服务提供方。 | | requestType | string & 124; null | 服务端要求的请求类型。 | | crossDomain | boolean & 124; null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。" + "content": "getSpeechToTextCapabilities 商业版 返回能力信息。 import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities Promise 成功后,结果是 OpenIMSpeechToTextCapabilitiesResult | null : | 字段 | 类型 | 说明 | | | | | | format | string 或 null | 支持的音频格式。 | | sampleRateHz | number 或 null | 支持的音频采样率,单位为赫兹。 | | maxRecordTimeMs | number 或 null | 最大录音时长,单位为毫秒。 | | maxFileSize | number 或 null | 最大文件大小,单位为字节。 | | provider | string 或 null | 当前语音识别服务提供方。 | | requestType | string 或 null | 服务端要求的请求类型。 | | crossDomain | boolean 或 null | 是否允许跨域处理。 | 在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。" }, { "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", @@ -5397,7 +5397,7 @@ "description": "上传本地文件、观察进度,并在商业版取消上传。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", - "content": "uploadFile 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filepath | string | 是 | 原生层可读取的本地完整路径。 | | name | string | 是 | 文件名。 | | contentType | string | 是 | MIME 类型。 | | uuid | string | 是 | 业务为本次上传生成的稳定任务 ID。 | | cancelID | string & 124; null | 否 | 用于取消本次上传的稳定 ID。 | | cause | string & 124; null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 uploadFile 前注册进度事件,避免较小文件在监听建立前完成上传。 import off, onUploadFileProgress, uploadFile, from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription 路径必须是原生可读的完整路径。 unifile:// 先转换为平台沙盒路径;不要把网络 URL 作为 filepath 。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 返回结果 Promise 成功后,结果是 OpenIMUploadFileResult | null : | 字段 | 类型 | 说明 | | | | | | url | string & 124; null | 上传后的远端资源 URL。 | | uri | string & 124; null | 服务端返回的资源 URI。 | | uuid | string & 124; null | 本次上传的任务标识。 | | size | number & 124; null | 文件大小。 | | typ | number & 124; null | 服务端返回的资源类型。 | | mediaID | string & 124; null | 媒体资源 ID。 | 使用 result?.url 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 监听上传进度 onUploadFileProgress 返回 OpenIMSDKEventSubscription ,事件只包含 progress 。当前 uni app / uni app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 removeUploadListener 。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" + "content": "uploadFile 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | filepath | string | 是 | 原生层可读取的本地完整路径。 | | name | string | 是 | 文件名。 | | contentType | string | 是 | MIME 类型。 | | uuid | string | 是 | 业务为本次上传生成的稳定任务 ID。 | | cancelID | string 或 null | 否 | 用于取消本次上传的稳定 ID。 | | cause | string 或 null | 否 | 业务侧记录的上传用途或原因。 | 如果界面需要显示进度,应在调用 uploadFile 前注册进度事件,避免较小文件在监听建立前完成上传。 import off, onUploadFileProgress, uploadFile, from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription 路径必须是原生可读的完整路径。 unifile:// 先转换为平台沙盒路径;不要把网络 URL 作为 filepath 。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。 返回结果 Promise 成功后,结果是 OpenIMUploadFileResult | null : | 字段 | 类型 | 说明 | | | | | | url | string 或 null | 上传后的远端资源 URL。 | | uri | string 或 null | 服务端返回的资源 URI。 | | uuid | string 或 null | 本次上传的任务标识。 | | size | number 或 null | 文件大小。 | | typ | number 或 null | 服务端返回的资源类型。 | | mediaID | string 或 null | 媒体资源 ID。 | 使用 result?.url 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。 监听上传进度 onUploadFileProgress 返回 OpenIMSDKEventSubscription ,事件只包含 progress 。当前 uni app / uni app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 removeUploadListener 。 商业版可以通过 cancelUpload 商业版 取消同一 cancelID : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' 取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。" }, { "path": "/sdk/uniapp/calling/overview-calling", @@ -5413,7 +5413,7 @@ "description": "商业版向一个用户发起音频或视频邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", - "content": "signalingInvite 商业版 发起单聊通话。 unix openim sdk 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 当前登录用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | | invitation.groupID | string | 是 | 单聊固定传空字符串。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 单聊传 OpenIMSessionTypeSingle 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表;发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | | offlinePushInfo.title | string | 否 | 推送标题。 | | offlinePushInfo.desc | string | 否 | 推送正文。 | | offlinePushInfo.ex | string | 否 | 推送扩展字符串。 | | offlinePushInfo.iOSPushSound | string | 否 | iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 否 | 是否更新 iOS 角标。 | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: '视频通话', desc: '你收到一个视频通话邀请', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , iOS 端将 platformID 改为 OpenIMPlatformIOS 。房间 ID 应由业务生成并在本次通话各参与端保持一致。 返回结果 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 本次通话的媒体房间 ID。 | | token | string & 124; null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | | liveURL | string & 124; null | 媒体服务返回的房间连接地址。 | | busyLineUserIDList | string & 124; null | 因忙线未能进入邀请流程的用户 ID。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 服务端返回的邀请快照。 | 取得有效的 token 和 roomID 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" + "content": "signalingInvite 商业版 发起单聊通话。 unix openim sdk 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | invitation | OpenIMSignalingInvitationInfo | 是 | 本次通话邀请。 | | invitation.inviterUserID | string | 是 | 当前登录用户 ID。 | | invitation.inviteeUserIDList | string | 是 | 被邀请用户列表;单聊只填写对方一个用户。 | | invitation.groupID | string | 是 | 单聊固定传空字符串。 | | invitation.roomID | string | 是 | 本次通话的唯一房间标识,后续状态按它合并。 | | invitation.timeout | number | 是 | 邀请等待时长,单位为秒。 | | invitation.mediaType | string | 是 | 媒体类型,业务通常约定为 audio 或 video 。 | | invitation.sessionType | number | 是 | 单聊传 OpenIMSessionTypeSingle 。 | | invitation.platformID | number | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 | | invitation.customData | string | 否 | 随邀请携带的业务扩展字符串。 | | invitation.initiateTime | number | 否 | 邀请发起时间,通常由信令链路维护。 | | invitation.busyLineUserIDList | string | 否 | 忙线用户列表;发起新邀请时通常不填写。 | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | 否 | 被邀请人离线时使用的推送内容。 | | offlinePushInfo.title | string | 否 | 推送标题。 | | offlinePushInfo.desc | string | 否 | 推送正文。 | | offlinePushInfo.ex | string | 否 | 推送扩展字符串。 | | offlinePushInfo.iOSPushSound | string | 否 | iOS 推送声音。 | | offlinePushInfo.iOSBadgeCount | boolean | 否 | 是否更新 iOS 角标。 | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , mediaType: 'video', timeout: 30, sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: '视频通话', desc: '你收到一个视频通话邀请', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , iOS 端将 platformID 改为 OpenIMPlatformIOS 。房间 ID 应由业务生成并在本次通话各参与端保持一致。 返回结果 Promise 成功后, roomCredentials 是 OpenIMSignalingInviteResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string 或 null | 本次通话的媒体房间 ID。 | | token | string 或 null | 加入媒体房间使用的短期凭据,只应保存在内存中。 | | liveURL | string 或 null | 媒体服务返回的房间连接地址。 | | busyLineUserIDList | string 或 null | 因忙线未能进入邀请流程的用户 ID。 | | invitation | OpenIMSignalingInvitationInfo 或 null | 服务端返回的邀请快照。 | 取得有效的 token 和 roomID 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。" }, { "path": "/sdk/uniapp/calling/managing-calls/start-group-call", @@ -5429,7 +5429,7 @@ "description": "商业版接受邀请并取得房间凭据。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", - "content": "从 onReceiveNewInvitation 取得原始 OpenIMSignalingInvitationInfo 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 signalingAccept : import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation invitation 必须保留收到的原始 roomID 、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 Promise 成功后, roomCredentials 是 OpenIMSignalingAcceptResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 本次通话的媒体房间 ID。 | | token | string & 124; null | 加入媒体房间使用的短期凭据。 | | liveURL | string & 124; null | 媒体服务返回的连接地址。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 token 和 roomID 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 继续合并。" + "content": "从 onReceiveNewInvitation 取得原始 OpenIMSignalingInvitationInfo 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 signalingAccept : import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation invitation 必须保留收到的原始 roomID 、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。 Promise 成功后, roomCredentials 是 OpenIMSignalingAcceptResult | null : | 字段 | 类型 | 说明 | | | | | | roomID | string 或 null | 本次通话的媒体房间 ID。 | | token | string 或 null | 加入媒体房间使用的短期凭据。 | | liveURL | string 或 null | 媒体服务返回的连接地址。 | | invitation | OpenIMSignalingInvitationInfo 或 null | 服务端返回的邀请快照。 | 这些字段均为可选值且敏感,只保存在内存中。取得有效的 token 和 roomID 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由 通话事件 /zh/sdk/uniapp/calling/managing calls/handle call events 继续合并。" }, { "path": "/sdk/uniapp/calling/managing-calls/reject-call", @@ -5477,7 +5477,7 @@ "description": "商业版查询群当前关联的 roomID 与邀请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", - "content": "signalingGetRoomByGroupID 的参数是群组 ID,不是自定义 roomID : import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID 返回结果 Promise 成功后,结果是 OpenIMSignalingGetRoomByGroupIDResult | null 快照: | 字段 | 类型 | 说明 | | | | | | roomID | string & 124; null | 当前群通话的房间 ID。 | | invitation | OpenIMSignalingInvitationInfo & 124; null | 当前房间对应的原始邀请信息。 | 当前 uni app / uni app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 participant 字段。 空结果或空 roomID 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 signalingGetTokenByRoomID 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 groupID 调用本方法,再按返回或已保存的 roomID 合并通话状态。" + "content": "signalingGetRoomByGroupID 的参数是群组 ID,不是自定义 roomID : import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID 返回结果 Promise 成功后,结果是 OpenIMSignalingGetRoomByGroupIDResult | null 快照: | 字段 | 类型 | 说明 | | | | | | roomID | string 或 null | 当前群通话的房间 ID。 | | invitation | OpenIMSignalingInvitationInfo 或 null | 当前房间对应的原始邀请信息。 | 当前 uni app / uni app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 participant 字段。 空结果或空 roomID 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 signalingGetTokenByRoomID 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 groupID 调用本方法,再按返回或已保存的 roomID 合并通话状态。" }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index 6aac2024b7..3d29cd0e9d 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -1686,7 +1686,7 @@ "title": "群组概览" }, "/sdk/uniapp/group/create-group": { - "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupInfo.groupName` | `string` | 是 | 群名称。 |\n| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 |\n| `groupInfo.notification` | string | null | 否 | 初始群公告。 |\n| `groupInfo.introduction` | string | null | 否 | 群简介。 |\n| `groupInfo.faceURL` | string | null | 否 | 群头像 URL。 |\n| `groupInfo.ex` | string | null | 否 | 群扩展字符串,完整写入。 |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 |\n| `adminUserIDs` | string[] | null | 否 | 初始管理员用户 ID。 |\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。\n\nPromise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。", + "body": "`createGroup()` 接收群资料、初始成员和可选管理员,返回 `OpenIMGroupItem | null`。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupInfo.groupName` | `string` | 是 | 群名称。 |\n| `groupInfo.groupType` | `2` | 是 | 当前合同支持的群类型固定为 `2`。 |\n| `groupInfo.notification` | `string` 或 `null` | 否 | 初始群公告。 |\n| `groupInfo.introduction` | `string` 或 `null` | 否 | 群简介。 |\n| `groupInfo.faceURL` | `string` 或 `null` | 否 | 群头像 URL。 |\n| `groupInfo.ex` | `string` 或 `null` | 否 | 群扩展字符串,完整写入。 |\n| `memberUserIDs` | `string[]` | 是 | 初始普通成员用户 ID。 |\n| `adminUserIDs` | `string[]` 或 `null` | 否 | 初始管理员用户 ID。 |\n\n```uts\nimport { createGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst group = await createGroup({\n groupInfo: { groupName: '项目群', groupType: 2 },\n memberUserIDs: ['user_b', 'user_c'],\n adminUserIDs: ['user_b'],\n})\n```\n\n成员与管理员列表应先去除空值和重复 ID。管理员必须同时符合服务端的成员与权限规则;不要把当前用户或同一用户重复放入冲突角色列表。`ex` 不会自动合并 JSON。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupItem | null`。非空结果可以按 `groupID` 合入群组 store;返回 `null` 时不要创建仅本地群。\n\nPromise 成功只表示创建请求完成。群列表最终通过 `onJoinedGroupAdded`、指定群查询或已加入群列表校准;初始成员与管理员则通过群成员查询确认。", "description": "创建群资料并设置初始成员与管理员。", "headings": [ { @@ -1704,7 +1704,7 @@ "title": "创建群组" }, "/sdk/uniapp/group/update-group-profile": { - "body": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | string | null | 否 | 新群名称。 |\n| `introduction` | string | null | 否 | 新群简介。 |\n| `faceURL` | string | null | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n})\n```\n\n不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。\n\nPromise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", + "body": "群名称、群简介和群头像都属于面向成员展示的基础资料,可以由同一个资料编辑表单提交。`setGroupInfo()` 只更新本次提供的可选字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要更新的群组 ID。 |\n| `groupName` | `string` 或 `null` | 否 | 新群名称。 |\n| `introduction` | `string` 或 `null` | 否 | 新群简介。 |\n| `faceURL` | `string` 或 `null` | 否 | 新群头像地址。 |\n\n除 `groupID` 外,至少传入一个实际要修改的资料字段。未传字段保持原值。\n\n```uts\nimport { setGroupInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setGroupInfo({\n groupID,\n groupName: groupName.trim(),\n introduction: introduction.trim(),\n faceURL,\n})\n```\n\n不要把公告、入群验证或成员权限字段混入普通资料保存操作,否则用户编辑群名称时可能意外覆盖其他设置。群主和管理员权限由服务端校验。\n\nPromise 成功表示 OpenIMServer 已完成请求。群资料变化通过 `onGroupInfoChanged` 按 `groupID` 合并;完整监听见[群组概览](/zh/sdk/uniapp/group/overview-group)。需要立即校准时调用 `getSpecifiedGroupsInfo()`,不要直接覆盖未提交字段。\n\n`displayIsRead` 商业版 是字段级扩展;公共服务端不支持时不要发送。", "description": "通过 setGroupInfo 更新群名、公告、介绍、头像和策略字段。", "headings": [ { @@ -1770,7 +1770,7 @@ "title": "开启或关闭全员禁言" }, "/sdk/uniapp/group/join-group": { - "body": "`joinGroup()` 提交入群申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要申请加入的群 ID。 |\n| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 |\n| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 |\n| `ex` | string | null | 否 | 申请扩展字符串,只按已确认协议填写。 |\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。\n\nPromise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。", + "body": "`joinGroup()` 提交入群申请。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `groupID` | `string` | 是 | 要申请加入的群 ID。 |\n| `reqMsg` | `string` | 是 | 申请说明,可能向群主或管理员展示。 |\n| `joinSource` | `number` | 是 | 入群来源值,使用产品与服务端约定。 |\n| `ex` | `string` 或 `null` | 否 | 申请扩展字符串,只按已确认协议填写。 |\n\n```uts\nimport { joinGroup } from '@/uni_modules/unix-openim-sdk'\n\nawait joinGroup({\n groupID,\n reqMsg: '申请加入项目群',\n joinSource: 2,\n ex: '',\n})\n```\n\n申请文案和 `ex` 可能进入申请记录,不包含 Token、内部风控信息或不必要的个人数据。提交前确认群存在,且当前用户尚未加入。\n\nPromise 成功不等于已入群:免验证群可能直接加入,需要验证时等待管理员处理。通过申请事件、`onJoinedGroupAdded` 或重新查询群列表判断最终结果,不在本地先行创建群成员状态。", "description": "向指定群发送加入申请。", "headings": [ { @@ -1887,7 +1887,7 @@ "title": "查询收到的入群申请" }, "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant": { - "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n## 参数说明\n\n参数可省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | number | null | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | number | null | 否 | 本次读取数量。 |\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n## 返回结果\n\nPromise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。\n\n按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。", + "body": "`getGroupApplicationListAsApplicant()` 返回 `OpenIMGroupApplicationListResult | null`。\n\n## 参数说明\n\n参数可省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` 或 `null` | 否 | 本次读取数量。 |\n\n```uts\nimport { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentGroupApplications(result?.applications ?? [])\n```\n\n## 返回结果\n\nPromise 成功后,从 `applications` 读取当前账号发出的 `OpenIMGroupApplicationItem[]`。字段含义见[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient)。查询本身不会触发申请事件。\n\n按 `groupID:userID` 建立稳定 key;事件按当前账号在申请中的角色分流到收到或发出的列表。分页期间状态变化时重置分页,断线恢复、重新登录或事件可能遗漏时重新查询。", "description": "分页查询当前账号发出的入群申请。", "headings": [ { @@ -2101,7 +2101,7 @@ "title": "检查群组 full-sync 状态" }, "/sdk/uniapp/message/overview-message": { - "body": "uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。\n\n接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。\n\n## 消息处理流程\n\n| 阶段 | 主要操作 | 说明 |\n| --- | --- | --- |\n| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 |\n| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 |\n| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 |\n| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 |\n| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 |\n\n从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。\n\n## OpenIMMessageItem 返回结构\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | string | null | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 |\n| `serverMsgID` | string | null | 服务端消息 ID;待发送或失败消息可能没有有效值。 |\n| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 |\n| `sendID`、`recvID`、`groupID` | string | null | 发送者及单聊/群聊路由字段。 |\n| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 |\n| `createTime`、`sendTime` | `number` | 创建和发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 |\n| `senderNickname`、`senderFaceUrl` | string | null | 发送者资料快照。 |\n| `status` | `OpenIMMessageStatus` | 当前发送状态。 |\n| `isRead` | `boolean` | 当前已读状态快照。 |\n| `offlinePush` | OpenIMOfflinePush | null | 发送时的离线推送配置。 |\n| `content`、`attachedInfo` | string | null | SDK 序列化内容和附加信息。 |\n| `ex` | string | null | 随消息同步的扩展字符串。 |\n| `localEx` | string | null | 只保存在当前设备的扩展字符串。 |\n\n消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。\n\n`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。\n\n## 创建不同内容的消息\n\n| 内容 | 页面 | 注意事项 |\n| --- | --- | --- |\n| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 |\n| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 |\n| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 |\n| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 |\n| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 |\n| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 |\n\n只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。\n\n## 进度事件\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nfunction removeProgressListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) |\n| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) |\n| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) |\n| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) |\n| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) |\n| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) |\n\n## 状态同步边界\n\n新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。\n\n会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。", + "body": "uni-app / uni-app x 插件使用 `OpenIMMessageItem` 表示一条消息。发送消息分为两个阶段:先根据内容创建待发送对象,再把该对象发送到单聊用户或群组。创建方法不会发送消息;发送方法的 Promise 成功也不代表其他客户端已经收到消息。\n\n接收新消息、读取历史、搜索和管理消息都以会话为范围。应用应使用 `conversationID:clientMsgID` 组合键幂等合并发送结果、实时事件和历史列表;`conversationID` 确定所属会话,`clientMsgID` 定位具体消息。\n\n## 消息处理流程\n\n| 阶段 | 主要操作 | 说明 |\n| --- | --- | --- |\n| 创建 | 调用对应的 `create*Message()` | 返回待发送的 `OpenIMMessageItem`,不会写入服务端或触发新消息事件。 |\n| 发送 | 调用 `sendMessage()` 或 `sendMessageNotOss()` | 单聊填写 `recvID`,群聊填写 `groupID`;另一个目标字段传空字符串。 |\n| 接收 | 监听新消息事件 | 根据消息路由字段确定目标会话,再按 `clientMsgID` 幂等合并。 |\n| 查询 | 读取历史、搜索或按 ID 定位消息 | 查询返回调用时的快照,不触发新消息事件。 |\n| 更新 | 删除、撤回、修改、置顶或上报已读 | 分别处理 Promise 结果、相关事件和必要的重新查询。 |\n\n从原生完整路径创建的图片、音频、视频和文件消息,通过 `sendMessage()` 进入 SDK 上传与发送流程。媒体资源已经由业务上传服务取得 URL 时,先用对应的 `create*MessageByURL()` 创建消息,再通过 `sendMessageNotOss()` 发送,避免重复上传。\n\n## OpenIMMessageItem 返回结构\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `clientMsgID` | `string` 或 `null` | 客户端稳定 ID,用于列表去重、状态更新、查询和分页游标。 |\n| `serverMsgID` | `string` 或 `null` | 服务端消息 ID;待发送或失败消息可能没有有效值。 |\n| `sessionType` | `OpenIMSessionType` | 消息所属会话类型。 |\n| `sendID`、`recvID`、`groupID` | `string` 或 `null` | 发送者及单聊/群聊路由字段。 |\n| `contentType` | `OpenIMMessageType` | 消息内容类型,决定读取哪个 elem。 |\n| `createTime`、`sendTime` | `number` | 创建和发送时间。 |\n| `seq` | `number` | 服务端消息序号。 |\n| `senderPlatformID` | `OpenIMPlatform` | 发送端平台。 |\n| `senderNickname`、`senderFaceUrl` | `string` 或 `null` | 发送者资料快照。 |\n| `status` | `OpenIMMessageStatus` | 当前发送状态。 |\n| `isRead` | `boolean` | 当前已读状态快照。 |\n| `offlinePush` | `OpenIMOfflinePush` 或 `null` | 发送时的离线推送配置。 |\n| `content`、`attachedInfo` | `string` 或 `null` | SDK 序列化内容和附加信息。 |\n| `ex` | `string` 或 `null` | 随消息同步的扩展字符串。 |\n| `localEx` | `string` 或 `null` | 只保存在当前设备的扩展字符串。 |\n\n消息正文位于与 `contentType` 对应的字段中:文本使用 `textElem`,图片/音频/视频/文件使用 `pictureElem`、`soundElem`、`videoElem`、`fileElem`,@ 与回复使用 `atTextElem`、`quoteElem`,合并与自定义消息使用 `mergeElem`、`customElem`,名片/位置/表情使用 `cardElem`、`locationElem`、`faceElem`,高级文本、输入状态和通知分别使用 `advancedTextElem`、`typingElem`、`notificationElem`。不要通过展示文本或数组位置判断消息类型。\n\n`conversationID` 用于确定所属会话,但不是 `OpenIMMessageItem` 字段。它来自当前会话、查询条件、搜索结果或事件上下文;消息状态通常按 `conversationID:clientMsgID` 合并。\n\n## 创建不同内容的消息\n\n| 内容 | 页面 | 注意事项 |\n| --- | --- | --- |\n| 文本与 Markdown | [创建文本消息](/zh/sdk/uniapp/message/creating-messages/create-text-message)、[创建 Markdown 消息](/zh/sdk/uniapp/message/creating-messages/create-markdown-message) | Markdown 内容需要由接收端安全渲染。 |\n| 群聊 @ 消息 | [创建 @ 消息](/zh/sdk/uniapp/message/creating-messages/create-text-at-message) | 只能发送到群聊。 |\n| 图片、音频、视频和文件 | [使用完整路径创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-from-full-path)、[使用 URL 创建图片消息](/zh/sdk/uniapp/message/creating-messages/create-image-message-by-url) | 其他媒体类型采用相同的本地路径或已上传 URL 流程。 |\n| 名片、位置与表情 | [创建名片消息](/zh/sdk/uniapp/message/creating-messages/create-card-message)、[创建位置消息](/zh/sdk/uniapp/message/creating-messages/create-location-message)、[创建表情消息](/zh/sdk/uniapp/message/creating-messages/create-face-message) | 创建时保存内容快照。 |\n| 回复、转发与合并 | [创建回复消息](/zh/sdk/uniapp/message/creating-messages/create-quote-message)、[创建转发消息](/zh/sdk/uniapp/message/creating-messages/create-forward-message)、[创建合并消息](/zh/sdk/uniapp/message/creating-messages/create-merger-message) | 创建结果仍需显式发送。 |\n| 自定义业务内容 | [创建自定义消息](/zh/sdk/uniapp/message/creating-messages/create-custom-message) | 接收端必须校验业务 schema。 |\n\n只影响当前客户端展示的状态应写入 `localEx`,不要放入需要同步给其他用户的业务内容,见[设置消息本地扩展](/zh/sdk/uniapp/message/managing-messages/set-message-local-ex)。\n\n## 进度事件\n\n本页归属发送、文件上传和日志上传进度事件:\n\n```uts\nimport {\n off,\n onSendMessageProgress,\n onUploadFileProgress,\n onUploadLogsProgress,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sendProgressSubscription = onSendMessageProgress((event) => {\n updateMessageProgress(event.clientMsgID, event.progress)\n})\nconst subscriptions : Array = [\n sendProgressSubscription,\n onUploadFileProgress((event) => updateCurrentUpload(event.progress)),\n onUploadLogsProgress((event) => updateLogUpload(event.progress)),\n]\n\nfunction removeProgressListeners() {\n subscriptions.forEach((subscription) => off(subscription))\n}\n```\n\n进度可能重复、跳跃或在最终 Promise 前后到达;只做单调展示,最终成功/失败以 API 结果为准。退出登录、切换账号或销毁进度状态层时调用 `removeProgressListeners()`。\n\n文件消息的本地完整路径必须能被原生层读取。`unifile://` 先转为真实沙盒路径;网络 URL 使用对应 by-URL 创建入口。\n\n## 按任务查找页面\n\n| 任务 | 页面 |\n| --- | --- |\n| 发送普通消息或已上传媒体 | [发送消息](/zh/sdk/uniapp/message/sending-messages/send-message)、[发送已上传的媒体消息](/zh/sdk/uniapp/message/sending-messages/send-message-not-oss) |\n| 接收在线、离线和只在线消息 | [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages) |\n| 加载历史或读取消息上下文 | [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)、[读取消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context) |\n| 按 ID 定位或搜索本地消息 | [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)、[搜索消息](/zh/sdk/uniapp/message/searching-messages/search-messages) |\n| 删除、撤回、修改或置顶 | [批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)、[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message)、[修改消息](/zh/sdk/uniapp/message/managing-messages/modify-a-message)、[置顶消息](/zh/sdk/uniapp/message/managing-messages/set-message-pinned) |\n| 群聊成员级已读 | [上报群消息已读](/zh/sdk/uniapp/message/managing-read-status/send-group-read-receipts)、[查询群消息已读成员](/zh/sdk/uniapp/message/managing-read-status/get-group-message-readers) |\n| 输入状态或语音识别 | [上报输入状态](/zh/sdk/uniapp/message/composing-messages/update-typing-status)、[识别音频文字](/zh/sdk/uniapp/message/composing-messages/transcribe-audio) |\n\n## 状态同步边界\n\n新消息、删除、撤回、修改、置顶、群已读和输入状态的完整监听分别保留在对应任务页。创建消息对象和纯查询操作只使用 Promise 返回值建立快照,不会触发共享消息事件。会改变状态的操作应分别处理 Promise 成功、事件到达和重新查询校准,不能将三个阶段视为同一结果。\n\n会话未读数、总未读数和群聊 @ 提醒属于会话状态,分别由[标记会话已读](/zh/sdk/uniapp/conversation/managing-conversations/mark-conversation-read)、[维护总未读数](/zh/sdk/uniapp/conversation/managing-conversations/get-total-unread-count)和[获取会话列表](/zh/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list)中的事件处理器维护。", "description": "理解消息创建、发送、接收、历史、状态和进度事件。", "headings": [ { @@ -2146,7 +2146,7 @@ "title": "创建文本消息" }, "/sdk/uniapp/message/creating-messages/create-text-at-message": { - "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 |\n| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 |\n| `atUsersInfo` | OpenIMAtUsersInfoItem[] | null | 否 | 用户 ID 与群内展示名信息。 |\n| `quoteMessage` | OpenIMMessageItem | null | 否 | 被引用的原消息。 |\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@user_a 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }],\n})\n```\n\nPromise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。\n\n## 提及全体成员\n\n不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`:\n\n```uts\nimport { getAtAllTag } from '@/uni_modules/unix-openim-sdk'\n\nconst atAllResult = await getAtAllTag()\nconst atAllTag = atAllResult?.tag\nif (atAllTag != null) {\n const message = await createTextAtMessage({\n text: `${atAllTag} 请查看群公告`,\n atUserIDList: [atAllTag],\n })\n}\n```\n\n`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。", + "body": "## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `text` | `string` | 是 | 消息正文;建议使用稳定的 `@userID` 标记。 |\n| `atUserIDList` | `string[]` | 是 | 被提及用户 ID;@ 全体时先调用 `getAtAllTag()` 获取专用标记。 |\n| `atUsersInfo` | `OpenIMAtUsersInfoItem[]` 或 `null` | 否 | 用户 ID 与群内展示名信息。 |\n| `quoteMessage` | `OpenIMMessageItem` 或 `null` | 否 | 被引用的原消息。 |\n\n```uts\nimport { createTextAtMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createTextAtMessage({\n text: '@user_a 请确认',\n atUserIDList: ['user_a'],\n atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }],\n})\n```\n\nPromise 成功只返回待发送的 `OpenIMMessageItem | null`。该消息只能发送到群聊;创建本身不会改变会话的 @ 状态,也不会触发新消息事件。`atUserIDList` 与 `atUsersInfo` 中的用户应保持一致。\n\n## 提及全体成员\n\n不要在业务代码中写死全体成员标记。商业版先调用 `getAtAllTag()` 商业版 取得当前标记,再将它同时放入正文和 `atUserIDList`:\n\n```uts\nimport { getAtAllTag } from '@/uni_modules/unix-openim-sdk'\n\nconst atAllResult = await getAtAllTag()\nconst atAllTag = atAllResult?.tag\nif (atAllTag != null) {\n const message = await createTextAtMessage({\n text: `${atAllTag} 请查看群公告`,\n atUserIDList: [atAllTag],\n })\n}\n```\n\n`getAtAllTag()` 只读取 SDK 约定,不创建消息,也不触发事件。创建后仍需调用发送 API 并填写目标群 ID。", "description": "在群聊中创建带 @ 用户信息的文本消息。", "headings": [ { @@ -2189,7 +2189,7 @@ "title": "从完整路径创建图片消息" }, "/sdk/uniapp/message/creating-messages/create-image-message-by-url": { - "body": "`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `sourcePicture` | OpenIMPicture | null | 原图信息。 |\n| `bigPicture` | OpenIMPicture | null | 大图信息。 |\n| `snapshotPicture` | OpenIMPicture | null | 缩略图信息。 |\n| `sourcePath` | string | null | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n\n三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst picture = {\n uuid: createBusinessUUID(),\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: uploaded.url,\n}\n\nconst message = await createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n})\n```\n\nURL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。", + "body": "`createImageMessageByURL()` 使用已经上传的图片信息创建消息。原图、大图和缩略图可以指向不同资源;示例仅在三者相同时复用同一个对象。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `sourcePicture` | `OpenIMPicture` 或 `null` | 原图信息。 |\n| `bigPicture` | `OpenIMPicture` 或 `null` | 大图信息。 |\n| `snapshotPicture` | `OpenIMPicture` 或 `null` | 缩略图信息。 |\n| `sourcePath` | `string` 或 `null` | 原始文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n\n三个图片对象使用相同字段:`uuid`、`type`、`size`、`width`、`height` 和 `url`,均为可选值;创建完整可展示消息时应填写真实上传结果。\n\n```uts\nimport { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst picture = {\n uuid: createBusinessUUID(),\n type: 'image/jpeg',\n size: 120000,\n width: 1280,\n height: 720,\n url: uploaded.url,\n}\n\nconst message = await createImageMessageByURL({\n sourcePicture: picture,\n bigPicture: picture,\n snapshotPicture: picture,\n sourcePath: '',\n})\n```\n\nURL 必须能被消息参与者访问,尺寸、大小和类型要与真实资源一致,不要把本地路径填入 URL 字段。Promise 成功只创建待发送对象;资源已经上传时使用 `sendMessageNotOss()`。", "description": "使用已上传图片的 elem 信息创建消息。", "headings": [ { @@ -2209,7 +2209,7 @@ "title": "从完整路径创建语音消息" }, "/sdk/uniapp/message/creating-messages/create-sound-message-by-url": { - "body": "`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `uuid` | string | null | 音频资源的唯一标识。 |\n| `soundPath` | string | null | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | string | null | 已上传音频的可访问地址。 |\n| `dataSize` | number | null | 音频大小,单位为字节。 |\n| `duration` | number | null | 音频时长,单位按服务端协议约定。 |\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL({\n uuid: createBusinessUUID(),\n soundPath: '',\n sourceUrl: uploaded.url,\n dataSize: uploaded.size,\n duration,\n})\n```\n\nURL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", + "body": "`createSoundMessageByURL()` 使用已经上传的音频信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `uuid` | `string` 或 `null` | 音频资源的唯一标识。 |\n| `soundPath` | `string` 或 `null` | 音频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `sourceUrl` | `string` 或 `null` | 已上传音频的可访问地址。 |\n| `dataSize` | `number` 或 `null` | 音频大小,单位为字节。 |\n| `duration` | `number` 或 `null` | 音频时长,单位按服务端协议约定。 |\n\n```uts\nimport { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createSoundMessageByURL({\n uuid: createBusinessUUID(),\n soundPath: '',\n sourceUrl: uploaded.url,\n dataSize: uploaded.size,\n duration,\n})\n```\n\nURL、UUID、大小和时长应与上传结果一致。资源需对接收方可访问,不要把本地沙盒路径当成远端 URL。当前 `OpenIMSoundElem` 不包含 Wasm 版的 `soundType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传音频的 OpenIMSoundElem 创建消息。", "headings": [ { @@ -2229,7 +2229,7 @@ "title": "从完整路径创建视频消息" }, "/sdk/uniapp/message/creating-messages/create-video-message-by-url": { - "body": "`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `videoPath` | string | null | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `duration` | number | null | 视频时长。 |\n| `videoType` | string | null | 视频 MIME 类型。 |\n| `videoUUID` | string | null | 视频资源的唯一标识。 |\n| `videoUrl` | string | null | 已上传视频的可访问地址。 |\n| `videoSize` | number | null | 视频大小,单位为字节。 |\n| `snapshotPath` | string | null | 快照文件的本地名称或业务路径。 |\n| `snapshotUUID` | string | null | 快照资源的唯一标识。 |\n| `snapshotSize` | number | null | 快照大小,单位为字节。 |\n| `snapshotUrl` | string | null | 已上传快照的可访问地址。 |\n| `snapshotWidth` | number | null | 快照宽度,单位为像素。 |\n| `snapshotHeight` | number | null | 快照高度,单位为像素。 |\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL({\n videoPath: '',\n duration,\n videoType: uploadedVideo.contentType,\n videoUUID: createBusinessUUID(),\n videoUrl: uploadedVideo.url,\n videoSize: uploadedVideo.size,\n snapshotPath: '',\n snapshotUUID: createBusinessUUID(),\n snapshotSize: uploadedSnapshot.size,\n snapshotUrl: uploadedSnapshot.url,\n snapshotWidth,\n snapshotHeight,\n})\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", + "body": "`createVideoMessageByURL()` 使用已经上传的视频和快照信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `videoPath` | `string` 或 `null` | 视频文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `duration` | `number` 或 `null` | 视频时长。 |\n| `videoType` | `string` 或 `null` | 视频 MIME 类型。 |\n| `videoUUID` | `string` 或 `null` | 视频资源的唯一标识。 |\n| `videoUrl` | `string` 或 `null` | 已上传视频的可访问地址。 |\n| `videoSize` | `number` 或 `null` | 视频大小,单位为字节。 |\n| `snapshotPath` | `string` 或 `null` | 快照文件的本地名称或业务路径。 |\n| `snapshotUUID` | `string` 或 `null` | 快照资源的唯一标识。 |\n| `snapshotSize` | `number` 或 `null` | 快照大小,单位为字节。 |\n| `snapshotUrl` | `string` 或 `null` | 已上传快照的可访问地址。 |\n| `snapshotWidth` | `number` 或 `null` | 快照宽度,单位为像素。 |\n| `snapshotHeight` | `number` 或 `null` | 快照高度,单位为像素。 |\n\n```uts\nimport { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createVideoMessageByURL({\n videoPath: '',\n duration,\n videoType: uploadedVideo.contentType,\n videoUUID: createBusinessUUID(),\n videoUrl: uploadedVideo.url,\n videoSize: uploadedVideo.size,\n snapshotPath: '',\n snapshotUUID: createBusinessUUID(),\n snapshotSize: uploadedSnapshot.size,\n snapshotUrl: uploadedSnapshot.url,\n snapshotWidth,\n snapshotHeight,\n})\n```\n\n视频 URL、封面 URL、UUID、大小、时长和类型必须使用上传后的真实值,接收方必须能访问两个资源。当前 `OpenIMVideoElem` 不包含 Wasm 版的 `snapShotType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`;发送时使用 `sendMessageNotOss()`。", "description": "使用已上传视频和封面的 OpenIMVideoElem 创建消息。", "headings": [ { @@ -2249,7 +2249,7 @@ "title": "从完整路径创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-file-message-by-url": { - "body": "`createFileMessageByURL()` 使用已经上传的文件信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `filePath` | string | null | 文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `fileName` | string | null | 对外展示的文件名。 |\n| `uuid` | string | null | 文件资源的唯一标识。 |\n| `sourceUrl` | string | null | 已上传文件的可访问地址。 |\n| `fileSize` | number | null | 文件大小,单位为字节。 |\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL({\n filePath: '',\n fileName: 'report.pdf',\n uuid: createBusinessUUID(),\n sourceUrl: uploaded.url,\n fileSize: uploaded.size,\n})\n```\n\n文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。", + "body": "`createFileMessageByURL()` 使用已经上传的文件信息创建消息。\n\n## 参数说明\n\n| 参数 | 类型 | 说明 |\n| --- | --- | --- |\n| `filePath` | `string` 或 `null` | 文件的本地名称或业务路径;只有远端资源时传空字符串。 |\n| `fileName` | `string` 或 `null` | 对外展示的文件名。 |\n| `uuid` | `string` 或 `null` | 文件资源的唯一标识。 |\n| `sourceUrl` | `string` 或 `null` | 已上传文件的可访问地址。 |\n| `fileSize` | `number` 或 `null` | 文件大小,单位为字节。 |\n\n```uts\nimport { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createFileMessageByURL({\n filePath: '',\n fileName: 'report.pdf',\n uuid: createBusinessUUID(),\n sourceUrl: uploaded.url,\n fileSize: uploaded.size,\n})\n```\n\n文件 URL、名称、UUID 和大小必须来自真实上传结果;URL 需要接收方可访问,不能直接暴露私有存储凭据。当前 `OpenIMFileElem` 不包含 Wasm 版的 `fileType` 字段,不要传入未公开字段。\n\nPromise 成功只创建待发送的 `OpenIMMessageItem | null`。由于资源已经上传,发送时使用 `sendMessageNotOss()`。", "description": "使用已上传文件的 OpenIMFileElem 创建消息。", "headings": [ { @@ -2262,7 +2262,7 @@ "title": "从 URL 创建文件消息" }, "/sdk/uniapp/message/creating-messages/create-card-message": { - "body": "## 参数说明\n\n`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照:\n\n| 参数 | 类型 | 建议 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | string | null | 必填 | 名片对应的用户 ID。 |\n| `nickname` | string | null | 必填 | 名片中保存的展示名称。 |\n| `faceURL` | string | null | 必填 | 名片中保存的头像地址。 |\n| `ex` | string | null | 必填 | 名片扩展信息;没有内容时传空字符串。 |\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alex',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n})\n```\n\nPromise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。", + "body": "## 参数说明\n\n`createCardMessage()` 接收 `OpenIMCardElem`。合同字段都是可选值,但创建可展示名片时应提供以下完整快照:\n\n| 参数 | 类型 | 建议 | 说明 |\n| --- | --- | --- | --- |\n| `userID` | `string` 或 `null` | 必填 | 名片对应的用户 ID。 |\n| `nickname` | `string` 或 `null` | 必填 | 名片中保存的展示名称。 |\n| `faceURL` | `string` 或 `null` | 必填 | 名片中保存的头像地址。 |\n| `ex` | `string` 或 `null` | 必填 | 名片扩展信息;没有内容时传空字符串。 |\n\n```uts\nimport { createCardMessage } from '@/uni_modules/unix-openim-sdk'\n\nconst message = await createCardMessage({\n userID: 'user_b',\n nickname: 'Alex',\n faceURL: 'https://example.com/avatar.png',\n ex: '',\n})\n```\n\nPromise 成功只创建 `OpenIMMessageItem | null`,不会自动发送。名片是创建时快照,不会随用户资料自动更新;接收方点击后应按 `userID` 查询最新资料,也不要把名片字段当作可信身份认证。", "description": "使用 OpenIMCardElem 创建用户名片消息。", "headings": [ { @@ -2342,7 +2342,7 @@ "title": "发送消息" }, "/sdk/uniapp/message/sending-messages/send-message-not-oss": { - "body": "`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 |\n| `offlinePushInfo` | OpenIMOfflinePush | null | 否 | 离线推送标题、描述和平台配置。 |\n| `isOnlineOnly` | boolean | null | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: urlMessage,\n})\n```\n\n资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。", + "body": "`sendMessageNotOss()` 适用于文件、图片、音频或视频已经通过业务上传服务取得 URL 的消息,可避免再次进入 SDK 的上传流程。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `recvID` | `string` | 条件必填 | 单聊时填写接收方用户 ID;群聊时传空字符串。 |\n| `groupID` | `string` | 条件必填 | 群聊时填写群组 ID;单聊时传空字符串。 |\n| `message` | `OpenIMMessageItem` | 是 | 由 URL 型创建 API 返回、已含远端资源的待发送消息。 |\n| `offlinePushInfo` | `OpenIMOfflinePush` 或 `null` | 否 | 离线推送标题、描述和平台配置。 |\n| `isOnlineOnly` | `boolean` 或 `null` | 否 | 是否只向在线客户端投递;此类消息不进入本地历史。 |\n\n```uts\nimport { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk'\n\nconst sentMessage = await sendMessageNotOss({\n recvID: receiverUserID,\n groupID: '',\n message: urlMessage,\n})\n```\n\n资源 URL、大小、类型、尺寸和时长必须来自实际上传结果。Promise 成功后直接返回服务端确认的 `OpenIMMessageItem`,应用按 `clientMsgID` 合并返回对象;字段见[消息概览](/zh/sdk/uniapp/message/overview-message)。\n\n该方法不会负责上传资源,也不适用于仍只包含本地文件的消息。把本地路径消息误交给本入口会导致接收方无法访问媒体;普通本地文件使用 `sendMessage()`。", "description": "发送已经准备好远端资源信息的消息。", "headings": [ { @@ -2405,7 +2405,7 @@ "title": "接收自定义业务与消息扩展事件" }, "/sdk/uniapp/message/retrieving-messages/load-older-messages": { - "body": "聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `lastMinSeq` | number | null | 否 | 上一页返回的最小序号,用于连续分页。 |\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n lastMinSeq,\n})\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 |\n| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 |\n| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 |\n| `errCode` | `number` | 历史读取结果状态码。 |\n| `errMsg` | `string` | 与状态码对应的说明。 |\n\n只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。\n\n商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", + "body": "聊天页面进入会话时使用公共入口 `getAdvancedHistoryMessageList()` 建立第一页快照;继续加载更早消息时,把当前最早一条消息的 `clientMsgID` 作为下一页游标。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` | 是 | 要读取历史消息的会话 ID。 |\n| `startClientMsgID` | `string` | 是 | 分页锚点消息 ID;第一页传空字符串。 |\n| `count` | `number` | 是 | 本次读取的消息数量。 |\n| `lastMinSeq` | `number` 或 `null` | 否 | 上一页返回的最小序号,用于连续分页。 |\n\n```uts\nimport { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk'\n\nconst page = await getAdvancedHistoryMessageList({\n conversationID,\n startClientMsgID: oldestMessage?.clientMsgID ?? '',\n count: 30,\n lastMinSeq,\n})\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMAdvancedHistoryMessageListResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `messageList` | `OpenIMMessageItem[]` | 当前页消息。 |\n| `lastMinSeq` | `number` | 继续读取时传回的最小序号。 |\n| `isEnd` | `boolean` | 是否到达当前加载方向的历史边界。 |\n| `errCode` | `number` | 历史读取结果状态码。 |\n| `errMsg` | `string` | 与状态码对应的说明。 |\n\n只有 `errCode` 表示成功时才合并 `messageList`;Promise 被拒绝时仍按通用错误处理。按 `conversationID` 限定列表,并以 `clientMsgID` 去重;查询不会触发新消息事件。\n\n商业版 `getHistoryMessageList()` 商业版 额外要求 `isReverse`,并支持可选 `viewType` 和 `lastMinSeq`。不要把它等同于已删除的单独 reverse-history 页面;方向通过参数表达。", "description": "按会话和 clientMsgID 游标读取历史消息。", "headings": [ { @@ -2449,7 +2449,7 @@ "title": "加载消息上下文" }, "/sdk/uniapp/message/searching-messages/search-messages": { - "body": "`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。\n\n搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。\n\n## 创建搜索查询\n\n`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。\n\n```uts\nimport {\n OpenIMMessageTypeAtText,\n OpenIMMessageTypeText,\n searchLocalMessages,\n type OpenIMMessageItem,\n type OpenIMSearchMessageResult,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: [keyword.trim()],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 20,\n})\n```\n\n## 高级搜索\n\n可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。\n\n```uts\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['release'],\n keywordListMatchType: 0,\n senderUserIDList: [senderUserID],\n messageTypeList: [OpenIMMessageTypeText],\n searchTimePosition,\n searchTimePeriod,\n pageIndex: 1,\n count: 20,\n})\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | string | null | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 |\n| `keywordList` | `string[]` | 是 | 关键词列表。 |\n| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 |\n| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 |\n| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 |\n| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 |\n| `count` | `number` | 是 | 每页返回数量。 |\n\n如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。\n\n## 处理分页结果\n\nPromise 成功后,结果是 `OpenIMSearchMessageResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下匹配的消息总数。 |\n| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 |\n\n每个结果项包含:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationID` | `string` | 结果所属会话 ID。 |\n| `conversationType` | `OpenIMSessionType` | 会话类型。 |\n| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 |\n| `latestMsgSendTime` | number | null | 当前结果会话的最新消息时间。 |\n| `messageCount` | `number` | 当前结果项的匹配消息数量。 |\n| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 |\n\n可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID:\n\n```uts\ntype SearchMessageRow = {\n conversationID : string\n clientMsgID : string\n message : OpenIMMessageItem\n}\n\nfunction toSearchRows(result : OpenIMSearchMessageResult) : Array {\n const rows : Array = []\n result.searchResultItems.forEach((item) => {\n item.messageList.forEach((message) => {\n const clientMsgID = message.clientMsgID\n if (clientMsgID != null) {\n rows.push({\n conversationID: item.conversationID,\n clientMsgID,\n message,\n })\n }\n })\n })\n return rows\n}\n```\n\n分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。\n\n## 处理搜索结果变化\n\n命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。\n\n跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。\n\n需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。\n\n## 相关页面\n\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", + "body": "`searchLocalMessages()` 搜索当前用户本地已经同步的消息。群消息搜索的目标参数是群聊对应的 `conversationID`,不是发送消息时使用的 `groupID`;如果只保存了群 ID,先按[获取会话 ID](/zh/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id)取得群会话 ID。\n\n搜索范围来自 SDK 本地数据库。跨用户审计、服务端全量检索、复杂权限过滤或全局排序应由后端搜索服务承担,再把命中的 `conversationID` 和 `clientMsgID` 返回客户端定位。\n\n## 创建搜索查询\n\n`keywordList` 接收一个或多个关键词。搜索框通常只代表一次输入,应先去除首尾空格并过滤空值。\n\n```uts\nimport {\n OpenIMMessageTypeAtText,\n OpenIMMessageTypeText,\n searchLocalMessages,\n type OpenIMMessageItem,\n type OpenIMSearchMessageResult,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: [keyword.trim()],\n keywordListMatchType: 0,\n senderUserIDList: [],\n messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText],\n searchTimePosition: 0,\n searchTimePeriod: 0,\n pageIndex: 1,\n count: 20,\n})\n```\n\n## 高级搜索\n\n可以使用发送者、消息类型和时间窗口缩小范围。当前 `OpenIMSearchLocalMessagesParams` 除 `conversationID` 外的筛选与分页字段均为必填;不限制某个数组条件时传空数组,不限制时间时按服务端约定传 `0`。\n\n```uts\nconst result = await searchLocalMessages({\n conversationID,\n keywordList: ['release'],\n keywordListMatchType: 0,\n senderUserIDList: [senderUserID],\n messageTypeList: [OpenIMMessageTypeText],\n searchTimePosition,\n searchTimePeriod,\n pageIndex: 1,\n count: 20,\n})\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationID` | `string` 或 `null` | 否 | 要搜索的会话 ID;省略时搜索当前本地可见范围。 |\n| `keywordList` | `string[]` | 是 | 关键词列表。 |\n| `keywordListMatchType` | `number` | 是 | 多关键词匹配方式,使用 SDK 数字约定。 |\n| `senderUserIDList` | `string[]` | 是 | 只搜索这些用户发送的消息;不限制时传空数组。 |\n| `messageTypeList` | `OpenIMMessageType[]` | 是 | 只搜索指定类型;不限制时传空数组。 |\n| `searchTimePosition` | `number` | 是 | 搜索结束位置,Unix 时间戳,单位为秒。 |\n| `searchTimePeriod` | `number` | 是 | 从结束位置向前搜索的时间范围,单位为秒。 |\n| `pageIndex` | `number` | 是 | 搜索结果页码,第一页传 `1`。 |\n| `count` | `number` | 是 | 每页返回数量。 |\n\n如果搜索入口允许图片、文件或自定义消息,把相应 `OpenIMMessageType` 常量加入 `messageTypeList`。匹配类型、时间单位和页码必须服从合同及服务端约定。\n\n## 处理分页结果\n\nPromise 成功后,结果是 `OpenIMSearchMessageResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `totalCount` | `number` | 当前条件下匹配的消息总数。 |\n| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | 按会话分组的搜索结果。 |\n\n每个结果项包含:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationID` | `string` | 结果所属会话 ID。 |\n| `conversationType` | `OpenIMSessionType` | 会话类型。 |\n| `showName`、`faceURL` | `string` | 会话展示名称与头像快照。 |\n| `latestMsgSendTime` | `number` 或 `null` | 当前结果会话的最新消息时间。 |\n| `messageCount` | `number` | 当前结果项的匹配消息数量。 |\n| `messageList` | `OpenIMMessageItem[]` | 匹配消息。 |\n\n可以把分组结果转换为业务搜索行,但必须保留会话 ID 和消息 ID:\n\n```uts\ntype SearchMessageRow = {\n conversationID : string\n clientMsgID : string\n message : OpenIMMessageItem\n}\n\nfunction toSearchRows(result : OpenIMSearchMessageResult) : Array {\n const rows : Array = []\n result.searchResultItems.forEach((item) => {\n item.messageList.forEach((message) => {\n const clientMsgID = message.clientMsgID\n if (clientMsgID != null) {\n rows.push({\n conversationID: item.conversationID,\n clientMsgID,\n message,\n })\n }\n })\n })\n return rows\n}\n```\n\n分页时保持相同的会话、关键词和筛选条件,只递增 `pageIndex`。用户修改任一条件时,把页码重置为 `1` 并清空旧结果。同一搜索页按 `conversationID:clientMsgID` 去重,不要按结果位置保存选中项。查询不会触发消息事件。\n\n## 处理搜索结果变化\n\n命中的消息可能在页面打开后被撤回或删除,搜索范围也可能因新消息同步而变化。统一事件处理器见[接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)、[批量删除消息](/zh/sdk/uniapp/message/managing-messages/delete-saved-messages)和[撤回消息](/zh/sdk/uniapp/message/managing-messages/revoke-a-message);本页只负责查询和分页,不重复注册消息事件。\n\n跳转时使用结果中的 `conversationID` 和 `clientMsgID` 定位。需要展示前后聊天记录时,把命中的完整 `OpenIMMessageItem` 作为起点读取[消息上下文](/zh/sdk/uniapp/message/retrieving-messages/load-message-context),不要用 `findMessageList()` 拼接附近记录。\n\n需要显示当前时刻的结果时,可以用相同条件重新执行当前页搜索。搜索 Promise、消息事件增量和重新查询是三条独立路径;重新登录后必须清除旧账号搜索状态,并由新事件作用域继续同步。\n\n## 相关页面\n\n- [按 ID 查找消息](/zh/sdk/uniapp/message/retrieving-messages/find-messages-by-id)\n- [加载历史消息](/zh/sdk/uniapp/message/retrieving-messages/load-older-messages)\n- [接收消息](/zh/sdk/uniapp/message/receiving-messages/receive-messages)", "description": "按关键词、发送者、类型和时间范围搜索消息。", "headings": [ { @@ -2501,7 +2501,7 @@ "title": "查询输入状态" }, "/sdk/uniapp/message/composing-messages/check-speech-to-text": { - "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\nPromise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | string[] | null | 支持的音频格式。 |\n| `sampleRateHz` | number[] | null | 支持的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | number | null | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | number | null | 最大文件大小,单位为字节。 |\n| `provider` | string | null | 当前语音识别服务提供方。 |\n| `requestType` | string | null | 服务端要求的请求类型。 |\n| `crossDomain` | boolean | null | 是否允许跨域处理。 |\n\n在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。", + "body": "`getSpeechToTextCapabilities()` 商业版 返回能力信息。\n\n```uts\nimport { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk'\n\nconst capabilities = await getSpeechToTextCapabilities()\n```\n\nPromise 成功后,结果是 `OpenIMSpeechToTextCapabilitiesResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `format` | `string[]` 或 `null` | 支持的音频格式。 |\n| `sampleRateHz` | `number[]` 或 `null` | 支持的音频采样率,单位为赫兹。 |\n| `maxRecordTimeMs` | `number` 或 `null` | 最大录音时长,单位为毫秒。 |\n| `maxFileSize` | `number` 或 `null` | 最大文件大小,单位为字节。 |\n| `provider` | `string` 或 `null` | 当前语音识别服务提供方。 |\n| `requestType` | `string` 或 `null` | 服务端要求的请求类型。 |\n| `crossDomain` | `boolean` 或 `null` | 是否允许跨域处理。 |\n\n在展示转写入口前查询并缓存当前 session 的结果。录音完成后按能力字段校验格式、采样率、时长和字节数;能力可能随服务端、语言或账号变化,重新登录后应刷新。查询失败或没有能力时停用入口,不要猜测限制。查询不会触发消息事件。", "description": "商业版查询当前语音转写能力。", "headings": [], "sourcePath": "/sdk/uniapp/message/composing-messages/check-speech-to-text", @@ -2710,7 +2710,7 @@ "title": "查询群消息已读成员" }, "/sdk/uniapp/file-uploads/upload-file": { - "body": "`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 |\n| `name` | `string` | 是 | 文件名。 |\n| `contentType` | `string` | 是 | MIME 类型。 |\n| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 |\n| `cancelID` | string | null | 否 | 用于取消本次上传的稳定 ID。 |\n| `cause` | string | null | 否 | 业务侧记录的上传用途或原因。 |\n\n如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。\n\n```uts\nimport {\n off,\n onUploadFileProgress,\n uploadFile,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst progressSubscription = onUploadFileProgress((event) => {\n if (event == null) return\n updateUploadProgress(event.progress)\n})\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n\nfunction removeUploadListener() {\n off(progressSubscription)\n}\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMUploadFileResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `url` | string | null | 上传后的远端资源 URL。 |\n| `uri` | string | null | 服务端返回的资源 URI。 |\n| `uuid` | string | null | 本次上传的任务标识。 |\n| `size` | number | null | 文件大小。 |\n| `typ` | number | null | 服务端返回的资源类型。 |\n| `mediaID` | string | null | 媒体资源 ID。 |\n\n使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。\n\n## 监听上传进度\n\n`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", + "body": "`uploadFile()` 是独立上传能力,可用于头像、群头像、资料附件或其他业务文件,不从属于消息,也不会自动创建消息。它上传原生层可读的本地文件,并返回 URL/URI、UUID、大小和媒体信息。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `filepath` | `string` | 是 | 原生层可读取的本地完整路径。 |\n| `name` | `string` | 是 | 文件名。 |\n| `contentType` | `string` | 是 | MIME 类型。 |\n| `uuid` | `string` | 是 | 业务为本次上传生成的稳定任务 ID。 |\n| `cancelID` | `string` 或 `null` | 否 | 用于取消本次上传的稳定 ID。 |\n| `cause` | `string` 或 `null` | 否 | 业务侧记录的上传用途或原因。 |\n\n如果界面需要显示进度,应在调用 `uploadFile()` 前注册进度事件,避免较小文件在监听建立前完成上传。\n\n```uts\nimport {\n off,\n onUploadFileProgress,\n uploadFile,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst progressSubscription = onUploadFileProgress((event) => {\n if (event == null) return\n updateUploadProgress(event.progress)\n})\n\nconst result = await uploadFile({\n filepath: '/data/user/0/app/cache/report.pdf',\n name: 'report.pdf',\n contentType: 'application/pdf',\n uuid: createStableUploadUUID(),\n cancelID: 'upload-report-1',\n})\n\nfunction removeUploadListener() {\n off(progressSubscription)\n}\n```\n\n路径必须是原生可读的完整路径。`unifile://` 先转换为平台沙盒路径;不要把网络 URL 作为 `filepath`。Android 和 iOS 的临时目录、文件授权与生命周期不同,上传完成前不要移动或删除原文件。\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMUploadFileResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `url` | `string` 或 `null` | 上传后的远端资源 URL。 |\n| `uri` | `string` 或 `null` | 服务端返回的资源 URI。 |\n| `uuid` | `string` 或 `null` | 本次上传的任务标识。 |\n| `size` | `number` 或 `null` | 文件大小。 |\n| `typ` | `number` 或 `null` | 服务端返回的资源类型。 |\n| `mediaID` | `string` 或 `null` | 媒体资源 ID。 |\n\n使用 `result?.url` 写入头像、群资料或创建对应消息对象。Promise 成功只表示上传请求成功,不表示资料已经更新,也不表示聊天消息已经创建或发送;后续业务写入必须单独完成。\n\n## 监听上传进度\n\n`onUploadFileProgress` 返回 `OpenIMSDKEventSubscription`,事件只包含 `progress`。当前 uni-app / uni-app x 合同不像 Wasm 完成事件那样携带任务 ID,因此不要依赖数组位置关联并行任务;需要精确展示多个并行上传时,应由业务层限制并发或按各自 Promise 状态管理。账号退出或上传状态层销毁时调用 `removeUploadListener()`。\n\n商业版可以通过 `cancelUpload()` 商业版 取消同一 `cancelID`:\n\n```uts\nimport { cancelUpload } from '@/uni_modules/unix-openim-sdk'\n\nawait cancelUpload({ cancelID: 'upload-report-1' })\n```\n\n取消是异步请求,最终状态以原上传 Promise 和错误码为准。退出页面时不要删除仍被原生层读取的临时文件,先完成或取消上传。", "description": "上传本地文件、观察进度,并在商业版取消上传。", "headings": [ { @@ -2761,7 +2761,7 @@ "title": "音视频信令概览" }, "/sdk/uniapp/calling/managing-calls/start-single-call": { - "body": "`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 |\n| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 否 | 推送标题。 |\n| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 |\n| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeSingle,\n signalingInvite,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n customData: JSON.stringify({ source: 'contact-card' }),\n groupID: '',\n roomID: createBusinessRoomID(),\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeSingle,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo: {\n title: '视频通话',\n desc: '你收到一个视频通话邀请',\n ex: '',\n iOSPushSound: 'default',\n iOSBadgeCount: true,\n },\n})\n```\n\niOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。\n\n## 返回结果\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 本次通话的媒体房间 ID。 |\n| `token` | string | null | 加入媒体房间使用的短期凭据,只应保存在内存中。 |\n| `liveURL` | string | null | 媒体服务返回的房间连接地址。 |\n| `busyLineUserIDList` | string[] | null | 因忙线未能进入邀请流程的用户 ID。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 |\n\n取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", + "body": "`signalingInvite()` 商业版 发起单聊通话。`unix-openim-sdk` 负责通话信令,应用仍需使用返回的房间凭据接入实时音视频媒体引擎。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `invitation` | `OpenIMSignalingInvitationInfo` | 是 | 本次通话邀请。 |\n| `invitation.inviterUserID` | `string` | 是 | 当前登录用户 ID。 |\n| `invitation.inviteeUserIDList` | `string[]` | 是 | 被邀请用户列表;单聊只填写对方一个用户。 |\n| `invitation.groupID` | `string` | 是 | 单聊固定传空字符串。 |\n| `invitation.roomID` | `string` | 是 | 本次通话的唯一房间标识,后续状态按它合并。 |\n| `invitation.timeout` | `number` | 是 | 邀请等待时长,单位为秒。 |\n| `invitation.mediaType` | `string` | 是 | 媒体类型,业务通常约定为 `audio` 或 `video`。 |\n| `invitation.sessionType` | `number` | 是 | 单聊传 `OpenIMSessionTypeSingle`。 |\n| `invitation.platformID` | `number` | 是 | 当前客户端平台;Android/iOS 分别使用对应平台常量。 |\n| `invitation.customData` | `string` | 否 | 随邀请携带的业务扩展字符串。 |\n| `invitation.initiateTime` | `number` | 否 | 邀请发起时间,通常由信令链路维护。 |\n| `invitation.busyLineUserIDList` | `string[]` | 否 | 忙线用户列表;发起新邀请时通常不填写。 |\n| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | 否 | 被邀请人离线时使用的推送内容。 |\n| `offlinePushInfo.title` | `string` | 否 | 推送标题。 |\n| `offlinePushInfo.desc` | `string` | 否 | 推送正文。 |\n| `offlinePushInfo.ex` | `string` | 否 | 推送扩展字符串。 |\n| `offlinePushInfo.iOSPushSound` | `string` | 否 | iOS 推送声音。 |\n| `offlinePushInfo.iOSBadgeCount` | `boolean` | 否 | 是否更新 iOS 角标。 |\n\n```uts\nimport {\n OpenIMPlatformAndroid,\n OpenIMSessionTypeSingle,\n signalingInvite,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingInvite({\n invitation: {\n inviterUserID: currentUserID,\n inviteeUserIDList: [peerUserID],\n customData: JSON.stringify({ source: 'contact-card' }),\n groupID: '',\n roomID: createBusinessRoomID(),\n mediaType: 'video',\n timeout: 30,\n sessionType: OpenIMSessionTypeSingle,\n platformID: OpenIMPlatformAndroid,\n },\n offlinePushInfo: {\n title: '视频通话',\n desc: '你收到一个视频通话邀请',\n ex: '',\n iOSPushSound: 'default',\n iOSBadgeCount: true,\n },\n})\n```\n\niOS 端将 `platformID` 改为 `OpenIMPlatformIOS`。房间 ID 应由业务生成并在本次通话各参与端保持一致。\n\n## 返回结果\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingInviteResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` 或 `null` | 本次通话的媒体房间 ID。 |\n| `token` | `string` 或 `null` | 加入媒体房间使用的短期凭据,只应保存在内存中。 |\n| `liveURL` | `string` 或 `null` | 媒体服务返回的房间连接地址。 |\n| `busyLineUserIDList` | `string[]` 或 `null` | 因忙线未能进入邀请流程的用户 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 服务端返回的邀请快照。 |\n\n取得有效的 `token` 和 `roomID` 后再连接媒体房间。Promise 成功只表示信令请求完成并取得房间凭据,不表示对方已经接听;后续状态见[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)。邀请成功后若页面展示失败,应主动取消。不要在日志中打印 token 或 liveURL。", "description": "商业版向一个用户发起音频或视频邀请。", "headings": [ { @@ -2792,7 +2792,7 @@ "title": "发起群通话" }, "/sdk/uniapp/calling/managing-calls/accept-call": { - "body": "从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`:\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingAccept({ invitation })\n```\n\n`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 本次通话的媒体房间 ID。 |\n| `token` | string | null | 加入媒体房间使用的短期凭据。 |\n| `liveURL` | string | null | 媒体服务返回的连接地址。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 服务端返回的邀请快照。 |\n\n这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。", + "body": "从 `onReceiveNewInvitation` 取得原始 `OpenIMSignalingInvitationInfo` 后,先校验当前 session,并请求麦克风或摄像头权限,再调用 `signalingAccept()`:\n\n```uts\nimport { signalingAccept } from '@/uni_modules/unix-openim-sdk'\n\nconst roomCredentials = await signalingAccept({ invitation })\n```\n\n`invitation` 必须保留收到的原始 `roomID`、邀请人、被邀请人和会话类型,不能重新构造。权限失败时不得发送 accept,应按产品策略拒绝或提示用户。\n\nPromise 成功后,`roomCredentials` 是 `OpenIMSignalingAcceptResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` 或 `null` | 本次通话的媒体房间 ID。 |\n| `token` | `string` 或 `null` | 加入媒体房间使用的短期凭据。 |\n| `liveURL` | `string` 或 `null` | 媒体服务返回的连接地址。 |\n| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 服务端返回的邀请快照。 |\n\n这些字段均为可选值且敏感,只保存在内存中。取得有效的 `token` 和 `roomID` 后再连接媒体房间;Promise 成功、对方收到接受事件和媒体真正连接是不同阶段。后续状态由[通话事件](/zh/sdk/uniapp/calling/managing-calls/handle-call-events)继续合并。", "description": "商业版接受邀请并取得房间凭据。", "headings": [], "sourcePath": "/sdk/uniapp/calling/managing-calls/accept-call", @@ -2840,7 +2840,7 @@ "title": "恢复启动时邀请" }, "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id": { - "body": "`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`:\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst room = await signalingGetRoomByGroupID({ groupID })\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | string | null | 当前群通话的房间 ID。 |\n| `invitation` | OpenIMSignalingInvitationInfo | null | 当前房间对应的原始邀请信息。 |\n\n当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。\n\n空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。", + "body": "`signalingGetRoomByGroupID()` 的参数是群组 ID,不是自定义 `roomID`:\n\n```uts\nimport { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk'\n\nconst room = await signalingGetRoomByGroupID({ groupID })\n```\n\n## 返回结果\n\nPromise 成功后,结果是 `OpenIMSignalingGetRoomByGroupIDResult | null` 快照:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `roomID` | `string` 或 `null` | 当前群通话的房间 ID。 |\n| `invitation` | `OpenIMSignalingInvitationInfo` 或 `null` | 当前房间对应的原始邀请信息。 |\n\n当前 uni-app / uni-app x 合同不像 Wasm 结果那样包含参与者资料;成员快照应由媒体引擎或业务状态提供,不要伪造 `participant` 字段。\n\n空结果或空 `roomID` 表示没有可加入房间。查询结果可能在返回后过期,真正加入前继续处理信令事件并通过 `signalingGetTokenByRoomID()` 获取有效 Token。若业务为群通话使用自定义房间 ID,仍需用 `groupID` 调用本方法,再按返回或已保存的 `roomID` 合并通话状态。", "description": "商业版查询群当前关联的 roomID 与邀请。", "headings": [ { From aac348a786d6cf79cfa4f582fbe945cc2d1ce75d Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:45:55 +0800 Subject: [PATCH 14/20] docs(uniapp): align English calling guides with Wasm --- .../calling/managing-calls/accept-call.mdx | 19 +++++- .../calling/managing-calls/cancel-call.mdx | 6 +- .../managing-calls/handle-call-events.mdx | 59 ++++++++++++++--- .../calling/managing-calls/hang-up-call.mdx | 6 +- .../calling/managing-calls/reject-call.mdx | 4 +- .../managing-calls/start-group-call.mdx | 49 ++++++++++++-- .../managing-calls/start-single-call.mdx | 62 +++++++++++++++-- .../sdk/uniapp/calling/overview-calling.mdx | 45 ++++++++++++- .../get-room-by-group-id.mdx | 17 ++++- .../get-token-by-room-id.mdx | 8 ++- .../restore-pending-invitation.mdx | 10 ++- .../send-a-custom-signal.mdx | 66 +++++++++++++++++-- 12 files changed, 313 insertions(+), 38 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx index 9ebd51131e..9b82fd69cb 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/accept-call.mdx @@ -14,7 +14,22 @@ sourcePath: '/sdk/uniapp/calling/managing-calls/accept-call' ```uts import { signalingAccept } from '@/uni_modules/unix-openim-sdk' -const result = await signalingAccept({ invitation }) +const roomCredentials = await signalingAccept({ invitation }) ``` -This is Commercial. Validate the session and obtain microphone/camera permission before sending accept. Keep optional token/room/live URL only in memory. Promise completion, remote events, and media connection are separate phases. +`signalingAccept()` is Commercial. Pass the original `OpenIMSignalingInvitationInfo` received from `onReceiveNewInvitation`; it must retain the room, inviter, invitees, and session type. Do not reconstruct it. + +Validate the active SDK session and request microphone or camera permission before accepting. If permission is denied, do not send an accept request; reject the call or explain the failure according to the product flow. + +## Result + +The Promise resolves to `OpenIMSignalingAcceptResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `roomID` | `string` or `null` | Media room identifier for this call. | +| `token` | `string` or `null` | Short-lived credential used to join the room. | +| `liveURL` | `string` or `null` | Media service connection address. | +| `invitation` | `OpenIMSignalingInvitationInfo` or `null` | Invitation snapshot returned by the server. | + +Keep these values only in memory. Join the media engine only after obtaining a valid `roomID` and `token`. Promise completion, remote signaling events, and an established media connection are separate phases; continue merging state through [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx index 86ea9edc70..287c33233f 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/cancel-call.mdx @@ -17,4 +17,8 @@ import { signalingCancel } from '@/uni_modules/unix-openim-sdk' await signalingCancel({ invitation }) ``` -This Commercial operation is for a caller before connection; hangup is for an accepted/connecting session. Prevent duplicate actions and resolve cancel/accept races from events. +`signalingCancel()` is Commercial and is called by the inviter while the invitation is still unanswered. Pass the complete original `OpenIMSignalingInvitationInfo`; a newly constructed object containing only `roomID` is not sufficient. + +Cancellation and hangup have different meanings: cancel an unanswered invitation, and hang up an accepted or connecting session. + +Promise success means the cancel signaling request completed. The app must also leave its local waiting state and release media resources that were prepared but not used. The remote side updates through `onInvitationCancelled`. Prevent duplicate actions and resolve cancel/accept races from [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx index d5b6636a23..5b7f1842f5 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/handle-call-events.mdx @@ -11,23 +11,64 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/managing-calls/handle-call-events' --- -All Commercial call events deliver raw JSON strings. Acknowledge quickly, validate JSON, then map to your own call domain model. +Keep Commercial call listeners in one call-state layer. Merge invitation lifecycle, participant connection, and stream changes into the same local state keyed by `roomID`. Every event delivers a raw JSON string; keep the callback short, validate JSON, and then map it to the application's call domain model. + +| Event | Purpose | +| --- | --- | +| `onReceiveNewInvitation` | A new call invitation arrived. | +| `onInviteeAccepted`, `onInviteeRejected` | The current invitation was accepted or rejected. | +| `onInvitationCancelled`, `onInvitationTimeout` | The invitation was cancelled or timed out. | +| `onInviteeAcceptedByOtherDevice`, `onInviteeRejectedByOtherDevice` | Another device for the same account handled it. | +| `onHangUp` | A participant ended the call. | +| `onRoomParticipantConnected`, `onRoomParticipantDisconnected` | Room participant connection changed. | +| `onStreamChange` | Participant media stream state changed. | ```uts -import { off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeRejected, onReceiveNewInvitation } from '@/uni_modules/unix-openim-sdk' +import { + off, + onHangUp, + onInvitationCancelled, + onInvitationTimeout, + onInviteeAccepted, + onInviteeAcceptedByOtherDevice, + onInviteeRejected, + onInviteeRejectedByOtherDevice, + onReceiveNewInvitation, + onRoomParticipantConnected, + onRoomParticipantDisconnected, + onStreamChange, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' function handleCallPayload(payload : string) { try { const value = JSON.parseObject(payload) if (value != null) routeValidatedCallEvent(value) - } catch (_) { console.error('Invalid call event payload') } + } catch (_) { + console.error('Invalid call event payload') + } } -const subscriptions = [ - onReceiveNewInvitation(handleCallPayload), onInviteeAccepted(handleCallPayload), - onInviteeRejected(handleCallPayload), onInvitationCancelled(handleCallPayload), - onInvitationTimeout(handleCallPayload), onHangUp(handleCallPayload), + +const invitationSubscription = onReceiveNewInvitation(handleCallPayload) +const subscriptions : Array = [ + invitationSubscription, + onInviteeAccepted(handleCallPayload), + onInviteeAcceptedByOtherDevice(handleCallPayload), + onInviteeRejected(handleCallPayload), + onInviteeRejectedByOtherDevice(handleCallPayload), + onInvitationCancelled(handleCallPayload), + onInvitationTimeout(handleCallPayload), + onHangUp(handleCallPayload), + onRoomParticipantConnected(handleCallPayload), + onRoomParticipantDisconnected(handleCallPayload), + onStreamChange(handleCallPayload), ] -subscriptions.forEach((subscription) => off(subscription)) + +function removeCallListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -Also register the documented other-device and room-participant events. HarmonyOS returns an unsupported subscription for `onStreamChange`. Deduplicate by room/session plus runtime generation, and never log raw payloads or RTC tokens. +This page is the sole complete listener owner for these 11 events. Merge participant state using both room and user IDs; do not rely on event order, display names, or array positions. Deduplicate with the room ID, local session ID, and runtime generation so stale events cannot reopen UI. Call `removeCallListeners()` when the call state layer is destroyed, the user logs out, or the account changes. + +HarmonyOS returns a `platform-unsupported` subscription for `onStreamChange` and does not fabricate a stream event. The other signaling events on this page are supported. Never log raw payloads or RTC tokens. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx index 9337c17358..a3e22dd534 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/hang-up-call.mdx @@ -17,4 +17,8 @@ import { signalingHungUp } from '@/uni_modules/unix-openim-sdk' await signalingHungUp({ invitation }) ``` -Lock the Commercial ending transition so local, remote, and network causes cannot execute it twice. Close media resources and process `onHangUp` idempotently. +After a call has connected, a participant uses the Commercial `signalingHungUp()` operation. Pass the complete `OpenIMSignalingInvitationInfo` used by the current call; its `roomID` must match the active media room. + +Promise success only means the hangup signaling request completed. The application must also stop local capture, disconnect the media room, and release camera, microphone, and page resources. + +Lock the ending transition so local UI actions, remote hangup, timeout, and network errors cannot execute cleanup twice. Cancellation, rejection, timeout, and hangup should converge on one idempotent cleanup flow keyed by `roomID`. Continue handling `onHangUp` as documented in [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx index 23fe82b3b6..d21116afde 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/reject-call.mdx @@ -17,4 +17,6 @@ import { signalingReject } from '@/uni_modules/unix-openim-sdk' await signalingReject({ invitation }) ``` -Use the complete received Commercial invitation; do not reconstruct it or alter `roomID`. Close local incoming UI and handle remote/multi-device events idempotently. +When the user declines an incoming call, pass the complete received `OpenIMSignalingInvitationInfo` to the Commercial `signalingReject()` operation. Do not reconstruct the invitation or alter its `roomID`. + +Promise success only means OpenIMServer completed the reject request. The local incoming-call UI can then close, while the inviter updates through `onInviteeRejected`. Remote and multi-device events may race with the local action and must be handled idempotently. See [call events](/sdk/uniapp/calling/managing-calls/handle-call-events) for the complete lifecycle. diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx index cf4705d8f7..94ffdc68b1 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-group-call.mdx @@ -11,12 +11,53 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/managing-calls/start-group-call' --- +The Commercial `signalingInviteInGroup()` operation starts a group call. It invites only the users listed in `inviteeUserIDList`; setting `groupID` does not automatically invite every group member. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `invitation.inviterUserID` | `string` | Yes | Current user ID. | +| `invitation.inviteeUserIDList` | `string[]` | Yes | Selected members; exclude the inviter. | +| `invitation.groupID` | `string` | Yes | Target group ID. | +| `invitation.roomID` | `string` | Yes | Shared unique room identifier. | +| `invitation.timeout` | `number` | Yes | Invitation timeout in seconds. | +| `invitation.mediaType` | `string` | Yes | `audio` or `video` by application convention. | +| `invitation.sessionType` | `number` | Yes | Use the matching group session constant. | +| `invitation.platformID` | `number` | Yes | Current native platform constant. | +| `invitation.customData` | `string` | No | Application extension data. | +| `invitation.initiateTime` | `number` | No | Invitation start time. The signaling flow normally maintains it, so new calls can omit it. | +| `invitation.busyLineUserIDList` | `string[]` | No | Busy-user list returned by an existing flow. Omit it when starting a new invitation. | +| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | No | Offline push content. | +| `offlinePushInfo.title` | `string` | Conditional | Push title, required when `offlinePushInfo` is provided. | +| `offlinePushInfo.desc` | `string` | Conditional | Push body, required when `offlinePushInfo` is provided. | +| `offlinePushInfo.ex` | `string` | Conditional | Extension string, required when `offlinePushInfo` is provided. Pass an empty string if unused. | +| `offlinePushInfo.iOSPushSound` | `string` | Conditional | iOS push sound, required when `offlinePushInfo` is provided. | +| `offlinePushInfo.iOSBadgeCount` | `boolean` | Conditional | Whether the push updates the iOS badge, required when `offlinePushInfo` is provided. | + ```uts -import { signalingInviteInGroup } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMPlatformAndroid, + OpenIMSessionTypeWriteGroup, + signalingInviteInGroup, +} from '@/uni_modules/unix-openim-sdk' -const result = await signalingInviteInGroup({ - invitation: { inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2 }, +const roomCredentials = await signalingInviteInGroup({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: selectedGroupMemberIDs, + customData: JSON.stringify({ source: 'group-call' }), + groupID, + roomID: groupID, + timeout: 30, + mediaType: 'video', + sessionType: OpenIMSessionTypeWriteGroup, + platformID: OpenIMPlatformAndroid, + }, + offlinePushInfo, }) ``` -This is Commercial. Deduplicate targets and verify current membership. Busy users do not determine later accept/reject/timeout outcomes for all other invitees. +This example reuses the group ID as the room ID. If the application generates a different room ID, all participants must use that value. Use `OpenIMPlatformIOS` on iOS. Exclude the current user, blank IDs, and duplicates, and verify that selected users are still group members. + +The Promise resolves to `OpenIMSignalingInviteResult | null`; see [Start a one-to-one call](/sdk/uniapp/calling/managing-calls/start-single-call) for all fields. A busy-user list only identifies members who were busy at invite time. It must not cancel invitations for other users, and success does not mean anyone has accepted. Merge later acceptance, rejection, and timeout through [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx index 5c2e31d376..7683c0818f 100644 --- a/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx +++ b/content/docs/chat/sdk/uniapp/calling/managing-calls/start-single-call.mdx @@ -11,13 +11,65 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/managing-calls/start-single-call' --- +The Commercial `signalingInvite()` operation starts a one-to-one audio or video call. `unix-openim-sdk` creates the signaling invitation; the application still joins its media engine with the returned room credentials. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `invitation` | `OpenIMSignalingInvitationInfo` | Yes | Invitation for this call. | +| `invitation.inviterUserID` | `string` | Yes | Current logged-in user ID. | +| `invitation.inviteeUserIDList` | `string[]` | Yes | Invitees; use one peer for a one-to-one call. | +| `invitation.groupID` | `string` | Yes | Use an empty string for one-to-one calls. | +| `invitation.roomID` | `string` | Yes | Unique room identifier shared by all call state. | +| `invitation.timeout` | `number` | Yes | Invitation timeout in seconds. | +| `invitation.mediaType` | `string` | Yes | Application convention such as `audio` or `video`. | +| `invitation.sessionType` | `number` | Yes | Use `OpenIMSessionTypeSingle`. | +| `invitation.platformID` | `number` | Yes | Current native platform constant. | +| `invitation.customData` | `string` | No | Application extension data. | +| `offlinePushInfo` | `OpenIMSignalingOfflinePushInfo` | No | Offline push title, description, and iOS settings. | + ```uts -import { signalingInvite } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMPlatformAndroid, + OpenIMSessionTypeSingle, + signalingInvite, +} from '@/uni_modules/unix-openim-sdk' -const result = await signalingInvite({ - invitation: { inviterUserID: selfUserID, inviteeUserIDList: [peerUserID], mediaType: 'video', timeout: 30, sessionType: 1 }, - offlinePushInfo: { title: 'Video call', desc: 'Incoming call' }, +const roomCredentials = await signalingInvite({ + invitation: { + inviterUserID: currentUserID, + inviteeUserIDList: [peerUserID], + customData: JSON.stringify({ source: 'contact-card' }), + groupID: '', + roomID: createBusinessRoomID(), + timeout: 30, + mediaType: 'video', + sessionType: OpenIMSessionTypeSingle, + platformID: OpenIMPlatformAndroid, + }, + offlinePushInfo: { + title: 'Video call', + desc: 'You have an incoming video call', + ex: '', + iOSPushSound: 'default', + iOSBadgeCount: true, + }, }) ``` -This is Commercial. Treat `roomID`, `token`, `liveURL`, and busy-user results as optional; cancel an accepted invitation if presentation fails, and never log credentials. +Use `OpenIMPlatformIOS` on iOS. Generate a stable room ID for this call and keep it consistent across participants. + +## Result + +The Promise resolves to `OpenIMSignalingInviteResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `roomID` | `string` or `null` | Media room identifier. | +| `token` | `string` or `null` | Short-lived room credential. | +| `liveURL` | `string` or `null` | Media service connection address. | +| `busyLineUserIDList` | `string[]` or `null` | Users who were busy when invited. | +| `invitation` | `OpenIMSignalingInvitationInfo` or `null` | Server invitation snapshot. | + +Join the media engine only after obtaining a valid room ID and token. Promise success does not mean the peer accepted; merge later state through [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). If the application cannot present outgoing call UI after the invite succeeds, actively cancel the invitation. Never log room credentials. diff --git a/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx b/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx index 8d84e3a870..a768fe2e77 100644 --- a/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx +++ b/content/docs/chat/sdk/uniapp/calling/overview-calling.mdx @@ -11,8 +11,47 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/overview-calling' --- -Every capability in this section is Commercial and requires the commercial signaling services. `unix-openim-sdk` handles invitations, accept/reject/cancel/hangup, room credentials, and events; it does not provide call UI or render camera/audio. +Every capability in this section is Commercial and requires OpenIMServer commercial signaling services. `unix-openim-sdk` provides the signaling APIs required to invite, accept, reject, cancel, hang up, query rooms, and synchronize call state. It coordinates participants, room information, and the signaling lifecycle; it does not capture camera frames, render remote media, or provide call UI. -For complete call and meeting UI, integrate `openim-av-runtime`. It reuses this plugin's only login through typed Host RPC and never initializes another OpenIM Core. +The application passes the returned `roomID`, `token`, and `liveURL` to its realtime media engine and remains responsible for device permissions, media tracks, weak-network behavior, and UI state. Signaling is not a complete WebRTC media SDK. For complete call and meeting UI, integrate `openim-av-runtime`; it reuses the login owned by this plugin and never initializes a second OpenIM Core. -A typical flow registers all signaling events, invites with `OpenIMSignalingInvitationInfo`, validates the raw incoming payload, requests media permission before accepting, creates media from room credentials, and drives one session state machine from cancel/timeout/hangup/multi-device events. Never persist or log token, liveURL, or raw signaling payload. +## Call flow + +1. Log in to IM and register signaling listeners. Call `signalingInvite()` for a one-to-one call or `signalingInviteInGroup()` for a group call. +2. The invitee receives a raw JSON payload from `onReceiveNewInvitation`, validates it, maps it to `OpenIMSignalingInvitationInfo`, and presents incoming-call UI. +3. The invitee requests media permission before calling `signalingAccept()`, or calls `signalingReject()` to decline. +4. Both sides use the returned room ID, token, and live URL to join the media engine. +5. Participant, stream, and custom-signal events update the local call state while the room is active. +6. The inviter can cancel an unanswered invitation, and any participant can hang up an established call. + +## Core data + +| Type | Description | +| --- | --- | +| `OpenIMSignalingInvitationInfo` | Inviter, invitees, group, room, media type, timeout, and session type. | +| `OpenIMSignalingInviteResult` | Room ID, token, live URL, and busy-user list returned by OpenIMServer. | +| `OpenIMSignalingAcceptResult` | Room credentials returned when an invitation is accepted. | +| `OpenIMSignalingGetTokenByRoomIDResult` | Refreshed token and live URL for a known room. | +| `OpenIMSignalingGetRoomByGroupIDResult` | Room ID and invitation snapshot for a group call. | + +`customData` and custom signaling are suitable only for non-secret negotiation data. Never put long-lived credentials, administrator secrets, or private authorization state in them. + +## State and event ownership + +For invite, accept, reject, cancel, and hangup operations, handle the Promise result separately from signaling events. Promise success means OpenIMServer accepted or completed that request; events describe incremental state observed by the inviter, invitee, other devices, or room participants. They are not the same completion signal. + +Signaling events carry raw JSON strings and must be validated before they enter application state. The complete invitation and room event lifecycle belongs to [Handle call events](/sdk/uniapp/calling/managing-calls/handle-call-events). Custom signal events belong to [Send a custom signal](/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal). Room, token, and startup-invitation queries only return a snapshot from their Promise. + +Use `roomID` as the primary call key and combine it with user IDs for participant state. Re-login creates a new event scope; query a room only when a current snapshot is needed. + +## Find a task + +| Task | Page | +| --- | --- | +| Start a one-to-one or group call | [Start a one-to-one call](/sdk/uniapp/calling/managing-calls/start-single-call), [Start a group call](/sdk/uniapp/calling/managing-calls/start-group-call) | +| Accept or reject an invitation | [Accept a call](/sdk/uniapp/calling/managing-calls/accept-call), [Reject a call](/sdk/uniapp/calling/managing-calls/reject-call) | +| Cancel an invitation or end a call | [Cancel a call invitation](/sdk/uniapp/calling/managing-calls/cancel-call), [End a call](/sdk/uniapp/calling/managing-calls/hang-up-call) | +| Restore a room or pending invitation | [Get a group call room](/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id), [Get a call room token](/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id), [Restore a pending invitation](/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation) | +| Handle lifecycle and business negotiation | [Handle call events](/sdk/uniapp/calling/managing-calls/handle-call-events), [Send a custom signal](/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal) | + +Keep one active call or meeting per login/runtime. Never persist or log tokens, live URLs, or raw signaling payloads. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx index ab917c73b9..6051649bac 100644 --- a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id.mdx @@ -14,7 +14,20 @@ sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-i ```uts import { signalingGetRoomByGroupID } from '@/uni_modules/unix-openim-sdk' -const result = await signalingGetRoomByGroupID({ groupID }) +const room = await signalingGetRoomByGroupID({ groupID }) ``` -The Commercial room ID and invitation are optional. Empty means no joinable room. Treat the snapshot as short-lived and obtain a valid token immediately before joining. +The Commercial `signalingGetRoomByGroupID()` operation takes a group ID, not a custom room ID. + +## Result + +The Promise resolves to `OpenIMSignalingGetRoomByGroupIDResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `roomID` | `string` or `null` | Room identifier for the current group call. | +| `invitation` | `OpenIMSignalingInvitationInfo` or `null` | Original invitation associated with the room. | + +Unlike the Wasm result, the uni-app / uni-app x contract does not include participant records. Obtain participant state from the media engine or application state; do not invent a `participant` field. + +A null result or empty `roomID` means there is no joinable call. Treat the snapshot as short-lived, continue handling signaling events, and obtain a valid token immediately before joining. Even when the application uses custom room IDs for group calls, query with `groupID` and merge the returned `roomID` into the active call state. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx index 2a231e6798..dab26093aa 100644 --- a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id.mdx @@ -14,7 +14,11 @@ sourcePath: '/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-i ```uts import { signalingGetTokenByRoomID } from '@/uni_modules/unix-openim-sdk' -const result = await signalingGetTokenByRoomID({ roomID }) +const roomCredentials = await signalingGetTokenByRoomID({ roomID }) ``` -This Commercial result contains optional token/live URL. Keep credentials only in memory, stop when fields are absent/expired, and never reuse or log an old token. +Use the Commercial `signalingGetTokenByRoomID()` operation when the application already knows a room ID but needs fresh join credentials. + +The Promise resolves to `OpenIMSignalingGetTokenByRoomIDResult | null`, with optional `token` and `liveURL` fields. It does not return `roomID` again. Join the media engine with the room ID supplied to this request only after obtaining a valid token. + +Room tokens are short-lived secrets. Keep them only in memory and never write them to logs, URLs, analytics events, files, or persistent storage. Stop the join flow when fields are absent or expired; do not reuse old credentials. diff --git a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx index a5ab1c366d..13408a7478 100644 --- a/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx +++ b/content/docs/chat/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation.mdx @@ -11,7 +11,7 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation' --- -Call this Commercial operation once after event listeners are armed: +Call the Commercial `signalingGetInvitationInfoStartApp()` operation once after event listeners are armed. It returns the invitation snapshot that may need recovery when the app starts or returns to the foreground: ```uts import { signalingGetInvitationInfoStartApp } from '@/uni_modules/unix-openim-sdk' @@ -20,4 +20,10 @@ const result = await signalingGetInvitationInfoStartApp() if (result?.invitation != null) recoverInvitation(result.invitation) ``` -No invitation legitimately resolves to `null`. Deduplicate recovery against realtime events by room/session ID and perform only one startup request per runtime initialization. +An optional `{ userID }` parameter can explicitly identify the queried user, but the current login session normally supplies it. + +## Result + +The Promise resolves to `OpenIMSignalingGetInvitationInfoStartAppResult | null`. Its `invitation` field is `OpenIMSignalingInvitationInfo | null`. A null result or `invitation: null` is the valid “no pending invitation” state, not an error. + +This query only reads a snapshot and does not emit call events. Restore the incoming-call UI only when the invitation and its `roomID` are valid. The recovered snapshot may duplicate a realtime event, so deduplicate by room and local session identifiers. Perform only one startup request per runtime initialization, then continue listening for cancellation, timeout, acceptance, and hangup through [call events](/sdk/uniapp/calling/managing-calls/handle-call-events). diff --git a/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx b/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx index 7d78b31fb1..dd597c688a 100644 --- a/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx +++ b/content/docs/chat/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal.mdx @@ -11,13 +11,67 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal' --- +The Commercial `signalingSendCustomSignaling()` operation sends lightweight application negotiation data to a call room, such as a raised-hand state or layout hint. It is not a chat message API and does not replace a media-engine data channel. + +## Send a signal + +`customInfo` is a string. Define and version a stable format before serializing structured data. + ```uts -import { off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling } from '@/uni_modules/unix-openim-sdk' +import { + off, + onReceiveCustomSignal, + onReceiveCustomSignaling, + signalingSendCustomSignaling, +} from '@/uni_modules/unix-openim-sdk' + +const signal = { + version: 1, + eventID: createBusinessEventID(), + type: 'hand-raised', + userID: currentUserID, + sentAt: Date.now(), +} -const signal = onReceiveCustomSignal(handleValidatedSignal) -const signaling = onReceiveCustomSignaling(handleValidatedSignal) -await signalingSendCustomSignaling({ roomID, customInfo: JSON.stringify({ type: 'raise-hand', version: 1 }) }) -off(signal); off(signaling) +await signalingSendCustomSignaling({ + roomID, + customInfo: JSON.stringify(signal), +}) ``` -These are Commercial. Compatible platforms may use either receive event, so deduplicate by event ID/content hash. Validate type/version/fields; custom content is not authorization and must not contain secrets. +Promise success means OpenIMServer accepted the send request, not that every participant processed it. Keep the payload small and include a protocol version and idempotency ID. Do not put files, chat history, durable state, or credentials in `customInfo`. + +## Receive a signal + +`onReceiveCustomSignal` and `onReceiveCustomSignaling` are raw JSON compatibility events for different commercial Core/service versions. Subscribe only to the event produced by the actual deployment. If both are needed for compatibility, deduplicate by `roomID:eventID`. + +```uts +function handleValidatedSignal(payload : string) { + try { + const event = JSON.parseObject(payload) + if (event == null) return + + const eventRoomID = event.getString('roomID') + const customInfo = event.getString('customInfo') + if (eventRoomID != activeRoomID || customInfo == null) return + + const signal = JSON.parseObject(customInfo) + if (signal == null) return + applyValidatedCallSignal(eventRoomID, signal) + } catch (_) { + console.warn('Invalid custom call signal') + } +} + +const signalSubscription = onReceiveCustomSignal(handleValidatedSignal) +const signalingSubscription = onReceiveCustomSignaling(handleValidatedSignal) + +function removeCustomSignalListeners() { + off(signalSubscription) + off(signalingSubscription) +} +``` + +Validate the outer room, then validate the custom JSON protocol version, event ID, type, and business fields before returning an application object. This page owns the complete listener examples for both compatibility events. Call `removeCustomSignalListeners()` when leaving the call, logging out, or switching accounts. + +Custom client signals are not authorization. Never grant host, payment, or privacy permissions from them. Store authoritative state in a trusted backend, and refresh durable state from the room query or backend after reconnecting instead of treating transient custom signals as replayable records. From c89d19363e3c53ee5f4db4afa066db739a3f2fb8 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:53:04 +0800 Subject: [PATCH 15/20] docs(uniapp): align English SDK foundations with Wasm --- .../sdk/uniapp/events/overview-events.mdx | 112 ++++++++- .../authenticate-and-manage-session.mdx | 234 +++++++++++++++--- .../getting-started/before-you-start.mdx | 97 ++++++-- .../environment-specific-implementation.mdx | 152 ++++++++++-- .../getting-started/send-first-message.mdx | 149 +++++++++-- content/docs/chat/sdk/uniapp/logger.mdx | 143 ++++++++++- 6 files changed, 781 insertions(+), 106 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/events/overview-events.mdx b/content/docs/chat/sdk/uniapp/events/overview-events.mdx index 50321a4356..bc84dfa94b 100644 --- a/content/docs/chat/sdk/uniapp/events/overview-events.mdx +++ b/content/docs/chat/sdk/uniapp/events/overview-events.mdx @@ -11,20 +11,112 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/events/overview-events' --- -Every `on...()` call synchronously returns an `OpenIMSDKEventSubscription` with `id` and `eventName`. Release only your handle with `off(subscription)`. +`unix-openim-sdk` publishes connection, synchronization, user, friend, conversation, group, message, and commercial signaling events through flat `on...()` functions imported from `@/uni_modules/unix-openim-sdk`. You do not create SDK instances or native listener objects for separate domains. + +## Register and remove events + +Every `on...()` call synchronously returns an independent `OpenIMSDKEventSubscription` containing an `id` and `eventName`. Save that handle and pass it to `off(subscription)` when the page, state layer, or account scope that owns it ends. + +```uts +import { + off, + onConnectSuccess, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const connectionSubscription : OpenIMSDKEventSubscription = onConnectSuccess(() => { + setConnectionState('connected') +}) + +// Run when the scope that owns this listener ends. +off(connectionSubscription) +``` + +Do not use the obsolete pattern in which a listener registration returns a cancellation closure, and do not invoke `connectionSubscription()` as a function. One event can have several subscribers; `off()` removes only the handler represented by the supplied handle. + +`offAll(eventName)` removes every handler for one event name. Reserve it for complete App teardown, controlled test resets, or infrastructure that explicitly owns every listener for that event. Pages and feature modules must not use it as local cleanup because it also removes other consumers' listeners. + +Handlers should return quickly. Queue expensive queries, file work, and network requests, then revalidate the current login user or commercial session epoch before writing asynchronous results. Complete business handlers appear only on the canonical pages linked below; this overview does not duplicate each domain listener. + +## Choose when to register + +| Event scope | Recommended lifecycle | Corresponding page | +| --- | --- | --- | +| Connection and token | Register before `login()` and clean up when changing accounts | [Authenticate and manage a session](/sdk/uniapp/getting-started/authenticate-and-manage-session) | +| Users, friends, and blacklist | Register when initializing the contacts state layer | [User overview](/sdk/uniapp/user/overview-user) | +| Conversation list | Register when initializing the conversation-list state layer | [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) | +| Conversation unread count | Register when initializing the application badge state layer | [Maintain the total unread count](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count) | +| Group list | Register when initializing the group state layer | [Group overview](/sdk/uniapp/group/overview-group) | +| Group members | Register when initializing the group-member state layer | [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) | +| Group applications | Register when initializing the group-application state layer | [Get received group applications](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) | +| Messages | Register when initializing the message state layer | [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) | +| Commercial signaling | Register when initializing calling functionality | [Call events](/sdk/uniapp/calling/managing-calls/handle-call-events) | +| SDK session | Register when a commercial plugin depending on the one Core is initialized | [Update the token and observe the SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session) | + +Do not register the same logic again on every component render, `onShow`, or list refresh. Duplicate registrations can insert messages more than once, repeatedly increment unread counts, or write asynchronous state from an old account into the current UI. + +Query APIs establish snapshots; events merge later changes. Use stable business identifiers: `clientMsgID` for messages, `conversationID` for conversations, `userID` for friends and blacklist, and `groupID:userID` for group members. Never deduplicate by array position or display name. + +## Listen for initial synchronization + +After login, SDK Core synchronizes OpenIMServer data. Use these events for global synchronization status and progress: + +| Event | Handler argument | Meaning | +| --- | --- | --- | +| `onSyncServerStart` | `reinstalled: boolean` | Synchronization begins. The boolean identifies whether the local database is synchronizing after reinstall or equivalent rebuild. | +| `onSyncServerProgress` | `progress: number` | Synchronization progress changed. Use it for display; the contract does not promise every integer value. | +| `onSyncServerFinish` | `reinstalled: boolean` | The current synchronization completed. Interfaces requiring complete data can requery their snapshots. | +| `onSyncServerFailed` | `reinstalled: boolean` | The current synchronization failed. Record the synchronization context and wait for retry or connection recovery. | ```uts -import { off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart } from '@/uni_modules/unix-openim-sdk' +import { + off, + onSyncServerFailed, + onSyncServerFinish, + onSyncServerProgress, + onSyncServerStart, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' -const subscriptions = [ - onSyncServerStart((reinstalled) => beginSyncUI(reinstalled)), - onSyncServerProgress(updateSyncProgress), - onSyncServerFinish((reinstalled) => finishSyncUI(reinstalled)), - onSyncServerFailed((reinstalled) => failSyncUI(reinstalled)), +const syncSubscriptions : Array = [ + onSyncServerStart((reinstalled) => { + setSyncState('syncing', 0, reinstalled) + }), + onSyncServerProgress((progress) => { + setSyncProgress(progress) + }), + onSyncServerFinish((reinstalled) => { + setSyncState('ready', 100, reinstalled) + refreshVisibleSnapshots() + }), + onSyncServerFailed((reinstalled) => { + setSyncState('failed', 0, reinstalled) + }), ] -subscriptions.forEach((subscription) => off(subscription)) + +function releaseSyncSubscriptions() { + syncSubscriptions.forEach((subscription) => off(subscription)) + syncSubscriptions.length = 0 +} ``` -The boolean describes the contract's reinstall/sync context, not success. `offAll(eventName)` removes every handler for an event and is reserved for full App reset or controlled tests. +The three boolean callback values represent the reinstall/synchronization context defined by the contract; they are not generic operation-success flags. The event name distinguishes completion from failure. Synchronization events describe Core's lifecycle rather than the Promise callback of one query, and they have no business-entity merge key. Isolate this state by logged-in user. + +This page is the canonical owner for the four synchronization events and for `off()` / `offAll()` control semantics. Call `releaseSyncSubscriptions()` on logout, account change, or SDK-scope destruction. Data can still change after synchronization finishes: requery snapshots needed by the current UI and continue merging domain events into the same state layer. + +## Events unsupported on HarmonyOS + +The locked commercial HarmonyOS HAR lacks the following ten events. Registration returns `platform-unsupported` and never fabricates a callback: + +- `onMigrationStart` +- `onMigrationProgress` +- `onMigrationFailed` +- `onMigrationFinished` +- `onRecvMessageExtensionsAdded` +- `onRecvMessageExtensionsChanged` +- `onRecvMessageExtensionsDeleted` +- `onMessageKvInfoChanged` +- `onStreamChange` +- `onGroupApplicationBadgeCountChanged` -HarmonyOS returns unsupported subscriptions for ten unavailable events: four migrations plus the documented message-extension/KV, badge, and stream events. It never fabricates success. Handlers should return quickly and queue expensive work. +Platform support and commercial ownership are separate dimensions. Handle `platform-unsupported` by disabling the feature or selecting a platform alternative. Do not retry forever or simulate an event that did not occur. diff --git a/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx index 77a19615ac..b9efed130b 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/authenticate-and-manage-session.mdx @@ -11,7 +11,46 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/getting-started/authenticate-and-manage-session' --- -After `initSDK()`, register account and connection events before calling `login(userID, token)`. Login Promise completion does not imply that the persistent connection is ready; wait for `onConnectSuccess` before network-dependent queries and sends. +`unix-openim-sdk` uses `login()` to establish the current user's session. Before authentication, complete the server, account, plugin, and native runtime preparation in [Before you start](/sdk/uniapp/getting-started/before-you-start), then [install and initialize the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk). + +Use this order for a complete sign-in flow: + +1. Initialize the one OpenIM Core in the App scope. +2. Subscribe to connection, token, and forced-offline events before login so no transition is missed. +3. Obtain a matching `userID` and OpenIMSDK token from a trusted backend. +4. Call `login(userID, token)`, await the Promise, and then wait for `onConnectSuccess` before treating the connection as ready. +5. Query user, friend, conversation, group, and message data only after the connection is ready. +6. For active sign-out or account switching, call `logout()`, then release old-account subscriptions and clear application state. + +## Initialize the SDK + +After installing the plugin, call `initSDK()` once from an application-level service. See [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) for configuration fields, platform constants, the required `systemType`, version inspection, and uninitialization. + +`unix-openim-sdk` exports flat functions. Business code does not create an SDK instance, and separate pages must not initialize Core repeatedly with different service addresses. The OpenIMServer environment is set by `initSDK()`; the current user identity is established by `login()`. + +### Initialization boundary + +`initSDK()` receives `OpenIMInitConfig`, including the platform ID, HTTP and WebSocket addresses, logging options, and required `systemType`. These are App/deployment settings rather than user fields. Account switching reuses the existing initialization and must not move those settings into an object passed to `login()`. + +### Understand the UTS plugin + +`unix-openim-sdk` is a native UTS plugin, not a JavaScript singleton factory. It owns one OpenIM Core internally, and both uni-app and uni-app x access it through flat exports from `@/uni_modules/unix-openim-sdk`. Because the standard base does not contain its native dependencies, both development and release packages must be native builds that include the plugin. + +## Load sign-in details for the current user + +Call the application backend session endpoint to obtain the current user's `userID` and token: + +```uts +const session = await loadOpenIMSDKSession() +const userID = session.userID +const token = session.token +``` + +`userID` is only an OpenIMSDK user identifier; it is not a credential. The token must come from a trusted backend and belong to that `userID`. The App does not create users or issue tokens, and it must not store administrator tokens or server secrets. + +## Register connection events before login + +Register connection events before calling `login()`. This captures failures caused by networking, service addresses, tokens, or server state during the login flow and lets the UI represent each connection state. ```uts import { @@ -19,60 +58,169 @@ import { onConnectFailed, onConnectSuccess, onConnecting, - onKickedOffline, - onUserTokenExpired, - onUserTokenInvalid, type OpenIMSDKEventSubscription, } from '@/uni_modules/unix-openim-sdk' -const subscriptions : Array = [ - onConnectSuccess(() => console.log('OpenIM connected')), - onConnecting(() => console.log('OpenIM connecting')), - onConnectFailed((error) => console.error(error.errCode, error.errMsg)), - onKickedOffline(() => clearCurrentAccount()), - onUserTokenExpired(() => requestFreshToken()), - onUserTokenInvalid((error) => console.error(error.errCode, error.errMsg)), -] +const sessionSubscriptions : Array = [] -function releaseSessionSubscriptions() { - subscriptions.forEach((subscription) => off(subscription)) - subscriptions.length = 0 -} +sessionSubscriptions.push(onConnecting(() => { + setConnectionState('connecting') +})) + +sessionSubscriptions.push(onConnectSuccess(() => { + setConnectionState('connected') +})) + +sessionSubscriptions.push(onConnectFailed((errCode, errMsg) => { + setConnectionState('failed') + console.error('OpenIM SDK connection failed', errCode, errMsg) +})) ``` -When `onKickedOffline` arrives, Core is already transitioning offline. Clear references to the old account and start reauthentication; do not race it with `logout()`. +The `onConnectFailed` handler receives two arguments, `errCode` and `errMsg`, rather than one error object. Every `on...()` call returns its own `OpenIMSDKEventSubscription`; the return value is not a cancellation function and must not be invoked directly. + +## Login the current user ```uts import { login } from '@/uni_modules/unix-openim-sdk' -await login(userID, token) +try { + await login(userID, token) +} catch (error) { + console.error('OpenIM SDK login failed', userID, error) + throw error +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `userID` | `string` | Yes | Current OpenIMSDK user ID matching the token. It is not a nickname, phone number, or temporary session ID. | +| `token` | `string` | Yes | OpenIMSDK token for the current user, returned by a trusted backend. Do not issue it in the client. | + +The `login()` Promise succeeding means that the login request has completed. `onConnectSuccess` means that the SDK's persistent connection is ready. These are separate stages; do not call connection-dependent message, conversation, group, or user APIs merely because the Promise resolved. + +If the user taps login more than once, reuse the in-flight login request and Promise instead of starting concurrent `login()` calls. Platform ID, HTTP address, and WebSocket address belong to initialization and are not repeated in an object-style login call. + +## Handle API results + +Asynchronous plugin APIs resolve directly to business values rather than the Wasm `{ data }` response wrapper. A failure rejects the Promise with a plugin error. Log only redacted error codes, method names, and user identifiers needed to correlate the failure with native logs. + +```uts +import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' + +try { + const currentUser = await getSelfUserInfo() + if (currentUser != null) { + useCurrentUser(currentUser) + } +} catch (error) { + console.error('getSelfUserInfo failed', error) +} ``` -The required call shape is `login(userID, token)`, not an object parameter. Obtain a token matching `userID` from a trusted backend; the optional diagnostic argument is intentionally omitted from normal examples. +A query result establishes a snapshot at call time. If a mutation returns no business object that can refresh the UI, follow that API page's event or requery guidance. Promise success, event arrival, and snapshot reconciliation are three separate stages. + +## Inspect the current login state + +`getLoginStatus()` and `getLoginUserID()` take no business parameters: ```uts -import { OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMLoginStatusLogged, + getLoginStatus, + getLoginUserID, +} from '@/uni_modules/unix-openim-sdk' -const status = await getLoginStatus() -if (status == OpenIMLoginStatusLogged) { +const loginStatus = await getLoginStatus() +if (loginStatus == OpenIMLoginStatusLogged) { const currentUserID = await getLoginUserID() - restoreAccountState(currentUserID) + restoreSessionFor(currentUserID) } ``` -Login state and network connectivity are different: a briefly disconnected account may remain logged in. +The login-status constants are: + +| Status | Description | +| --- | --- | +| `OpenIMLoginStatusLogout` | Core is not logged in. | +| `OpenIMLoginStatusLogging` | Login is in progress; do not start another login concurrently. | +| `OpenIMLoginStatusLogged` | Core is logged in. Use connection events separately to determine current network readiness. | + +`getLoginUserID()` returns the user ID currently logged into Core. It is useful for checking that the application account and SDK account match, but it does not replace application authentication. Neither query triggers a connection event. + +Do not overwrite the current session by logging in with another user. Await `logout()` for the old account, clear old subscriptions and state, and then call `login()` for the new account. + +## Report App runtime state -Report application lifecycle and network transitions once from an application service: +Report Android, iOS, and HarmonyOS foreground/background and network state once from App-level lifecycle code. Pass `true` to `setAppBackgroundStatus()` when entering the background and `false` when returning to the foreground. Call `networkStatusChanged()` when network availability or type changes. ```uts -import { networkStatusChanged, setAppBackgroundStatus } from '@/uni_modules/unix-openim-sdk' +import { + networkStatusChanged, + setAppBackgroundStatus, +} from '@/uni_modules/unix-openim-sdk' + +async function reportAppBackground() { + await setAppBackgroundStatus(true) +} + +async function reportAppForeground() { + await setAppBackgroundStatus(false) +} -await setAppBackgroundStatus(true) -await setAppBackgroundStatus(false) -await networkStatusChanged() +async function reportNetworkAvailable() { + await networkStatusChanged() +} ``` -To sign out, wait for `logout()`, release account-scoped subscriptions, and clear state. Finish this sequence before logging in another account. +These operations only report runtime changes. They do not establish a new session and cannot replace `login()` or token refresh. Ordinary page entry and exit must not repeat these App-level calls. See [Handle App lifecycle and device state](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state) for uni-app / uni-app x lifecycle wiring, badges, and FCM tokens. + +## Handle the token lifecycle + +OpenIMSDK tokens are issued by a trusted backend. The public flow fetches a fresh token and reauthenticates when a token expires or becomes invalid. The commercial edition can also hot-update the token with `updateToken()`; see [Update the token and observe the SDK session](/sdk/uniapp/getting-started/update-token-and-observe-sdk-session). + +```uts +import { + onUserTokenExpired, + onUserTokenInvalid, +} from '@/uni_modules/unix-openim-sdk' + +sessionSubscriptions.push(onUserTokenExpired(() => { + requestFreshTokenAndRelogin() +})) + +sessionSubscriptions.push(onUserTokenInvalid((errCode, errMsg) => { + console.warn('OpenIM SDK token is invalid', errCode, errMsg) + redirectToSignIn() +})) +``` + +Like `onConnectFailed`, `onUserTokenInvalid` receives `(errCode, errMsg)`. Use these values for diagnostics and user-facing state only; never use them to bypass reauthentication, and never store the token in logs or event state. + +### Token model + +The client passes the current user's OpenIMSDK token to `login()`. Issuance, expiration, refresh, revocation, and multi-device policies belong to the application backend and OpenIMServer configuration. Implement short-lived or one-time application sessions in the backend, then reauthenticate the App in response to token lifecycle events. + +## Handle forced logout + +Subscribe to the forced-offline event. It usually means that the same account signed in on another client or that server policy requires the current client to end its session. + +```uts +import { onKickedOffline } from '@/uni_modules/unix-openim-sdk' + +sessionSubscriptions.push(onKickedOffline(() => { + clearCurrentAccount() + showSignedInElsewhereDialog() +})) +``` + +When `onKickedOffline` arrives, SDK Core is already transitioning offline. Do not race that transition with a concurrent `logout()`. Clear the application's current user, conversation, message-view, and page state, then offer reauthentication according to product policy. + +## Logout actively + +Call `logout()` when the user actively signs out or switches accounts, then clear the current user's conversation list, message views, unread state, and application state. Forced offline is not an active logout and does not run this sequence. ```uts import { logout } from '@/uni_modules/unix-openim-sdk' @@ -81,3 +229,29 @@ await logout() releaseSessionSubscriptions() clearCurrentAccount() ``` + +Promise success means that the SDK session has logged out. When switching accounts, wait for old-account logout, clear old state and subscriptions, register the new account's listeners, and only then call `login()`. Do not run two accounts' login/logout flows concurrently. + +### Disconnecting only WebSocket + +The plugin does not expose a public operation that disconnects WebSocket while preserving the login session. Report foreground/background and network changes through the App-lifecycle APIs. Use `logout()` when the user session must end. + +## Release session listeners + +This page is the complete owner for connection, token, and forced-offline listeners. On logout, account switch, or destruction of the application service that owns them, pass every handle to `off(subscription)`: + +```uts +function releaseSessionSubscriptions() { + sessionSubscriptions.forEach((subscription) => off(subscription)) + sessionSubscriptions.length = 0 +} +``` + +Connection events have no business-entity merge key. Isolate their state by the current Core and logged-in user. Business pages establish snapshots through queries and then merge incremental state through each domain's event owner. + +## Next steps + +- [Before you start](/sdk/uniapp/getting-started/before-you-start) +- [Send your first message](/sdk/uniapp/getting-started/send-first-message) +- [Events overview](/sdk/uniapp/events/overview-events) +- [Logger](/sdk/uniapp/logger) diff --git a/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx index faafc8d96d..4fa36b69b6 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/before-you-start.mdx @@ -11,39 +11,90 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/getting-started/before-you-start' --- -Choose a uni-app or uni-app x App target and prepare an OpenIMServer, users, and native build environment compatible with `unix-openim-sdk 0.2.0-rc.3`. Web, H5, and mini-app targets cannot use this native UTS plugin. +Before integrating `unix-openim-sdk` into a uni-app / uni-app x App, prepare an OpenIMServer reachable from the device, a trusted user-authentication flow, the UTS plugin, and a native build environment for every target platform. These prerequisites apply to both [authenticating and managing a session](/sdk/uniapp/getting-started/authenticate-and-manage-session) and [sending your first message](/sdk/uniapp/getting-started/send-first-message). Web, H5, and Mini Program targets cannot use this native UTS plugin. -## Prepare the service and account +## Prepare OpenIMServer -| Value | Source | Requirement | -| --- | --- | --- | -| `apiAddr` | OpenIMServer HTTP API | Complete address reachable from the device | -| `wsAddr` | OpenIMServer WebSocket | Complete address that accepts a persistent connection | -| `userID` | Your backend account mapping | Existing server user matching the token | -| Token | Trusted application backend | Grants access only to the current user | +If you do not yet have an OpenIMServer deployment, follow the [Docker deployment guide](/docs/guides/quick-deployment/docker). Then verify that the actual Android, iPhone, or HarmonyOS device can reach `apiAddr` and `wsAddr`. -Your backend must authenticate its own account before returning the mapped OpenIM user and token. Never place an administrator token or server secret in the App. Public clients connect to a public OpenIMServer deployment; signaling, session, and other commercial features require the corresponding commercial services. +SDK initialization needs the following service addresses: -On physical devices, do not use the development computer's `localhost`. Verify network reachability, TLS certificates, reverse-proxy rules, and WebSocket upgrades from the actual device. +| Field | Description | +| --- | --- | +| `apiAddr` | OpenIMServer HTTP API address used for sign-in, synchronization, and resource requests. A production App should use a device-reachable HTTPS address with a valid certificate. | +| `wsAddr` | OpenIMServer WebSocket address used to establish the persistent connection and receive realtime events. A production App normally uses WSS. | -## Prepare the plugin and toolchain +Do not verify the services only from the server or development Mac. A physical device cannot use the development computer's `localhost`; test LAN or public routing, TLS certificates, reverse-proxy rules, and WebSocket upgrades from the actual device. -Install the plugin at `uni_modules/unix-openim-sdk`, use the HBuilderX/uni-app `5.23` series, and prepare: +A public client can connect to a public OpenIMServer. Signaling, session, translation, and other capabilities marked Commercial also require the matching commercial server capabilities. Do not use a public server's rejection to judge whether the commercial client API is implemented correctly. -- Android: API 21+, a compatible JDK and Android SDK, declared AAR/Maven dependencies, and target ABIs. -- iOS: iOS 14+, compatible Xcode/CocoaPods, and correctly linked and embedded XCFrameworks. -- HarmonyOS: uni-app x commercial edition only, API 24, with the HAR matching the plugin contract. +## Prepare the user and token -The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory. +`userID` identifies an OpenIMSDK user, while the token authenticates that user. A trusted backend must create or bind OpenIMSDK users, issue tokens, and enforce application permissions. Never store an administrator token, secret, or other server credential in the App. -Use exported platform constants instead of numeric literals: `OpenIMPlatformAndroid`, `OpenIMPlatformIOS`, or `OpenIMPlatformHarmony`. The required `systemType` is a descriptive string such as `android`, `ios`, or `harmony`. +Before integrating your backend with the OpenIMServer REST API, see [Prepare to use the Platform API](/platform-api/prepare-to-use-api) and [Issue a session token](/platform-api/user/managing-session-tokens/issue-a-session-token). If your product already has an account system, maintain a stable mapping between each application account and its OpenIMSDK `userID`, and ensure that the returned token belongs to that user. + +We recommend exposing a session endpoint from your application backend so that the App receives only the minimum data required to sign in: + +```uts +type OpenIMSDKSession = { + userID : string + token : string +} + +async function loadOpenIMSDKSession() : Promise { + const response = await uni.request({ + url: `${businessApiURL}/openim/session`, + method: 'POST', + }) + + if (response.statusCode != 200) { + throw new Error('Failed to load OpenIM SDK session') + } + + return parseTrustedSessionResponse(response.data) +} +``` + +The application endpoint must authenticate the current application account before returning its OpenIMSDK sign-in details. It must not accept an arbitrary `userID` from the client and issue a token for that user without verification. `apiAddr` and `wsAddr` are normally controlled App-environment settings passed to `initSDK()`, rather than values changed in every user session response. + +## Prepare the UTS plugin and native runtime + +Install the plugin at `uni_modules/unix-openim-sdk`, use the HBuilderX/uni-app `5.23` series, and prepare the native environment for each target: + +| Host | Android | iOS | HarmonyOS | +| --- | --- | --- | --- | +| uni-app Vue 2 / Vue 3 | Supported, API 21+ | Supported, iOS 14+ | Not currently declared supported | +| uni-app x | Supported, API 21+ | Supported, iOS 14+ | Commercial edition, API 24 | +| Web / H5 / Mini Program | Not supported | Not supported | Not supported | + +- Android needs a compatible JDK and Android SDK, the plugin's declared AAR/Maven dependencies, and the ABI used by each target device. +- iOS needs compatible Xcode/CocoaPods. The final App must link, embed, and sign the plugin XCFrameworks correctly. +- HarmonyOS support is declared only for uni-app x with the commercial edition, the HAR matching the plugin contract, and an API 24 project. + +The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory, and do not read or modify the SDK database or native cache directly. + +See [Integrate by host and platform](/sdk/uniapp/getting-started/environment-specific-implementation) for lifecycle, type, and file-path differences. + +## Choose the platform identity + +Pass an exported constant to `initSDK().platformID` instead of a numeric literal: `OpenIMPlatformAndroid` for Android, `OpenIMPlatformIOS` for iPhone, or `OpenIMPlatformHarmony` for HarmonyOS. + +Initialization also requires a matching descriptive `systemType`, such as `android`, `ios`, or `harmony`. The platform constant and `systemType` participate in server-side multi-device policy and native runtime diagnostics, so they must identify the runtime that is actually executing the SDK. ## Release checklist -- Verify initialization, login, normal message send/receive, and logout on target devices. -- Test foreground/background transitions, network recovery, token invalidation, and forced logout. -- Scan Android for duplicate classes/JNI and ABIs; validate iOS signing, embedding, privacy manifests, and device linking. -- Test commercial signaling against commercial services, not a public server. -- Keep tokens, secrets, and full private-message content out of logs, screenshots, and automation evidence. +Before releasing, test the environments and networks your product actually supports: + +- `initSDK()` succeeds, `login()` succeeds, and `onConnectSuccess` is received. +- Foreground/background transitions, network interruption and recovery, token invalidation, and forced logout follow the product state machine. +- Android contains the required ABIs and has no duplicate classes or JNI libraries. +- The iOS device package links, embeds, and signs successfully, with complete usage descriptions and privacy manifests. +- HarmonyOS uses the exact commercial HAR required by the contract and reports platform-unsupported capabilities explicitly. +- Two different accounts can send and receive normal messages, query history, and keep state isolated after logout. +- Commercial APIs are tested against the corresponding commercial services. +- Logs, screenshots, and automation evidence contain no tokens, secrets, full private-message content, or unnecessary local absolute paths. + +## Continue the integration -Continue with [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk). +After preparing these prerequisites, complete [installation, initialization, and SDK inspection](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk), then [authenticate and manage the session](/sdk/uniapp/getting-started/authenticate-and-manage-session). Once the connection succeeds, [send your first message](/sdk/uniapp/getting-started/send-first-message) to a prepared user or group and verify the complete messaging flow. diff --git a/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx index 8894d1a240..453eee4f63 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/environment-specific-implementation.mdx @@ -11,44 +11,162 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/getting-started/environment-specific-implementation' --- -`unix-openim-sdk` exposes the same business functions to uni-app and uni-app x. Differences are limited mainly to language types, page lifecycle, and native build integration. Always import from the same flat plugin root. +`unix-openim-sdk` exposes the same business functions to uni-app and uni-app x. The differences are primarily language typing, page lifecycle, file paths, and native build packaging. Every supported host imports from the same plugin root and shares the one OpenIM Core in the host process. + +## Support matrix | Host | Android | iOS | HarmonyOS | | --- | --- | --- | --- | -| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared | -| uni-app x | API 21+ | iOS 14+ | Commercial API 24 | -| H5 / Web / mini apps | Not supported | Not supported | Not supported | +| uni-app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared supported | +| uni-app x | API 21+ | iOS 14+ | Commercial edition, API 24 | +| Web / H5 / Mini Program | Not supported | Not supported | Not supported | + +Use the HBuilderX/uni-app `5.23` series. Availability of public and commercial capabilities also depends on the plugin version, native artifacts, and OpenIMServer deployment; the host name alone does not determine capability support. + +## Use the shared plugin entry -## uni-app +Both uni-app and uni-app x import from `@/uni_modules/unix-openim-sdk`. Do not use a bare package name or import platform implementation directories directly. + +```uts +import { + getLoginStatus, + off, + onConnectSuccess, +} from '@/uni_modules/unix-openim-sdk' +``` -JavaScript does not provide UTS static type checking, but Promise values and subscription-handle semantics are identical. Keep SDK lifetime in an application service rather than reinitializing it from pages. +Promises resolve directly to business values instead of `{ data }`. Event registration returns an `OpenIMSDKEventSubscription`; release it with `off(subscription)`. + +## uni-app Vue 2 / Vue 3 + +A traditional uni-app page can call the plugin from either Vue 2 or Vue 3 lifecycle code. JavaScript does not provide the full static checks available in UTS, but Promise results and subscription handles have the same runtime semantics. Keep SDK initialization, login, and global listeners in an App-level service so navigation does not repeatedly initialize Core. ```javascript -import { getLoginStatus, off, onConnectSuccess } from '@/uni_modules/unix-openim-sdk' +import { + getLoginStatus, + off, + onConnectSuccess, +} from '@/uni_modules/unix-openim-sdk' + +const connectSubscription = onConnectSuccess(() => { + console.log('OpenIM connected') +}) -const connection = onConnectSuccess(() => console.log('OpenIM connected')) const status = await getLoginStatus() -off(connection) + +// Run when the application service that owns the listener is destroyed. +off(connectSubscription) ``` +Destroying a Vue component releases only subscriptions owned by that component or service; it must not call `unInitSDK()`. If several pages need one event, subscribe once in a store or application service and distribute application state to the pages. + ## uni-app x -Import public UTS types instead of copying interfaces that can drift: +uni-app x uses UTS types. Import initialization parameters, message objects, and event payload types from the public plugin contract instead of copying local interfaces that can drift from the SDK. ```uts -import { getLoginStatus, type OpenIMLoginStatus } from '@/uni_modules/unix-openim-sdk' +import { + getLoginStatus, + type OpenIMLoginStatus, +} from '@/uni_modules/unix-openim-sdk' const status : OpenIMLoginStatus = await getLoginStatus() ``` -For commercial raw signaling JSON, validate the string and required fields before mapping an `UTSJSONObject` to your own domain type. +Handle nullable UTS results explicitly. Do not bypass `null` in an exported result type with an unsafe cast. Commercial signaling events return raw JSON strings; validate the outer payload and known fields before converting a `UTSJSONObject` into an application domain object. + +## App lifecycle + +Initialize SDK Core once in the App scope. Page entry and exit manage only subscriptions owned by that page. To switch accounts, log out the old account and release its subscriptions and state before logging in the new account. Call `unInitSDK()` only when the App will no longer use OpenIM. + +Foreground/background, network, badge, and push state should be reported by one App-lifecycle owner instead of several pages. See [Handle App lifecycle and device state](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state). + +## Android + +Android requires API 21 or newer. The build output must contain the plugin's Maven/AAR dependencies and every target ABI. The standard base does not contain these native artifacts, so use a custom base containing the plugin or a local native Android project. + +Before release, verify at least the following: + +- Manifest permissions match the product's network, notification, and storage requirements. +- Each target ABI contains exactly one OpenIM Core native library. +- The release/R8 build has no duplicate classes, duplicate JNI libraries, or reflection stripping failures. +- A physical device can reach `apiAddr` and `wsAddr`, and background recovery follows Android system constraints. + +The SDK does not request photo-library, camera, microphone, or notification permission for the application. Declare and explain permissions required by the IM features you actually use. AV Runtime media permissions belong to a separate plugin boundary. + +## iOS + +iOS requires version 14 or newer. Link, embed, and sign the plugin XCFrameworks with compatible CocoaPods and Xcode versions. + +Before release, validate framework slices, embedding, signing, privacy manifests, usage descriptions, and the App Store build on a physical device. A simulator build does not prove that device arm64 links correctly. If the host installs other native plugins, scan for duplicate frameworks and module names. + +SDK logs and the database live in the application sandbox. Do not persist simulator absolute paths in business configuration, and do not move or modify the Core database directly. + +## HarmonyOS + +HarmonyOS support is declared only for uni-app x with the Commercial edition, API 24 or newer, and the HAR matching the plugin contract. + +The following operations return `platform-unsupported`: + +- `updateFcmToken` +- `updateToken` +- `translateText` +- `translateMessage` + +Ten unsupported events return unsupported subscriptions and never fabricate callbacks; see [Events overview](/sdk/uniapp/events/overview-events). Platform unsupported is distinct from commercial authentication failure. Application logic should distinguish capability absence, login state, network failure, and server rejection by their stable errors. + +## File paths + +Image, sound, video, and file-message operations using local files require a full path readable by native Core. Convert `unifile://`, picker temporary URLs, and virtual sandbox paths through uni APIs before passing them to the SDK. + +- Do not pass an HTTP URL to a by-file or full-path message-creation operation. +- Keep a temporary file alive until message creation and upload have completed. +- Android and iOS sandbox paths are different; do not persist an absolute path on one platform and reuse it on another. +- The host application requests and explains file, photo-library, and media permissions. + +Each message-creation page distinguishes URL-based creation from creation using a native full path. + +## Local builds and custom bases + +A native UTS plugin must participate in native compilation. During development, either build a custom base containing the plugin with HBuilderX 5.23, or use a project-maintained Android/iOS native project for compilation, installation, and automated tests. + +The local workflow should lock HBuilderX, the DCloud native SDK, JDK/Android SDK, Xcode/CocoaPods, and plugin versions. This prevents a locally working build from later being packaged with a different dependency set. The standard base can run pages without this native plugin, but it cannot be used to judge the plugin's capabilities. + +### Shared SDK service + +Use one App-level SDK service to own initialization status, the current logged-in user, global subscription handles, and teardown order. Pages call its business methods and observe application state instead of deciding whether Core should be initialized again. + +The service must preserve the plugin's actual Promise and error semantics. Do not wrap results into the Wasm `{ data }` shape, swallow `platform-unsupported`, or use `offAll()` to remove listeners owned elsewhere. To switch accounts, stop writes for the old account, await `logout()`, release its handles, clear account state, and then login the new account. + +## Unsupported targets + +The plugin does not support Web, H5, or Mini Programs. It depends on native Android, iOS, or HarmonyOS Core, a local database, and native network lifecycle; conditional compilation cannot make the same import run in a browser. + +If the product also has H5 or Mini Program targets, select the corresponding Web/Wasm or Mini Program SDK in an application adapter and manage initialization, login, events, and storage separately. Do not allow two SDKs to compete for the same App-side login state. + +## Verification and troubleshooting -## Native platform boundaries +- Confirm on the target platform that `initSDK()` succeeds and `onConnectSuccess` arrives after `login()`. +- Verify that query APIs return business values directly and subscription handles remain valid for asynchronous cleanup through `off()`. +- Test network recovery, foreground/background transitions, forced logout, token invalidation, and reauthentication on a physical device. +- Test file messages with real picker or photo-library paths in a release build, not only with a fixed sandbox fixture. +- Connect commercial APIs to commercial services; verify that HarmonyOS reports unsupported capabilities explicitly. +- Scan final Android/iOS packages for duplicate native dependencies, signing issues, and ABI/framework slice problems. -Android and iOS support public and commercial interfaces, but the plugin must be included in a custom base or local native project. The host App declares permissions, notifications, and background capabilities; the SDK does not request camera, microphone, photo, or notification access for your product. +## Common problems -File APIs require a readable absolute native path. Resolve `unifile://` through a uni API first. Do not pass a network URL, transient URL, or virtual sandbox path directly to OpenIM Core. +| Symptom | Likely cause | Resolution | +| --- | --- | --- | +| The standard base reports that the native plugin is unavailable | The base does not contain the plugin's native dependencies | Build a custom base or use the local native project. | +| A simulator connects but a physical device cannot | The service URL uses `localhost`, or TLS/LAN routing is unavailable | Verify API/WSS addresses, certificates, and reverse proxy from the physical device. | +| An event runs more than once | A page or `onShow` registered it again without releasing the old handle | Move registration to a stable service and call `off(subscription)` for every owned handle. | +| File-message creation fails | The input is `unifile://`, a temporary URL, or a path Core cannot read | Convert it to a native-readable full path and preserve the file lifetime. | +| A HarmonyOS API always fails | The locked HAR does not expose that capability | Handle `platform-unsupported` and disable the feature or use an alternative flow. | +| iOS works in the simulator but device linking fails | Device slice, embedding, signing, or deployment target is wrong | Build for an iPhone and inspect the XCFramework slices and signing. | -HarmonyOS is declared only for uni-app x commercial edition. `updateFcmToken`, `updateToken`, `translateText`, and `translateMessage` return `platform-unsupported`. Ten unavailable events return unsupported subscriptions and never synthesize success; see [Event overview](/sdk/uniapp/events/overview-events). +## Next steps -Initialize Core once per application. Pages own and release only their listeners. Account switching must finish old-account logout and cleanup before the new login; call `unInitSDK()` only during complete SDK teardown. +- [Before you start](/sdk/uniapp/getting-started/before-you-start) +- [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) +- [Authenticate and manage a session](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [Handle App lifecycle and device state](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state) diff --git a/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx index ca44ab1483..d0741e9b72 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/send-first-message.mdx @@ -11,43 +11,150 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/getting-started/send-first-message' --- -Use this flow to verify installation, initialization, login, and messaging. Production applications should keep SDK lifetime in an application service. +This page shows how to install and initialize `unix-openim-sdk` in a uni-app / uni-app x App, sign in, and send the first text message. Before you begin, complete the server, user, token, plugin, and native build preparation in [Before you start](/sdk/uniapp/getting-started/before-you-start). -Register `onConnectSuccess` before login and release its handle when the application scope ends: +An OpenIMSDK message can target a user or a group. A one-to-one message uses the recipient's `recvID`; a group message uses the destination `groupID`. + +## Prepare a message target + +For a one-to-one test, prepare an existing recipient user. For a group test, prepare an existing `groupID` in which the current user is allowed to speak. A group message does not include a recipient user ID and does not target one individual member. + +| Scenario | Required target identifier | +| --- | --- | +| One-to-one conversation | An existing recipient user ID passed as `recvID`, while `groupID` is an empty string. | +| Group conversation | An existing group ID passed as `groupID`, while `recvID` is an empty string. | + +### Verify the target + +The first message normally verifies the complete path between the client, OpenIMServer, and another client. Before sending it, confirm that: + +- The one-to-one recipient exists and server policy permits the current user to send to that recipient. +- The destination `groupID` exists, the current user has joined it, and group state or mute policy does not prohibit sending. +- Two independent test clients use different users; do not use same-account UI behavior as proof that another user received the message. + +## Get started + +Follow these steps to send the first text message. + +### Step 1: Install the UTS plugin + +Install `unix-openim-sdk` at `uni_modules/unix-openim-sdk`. Because the plugin has native dependencies, the standard base cannot load it. Build a custom base containing the plugin or use the project's local Android/iOS native build workflow. + +Business pages import functions and types from the flat plugin root: ```uts -import { off, onConnectSuccess } from '@/uni_modules/unix-openim-sdk' +import { + createTextMessage, + sendMessage, +} from '@/uni_modules/unix-openim-sdk' +``` -const connection = onConnectSuccess(() => markOpenIMReady()) -off(connection) +Do not create an SDK instance or import an Android, iOS, or HarmonyOS implementation directory directly. + +### Step 2: Initialize OpenIM SDK + +Call `initSDK()` once in the App scope. This example uses Android; iOS and HarmonyOS use their own platform constant and `systemType`. + +```uts +import { + OpenIMLogLevelInfo, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, +} from '@/uni_modules/unix-openim-sdk' + +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelInfo, + isLogStandardOutput: true, + systemType: 'android', +} + +const initialized = await initSDK(config) +if (!initialized) { + throw new Error('OpenIM SDK initialization was not accepted') +} ``` -For a direct message, set `recvID` and leave `groupID` empty. For a group message, leave `recvID` empty and set a group ID joined by the current user. +`apiAddr` and `wsAddr` must be reachable from the actual device, and `systemType` is required. See [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) for all fields, iOS/HarmonyOS constants, version queries, and uninitialization. + +### Step 3: Connect to OpenIMServer + +Use the application endpoint prepared in [Before you start](/sdk/uniapp/getting-started/before-you-start) to load the current user's `userID` and token. Register connection and token events before login as described in [Authenticate and manage a session](/sdk/uniapp/getting-started/authenticate-and-manage-session). This page keeps only the main first-message flow and does not redefine those complete listeners. ```uts -import { createTextMessage, sendMessage } from '@/uni_modules/unix-openim-sdk' +import { login } from '@/uni_modules/unix-openim-sdk' -const message = await createTextMessage('Hello, OpenIMSDK') -if (message == null) throw new Error('Failed to create text message') +const session = await loadOpenIMSDKSession() +await login(session.userID, session.token) +``` -const sentMessage = await sendMessage({ - message, - recvID: 'user_b', - groupID: '', -}) -appendOutgoingMessage(sentMessage) +The `login()` Promise succeeding means that the sign-in request completed. Wait for `onConnectSuccess`, owned by the authentication page, before calling message APIs that depend on the connection. uni-app / uni-app x uses two positional arguments; it does not accept the Wasm object-style login parameters. + +### Step 4: Select the message target + +A one-to-one conversation needs only the recipient user ID. Put an existing, verified user ID in `recvID`: + +```uts +const recvID = 'user_b' +const groupID = '' ``` -`createTextMessage()` creates a local message object; it does not send. `sendMessage()` resolves directly to the final `OpenIMMessageItem`, without a `{ data }` wrapper. Merge outgoing state by `clientMsgID`, and deduplicate incoming events by the same identifier. +A group conversation uses only the OpenIMSDK group ID. Reuse a `groupID` already known to the application, or create a test group through an admin console, the application backend, or group APIs and keep the returned ID: -For a group: +```uts +const recvID = '' +const groupID = 'group_123' +``` + +A group can have initial members, but sending the group message does not include an individual recipient user ID. + +### Step 5: Create and send the message + +Sending an OpenIMSDK text message has two steps: create a local `OpenIMMessageItem`, then send it to the user or group with `sendMessage()`. ```uts -const sentGroupMessage = await sendMessage({ +import { + createTextMessage, + sendMessage, + type OpenIMMessageItem, +} from '@/uni_modules/unix-openim-sdk' + +const message = await createTextMessage('Hello, OpenIMSDK') +if (message == null) { + throw new Error('Failed to create text message') +} + +const sentMessage : OpenIMMessageItem = await sendMessage({ + recvID, + groupID, message, - recvID: '', - groupID: 'group_123', }) + +appendOutgoingMessage(sentMessage) ``` -Verify with two accounts on independent clients: the sender receives a non-empty `clientMsgID`, the receiver obtains the new-message event, both clients can reload the message from history, and no old-account state changes after logout. +`createTextMessage()` returns an unsent message object. It does not send a message or trigger a new-message event. `sendMessage()` returns the sent `OpenIMMessageItem` directly; there is no Wasm `{ data }` wrapper. + +The sender should replace its pending item with `sentMessage` by `clientMsgID`. Another logged-in client receives the message through a new-message event. See [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) for complete listeners, batch and single callbacks, cleanup, and conversation routing; this page does not register those events again. + +## Verify the result + +Use two users on two independent clients and verify each stage: + +1. Client A's `sendMessage()` succeeds and returns a non-empty `clientMsgID`. +2. Client A merges the returned item by `clientMsgID` rather than appending a duplicate. +3. Client B receives the new-message event and can read the same business content. +4. Both clients can later query the message from history. + +Promise success and remote event delivery are separate stages and must be verified independently. When troubleshooting, record redacted error codes, the current user ID, target user or group ID, and `clientMsgID` so they can be correlated with OpenIMServer logs. Do not record tokens or full private-message content. + +## Next steps + +- [Before you start](/sdk/uniapp/getting-started/before-you-start) +- [Authenticate and manage a session](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [Integrate by host and platform](/sdk/uniapp/getting-started/environment-specific-implementation) +- [Send messages](/sdk/uniapp/message/sending-messages/send-message) +- [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/docs/chat/sdk/uniapp/logger.mdx b/content/docs/chat/sdk/uniapp/logger.mdx index 278e2c8f56..5600764cc9 100644 --- a/content/docs/chat/sdk/uniapp/logger.mdx +++ b/content/docs/chat/sdk/uniapp/logger.mdx @@ -11,15 +11,148 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/logger' --- -Configure `logLevel`, `isLogStandardOutput`, and optional `logFilePath` during initialization. Use the lowest production level that supports diagnosis and redact tokens, private content, and commercial credentials. +`unix-openim-sdk` logs diagnose initialization, login, and business API calls on Android, iOS, and HarmonyOS. Development and staging builds can emit detailed SDK logs. Production should retain only necessary errors and tracing fields and must avoid tokens, message bodies, file URLs, server credentials, and other private data. + +A diagnostic flow combines logging options in `OpenIMInitConfig`, an optional `operationID` for one call, the plugin error, upload-progress events, and the application's structured logs. + +## Log levels + +Configure logging through `OpenIMInitConfig.logLevel` when calling `initSDK()`. From most to least verbose, the exported levels are: + +| Constant | Value | Description | +| --- | --- | --- | +| `OpenIMLogLevelVerbose` | `6` | Most detailed runtime tracing; use only for short, deep diagnostics. | +| `OpenIMLogLevelDebug` | `5` | Development and integration details. | +| `OpenIMLogLevelInfo` | `4` | Normal runtime information. | +| `OpenIMLogLevelWarn` | `3` | Warnings. | +| `OpenIMLogLevelError` | `2` | Errors. | +| `OpenIMLogLevelFatal` | `1` | Fatal errors. | +| `OpenIMLogLevelPanic` | `0` | Most severe level. | + +Do not leave `Verbose` or `Debug` enabled in production. Prefer an environment setting, staged feature flag, or explicit user-initiated diagnostic flow that raises verbosity only temporarily. + +### Recommended log levels + +| Scenario | Recommended configuration | Description | +| --- | --- | --- | +| Local development | `OpenIMLogLevelDebug`, `isLogStandardOutput: true` | Inspect SDK calls in Logcat or the Xcode console. | +| Integration or staging | Temporarily use more detail when needed | Correlate user IDs, conversation IDs, error codes, and OpenIMServer logs. | +| Production default | `OpenIMLogLevelWarn` or `OpenIMLogLevelError`, with unnecessary standard output disabled | Reduce noise and sensitive-data exposure while retaining actionable errors. | +| User diagnostic mode | Temporarily raise verbosity and explain the collection scope | Obtain consent and follow privacy, retention, and deletion requirements. | + +## Configure logging + +Logging options belong to SDK initialization, not `login()`. This Android example uses the corresponding platform identity and required `systemType`: + +```uts +import { + OpenIMLogLevelDebug, + OpenIMPlatformAndroid, + initSDK, + type OpenIMInitConfig, +} from '@/uni_modules/unix-openim-sdk' + +const config : OpenIMInitConfig = { + platformID: OpenIMPlatformAndroid, + apiAddr: 'https://im-api.example.com', + wsAddr: 'wss://im-ws.example.com', + logLevel: OpenIMLogLevelDebug, + isLogStandardOutput: true, + systemType: 'android', +} + +await initSDK(config) +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `logLevel` | `OpenIMLogLevel` | Yes | Controls the verbosity of SDK Core runtime logs. | +| `isLogStandardOutput` | `boolean` | Yes | Writes SDK logs to the platform standard output. Enable it for development and temporary diagnostics. | +| `logFilePath` | `string` or `null` | No | Custom log path. Normally use the plugin's platform default unless the application deliberately manages a sandbox path. | + +`apiAddr`, `wsAddr`, platform ID, and `systemType` are still required initialization settings, but they are not logging fields. Error codes and messages in plugin failures are also not logging configuration parameters. + +## Trace one call with operationID + +`operationID` is an optional correlation identifier for one SDK call. Most asynchronous APIs accept it as the last parameter. Ordinary calls can omit it and let the plugin generate or delegate the value. Create and pass one explicitly only when a specific call must be correlated precisely with native and OpenIMServer logs. + +```uts +import { getConversationListSplit } from '@/uni_modules/unix-openim-sdk' + +const operationID = createDiagnosticOperationID() + +try { + const result = await getConversationListSplit( + { offset: 0, count: 50 }, + operationID, + ) + + appLogger.info('openim_api_success', { + operationID, + action: 'get_conversation_page', + count: result?.conversations.length ?? 0, + }) +} catch (error) { + appLogger.error('openim_api_failed', { + operationID, + action: 'get_conversation_page', + error: sanitizeOpenIMError(error), + }) + throw error +} +``` + +Use a new `operationID` for every call. It is not a user identity, permission credential, conversation ID, or business idempotency key and cannot replace a token, `conversationID`, or `clientMsgID`. If one business flow contains several SDK calls, give every call its own operationID and use an application trace ID to correlate the whole flow. + +## Record business context + +Application logs can contain the route, business action, operationID, redacted error code, and necessary target identifiers such as `conversationID` or `clientMsgID`. Do not log: + +- User or administrator tokens, secrets, or commercial business credentials. +- Complete message bodies, raw custom-message payloads, or private file URLs. +- Unnecessary user profiles, contact lists, or group-member lists. +- SDK database contents or complete local sandbox paths. + +Apply support and privacy policy to target identifiers as well, and redact them again before publishing an issue or sharing logs across teams. + +## Upload logs + +`uploadLogs()` receives a line count and an extension description. Obtain user consent first and explain what is collected, why it is needed, and how long it is retained. ```uts import { uploadLogs } from '@/uni_modules/unix-openim-sdk' -const operationID = `diagnostic-${Date.now()}` -await uploadLogs({ line: 2000, ex: JSON.stringify({ scene: 'login-timeout' }) }, operationID) +const operationID = createDiagnosticOperationID() + +await uploadLogs( + { + line: 2000, + ex: JSON.stringify({ scene: 'login-timeout' }), + }, + operationID, +) ``` -`operationID` is an optional diagnostic correlation value, not a user ID, idempotency key, or credential. Upload progress belongs to `onUploadLogsProgress`; completion does not itself open a support case. +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `line` | `number` | Yes | Number of log lines to upload. Apply a limit instead of an unbounded upload. | +| `ex` | `string` | Yes | Redacted diagnostic context, such as a scenario name. Never include tokens, message content, or credentials. | + +Promise success means that the log-upload request completed. It does not create a support case or mean that the problem has been analyzed. Limit retries on failure to avoid sustained background data and battery usage. + +## Observe upload progress + +`onUploadLogsProgress()` returns an independent subscription handle. The canonical business owner for this event is [Message overview](/sdk/uniapp/message/overview-message); this page only defines how diagnostic UI uses the progress. The diagnostic service that owns the listener must release it with `off(subscription)`. + +Upload progress is display state, not proof that support analysis has completed. Never place raw log content or a token in progress state. + +## Related pages -Obtain user consent, limit line count/retries, keep `ex` redacted, disable verbose production output, and never upload the entire local database as a shortcut. +- [Install, initialize, and inspect the SDK](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk) +- [Authenticate and manage a session](/sdk/uniapp/getting-started/authenticate-and-manage-session) +- [Send your first message](/sdk/uniapp/getting-started/send-first-message) +- [Send a message](/sdk/uniapp/message/sending-messages/send-message) From fd0a1fd62a7c22354202d5b4bb33fbaea9d0ce95 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 17:57:27 +0800 Subject: [PATCH 16/20] docs(uniapp): align English user guides with Wasm --- .../uniapp/user/blacklist/get-black-list.mdx | 85 +++++++++++++++++-- .../delete-friend-requests.mdx | 19 ++++- ...t-friend-application-list-as-applicant.mdx | 15 +++- ...t-friend-application-list-as-recipient.mdx | 68 +++++++++++++-- .../uniapp/user/friends/search-friends.mdx | 15 +++- .../uniapp/user/friends/update-friends.mdx | 21 ++++- .../online-status/subscribe-users-status.mdx | 66 ++++++++++++-- .../chat/sdk/uniapp/user/overview-user.mdx | 55 ++++++++++-- .../user/profile/get-self-user-info.mdx | 31 +++++-- .../uniapp/user/profile/get-users-info.mdx | 79 +++++++++++++++-- .../profile/set-friend-add-permission.mdx | 8 +- .../profile/set-global-message-reception.mdx | 26 +++++- .../sdk/uniapp/user/profile/set-self-info.mdx | 51 +++++++++-- 13 files changed, 475 insertions(+), 64 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx index 4b2066bf4a..f69be80115 100644 --- a/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx +++ b/content/docs/chat/sdk/uniapp/user/blacklist/get-black-list.mdx @@ -11,24 +11,91 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/blacklist/get-black-list' --- +The OpenIMSDK blacklist records users that the current account has blocked. Use `getBlackList()` to build blacklist settings, show relationship state on profile cards, and restrict chat entry points. + +Blacklist and group management are separate capabilities. Use group-member APIs to mute, remove, or change a group member's role; `getBlackList()` reads only the current user's personal blacklist. + +## Get the blacklist + +Call `getBlackList()` after initialization, login, and connection readiness. The Promise resolves directly to `OpenIMBlackListResult` or `null`; an empty `blackUsers` array means there are no blocked users. + ```uts -import { getBlackList, off, onBlackAdded, onBlackDeleted } from '@/uni_modules/unix-openim-sdk' +import { getBlackList } from '@/uni_modules/unix-openim-sdk' -const added = onBlackAdded((user) => upsertBlackUser(user)) -const deleted = onBlackDeleted((user) => removeBlackUser(user.userID)) const result = await getBlackList() -replaceBlackList(result?.blackUsers ?? []) -off(added) -off(deleted) +const blockedUsers = result?.blackUsers ?? [] +replaceBlockedUsers(blockedUsers) +``` + +Profile cards, conversation menus, and contact lists normally need only a set of blocked `userID` values. Use `userID` as the key; nickname and avatar are presentation fields. + +```uts +const blockedUserIDs = new Set() +blockedUsers.forEach((user) => blockedUserIDs.add(user.userID)) + +function isBlocked(userID : string) : boolean { + return blockedUserIDs.has(userID) +} ``` -The commercial alternative returns a differently named wrapper field: +The commercial edition also exposes `getBlacks()` Commercial, whose wrapper field is named `blacks`: ```uts import { getBlacks } from '@/uni_modules/unix-openim-sdk' const commercialResult = await getBlacks() -replaceBlackList(commercialResult?.blacks ?? []) +replaceBlockedUsers(commercialResult?.blacks ?? []) ``` -Do not mix the `blackUsers` and Commercial `blacks` result shapes. Blacklist and friendship are independent relationships. +Do not mix the `blackUsers` and `blacks` result shapes. Choose the entry that matches the installed edition rather than querying two snapshots. + +## Blacklist item fields + +Every `blackUsers` item is an `OpenIMBlackUserItem`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | Blocked user's ID and the merge key for the list and events. | +| `nickname` | `string` | Display nickname. | +| `faceURL` | `string` | Avatar URL. | +| `ownerUserID` | `string` | Owner of this blacklist relationship, normally the signed-in user. | +| `operatorUserID` | `string` | User that performed the block operation. | +| `createTime` | `number` | Time when the relationship was created. | +| `addSource` | `number` | Source value for the relationship. | +| `ex` | `string` | Application extension; parse only a confirmed format. | +| `attachedInfo` | `string` | SDK attachment data; parse only a confirmed contract. | + +If the UI also displays public profile or friend remark data, merge by `userID` while preserving the distinct sources of `OpenIMBlackUserItem`, `OpenIMFriendUserItem`, and `OpenIMPublicUserItem`. + +## Results and incremental changes + +Replace the current blacklist snapshot with the returned array after `getBlackList()` succeeds. The query itself does not trigger add or delete events. Requery on first entry, re-login, and explicit refresh. + +This page is the complete owner for `onBlackAdded` and `onBlackDeleted`: + +```uts +import { + off, + onBlackAdded, + onBlackDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const blacklistSubscriptions : Array = [ + onBlackAdded((user) => { + upsertBlockedUser(user.userID, user) + }), + onBlackDeleted((user) => { + removeBlockedUser(user.userID) + }), +] + +function releaseBlacklistSubscriptions() { + blacklistSubscriptions.forEach((subscription) => off(subscription)) + blacklistSubscriptions.length = 0 +} +``` + +Merge events by `userID`. After blocking, the other user cannot send to the current user, but the current user can still send to that user. Enforce a bidirectional product restriction separately if required. Blacklist and friendship remain independent state; do not assume that blocking removes a friend. + +Call `releaseBlacklistSubscriptions()` on logout, account switch, or destruction of the blacklist state layer. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx index df4a66ca8c..ccd6e25dc1 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/delete-friend-requests.mdx @@ -13,12 +13,27 @@ sourcePath: '/sdk/uniapp/user/friend-applications/delete-friend-requests' `deleteFriendRequests()` is Commercial. +## Parameters + +The operation receives `OpenIMDeleteFriendRequestsParams`. Every item in `friendRequests` contains: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `friendRequests[].fromUserID` | `string` | Yes | User ID of the applicant. | +| `friendRequests[].toUserID` | `string` | Yes | User ID of the recipient. | + ```uts import { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk' await deleteFriendRequests({ - friendRequests: [{ fromUserID: 'user_a', toUserID: 'user_b' }], + friendRequests: [ + { fromUserID: 'user_a', toUserID: 'user_b' }, + ], }) ``` -Each `OpenIMSimpleFriendRequest` identifies an exact request. Deleting request history does not remove an established friendship. Confirm targets in the UI and reload both the list and unhandled count; after a batch failure, do not assume which records were removed. +Each `OpenIMSimpleFriendRequest` identifies an exact request by `fromUserID:toUserID`. Deleting request history is not the same as rejecting an application and does not remove an established friendship. Use the friend deletion API to end a friendship. + +Promise success means that the deletion request completed. `onFriendApplicationDeleted` can arrive afterward; the complete listener is on [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient), where records are removed by `fromUserID:toUserID`. + +Confirm batch targets in the UI. After failure, do not assume that every or no item was deleted; requery both received and sent application lists to reconcile with the server snapshot. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx index ea64df4a07..83eec93eb2 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -11,6 +11,17 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant' --- +`getFriendApplicationListAsApplicant()` queries friend applications sent by the current account and returns `OpenIMFriendApplicationListResult` or `null`. + +## Parameters + +The parameter object can be omitted. To request an explicit page, use: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` or `null` | No | Pagination offset; use `0` for the first page. | +| `count` | `number` or `null` | No | Number of applications requested. | + ```uts import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' @@ -18,4 +29,6 @@ const result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 renderSentApplications(result?.applications ?? []) ``` -Parameters are optional. Results can move while pages load, so deduplicate with participant IDs and time fields rather than array indexes. Reload after App restoration, login, or missed events. +After Promise success, `applications` contains the current page of sent `OpenIMFriendApplicationItem[]`. See [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) for the fields. This query does not trigger an application event. + +Pagination can change while it is loading. Merge events by `fromUserID:toUserID` instead of array position. If an event arrives during paging, reset pagination and requery when necessary. Complete friend-application listeners live on the received-applications page. Rebuild this snapshot after App restoration, re-login, or any period in which events may have been missed. diff --git a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx index 0cbc3b3216..10211228fd 100644 --- a/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx +++ b/content/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -11,7 +11,55 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient' --- -Register all request events before loading the snapshot. +`getFriendApplicationListAsRecipient()` queries applications sent to the current account. The uni-app / uni-app x `OpenIMApplicationListParams` has only pagination fields and does not expose Wasm's `handleResults` filter. Filter by `handleResult` after the query if the UI should show only pending applications. + +## Parameters + +The parameter object can be omitted. To request an explicit page, use: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` or `null` | No | Pagination offset; use `0` for the first page. | +| `count` | `number` or `null` | No | Number of applications requested. | + +```uts +import { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk' + +const result = await getFriendApplicationListAsRecipient({ + offset: 0, + count: 20, +}) + +const applications = result?.applications ?? [] +replaceReceivedApplications(applications) +``` + +The Promise resolves directly to `OpenIMFriendApplicationListResult` or `null`. `applications` contains the current page of `OpenIMFriendApplicationItem[]`; querying does not itself trigger an application event. + +### Friend-application fields + +| Field | Type | Description | +| --- | --- | --- | +| `fromUserID` | `string` | Applicant's user ID. | +| `fromNickname` | `string` | Applicant nickname snapshot. | +| `fromFaceURL` | `string` | Applicant avatar snapshot. | +| `toUserID` | `string` | Recipient user ID. | +| `toNickname` | `string` | Recipient nickname snapshot. | +| `toFaceURL` | `string` | Recipient avatar snapshot. | +| `reqMsg` | `string` | Application message. | +| `handleResult` | `number` | Processing result: `0` pending, `1` accepted, `-1` rejected. | +| `handlerUserID` | `string` | Processing user ID; can be empty while pending. | +| `handleMsg` | `string` | Processing comment. | +| `handleTime` | `number` | Processing time; do not treat it as valid while pending. | +| `createTime` | `number` | Record creation time. | +| `ex` | `string` | Application extension string. | +| `attachedInfo` | `string` | SDK attachment data; parse only a confirmed contract. | + +Use `fromUserID:toUserID` as the merge key. Nicknames and avatars are snapshots from application creation or synchronization. Query the relevant user's current profile with `getUsersInfo()` when freshness matters. + +## Synchronize friend-application changes + +This page is the complete owner for the added, accepted, rejected, and deleted events. Register them before loading the snapshot. ```uts import { @@ -25,14 +73,20 @@ import { } from '@/uni_modules/unix-openim-sdk' const subscriptions : Array = [ - onFriendApplicationAdded((item) => upsertApplication(item)), - onFriendApplicationAccepted((item) => upsertApplication(item)), - onFriendApplicationRejected((item) => upsertApplication(item)), - onFriendApplicationDeleted((item) => removeApplication(item)), + onFriendApplicationAdded((item) => mergeFriendApplication(item.fromUserID, item.toUserID, item)), + onFriendApplicationAccepted((item) => mergeFriendApplication(item.fromUserID, item.toUserID, item)), + onFriendApplicationRejected((item) => mergeFriendApplication(item.fromUserID, item.toUserID, item)), + onFriendApplicationDeleted((item) => removeFriendApplication(item.fromUserID, item.toUserID)), ] const page = await getFriendApplicationListAsRecipient({ offset: 0, count: 50 }) replaceReceivedApplications(page?.applications ?? []) -subscriptions.forEach((subscription) => off(subscription)) + +function releaseFriendApplicationSubscriptions() { + subscriptions.forEach((subscription) => off(subscription)) + subscriptions.length = 0 +} ``` -Use a stable key based on both users and creation time. Handle a request with the accept or reject API; never mutate local state to imitate server success. +Route an event to the sent or received list according to whether the current user is `toUserID`. An accepted application creates a friendship that is merged through `onFriendAdded` on [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page). Pagination can be reset when events alter the list. + +Accept or reject a received application through the corresponding API; never mutate `handleResult` locally to imitate server success. Call `releaseFriendApplicationSubscriptions()` on logout, account switch, or destruction of the friend-application state layer. diff --git a/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx index 64f623cff4..7fb5797a8c 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/search-friends.mdx @@ -13,6 +13,17 @@ sourcePath: '/sdk/uniapp/user/friends/search-friends' `searchFriends()` searches only current friends, not every server user. +Use the boolean fields to choose which friend attributes are matched. The recommended flow uses one trimmed, non-empty keyword; reject an empty search before calling the SDK. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | Yes | Search keywords. The current flow uses the first non-empty keyword. | +| `isSearchUserID` | `boolean` | Yes | Whether to match friend user IDs. | +| `isSearchNickname` | `boolean` | Yes | Whether to match friend nicknames. | +| `isSearchRemark` | `boolean` | Yes | Whether to match remarks set by the current user. | + ```uts import { searchFriends } from '@/uni_modules/unix-openim-sdk' @@ -25,4 +36,6 @@ const result = await searchFriends({ renderFriends(result?.friends ?? []) ``` -Reject an empty search in the UI, deduplicate results by `userID`, and merge later friend events. Search flags affect only this query and do not update profiles or server indexes. +The Promise resolves directly to `OpenIMFriendListResult` or `null`; `friends` contains `OpenIMFriendUserItem[]`. See [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page) for friend fields. + +Search results are a snapshot for the current query. They do not modify friend profiles or server indexes and must not replace the full friend list. Link each result to existing friend state by `userID` and continue merging friend events. Use [Get specified friend information](/sdk/uniapp/user/friends/get-specified-friends-info) when the target friend IDs are already known. diff --git a/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx index 2e6b179e26..79371e5f48 100644 --- a/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx +++ b/content/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -13,13 +13,28 @@ sourcePath: '/sdk/uniapp/user/friends/update-friends' `updateFriends()` updates selected fields for one or more friendships. +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `friendUserIDs` | `string[]` | Yes | Friend IDs to update. The same values are applied to every target. | +| `remark` | `string` or `null` | No | New friend remark. | +| `isPinned` | `boolean` or `null` | No | Whether to pin the friends. | +| `ex` | `string` or `null` | No | New extension string; completely replaces the old value. | + ```uts import { updateFriends } from '@/uni_modules/unix-openim-sdk' -await updateFriends({ friendUserIDs: ['user_a', 'user_b'], remark: 'Project team', isPinned: true }) +await updateFriends({ + friendUserIDs: ['user_a', 'user_b'], + remark: 'Project team', + isPinned: true, +}) ``` -`friendUserIDs` must not be empty. Omitted `remark`, `isPinned`, and `ex` fields remain unchanged. Confirm through `onFriendInfoChanged` or a new query. +`friendUserIDs` must not be empty, and at least one update field must be present. If different friends need different values, call the operation separately. `ex` is a complete replacement string and is not merged as JSON by the SDK. + +Promise success means that the update request completed, not that the friend event arrived. Merge final state by `userID` from `onFriendInfoChanged` on [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page), or requery when reconciliation is needed. The commercial single-user alternative uses `pinned`: @@ -29,4 +44,4 @@ import { updateFriend } from '@/uni_modules/unix-openim-sdk' await updateFriend({ userID: 'user_a', pinned: true, remark: 'Owner' }) ``` -Do not race `updateFriends()` and Commercial `updateFriend()` for the same user. +`updateFriend()` addresses one `userID` and names the pin field `pinned`; `remark` and `ex` remain complete replacement values. Do not race `updateFriends()` and the Commercial `updateFriend()` for the same user. Choose one entry and serialize changes through the friend store. diff --git a/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx index 4e793e2ea7..5b732246d4 100644 --- a/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx +++ b/content/docs/chat/sdk/uniapp/user/online-status/subscribe-users-status.mdx @@ -11,19 +11,67 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/online-status/subscribe-users-status' --- -Register the event before subscribing and querying a snapshot to minimize the event/snapshot gap. +Online status means that a user is connected to OpenIMServer. It does not mean that the user is viewing the App, a conversation, or a message. Subscribe only to users required by the current UI or product flow. One account can subscribe to at most 3,000 users; do not subscribe to the entire directory. + +`subscribeUsersStatus()` establishes the subscription and resolves to a string result rather than a status array. After subscribing, call `getUserStatus()` for the current snapshot and merge later changes from `onUserStatusChanged`. ```uts -import { getUserStatus, off, onUserStatusChanged, subscribeUsersStatus } from '@/uni_modules/unix-openim-sdk' +import { + getUserStatus, + subscribeUsersStatus, +} from '@/uni_modules/unix-openim-sdk' + +const userIDs = uniqueUserIDs(['user_a', 'user_b']) -const presenceSubscription = onUserStatusChanged((result) => { - result.statuses.forEach((status) => replaceUserStatus(status.userID, status)) -}) -const userIDs = ['user_a', 'user_b'] await subscribeUsersStatus(userIDs) + const snapshot = await getUserStatus(userIDs) -snapshot?.statuses.forEach((status) => replaceUserStatus(status.userID, status)) -off(presenceSubscription) +snapshot?.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) +}) +``` + +Remove blank and duplicate IDs first. Subscription success, snapshot query, and later events are three separate stages; do not treat the subscription's string result as an online-status object. + +### Online-status fields + +`getUserStatus()` returns `OpenIMUserStatusListResult` or `null`. Every `statuses` element is an `OpenIMUserStatusItem`: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | User that owns the state and the cache merge key. | +| `status` | `number` | Aggregated online state. Interpret it with exported status constants rather than inventing numeric meanings. | +| `platformIDs` | `number[]` | Currently online platforms. An empty array does not reveal a specific device or last-active time. | + +One device going offline does not necessarily mean that all devices are offline. Display the aggregated `status` together with `platformIDs` according to the server's multi-device policy. + +## Listen for online-status changes + +This page is the complete owner for `onUserStatusChanged`. Register the event before subscribing and querying the snapshot to minimize the gap: + +```uts +import { + off, + onUserStatusChanged, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const statusSubscription = onUserStatusChanged((result) => { + result.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) + }) +}) + +await subscribeUsersStatus(userIDs) + +const current = await getUserStatus(userIDs) +current?.statuses.forEach((status) => { + replaceUserStatus(status.userID, status) +}) + +function releaseStatusListener() { + off(statusSubscription) +} ``` -Presence can include per-platform details. Merge by user and platform; one offline device does not imply that every device is offline. Subscribe only to needed users and later call `unsubscribeUsersStatus()`. +Merge both snapshot and events idempotently by `userID`. Call `releaseStatusListener()` on logout, account switch, or state-layer destruction. When some users are no longer needed, also [unsubscribe from their status](/sdk/uniapp/user/online-status/unsubscribe-users-status) to release subscription capacity. diff --git a/content/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/docs/chat/sdk/uniapp/user/overview-user.mdx index 8faf35784a..276e720e5f 100644 --- a/content/docs/chat/sdk/uniapp/user/overview-user.mdx +++ b/content/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -11,16 +11,53 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/overview-user' --- -The user domain covers the current profile, public profiles, presence, friendships, friend requests, and blacklist entries. Use stable `userID` values as keys; nicknames and avatars can change. +`unix-openim-sdk` identifies users by `userID`. When implementing profile cards, friend requests, contacts, or blacklists, distinguish an application's public user profile from the current user's friendship, friend-application, and blacklist state. -`OpenIMUserInfo` includes public `userID`, `nickname`, `faceURL`, `ex`, and optional `createTime`. `attachedInfo` and `globalRecvMsgOpt` are Commercial extensions and must remain optional. Friend data uses `OpenIMFriendUserItem`, blacklist data uses `OpenIMBlackUserItem`, and requests use `OpenIMFriendApplicationItem`. +Group member lists, in-group nicknames, group roles, and member management belong to the group domain. See [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list). Use `userID` as the cross-platform stable key; nicknames and avatars can change. -Register events before loading a snapshot, then merge both sources idempotently by `userID`. Reload snapshots after reconnection, login, or process restoration; events alone are not a complete database. +## User types -- [Read your profile](/sdk/uniapp/user/profile/get-self-user-info) -- [Subscribe to presence](/sdk/uniapp/user/online-status/subscribe-users-status) -- [List friends](/sdk/uniapp/user/friends/get-friend-list-page) -- [Read received friend requests](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) -- [Read the blacklist](/sdk/uniapp/user/blacklist/get-black-list) +The SDK returns different user objects for different scenarios: -Your application backend remains authoritative for identity and authorization. Chat profiles must not replace account authentication. +| Type | Use case | Primary APIs | +| --- | --- | --- | +| `OpenIMUserInfo` | Current user's profile, settings page, avatar, and nickname | `getSelfUserInfo()`, `setSelfInfo()` | +| `OpenIMPublicUserItem` | User lookup, friend candidates, and profiles for users who are not friends; public alias of `OpenIMUserInfo` | `getUsersInfo()` | +| `OpenIMFriendUserItem` | Friend list, remarks, pinning, and relationship extension data | `getFriendListPage()`, `getSpecifiedFriendsInfo()` | +| `OpenIMBlackUserItem` | Users on the current account's blacklist | `getBlackList()`, `addBlack()`, `removeBlack()` | +| `OpenIMFriendApplicationItem` | Sent or received friend applications and their processing state | Friend-application query, accept, reject, and delete APIs | +| `OpenIMUserStatusItem` | Aggregated online state and online platforms | `subscribeUsersStatus()`, `getUserStatus()` | + +The same `userID` can appear in public, friend, blacklist, and group-member data. Prefer `OpenIMFriendUserItem` for contacts, `OpenIMPublicUserItem` for a stranger's profile card, and `OpenIMGroupMemberItem` in group-member lists. Conversation-list and chat-page titles come from conversation data and should use `OpenIMConversationItem.showName`. + +Public `OpenIMUserInfo` fields include `userID`, `nickname`, `faceURL`, `ex`, and optional `createTime`. `attachedInfo` and `globalRecvMsgOpt` are Commercial fields; check for absence and do not assume that a public server returns them. + +## Feature pages + +| Task | Recommended page | +| --- | --- | +| Query public profiles by `userID` for friend candidates or profile cards | [Get user profiles](/sdk/uniapp/user/profile/get-users-info) | +| Page through, search, or query friendships by ID | [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page) | +| Send or process friend applications | [Send a friend application](/sdk/uniapp/user/friend-applications/add-friend), [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) | +| Update friend information | [Update friend information](/sdk/uniapp/user/friends/update-friends) | +| Delete a friendship | [Delete a friend](/sdk/uniapp/user/friends/delete-friend) | +| View and maintain the blacklist | [Get the blacklist](/sdk/uniapp/user/blacklist/get-black-list) | +| Read or update the current user's nickname, avatar, and extension data | [Update your profile](/sdk/uniapp/user/profile/set-self-info) | +| Set account-level message reception | [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception) | +| Understand the current contract boundary for friend-add permission | [Set friend request permissions](/sdk/uniapp/user/profile/set-friend-add-permission) | +| Subscribe to and read online status | [Subscribe to online status](/sdk/uniapp/user/online-status/subscribe-users-status) | +| List, search, or retrieve selected group-member profiles | [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) | + +The application backend remains authoritative for account identity, verified identity, organization relationships, and business authorization. SDK profile fields are for chat presentation and cannot replace application login or authorization. + +## State updates + +Query the relevant snapshot when a page opens, then merge incremental events: + +- Current user profile changes: [Update your profile](/sdk/uniapp/user/profile/set-self-info). +- Friend application changes: [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient). +- Friendship and friend profile changes: [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page). +- Blacklist changes: [Get the blacklist](/sdk/uniapp/user/blacklist/get-black-list). +- Online status changes: [Subscribe to online status](/sdk/uniapp/user/online-status/subscribe-users-status). + +Merge all these lists idempotently by `userID`. Events are not a complete database recovery mechanism; requery the snapshots needed by the current UI after reconnect, re-login, account switch, or process restoration. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 8a6b05c5aa..2ef999a208 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -11,13 +11,34 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/get-self-user-info' --- -`getSelfUserInfo()` resolves to `OpenIMUserInfo | null` for the current logged-in account. +After initialization, login, and connection readiness, call `getSelfUserInfo()` to query the current account's profile: ```uts -import { getSelfUserInfo } from '@/uni_modules/unix-openim-sdk' +import { + getSelfUserInfo, + type OpenIMUserInfo, +} from '@/uni_modules/unix-openim-sdk' -const self = await getSelfUserInfo() -if (self != null) renderProfile(self.nickname, self.faceURL) +const currentUser : OpenIMUserInfo | null = await getSelfUserInfo() +if (currentUser != null) { + renderProfile(currentUser.nickname, currentUser.faceURL) +} ``` -Verify that the returned `userID` matches the application account. `attachedInfo` and `globalRecvMsgOpt` are optional Commercial fields. Refresh this snapshot after login or missed events; ongoing updates arrive through `onSelfInfoUpdated` on the profile-update page. +## Return result + +The Promise resolves directly to `OpenIMUserInfo` or `null`, without a `{ data }` wrapper. A non-null object contains: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | Signed-in user's OpenIMSDK user ID and the stable identifier for this profile snapshot. | +| `nickname` | `string` | Account-level nickname. | +| `faceURL` | `string` | Account-level avatar URL. | +| `createTime` | `number` or `null` (optional) | Time when the user record was created. | +| `globalRecvMsgOpt` Commercial field | `number` or `null` (optional) | Account-level message reception option. See [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception). | +| `attachedInfo` Commercial field | `string` or `null` (optional) | SDK attachment data. Parse it only according to a confirmed application contract. | +| `ex` | `string` | Account-level extension string defined by the application. | + +Verify that the returned `userID` matches the current application account. Do not fabricate an empty user object when the result is `null`; use login state and redacted diagnostics to determine why a snapshot is unavailable. + +This query establishes a snapshot and does not trigger a profile event. Clear it when switching accounts. See [Update your profile](/sdk/uniapp/user/profile/set-self-info) for merging `onSelfInfoUpdated` and reconciling with another query. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index b263c9b102..622a35ccf0 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -11,14 +11,81 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/get-users-info' --- -`getUsersInfo()` resolves to `OpenIMUserListResult | null`. +Use `getUsersInfo()` to query application users' public profiles by `userID`. It is suitable for friend candidates, stranger profile cards, and message-sender profiles. + +If the product searches by nickname, phone number, organization, email, or another application field, let a trusted backend perform the search and permission check first, then pass the returned `userID` values to `getUsersInfo()`. Administrator tokens and user-directory administration must remain on that backend. + +## Query public profiles + +Pass an array of OpenIMSDK user IDs. Deduplicate them and limit each batch; do not issue one request per row while a long list scrolls. + +```uts +import { + getUsersInfo, + type OpenIMUserInfo, +} from '@/uni_modules/unix-openim-sdk' + +const userIDList : Array = uniqueUserIDs(['user_a', 'user_b']) +const result = await getUsersInfo(userIDList) +const users : Array = result?.users ?? [] + +users.forEach((user) => { + cachePublicUser(user.userID, user) +}) +``` + +The Promise resolves directly to `OpenIMUserListResult` or `null`. Its `users` field contains the matched `OpenIMUserInfo[]`; `OpenIMPublicUserItem` is the public-profile alias for that shape. The result can be shorter than the request and does not have to preserve input order. Build a map by `userID` and retain placeholder state for users that do not exist, are inaccessible, or were not returned. + +Common fields are: + +| Field | Type | Description | +| --- | --- | --- | +| `userID` | `string` | OpenIMSDK user ID. | +| `nickname` | `string` | Account-level public nickname. | +| `faceURL` | `string` | Account-level public avatar URL. | +| `createTime` | `number` or `null` (optional) | Time when the user record was created. | +| `ex` | `string` | Account-level extension string whose format is defined by the application. | +| `attachedInfo` Commercial field | `string` or `null` (optional) | Parse only according to a confirmed commercial business contract. | +| `globalRecvMsgOpt` Commercial field | `number` or `null` (optional) | Account-level message reception option. A stranger profile card normally does not need to display it. | + +Neither `ex` nor `attachedInfo` is a trusted identity, authorization, or authentication credential. This query is also read-only for other accounts. Update only the signed-in user's profile with `setSelfInfo()`. + +## Results and profile refresh + +Use the returned `users` to update the current public-profile snapshot. Query again when opening a profile card, refreshing manually, reconnecting, or receiving a profile-change notification from the application backend. When a page displays several users, collect the visible `userID` values, deduplicate them, query one batch, and merge by `userID`. + +The SDK has no general change event for arbitrary users' public profiles. `onSelfInfoUpdated` carries only the signed-in user's profile and must not be written into another user's public-profile cache. See [Update your profile](/sdk/uniapp/user/profile/set-self-info) for current-account profile updates and reconciliation. + +## Search for users to add as friends + +The application backend normally returns candidate `userID` values first. The App then calls `getUsersInfo()` for public presentation and continues to the friend-application flow after the user selects a target. ```uts -import { getUsersInfo } from '@/uni_modules/unix-openim-sdk' +async function searchUsersForFriendRequest(keyword : string) : Promise> { + const userIDs = await searchUserIDsFromBusinessBackend(keyword) + if (userIDs.length == 0) { + return [] + } -const result = await getUsersInfo(['user_a', 'user_b']) -const users = result?.users ?? [] -users.forEach((user) => cacheUser(user.userID, user)) + const result = await getUsersInfo(uniqueUserIDs(userIDs)) + return result?.users ?? [] +} ``` -Results can be shorter than the request and are not ordered like the input. Map by `userID` and retain placeholders for missing or inaccessible users. Treat commercial `attachedInfo` and `globalRecvMsgOpt` as optional, and never trust `ex` or `attachedInfo` as identity credentials. Batch and cache large lookups. +If the product supports only exact user-ID lookup, validate that input and pass it directly. For fuzzy search or sensitive fields, the backend must enforce authorization, rate limits, redaction, and auditing. + +## Choose display data by context + +| Context | Preferred type | +| --- | --- | +| Application search or a stranger's profile card | `OpenIMPublicUserItem` / `OpenIMUserInfo` | +| Friend list, contacts, or friend remarks | `OpenIMFriendUserItem` | +| Group member list, in-group nickname, or group role | `OpenIMGroupMemberItem` | + +Friend remarks and in-group nicknames belong to friendship and group-member data. See [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page), [Get specified friend information](/sdk/uniapp/user/friends/get-specified-friends-info), and [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list). + +## Next steps + +- [Get the friend list](/sdk/uniapp/user/friends/get-friend-list-page) +- [Get specified friend information](/sdk/uniapp/user/friends/get-specified-friends-info) +- [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx index 6d55f7c949..473fa05c6b 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-friend-add-permission.mdx @@ -11,6 +11,10 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/set-friend-add-permission' --- -Friend-add permission is a Commercial account policy. `unix-openim-sdk 0.2.0-rc.3` exposes the related profile data but `OpenIMSetSelfInfoParams` has no `addFriendPermission` setter. +Friend-add permission is a Commercial account policy. The locked `unix-openim-sdk 0.2.0-rc.3` exposes related commercial profile data, but `OpenIMSetSelfInfoParams` has no `addFriendPermission` write parameter. -Do not invent a client setter or store this policy in `ex`. Change it through a supported commercial backend/administration API, then reload the user profile. If the field is absent, show the capability as unavailable instead of assuming a policy. +This release therefore cannot expose or simulate a client setter. Do not store the policy in `ex`. Change it through a supported commercial backend or an administration API confirmed to support the field, then requery the current profile and refresh the UI. + +Perform a capability check before displaying this setting. If the field is absent on a public edition, older server, or response that does not expose it, show the setting as unavailable. Do not assume that absence means “anyone can add” or “verification required.” + +See [Send a friend application](/sdk/uniapp/user/friend-applications/add-friend) and [Get received friend applications](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) for the client-side friend-request flow. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx index 7fb86b6d1e..4d188c19f9 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -11,12 +11,30 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' --- -`globalRecvMsgOpt` is a Commercial optional field of `OpenIMSetSelfInfoParams`. It controls the account globally and is different from a conversation's `recvMsgOpt`. +`globalRecvMsgOpt` is a Commercial field that defines the account's default message-reception and notification policy. It is not an ordinary nickname, avatar, or display-profile field. ```uts -import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' +import { + setSelfInfo, + type OpenIMSetSelfInfoRecvMsgOpt, +} from '@/uni_modules/unix-openim-sdk' -await setSelfInfo({ globalRecvMsgOpt: 0 }) +const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 +await setSelfInfo({ + globalRecvMsgOpt: receiveWithoutNotification, +}) ``` -Use exported `OpenIMSetSelfInfoRecvMsgOpt` constants and send only this field to avoid overwriting profile data. Confirm the final value with `getSelfUserInfo()`. Hide or disable this control when the deployed edition does not expose the field. +The contract permits these values: + +| Value | Meaning | +| --- | --- | +| `0` | Receive messages normally and allow offline push or notifications. | +| `1` | Do not receive messages. Use only when the product explicitly needs to stop delivery and the server policy is understood. | +| `2` | Receive messages without offline push or notifications, equivalent to all-day do not disturb. | + +Pass only `globalRecvMsgOpt` so changing message policy does not overwrite nickname, avatar, or `ex`. The plugin has no separate setter for this field. + +A conversation's `recvMsgOpt` is a more specific conversation-level option; see [Set message reception for a conversation](/sdk/uniapp/conversation/managing-conversations/set-message-receive-option). When account and conversation settings coexist, display the final conversation state returned by the server rather than inferring it only from a local switch. + +Promise success means that the update request completed, not that `onSelfInfoUpdated` has arrived. See [Update your profile](/sdk/uniapp/user/profile/set-self-info) for the event and `getSelfUserInfo()` reconciliation. Public editions may omit this field; show the control according to capability configuration and do not interpret absence as a particular policy. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index 3b07bfeb3a..2853ea96d3 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -11,14 +11,53 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/set-self-info' --- -Pass only fields that should change; do not use empty strings to mean “unchanged.” +`setSelfInfo()` updates the signed-in user's basic display profile. Pass only the fields that really need to change; do not use empty strings or `null` to mean “unchanged.” + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `nickname` | `string` or `null` | No | New nickname. | +| `faceURL` | `string` or `null` | No | New avatar URL. | +| `ex` | `string` or `null` | No | New extension string. It completely replaces the previous value. | +| `globalRecvMsgOpt` Commercial field | `OpenIMSetSelfInfoRecvMsgOpt` or `null` | No | Account-level message reception option; update it through the corresponding settings flow. | + +Pass at least one field that actually needs to change. ```uts -import { off, onSelfInfoUpdated, setSelfInfo } from '@/uni_modules/unix-openim-sdk' +import { setSelfInfo } from '@/uni_modules/unix-openim-sdk' + +await setSelfInfo({ + nickname: 'OpenIM User', + faceURL: 'https://cdn.example.com/avatar.png', + ex: mergedExtra, +}) +``` + +`ex` is a complete string; the SDK does not merge JSON automatically. If several application modules share it, read the current value first and merge each module's namespace before writing the complete replacement. + +`setSelfInfo()` also carries the account-level `globalRecvMsgOpt`, but do not save it together with ordinary profile data. See [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception). The current Private rc.3 interface has no setter for the policy governing how other users add this account. Do not infer or call a method that exists only in the Wasm page; see [Set friend request permissions](/sdk/uniapp/user/profile/set-friend-add-permission) for the exact contract boundary. + +Promise success means that the update request completed, not that the profile event has arrived. Reconcile the final profile through `onSelfInfoUpdated` or another `getSelfUserInfo()` query. + +## Listen for current-user profile changes + +This page is the complete owner for `onSelfInfoUpdated`. The event carries a complete updated `OpenIMUserInfo`; replace the current user snapshot by `userID`. + +```uts +import { + off, + onSelfInfoUpdated, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const selfInfoSubscription = onSelfInfoUpdated((user) => { + replaceCurrentUser(user.userID, user) +}) -const profileSubscription = onSelfInfoUpdated((user) => replaceCurrentUser(user.userID, user)) -await setSelfInfo({ nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png' }) -off(profileSubscription) +function releaseSelfInfoSubscription() { + off(selfInfoSubscription) +} ``` -`OpenIMSetSelfInfoParams` supports `nickname`, `faceURL`, `ex`, and commercial `globalRecvMsgOpt`. Replace cached data by `userID` from the event or a fresh query. Each page must release its own handle, or an application user store can own one shared subscription. +Do not update only the local state of the page that sent the request. If several pages need the current profile, let one application user store subscribe, or let each owner keep and release its own handle. Call `releaseSelfInfoSubscription()` on logout, account switch, or destruction of the user state layer. From 1625f9da8882b393da97f21cf2aeabf87967ed71 Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 18:04:01 +0800 Subject: [PATCH 17/20] docs(uniapp): align English conversation guides with Wasm --- .../add-conversations-to-groups.mdx | 20 ++++- .../create-conversation-group.mdx | 28 ++++++- .../delete-conversation-group.mdx | 10 ++- ...-conversation-group-by-conversation-id.mdx | 5 +- ...ersation-group-info-with-conversations.mdx | 27 ++++++- .../get-conversation-groups.mdx | 31 ++++++- .../overview-conversation-groups.mdx | 68 ++++++++++++++-- .../remove-conversations-from-groups.mdx | 20 ++++- .../set-conversation-group-order.mdx | 24 +++++- .../update-conversation-group.mdx | 23 +++++- .../clear-conversation-messages.mdx | 6 +- .../clear-group-mentions.mdx | 6 +- .../delete-conversation-with-messages.mdx | 6 +- .../delete-conversation.mdx | 6 +- .../get-total-unread-count.mdx | 8 +- .../hide-a-conversation.mdx | 8 +- .../hide-all-conversations.mdx | 6 +- .../mark-all-conversations-read.mdx | 8 +- .../mark-conversation-read.mdx | 23 +++++- .../mark-conversation.mdx | 6 +- .../pin-conversation.mdx | 9 ++- .../set-burn-duration.mdx | 6 +- .../set-conversation-draft.mdx | 14 +++- .../set-conversation-extension.mdx | 6 +- .../set-conversation-remark.mdx | 6 +- .../set-message-destruct.mdx | 10 ++- .../set-message-receive-option.mdx | 8 +- .../set-private-chat.mdx | 6 +- .../conversation/overview-conversation.mdx | 62 +++++++++++++- .../get-conversation-by-target.mdx | 24 ++++-- .../get-conversation-id.mdx | 14 +++- .../get-conversations-by-id.mdx | 8 +- .../retrieve-conversation-list.mdx | 81 ++++++++++++++++--- .../search-conversations.mdx | 10 ++- 34 files changed, 530 insertions(+), 73 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx index 176a31f328..fe93edd08d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups.mdx @@ -11,10 +11,26 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups' --- +`addConversationsToGroups()` Commercial updates membership using explicit sets of conversation IDs and group IDs. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | Yes | Conversations to add. | +| `conversationGroupIDs` | `string[]` | Yes | Target groups. Every conversation is added to every target group. | + ```uts import { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk' -await addConversationsToGroups({ conversationGroupIDList, conversationIDList }) +await addConversationsToGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: ['group_a'], +}) ``` -This Commercial batch adds explicit conversations to explicit groups. Deduplicate both arrays and confirm membership from events or a new snapshot. +Both arrays must be non-empty. Remove blank values and duplicates before calling. One conversation can belong to several groups; this operation does not alter its messages or remove its other group memberships. + +## Return result + +The Promise resolves directly to Core's string result, meaning the membership request completed. It does not mean that the local group-member event has arrived. Confirm final membership through `onConversationGroupMemberAdded` or a new query, and never retain a local-only membership after failure. See [Conversation groups overview](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups) for the complete raw-event handling. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx index b91c3d6b16..ccdb68239a 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -11,10 +11,34 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group' --- +`createConversationGroup()` Commercial creates a custom group and can add one initial conversation. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `name` | `string` | Yes | Group name. Validate blank values and length according to product rules. | +| `order` | `number` | Yes | Sort value. Use one consistent direction throughout the product. | +| `conversationGroupType` | `OpenIMConversationGroupType` | Yes | Group type allowed by the plugin contract. | +| `conversationID` | `string` or `null` | No | Initial conversation added during creation. | +| `ex` | `string` or `null` | No | Extension string. It is a complete value and is not merged as JSON. | + ```uts import { createConversationGroup } from '@/uni_modules/unix-openim-sdk' -const group = await createConversationGroup({ groupName: 'Priority', conversationIDList }) +const result = await createConversationGroup({ + name: 'Priority', + order: 100, + conversationGroupType: 0, + conversationID, + ex: '', +}) + +const group = result?.conversationGroup ``` -This is Commercial. Use non-empty unique conversation IDs and merge the returned group/event by its stable ID. +## Return result + +The Promise resolves directly to `OpenIMCreateConversationGroupResult` or `null`. Its `conversationGroup` is the new snapshot and can itself be `null`; add it to the local index only after validating a non-empty `conversationGroupID`. + +Promise completion and `onConversationGroupAdded` are separate stages. Requery after the raw event to reconcile the final list. If `conversationID` was provided, reconcile that membership from the query as well. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx index fbbc1eb5f2..32beca1a6e 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group.mdx @@ -11,10 +11,16 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group' --- +`deleteConversationGroup()` Commercial deletes one conversation group. The required `conversationGroupID` must come from the current account's group snapshot, not a name or array index. + ```uts import { deleteConversationGroup } from '@/uni_modules/unix-openim-sdk' -await deleteConversationGroup(conversationGroupID) +await deleteConversationGroup({ conversationGroupID: groupID }) ``` -Deleting a Commercial group does not delete its conversations or messages. Confirm destructive UI and remove the group only after the event or refreshed snapshot. +## Return result + +The Promise resolves directly to a string result, meaning the deletion request completed. Deleting a group does not delete its conversations, messages, or the underlying conversation records. + +Ask for confirmation in the UI. After success, use `onConversationGroupDeleted` or a new query to remove the local group and membership indexes by `conversationGroupID`. Do not hide the group before a failed Promise, and prefer a new snapshot when event and local state disagree. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx index 934ddb17a0..4f21e2d2bb 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id.mdx @@ -14,7 +14,8 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversat ```uts import { getConversationGroupByConversationID } from '@/uni_modules/unix-openim-sdk' -const result = await getConversationGroupByConversationID(conversationID) +const result = await getConversationGroupByConversationID({ conversationID }) +const groups = result?.conversationGroups ?? [] ``` -This Commercial operation returns the group association for one conversation. Use the returned group ID rather than inferring membership from UI order. +This Commercial operation returns every group containing one conversation. A conversation can belong to several groups, so do not read only the first item. Deduplicate by `conversationGroupID`; an empty array means that the conversation currently belongs to no group, not that the query failed. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx index 32bf99ab37..b429e528fc 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -11,10 +11,33 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations' --- +`getConversationGroupInfoWithConversations()` Commercial returns group metadata, the total conversation count, and one page of conversations. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Group to query. | +| `pagination.pageNumber` | `number` | Yes | Page number; this contract example starts at `1`. | +| `pagination.showNumber` | `number` | Yes | Conversations requested per page. | + ```uts import { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk' -const result = await getConversationGroupInfoWithConversations(conversationGroupID) +const result = await getConversationGroupInfoWithConversations({ + conversationGroupID: groupID, + pagination: { pageNumber: 1, showNumber: 100 }, +}) ``` -The Commercial result combines group metadata with member conversations. Treat it as a snapshot and merge later group/membership events by stable IDs. +## Return result + +The Promise resolves directly to `OpenIMGetConversationGroupInfoWithConversationsResult` or `null`: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationGroup` | `OpenIMConversationGroupItem` or `null` | Group metadata. Do not continue paging if it is `null`. | +| `ConversationTotal` | `number` or `null` (optional) | Total conversations. The initial uppercase `C` is part of the contract. | +| `conversations` | `OpenIMConversationItem[]` | Current page. | + +Membership can change while pages load. Deduplicate by `conversationID`, and rebuild pagination on the first page or after a membership event. Do not replace `ConversationTotal` with the current array length. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx index 4db5936f5f..483386e8bd 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups.mdx @@ -11,11 +11,36 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups' --- +`getConversationGroups()` Commercial queries groups by `conversationGroupType`. + +`conversationGroupType` is a required `OpenIMConversationGroupQueryType`. Use the contract value for normal custom groups when rendering the normal grouping UI, or the contract value that queries all types when the product needs a complete snapshot. Do not mix a creation type, UI tab index, or local enum with the query type. + ```uts import { getConversationGroups } from '@/uni_modules/unix-openim-sdk' -const result = await getConversationGroups() -replaceConversationGroups(result?.groups ?? []) +const result = await getConversationGroups({ conversationGroupType: 0 }) +const groups = result?.conversationGroups ?? [] ``` -This Commercial snapshot is ordered by server/Core state. Merge later group events and reload after account or synchronization changes. +## Return result + +The Promise resolves directly to `OpenIMGetConversationGroupsResult` or `null`. Read the snapshot from `conversationGroups`, deduplicate valid IDs, and sort by `order`. + +### Conversation-group fields + +Every `OpenIMConversationGroupItem` field can be absent: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationGroupID` | `string` or `null` | Stable group ID and merge key for group events. Validate it before caching. | +| `name` | `string` or `null` | Display name. | +| `order` | `number` or `null` | Server/Core sort value. | +| `conversationGroupType` | `number` or `null` | Group type. | +| `conversationIDs` | `string[]` or `null` | Conversation IDs included in this snapshot, not complete conversation objects. | +| `hidden` | `boolean` or `null` | Whether the group is hidden. | +| `unreadCount` | `number` or `null` | Aggregate unread-count snapshot. | +| `ex` | `string` or `null` | Application extension string; parse only a confirmed format. | + +The item stores conversation IDs rather than complete conversation details. Use [Get a group with its conversations](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) when member conversation objects, pages, and the total count are needed. + +This operation only establishes a snapshot and does not trigger a group event. Merge later incremental events and query again to reconcile after reconnect, account change, or an event gap. See [Conversation groups overview](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups) for the event list. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx index 876bc521e2..7b0a348b46 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -11,7 +11,49 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups' --- -Conversation groups are Commercial. Keep group and membership stores synchronized from snapshots plus five events. +Conversation groups are Commercial. They organize conversations into custom groups with a name, order, hidden state, unread snapshot, and member conversation IDs. + +## Group types + +Creation uses `OpenIMConversationGroupType`; queries use `OpenIMConversationGroupQueryType`. They belong to different operation contracts. Do not pass a UI tab index directly as either SDK type. + +One conversation can belong to several groups. Groups organize conversation entry points; they do not copy or move message data. Deleting a group or removing membership does not delete the underlying conversation. + +## Group data + +Every `OpenIMConversationGroupItem` field is optional: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationGroupID` | `string` or `null` | Stable group identifier. Cache only after validating it. | +| `name` | `string` or `null` | Group name. | +| `order` | `number` or `null` | Sort value. | +| `ex` | `string` or `null` | Application extension; parse only a confirmed format. | +| `conversationGroupType` | `number` or `null` | Group type. | +| `hidden` | `boolean` or `null` | Whether the group is hidden. | +| `unreadCount` | `number` or `null` | Group-level unread snapshot. | +| `conversationIDs` | `string[]` or `null` | Member IDs included in this response; it might not be a complete paginated set. | + +Use a non-empty `conversationGroupID` as the index key. Names, order, and hidden state can change. Query [group information with conversations](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) when complete membership, conversation objects, and total count are needed. + +## Available operations + +| Task | Page | +| --- | --- | +| Create a group and optionally add one initial conversation | [Create a conversation group](/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group) | +| Query groups | [Get conversation groups](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups) | +| Query group metadata, members, and total count | [Get a group with its conversations](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) | +| Query all groups containing one conversation | [Get groups for a conversation](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id) | +| Add or remove membership | [Add conversations to groups](/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups), [Remove conversations from groups](/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups) | +| Update name, extension, or hidden state | [Update a conversation group](/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group) | +| Change group ordering | [Set conversation-group order](/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order) | +| Delete a group | [Delete a conversation group](/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group) | + +Query a snapshot when the page opens. After a mutation Promise succeeds, continue to wait for an event or requery. When raw event fields are not frozen, never replace a query result with guessed local state. + +## Listen for group changes + +The five group events return opaque JSON strings rather than typed objects: ```uts import { @@ -23,12 +65,26 @@ import { onConversationGroupMemberDeleted, } from '@/uni_modules/unix-openim-sdk' -const subscriptions = [ - onConversationGroupAdded(upsertGroup), onConversationGroupChanged(upsertGroup), - onConversationGroupDeleted(removeGroup), onConversationGroupMemberAdded(mergeMembers), - onConversationGroupMemberDeleted(removeMembers), +function refreshFromRawGroupEvent(payload : string) { + try { + const value = JSON.parseObject(payload) + if (value != null) refreshConversationGroups() + } catch (_) { + console.error('Invalid conversation group event payload') + } +} + +const addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent) +const subscriptions : Array = [ + addedSubscription, + onConversationGroupChanged(refreshFromRawGroupEvent), + onConversationGroupDeleted(refreshFromRawGroupEvent), + onConversationGroupMemberAdded(refreshFromRawGroupEvent), + onConversationGroupMemberDeleted(refreshFromRawGroupEvent), ] subscriptions.forEach((subscription) => off(subscription)) ``` -Merge by group and conversation IDs, preserve ordering, and reload snapshots after login or synchronization gaps. +The added, changed, and deleted events describe group objects; the member-added and member-deleted events describe membership. Because the raw payload has no frozen DTO, validate only that it is valid JSON and then requery the related snapshot. + +Do not depend on unfrozen fields after JSON validation. Handlers should return quickly and isolate refresh tasks by the current logged-in user. Stop old-account writes before releasing each handle on account switch or dispose. Never log a complete payload because `ex` and other fields can contain application data. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx index a2796d380d..717f836388 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups.mdx @@ -11,10 +11,26 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups' --- +`removeConversationsFromGroups()` Commercial uses the same membership parameters as the add operation. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationIDs` | `string[]` | Yes | Conversations to remove. | +| `conversationGroupIDs` | `string[]` | Yes | Groups from which to remove them. | + ```uts import { removeConversationsFromGroups } from '@/uni_modules/unix-openim-sdk' -await removeConversationsFromGroups({ conversationGroupIDList, conversationIDList }) +await removeConversationsFromGroups({ + conversationIDs: [conversationID], + conversationGroupIDs: ['group_a'], +}) ``` -This Commercial batch changes group membership only; it does not hide or delete conversations. Refresh membership after partial or failed operations. +Both arrays must be non-empty and deduplicated. Removing membership does not delete a conversation or its messages and does not affect that conversation's membership in other groups. + +## Return result + +The Promise resolves directly to a string result, meaning the request completed rather than proving that the local snapshot is updated. Process `onConversationGroupMemberDeleted` or requery the group. Let the server's final state handle a repeated removal; do not retry forever or fabricate local success after failure. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx index cdc1cb852c..c39d326482 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order.mdx @@ -11,10 +11,30 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order' --- +`setConversationGroupOrder()` Commercial submits group IDs with their new sort values in one batch. + +## Parameters + +`conversationGroupOrders` is a non-empty array. Every item contains: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Group to reorder. | +| `order` | `number` | Yes | New sort value. Avoid duplicate values or unstable ordering rules in one batch. | + ```uts import { setConversationGroupOrder } from '@/uni_modules/unix-openim-sdk' -await setConversationGroupOrder(conversationGroupIDList) +await setConversationGroupOrder({ + conversationGroupOrders: [ + { conversationGroupID: 'group_a', order: 100 }, + { conversationGroupID: 'group_b', order: 200 }, + ], +}) ``` -Send the complete desired unique group-ID order for this Commercial operation. Serialize concurrent reorder requests and refresh after failure. +Submit the complete affected set once when dragging ends rather than issuing one request per movement. Deduplicate by `conversationGroupID` and calculate all affected values with a stable algorithm. + +## Return result + +The Promise resolves directly to a string result, meaning the reorder request completed. Requery groups or await the group-change event to confirm final ordering. If several clients edit concurrently, use the final server `order` rather than retaining only the local drag order. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx index 9cd3cf8a9e..ad6bac9d62 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -11,10 +11,29 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group' --- +`updateConversationGroup()` Commercial updates only the supplied fields. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationGroupID` | `string` | Yes | Group to update. | +| `name` | `string` or `null` | No | New name. | +| `ex` | `string` or `null` | No | New extension string; completely replaces the old value. | +| `hidden` | `boolean` or `null` | No | Whether the application UI hides the group. | + ```uts import { updateConversationGroup } from '@/uni_modules/unix-openim-sdk' -await updateConversationGroup({ conversationGroupID, groupName: 'Important' }) +const result = await updateConversationGroup({ + conversationGroupID: groupID, + name: 'Important', + hidden: false, +}) ``` -The Commercial update changes only supplied fields. Confirm final state through `onConversationGroupChanged` or a fresh group query. +Provide at least one real update field in addition to `conversationGroupID`. `ex` is a complete replacement; if several modules share it, read and merge their application namespaces first. + +## Return result + +The Promise resolves directly to `OpenIMUpdateConversationGroupResult` or `null`. `conversationGroup` is the updated snapshot or `null`. Merge it immediately only when it has a valid ID, then reconcile through `onConversationGroupChanged` or a new query. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx index d0d83f4669..1125161760 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages' --- +`clearConversationAndDeleteAllMsg()` clears every message from one conversation while keeping the conversation entry. + ```uts import { clearConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' await clearConversationAndDeleteAllMsg(conversationID) ``` -The conversation remains while its messages are cleared according to Core/server policy. Confirm the action, stop concurrent pagination/sends, and reload both conversation and message state afterward. +Ask for confirmation first and stop in-flight history pagination. Promise success means that Core completed the clear request; then clear the message store and requery the conversation so latest-message, sequence, and unread state come from Core. + +This operation is different from deleting the conversation together with its messages. Use [Delete a conversation and all messages](/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages) when the conversation entry must also be removed. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx index c268cb40c5..9174d99806 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/clear-group-mentions.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/clear-group-mentions' --- +Use `setConversation()` to clear the group-mention indicator on one group conversation. + ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, groupAtType: 0 }) ``` -Use the contract-defined “no mention” value. This clears only the group mention indicator; it neither removes @ messages nor marks unread messages as read. +Use the contract-defined “no mention” value for `groupAtType`; do not invent another numeric meaning. Promise success means that the conversation update request completed. Merge the later `onConversationChanged` snapshot or query the conversation again. + +This only changes the conversation's mention prompt. It does not delete @ messages and does not clear unread count. To clear unread state, call [Mark a conversation as read](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read) separately. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx index 9fb27c5ffb..ec5dee3503 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages' --- +`deleteConversationAndDeleteAllMsg()` removes a conversation entry and all of its messages according to Core/server policy. + ```uts import { deleteConversationAndDeleteAllMsg } from '@/uni_modules/unix-openim-sdk' await deleteConversationAndDeleteAllMsg(conversationID) ``` -This destructive operation removes the conversation and its messages according to Core/server policy. Ask for confirmation, stop writes to the conversation, and reload lists after completion. +This operation is difficult to recover. Ask for confirmation, stop pagination and writes for the conversation, and do not confuse it with hiding a conversation or clearing messages while keeping the entry. + +Promise success means that the deletion request completed. Clear the corresponding message store and rebuild the conversation list. If another device or a later event creates state again, reconcile by `conversationID` rather than retaining a tombstone based only on the old array index. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx index 1c7a2e4632..05fcee0b6d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/delete-conversation.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/delete-conversation' --- +`deleteConversation()` removes one conversation entry without promising to delete its message history. + ```uts import { deleteConversation } from '@/uni_modules/unix-openim-sdk' await deleteConversation(conversationID) ``` -This removes the conversation entry without promising to delete its message history. Use the explicit conversation-and-message operation when that is the intended product action, and confirm destructive actions in the UI. +This is distinct from [deleting a conversation and all messages](/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages). Use this operation when local history is intended to remain. A later incoming message can cause the conversation to appear again. + +Promise success means that the delete request completed. Requery the conversation list or merge the later event by `conversationID`; do not delete cached message state unless the selected product action explicitly includes it. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx index c7379887a3..197201f17c 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/get-total-unread-count.mdx @@ -11,6 +11,10 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/get-total-unread-count' --- +`getTotalUnreadMsgCount()` returns the current account's aggregate conversation unread count. The value is an account snapshot, not a sum that the UI should maintain independently. + +Register the event before querying to reduce the synchronization gap: + ```uts import { getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged } from '@/uni_modules/unix-openim-sdk' @@ -20,4 +24,6 @@ renderBadge(count ?? 0) off(unreadSubscription) ``` -Load a snapshot and then apply events. Requery after login or synchronization rather than maintaining only local increments. +Both the query and `onTotalUnreadMessageCountChanged` provide replacement totals. Do not apply local `+1` and `-1` deltas, which drift when messages are read on another device or during synchronization. + +This page is the complete owner for the total-unread event. Call `off(unreadSubscription)` on logout, account switch, or destruction of the badge state layer. Requery after login and synchronization. When using the value for the TabBar or [application badge](/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state), also account for notification permission and operating-system badge behavior. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx index 83fe7b8101..fabda6f5f4 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-a-conversation.mdx @@ -11,10 +11,16 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-a-conversation' --- +`hideConversation()` removes one conversation from the current account's visible list without deleting its messages. + ```uts import { hideConversation } from '@/uni_modules/unix-openim-sdk' await hideConversation(conversationID) ``` -Hiding removes the conversation from the visible list without deleting its message history. A later incoming message or product action can make it visible again; reload the list rather than deleting cached history. +This affects only the signed-in user's conversation entry. It does not remove a one-to-one relationship, leave a group, or change another user's state. A later incoming message or synchronization can make the conversation visible again. Use the explicit deletion API when messages should also be cleared, and explain the distinction in the UI. + +## State after the call + +Promise success means that the hide request completed. The caller can remove the item from the current list by `conversationID`, but must still merge `onConversationChanged` or requery to reconcile. Do not update only a page array while leaving the conversation store unchanged; restore or update the original key if the conversation reappears. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx index a4a0d5d4e5..082210f99d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/hide-all-conversations.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/hide-all-conversations' --- +`hideAllConversations()` hides every current conversation for the signed-in account without deleting message history. + ```uts import { hideAllConversations } from '@/uni_modules/unix-openim-sdk' await hideAllConversations() ``` -This hides every current conversation without deleting message history. Treat it as a destructive list action, confirm with the user, and rebuild the snapshot after completion. +This is a wide-scope list operation; ask for confirmation. Promise success means that Core completed the current local reset. It does not delete local or server messages, groups, friend relationships, or another client's conversation state. + +A later new message or valid resynchronization can make a conversation appear again. After completion, requery both [the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) and [the total unread count](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count). Do not interpret Promise success as a remote event or permanent deletion. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx index f0212921aa..47c8b39ba3 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read.mdx @@ -11,10 +11,16 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read' --- +`markAllConversationMessageAsRead()` clears the unread state of all conversations currently found for the signed-in account. + ```uts import { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk' await markAllConversationMessageAsRead() ``` -This clears conversation unread state for the current account. Confirm final totals from unread events or a fresh query; it does not delete messages or guarantee per-message read receipts. +Because this is a wide-scope state change, ask for confirmation. Promise success means that SDK Core finished the operation for the conversations it found. It does not mean that conversation events have arrived or that every other client's UI already synchronized. + +Do not merely set the badge to zero. Merge each `onConversationChanged` item by `conversationID` and replace the total through `onTotalUnreadMessageCountChanged`. See [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) and [Get the total unread count](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count). Requery both snapshots if new unread messages may have arrived concurrently. + +This operation does not delete messages and does not change a conversation's message-reception option or guarantee message-level read receipts. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx index 21d5b47460..47153271cc 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation-read.mdx @@ -11,14 +11,29 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation-read' --- -Use `markConversationMessageAsRead()` to clear normal unread state. The commercial `resetConversationUnread()` is an additional reset entry point. Direct read receipts arrive through `onRecvC2CReadReceipt`. +Use `markConversationMessageAsRead()` to clear ordinary unread state for one conversation. The commercial `resetConversationUnread()` is an additional entry that can set unread count for multiple conversations. One-to-one message read receipts arrive through `onRecvC2CReadReceipt`. ```uts import { markConversationMessageAsRead, off, onRecvC2CReadReceipt } from '@/uni_modules/unix-openim-sdk' -const receiptSubscription = onRecvC2CReadReceipt((items) => mergeReadReceipts(items)) +const receiptSubscription = onRecvC2CReadReceipt((result) => { + result.receipts.forEach((receipt) => mergeReadReceipt(receipt)) +}) await markConversationMessageAsRead(conversationID) -off(receiptSubscription) ``` -Do not infer message-level receipts solely from the conversation unread count. +The Commercial reset operation uses: + +```uts +import { resetConversationUnread } from '@/uni_modules/unix-openim-sdk' + +await resetConversationUnread({ conversationIDs: [conversationID], num: 0 }) +``` + +Local unread reset and a remote read receipt are not the same stage. After Promise success, merge the latest conversation from `onConversationChanged` by `conversationID` or requery it. For a one-to-one receipt, locate the peer's conversation and update the messages listed in each receipt. + +For a group conversation, this API clears only the current account's conversation unread count. Use [Send group read receipts](/sdk/uniapp/message/managing-read-status/send-group-read-receipts) for member-level group read state. Release `receiptSubscription` on component teardown, logout, or account switch: + +```uts +off(receiptSubscription) +``` diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx index edb8265b5e..29852da12d 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/mark-conversation.mdx @@ -11,4 +11,8 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/mark-conversation' --- -Conversation marking is a Commercial concept, but the frozen `0.2.0-rc.3` contract has neither `markConversation` nor an `isMarked` setter field. Do not emulate it through `ex` or local-only state. Use a supported commercial backend capability and then refresh conversations/groups, or disable the UI. +Conversation marking is a Commercial capability commonly used with a marked conversation group. The frozen UTS contract has neither a `markConversation` operation nor an `isMarked` field in `OpenIMSetConversationParams`. + +The client therefore cannot simulate a mark through `ex` or another field. Use a supported commercial business backend or confirmed upper-layer service, then refresh [the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) and [conversation groups](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups). + +When no real write API is available, hide or disable the action instead of changing local-only state that will disappear on the next query. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx index 60ce18297f..16765f1427 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/pin-conversation.mdx @@ -11,10 +11,17 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/pin-conversation' --- +Use `setConversation()` to pin or unpin one conversation. Pass only the field being changed. + ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, isPinned: true }) + +// Unpin the conversation. +await setConversation({ conversationID, isPinned: false }) ``` -Pass only the field being changed; use `false` to unpin. Apply the final `onConversationChanged` snapshot before re-sorting instead of assuming Promise completion defines the final order. +Promise success means that the update request completed. Apply the final `onConversationChanged` snapshot before deriving list order, rather than assuming the Promise defines final sorting. Omitted fields retain their values; do not copy and write a complete conversation merely to update the pin state. + +The list store should merge by `conversationID`, then sort pinned conversations with the product's stable ordering rule. Concurrent changes from another device are reconciled by the event or a new query. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx index 66081931b6..c108dfca9b 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-burn-duration.mdx @@ -11,7 +11,7 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-burn-duration' --- -`burnDuration` is Commercial. +`burnDuration` is a Commercial conversation field that defines the read-burn duration in seconds. ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' @@ -19,4 +19,6 @@ import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, burnDuration: 30 }) ``` -Use the server-defined unit, range, and disabled value. Client countdown UI does not itself delete server messages; reload the conversation to confirm the setting. +The unit is seconds. Enabling or disabling read-burn mode also requires `isPrivateChat`; see [Enable or disable private chat](/sdk/uniapp/conversation/managing-conversations/set-private-chat). + +Do not confuse `burnDuration` with the server message-retention interval `msgDestructTime`. A client countdown is presentation only and must not directly delete server messages. Promise success means that the update request completed; merge `burnDuration` from `onConversationChanged` or requery the conversation. Disable the feature according to the product protocol rather than simulating server state with a local switch. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx index 7abeba9370..dc10907e60 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-draft.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-draft' --- +`setConversationDraft()` saves a text draft for one local conversation. + ```uts import { setConversationDraft } from '@/uni_modules/unix-openim-sdk' await setConversationDraft({ conversationID, draftText: editorText }) ``` -An empty draft clears it. Persist drafts deliberately as text, update UI from the changed conversation, and avoid storing tokens or sensitive transient editor state. +Pass an explicit empty string to clear the draft: + +```uts +await setConversationDraft({ conversationID, draftText: '' }) +``` + +## State after the call + +Promise success means that the draft has been saved. Merge `draftText` and `draftTextTime` from `onConversationChanged` by `conversationID`; the complete event ownership is on [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list). + +A draft is device-local conversation state and should not be assumed to synchronize to another device. Clear editor memory on logout so an old account's text cannot appear under a new account. Do not store tokens or sensitive transient form state as a conversation draft. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx index 13c8e2eccf..66df707328 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-extension.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-extension' --- +Use `setConversation()` to replace a conversation's application `ex` string. + ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, ex: JSON.stringify({ color: 'blue' }) }) ``` -`ex` is replaced as one string, not merged. Read and merge your versioned business schema first, preserve unknown fields, and never store tokens or server-only secrets. +`ex` is a complete replacement, not a partial merge. Read the current string, validate its versioned business schema, merge the namespaces owned by the application, and preserve unknown fields before writing. Never store tokens, secrets, private message bodies, or server-only data. + +Promise success means that the update request completed. Confirm final state through `onConversationChanged` or a new query. If an old schema or unknown field cannot be parsed, preserve the original string and degrade the UI rather than overwriting it. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx index 43ac6bee0f..3e1aeb0d53 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-conversation-remark.mdx @@ -11,4 +11,8 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-conversation-remark' --- -Conversation remarks are Commercial, but the frozen conversation model and setter expose no standard `remark` field. Do not encode one into `ex` as if it were a Core field. Maintain it through an authoritative commercial business API and merge it into the UI. +Conversation remarks are a Commercial extension. The current `OpenIMConversationItem` and `OpenIMSetConversationParams` have no independent `remark` field, so this plugin release cannot safely write that capability. + +Do not encode a remark into `ex` and present it as a standard Core field. Maintain it through an authoritative commercial business API and merge the returned business data into the conversation UI. + +If a future contract adds the field, the interface/schema hashes will require this page to be reviewed again. Until then, neither public nor commercial clients should call a setter that does not exist. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx index db80987eee..d302940caf 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-destruct.mdx @@ -11,4 +11,12 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-destruct' --- -`OpenIMConversationItem` can expose commercial `isMsgDestruct` and `msgDestructTime`, but the frozen setter cannot write them. Treat them as read-only Commercial state. Use an explicitly supported business API to change policy and then reload; client countdown UI is not authoritative deletion. +`OpenIMConversationItem` exposes Commercial `isMsgDestruct` and `msgDestructTime` state, but the current `OpenIMSetConversationParams` has no corresponding write fields. + +Together, `isMsgDestruct` and `msgDestructTime` describe periodic server message deletion. This is not read-burn mode, which uses `isPrivateChat` and `burnDuration`. + +This plugin release can read and display the server's destruction policy but cannot copy Wasm's `setConversation({ isMsgDestruct, msgDestructTime })` call. Do not simulate the setter through a similar field or `ex`. Use a confirmed, authenticated commercial business API and requery the conversation after it completes. + +When the interval is reached, server policy removes server-side stored messages. It does not promise that already synchronized local copies disappear immediately from this or another device. After reinstall, local-data clearing, or synchronization on a new device, messages already removed by the server may no longer be retrievable. + +A client countdown is presentation only. Actual destruction is determined by Core and server state. This page preserves the same business boundary as Wasm while explicitly recording that the current Unix contract has no write capability. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx index b387aa6170..4b0f7a4dba 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-message-receive-option.mdx @@ -11,10 +11,16 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-message-receive-option' --- +`recvMsgOpt` controls message reception for one conversation and is updated through `setConversation()`. + ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, recvMsgOpt: 1 }) ``` -Use exported receive-option constants rather than naked numbers. This conversation setting is distinct from the account-wide option and can be constrained by both. Confirm through the changed conversation or a new query. +Common values are `0` for normal reception with notifications and `2` for reception without notification. The contract also permits `1` for not receiving messages, but use it only when the product and server explicitly support that policy. Centralize these meanings in application constants instead of scattering numeric literals across pages. + +This setting affects only the specified conversation. The account-level default is `globalRecvMsgOpt`; see [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception). Effective behavior can be constrained by both levels. + +Promise success, `onConversationChanged`, and requery are three stages. Merge the event by `conversationID` or query again to confirm final state instead of changing only the current page switch. diff --git a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx index 7d1c864052..4dd7aef84c 100644 --- a/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/managing-conversations/set-private-chat.mdx @@ -11,7 +11,7 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/managing-conversations/set-private-chat' --- -`isPrivateChat` is a Commercial field accepted by the public `setConversation()` operation. +`isPrivateChat` is a Commercial field written through the public `setConversation()` operation. ```uts import { setConversation } from '@/uni_modules/unix-openim-sdk' @@ -19,4 +19,6 @@ import { setConversation } from '@/uni_modules/unix-openim-sdk' await setConversation({ conversationID, isPrivateChat: true }) ``` -Pass only this field. The host must still implement the corresponding product UI/security behavior; confirm the final flag from conversation updates. +Pass only the field being changed. Private-chat message presentation, screenshot behavior, and destruction policy are jointly defined by the commercial server and client product. Setting one boolean does not implement every UI security rule automatically. + +Promise success means that the request completed. Use `isPrivateChat` from the final `onConversationChanged` snapshot or a new query as the authoritative conversation state. diff --git a/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx index 84b99c4c7d..207dd90a64 100644 --- a/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/overview-conversation.mdx @@ -11,6 +11,64 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/overview-conversation' --- -Conversations are local indexes for direct, group, and other message streams. Use `conversationID` as the stable key; titles, avatars, unread counts, and latest messages are mutable snapshots. `latestMsg` is serialized message JSON, so preserve the conversation and show a fallback summary if parsing fails. +A conversation is the local index and display snapshot for one-to-one, group, notification, and other message streams. It provides the stable `conversationID`, target identity, title, avatar, unread count, draft, pin state, receive option, and serialized latest message. -Register `onNewConversation` and `onConversationChanged` before loading a list, merge by `conversationID`, and reload after login or App restoration. Unread state, message read receipts, and commercial conversation groups are related but separate workflows. +Messages and conversations are related but not interchangeable. Message APIs create, send, and query `OpenIMMessageItem`; conversation APIs organize chat entry points and aggregate unread and latest-message state. Do not edit the SDK database or derive authoritative conversation state only from the visible message array. + +## Conversation model + +Use `conversationID` as the stable merge key. Common `OpenIMConversationItem` fields are: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationID` | `string` | Stable identifier for snapshots, events, routing, and mutation APIs. | +| `conversationType` | `number` | Conversation/session type. Interpret it with exported constants. | +| `userID` | `string` | Peer user ID for one-to-one conversations. | +| `groupID` | `string` | Group ID for group conversations. | +| `showName` | `string` | Current display-name snapshot for conversation lists and chat titles. | +| `faceURL` | `string` | Current avatar snapshot. | +| `unreadCount` | `number` | Current unread count for this conversation. | +| `recvMsgOpt` | `number` | Conversation-level reception option. | +| `isPinned` | `boolean` | Whether the conversation is pinned. | +| `latestMsg` | `string` | Serialized latest `OpenIMMessageItem`; validate before parsing. | +| `latestMsgSendTime` | `number` | Latest-message send time. | +| `draftText` / `draftTextTime` | `string` / `number` | Local draft content and update time. | +| `ex` | `string` | Application extension string. | + +`latestMsg` parsing failure does not mean the conversation is invalid. Keep the item and display a fallback summary until a later message or query provides recognizable content. Names, avatars, unread counts, latest messages, and drafts are snapshots and can change; never use them as keys. + +The Private contract adds commercial conversation-policy, notification, attached-info, burn-duration, destruct, and grouping-related fields. A mixed page must treat those fields as optional and keep the public conversation flow working when they are absent. + +## Establish snapshots + +Use [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) for the main paginated snapshot. Other query pages cover one target, a known ID set, canonical ID generation, and local search. + +Query operations do not create conversations. A first sent or received message can later create one and trigger `onNewConversation`. After login, synchronization, reconnect, account switch, or process restoration, query the snapshots required by the current UI instead of expecting events alone to reconstruct the database. + +## Update conversation state + +Conversation mutations include pinning, read state, draft text, receive options, marks, remarks, extensions, private-chat policy, burn duration, and commercial grouping. A mutation Promise means only that its request completed. Merge `onConversationChanged` afterward or query again; do not assume that every other device and event stream has already updated. + +Unread state spans several scopes: + +- Per-conversation unread state is in `OpenIMConversationItem.unreadCount`. +- The application total is maintained by [Get the total unread count](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count). +- Group-message read receipts are message-domain state, not the conversation unread total. + +## Keep state synchronized + +The canonical `onNewConversation` and `onConversationChanged` listeners live on [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list). Register them before loading the first snapshot and merge by `conversationID`. + +Other events have their own owners: total unread count, commercial conversation deletion, and raw commercial conversation-group changes. Do not register one event from every component. Let a conversation store own the listener handles and distribute state to pages. + +## Conversation groups + +Commercial conversation groups organize one conversation into one or more custom groups without copying or moving its messages. Group items, membership, ordering, raw events, and queries are documented in [Conversation groups overview](/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups). + +Deleting a conversation group does not delete its conversations. Likewise, deleting or hiding a conversation and removing a conversation from a group are distinct operations. + +## State and privacy boundaries + +The local conversation database belongs to OpenIM Core. Use SDK APIs to query and mutate it; do not inspect or edit database files. Clear all old-account application snapshots on logout or account switch, and guard late asynchronous writes with the account identity or commercial session epoch. + +Do not put tokens, private message bodies, or unredacted custom payloads in `ex`, logs, analytics, or automation evidence. When rendering `latestMsg`, apply the same content validation and privacy policy used by the message UI. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx index ef5c4622ea..0e691a0f97 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target.mdx @@ -11,13 +11,27 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target' --- -`getOneConversation()` resolves a conversation from session type and target ID. +`getOneConversation()` queries one conversation by target ID and `OpenIMSessionType`. It resolves directly to `OpenIMConversationItem` or `null`. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `sourceID` | `string` | Yes | Target ID: the other user's `userID` for one-to-one chat or `groupID` for group chat. | +| `sessionType` | `OpenIMSessionType` | Yes | Conversation type. Use exported constants such as `OpenIMSessionTypeSingle` and the corresponding group type. | ```uts -import { getOneConversation } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMSessionTypeSingle, + getOneConversation, +} from '@/uni_modules/unix-openim-sdk' -const result = await getOneConversation({ sessionType, sourceID }) -const conversation = result?.conversation ?? null +const conversation = await getOneConversation({ + sourceID: 'user_b', + sessionType: OpenIMSessionTypeSingle, +}) ``` -Use a user ID for direct chat or group ID for group chat. A nullable result means no current local conversation; it does not create one. +The same string can identify different targets under different session types, so both fields must be correct. Do not pass numeric literals, and do not pass a `conversationID` as `sourceID`; use the conversation-ID query when that ID is already known. + +`null` can mean that the local database does not yet contain the conversation. Sending or receiving the first message can create it through a later event. This query does not create a conversation or trigger an event. Merge a non-null result by `conversationID`, not only by `sourceID`, so another session type is not overwritten. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx index 7f2d28e769..0b74efc9e3 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id.mdx @@ -11,10 +11,18 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id' --- +`getConversationIDBySessionType()` returns the canonical `conversationID` used by Core. It is useful for building a route key before a conversation item exists. + ```uts -import { getConversationIDBySessionType } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMSessionTypeGroup, + getConversationIDBySessionType, +} from '@/uni_modules/unix-openim-sdk' -const conversationID = await getConversationIDBySessionType({ sourceID, sessionType }) +const conversationID = await getConversationIDBySessionType({ + sourceID: 'group_123', + sessionType: OpenIMSessionTypeGroup, +}) ``` -The returned ID is the canonical local key for the given direct or group target. Use exported session-type constants instead of numeric literals, and do not construct conversation IDs manually. +Do not concatenate a one-to-one or group conversation ID yourself; each session type has its own canonical rules. The returned string does not prove that a conversation exists and does not create server data. Query [the conversation by target](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target) or the conversation list when complete conversation data is needed. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx index d7b71a58c4..367c3f940c 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id.mdx @@ -11,11 +11,15 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id' --- +`getMultipleConversation()` queries a batch of conversations by `conversationID` and returns `OpenIMConversationListResult` or `null`. + ```uts import { getMultipleConversation } from '@/uni_modules/unix-openim-sdk' -const result = await getMultipleConversation(['single_user_a', 'group_group_a']) +const result = await getMultipleConversation(['si_user_a_user_b', 'sg_group_123']) const conversations = result?.conversations ?? [] ``` -Results may be shorter or differently ordered than the request. Map by `conversationID` and preserve placeholders for missing local conversations. +Results can be shorter than the request and need not preserve input order. Build a map by `conversationID` and keep placeholders for conversations missing from the local database. Split an unbounded set of IDs into reasonable batches. + +This operation establishes only a snapshot. It does not subscribe to changes. Continue to process the events owned by [Get the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list) for ongoing updates. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx index 2fcc06f31c..def1d1b5bc 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list.mdx @@ -11,17 +11,78 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list' --- -Register conversation events before loading a snapshot. Use `getAllConversationList()` for a complete result or `getConversationListSplit()` for pages. +Build the conversation-list snapshot with paginated `getConversationListSplit()`. Although the Private contract still exports `getAllConversationList()` for compatibility, real applications and public documentation use the paginated operation so a large local database is not loaded in one call. + +## Get conversations by page + +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Pagination offset; use `0` for the first page. | +| `count` | `number` | Yes | Number to read. Choose a reasonable limit for the page and device. | + +```uts +import { + getConversationListSplit, + off, + onConversationChanged, + onNewConversation, +} from '@/uni_modules/unix-openim-sdk' + +const newConversationSubscription = onNewConversation((result) => { + result.conversations.forEach((item) => { + upsertConversation(item.conversationID, item) + }) +}) +const changedSubscription = onConversationChanged((result) => { + result.conversations.forEach((item) => { + upsertConversation(item.conversationID, item) + }) +}) + +const firstPage = await getConversationListSplit({ offset: 0, count: 100 }) +replaceConversationSnapshot(firstPage?.conversations ?? []) +``` + +The Promise resolves directly to `OpenIMConversationListResult` or `null`; read the page from `conversations`. Replace the current account snapshot with the first page and merge later pages by `conversationID`. Do not fabricate a successful empty list for `null`; use login state and redacted diagnostics to decide whether to preserve the old snapshot or show a loading error. + +Increase `offset` until a page contains fewer than `count` items. Conversation events received during paging can change sorting and page boundaries. Merge by primary key, then rebuild from offset 0 on refresh or synchronization completion. Do not permanently append pages while relying on stale offsets. + +### Conversation fields + +Common `OpenIMConversationItem` fields include: + +| Field | Description | +| --- | --- | +| `conversationID` | Stable key for list snapshots and events. | +| `conversationType` | One-to-one, group, or notification conversation type. | +| `userID` / `groupID` | Peer user or target group according to the conversation type. | +| `showName` / `faceURL` | Display-name and avatar snapshots. | +| `unreadCount` | Current unread count. | +| `latestMsg` | Serialized latest message. Preserve the conversation and show a fallback summary if parsing fails. | +| `latestMsgSendTime` | Send time of the latest message; can participate in normal ordering. | +| `draftText` / `draftTextTime` | Local draft and its update time. | +| `isPinned` | Pin state. Apply pin ordering before time ordering. | +| `recvMsgOpt` | Conversation-level message reception option. | + +See [Conversation overview](/sdk/uniapp/conversation/overview-conversation) for complete fields and commercial extensions. Never update by array index because pin state, latest message, draft, and unread count can all reorder the list. + +### Sort the list + +Write page and event results into a map keyed by `conversationID`, then derive the visible array. A common policy puts pinned conversations first, orders each section by latest message or draft time, and uses a stable ID tiebreaker. Do not swap page-array items directly inside event handlers. + +If `latestMsg` cannot be parsed, keep the conversation and show an unknown-message summary. A later recognizable message or requery will update it naturally. + +## Keep the list synchronized + +This page is the complete owner for `onNewConversation` and `onConversationChanged`. Register events before the first query to minimize gaps during login synchronization. Both callbacks contain `OpenIMConversationListResult`; iterate every item even if one conversation usually changed. + +Promise success, event arrival, and requery are separate stages. Rebuild the snapshot after foreground restoration, synchronization completion, reconnect, or account switch. On logout or store destruction, release the two owned handles: ```uts -import { getConversationListSplit, off, onConversationChanged, onNewConversation } from '@/uni_modules/unix-openim-sdk' - -const changed = onConversationChanged((items) => items.forEach(upsertConversation)) -const created = onNewConversation((items) => items.forEach(upsertConversation)) -const page = await getConversationListSplit({ offset: 0, count: 100 }) -replaceConversations(page?.conversations ?? []) -off(changed) -off(created) +off(newConversationSubscription) +off(changedSubscription) ``` -Paginate from offset 0, deduplicate by `conversationID`, and requery after account or synchronization changes. +When switching accounts, stop writes from old-account paging requests before querying the new account. A late old Promise must not merge its `conversationID` list into the new account. Use an application account generation or the commercial `sdkSessionEpoch` to revalidate before completion. diff --git a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx index a1ab894ccb..e75d873029 100644 --- a/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx +++ b/content/docs/chat/sdk/uniapp/conversation/retrieving-conversations/search-conversations.mdx @@ -11,11 +11,15 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/conversation/retrieving-conversations/search-conversations' --- +`searchConversation()` searches the local conversation database using a string keyword and returns `OpenIMConversationListResult` or `null`. + ```uts import { searchConversation } from '@/uni_modules/unix-openim-sdk' -const result = await searchConversation('project') -renderConversations(result?.conversations ?? []) +const result = await searchConversation('Alice') +renderSearchResults(result?.conversations ?? []) ``` -This searches local conversation metadata. Reject an empty keyword in the UI, deduplicate by `conversationID`, and do not treat local results as an authoritative server-wide search. +Trim whitespace first. When the input is empty, show the normal conversation list from application state instead of issuing a search. The result is a snapshot at query time; rerun the search after conversation changes, or merge later event items by `conversationID`. + +The exact matched conversation metadata is determined by Core. Do not promise that this searches every message body. Use message-domain search APIs for message content. From 05027c321d87850e088dd6cf9a2678252b89c25a Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 18:10:53 +0800 Subject: [PATCH 18/20] docs(uniapp): align English group guides with Wasm --- .../sdk/uniapp/group/change-group-mute.mdx | 17 ++++- .../chat/sdk/uniapp/group/create-group.mdx | 29 ++++++++- .../chat/sdk/uniapp/group/dismiss-group.mdx | 6 +- .../accept-group-application.mdx | 16 ++++- .../delete-group-requests.mdx | 15 ++++- ...et-group-application-list-as-applicant.mdx | 17 ++++- ...et-group-application-list-as-recipient.mdx | 62 ++++++++++++++++--- .../refuse-group-application.mdx | 14 ++++- .../docs/chat/sdk/uniapp/group/join-group.mdx | 15 ++++- .../change-group-member-mute.mdx | 12 +++- .../invite-user-to-group.mdx | 14 ++++- .../kick-group-member.mdx | 14 ++++- .../set-group-member-avatar.mdx | 6 +- .../set-group-member-extension.mdx | 14 ++++- .../set-group-member-nickname.mdx | 6 +- .../set-group-member-role-level.mdx | 14 ++++- .../transfer-group-owner.mdx | 12 +++- .../chat/sdk/uniapp/group/overview-group.mdx | 54 ++++++++++++++-- .../docs/chat/sdk/uniapp/group/quit-group.mdx | 8 ++- .../get-group-member-list.mdx | 43 +++++++++++-- .../get-specified-group-members-info.mdx | 13 +++- .../get-users-in-group.mdx | 8 ++- .../search-group-members.mdx | 23 ++++++- .../get-joined-group-list-page.mdx | 35 ++++++++++- .../get-joined-group-list.mdx | 6 +- .../get-specified-groups-info.mdx | 11 +++- .../group/retrieving-groups/is-join-group.mdx | 6 +- .../group/retrieving-groups/search-groups.mdx | 23 ++++++- .../uniapp/group/set-group-announcement.mdx | 6 +- .../sdk/uniapp/group/set-group-extension.mdx | 14 ++++- .../group/set-group-join-verification.mdx | 14 ++++- .../set-group-member-friend-permission.mdx | 13 +++- .../group/set-group-member-profile-access.mdx | 13 +++- .../sdk/uniapp/group/update-group-profile.mdx | 26 +++++++- 34 files changed, 542 insertions(+), 57 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx index 6510d73858..03062b275f 100644 --- a/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx +++ b/content/docs/chat/sdk/uniapp/group/change-group-mute.mdx @@ -11,10 +11,25 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/change-group-mute' --- +`changeGroupMute()` turns group-wide mute on or off. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Group to update. | +| `isMute` | `boolean` | Yes | `true` enables group-wide mute; `false` disables it. | + ```uts import { changeGroupMute } from '@/uni_modules/unix-openim-sdk' await changeGroupMute({ groupID, isMute: true }) ``` -The server validates moderator permissions. Confirm group-wide mute from updated group information; do not assume it changes individual member mute expirations identically. +Only the owner or an administrator with server permission can perform this operation. The server still validates group state, role changes, and concurrent updates. Owners and administrators can normally keep sending, so group-wide mute does not necessarily silence every account. + +Wasm's commercial `muteBypassUserIDs` extension is not present in the current uni-app / uni-app x contract. Do not pass that field. Even if a commercial server supports exceptions, rely on the exported plugin type and subsequent group snapshot. + +## Return result + +The Promise resolves directly to a string result, meaning the server completed this mute request. It does not mean that every member UI updated. Merge `onGroupInfoChanged` by `groupID` or query the group again. Group-wide mute and an individual member's mute interval are separate capabilities. diff --git a/content/docs/chat/sdk/uniapp/group/create-group.mdx b/content/docs/chat/sdk/uniapp/group/create-group.mdx index 99c6deb83f..4ef747c9ff 100644 --- a/content/docs/chat/sdk/uniapp/group/create-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/create-group.mdx @@ -11,10 +11,35 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/create-group' --- +`createGroup()` creates a group with initial profile data and member lists. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupInfo.groupName` | `string` | Yes | Group name. | +| `groupInfo.groupType` | `2` | Yes | Group type supported by the current contract. | +| `groupInfo.notification` | `string` or `null` | No | Initial announcement. | +| `groupInfo.introduction` | `string` or `null` | No | Initial introduction. | +| `groupInfo.faceURL` | `string` or `null` | No | Avatar URL. | +| `groupInfo.ex` | `string` or `null` | No | Complete extension string. | +| `memberUserIDs` | `string[]` | Yes | Initial regular members. | +| `adminUserIDs` | `string[]` or `null` | No | Initial administrators. | + ```uts import { createGroup } from '@/uni_modules/unix-openim-sdk' -const result = await createGroup({ groupInfo: { groupName: 'Project' }, memberUserIDs: ['user_b'] }) +const group = await createGroup({ + groupInfo: { groupName: 'Project group', groupType: 2 }, + memberUserIDs: ['user_b', 'user_c'], + adminUserIDs: ['user_b'], +}) ``` -Use valid group type and member IDs, then merge the returned group/event by `groupID`. Creation is not proof that every optional invite succeeded; reload membership when needed. +Remove blank and duplicate member IDs first. Administrators must also satisfy the server's membership and role rules; do not put the same user into conflicting role lists. `ex` is not merged as JSON by the SDK. + +## Return result + +The Promise resolves directly to `OpenIMGroupItem` or `null`. Merge a non-null result into the group store by `groupID`; do not create a local-only group for `null`. + +Promise success means that the creation request completed, not that every optional membership change has been observed. Reconcile the group list through `onJoinedGroupAdded` or a group query, and verify initial members and administrators through the member list. diff --git a/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx index becec688fb..ec596a2af2 100644 --- a/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/dismiss-group.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/dismiss-group' --- +`dismissGroup()` permanently dismisses one group. Only an authorized owner can perform this high-risk operation. + ```uts import { dismissGroup } from '@/uni_modules/unix-openim-sdk' await dismissGroup(groupID) ``` -This owner-only destructive action ends the group according to server policy. Confirm explicitly and process `onGroupDismissed`; do not equate local navigation with successful dismissal. +Ask for explicit confirmation and show the group name and member impact. Prevent duplicate taps. The server validates ownership and current group state; local `ownerUserID` is not sufficient authorization. + +Promise success means that the dismiss request completed, not that every client processed the event. Wait for `onGroupDismissed` / `onJoinedGroupDeleted` or requery, then remove group, member, and chat-entry state by `groupID`. Close the chat and management UI and stop sending group messages. Preserve current state when the Promise fails. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx index 0560734ec6..ae18c61936 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/accept-group-application.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/accept-group-application' --- +`acceptGroupApplication()` lets an authorized group member accept one join application. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `fromUserID` | `string` | Yes | Applicant user ID. | +| `handleMsg` | `string` | Yes | Processing comment. It can be shown to the applicant, so do not include internal risk information. | + ```uts import { acceptGroupApplication } from '@/uni_modules/unix-openim-sdk' -await acceptGroupApplication({ groupID, fromUserID, handleMsg: 'Accepted' }) +await acceptGroupApplication({ groupID, fromUserID: 'user_b', handleMsg: 'Approved' }) ``` -The server validates moderator authority and request state. Disable duplicate UI actions and confirm both request and member state from events or snapshots. +Promise success means that the accept request completed, not that both the application and member events arrived. Refresh the application and member lists separately, or merge `onGroupApplicationAccepted` and `onGroupMemberAdded` by their respective keys. + +Lock this application while the request is in flight so accept and reject cannot race. The server validates permission, current application state, member limits, and duplicate membership. On failure, preserve the application and requery instead of changing local `handleResult`. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx index 081b9f8671..a228b73786 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/delete-group-requests.mdx @@ -11,10 +11,23 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/delete-group-requests' --- +`deleteGroupRequests()` Commercial deletes explicitly selected application records. + +## Parameters + +`groupRequests` is a non-empty array of `OpenIMSimpleGroupRequest` items: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `fromUserID` | `string` | Yes | Applicant user ID. | + ```uts import { deleteGroupRequests } from '@/uni_modules/unix-openim-sdk' await deleteGroupRequests({ groupRequests: [{ groupID, fromUserID }] }) ``` -This Commercial batch deletes request records, not group membership. Confirm targets and refresh both request list and count after any failure. +Use `groupID:fromUserID` to identify and deduplicate records. Deleting history is not the same as rejecting a pending application and does not remove an existing member. + +Promise success means that the delete request completed; a deletion event can arrive afterward. See [Get received group applications](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) for the complete listener. After batch failure, do not assume which records were deleted; requery the application list and count. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx index 37b0a60ea0..d7d972b59a 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant.mdx @@ -11,10 +11,25 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant' --- +`getGroupApplicationListAsApplicant()` queries applications sent by the current account and returns `OpenIMGroupApplicationListResult` or `null`. + +## Parameters + +The parameter object can be omitted. For explicit pagination: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` or `null` | No | Offset; use `0` for the first page. | +| `count` | `number` or `null` | No | Number of applications to read. | + ```uts import { getGroupApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' const result = await getGroupApplicationListAsApplicant({ offset: 0, count: 50 }) ``` -This lists requests sent by the current account. Deduplicate across changing pages and reload after application events or App restoration. +## Return result + +After Promise success, `applications` contains the current account's sent `OpenIMGroupApplicationItem[]`. See [Get received group applications](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) for all fields. The query itself creates no application event. + +Use `groupID:userID` as the stable key and route events according to the current account's role. Reset pagination when state changes while a page is loading. Requery after reconnect, re-login, or any interval in which events may have been missed. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx index bd1ab5b6b2..c2c118c89c 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient.mdx @@ -11,18 +11,66 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient' --- -Register request events before loading the received snapshot. +`getGroupApplicationListAsRecipient()` queries applications that the current account can manage. This page owns the added, accepted, rejected, and deleted application events. + +## Parameters + +The parameter object can be omitted. For explicit pagination, `offset` and `count` are optional; use `0` for the first offset. Unlike the Wasm page, the Unix `OpenIMApplicationListParams` has no `handleResults` filter, so filter by `handleResult` after the query. + +Register events before loading the received snapshot. ```uts -import { getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected } from '@/uni_modules/unix-openim-sdk' +import { + getGroupApplicationListAsRecipient, + off, + onGroupApplicationAccepted, + onGroupApplicationAdded, + onGroupApplicationDeleted, + onGroupApplicationRejected, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' -const subscriptions = [ - onGroupApplicationAdded(upsertRequest), onGroupApplicationAccepted(upsertRequest), - onGroupApplicationRejected(upsertRequest), onGroupApplicationDeleted(removeRequest), +const addedSubscription = onGroupApplicationAdded((item) => upsertGroupApplication(item)) +const subscriptions : Array = [ + addedSubscription, + onGroupApplicationAccepted((item) => upsertGroupApplication(item)), + onGroupApplicationRejected((item) => upsertGroupApplication(item)), + onGroupApplicationDeleted((item) => removeGroupApplication(item)), ] const result = await getGroupApplicationListAsRecipient({ offset: 0, count: 50 }) -replaceRequests(result?.applications ?? []) +replaceReceivedGroupApplications(result?.applications ?? []) subscriptions.forEach((subscription) => off(subscription)) ``` -Merge with a stable group/applicant key and use explicit accept/reject operations. +## Return result + +The Promise resolves directly to `OpenIMGroupApplicationListResult` or `null`; `applications` contains the current page. Do not convert `null` into an empty state. Empty `applications` means that the page has no records; `null` requires login/error handling. Reset offset after processing an application to avoid duplicates across changed pages. + +### Group application fields + +`OpenIMGroupApplicationItem` combines a group snapshot and applicant information: + +| Fields | Description | +| --- | --- | +| `groupID`, `groupName`, `groupFaceURL` | Target group ID, name, and avatar snapshot. | +| `notification`, `introduction` | Announcement and introduction snapshot. | +| `ownerUserID`, `creatorUserID` | Owner and creator user IDs. | +| `groupType`, `status`, `memberCount` | Group type, state, and member-count snapshot. | +| `userID`, `nickname`, `userFaceURL` | Applicant ID, nickname, and avatar snapshot. | +| `handleResult` | Pending, accepted, or rejected processing state. | +| `reqMsg`, `reqTime` | Application comment and time. | +| `joinSource`, `inviterUserID` | Join source and inviter. | +| `handleUserID`, `handledMsg`, `handledTime` | Processing user, comment, and time. | +| `ex`, `attachedInfo` | Extension and attachment data; parse only a confirmed contract. | + +Use `groupID:userID` as the application key. Names and avatars are snapshots; query current group or user data when freshness matters. + +`handleResult`, `handledMsg`, and `handledTime` describe the server's current processing snapshot. Do not derive permission only from these fields: the owner or administrator role can change after the record was created. `reqMsg`, `ex`, and `attachedInfo` are application-controlled or service attachment data and must be rendered and logged under the product's privacy policy. + +## Listen for application changes + +Merge all four events idempotently by `groupID:userID`; a deletion event removes that key. Route received and sent application state according to the current account's role. Reset pagination after changes, and requery when owner/admin permission changes. + +Use the explicit accept or reject API instead of changing `handleResult` locally. Promise success, the application event, and later group/member updates are separate stages. Release every subscription on logout, account switch, or application-store destruction. + +When an application is accepted, update the joined-group list and member list through their own events or queries rather than inferring membership solely from this application record. Group-profile changes and applicant nickname changes also require their domain snapshots; an old application item is not a live profile cache. diff --git a/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx index 0df78fbaee..836a42ba90 100644 --- a/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx +++ b/content/docs/chat/sdk/uniapp/group/group-applications/refuse-group-application.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/group-applications/refuse-group-application' --- +`refuseGroupApplication()` uses the same application identity fields as acceptance. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `fromUserID` | `string` | Yes | Applicant user ID. | +| `handleMsg` | `string` | Yes | Rejection comment, which can be visible to the applicant. | + ```uts import { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk' await refuseGroupApplication({ groupID, fromUserID, handleMsg: 'Not accepted' }) ``` -Keep private moderation evidence out of the handling text. Acceptance and rejection are mutually exclusive; confirm from events or a refreshed request list. +Do not place internal risk information, internal account names, or sensitive review evidence in `handleMsg`. Lock the application while the request is in flight so accept and reject cannot race. + +Promise success means that the reject request completed, not that `onGroupApplicationRejected` arrived. Use the event or a new query as final state. Preserve the application on failure instead of hiding it locally. diff --git a/content/docs/chat/sdk/uniapp/group/join-group.mdx b/content/docs/chat/sdk/uniapp/group/join-group.mdx index 8c1b4d9660..9536ff5b5c 100644 --- a/content/docs/chat/sdk/uniapp/group/join-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/join-group.mdx @@ -11,10 +11,23 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/join-group' --- +`joinGroup()` submits the current user's request to join a group. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Group to join. | +| `reqMsg` | `string` | Yes | Application comment, which can be shown to owners or administrators. | +| `joinSource` | `number` | Yes | Join-source value agreed by the product and server. | +| `ex` | `string` or `null` | No | Application extension; use only a confirmed format. | + ```uts import { joinGroup } from '@/uni_modules/unix-openim-sdk' await joinGroup({ groupID, reqMsg: 'Please add me', joinSource: 2, ex: '' }) ``` -Use the documented `GroupJoinSource` value and keep request text free of secrets. Promise completion may mean pending verification rather than membership; verify from application state/events. +The application comment and `ex` can be stored with the application. Do not include tokens, internal risk information, or unnecessary personal data. Verify that the group exists and the current user is not already a member. + +Promise success does not always mean membership. A no-verification group can join directly, while another policy creates a pending application. Determine final state from application events, `onJoinedGroupAdded`, or a new joined-group query. Never create local member state before the server confirms it. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx index 163054a308..4775fe74e6 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/change-group-member-mute.mdx @@ -11,10 +11,20 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/change-group-member-mute' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `userID` | `string` | Yes | Member to mute. | +| `mutedSeconds` | `number` | Yes | Duration in seconds; pass `0` to unmute. | + ```uts import { changeGroupMemberMute } from '@/uni_modules/unix-openim-sdk' await changeGroupMemberMute({ groupID, userID: 'user_b', mutedSeconds: 600 }) ``` -Use server-defined duration limits and the defined unmute value. Confirm from member updates; client countdown UI is not the authorization source. +The group owner can mute administrators and regular members; an administrator can mute only regular members. OpenIMServer performs the final permission check and enforces duration limits. + +Promise success means that the server completed the setting. Use the member's returned `muteEndTime` as final state rather than deriving it only from submitted seconds. Merge `onGroupMemberInfoChanged` by `groupID:userID` as documented on [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list). diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx index f32b800eba..dd809235e2 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/invite-user-to-group.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/invite-user-to-group' --- +Owners and administrators can manage members within the permissions granted by OpenIMServer. The client can use `roleLevel` to display controls, but the server remains authoritative. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `reason` | `string` | Yes | Invitation comment; pass an empty string if unused. | +| `userIDList` | `string[]` | Yes | Users to invite. | + ```uts import { inviteUserToGroup } from '@/uni_modules/unix-openim-sdk' await inviteUserToGroup({ groupID, userIDList: ['user_b'], reason: 'Project collaboration' }) ``` -The server applies group policy and permissions. Promise completion does not guarantee every target joined; confirm with member events or a refreshed member list. +Deduplicate `userIDList`. The reason can be visible to invitees, so do not include tokens or other sensitive information. + +Promise success means that the server accepted the invitation request, not that every target joined. A policy requiring review can first produce an application event. Merge actual members through `onGroupMemberAdded` or query the member list again. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx index 74cab1b6b7..33f7870ad4 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/kick-group-member.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/kick-group-member' --- +An authorized owner or administrator can call `kickGroupMember()`. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Group from which to remove members. | +| `reason` | `string` | Yes | Removal comment; use an empty string when no public explanation is needed. | +| `userIDList` | `string[]` | Yes | Members to remove. | + ```uts import { kickGroupMember } from '@/uni_modules/unix-openim-sdk' await kickGroupMember({ groupID, userIDList: ['user_b'], reason: 'Removed by moderator' }) ``` -Confirm this destructive moderation action and keep private evidence out of a potentially visible reason. Apply member-deleted events or reload membership. +This operation cannot remove the owner; transfer ownership first. The server checks whether an administrator may act on each target. Confirm this high-impact moderation action and keep private evidence out of a potentially visible reason. + +Promise success means that the removal request completed. Merge later `onGroupMemberDeleted` events by `groupID:userID` or reload membership. Do not remove a target locally before a failed request. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx index 6f26810397..e9e0d9c86f 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-avatar.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-avatar' --- +`faceURL` changes the member avatar only within the specified group. + ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' await setGroupMemberInfo({ groupID, userID: 'user_b', faceURL: avatarURL }) ``` -Upload local media first and pass a remotely reachable HTTPS URL. Do not store `unifile://` or a sandbox path as a remote avatar. +An in-group avatar is different from the user's account avatar. Use [Update your profile](/sdk/uniapp/user/profile/set-self-info) for the latter. Upload local media first and pass a remotely reachable HTTPS URL; never store `unifile://` or a sandbox path as a remote avatar. + +After Promise success, merge `onGroupMemberInfoChanged` by `groupID:userID`. The complete listener is on [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list). diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx index db22e33370..d3fa6dc004 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-extension.mdx @@ -11,10 +11,20 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-extension' --- +`ex` is one complete string; the SDK does not merge JSON. Preserve other application modules' namespaces before writing. + ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupMemberInfo({ groupID, userID: 'user_b', ex: JSON.stringify({ title: 'PM' }) }) +const previous = JSON.parse(member.ex || '{}') + +await setGroupMemberInfo({ + groupID, + userID: 'user_b', + ex: JSON.stringify({ ...previous, title: 'maintainer' }), +}) ``` -`ex` replaces the whole value. Merge a versioned schema, preserve unknown fields, and store no secrets in member-visible data. +Preserve unknown fields in a versioned schema and keep the original value when parsing fails. Users allowed to view member profiles can see the extension; store no tokens or secrets. + +After Promise success, merge `onGroupMemberInfoChanged` by `groupID:userID`. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx index e356d192ee..8a32c48094 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-nickname.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-nickname' --- +An in-group nickname changes only the member profile in the specified group and does not update the account nickname. + ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' await setGroupMemberInfo({ groupID, userID: 'user_b', nickname: 'Alice (Design)' }) ``` -Send only the nickname field and confirm through member-info events. The server validates who can edit each member. +`groupID` and `userID` together identify the member. The server applies group-role and policy checks to determine whether the current user can edit this member. + +Promise success means that the server completed the request. Merge a later `onGroupMemberInfoChanged` item by `groupID:userID`; do not update only the current page. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx index e919f1d193..bb98285dcd 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/set-group-member-role-level.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/set-group-member-role-level' --- +Use `roleLevel` to promote a regular member to administrator or remove administrator status. + ```uts import { setGroupMemberInfo } from '@/uni_modules/unix-openim-sdk' await setGroupMemberInfo({ groupID, userID: 'user_b', roleLevel: 60 }) ``` -Use exported `OpenIMGroupMemberRoleLevel` constants. Role changes are high-risk moderation actions; require confirmation and let the server enforce authority. +The role values are: + +| `roleLevel` | Meaning | +| --- | --- | +| `20` | Regular member. | +| `60` | Group administrator. | +| `100` | Group owner; use for identification only. | + +Pass `60` to create an administrator and `20` to remove administrator status. Although `OpenIMGroupMemberRoleLevel` permits `100`, writing it is not the ownership-transfer operation; use [Transfer group ownership](/sdk/uniapp/group/managing-group-members/transfer-group-owner). + +Require confirmation for this high-risk moderation action and let the server enforce authority. After Promise success, merge `onGroupMemberInfoChanged` by `groupID:userID`. diff --git a/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx index 6ad93f266c..4d64a24abf 100644 --- a/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx +++ b/content/docs/chat/sdk/uniapp/group/managing-group-members/transfer-group-owner.mdx @@ -11,10 +11,20 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/managing-group-members/transfer-group-owner' --- +Only the current owner can call `transferGroupOwner()`. `newOwnerUserID` must identify an existing member of the group. + +The operation receives `groupID` and `newOwnerUserID`. Validate both against the latest group/member snapshot and prevent a duplicate submission while transfer is in flight. Local role visibility is only a UI hint; OpenIMServer verifies ownership and target membership. + ```uts import { transferGroupOwner } from '@/uni_modules/unix-openim-sdk' await transferGroupOwner({ groupID, newOwnerUserID: 'user_b' }) ``` -Require explicit confirmation: ownership and moderator permissions change immediately according to server policy. Reload group/member role state after completion. +## State after the call + +Promise success means that OpenIMServer completed the transfer: the previous owner becomes a regular member and the target obtains the owner role. `onGroupMemberInfoChanged` carries individual member records, so one transfer can produce changes for both users. Merge each by `groupID:userID`. + +Do not infer success from the number of events. Query the affected members again when the UI must confirm roles. If the old owner intends to leave, complete and verify the transfer first, then call `quitGroup()`. Dismissing the group affects every member and is not a substitute for ordinary transfer. Require explicit confirmation and explain the permission change. + +After transfer, recalculate every management action in the UI from the new member roles. Stop any old-owner-only mutation that was queued before the transfer, and revalidate the account and group before writing a late asynchronous result. diff --git a/content/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/docs/chat/sdk/uniapp/group/overview-group.mdx index ac281d4f46..d0a1394a7d 100644 --- a/content/docs/chat/sdk/uniapp/group/overview-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -11,16 +11,58 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/overview-group' --- -Groups use stable `groupID` keys. Build snapshots and then merge group events idempotently. +The group domain uses `groupID` as its stable primary key and includes group profiles, members, applications, and permissions. Group name, avatar, announcement, owner, and member count are mutable snapshots. + +## Core data types + +| Type | Use case | +| --- | --- | +| `OpenIMGroupItem` | Joined-group lists, group profile pages, and group state. | +| `OpenIMCreateGroupInfo` | Name, type, announcement, introduction, avatar, and extension submitted when creating a group. | +| `OpenIMGroupMemberItem` | Member profile, role, join source, and mute-end time. | +| `OpenIMGroupApplicationItem` | Join application, applicant, and processing state. | + +Common `OpenIMGroupItem` fields include `groupID`, `groupName`, `notification`, `introduction`, `faceURL`, `ownerUserID`, `memberCount`, `status`, `groupType`, `needVerification`, `lookMemberInfo`, `applyMemberFriend`, and `ex`. `attachedInfo` is a Commercial field; parse it only according to a confirmed contract. + +Use `groupID:userID` as the stable merge key for a member. A member's in-group `nickname` and `faceURL` are member snapshots and must not overwrite account-level profile data. + +## Find a task + +| Task | Page | +| --- | --- | +| Create, update, dismiss, or leave a group | [Create a group](/sdk/uniapp/group/create-group), [Update a group](/sdk/uniapp/group/update-group-profile), [Dismiss a group](/sdk/uniapp/group/dismiss-group), [Leave a group](/sdk/uniapp/group/quit-group) | +| Page through joined groups or query selected profiles | [List joined groups by page](/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page), [Get specified groups](/sdk/uniapp/group/retrieving-groups/get-specified-groups-info) | +| Query, search, and manage members | [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list), [Search group members](/sdk/uniapp/group/retrieving-group-members/search-group-members) | +| Invite or remove members and transfer ownership | [Invite users](/sdk/uniapp/group/managing-group-members/invite-user-to-group), [Remove members](/sdk/uniapp/group/managing-group-members/kick-group-member), [Transfer ownership](/sdk/uniapp/group/managing-group-members/transfer-group-owner) | +| Send, query, and process join applications | [Join a group](/sdk/uniapp/group/join-group), [Get received group applications](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) | +| Configure mute, verification, and member permissions | Use the corresponding group-settings and member-management pages. | + +## State updates + +This page owns the four group-profile and joined-list events. Subscribe before querying the joined-group snapshot. ```uts -import { off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted } from '@/uni_modules/unix-openim-sdk' +import { + off, + onGroupDismissed, + onGroupInfoChanged, + onJoinedGroupAdded, + onJoinedGroupDeleted, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' -const subscriptions = [ - onGroupInfoChanged(upsertGroup), onGroupDismissed(removeGroup), - onJoinedGroupAdded(upsertGroup), onJoinedGroupDeleted(removeGroup), +const infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group)) +const subscriptions : Array = [ + infoSubscription, + onGroupDismissed((group) => removeGroup(group.groupID)), + onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)), + onJoinedGroupDeleted((group) => removeGroup(group.groupID)), ] subscriptions.forEach((subscription) => off(subscription)) ``` -Treat membership roles, mute state, join policy, and commercial extension fields as server-authoritative. Reload after login or synchronization gaps. +Merge every event idempotently by `groupID`. Dismissal, active leave, and removal by another member have different business causes, but each can require closing the current chat page. + +`onGroupInfoChanged` updates profile data, `onGroupDismissed` means the group was dismissed, and `onJoinedGroupAdded` / `onJoinedGroupDeleted` update the current account's joined-group list. Promise success, event arrival, and requery are three stages. Requery snapshots after App restoration, synchronization, or re-login. + +Treat roles, mute state, join policy, and commercial extensions as server-authoritative. Degrade when fields are absent instead of inventing default permission. Stop sending and clear the member store when the current user can no longer access the group. Release every owned handle on logout or group-store destruction. diff --git a/content/docs/chat/sdk/uniapp/group/quit-group.mdx b/content/docs/chat/sdk/uniapp/group/quit-group.mdx index b91d47e219..e7114ce927 100644 --- a/content/docs/chat/sdk/uniapp/group/quit-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/quit-group.mdx @@ -11,10 +11,16 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/quit-group' --- +`quitGroup()` leaves one joined group for the current account. + ```uts import { quitGroup } from '@/uni_modules/unix-openim-sdk' await quitGroup(groupID) ``` -Ask for confirmation. The group owner may need to transfer ownership or dismiss the group instead. Remove local state only after an event or refreshed joined-group list. +Ask for confirmation. The owner normally cannot leave directly and must first transfer ownership or dismiss the group. After success, close the group chat and reconcile through a joined-group deletion event or a new query. + +Promise success means that the leave request completed, not that group-list and member events have arrived. Remove this account's chat entry, member pages, and send permission by `groupID`; other members retain the group. + +Serialize ownership transfer and leave: confirm the new owner through an event or query before calling `quitGroup()`. Preserve chat and group state on failure instead of deleting it only because the user confirmed the dialog. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx index 78ea25975d..61516706ac 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-group-member-list.mdx @@ -11,15 +11,50 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-group-member-list' --- +`getGroupMemberList()` reads members by filter and page. This page owns the added, deleted, and info-changed member events. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `filter` | `number` | Yes | Server-defined member filter; do not use a UI index. | +| `offset` | `number` | Yes | Offset; use `0` for the first page. | +| `count` | `number` | Yes | Members requested in this page. | + ```uts import { getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged } from '@/uni_modules/unix-openim-sdk' -const added = onGroupMemberAdded(upsertMember) -const deleted = onGroupMemberDeleted(removeMember) -const changed = onGroupMemberInfoChanged(upsertMember) +const added = onGroupMemberAdded((member) => upsertMember(member)) +const deleted = onGroupMemberDeleted((member) => removeMember(member.groupID, member.userID)) +const changed = onGroupMemberInfoChanged((member) => upsertMember(member)) const result = await getGroupMemberList({ groupID, filter: 0, offset: 0, count: 100 }) replaceMembers(result?.members ?? []) off(added); off(deleted); off(changed) ``` -Use exported filters, paginate, and merge by `(groupID,userID)`. Reload after role or synchronization changes. +The Promise resolves directly to `OpenIMGroupMemberListResult` or `null`; `members` contains the current page. A `null` result is not the same as an empty member page. Preserve error/loading state for `null`, and interpret an empty array as a valid page with no members. + +### Group member fields + +| Field | Description | +| --- | --- | +| `groupID`, `userID` | Stable member identity, combined as `groupID:userID`. | +| `nickname`, `faceURL` | In-group display profile. | +| `roleLevel` | Owner, administrator, or regular-member role. | +| `joinTime`, `joinSource`, `inviterUserID` | Join time, source, and inviter. | +| `muteEndTime` | Mute end time; compare it with current time. | +| `operatorUserID` | User that performed the latest relevant operation. | +| `ex`, `attachedInfo` | Extension data; parse only a confirmed business contract. | + +Cache by `groupID:userID`. Do not overwrite in-group display data with account-level `getUsersInfo()` results, and do not reuse role or mute state across groups. + +Continue until a page is shorter than `count`. Joins, exits, removals, and role changes can move page boundaries, so merge events by key and rebuild from offset 0 when complete ordering matters. + +## Listen for member changes + +This page is the complete owner for the three member events. Add or replace by `groupID:userID`; delete the exact same key. Do not mutate an array position when pagination and events run concurrently. + +If deletion targets the current user, stop sending and refresh the joined-group list. Recompute permissions after role or mute changes. Release every handle on logout, account switch, or member-store destruction. Query Promise success establishes only a page snapshot and does not itself trigger member events. + +Inviting, removing, muting, or editing a member has three possible observations: the mutation Promise, the member event, and a reconciliation query. Treat them separately and never make a local object change stand in for server confirmation. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx index 2249f9be36..b47799feda 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info.mdx @@ -11,10 +11,21 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info' --- +`getSpecifiedGroupMembersInfo()` queries selected users' member profiles in one group. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `userIDList` | `string[]` | Yes | Member user IDs to query. | + ```uts import { getSpecifiedGroupMembersInfo } from '@/uni_modules/unix-openim-sdk' const result = await getSpecifiedGroupMembersInfo({ groupID, userIDList: ['user_a', 'user_b'] }) ``` -Map results by `userID`; missing entries can reflect non-membership or access policy. Do not rely on input order. +The Promise returns matching `OpenIMGroupMemberItem[]` in `members`. Results can be shorter or differently ordered because a user is not a member or cannot be accessed. Do not rely on input position. + +The same user can have a different nickname, role, and mute state in each group. Cache by `groupID:userID`, not only `userID`, and do not replace member data with ordinary public profile data. The query does not trigger events; later changes are owned by [List group members](/sdk/uniapp/group/retrieving-group-members/get-group-member-list). diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx index 9f5c76bf09..c1f51a6cec 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/get-users-in-group.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/get-users-in-group' --- +`getUsersInGroup()` filters a candidate list to the user IDs that belong to one group. It returns `string[]` or `null`. + ```uts import { getUsersInGroup } from '@/uni_modules/unix-openim-sdk' -const result = await getUsersInGroup({ groupID, userIDList }) +const members = await getUsersInGroup({ groupID, userIDList: candidateUserIDs }) ``` -Use this to check which requested users belong to one group. Interpret results by user ID, not position; it does not add or remove members. +The result contains user IDs only, not member profiles. Query specified members when the UI needs in-group nickname, role, or mute state. Deduplicate input first and interpret results by value rather than input position. + +Treat `null` as no valid result and an empty array as no matching members. This operation does not add, invite, or remove members and does not trigger a member event. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx index 58d3e1820b..47fecbb3ae 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-group-members/search-group-members.mdx @@ -11,10 +11,29 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-group-members/search-group-members' --- +`searchGroupMembers()` searches members within one group, for example to build an @ mention picker. The current interface uses only the first keyword. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Target group ID. | +| `keywordList` | `string[]` | Yes | Search keywords; pass one trimmed non-empty keyword. | +| `isSearchUserID` | `boolean` | Yes | Whether to match user ID. | +| `isSearchMemberNickname` | `boolean` | Yes | Whether to match in-group nickname. | + ```uts import { searchGroupMembers } from '@/uni_modules/unix-openim-sdk' -const result = await searchGroupMembers({ groupID, keywordList: ['Alice'], isSearchUserID: true, isSearchMemberNickname: true }) +const result = await searchGroupMembers({ + groupID, + keywordList: [keyword.trim()], + isSearchUserID: true, + isSearchMemberNickname: true, +}) +const members = result?.members ?? [] ``` -Reject empty keywords and use explicit search flags. This searches group-member data and does not replace public user lookup. +Unlike the Wasm version, this interface has no `offset` or `count`; it returns the current matches. Reject an empty keyword and replace the search snapshot when the input changes. + +`members` contains matching `OpenIMGroupMemberItem[]`. Deduplicate by `groupID:userID` and do not replace the complete member list. This searches member data, not the global user directory. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx index c82ccddf56..26e5b041df 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -11,10 +11,43 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page' --- +Use `getJoinedGroupListPage()` for accounts with many joined groups. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `offset` | `number` | Yes | Offset; use `0` for the first page. | +| `count` | `number` | Yes | Number of groups to read. | + ```uts import { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk' const result = await getJoinedGroupListPage({ offset: 0, count: 100 }) +appendGroups(result?.groups ?? []) ``` -Continue until a page returns fewer than `count` items. Group state may change during pagination, so deduplicate by `groupID` and merge events idempotently. +## Return result + +The Promise resolves directly to `OpenIMGroupListResult` or `null`; `groups` contains the current page. Increase the offset until a page contains fewer than `count` items. + +### Group profile fields + +| Field | Description | +| --- | --- | +| `groupID` | Stable group identifier. | +| `groupName`, `faceURL` | Group name and avatar snapshot. | +| `notification`, `introduction` | Announcement and introduction. | +| `ownerUserID`, `creatorUserID`, `createTime` | Owner, creator, and creation time. | +| `memberCount`, `status`, `groupType` | Member-count, group-state, and type snapshot. | +| `needVerification` | Join-verification policy. | +| `lookMemberInfo`, `applyMemberFriend` | Member-profile and friend-application policy. | +| `notificationUpdateTime`, `notificationUserID` | Latest announcement update metadata. | +| `ex` | Application extension string. | +| `attachedInfo` Commercial field | Commercial attachment data; parse only a confirmed contract. | + +Member count and permission fields are snapshots and do not replace member pagination or server authorization. See [Group overview](/sdk/uniapp/group/overview-group) for events and the model. + +Group events can move page boundaries. Merge pages into a map keyed by `groupID`, rebuild from offset 0 after App restoration/synchronization or group add/delete events, and stop old-account page writes during account switching. + +Use the first page to replace the current account's group snapshot and later pages to merge by `groupID`. Do not retain old-account group objects after switching users. Group names and member counts can change while paging, so calculate visible ordering only after merging the latest snapshot and events. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx index 590315f289..841e516935 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list.mdx @@ -11,6 +11,8 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-joined-group-list' --- +`getJoinedGroupList()` reads the current account's complete local joined-group snapshot in one call. + ```uts import { getJoinedGroupList } from '@/uni_modules/unix-openim-sdk' @@ -18,4 +20,6 @@ const result = await getJoinedGroupList() replaceJoinedGroups(result?.groups ?? []) ``` -Use this for a complete manageable snapshot, deduplicate by `groupID`, and merge joined/deleted/info events. Use the paged API for large lists. +The Promise resolves to `OpenIMGroupListResult` or `null`; read groups from `groups` and deduplicate by `groupID`. Use the paginated operation for large lists rather than loading an unbounded local database. + +This query establishes a snapshot and does not trigger group events. Merge joined, deleted, and info events from [Group overview](/sdk/uniapp/group/overview-group), and requery after login or synchronization gaps. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx index 1156ebb4a0..b0956c748d 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-specified-groups-info.mdx @@ -11,10 +11,17 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/get-specified-groups-info' --- +Group-profile queries establish snapshots and do not trigger group events. Public group discovery and complex business-directory permission filtering belong to the application backend; this SDK query works with known `groupID` values. + +`getSpecifiedGroupsInfo()` receives an array of group IDs: + ```uts import { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk' -const result = await getSpecifiedGroupsInfo(['group_a', 'group_b']) +const result = await getSpecifiedGroupsInfo(groupIDs) +const groups = result?.groups ?? [] ``` -Results can be missing or reordered. Map by `groupID` and treat server-returned role, policy, and mute fields as authoritative snapshots. +Pass an array even when querying one group, and verify that a result exists rather than assuming `groups[0]`. Groups have no SDK URL or slug field; resolve an application route to a stable `groupID` first. + +The Promise returns matching `OpenIMGroupItem[]` in `groups`. It can be shorter or differently ordered than the input because a group is absent, dismissed, or inaccessible. Map by `groupID` and split a large ID set into batches. Merge subsequent events by `groupID` as shown in [Group overview](/sdk/uniapp/group/overview-group). diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx index 163dd305ad..c5882041a3 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/is-join-group.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/is-join-group' --- +`isJoinGroup()` returns whether the current account belongs to a specific group. + ```uts import { isJoinGroup } from '@/uni_modules/unix-openim-sdk' const joined = await isJoinGroup(groupID) ``` -Use the returned boolean for current membership, but refresh after join/quit events or account changes. This query neither joins the group nor checks moderation permissions. +The boolean is a snapshot at query time. Refresh it after join, leave, dismissal, removal, re-login, or account change instead of caching one `true` permanently. + +This query neither joins the group nor proves moderator permission. When not joined, follow the group's verification policy and application flow rather than creating local member state. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx index 93fe323cbb..e570518297 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/search-groups.mdx @@ -11,10 +11,29 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/retrieving-groups/search-groups' --- +`searchGroups()` searches only groups joined by the current user and already synchronized locally. The current interface uses the first keyword in `keywordList`. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `keywordList` | `string[]` | Yes | One trimmed, non-empty keyword. | +| `isSearchGroupID` | `boolean` | Yes | Whether to match `groupID`. | +| `isSearchGroupName` | `boolean` | Yes | Whether to match group name. | + ```uts import { searchGroups } from '@/uni_modules/unix-openim-sdk' -const result = await searchGroups({ keywordList: ['project'], isSearchGroupID: true, isSearchGroupName: true }) +const result = await searchGroups({ + keywordList: [keyword.trim()], + isSearchGroupID: true, + isSearchGroupName: true, +}) +const groups = result?.groups ?? [] ``` -Reject empty searches, map results by `groupID`, and distinguish local/joined-group search semantics from a server-wide group directory. +## Return result + +`groups` contains matching `OpenIMGroupItem[]`. Reject an empty keyword in the UI. Deduplicate results by `groupID`; they are a snapshot for the current keyword and must not replace the complete joined-group list. + +This is not a server-wide group directory. Public discovery, classification, and complex permission filters belong to a trusted application backend. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx index 9ab8b34ebc..0809b86850 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-announcement.mdx @@ -11,10 +11,14 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-announcement' --- +Update a group's announcement through `setGroupInfo()` and pass only `notification` in addition to `groupID`. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, notification: 'Release on Friday at 17:00' }) ``` -Send only `notification`, then confirm its update time and author from group information. Announcements are visible to members and must not contain secrets. +Passing only the announcement avoids overwriting group name, avatar, or policy fields. Promise success means that the update request completed. Merge `onGroupInfoChanged` or query the group again to confirm `notification`, `notificationUpdateTime`, and `notificationUserID`. + +Announcements are visible to group members. Do not include tokens, internal secrets, or moderation evidence, and apply the product's length and content validation before submission. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx index 0240446092..d6d9133c86 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-extension.mdx @@ -11,10 +11,20 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-extension' --- +Use `setGroupInfo()` to replace the group's `ex` string. Read and merge the current versioned schema before writing. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupInfo({ groupID, ex: JSON.stringify({ department: 'R&D' }) }) +await setGroupInfo({ + groupID, + ex: JSON.stringify({ + ...previous, + projectID: 'project-42', + }), +}) ``` -`ex` is a whole-value replacement. Parse and merge the existing versioned schema, preserve unknown fields, and never place secrets in member-readable data. +`ex` is a complete replacement. When several modules share it, use stable namespaces and preserve fields owned by the others. If parsing fails, keep the original value rather than overwriting it. Members allowed to read group profiles can see this data, so never store secrets. + +After Promise success, merge the latest group profile from `onGroupInfoChanged` by `groupID` or query it again. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx index 42ec1cc2e5..09890795ba 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-join-verification.mdx @@ -11,10 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-join-verification' --- +Use `setGroupInfo()` to change how future applications and invitations are verified. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, needVerification: 1 }) ``` -Use exported `OpenIMGroupNeedVerification` constants. The policy affects future joins, not existing members or requests; confirm from the updated group. +The `OpenIMGroupNeedVerification` range is: + +| `needVerification` | Meaning | +| --- | --- | +| `0` | User applications require review; member invitations can join directly. | +| `1` | Applications and ordinary-member invitations require review; owner/admin invitations are exempt. | +| `2` | Applications and invitations can join directly. | + +Use the exported contract type rather than a UI index. The client can explain the policy, but OpenIMServer remains authoritative. It affects future applications and invitations and does not reprocess existing members or pending requests. + +After Promise success, merge the latest group through `onGroupInfoChanged` by `groupID` or query it again. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx index c7dbe4a97f..b408fa2ac2 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-friend-permission.mdx @@ -11,10 +11,21 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-member-friend-permission' --- +Use `setGroupInfo()` to control whether a user can start a friend application from the group-member relationship. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, applyMemberFriend: 1 }) ``` -Use valid `OpenIMGroupOption` values. The server enforces this policy; UI visibility alone is not an authorization boundary. +The `OpenIMGroupOption` values are: + +| `applyMemberFriend` | Meaning | +| --- | --- | +| `0` | Allow friend applications through group membership. | +| `1` | Disallow friend applications through group membership. | + +This policy controls only the friend-application entry from a group-member relationship; it is not the same as hiding member profiles. The server enforces it, so UI visibility is not an authorization boundary. + +Promise success means that the update request completed. Merge the latest value from `onGroupInfoChanged` by `groupID`. diff --git a/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx index 85d3519503..dfb64244e2 100644 --- a/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx +++ b/content/docs/chat/sdk/uniapp/group/set-group-member-profile-access.mdx @@ -11,10 +11,21 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/set-group-member-profile-access' --- +Use `setGroupInfo()` to control whether ordinary members can view other members' profiles. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' await setGroupInfo({ groupID, lookMemberInfo: 1 }) ``` -Use valid `OpenIMGroupOption` values. The server remains responsible for privacy enforcement; hiding a client control is not sufficient protection. +The `OpenIMGroupOption` values are: + +| `lookMemberInfo` | Meaning | +| --- | --- | +| `0` | Allow members to view other members' profiles. | +| `1` | Disallow members from viewing other members' profiles. | + +Do not interpret this as a normal boolean where `0` is false and `1` is true. It is independent of the friend-application policy and does not replace backend privacy authorization. The server remains responsible for enforcement. + +After Promise success, merge the latest group through `onGroupInfoChanged` by `groupID`. diff --git a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx index a4e5efe4a6..81eccc34db 100644 --- a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -11,10 +11,32 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/group/update-group-profile' --- +Use `setGroupInfo()` to update basic group profile fields. Pass only the values that actually changed. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `groupID` | `string` | Yes | Group to update. | +| `groupName` | `string` or `null` | No | New group name. | +| `introduction` | `string` or `null` | No | New introduction. | +| `faceURL` | `string` or `null` | No | New avatar URL. | + +Provide at least one actual profile field besides `groupID`; omitted fields retain their values. + ```uts import { setGroupInfo } from '@/uni_modules/unix-openim-sdk' -await setGroupInfo({ groupID, groupName: 'New project name', faceURL: avatarURL }) +await setGroupInfo({ + groupID, + groupName: groupName.trim(), + introduction: introduction.trim(), + faceURL, +}) ``` -Pass only fields that should change. The server enforces role permissions; confirm final data through `onGroupInfoChanged` or a new query. +Do not mix announcement, join-verification, or member-permission fields into the ordinary profile-save flow; editing a name must not overwrite unrelated settings. The server enforces owner/admin permission. + +Promise success means that OpenIMServer completed the request. Merge `onGroupInfoChanged` by `groupID` or call `getSpecifiedGroupsInfo()` for immediate reconciliation. Do not overwrite fields that were not submitted. + +`displayIsRead` is a Commercial field. Do not send it when the public server or installed edition does not expose the capability. From 8e944d7f7f5383dd5e7187a92dbb587c19e9064f Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 18:29:44 +0800 Subject: [PATCH 19/20] docs(uniapp): align English message guides with Wasm --- .../sdk/uniapp/file-uploads/upload-file.mdx | 56 +++- .../install-initialize-and-inspect-sdk.mdx | 4 +- .../update-token-and-observe-sdk-session.mdx | 2 +- .../check-speech-to-text.mdx | 14 +- .../composing-messages/get-typing-status.mdx | 4 +- .../save-local-transcript.mdx | 4 +- .../composing-messages/transcribe-audio.mdx | 10 +- .../update-typing-status.mdx | 12 +- .../creating-messages/create-card-message.mdx | 20 +- .../create-custom-message.mdx | 20 +- .../creating-messages/create-face-message.mdx | 2 +- .../create-file-message-by-url.mdx | 24 +- .../create-forward-message.mdx | 2 +- .../create-image-message-by-url.mdx | 30 +- .../create-location-message.mdx | 10 +- .../create-merger-message.mdx | 14 +- .../create-sound-message-by-url.mdx | 22 +- .../create-text-at-message.mdx | 35 ++- .../creating-messages/create-text-message.mdx | 2 +- .../create-video-message-by-url.mdx | 24 +- .../clear-all-local-messages.mdx | 2 +- .../managing-messages/clear-all-messages.mdx | 2 +- .../delete-local-message.mdx | 2 +- .../delete-saved-messages.mdx | 26 +- .../delete-user-messages.mdx | 6 +- .../managing-messages/get-pinned-messages.mdx | 5 +- .../insert-local-group-message.mdx | 12 +- .../insert-local-single-message.mdx | 17 +- .../managing-messages/modify-a-message.mdx | 44 ++- .../managing-messages/revoke-a-message.mdx | 39 ++- .../set-message-local-ex.mdx | 12 +- .../managing-messages/set-message-pinned.mdx | 19 +- .../get-group-message-readers.mdx | 19 +- .../send-group-read-receipts.mdx | 15 +- .../sdk/uniapp/message/overview-message.mdx | 101 ++++++- .../receiving-messages/receive-messages.mdx | 121 +++++++- .../find-messages-by-id.mdx | 21 +- .../load-message-context.mdx | 23 +- .../load-older-messages.mdx | 34 ++- .../searching-messages/search-messages.mdx | 121 +++++++- .../sending-messages/send-message-not-oss.mdx | 22 +- .../create-conversation-group.mdx | 4 +- ...ersation-group-info-with-conversations.mdx | 4 +- .../overview-conversation-groups.mdx | 16 +- .../update-conversation-group.mdx | 6 +- .../install-initialize-and-inspect-sdk.mdx | 4 +- .../update-token-and-observe-sdk-session.mdx | 2 +- content/zh/docs/chat/sdk/uniapp/logger.mdx | 2 +- ...t-friend-application-list-as-applicant.mdx | 4 +- ...t-friend-application-list-as-recipient.mdx | 4 +- .../uniapp/user/friends/update-friends.mdx | 6 +- .../user/profile/get-self-user-info.mdx | 6 +- .../uniapp/user/profile/get-users-info.mdx | 6 +- .../sdk/uniapp/user/profile/set-self-info.mdx | 8 +- data/structure/uniapp-content-audit.json | 10 +- src/generated/navigation.json | 2 +- src/generated/routes.json | 6 +- src/generated/search-index-zh.json | 26 +- src/generated/search-index.json | 280 +++++++++--------- src/generated/uniapp-sdk-zh-content.json | 26 +- 60 files changed, 1087 insertions(+), 309 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx b/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx index c00a77191e..fb5b140905 100644 --- a/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx +++ b/content/docs/chat/sdk/uniapp/file-uploads/upload-file.mdx @@ -11,16 +11,62 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/file-uploads/upload-file' --- +`uploadFile()` is an independent upload operation for avatars, group images, profile attachments, and other business files. It does not create a chat message. It uploads a native-readable local file and returns its URL/URI, UUID, size, and media metadata. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `filepath` | `string` | Yes | Full local path readable by the native layer. | +| `name` | `string` | Yes | Filename. | +| `contentType` | `string` | Yes | MIME type. | +| `uuid` | `string` | Yes | Stable task ID created by your application. | +| `cancelID` | `string` or `null` | No | Stable ID used to cancel this upload. | +| `cause` | `string` or `null` | No | Business purpose or reason for the upload. | + +Register the progress event before calling `uploadFile()` so a small file cannot complete before the listener exists. + ```uts -import { uploadFile } from '@/uni_modules/unix-openim-sdk' +import { off, onUploadFileProgress, uploadFile } from '@/uni_modules/unix-openim-sdk' + +const progressSubscription = onUploadFileProgress((event) => { + if (event == null) return + updateUploadProgress(event.progress) +}) const result = await uploadFile({ - filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', - contentType: 'application/pdf', uuid: createStableUploadUUID(), cancelID: 'upload-report-1', + filepath: '/data/user/0/app/cache/report.pdf', + name: 'report.pdf', + contentType: 'application/pdf', + uuid: createStableUploadUUID(), + cancelID: 'upload-report-1', }) + +function removeUploadListener() { + off(progressSubscription) +} ``` -Use a readable absolute native path. Resolve `unifile://` first and never pass a network URL as `filepath`. Observe progress through `onUploadFileProgress`. +Resolve `unifile://` to a platform sandbox path and never pass a network URL as `filepath`. Android and iOS temporary directories, grants, and lifetimes differ; do not move or delete the source while native code may still read it. + +The Promise resolves to `OpenIMUploadFileResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `url` | `string` or `null` | Uploaded remote URL. | +| `uri` | `string` or `null` | Resource URI returned by the server. | +| `uuid` | `string` or `null` | Upload task identifier. | +| `size` | `number` or `null` | File size. | +| `typ` | `number` or `null` | Resource type returned by the server. | +| `mediaID` | `string` or `null` | Media resource ID. | + +Use `result?.url` in a profile update or when creating the appropriate message. Upload success does not update profile data or create/send a chat message; those are separate operations. + +## Listen for upload progress + +`onUploadFileProgress` returns an `OpenIMSDKEventSubscription`, and its event contains only `progress`. Unlike Wasm completion events, the current uni-app / uni-app x contract does not include a task ID. Do not correlate several concurrent uploads by array position; limit concurrency or track final state through each Promise. Call `removeUploadListener()` when the account or upload store is disposed. + +Commercial applications can cancel the matching task with `cancelUpload()` Commercial: ```uts import { cancelUpload } from '@/uni_modules/unix-openim-sdk' @@ -28,4 +74,4 @@ import { cancelUpload } from '@/uni_modules/unix-openim-sdk' await cancelUpload({ cancelID: 'upload-report-1' }) ``` -`cancelUpload()` is Commercial. The original upload Promise defines the final state. Do not delete a temporary file while native code may still read it. +Cancellation is asynchronous; the original upload Promise and error code define the final state. Do not delete a temporary file until the upload completes or cancellation is confirmed. diff --git a/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx index ba5f6f8561..9678bae20a 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx @@ -41,8 +41,8 @@ Use `OpenIMPlatformIOS` with `systemType: 'ios'`, or `OpenIMPlatformHarmony` wit | `platformID` | `OpenIMPlatform` | One of the exported platform constants. | | `apiAddr` | `string` | OpenIMServer HTTP API address. | | `wsAddr` | `string` | OpenIMServer WebSocket address. | -| `dataDir` | `string \| null` (optional) | Core data directory; normally use the platform default. | -| `logFilePath` | `string \| null` (optional) | Log path following the platform artifact contract. | +| `dataDir` | `string` or `null` (optional) | Core data directory; normally use the platform default. | +| `logFilePath` | `string` or `null` (optional) | Log path following the platform artifact contract. | | `logLevel` | `OpenIMLogLevel` | For example `OpenIMLogLevelError` or `OpenIMLogLevelInfo`. | | `isLogStandardOutput` | `boolean` | Whether SDK logs are emitted to the system console. | | `systemType` | `string` | Required system description; never omit it. | diff --git a/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx index c1906dde67..484cb82269 100644 --- a/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx +++ b/content/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx @@ -22,7 +22,7 @@ const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot() | Field | Type | Description | | --- | --- | --- | | `loginStatus` | `OpenIMLoginStatus` | Current login state. | -| `userID` | `string \| null` | Current SDK user, or `null` when logged out. | +| `userID` | `string` or `null` | Current SDK user, or `null` when logged out. | | `sdkSessionEpoch` | `number` | Session generation, incremented after successful lifecycle or account changes. | | `sdkVersion` | `string` | Version of the connected Core. | diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx index 939603b775..fa2c935396 100644 --- a/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/check-speech-to-text.mdx @@ -17,4 +17,16 @@ import { getSpeechToTextCapabilities } from '@/uni_modules/unix-openim-sdk' const capabilities = await getSpeechToTextCapabilities() ``` -This Commercial query should gate transcription UI. Capability can vary by deployment and account; do not infer it solely from plugin version. +This is a Commercial capability query. The Promise resolves to `OpenIMSpeechToTextCapabilitiesResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `format` | `string[]` or `null` | Supported audio formats. | +| `sampleRateHz` | `number[]` or `null` | Supported sample rates in hertz. | +| `maxRecordTimeMs` | `number` or `null` | Maximum recording duration in milliseconds. | +| `maxFileSize` | `number` or `null` | Maximum file size in bytes. | +| `provider` | `string` or `null` | Current speech-recognition provider. | +| `requestType` | `string` or `null` | Request type required by the service. | +| `crossDomain` | `boolean` or `null` | Whether cross-domain processing is allowed. | + +Query and cache capabilities for the current login session before displaying transcription UI. Validate format, sample rate, duration, and size before sending audio. Capabilities can vary by service, language, and account, so refresh them after login changes. Disable transcription on failure instead of guessing limits. This query does not emit message events. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx index 90eb604e01..68920faec0 100644 --- a/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/get-typing-status.mdx @@ -14,7 +14,7 @@ sourcePath: '/sdk/uniapp/message/composing-messages/get-typing-status' ```uts import { getInputStates } from '@/uni_modules/unix-openim-sdk' -const state = await getInputStates(conversationID) +const result = await getInputStates({ conversationID, userID: peerUserID }) ``` -This Commercial snapshot can become stale quickly. Combine it with typing events and a local timeout; never use it for authorization or durable presence. +`getInputStates()` is a Commercial snapshot query. Typing state is a short-lived hint, not a durable business fact. Update the UI from events and apply a local expiry timeout so a disconnect cannot leave “typing” visible forever. Never use this snapshot for authorization or durable presence. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx index 8a8b3d5b42..792c0f9100 100644 --- a/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/save-local-transcript.mdx @@ -14,7 +14,7 @@ sourcePath: '/sdk/uniapp/message/composing-messages/save-local-transcript' ```uts import { setMessageLocalContent } from '@/uni_modules/unix-openim-sdk' -await setMessageLocalContent({ conversationID, clientMsgID, content: transcript }) +await setMessageLocalContent({ conversationID, message: updatedMessage }) ``` -This Commercial local-only value is device state and does not edit the server message. Version any structured content and avoid storing unnecessary sensitive transcript data. +`setMessageLocalContent()` is Commercial and stores a complete message object in the specified conversation's local database. Merge the transcript into a copy of the original message first; do not overwrite its `clientMsgID`, routing fields, or unrelated business elems. The change is device-local and must not be treated as a server or multi-device edit. Version structured transcript data and avoid retaining unnecessary sensitive content. diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx index 700ca6c56a..4efab6d9d1 100644 --- a/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/transcribe-audio.mdx @@ -14,7 +14,13 @@ sourcePath: '/sdk/uniapp/message/composing-messages/transcribe-audio' ```uts import { speechToText } from '@/uni_modules/unix-openim-sdk' -const result = await speechToText(soundMessage) +const result = await speechToText({ + filename: 'voice.m4a', + data: audioBase64, +}) +if (result?.text != null) setTranscript(result.text) ``` -This is Commercial. Use a complete sound message, expose consent/privacy behavior, and store the returned transcript according to product policy rather than modifying the original media. +This is Commercial. Native files cannot cross the UTS boundary directly; encode the audio as the commercial service protocol requires. The Promise resolves to `OpenIMSpeechToTextResult | null`, whose optional `text` field contains the transcript. + +First query [speech-to-text capabilities](/sdk/uniapp/message/composing-messages/check-speech-to-text) and enforce the supported size, format, sample rate, and duration. Do not log complete audio or Base64 content. Transcription neither edits the original audio message nor emits message events. Ask the user to confirm transcripts before high-risk use; to persist one locally, see [Save a local transcript](/sdk/uniapp/message/composing-messages/save-local-transcript). diff --git a/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx b/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx index 5342f123b3..6225f643bb 100644 --- a/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx +++ b/content/docs/chat/sdk/uniapp/message/composing-messages/update-typing-status.mdx @@ -11,14 +11,18 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/composing-messages/update-typing-status' --- -`changeInputStates()` updates typing/input state; commercial `typingStatusUpdate()` provides the legacy compatible route. Receive updates through `onConversationUserInputStatusChanged`. +Pass `focus: true` when the user starts typing. Pass `false` after sending, when the input loses focus, when switching conversations, or when typing stops. Typing state belongs to `conversationID`; it neither saves a draft nor writes a message. ```uts import { changeInputStates, off, onConversationUserInputStatusChanged } from '@/uni_modules/unix-openim-sdk' -const typingSubscription = onConversationUserInputStatusChanged((state) => renderTyping(state)) -await changeInputStates({ conversationID, focus: true }) +const typingSubscription = onConversationUserInputStatusChanged((status) => { + updateConversationInputStatus(status) +}) +await changeInputStates({ conversationID, userID: peerUserID, focus: true }) off(typingSubscription) ``` -Debounce high-frequency UI changes and expire stale indicators locally. +Report `true` when the input gains focus and `false` on blur or page exit, and throttle high-frequency changes. Commercial compatibility method `typingStatusUpdate()` Commercial uses `recvID` and `msgTip`; do not call both routes for one typing flow. Expire stale indicators locally. + +Deduplicate state changes instead of reporting every keyboard event. Promise completion only means the request was accepted; it does not mean a remote interface has already updated. This page is the sole owner of `onConversationUserInputStatusChanged`. Replace the current `platformIDs` snapshot by `conversationID:userID`, and call `off(typingSubscription)` when the component, login, or account scope ends. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx index f67fbacf2a..ee9f35fa7f 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-card-message.mdx @@ -11,10 +11,26 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-card-message' --- +## Parameters + +`createCardMessage()` accepts `OpenIMCardElem`. Its fields are nullable in the contract, but a useful card should provide a complete snapshot: + +| Parameter | Type | Recommendation | Description | +| --- | --- | --- | --- | +| `userID` | `string` or `null` | Required | User represented by the card. | +| `nickname` | `string` or `null` | Required | Display name snapshot. | +| `faceURL` | `string` or `null` | Required | Avatar URL snapshot. | +| `ex` | `string` or `null` | Required | Extension data; use an empty string when unused. | + ```uts import { createCardMessage } from '@/uni_modules/unix-openim-sdk' -const message = await createCardMessage({ userID: 'user_b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '' }) +const message = await createCardMessage({ + userID: 'user_b', + nickname: 'Alex', + faceURL: 'https://example.com/avatar.png', + ex: '', +}) ``` -A card is a send-time snapshot. Resolve current profile data by `userID` when opened, and never treat card fields as authenticated identity. +The Promise creates `OpenIMMessageItem | null` and does not send it. A card is a send-time snapshot and does not track profile changes. Resolve current data by `userID` when opened, and never treat card fields as authenticated identity. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx index b9aeace019..e23169c835 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-custom-message.mdx @@ -11,12 +11,28 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-custom-message' --- +Use `createCustomMessage()` for orders, tasks, invitations, polls, or other business messages whose schema is shared by sender and receiver. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `data` | `string` | Yes | Complete business payload, normally serialized JSON. | +| `extension` | `string` | Yes | Complete business extension string. | +| `descriptionText` | `string` | Yes | Type description or fallback text for unsupported clients. | + ```uts import { createCustomMessage } from '@/uni_modules/unix-openim-sdk' const message = await createCustomMessage({ - data: JSON.stringify({ orderID: 'order_123' }), extension: '', descriptionText: 'Order card', + data: JSON.stringify({ type: 'task', taskID: 'task_42' }), + extension: JSON.stringify({ schemaVersion: 1 }), + descriptionText: 'Task card', }) ``` -All fields reach the recipient. Version and validate a shared schema and store no secrets. `createAdvancedTextMessage()` creates entity/styled text; reject entity ranges outside the original text. +All three fields reach the recipient. Never store secrets; validate schema version, size, and fields before mapping to a business model, and never execute untrusted content. The uni-app / uni-app x contract does not include the Wasm commercial `searchText` parameter. The Promise creates `OpenIMMessageItem | null`; sending and custom business events are separate flows. + +## Advanced text messages + +`createAdvancedTextMessage()` creates entity/styled text from `OpenIMCreateAdvancedTextMessageParams`. Entity ranges must refer to indexes in the original text; reject out-of-range values before calling the SDK. Both APIs only create messages. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx index 8e210be565..5854c3a011 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-face-message.mdx @@ -17,4 +17,4 @@ import { createFaceMessage } from '@/uni_modules/unix-openim-sdk' const message = await createFaceMessage({ index: 1, data: 'smile' }) ``` -Sender and receiver must share the same sticker package/version mapping. Render an unknown-index placeholder instead of failing the message list. +The Promise creates `OpenIMMessageItem | null` and does not send it. Sender and receiver must share the same sticker package/version mapping. Render an unknown-index placeholder instead of failing the message list. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx index 30559c28d5..857193e1aa 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-file-message-by-url.mdx @@ -11,10 +11,30 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-file-message-by-url' --- +Use `createFileMessageByURL()` with metadata from a file that is already uploaded. + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| `filePath` | `string` or `null` | Local name or business path; use an empty string when only a remote resource exists. | +| `fileName` | `string` or `null` | Display filename. | +| `uuid` | `string` or `null` | Unique resource identifier. | +| `sourceUrl` | `string` or `null` | Accessible URL of the uploaded file. | +| `fileSize` | `number` or `null` | File size in bytes. | + ```uts import { createFileMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createFileMessageByURL(fileElem) +const message = await createFileMessageByURL({ + filePath: '', + fileName: 'report.pdf', + uuid: createBusinessUUID(), + sourceUrl: uploaded.url, + fileSize: uploaded.size, +}) ``` -Use trusted upload-result URL, name, UUID, size, and type values. The URL must be accessible to recipients without exposing private storage credentials. +Use real upload-result URL, name, UUID, and size values. The URL must be accessible to recipients without exposing private storage credentials. `OpenIMFileElem` does not contain the Wasm `fileType` field. + +The Promise creates `OpenIMMessageItem | null`. Because the resource is already uploaded, send it with `sendMessageNotOss()`. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx index fb356e422d..92c92efd6f 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-forward-message.mdx @@ -17,4 +17,4 @@ import { createForwardMessage } from '@/uni_modules/unix-openim-sdk' const forward = await createForwardMessage(sourceMessage) ``` -Creation does not send. Check content-sharing permissions and privacy first; device-local extension/send-state fields are not recipient-authoritative data. +The Promise creates `OpenIMMessageItem | null` and does not send it. Check content-sharing permissions and privacy first. Device-local extension and send-state fields are not recipient-authoritative data. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx index d35b24d62e..a589afc6d0 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-image-message-by-url.mdx @@ -11,10 +11,36 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-image-message-by-url' --- +`createImageMessageByURL()` creates a message from already uploaded image metadata. The source, large image, and thumbnail can use different resources; this example reuses one object only when all three are identical. + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| `sourcePicture` | `OpenIMPicture` or `null` | Original image metadata. | +| `bigPicture` | `OpenIMPicture` or `null` | Large image metadata. | +| `snapshotPicture` | `OpenIMPicture` or `null` | Thumbnail metadata. | +| `sourcePath` | `string` or `null` | Local name or business path; use an empty string for a remote-only resource. | + +Each picture object has nullable `uuid`, `type`, `size`, `width`, `height`, and `url` fields. Supply the real upload result for a complete, displayable message. + ```uts import { createImageMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createImageMessageByURL(pictureElem) +const picture = { + uuid: createBusinessUUID(), + type: 'image/jpeg', + size: 120000, + width: 1280, + height: 720, + url: uploaded.url, +} +const message = await createImageMessageByURL({ + sourcePicture: picture, + bigPicture: picture, + snapshotPicture: picture, + sourcePath: '', +}) ``` -Provide uploaded source/thumbnail URLs and matching dimensions, size, and type. URLs must be accessible to conversation participants; do not place local paths in URL fields. +URLs must be accessible to conversation participants, and dimensions, size, and type must match the real resource. Do not place local paths in URL fields. The Promise only creates an outgoing object; send an already uploaded image with `sendMessageNotOss()`. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx index 664387465a..95e5003df7 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-location-message.mdx @@ -11,10 +11,18 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-location-message' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `descriptionText` | `string` | Yes | Place name or address. | +| `longitude` | `number` | Yes | Longitude. | +| `latitude` | `number` | Yes | Latitude. | + ```uts import { createLocationMessage } from '@/uni_modules/unix-openim-sdk' const message = await createLocationMessage({ descriptionText: 'Room A', longitude: 121.47, latitude: 31.23 }) ``` -Obtain user permission and validate coordinate ranges. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs. +Obtain location only after user authorization and reduce precision according to your privacy policy. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs. The Promise only creates `OpenIMMessageItem | null`. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx index 7e37ec0ce4..2e1848c0e7 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-merger-message.mdx @@ -11,12 +11,22 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-merger-message' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `messageList` | `OpenIMMessageItem[]` | Yes | Sent messages to merge. | +| `title` | `string` | Yes | Card title. | +| `abstractList` | `string[]` | Yes | Summary rows displayed on the card. | + ```uts import { createMergerMessage } from '@/uni_modules/unix-openim-sdk' const merger = await createMergerMessage({ - messageList: selectedMessages, title: 'Chat history', abstractList: ['Alice: Approved'], + messageList: selectedMessages, + title: 'Project discussion', + abstractList: selectedMessages.slice(0, 4).map(buildSummary), }) ``` -Keep summaries consistent with source messages, verify sharing permission and sensitive content, and limit total message count/size. +The Promise creates a new outgoing message and does not modify its source messages. Keep summaries consistent with source content and provide fallback text for unsupported types. Verify sharing permission and sensitive content, and limit total message count and size. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx index a5d751df9d..d744fea26e 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-sound-message-by-url.mdx @@ -11,10 +11,28 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-sound-message-by-url' --- +`createSoundMessageByURL()` creates a message from already uploaded audio metadata. + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| `uuid` | `string` or `null` | Unique audio resource ID. | +| `soundPath` | `string` or `null` | Local name or business path; use an empty string for a remote-only resource. | +| `sourceUrl` | `string` or `null` | Accessible uploaded audio URL. | +| `dataSize` | `number` or `null` | Audio size in bytes. | +| `duration` | `number` or `null` | Duration in the unit defined by the server protocol. | + ```uts import { createSoundMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createSoundMessageByURL(soundElem) +const message = await createSoundMessageByURL({ + uuid: createBusinessUUID(), + soundPath: '', + sourceUrl: uploaded.url, + dataSize: uploaded.size, + duration, +}) ``` -Use upload-result URL, UUID, size, duration, and type values. The remote resource must be accessible to recipients; a sandbox path is not a media URL. +Use upload-result URL, UUID, size, and duration values. The remote resource must be accessible to recipients; a sandbox path is not a media URL. `OpenIMSoundElem` does not contain the Wasm `soundType` field. The Promise only creates a message; send it with `sendMessageNotOss()`. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx index 6047a33a62..c4d3f8bd2e 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-at-message.mdx @@ -11,13 +11,42 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-text-at-message' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `text` | `string` | Yes | Message text; use stable `@userID` markers. | +| `atUserIDList` | `string[]` | Yes | Mentioned users; obtain the special tag from `getAtAllTag()` for everyone. | +| `atUsersInfo` | `OpenIMAtUsersInfoItem[]` or `null` | No | User IDs and group display names. | +| `quoteMessage` | `OpenIMMessageItem` or `null` | No | Original quoted message. | + ```uts import { createTextAtMessage } from '@/uni_modules/unix-openim-sdk' const message = await createTextAtMessage({ - text: '@Alice please review', atUserIDList: ['user_a'], - atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alice' }], quoteMessage: null, + text: '@user_a please review', + atUserIDList: ['user_a'], + atUsersInfo: [{ atUserID: 'user_a', groupNickname: 'Alex' }], }) ``` -Keep mention IDs and display metadata aligned. Commercial `getAtAllTag()` returns the deployed “mention everyone” tag. Send the created message with a target group ID. +The Promise creates `OpenIMMessageItem | null`. This message can only be sent to a group. Keep `atUserIDList` aligned with `atUsersInfo`; creation does not change conversation mention state or emit events. + +## Mention everyone + +Do not hard-code the everyone tag. Obtain the deployed value from commercial `getAtAllTag()` Commercial, then place it in both the text and ID list: + +```uts +import { getAtAllTag } from '@/uni_modules/unix-openim-sdk' + +const atAllResult = await getAtAllTag() +const atAllTag = atAllResult?.tag +if (atAllTag != null) { + const message = await createTextAtMessage({ + text: `${atAllTag} please read the announcement`, + atUserIDList: [atAllTag], + }) +} +``` + +`getAtAllTag()` only reads the convention. Send the created message separately with the target group ID. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx index 352fcba814..b1360e83fd 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-text-message.mdx @@ -18,4 +18,4 @@ const message = await createTextMessage('Hello, OpenIMSDK') if (message == null) throw new Error('Failed to create text message') ``` -Validate product length limits first. Creation does not send; pass the returned `OpenIMMessageItem` to `sendMessage()` rather than constructing one manually. +The Promise returns `OpenIMMessageItem | null` and does not send it. Validate product length limits first, then pass the returned object to [Send a message](/sdk/uniapp/message/sending-messages/send-message). Do not construct `OpenIMMessageItem` manually. diff --git a/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx index f2cfe46422..7fb4112c6e 100644 --- a/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx +++ b/content/docs/chat/sdk/uniapp/message/creating-messages/create-video-message-by-url.mdx @@ -11,10 +11,30 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/creating-messages/create-video-message-by-url' --- +`createVideoMessageByURL()` creates a message from uploaded video and snapshot metadata. + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| `videoPath` | `string` or `null` | Local name or business path; use an empty string for remote-only media. | +| `duration` | `number` or `null` | Video duration. | +| `videoType` | `string` or `null` | Video MIME type. | +| `videoUUID`, `videoUrl`, `videoSize` | nullable | Uploaded video ID, URL, and byte size. | +| `snapshotPath` | `string` or `null` | Snapshot local name or business path. | +| `snapshotUUID`, `snapshotUrl`, `snapshotSize` | nullable | Uploaded snapshot ID, URL, and byte size. | +| `snapshotWidth`, `snapshotHeight` | `number` or `null` | Snapshot dimensions in pixels. | + ```uts import { createVideoMessageByURL } from '@/uni_modules/unix-openim-sdk' -const message = await createVideoMessageByURL(videoElem) +const message = await createVideoMessageByURL({ + videoPath: '', duration, videoType: uploadedVideo.contentType, + videoUUID: createBusinessUUID(), videoUrl: uploadedVideo.url, + videoSize: uploadedVideo.size, snapshotPath: '', + snapshotUUID: createBusinessUUID(), snapshotSize: uploadedSnapshot.size, + snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, +}) ``` -Populate video and cover upload metadata accurately. Both resources must be accessible to recipients and must not expose private storage credentials. +Use real uploaded URLs, IDs, sizes, duration, and MIME type. Both resources must be accessible to recipients and must not expose private storage credentials. `OpenIMVideoElem` does not contain the Wasm `snapShotType` field. Send the created message with `sendMessageNotOss()`. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx index 9d28eec511..9861ad9317 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-local-messages.mdx @@ -17,4 +17,4 @@ import { deleteAllMsgFromLocal } from '@/uni_modules/unix-openim-sdk' await deleteAllMsgFromLocal() ``` -This high-risk operation clears all local messages for the account. Confirm, stop concurrent queries, and remember that server synchronization may restore some data. +This high-risk operation clears all local messages for the current account. Require explicit confirmation and stop concurrent message queries before calling it. It does not guarantee deletion of server data, and later synchronization may restore some records. Rebuild the local message store after success and re-query after an ambiguous failure. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx index 06fd84d967..2609ec3e87 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/clear-all-messages.mdx @@ -17,4 +17,4 @@ import { deleteAllMsgFromLocalAndSvr } from '@/uni_modules/unix-openim-sdk' await deleteAllMsgFromLocalAndSvr() ``` -This is a higher-risk account-wide local/server deletion. Explain scope/recovery, require strong confirmation, and rebuild conversation/message state after success or ambiguous failure. +This is a higher-risk account-wide local/server deletion. Explain scope and recovery behavior, require strong confirmation, and block concurrent mutations. Rebuild conversation and message state after success. On a timeout or ambiguous failure, query current state instead of assuming the operation was atomic. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx index 70c0a2c348..f61590071e 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-local-message.mdx @@ -17,4 +17,4 @@ import { deleteMessageFromLocalStorage } from '@/uni_modules/unix-openim-sdk' await deleteMessageFromLocalStorage({ conversationID, clientMsgID }) ``` -The compatible `deleteMessage()` uses the same parameters. This affects only local storage and must not be presented as remote deletion or revocation. +The compatibility method `deleteMessage()` uses the same parameters. This operation only removes the record from the current device. It does not revoke the peer's message and must not be presented as server deletion. Remove the row from the device store after success; use revocation or a commercial server-delete capability when other participants must observe the change. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx index 74bc3ad110..fc42609e47 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-saved-messages.mdx @@ -11,12 +11,30 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/delete-saved-messages' --- +`deleteMessages()` is Commercial and batch-deletes explicitly selected messages from one conversation. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the messages. | +| `clientMsgIDs` | `string[]` | Yes | Message IDs; all IDs in one request must belong to this conversation. | +| `IsSync` | `boolean` | Yes | Whether to synchronize deletion to this account's other clients. The capital `I` is part of the field name. | + ```uts import { deleteMessages, off, onMsgDeleted } from '@/uni_modules/unix-openim-sdk' -const deletedSubscription = onMsgDeleted((message) => removeMessageByID(message.clientMsgID)) -await deleteMessages(deleteParams) -off(deletedSubscription) +const deletedSubscription = onMsgDeleted((message) => { + if (message == null) return + removeMessage(resolveConversationID(message), message.clientMsgID) +}) +await deleteMessages({ conversationID, clientMsgIDs: selectedMessageIDs, IsSync: true }) + +function removeMessageDeletedListener() { + off(deletedSubscription) +} ``` -`deleteMessages()` is Commercial and uses `OpenIMDeleteMessagesParams`; `onMsgDeleted` is public. Merge request/event idempotently and follow the deployed service's cross-device semantics. +`IsSync: false` removes current-device and current-account server records; `true` also requests synchronization to other clients. It does not remove copies belonging to other conversation members and does not create a revoked-message notice. + +Promise completion does not prove that every client received the event. Public `onMsgDeleted` belongs to this page and provides `OpenIMMessageItem | null`; resolve its conversation and remove by `clientMsgID` idempotently. Remove the listener on logout/account change and reconcile with history when necessary. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx index b808711d86..8d537dbd45 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/delete-user-messages.mdx @@ -11,6 +11,8 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/delete-user-messages' --- +`deleteUserAllMessagesInConv()` and `onDeleteUserAllMsgsInConv` are Commercial. The operation applies only to group conversations and deletes every message sent by the selected user in that conversation. Treat it as a high-impact moderation action, not a normal single-message menu item; OpenIMServer validates operator permission. + ```uts import { deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv } from '@/uni_modules/unix-openim-sdk' @@ -19,4 +21,6 @@ await deleteUserAllMessagesInConv({ conversationID, userID: targetUserID }) off(subscription) ``` -This Commercial range deletion requires authority and strong confirmation. Validate opaque JSON and refresh rather than depending on unfrozen fields. +Require strong confirmation. Promise completion does not mean the event has already arrived. The event payload is raw JSON in the uni-app / uni-app x contract, so parse it defensively and refresh the conversation instead of depending on unfrozen fields or logging the payload. + +This page owns `onDeleteUserAllMsgsInConv`. Remove its subscription when the component is destroyed, the user logs out, or the active account changes. Promise completion, event delivery, and a fresh history query are three independent stages. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx index ceb373cc63..76978ac3ac 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/get-pinned-messages.mdx @@ -15,6 +15,9 @@ sourcePath: '/sdk/uniapp/message/managing-messages/get-pinned-messages' import { getConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk' const result = await getConversationPinnedMsg({ conversationID }) +replacePinnedMessages(conversationID, result?.messages ?? []) ``` -This is Commercial. Follow returned pagination/list fields, deduplicate by `clientMsgID`, and reload after pin-change events. +This is Commercial. The Promise returns the conversation's current pinned-message snapshot. Follow the returned DTO's message-list and pagination fields, and see [Message overview](/sdk/uniapp/message/overview-message) for message fields. + +The query does not emit a pin-change event. Deduplicate by `clientMsgID`, merge deletion, revocation, and modification events into displayed message content, and reload the pinned snapshot after the raw event described in [Pin or unpin a message](/sdk/uniapp/message/managing-messages/set-message-pinned). diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx index 9abdd88ef5..331aa2c05c 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-group-message.mdx @@ -11,10 +11,18 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-group-message' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `message` | `OpenIMMessageItem` | Yes | Complete message to store locally. | +| `groupID` | `string` | Yes | Target group. | +| `sendID` | `string` | Yes | Sender user ID. | + ```uts import { insertGroupMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' -await insertGroupMessageToLocalStorage(insertParams) +await insertGroupMessageToLocalStorage({ message, groupID, sendID: currentUserID }) ``` -Use `OpenIMInsertGroupMessageParams` with group, sender, and message. This updates only local history and does not broadcast to group members. +The Promise only changes this device's local database. It does not broadcast to group members or emit a new-message event. Use it for migration or local notices, not to fake server delivery. Use a send API when you need delivery, offline push, or multi-device synchronization. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx index f11fbe6fc8..28b33c3396 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/insert-local-single-message.mdx @@ -11,10 +11,21 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/insert-local-single-message' --- +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `message` | `OpenIMMessageItem` | Yes | Complete message to store locally. | +| `recvID` | `string` | Yes | Single-chat receiver. | +| `sendID` | `string` | Yes | Sender user ID. | + ```uts -import { insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' +import { createTextMessage, insertSingleMessageToLocalStorage } from '@/uni_modules/unix-openim-sdk' -await insertSingleMessageToLocalStorage(insertParams) +const message = await createTextMessage('Local notice') +if (message != null) { + await insertSingleMessageToLocalStorage({ message, recvID: targetUserID, sendID: currentUserID }) +} ``` -Use a real `OpenIMInsertSingleMessageParams` with message, sender, and receiver. This inserts device-local history and sends nothing; prevent ID collisions and never fake remote delivery. +The Promise only writes this device's database. It sends nothing and emits no new-message event. Use the capability for migration or local notices, not to fake a sent message, and prevent message ID collisions. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx index 7a37f9761a..465bde57ae 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/modify-a-message.mdx @@ -11,13 +11,51 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/modify-a-message' --- +`modifyMessage()` is Commercial. Unlike deletion, which changes current-account visibility, and revocation, which creates a revoked state for conversation members, modification replaces content and synchronizes it to other clients. + +## Modify message content + +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `message` | `OpenIMMessageItem` | Yes | Complete edited message; preserve the original `clientMsgID`. | + ```uts import { modifyMessage, off, onMessageEdited, onMessageModified } from '@/uni_modules/unix-openim-sdk' const modified = onMessageModified(refreshModifiedMessage) const edited = onMessageEdited(refreshModifiedMessage) -const result = await modifyMessage(modifyParams) -off(modified); off(edited) +const result = await modifyMessage({ conversationID, message: buildEditedMessage(message, editedText) }) +if (result?.message != null) replaceMessage(result.message) + +function removeMessageModifiedListeners() { + off(modified) + off(edited) +} ``` -These are Commercial. Validate raw event JSON, refresh by stable message ID, redact message bodies from logs, and use the server's final version for multi-device conflicts. +This is not a partial patch. Copy the current message and change only the intended content, preserving its ID and other fields. The server enforces sender, time-window, and content-type rules. + +If the call fails, discard the optimistic edit instead of leaving content that exists only in local UI state. Redact message bodies from diagnostics and keep the previous server-confirmed object until the request succeeds. + +## Return result + +`result?.message` is the server-confirmed `OpenIMMessageItem | null`. Replace the matching local message, but do not assume every device has updated. + +Promise completion confirms the current request only. Other clients merge the incremental update later, and the event can race with the Promise on the initiating client. Use `clientMsgID` and the server-confirmed version rather than arrival order. + +## Listen for message modifications + +Commercial `onMessageModified` and `onMessageEdited` deliver raw JSON. A deployment may use either event. If both are registered, validate JSON and deduplicate by stable message ID/version. Do not log message bodies. Remove both subscriptions when the login scope ends, and use the server's final version to resolve multi-device edits. + +After validation, resolve the conversation from the message routing fields and replace the existing row by `clientMsgID`. If the raw payload does not expose a stable, contract-approved shape, re-query the message rather than casting it directly. + +## Related pages + +- [Delete saved messages](/sdk/uniapp/message/managing-messages/delete-saved-messages) +- [Revoke a message](/sdk/uniapp/message/managing-messages/revoke-a-message) +- [Find messages by ID](/sdk/uniapp/message/retrieving-messages/find-messages-by-id) +- [Send a message](/sdk/uniapp/message/sending-messages/send-message) +- [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx index 86c757b11e..87bda57c60 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/revoke-a-message.mdx @@ -11,12 +11,45 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/revoke-a-message' --- +Use `revokeMessage()` when other conversation members should see a revoked-message state. Normal deletion only changes current-account visibility. + +To edit sent content instead, see [Modify a message](/sdk/uniapp/message/managing-messages/modify-a-message). Do not substitute deletion for revocation because the recipient-visible semantics differ. + +## Revoke one message + ```uts import { off, onNewRecvMessageRevoked, revokeMessage } from '@/uni_modules/unix-openim-sdk' -const revokedSubscription = onNewRecvMessageRevoked(mergeRevokedInfo) +const revokedSubscription = onNewRecvMessageRevoked((info) => { + if (info != null) markMessageRevoked(info.clientMsgID, info) +}) await revokeMessage({ conversationID, clientMsgID }) -off(revokedSubscription) + +function removeRevokeListener() { + off(revokedSubscription) +} ``` -The server enforces sender, time, and permission rules. Keep a revoked placeholder instead of blindly removing the array entry; Promise and event order is not guaranteed. +After Promise success, the caller can mark the matching local message as revoked. Online clients receive `onNewRecvMessageRevoked` and should update the bubble rather than deleting the array entry. The server enforces sender, time-window, and message-type rules. + +If the call fails, do not leave a fabricated revoked placeholder. Promise success means only that the current request completed, not that every client interface has processed its event. + +## Return result + +`revokeMessage()` resolves to a string result, not a message object. Continue using the requested `clientMsgID` locally and reconcile other clients through the event. + +The event may arrive before the Promise resolves. Treat both paths as updates to the same stable message state instead of appending a second row. + +## Listen for revocation events + +This page owns `onNewRecvMessageRevoked`. Its value is `OpenIMMessageRevokedItem | null`; merge by `clientMsgID`. `isAdminRevoke` can select an administrator-specific notice. Event and Promise order is not guaranteed, so processing must be idempotent. Remove the listener on component disposal, logout, or account change. + +After a new login, revocation changes are synchronized through message events. Do not retain a subscription from the previous account or infer revocation completion from a history request callback. + +## Related pages + +- [Delete saved messages](/sdk/uniapp/message/managing-messages/delete-saved-messages) +- [Modify a message](/sdk/uniapp/message/managing-messages/modify-a-message) +- [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) +- [Send a message](/sdk/uniapp/message/sending-messages/send-message) +- [Find messages by ID](/sdk/uniapp/message/retrieving-messages/find-messages-by-id) diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx index 95eadb91f7..19a7487628 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-local-ex.mdx @@ -11,10 +11,20 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/set-message-local-ex' --- +`localEx` is stored only on this client. Use it for collapsed, selected, or local-source display state, not for data that must synchronize. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `clientMsgID` | `string` | Yes | Target message ID. | +| `localEx` | `string` | Yes | Complete replacement string. | + ```uts import { setMessageLocalEx } from '@/uni_modules/unix-openim-sdk' await setMessageLocalEx({ conversationID, clientMsgID, localEx: JSON.stringify(localState) }) ``` -`localEx` is device-local and replaced as one value. Merge/version JSON, constrain size, and store no tokens or irreplaceable business data. +The Promise means the local value was updated. The method does not merge old JSON and emits no shared message event. Merge and version data in the application when old fields must survive, constrain size, and store no tokens or irreplaceable business data. diff --git a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx index 5d27be806b..a96766bbee 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-messages/set-message-pinned.mdx @@ -11,12 +11,25 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-messages/set-message-pinned' --- +`setConversationPinnedMsg()` and `onChangedPinnedMsg` are Commercial. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation containing the message. | +| `clientMsgID` | `string` | Yes | Message to pin or unpin. | +| `pinned` | `boolean` | Yes | `true` to pin, `false` to unpin. | + ```uts import { off, onChangedPinnedMsg, setConversationPinnedMsg } from '@/uni_modules/unix-openim-sdk' const pinnedSubscription = onChangedPinnedMsg((payload) => refreshPinnedMessagesAfterValidJson(payload)) -await setConversationPinnedMsg(pinParams) -off(pinnedSubscription) +await setConversationPinnedMsg({ conversationID, clientMsgID: message.clientMsgID, pinned: true }) + +function removePinnedListener() { + off(pinnedSubscription) +} ``` -Both are Commercial. Validate the raw event and reload the pinned list instead of casting opaque JSON directly to a message. +The server enforces permission, message-type, and count limits. Promise success does not mean the event arrived. This page owns the raw JSON `onChangedPinnedMsg` event. Validate it, refresh the conversation's pinned set, and deduplicate by `clientMsgID` rather than casting opaque JSON directly to a message. Remove the subscription when the login scope ends. diff --git a/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx b/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx index 9a31393889..509f449073 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-read-status/get-group-message-readers.mdx @@ -11,10 +11,25 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/managing-read-status/get-group-message-readers' --- +`getGroupMessageReaderList()` is Commercial and paginates members who have or have not read a specific group message. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Group conversation ID. | +| `clientMsgID` | `string` | Yes | Message whose readers are queried. | +| `filter` | `number` | Yes | `0` for readers, `1` for unread members. | +| `offset` | `number` | Yes | Pagination offset; start with `0`. | +| `count` | `number` | Yes | Number of members to request. | + ```uts import { getGroupMessageReaderList } from '@/uni_modules/unix-openim-sdk' -const result = await getGroupMessageReaderList(readerParams) +const result = await getGroupMessageReaderList({ + conversationID, clientMsgID, filter: 0, offset: 0, count: 50, +}) +const readers = result?.readers ?? [] ``` -This Commercial operation uses `OpenIMGetGroupMessageReaderListParams`. Continue through returned pagination fields, deduplicate by `userID`, and refresh because new receipts can change the list. +`result?.readers` is the current page of `OpenIMGroupMemberItem[]`. Continue by increasing `offset` and deduplicate by `groupID:userID`. The query creates a snapshot and emits no receipt event; refresh the detail because later receipts can change it. diff --git a/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx b/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx index d6e3ac389a..7a19cc94d0 100644 --- a/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx +++ b/content/docs/chat/sdk/uniapp/message/managing-read-status/send-group-read-receipts.mdx @@ -14,9 +14,16 @@ sourcePath: '/sdk/uniapp/message/managing-read-status/send-group-read-receipts' ```uts import { off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt } from '@/uni_modules/unix-openim-sdk' -const receiptSubscription = onRecvGroupReadReceipt(refreshReadState) -await sendGroupMessageReadReceipt(receiptParams) -off(receiptSubscription) +const receiptSubscription = onRecvGroupReadReceipt((payload) => { + mergeValidatedGroupReadReceipt(payload) +}) +await sendGroupMessageReadReceipt({ conversationID, clientMsgIDs: visibleUnreadMessageIDs }) + +function removeGroupReadReceiptListener() { + off(receiptSubscription) +} ``` -Both are Commercial. Validate raw JSON and merge by message ID. Request completion, event arrival, and reader-list updates are separate stages. +Both APIs are Commercial. All message IDs in one request must belong to the target group conversation. Promise success means the server accepted the report; it does not update the conversation unread count, which remains the responsibility of `markConversationMessageAsRead()`. + +This page owns raw JSON event `onRecvGroupReadReceipt`. Validate JSON and merge counts/member data by `conversationID + clientMsgID`. Remove the subscription on logout or account change. Request completion, event delivery, and the snapshot returned by [Get group message readers](/sdk/uniapp/message/managing-read-status/get-group-message-readers) are independent phases. diff --git a/content/docs/chat/sdk/uniapp/message/overview-message.mdx b/content/docs/chat/sdk/uniapp/message/overview-message.mdx index 5566bb2b9d..2a1ad9b0b5 100644 --- a/content/docs/chat/sdk/uniapp/message/overview-message.mdx +++ b/content/docs/chat/sdk/uniapp/message/overview-message.mdx @@ -11,15 +11,102 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/overview-message' --- -Use `clientMsgID` as the stable client identifier and merge send results, realtime events, and history by `(conversationID,clientMsgID)`. Creation only builds an `OpenIMMessageItem`; `sendMessage()` performs delivery. +The uni-app / uni-app x plugin represents every message with `OpenIMMessageItem`. Sending has two phases: create an outgoing message object for the desired content, then send that object to a user or group. A create method does not send anything, and a successful send Promise does not prove that another client has received the message. + +Realtime delivery, history, search, and message management are all conversation-scoped. Merge send results, realtime events, and history idempotently with the composite key `conversationID:clientMsgID`: `conversationID` identifies the conversation and `clientMsgID` identifies the message. + +## Message processing flow + +| Phase | Main operation | Notes | +| --- | --- | --- | +| Create | Call the appropriate `create*Message()` method | Returns an `OpenIMMessageItem`; it does not write to the server or emit a new-message event. | +| Send | Call `sendMessage()` or `sendMessageNotOss()` | For a single chat, set `recvID`; for a group chat, set `groupID`. Pass an empty string for the unused target. | +| Receive | Subscribe to new-message events | Resolve the target conversation from the routing fields and merge by `clientMsgID`. | +| Query | Load history, search, or find messages by ID | Queries return a snapshot and do not emit new-message events. | +| Update | Delete, revoke, modify, pin, or report read status | Handle the Promise, related events, and any required reconciliation query separately. | + +Messages created from a readable native image, audio, video, or file path are uploaded by `sendMessage()`. If your application already uploaded the media and has a URL, use the corresponding `create*MessageByURL()` method and send it with `sendMessageNotOss()` to avoid uploading it again. + +## OpenIMMessageItem structure + +| Field | Type | Description | +| --- | --- | --- | +| `clientMsgID` | `string` or `null` | Stable client ID used for deduplication, state updates, lookup, and pagination cursors. | +| `serverMsgID` | `string` or `null` | Server message ID; an unsent or failed message may not have one. | +| `sessionType` | `OpenIMSessionType` | Conversation type. | +| `sendID`, `recvID`, `groupID` | `string` or `null` | Sender and single/group routing fields. | +| `contentType` | `OpenIMMessageType` | Content type that determines which elem field to read. | +| `createTime`, `sendTime` | `number` | Creation and send times. | +| `seq` | `number` | Server sequence number. | +| `senderPlatformID` | `OpenIMPlatform` | Sender platform. | +| `senderNickname`, `senderFaceUrl` | `string` or `null` | Sender profile snapshot. | +| `status` | `OpenIMMessageStatus` | Current send status. | +| `isRead` | `boolean` | Current read-state snapshot. | +| `offlinePush` | `OpenIMOfflinePush` or `null` | Offline-push settings used for the send. | +| `content`, `attachedInfo` | `string` or `null` | SDK-serialized content and attached information. | +| `ex` | `string` or `null` | Extension string synchronized with the message. | +| `localEx` | `string` or `null` | Extension string stored only on this device. | + +Read message bodies from the elem that matches `contentType`: `textElem` for text; `pictureElem`, `soundElem`, `videoElem`, and `fileElem` for media; `atTextElem` and `quoteElem` for mentions and replies; `mergeElem` and `customElem` for merged and custom messages; `cardElem`, `locationElem`, and `faceElem` for cards, locations, and emoji; and `advancedTextElem`, `typingElem`, and `notificationElem` for advanced text, typing, and notifications. Do not infer the message type from display text or array position. + +`conversationID` identifies the containing conversation but is not an `OpenIMMessageItem` field. Obtain it from the active conversation, query condition, search result, or event context, then merge state by `conversationID:clientMsgID`. + +## Create messages with different content types + +| Content | Page | Notes | +| --- | --- | --- | +| Text and Markdown | [Create a text message](/sdk/uniapp/message/creating-messages/create-text-message), [Create a Markdown message](/sdk/uniapp/message/creating-messages/create-markdown-message) | Render Markdown safely on the receiver. | +| Group mentions | [Create an @ message](/sdk/uniapp/message/creating-messages/create-text-at-message) | Can only be sent to a group. | +| Images, audio, video, and files | [Create an image from a full path](/sdk/uniapp/message/creating-messages/create-image-message-from-full-path), [Create an image from a URL](/sdk/uniapp/message/creating-messages/create-image-message-by-url) | Other media types use the same local-path or pre-uploaded URL flow. | +| Cards, locations, and emoji | [Create a card message](/sdk/uniapp/message/creating-messages/create-card-message), [Create a location message](/sdk/uniapp/message/creating-messages/create-location-message), [Create a face message](/sdk/uniapp/message/creating-messages/create-face-message) | Creation stores a content snapshot. | +| Replies, forwarding, and merging | [Create a quote message](/sdk/uniapp/message/creating-messages/create-quote-message), [Create a forwarded message](/sdk/uniapp/message/creating-messages/create-forward-message), [Create a merged message](/sdk/uniapp/message/creating-messages/create-merger-message) | The returned object still must be sent explicitly. | +| Custom business content | [Create a custom message](/sdk/uniapp/message/creating-messages/create-custom-message) | Receivers must validate the business schema. | + +Put device-only presentation state in `localEx`, not in business content that must synchronize to other users. See [Set a local message extension](/sdk/uniapp/message/managing-messages/set-message-local-ex). + +Progress events for message sends, file uploads, and log uploads belong to this page: ```uts -import { off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress } from '@/uni_modules/unix-openim-sdk' +import { + off, + onSendMessageProgress, + onUploadFileProgress, + onUploadLogsProgress, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' + +const sendProgressSubscription = onSendMessageProgress((event) => { + updateMessageProgress(event.clientMsgID, event.progress) +}) +const subscriptions : Array = [ + sendProgressSubscription, + onUploadFileProgress((event) => updateCurrentUpload(event.progress)), + onUploadLogsProgress((event) => updateLogUpload(event.progress)), +] -const send = onSendMessageProgress((event) => updateMessageProgress(event.clientMsgID, event.progress)) -const file = onUploadFileProgress((event) => updateCurrentUpload(event.progress)) -const logs = onUploadLogsProgress((event) => updateLogUpload(event.progress)) -off(send); off(file); off(logs) +function removeProgressListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -Progress can repeat or skip values; only final API completion defines success. Convert `unifile://` to a readable native path before local-file creation. +Progress may repeat, skip values, or arrive before or after the final Promise. Display it monotonically and use the API result as the source of truth. Call `removeProgressListeners()` when logging out, switching accounts, or disposing the progress state. + +A local media path must be readable by the native layer. Resolve `unifile://` to a real sandbox path; use the by-URL create method for network URLs. + +## Find a page by task + +| Task | Page | +| --- | --- | +| Send a normal or pre-uploaded media message | [Send a message](/sdk/uniapp/message/sending-messages/send-message), [Send pre-uploaded media](/sdk/uniapp/message/sending-messages/send-message-not-oss) | +| Receive online, offline, and online-only messages | [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) | +| Load history or surrounding context | [Load older messages](/sdk/uniapp/message/retrieving-messages/load-older-messages), [Load message context](/sdk/uniapp/message/retrieving-messages/load-message-context) | +| Find by ID or search local messages | [Find messages by ID](/sdk/uniapp/message/retrieving-messages/find-messages-by-id), [Search messages](/sdk/uniapp/message/searching-messages/search-messages) | +| Delete, revoke, modify, or pin | [Delete saved messages](/sdk/uniapp/message/managing-messages/delete-saved-messages), [Revoke a message](/sdk/uniapp/message/managing-messages/revoke-a-message), [Modify a message](/sdk/uniapp/message/managing-messages/modify-a-message), [Pin a message](/sdk/uniapp/message/managing-messages/set-message-pinned) | +| Group member-level read status | [Send group read receipts](/sdk/uniapp/message/managing-read-status/send-group-read-receipts), [Get group message readers](/sdk/uniapp/message/managing-read-status/get-group-message-readers) | +| Typing status or speech recognition | [Update typing status](/sdk/uniapp/message/composing-messages/update-typing-status), [Transcribe audio](/sdk/uniapp/message/composing-messages/transcribe-audio) | + +## State synchronization boundaries + +The complete listeners for new messages, deletion, revocation, modification, pinning, group read status, and typing status live on their task pages. Message creation and pure query methods only establish snapshots from their Promise result and do not emit shared message events. For mutations, treat Promise completion, event delivery, and reconciliation queries as separate phases. + +Conversation unread counts, total unread counts, and group mention reminders are conversation state. Maintain them with [Mark a conversation as read](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read), [Maintain the total unread count](/sdk/uniapp/conversation/managing-conversations/get-total-unread-count), and the events on [Retrieve the conversation list](/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list). diff --git a/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx index 901eb47efc..f988d87d86 100644 --- a/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/receiving-messages/receive-messages.mdx @@ -11,18 +11,123 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/receiving-messages/receive-messages' --- -Subscribe to single, batch, offline, and online-only delivery paths, then deduplicate by `(conversationID,clientMsgID)`. +Message views normally combine realtime messages, messages received while the app was in the background, online-only messages, and a history snapshot loaded when the conversation opens. Events provide increments; history APIs provide a `conversationID`-scoped snapshot. + +Different Core versions and recovery paths may deliver through single-message or batch events. Subscribe to all five paths for completeness, but deduplicate by `conversationID:clientMsgID`. Before a component is destroyed, the user logs out, or the account changes, call `off()` with every subscription handle. + +Register these handlers on the same login-scoped plugin session. Do not interpret an incoming event as the completion callback for a history or mark-as-read request; each flow has its own lifecycle. + +## Message types + +Choose rendering from `contentType` and the corresponding elem on `OpenIMMessageItem`: `textElem` for text, `atTextElem` for mentions, `customElem` for custom content, and the matching media elem for images, audio, video, and files. Show a safe fallback for unknown types instead of executing unvalidated `content`. + +```uts +function renderMessage(message : OpenIMMessageItem) { + if (message.textElem != null) return renderTextMessage(message) + if (message.atTextElem != null) return renderMentionMessage(message) + if (message.customElem != null) return renderCustomMessage(message) + if ( + message.pictureElem != null || + message.soundElem != null || + message.videoElem != null || + message.fileElem != null + ) { + return renderFileLikeMessage(message) + } + return renderUnsupportedMessage(message) +} +``` + +Events can contain messages for conversations that are not currently open. `OpenIMMessageItem` does not carry `conversationID`; derive or look up the conversation from `sessionType`, `sendID`, `recvID`, and `groupID`, then deduplicate by `clientMsgID`. ```uts -import { off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage } from '@/uni_modules/unix-openim-sdk' +function mergeMessage(message : OpenIMMessageItem) { + const targetConversationID = getConversationIDForMessage(message) + if (targetConversationID.length == 0) return + mergeMessageByClientMsgID(targetConversationID, message) +} +``` + +### Image, audio, video, and file messages + +The receiver does not upload these files again. Read and render the resource URL, size, filename, duration, or snapshot from the media elem. To send several files, applications normally send several file messages or one versioned custom message describing a group; each message still uses `clientMsgID` as its stable identifier. + +## Event handlers + +```uts +import { + off, + onRecvNewMessage, + onRecvNewMessages, + onRecvOfflineNewMessage, + onRecvOfflineNewMessages, + onRecvOnlineOnlyMessage, + type OpenIMMessageItem, + type OpenIMSDKEventSubscription, +} from '@/uni_modules/unix-openim-sdk' const subscriptions = [ - onRecvNewMessage(mergeMessage), onRecvOfflineNewMessage(mergeMessage), - onRecvOnlineOnlyMessage(mergeOnlineOnlyMessage), - onRecvNewMessages((result) => result.messages.forEach(mergeMessage)), - onRecvOfflineNewMessages((result) => result.messages.forEach(mergeMessage)), + onRecvNewMessage((message) => { + if (message != null) mergeMessage(message) + }), + onRecvOfflineNewMessage((message) => { + if (message != null) mergeMessage(message) + }), + onRecvOnlineOnlyMessage((message) => { + if (message != null) mergeOnlineOnlyMessage(message) + }), + onRecvNewMessages((result) => { + if (result != null) result.messages.forEach(mergeMessage) + }), + onRecvOfflineNewMessages((result) => { + if (result != null) result.messages.forEach(mergeMessage) + }), ] -subscriptions.forEach((subscription) => off(subscription)) + +function removeMessageListeners() { + subscriptions.forEach((subscription) => off(subscription)) +} ``` -Online-only messages may not exist in history. A single application message store should own these global listeners; history queries remain necessary for snapshots and recovery. +`onRecvNewMessages` and `onRecvOfflineNewMessages` return `OpenIMMessageListResult | null`; its `messages` field is the array. The three single-message handlers return `OpenIMMessageItem | null`. Single and batch paths may describe the same message, so never insert by event count. + +Unlike the Wasm recommendation to select one canonical batch path for a known deployment, the native plugin exposes compatibility paths that may vary with Core delivery and recovery behavior. The application store can subscribe to all of them only because it uses one shared idempotent merge function. + +Messages that arrive after `setAppBackgroundStatus(true)` normally use an offline path. Set the status back to `false` on foreground entry. Reuse one merge function for offline and realtime delivery, filter by conversation, deduplicate by `clientMsgID`, and preserve chronological order. + +An online-only message has `isOnlineOnly: true` on the send. It is not stored in local SDK history and cannot be recovered through a history API. Use it only for transient hints or business notifications, and do not treat it as a reliable chat record. + +Decide separately whether an online-only item belongs in the visible chat view. If it is rendered, keep it out of durable pagination and make the temporary behavior clear to users. + +This page owns all five receive events. Resolve the target conversation first and then merge by `conversationID:clientMsgID`. A single application message store should own these global listeners. Call `removeMessageListeners()` when that login-scoped store is disposed. + +Revocation arrives through `onNewRecvMessageRevoked`; see [Revoke a message](/sdk/uniapp/message/managing-messages/revoke-a-message). + +## Load history when opening a conversation + +Events only describe newly delivered messages. Load a history snapshot when a conversation first opens, when the user pages upward, or when restoring gaps after a disconnect. See [Load older messages](/sdk/uniapp/message/retrieving-messages/load-older-messages). History and events can contain the same message, so use the same deduplication key for both. + +Do not register this global listener set every time a chat page opens. The page should only query its conversation snapshot; a login-scoped store owns the events. After login changes, clear the previous account's state and establish a new event scope. + +A history query does not trigger any of the receive events. Because pagination and realtime delivery may overlap, the history merge must use exactly the same `conversationID:clientMsgID` key as the global event store. + +## Mark a group conversation as read + +After the user opens a group chat and sees its latest messages, clear the conversation unread count as described in [Mark a conversation as read](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read). This is separate from member-level group read receipts. Conversation events eventually synchronize the list and total badge. + +## Verify the receive flow + +- Send from another logged-in account and verify that the foreground message renders once. +- Set the app background state, send again, and verify offline merging before restoring foreground state. +- Send an online-only message and verify that it is absent from local history. +- Revoke a message and verify that the matching `clientMsgID` becomes revoked. +- Mark the conversation as read and verify the conversation and total unread counts. + +When testing single and batch delivery, assert that each `clientMsgID` appears once rather than requiring one particular callback. Also verify balanced foreground/background calls and that old subscriptions stop affecting state after logout. + +## Related pages + +- [Message overview](/sdk/uniapp/message/overview-message) +- [Send a message](/sdk/uniapp/message/sending-messages/send-message) +- [Load older messages](/sdk/uniapp/message/retrieving-messages/load-older-messages) +- [Mark a conversation as read](/sdk/uniapp/conversation/managing-conversations/mark-conversation-read) diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx index ff1146e465..5f7f639bae 100644 --- a/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/find-messages-by-id.mdx @@ -11,10 +11,27 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/retrieving-messages/find-messages-by-id' --- +Keep both `conversationID` and `clientMsgID` when a search result, quoted message, or notification navigates to a message, then use `findMessageList()` to retrieve the locally synchronized record. + +## Parameters + +`findMessageList()` accepts an array of query groups: + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `items[].conversationID` | `string` | Yes | Conversation that owns the requested messages. | +| `items[].clientMsgIDList` | `string[]` | Yes | Client message IDs to find in that conversation. | + ```uts import { findMessageList } from '@/uni_modules/unix-openim-sdk' -const result = await findMessageList([{ conversationID, clientMsgIDList: ['msg_a', 'msg_b'] }]) +const result = await findMessageList([ + { conversationID, clientMsgIDList: [clientMsgID] }, +]) + +const targetMessage = result?.findResultItems[0]?.messageList[0] ``` -Map `OpenIMFindMessageResult` by conversation and requested message IDs. Missing messages should not invalidate the complete batch. +The Promise resolves to `OpenIMFindMessageResult | null`, containing `totalCount` and `findResultItems`. Each result item includes the `conversationID`, `conversationType`, conversation display snapshot, `messageCount`, and `messageList`. + +One call can query several conversations. Do not assume response items preserve input order; match by the result `conversationID` and each message's `clientMsgID`. A result can be missing when local data has not synchronized, the message was deleted, or the ID does not exist. This query does not emit message events. To retrieve records around a hit, see [Load message context](/sdk/uniapp/message/retrieving-messages/load-message-context). diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx index 61aed9b02a..8725de59ee 100644 --- a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-message-context.mdx @@ -11,10 +11,29 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/retrieving-messages/load-message-context' --- +When navigating from a search result or quoted message into chat context, use the complete `OpenIMMessageItem` you already obtained as the anchor. `fetchSurroundingMessages()` is Commercial. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `startMessage` | `OpenIMMessageItem` | Yes | Complete anchor message. | +| `viewType` | `number` | Yes | Context direction defined by the server contract. | +| `before` | `number` | Yes | Maximum number of messages before the anchor. | +| `after` | `number` | Yes | Maximum number of messages after the anchor. | + ```uts import { fetchSurroundingMessages } from '@/uni_modules/unix-openim-sdk' -const result = await fetchSurroundingMessages({ startMessage: targetMessage, viewType: 0, before: 20, after: 20 }) +const result = await fetchSurroundingMessages({ + startMessage: targetMessage, + viewType: 0, + before: 20, + after: 20, +}) +const surroundingMessages = result?.messages ?? [] ``` -This is Commercial. Use a complete SDK message as the anchor, merge duplicates by `clientMsgID`, and preserve chronological ordering. +On success, `result?.messages` is the surrounding `OpenIMMessageItem[]`. The uni-app / uni-app x field is `messages`, not the Wasm `messageList` field. + +`before` and `after` limit each side of the anchor. The result can contain fewer messages near a boundary or after deletions. It can also overlap realtime events, so deduplicate by `conversationID:clientMsgID` and preserve chronological order. Do not construct a fake anchor containing only an ID; first use [Find messages by ID](/sdk/uniapp/message/retrieving-messages/find-messages-by-id) when necessary. diff --git a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx index 1bacfc3ebb..c1668321cc 100644 --- a/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/retrieving-messages/load-older-messages.mdx @@ -11,12 +11,40 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/retrieving-messages/load-older-messages' --- +Use public `getAdvancedHistoryMessageList()` to establish the first snapshot when a chat opens. To load older records, pass the current earliest message's `clientMsgID` as the next cursor. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` | Yes | Conversation whose history is being loaded. | +| `startClientMsgID` | `string` | Yes | Paging anchor; pass an empty string for the first page. | +| `count` | `number` | Yes | Number of messages to request. | +| `lastMinSeq` | `number` or `null` | No | Minimum sequence returned by the previous page. | + ```uts import { getAdvancedHistoryMessageList } from '@/uni_modules/unix-openim-sdk' -const page = await getAdvancedHistoryMessageList({ conversationID, startClientMsgID: '', count: 50 }) +const page = await getAdvancedHistoryMessageList({ + conversationID, + startClientMsgID: oldestMessage?.clientMsgID ?? '', + count: 30, + lastMinSeq, +}) ``` -Use an empty cursor for the first page and the earliest boundary message ID for the next. Deduplicate by `clientMsgID` and honor the returned end marker. +## Return result + +The Promise resolves to `OpenIMAdvancedHistoryMessageListResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `messageList` | `OpenIMMessageItem[]` | Messages in this page. | +| `lastMinSeq` | `number` | Minimum sequence to send with the next request. | +| `isEnd` | `boolean` | Whether the history boundary in this direction was reached. | +| `errCode` | `number` | History result status code. | +| `errMsg` | `string` | Description associated with the status code. | + +Merge `messageList` only when `errCode` reports success; handle a rejected Promise through the normal error path. Scope the list by `conversationID` and deduplicate by `clientMsgID`. History queries do not emit new-message events. -Commercial `getHistoryMessageList()` additionally supports `isReverse`, `viewType`, and `lastMinSeq`; direction is a parameter, not a separate reverse-history API. +Commercial `getHistoryMessageList()` Commercial additionally requires `isReverse` and supports optional `viewType` and `lastMinSeq`. Direction is a parameter, not a separate reverse-history API. diff --git a/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx b/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx index 2bf7383ab5..e20049eb32 100644 --- a/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx +++ b/content/docs/chat/sdk/uniapp/message/searching-messages/search-messages.mdx @@ -11,14 +11,125 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/searching-messages/search-messages' --- +`searchLocalMessages()` searches messages already synchronized into the current user's local database. For a group, pass the group's `conversationID`, not the `groupID` used when sending. If you only have the group ID, first obtain the conversation ID with [Get a conversation ID](/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id). + +Use a backend search service for cross-user audit, complete server-side history, complex permission filtering, or global ranking. It can return `conversationID` and `clientMsgID` so the client can locate each hit. + +## Create a search query + +`keywordList` accepts one or more terms. A normal search box represents one input, so trim it and reject empty values before calling the SDK. + ```uts -import { searchLocalMessages } from '@/uni_modules/unix-openim-sdk' +import { + OpenIMMessageTypeAtText, + OpenIMMessageTypeText, + searchLocalMessages, + type OpenIMMessageItem, + type OpenIMSearchMessageResult, +} from '@/uni_modules/unix-openim-sdk' const result = await searchLocalMessages({ - conversationID, keywordList: ['release'], keywordListMatchType: 0, - senderUserIDList: [], messageTypeList: [], searchTimePosition: 0, - searchTimePeriod: 0, pageIndex: 1, count: 50, + conversationID, + keywordList: [keyword.trim()], + keywordListMatchType: 0, + senderUserIDList: [], + messageTypeList: [OpenIMMessageTypeText, OpenIMMessageTypeAtText], + searchTimePosition: 0, + searchTimePeriod: 0, + pageIndex: 1, + count: 20, }) ``` -Use contract-defined matching and time semantics. Search covers locally synchronized/indexable data, not guaranteed full server history. Deduplicate by conversation and message ID. +## Advanced search + +Narrow the query by sender, content type, and time window. In `OpenIMSearchLocalMessagesParams`, every filter and paging field except `conversationID` is required. Use an empty array for an unrestricted list and the server-defined `0` values when time is unrestricted. + +```uts +const result = await searchLocalMessages({ + conversationID, + keywordList: ['release'], + keywordListMatchType: 0, + senderUserIDList: [senderUserID], + messageTypeList: [OpenIMMessageTypeText], + searchTimePosition, + searchTimePeriod, + pageIndex: 1, + count: 20, +}) +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `conversationID` | `string` or `null` | No | Conversation to search; omit it to search the current locally visible scope. | +| `keywordList` | `string[]` | Yes | Search terms. | +| `keywordListMatchType` | `number` | Yes | Multi-keyword matching mode defined by the SDK contract. | +| `senderUserIDList` | `string[]` | Yes | Restrict to these senders; use an empty array for no restriction. | +| `messageTypeList` | `OpenIMMessageType[]` | Yes | Restrict to these content types; use an empty array for no restriction. | +| `searchTimePosition` | `number` | Yes | End of the search window, as a Unix timestamp in seconds. | +| `searchTimePeriod` | `number` | Yes | Number of seconds to search backward from the end position. | +| `pageIndex` | `number` | Yes | Page number; the first page is `1`. | +| `count` | `number` | Yes | Number of results per page. | + +Add the appropriate `OpenIMMessageType` constants when the UI searches images, files, or custom messages. Matching modes, time units, and page numbering must follow the SDK and server contract. + +## Handle paginated results + +The Promise resolves to `OpenIMSearchMessageResult | null`: + +| Field | Type | Description | +| --- | --- | --- | +| `totalCount` | `number` | Total number of messages matching the query. | +| `searchResultItems` | `OpenIMSearchMessageResultItem[]` | Results grouped by conversation. | + +Each result item contains: + +| Field | Type | Description | +| --- | --- | --- | +| `conversationID` | `string` | Owning conversation. | +| `conversationType` | `OpenIMSessionType` | Conversation type. | +| `showName`, `faceURL` | `string` | Conversation display name and avatar snapshot. | +| `latestMsgSendTime` | `number` or `null` | Latest message time in this result group. | +| `messageCount` | `number` | Number of matching messages in the group. | +| `messageList` | `OpenIMMessageItem[]` | Matching messages. | + +Preserve both the conversation ID and message ID when flattening grouped results: + +```uts +type SearchMessageRow = { + conversationID : string + clientMsgID : string + message : OpenIMMessageItem +} + +function toSearchRows(result : OpenIMSearchMessageResult) : Array { + const rows : Array = [] + result.searchResultItems.forEach((item) => { + item.messageList.forEach((message) => { + const clientMsgID = message.clientMsgID + if (clientMsgID != null) { + rows.push({ conversationID: item.conversationID, clientMsgID, message }) + } + }) + }) + return rows +} +``` + +Keep all filters unchanged while incrementing `pageIndex`. When any condition changes, reset the page to `1` and clear old rows. Deduplicate by `conversationID:clientMsgID`; do not persist selection by array position. A search does not emit message events. + +## Handle changes to search results + +A hit can be revoked or deleted while the search page is open, and newly synchronized messages can change the result set. Use the shared handlers described in [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages), [Delete saved messages](/sdk/uniapp/message/managing-messages/delete-saved-messages), and [Revoke a message](/sdk/uniapp/message/managing-messages/revoke-a-message). This page owns querying and pagination, not duplicate event registrations. + +Navigate with the result's `conversationID` and `clientMsgID`. To display nearby chat records, use the complete hit as the start point for [Load message context](/sdk/uniapp/message/retrieving-messages/load-message-context), rather than assembling context with `findMessageList()`. + +Re-run the current page query when the UI needs a fresh snapshot. Search Promises, event increments, and reconciliation queries are independent. Clear previous-account search state after login changes. + +## Related pages + +- [Find messages by ID](/sdk/uniapp/message/retrieving-messages/find-messages-by-id) +- [Load older messages](/sdk/uniapp/message/retrieving-messages/load-older-messages) +- [Receive messages](/sdk/uniapp/message/receiving-messages/receive-messages) diff --git a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx index c125e770ff..643ff5ff0f 100644 --- a/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx +++ b/content/docs/chat/sdk/uniapp/message/sending-messages/send-message-not-oss.mdx @@ -11,10 +11,28 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/message/sending-messages/send-message-not-oss' --- +Use `sendMessageNotOss()` when an image, audio, video, or file was already uploaded by your business service and the message contains its URL. This avoids the SDK upload phase. + +## Parameters + +| Parameter | Type | Required | Description | +| --- | --- | --- | --- | +| `recvID` | `string` | Conditional | Receiver user ID for a single chat; otherwise pass an empty string. | +| `groupID` | `string` | Conditional | Group ID for a group chat; otherwise pass an empty string. | +| `message` | `OpenIMMessageItem` | Yes | Outgoing message returned by a by-URL create API with complete remote resource metadata. | +| `offlinePushInfo` | `OpenIMOfflinePush` or `null` | No | Offline-push title, description, and platform settings. | +| `isOnlineOnly` | `boolean` or `null` | No | Deliver only to online clients; such a message is not stored in local history. | + ```uts import { sendMessageNotOss } from '@/uni_modules/unix-openim-sdk' -const sent = await sendMessageNotOss({ message, recvID, groupID }) +const sentMessage = await sendMessageNotOss({ + recvID: receiverUserID, + groupID: '', + message: urlMessage, +}) ``` -Use this only when the message already contains complete remotely accessible media metadata. A local-path message sent through this route may be inaccessible to recipients; use normal `sendMessage()` for local uploads. +The URL, size, type, dimensions, and duration must come from the real upload result. The Promise resolves directly to the server-confirmed `OpenIMMessageItem`; merge it by `clientMsgID`. + +This method does not upload resources and must not receive a message that only contains a local file path, or recipients may be unable to access it. Send local-file messages with `sendMessage()`. diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx index 8dfcfba803..7306181217 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group.mdx @@ -13,8 +13,8 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/create-conver | `name` | `string` | 是 | 分组名称。提交前按产品规则校验空值和长度。 | | `order` | `number` | 是 | 分组排序值;排序方向应在业务中保持一致。 | | `conversationGroupType` | `OpenIMConversationGroupType` | 是 | 分组类型,使用插件合同允许的值。 | -| `conversationID` | `string \| null` | 否 | 创建时加入分组的初始会话 ID。 | -| `ex` | `string \| null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | +| `conversationID` | `string` 或 `null` | 否 | 创建时加入分组的初始会话 ID。 | +| `ex` | `string` 或 `null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | ```uts import { createConversationGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx index 832d58f9c5..d16c842ac8 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations.mdx @@ -29,8 +29,8 @@ Promise 成功直接返回 `OpenIMGetConversationGroupInfoWithConversationsResul | 字段 | 类型 | 说明 | | --- | --- | --- | -| `conversationGroup` | `OpenIMConversationGroupItem \| null` | 当前分组资料;为 `null` 时不要继续分页。 | -| `ConversationTotal` | `number \| null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | +| `conversationGroup` | `OpenIMConversationGroupItem` 或 `null` | 当前分组资料;为 `null` 时不要继续分页。 | +| `ConversationTotal` | `number` 或 `null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | | `conversations` | `OpenIMConversationItem[]` | 当前页会话。 | 分页期间成员可能变化。按 `conversationID` 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 `ConversationTotal`。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx index ad6e705144..aeeaf0027c 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups.mdx @@ -18,14 +18,14 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/overview-conv | 字段 | 类型 | 说明 | | --- | --- | --- | -| `conversationGroupID` | `string \| null` | 分组稳定标识;非空后才能作为缓存主键。 | -| `name` | `string \| null` | 分组名称。 | -| `order` | `number \| null` | 分组排序值。 | -| `ex` | `string \| null` | 业务扩展字符串,只按已约定格式解析。 | -| `conversationGroupType` | `number \| null` | 分组类型。 | -| `hidden` | `boolean \| null` | 当前分组是否隐藏。 | -| `unreadCount` | `number \| null` | 分组维度的未读数快照。 | -| `conversationIDs` | `string[] \| null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | +| `conversationGroupID` | `string` 或 `null` | 分组稳定标识;非空后才能作为缓存主键。 | +| `name` | `string` 或 `null` | 分组名称。 | +| `order` | `number` 或 `null` | 分组排序值。 | +| `ex` | `string` 或 `null` | 业务扩展字符串,只按已约定格式解析。 | +| `conversationGroupType` | `number` 或 `null` | 分组类型。 | +| `hidden` | `boolean` 或 `null` | 当前分组是否隐藏。 | +| `unreadCount` | `number` 或 `null` | 分组维度的未读数快照。 | +| `conversationIDs` | `string[]` 或 `null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | 读取非空 `conversationGroupID` 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。 diff --git a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx index ffc6b0438c..3ce4353023 100644 --- a/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group.mdx @@ -11,9 +11,9 @@ sourcePath: '/sdk/uniapp/conversation/managing-conversation-groups/update-conver | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | | `conversationGroupID` | `string` | 是 | 要更新的分组 ID。 | -| `name` | `string \| null` | 否 | 新分组名称。 | -| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | -| `hidden` | `boolean \| null` | 否 | 是否在业务界面隐藏该分组。 | +| `name` | `string` 或 `null` | 否 | 新分组名称。 | +| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 | +| `hidden` | `boolean` 或 `null` | 否 | 是否在业务界面隐藏该分组。 | ```uts import { updateConversationGroup } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx index 10703333a7..e51e392ac1 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk.mdx @@ -40,8 +40,8 @@ iOS 改用 `OpenIMPlatformIOS` 和 `systemType: 'ios'`;HarmonyOS 改用 `OpenI | `platformID` | `OpenIMPlatform` | 使用插件导出的平台常量。 | | `apiAddr` | `string` | OpenIMServer HTTP API 地址。 | | `wsAddr` | `string` | OpenIMServer WebSocket 地址。 | -| `dataDir` | `string \| null`(可选) | Core 数据目录;通常让插件使用平台默认值。 | -| `logFilePath` | `string \| null`(可选) | 日志目录或文件路径,按平台产物约定配置。 | +| `dataDir` | `string` 或 `null`(可选) | Core 数据目录;通常让插件使用平台默认值。 | +| `logFilePath` | `string` 或 `null`(可选) | 日志目录或文件路径,按平台产物约定配置。 | | `logLevel` | `OpenIMLogLevel` | 使用 `OpenIMLogLevelError`、`OpenIMLogLevelInfo` 等常量。 | | `isLogStandardOutput` | `boolean` | 是否把 SDK 日志输出到系统控制台。 | | `systemType` | `string` | 必填的系统说明,初始化示例不得省略。 | diff --git a/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx b/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx index 38c26ba8ee..8206f260c3 100644 --- a/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx +++ b/content/zh/docs/chat/sdk/uniapp/getting-started/update-token-and-observe-sdk-session.mdx @@ -22,7 +22,7 @@ const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot() | 字段 | 类型 | 说明 | | --- | --- | --- | | `loginStatus` | `OpenIMLoginStatus` | 当前登录状态。 | -| `userID` | `string \| null` | 当前 SDK 用户;未登录时为 `null`。 | +| `userID` | `string` 或 `null` | 当前 SDK 用户;未登录时为 `null`。 | | `sdkSessionEpoch` | `number` | session 世代。生命周期或账号成功变化后递增。 | | `sdkVersion` | `string` | 当前插件所连接 Core 的版本。 | diff --git a/content/zh/docs/chat/sdk/uniapp/logger.mdx b/content/zh/docs/chat/sdk/uniapp/logger.mdx index 2df53f50ff..76fe6f7bc3 100644 --- a/content/zh/docs/chat/sdk/uniapp/logger.mdx +++ b/content/zh/docs/chat/sdk/uniapp/logger.mdx @@ -63,7 +63,7 @@ await initSDK(config) | --- | --- | --- | --- | | `logLevel` | `OpenIMLogLevel` | 是 | 控制 Core 运行日志的详细程度。 | | `isLogStandardOutput` | `boolean` | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 | -| `logFilePath` | `string \| null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | +| `logFilePath` | `string` 或 `null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | `apiAddr`、`wsAddr`、平台和 `systemType` 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx index 3e31b4c0f5..cfccfe62cb 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant.mdx @@ -12,8 +12,8 @@ sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | -| `count` | `number \| null` | 否 | 本次请求的申请数量。 | +| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number` 或 `null` | 否 | 本次请求的申请数量。 | ```uts import { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx index 10ef2bf8b4..3ebe5dd5be 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient.mdx @@ -12,8 +12,8 @@ sourcePath: '/sdk/uniapp/user/friend-applications/get-friend-application-list-as | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `offset` | `number \| null` | 否 | 分页偏移量,首页传 `0`。 | -| `count` | `number \| null` | 否 | 本次请求的申请数量。 | +| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 | +| `count` | `number` 或 `null` | 否 | 本次请求的申请数量。 | ```uts import { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx index 251ec79e43..7f8de9113a 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/friends/update-friends.mdx @@ -11,9 +11,9 @@ sourcePath: '/sdk/uniapp/user/friends/update-friends' | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | | `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 | -| `remark` | `string \| null` | 否 | 新备注。 | -| `isPinned` | `boolean \| null` | 否 | 是否置顶好友。 | -| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | +| `remark` | `string` 或 `null` | 否 | 新备注。 | +| `isPinned` | `boolean` 或 `null` | 否 | 是否置顶好友。 | +| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 | ```uts import { updateFriends } from '@/uni_modules/unix-openim-sdk' diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 0ca61f7265..958672acc3 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -27,9 +27,9 @@ Promise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装 | `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | `nickname` | `string` | 账号级昵称。 | | `faceURL` | `string` | 账号级头像地址。 | -| `createTime` | `number \| null`(可选) | 用户记录创建时间。 | -| `globalRecvMsgOpt` 商业版字段 | `number \| null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 | -| `attachedInfo` 商业版字段 | `string \| null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 | +| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 | +| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 | +| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 | | `ex` | `string` | 由业务约定的账号级扩展字符串。 | 以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index 5542e7cd33..00a88f8257 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -36,10 +36,10 @@ Promise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是 | `userID` | `string` | OpenIMSDK 用户 ID。 | | `nickname` | `string` | 账号级公开昵称。 | | `faceURL` | `string` | 账号级公开头像地址。 | -| `createTime` | `number \| null`(可选) | 用户记录创建时间。 | +| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 | | `ex` | `string` | 账号级扩展字段,格式由业务约定。 | -| `attachedInfo` 商业版字段 | `string \| null`(可选) | 仅按已确认的商业业务协议解析。 | -| `globalRecvMsgOpt` 商业版字段 | `number \| null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | +| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 | +| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | `ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index 17bbf114f2..1a30c3c325 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -10,10 +10,10 @@ sourcePath: '/sdk/uniapp/user/profile/set-self-info' | 参数 | 类型 | 是否必填 | 说明 | | --- | --- | --- | --- | -| `nickname` | `string \| null` | 否 | 新昵称。 | -| `faceURL` | `string \| null` | 否 | 新头像地址。 | -| `ex` | `string \| null` | 否 | 新扩展字符串,会完整覆盖旧值。 | -| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt \| null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | +| `nickname` | `string` 或 `null` | 否 | 新昵称。 | +| `faceURL` | `string` 或 `null` | 否 | 新头像地址。 | +| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 | +| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 diff --git a/data/structure/uniapp-content-audit.json b/data/structure/uniapp-content-audit.json index 00dae4c815..871ffd582a 100644 --- a/data/structure/uniapp-content-audit.json +++ b/data/structure/uniapp-content-audit.json @@ -81,12 +81,14 @@ }, "en": { "reviewStatus": "published", - "reviewer": "Codex contract audit", + "reviewer": "Codex Wasm parity and Private contract audit", "reviewedAt": "2026-08-13", "exampleVerification": { - "status": "not-applicable", - "evidence": [], - "reason": "Concept or boundary page contains no executable code block." + "status": "verified", + "evidence": [ + "Wasm prerequisites were reviewed section by section and adapted to the native UTS plugin, device networking, custom-base/native build, and locked platform support matrix on 2026-08-13." + ], + "reason": null } } }, diff --git a/src/generated/navigation.json b/src/generated/navigation.json index 729b083541..da86a17896 100644 --- a/src/generated/navigation.json +++ b/src/generated/navigation.json @@ -8122,7 +8122,7 @@ { "id": "user/friends/get-friend-list-page", "segment": "get-friend-list-page", - "title": "List friends", + "title": "Get the friend list", "href": "/sdk/uniapp/user/friends/get-friend-list-page", "type": "page", "children": [], diff --git a/src/generated/routes.json b/src/generated/routes.json index 59f4de382d..be73fa55a7 100644 --- a/src/generated/routes.json +++ b/src/generated/routes.json @@ -9724,8 +9724,8 @@ "path": "/sdk/uniapp/user/friends/get-friend-list-page", "relativePath": "sdk/uniapp/user/friends/get-friend-list-page", "sourcePath": "/sdk/uniapp/user/friends/get-friend-list-page", - "title": "List friends", - "description": "Load friends by page or snapshot and process friend changes.", + "title": "Get the friend list", + "description": "Page through the current user’s friend list with the uni-app / uni-app x SDK.", "product": "sdk", "version": "v4", "platform": "uniapp", @@ -11633,7 +11633,7 @@ "relativePath": "sdk/uniapp/message/sending-messages/send-message", "sourcePath": "/sdk/uniapp/message/sending-messages/send-message", "title": "Send a message", - "description": "OpenIM uni-app / uni-app x SDK guide for Send a message.", + "description": "Send a pending message object with the uni-app / uni-app x SDK.", "product": "sdk", "version": "v4", "platform": "uniapp", diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index 62eede030c..f8335f9efb 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4229,7 +4229,7 @@ "description": "安装 UTS 插件,初始化唯一 OpenIM Core,并查询 SDK 版本和数据目录。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started install-initialize-and-inspect-sdk", - "content": "项目安装 uni modules/unix openim sdk 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。 初始化 import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' iOS 改用 OpenIMPlatformIOS 和 systemType: 'ios' ;HarmonyOS 改用 OpenIMPlatformHarmony 和 systemType: 'harmony' 。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 logFilePath 。 OpenIMInitConfig | 字段 | 类型 | 说明 | | | | | | platformID | OpenIMPlatform | 使用插件导出的平台常量。 | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string \\| null (可选) | Core 数据目录;通常让插件使用平台默认值。 | | logFilePath | string \\| null (可选) | 日志目录或文件路径,按平台产物约定配置。 | | logLevel | OpenIMLogLevel | 使用 OpenIMLogLevelError 、 OpenIMLogLevelInfo 等常量。 | | isLogStandardOutput | boolean | 是否把 SDK 日志输出到系统控制台。 | | systemType | string | 必填的系统说明,初始化示例不得省略。 | 同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。 查询版本与数据路径 getSdkVersion 和 getOpenIMDataPath 是同步本地操作: import getOpenIMDataPath, getSdkVersion, from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath 数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。 反初始化 import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK 返回 void 。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。 初始化完成后,进入 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。" + "content": "项目安装 uni modules/unix openim sdk 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。 初始化 import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' iOS 改用 OpenIMPlatformIOS 和 systemType: 'ios' ;HarmonyOS 改用 OpenIMPlatformHarmony 和 systemType: 'harmony' 。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 logFilePath 。 OpenIMInitConfig | 字段 | 类型 | 说明 | | | | | | platformID | OpenIMPlatform | 使用插件导出的平台常量。 | | apiAddr | string | OpenIMServer HTTP API 地址。 | | wsAddr | string | OpenIMServer WebSocket 地址。 | | dataDir | string 或 null (可选) | Core 数据目录;通常让插件使用平台默认值。 | | logFilePath | string 或 null (可选) | 日志目录或文件路径,按平台产物约定配置。 | | logLevel | OpenIMLogLevel | 使用 OpenIMLogLevelError 、 OpenIMLogLevelInfo 等常量。 | | isLogStandardOutput | boolean | 是否把 SDK 日志输出到系统控制台。 | | systemType | string | 必填的系统说明,初始化示例不得省略。 | 同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。 查询版本与数据路径 getSdkVersion 和 getOpenIMDataPath 是同步本地操作: import getOpenIMDataPath, getSdkVersion, from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath 数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。 反初始化 import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK 返回 void 。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。 初始化完成后,进入 认证与管理登录会话 /sdk/uniapp/getting started/authenticate and manage session 。" }, { "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", @@ -4245,7 +4245,7 @@ "description": "商业版更新登录 Token,并通过合成 session 快照防止账号与异步请求串线。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started update-token-and-observe-sdk-session", - "content": "本页能力属于 商业版 。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。 onSDKSessionChanged 是 unix openim sdk 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。 读取 session 快照 import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot, from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | 字段 | 类型 | 说明 | | | | | | loginStatus | OpenIMLoginStatus | 当前登录状态。 | | userID | string \\| null | 当前 SDK 用户;未登录时为 null 。 | | sdkSessionEpoch | number | session 世代。生命周期或账号成功变化后递增。 | | sdkVersion | string | 当前插件所连接 Core 的版本。 | 快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 userID 与 sdkSessionEpoch ,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。 订阅 session 变化 import off, onSDKSessionChanged, from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged snapshot = cancelRequestsFromOlderEpoch snapshot.sdkSessionEpoch replaceActiveSdkUser snapshot.userID // 应用或依赖插件销毁时执行。 off sessionSubscription 初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。 热更新 Token import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Token 由可信后端签发。 updateToken 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 platform unsupported ,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。 与其他插件协作 AV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 logout 或 unInitSDK 。用户切换时先销毁依赖插件,再退出并登录新账号。" + "content": "本页能力属于 商业版 。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。 onSDKSessionChanged 是 unix openim sdk 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。 读取 session 快照 import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot, from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | 字段 | 类型 | 说明 | | | | | | loginStatus | OpenIMLoginStatus | 当前登录状态。 | | userID | string 或 null | 当前 SDK 用户;未登录时为 null 。 | | sdkSessionEpoch | number | session 世代。生命周期或账号成功变化后递增。 | | sdkVersion | string | 当前插件所连接 Core 的版本。 | 快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 userID 与 sdkSessionEpoch ,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。 订阅 session 变化 import off, onSDKSessionChanged, from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged snapshot = cancelRequestsFromOlderEpoch snapshot.sdkSessionEpoch replaceActiveSdkUser snapshot.userID // 应用或依赖插件销毁时执行。 off sessionSubscription 初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。 热更新 Token import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Token 由可信后端签发。 updateToken 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 platform unsupported ,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。 与其他插件协作 AV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 logout 或 unInitSDK 。用户切换时先销毁依赖插件,再退出并登录新账号。" }, { "path": "/sdk/uniapp/user/overview-user", @@ -4261,7 +4261,7 @@ "description": "按 userID 批量查询应用用户的公开资料。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", - "content": "getUsersInfo 可以按 userID 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 查询公开资料 传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user Promise 成功后直接返回 OpenIMUserListResult | null ,其中 users 是查询到的 OpenIMUserInfo ; OpenIMPublicUserItem 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 页面常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | createTime | number \\| null (可选) | 用户记录创建时间。 | | ex | string | 账号级扩展字段,格式由业务约定。 | | attachedInfo 商业版字段 | string \\| null (可选) | 仅按已确认的商业业务协议解析。 | | globalRecvMsgOpt 商业版字段 | number \\| null (可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | ex 和 attachedInfo 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 setSelfInfo 更新。 调用结果与资料刷新 以返回的 users 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 userID ,去重后批量查询,再按 userID 合并结果。 SDK 没有面向任意公开用户资料的通用变更事件。 onSelfInfoUpdated 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 搜索添加好友 搜索并添加好友时,通常先由业务后端返回候选 userID ,再调用 getUsersInfo 展示公开资料。用户确认目标后,再进入好友申请流程。 async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? 如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 userID 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 按场景选择展示数据 | 场景 | 优先使用 | | | | | 应用用户搜索、陌生人资料卡 | OpenIMPublicUserItem / OpenIMUserInfo | | 好友列表、联系人页、好友备注 | OpenIMFriendUserItem | | 群成员列表、群内昵称、群角色 | OpenIMGroupMemberItem | 好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 、 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 和 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 下一步 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient" + "content": "getUsersInfo 可以按 userID 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 查询公开资料 传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user Promise 成功后直接返回 OpenIMUserListResult | null ,其中 users 是查询到的 OpenIMUserInfo ; OpenIMPublicUserItem 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 页面常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | ex | string | 账号级扩展字段,格式由业务约定。 | | attachedInfo 商业版字段 | string 或 null (可选) | 仅按已确认的商业业务协议解析。 | | globalRecvMsgOpt 商业版字段 | number 或 null (可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | ex 和 attachedInfo 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 setSelfInfo 更新。 调用结果与资料刷新 以返回的 users 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 userID ,去重后批量查询,再按 userID 合并结果。 SDK 没有面向任意公开用户资料的通用变更事件。 onSelfInfoUpdated 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 搜索添加好友 搜索并添加好友时,通常先由业务后端返回候选 userID ,再调用 getUsersInfo 展示公开资料。用户确认目标后,再进入好友申请流程。 async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? 如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 userID 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 按场景选择展示数据 | 场景 | 优先使用 | | | | | 应用用户搜索、陌生人资料卡 | OpenIMPublicUserItem / OpenIMUserInfo | | 好友列表、联系人页、好友备注 | OpenIMFriendUserItem | | 群成员列表、群内昵称、群角色 | OpenIMGroupMemberItem | 好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 、 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 和 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 下一步 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient" }, { "path": "/sdk/uniapp/user/profile/get-self-user-info", @@ -4269,7 +4269,7 @@ "description": "查询当前已登录用户的 OpenIM 资料快照。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", - "content": "完成初始化、登录并确认连接可用后,调用 getSelfUserInfo 查询当前账号资料: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL 返回结果 Promise 成功后直接返回 OpenIMUserInfo | null ,没有 data 包装。非空对象字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number \\| null (可选) | 用户记录创建时间。 | | globalRecvMsgOpt 商业版字段 | number \\| null (可选) | 当前账号的全局消息接收方式;常量和语义见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。 | | attachedInfo 商业版字段 | string \\| null (可选) | SDK 附加信息;只按已确认的业务约定解析。 | | ex | string | 由业务约定的账号级扩展字符串。 | 以返回的 userID 校验应用账号与 SDK 当前账号是否一致。 null 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 onSelfInfoUpdated 合并和重新查询方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。" + "content": "完成初始化、登录并确认连接可用后,调用 getSelfUserInfo 查询当前账号资料: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL 返回结果 Promise 成功后直接返回 OpenIMUserInfo | null ,没有 data 包装。非空对象字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | globalRecvMsgOpt 商业版字段 | number 或 null (可选) | 当前账号的全局消息接收方式;常量和语义见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。 | | attachedInfo 商业版字段 | string 或 null (可选) | SDK 附加信息;只按已确认的业务约定解析。 | | ex | string | 由业务约定的账号级扩展字符串。 | 以返回的 userID 校验应用账号与 SDK 当前账号是否一致。 null 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 onSelfInfoUpdated 合并和重新查询方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。" }, { "path": "/sdk/uniapp/user/profile/set-self-info", @@ -4277,7 +4277,7 @@ "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", - "content": "setSelfInfo 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 null 代替“保持不变”。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string \\| null | 否 | 新昵称。 | | faceURL | string \\| null | 否 | 新头像地址。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | | globalRecvMsgOpt 商业版字段 | OpenIMSetSelfInfoRecvMsgOpt \\| null | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 setSelfInfo 也承载账号级 globalRecvMsgOpt ,但不应与普通资料一起保存。消息接收策略见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission 。 Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 onSelfInfoUpdated 或重新调用 getSelfUserInfo 校准。 监听当前用户资料变化 本页是 onSelfInfoUpdated 的完整监听归属页。事件携带更新后的完整 OpenIMUserInfo ,应按 userID 替换当前用户快照: import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription 不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 releaseSelfInfoSubscription 。" + "content": "setSelfInfo 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 null 代替“保持不变”。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string 或 null | 否 | 新昵称。 | | faceURL | string 或 null | 否 | 新头像地址。 | | ex | string 或 null | 否 | 新扩展字符串,会完整覆盖旧值。 | | globalRecvMsgOpt 商业版字段 | OpenIMSetSelfInfoRecvMsgOpt 或 null | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 setSelfInfo 也承载账号级 globalRecvMsgOpt ,但不应与普通资料一起保存。消息接收策略见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission 。 Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 onSelfInfoUpdated 或重新调用 getSelfUserInfo 校准。 监听当前用户资料变化 本页是 onSelfInfoUpdated 的完整监听归属页。事件携带更新后的完整 OpenIMUserInfo ,应按 userID 替换当前用户快照: import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription 不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 releaseSelfInfoSubscription 。" }, { "path": "/sdk/uniapp/user/profile/set-global-message-reception", @@ -4357,7 +4357,7 @@ "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends update-friends", - "content": "updateFriends 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 | | remark | string \\| null | 否 | 新备注。 | | isPinned | boolean \\| null | 否 | 是否置顶好友。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: '项目成员', isPinned: true, friendUserIDs 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。 ex 是完整字符串,不会自动合并 JSON 字段。 Promise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 onFriendInfoChanged 按 userID 合并,完整监听见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page ;必要时重新查询校准。 商业版还提供 updateFriend 商业版 ,参数为单个 userID ,字段名使用 pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: '负责人' updateFriend 使用单个 userID ,并把置顶字段命名为 pinned ;其 remark 和 ex 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。" + "content": "updateFriends 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | friendUserIDs | string | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 | | remark | string 或 null | 否 | 新备注。 | | isPinned | boolean 或 null | 否 | 是否置顶好友。 | | ex | string 或 null | 否 | 新扩展字符串,会完整覆盖旧值。 | import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: '项目成员', isPinned: true, friendUserIDs 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。 ex 是完整字符串,不会自动合并 JSON 字段。 Promise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 onFriendInfoChanged 按 userID 合并,完整监听见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page ;必要时重新查询校准。 商业版还提供 updateFriend 商业版 ,参数为单个 userID ,字段名使用 pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: '负责人' updateFriend 使用单个 userID ,并把置顶字段命名为 pinned ;其 remark 和 ex 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。" }, { "path": "/sdk/uniapp/user/friends/delete-friend", @@ -4381,7 +4381,7 @@ "description": "分页查询当前用户收到的好友申请,并同步申请状态变化。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-recipient", - "content": "getFriendApplicationListAsRecipient 查询其他用户发给当前账号的好友申请。uni app / uni app x 的 OpenIMApplicationListParams 只提供分页字段,不包含 Wasm 版本的 handleResults 筛选;需要只展示待处理申请时,在返回后根据 handleResult 过滤。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsRecipient from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsRecipient offset: 0, count: 20, const applications = result?.applications ?? replaceReceivedApplications applications Promise 成功后直接返回 OpenIMFriendApplicationListResult | null ,其中 applications 是当前页 OpenIMFriendApplicationItem 。查询本身不会触发申请事件。 好友申请字段 | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称快照。 | | fromFaceURL | string | 申请发起人的头像快照。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称快照。 | | toFaceURL | string | 申请接收人的头像快照。 | | reqMsg | string | 申请附言。 | | handleResult | number | 当前处理结果: 0 待处理、 1 已同意、 1 已拒绝。 | | handlerUserID | string | 执行处理的用户 ID;未处理时可能为空。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间;未处理时不应当作有效时间展示。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | | attachedInfo | string | SDK 附加信息,只按已确认的业务约定解析。 | 申请记录使用 fromUserID:toUserID 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 userID 调用 getUsersInfo 。 同步好友申请变化 本页是 onFriendApplicationAdded 、 onFriendApplicationAccepted 、 onFriendApplicationRejected 和 onFriendApplicationDeleted 的完整监听归属页。推荐先注册事件,再查询快照: import off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const applicationSubscriptions : Array = onFriendApplicationAdded item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationAccepted item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationRejected item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationDeleted item = removeFriendApplication item.fromUserID, item.toUserID , function releaseFriendApplicationSubscriptions applicationSubscriptions.forEach subscription = off subscription applicationSubscriptions.length = 0 按当前用户是否为 toUserID ,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 归属的 onFriendAdded 合并。 收到申请后应调用接受或拒绝 API,不要只修改本地 handleResult 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 releaseFriendApplicationSubscriptions 。" + "content": "getFriendApplicationListAsRecipient 查询其他用户发给当前账号的好友申请。uni app / uni app x 的 OpenIMApplicationListParams 只提供分页字段,不包含 Wasm 版本的 handleResults 筛选;需要只展示待处理申请时,在返回后根据 handleResult 过滤。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number 或 null | 否 | 分页偏移量,首页传 0 。 | | count | number 或 null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsRecipient from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsRecipient offset: 0, count: 20, const applications = result?.applications ?? replaceReceivedApplications applications Promise 成功后直接返回 OpenIMFriendApplicationListResult | null ,其中 applications 是当前页 OpenIMFriendApplicationItem 。查询本身不会触发申请事件。 好友申请字段 | 字段 | 类型 | 说明 | | | | | | fromUserID | string | 申请发起人的用户 ID。 | | fromNickname | string | 申请发起人的昵称快照。 | | fromFaceURL | string | 申请发起人的头像快照。 | | toUserID | string | 申请接收人的用户 ID。 | | toNickname | string | 申请接收人的昵称快照。 | | toFaceURL | string | 申请接收人的头像快照。 | | reqMsg | string | 申请附言。 | | handleResult | number | 当前处理结果: 0 待处理、 1 已同意、 1 已拒绝。 | | handlerUserID | string | 执行处理的用户 ID;未处理时可能为空。 | | handleMsg | string | 处理时填写的说明。 | | handleTime | number | 处理时间;未处理时不应当作有效时间展示。 | | createTime | number | 申请记录创建时间。 | | ex | string | 申请记录扩展字符串。 | | attachedInfo | string | SDK 附加信息,只按已确认的业务约定解析。 | 申请记录使用 fromUserID:toUserID 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 userID 调用 getUsersInfo 。 同步好友申请变化 本页是 onFriendApplicationAdded 、 onFriendApplicationAccepted 、 onFriendApplicationRejected 和 onFriendApplicationDeleted 的完整监听归属页。推荐先注册事件,再查询快照: import off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const applicationSubscriptions : Array = onFriendApplicationAdded item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationAccepted item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationRejected item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationDeleted item = removeFriendApplication item.fromUserID, item.toUserID , function releaseFriendApplicationSubscriptions applicationSubscriptions.forEach subscription = off subscription applicationSubscriptions.length = 0 按当前用户是否为 toUserID ,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 归属的 onFriendAdded 合并。 收到申请后应调用接受或拒绝 API,不要只修改本地 handleResult 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 releaseFriendApplicationSubscriptions 。" }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", @@ -4389,7 +4389,7 @@ "description": "分页读取当前账号发出的好友申请。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-applicant", - "content": "getFriendApplicationListAsApplicant 查询当前账号发出的申请,返回 OpenIMFriendApplicationListResult | null 。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number \\| null | 否 | 分页偏移量,首页传 0 。 | | count | number \\| null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? Promise 成功后, applications 是当前页已发出的 OpenIMFriendApplicationItem ,字段含义见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。该查询本身不会触发申请事件。 分页结果可能在查询期间发生变化。事件按 fromUserID:toUserID 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。" + "content": "getFriendApplicationListAsApplicant 查询当前账号发出的申请,返回 OpenIMFriendApplicationListResult | null 。 参数说明 参数对象可以省略;显式分页时使用: | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number 或 null | 否 | 分页偏移量,首页传 0 。 | | count | number 或 null | 否 | 本次请求的申请数量。 | import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? Promise 成功后, applications 是当前页已发出的 OpenIMFriendApplicationItem ,字段含义见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。该查询本身不会触发申请事件。 分页结果可能在查询期间发生变化。事件按 fromUserID:toUserID 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。" }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", @@ -4645,7 +4645,7 @@ "description": "商业版会话分组模型、raw 事件解析和生命周期。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups overview-conversation-groups", - "content": "会话分组属于 商业版 ,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 分组类型 创建分组时使用 OpenIMConversationGroupType ,查询分组时使用 OpenIMConversationGroupQueryType 。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。 同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。 分组数据 OpenIMConversationGroupItem 的字段均可选: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string \\| null | 分组稳定标识;非空后才能作为缓存主键。 | | name | string \\| null | 分组名称。 | | order | number \\| null | 分组排序值。 | | ex | string \\| null | 业务扩展字符串,只按已约定格式解析。 | | conversationGroupType | number \\| null | 分组类型。 | | hidden | boolean \\| null | 当前分组是否隐藏。 | | unreadCount | number \\| null | 分组维度的未读数快照。 | | conversationIDs | string \\| null | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | 读取非空 conversationGroupID 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。 可用操作 | 需求 | 页面 | | | | | 创建分组并可选加入初始会话 | 创建会话分组 /sdk/uniapp/conversation/managing conversation groups/create conversation group | | 查询分组列表 | 查询会话分组 /sdk/uniapp/conversation/managing conversation groups/get conversation groups | | 查询分组资料、成员与总数 | 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations | | 查询一个会话所属的全部分组 | 查询会话所属分组 /sdk/uniapp/conversation/managing conversation groups/get conversation group by conversation id | | 加入或移出分组 | 把会话加入分组 /sdk/uniapp/conversation/managing conversation groups/add conversations to groups 、 把会话移出分组 /sdk/uniapp/conversation/managing conversation groups/remove conversations from groups | | 更新名称、扩展和隐藏状态 | 更新会话分组 /sdk/uniapp/conversation/managing conversation groups/update conversation group | | 调整分组顺序 | 设置会话分组顺序 /sdk/uniapp/conversation/managing conversation groups/set conversation group order | | 删除分组 | 删除会话分组 /sdk/uniapp/conversation/managing conversation groups/delete conversation group | 页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。 监听分组变化 五个分组事件返回 opaque JSON 字符串,不是类型化对象: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription onConversationGroupAdded 、 onConversationGroupChanged 和 onConversationGroupDeleted 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。 校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 ex 或其他字段可能包含业务数据。" + "content": "会话分组属于 商业版 ,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。 分组类型 创建分组时使用 OpenIMConversationGroupType ,查询分组时使用 OpenIMConversationGroupQueryType 。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。 同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。 分组数据 OpenIMConversationGroupItem 的字段均可选: | 字段 | 类型 | 说明 | | | | | | conversationGroupID | string 或 null | 分组稳定标识;非空后才能作为缓存主键。 | | name | string 或 null | 分组名称。 | | order | number 或 null | 分组排序值。 | | ex | string 或 null | 业务扩展字符串,只按已约定格式解析。 | | conversationGroupType | number 或 null | 分组类型。 | | hidden | boolean 或 null | 当前分组是否隐藏。 | | unreadCount | number 或 null | 分组维度的未读数快照。 | | conversationIDs | string 或 null | 当前返回携带的成员会话 ID;可能不是完整分页结果。 | 读取非空 conversationGroupID 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations 。 可用操作 | 需求 | 页面 | | | | | 创建分组并可选加入初始会话 | 创建会话分组 /sdk/uniapp/conversation/managing conversation groups/create conversation group | | 查询分组列表 | 查询会话分组 /sdk/uniapp/conversation/managing conversation groups/get conversation groups | | 查询分组资料、成员与总数 | 查询分组及会话 /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations | | 查询一个会话所属的全部分组 | 查询会话所属分组 /sdk/uniapp/conversation/managing conversation groups/get conversation group by conversation id | | 加入或移出分组 | 把会话加入分组 /sdk/uniapp/conversation/managing conversation groups/add conversations to groups 、 把会话移出分组 /sdk/uniapp/conversation/managing conversation groups/remove conversations from groups | | 更新名称、扩展和隐藏状态 | 更新会话分组 /sdk/uniapp/conversation/managing conversation groups/update conversation group | | 调整分组顺序 | 设置会话分组顺序 /sdk/uniapp/conversation/managing conversation groups/set conversation group order | | 删除分组 | 删除会话分组 /sdk/uniapp/conversation/managing conversation groups/delete conversation group | 页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。 监听分组变化 五个分组事件返回 opaque JSON 字符串,不是类型化对象: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription onConversationGroupAdded 、 onConversationGroupChanged 和 onConversationGroupDeleted 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。 校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 ex 或其他字段可能包含业务数据。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", @@ -4653,7 +4653,7 @@ "description": "商业版创建自定义会话分组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups create-conversation-group", - "content": "createConversationGroup 商业版 创建分组,并可把一个会话作为初始成员。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。提交前按产品规则校验空值和长度。 | | order | number | 是 | 分组排序值;排序方向应在业务中保持一致。 | | conversationGroupType | OpenIMConversationGroupType | 是 | 分组类型,使用插件合同允许的值。 | | conversationID | string \\| null | 否 | 创建时加入分组的初始会话 ID。 | | ex | string \\| null | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: '重要会话', order: 100, conversationGroupType: 0, conversationID: conversationID, ex: '', const group = result?.conversationGroup 返回结果 Promise 成功直接返回 OpenIMCreateConversationGroupResult | null 。非空结果的 conversationGroup 是新分组快照,也可能为 null ;先校验非空 conversationGroupID 再加入本地索引。 Promise 成功和 onConversationGroupAdded 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 conversationID ,成员关系也应以查询结果校准。" + "content": "createConversationGroup 商业版 创建分组,并可把一个会话作为初始成员。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | name | string | 是 | 分组名称。提交前按产品规则校验空值和长度。 | | order | number | 是 | 分组排序值;排序方向应在业务中保持一致。 | | conversationGroupType | OpenIMConversationGroupType | 是 | 分组类型,使用插件合同允许的值。 | | conversationID | string 或 null | 否 | 创建时加入分组的初始会话 ID。 | | ex | string 或 null | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 | import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: '重要会话', order: 100, conversationGroupType: 0, conversationID: conversationID, ex: '', const group = result?.conversationGroup 返回结果 Promise 成功直接返回 OpenIMCreateConversationGroupResult | null 。非空结果的 conversationGroup 是新分组快照,也可能为 null ;先校验非空 conversationGroupID 再加入本地索引。 Promise 成功和 onConversationGroupAdded 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 conversationID ,成员关系也应以查询结果校准。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", @@ -4669,7 +4669,7 @@ "description": "商业版分页读取一个会话分组及其成员会话。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-info-with-conversations", - "content": "getConversationGroupInfoWithConversations 商业版 返回分组资料、会话总数和一页会话。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码;本合同示例从 1 开始。 | | pagination.showNumber | number | 是 | 每页会话数量。 | import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , 返回结果 Promise 成功直接返回 OpenIMGetConversationGroupInfoWithConversationsResult | null : | 字段 | 类型 | 说明 | | | | | | conversationGroup | OpenIMConversationGroupItem \\| null | 当前分组资料;为 null 时不要继续分页。 | | ConversationTotal | number \\| null (可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | | conversations | OpenIMConversationItem | 当前页会话。 | 分页期间成员可能变化。按 conversationID 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 ConversationTotal 。" + "content": "getConversationGroupInfoWithConversations 商业版 返回分组资料、会话总数和一页会话。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要查询的会话分组 ID。 | | pagination.pageNumber | number | 是 | 页码;本合同示例从 1 开始。 | | pagination.showNumber | number | 是 | 每页会话数量。 | import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , 返回结果 Promise 成功直接返回 OpenIMGetConversationGroupInfoWithConversationsResult | null : | 字段 | 类型 | 说明 | | | | | | conversationGroup | OpenIMConversationGroupItem 或 null | 当前分组资料;为 null 时不要继续分页。 | | ConversationTotal | number 或 null (可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 | | conversations | OpenIMConversationItem | 当前页会话。 | 分页期间成员可能变化。按 conversationID 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 ConversationTotal 。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", @@ -4685,7 +4685,7 @@ "description": "商业版更新分组名称、扩展字段或隐藏状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups update-conversation-group", - "content": "updateConversationGroup 商业版 只更新提供的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的分组 ID。 | | name | string \\| null | 否 | 新分组名称。 | | ex | string \\| null | 否 | 新扩展字符串,会完整覆盖旧值。 | | hidden | boolean \\| null | 否 | 是否在业务界面隐藏该分组。 | import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: '重点跟进', hidden: false, 除 conversationGroupID 外,至少提供一个实际更新字段。 ex 是整段替换,多个模块共用时先读取并合并已有业务字段。 返回结果 Promise 成功直接返回 OpenIMUpdateConversationGroupResult | null ,其中 conversationGroup 是更新后的分组快照或 null 。只有非空且带有效 ID 时才立即合并;最终状态通过 onConversationGroupChanged 或重新查询校准。" + "content": "updateConversationGroup 商业版 只更新提供的字段。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | conversationGroupID | string | 是 | 要更新的分组 ID。 | | name | string 或 null | 否 | 新分组名称。 | | ex | string 或 null | 否 | 新扩展字符串,会完整覆盖旧值。 | | hidden | boolean 或 null | 否 | 是否在业务界面隐藏该分组。 | import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: '重点跟进', hidden: false, 除 conversationGroupID 外,至少提供一个实际更新字段。 ex 是整段替换,多个模块共用时先读取并合并已有业务字段。 返回结果 Promise 成功直接返回 OpenIMUpdateConversationGroupResult | null ,其中 conversationGroup 是更新后的分组快照或 null 。只有非空且带有效 ID 时才立即合并;最终状态通过 onConversationGroupChanged 或重新查询校准。" }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", @@ -5517,7 +5517,7 @@ "description": "配置 UTS 插件日志级别,使用 operationID 关联调用链路,并在用户同意后上传脱敏日志。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp logger", - "content": "unix openim sdk 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。 日志链路通常包含 OpenIMInitConfig 中的日志配置、单次调用可选的 operationID 、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。 日志级别 日志级别在 initSDK 时通过 OpenIMInitConfig.logLevel 配置。从最详细到最简略依次为: | 常量 | 数值 | 说明 | | | | | | OpenIMLogLevelVerbose | 6 | 最详细的运行跟踪,只用于短期深度诊断。 | | OpenIMLogLevelDebug | 5 | 开发与联调信息。 | | OpenIMLogLevelInfo | 4 | 常规运行信息。 | | OpenIMLogLevelWarn | 3 | 警告信息。 | | OpenIMLogLevelError | 2 | 错误信息。 | | OpenIMLogLevelFatal | 1 | 严重错误。 | | OpenIMLogLevelPanic | 0 | 最严重级别。 | 生产环境不建议长期使用 Verbose 或 Debug 。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。 日志级别建议 | 场景 | 建议配置 | 说明 | | | | | | 本地开发 | OpenIMLogLevelDebug , isLogStandardOutput: true | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 | | 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 | | 生产默认 | OpenIMLogLevelWarn 或 OpenIMLogLevelError ,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 | | 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 | 配置日志 日志选项属于 SDK 初始化配置,不是 login 参数。下面以 Android 为例: import OpenIMLogLevelDebug, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelDebug, isLogStandardOutput: true, systemType: 'android', await initSDK config 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | logLevel | OpenIMLogLevel | 是 | 控制 Core 运行日志的详细程度。 | | isLogStandardOutput | boolean | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 | | logFilePath | string \\| null | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | apiAddr 、 wsAddr 、平台和 systemType 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。 使用 operationID 定位一次调用 operationID 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。 import getConversationListSplit from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID try const result = await getConversationListSplit offset: 0, count: 50 , operationID, appLogger.info 'openim api success', operationID, action: 'get conversation page', count: result?.conversations.length ?? 0, catch error appLogger.error 'openim api failed', operationID, action: 'get conversation page', error: sanitizeOpenIMError error , throw error 每次调用使用新的 operationID ,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、 conversationID 或 clientMsgID 。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。 记录业务上下文 应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 conversationID 或 clientMsgID 。不要记录: 用户 Token、管理员 Token、secret 或商业业务凭据。 完整消息正文、原始自定义消息 payload、私人文件 URL。 不必要的用户资料、通讯录、群成员清单。 SDK 数据库内容和完整本机沙盒路径。 日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。 上传日志 uploadLogs 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。 import uploadLogs from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , , operationID, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 | | ex | string | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 | Promise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。 观察上传进度 onUploadLogsProgress 返回独立订阅句柄。进度事件的完整业务归属在 消息概览 /sdk/uniapp/message/overview message ;日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 off subscription 释放。 上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。 相关页面 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 用户认证 /sdk/uniapp/getting started/authenticate and manage session 发送第一条消息 /sdk/uniapp/getting started/send first message 发送消息 /sdk/uniapp/message/sending messages/send message" + "content": "unix openim sdk 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。 日志链路通常包含 OpenIMInitConfig 中的日志配置、单次调用可选的 operationID 、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。 日志级别 日志级别在 initSDK 时通过 OpenIMInitConfig.logLevel 配置。从最详细到最简略依次为: | 常量 | 数值 | 说明 | | | | | | OpenIMLogLevelVerbose | 6 | 最详细的运行跟踪,只用于短期深度诊断。 | | OpenIMLogLevelDebug | 5 | 开发与联调信息。 | | OpenIMLogLevelInfo | 4 | 常规运行信息。 | | OpenIMLogLevelWarn | 3 | 警告信息。 | | OpenIMLogLevelError | 2 | 错误信息。 | | OpenIMLogLevelFatal | 1 | 严重错误。 | | OpenIMLogLevelPanic | 0 | 最严重级别。 | 生产环境不建议长期使用 Verbose 或 Debug 。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。 日志级别建议 | 场景 | 建议配置 | 说明 | | | | | | 本地开发 | OpenIMLogLevelDebug , isLogStandardOutput: true | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 | | 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 | | 生产默认 | OpenIMLogLevelWarn 或 OpenIMLogLevelError ,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 | | 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 | 配置日志 日志选项属于 SDK 初始化配置,不是 login 参数。下面以 Android 为例: import OpenIMLogLevelDebug, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelDebug, isLogStandardOutput: true, systemType: 'android', await initSDK config 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | logLevel | OpenIMLogLevel | 是 | 控制 Core 运行日志的详细程度。 | | isLogStandardOutput | boolean | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 | | logFilePath | string 或 null | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 | apiAddr 、 wsAddr 、平台和 systemType 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。 使用 operationID 定位一次调用 operationID 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。 import getConversationListSplit from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID try const result = await getConversationListSplit offset: 0, count: 50 , operationID, appLogger.info 'openim api success', operationID, action: 'get conversation page', count: result?.conversations.length ?? 0, catch error appLogger.error 'openim api failed', operationID, action: 'get conversation page', error: sanitizeOpenIMError error , throw error 每次调用使用新的 operationID ,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、 conversationID 或 clientMsgID 。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。 记录业务上下文 应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 conversationID 或 clientMsgID 。不要记录: 用户 Token、管理员 Token、secret 或商业业务凭据。 完整消息正文、原始自定义消息 payload、私人文件 URL。 不必要的用户资料、通讯录、群成员清单。 SDK 数据库内容和完整本机沙盒路径。 日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。 上传日志 uploadLogs 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。 import uploadLogs from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , , operationID, 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | line | number | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 | | ex | string | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 | Promise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。 观察上传进度 onUploadLogsProgress 返回独立订阅句柄。进度事件的完整业务归属在 消息概览 /sdk/uniapp/message/overview message ;日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 off subscription 释放。 上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。 相关页面 安装、初始化与 SDK 信息 /sdk/uniapp/getting started/install initialize and inspect sdk 用户认证 /sdk/uniapp/getting started/authenticate and manage session 发送第一条消息 /sdk/uniapp/getting started/send first message 发送消息 /sdk/uniapp/message/sending messages/send message" }, { "path": "/sdk/wasm/overview", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 43bd5abc72..25c9441d83 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -4197,7 +4197,7 @@ "description": "Prepare OpenIMServer, a user token, the UTS plugin, and a native build environment.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started before-you-start", - "content": "Choose a uni app or uni app x App target and prepare an OpenIMServer, users, and native build environment compatible with unix openim sdk 0.2.0 rc.3 . Web, H5, and mini app targets cannot use this native UTS plugin. Prepare the service and account | Value | Source | Requirement | | | | | | apiAddr | OpenIMServer HTTP API | Complete address reachable from the device | | wsAddr | OpenIMServer WebSocket | Complete address that accepts a persistent connection | | userID | Your backend account mapping | Existing server user matching the token | | Token | Trusted application backend | Grants access only to the current user | Your backend must authenticate its own account before returning the mapped OpenIM user and token. Never place an administrator token or server secret in the App. Public clients connect to a public OpenIMServer deployment; signaling, session, and other commercial features require the corresponding commercial services. On physical devices, do not use the development computer's localhost . Verify network reachability, TLS certificates, reverse proxy rules, and WebSocket upgrades from the actual device. Prepare the plugin and toolchain Install the plugin at uni modules/unix openim sdk , use the HBuilderX/uni app 5.23 series, and prepare: Android: API 21+, a compatible JDK and Android SDK, declared AAR/Maven dependencies, and target ABIs. iOS: iOS 14+, compatible Xcode/CocoaPods, and correctly linked and embedded XCFrameworks. HarmonyOS: uni app x commercial edition only, API 24, with the HAR matching the plugin contract. The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory. Use exported platform constants instead of numeric literals: OpenIMPlatformAndroid , OpenIMPlatformIOS , or OpenIMPlatformHarmony . The required systemType is a descriptive string such as android , ios , or harmony . Release checklist Verify initialization, login, normal message send/receive, and logout on target devices. Test foreground/background transitions, network recovery, token invalidation, and forced logout. Scan Android for duplicate classes/JNI and ABIs; validate iOS signing, embedding, privacy manifests, and device linking. Test commercial signaling against commercial services, not a public server. Keep tokens, secrets, and full private message content out of logs, screenshots, and automation evidence. Continue with Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk ." + "content": "Before integrating unix openim sdk into a uni app / uni app x App, prepare an OpenIMServer reachable from the device, a trusted user authentication flow, the UTS plugin, and a native build environment for every target platform. These prerequisites apply to both authenticating and managing a session /sdk/uniapp/getting started/authenticate and manage session and sending your first message /sdk/uniapp/getting started/send first message . Web, H5, and Mini Program targets cannot use this native UTS plugin. Prepare OpenIMServer If you do not yet have an OpenIMServer deployment, follow the Docker deployment guide /docs/guides/quick deployment/docker . Then verify that the actual Android, iPhone, or HarmonyOS device can reach apiAddr and wsAddr . SDK initialization needs the following service addresses: | Field | Description | | | | | apiAddr | OpenIMServer HTTP API address used for sign in, synchronization, and resource requests. A production App should use a device reachable HTTPS address with a valid certificate. | | wsAddr | OpenIMServer WebSocket address used to establish the persistent connection and receive realtime events. A production App normally uses WSS. | Do not verify the services only from the server or development Mac. A physical device cannot use the development computer's localhost ; test LAN or public routing, TLS certificates, reverse proxy rules, and WebSocket upgrades from the actual device. A public client can connect to a public OpenIMServer. Signaling, session, translation, and other capabilities marked Commercial also require the matching commercial server capabilities. Do not use a public server's rejection to judge whether the commercial client API is implemented correctly. Prepare the user and token userID identifies an OpenIMSDK user, while the token authenticates that user. A trusted backend must create or bind OpenIMSDK users, issue tokens, and enforce application permissions. Never store an administrator token, secret, or other server credential in the App. Before integrating your backend with the OpenIMServer REST API, see Prepare to use the Platform API /platform api/prepare to use api and Issue a session token /platform api/user/managing session tokens/issue a session token . If your product already has an account system, maintain a stable mapping between each application account and its OpenIMSDK userID , and ensure that the returned token belongs to that user. We recommend exposing a session endpoint from your application backend so that the App receives only the minimum data required to sign in: type OpenIMSDKSession = userID : string token : string async function loadOpenIMSDKSession : Promise const response = await uni.request url: $ businessApiURL /openim/session , method: 'POST', if response.statusCode = 200 throw new Error 'Failed to load OpenIM SDK session' return parseTrustedSessionResponse response.data The application endpoint must authenticate the current application account before returning its OpenIMSDK sign in details. It must not accept an arbitrary userID from the client and issue a token for that user without verification. apiAddr and wsAddr are normally controlled App environment settings passed to initSDK , rather than values changed in every user session response. Prepare the UTS plugin and native runtime Install the plugin at uni modules/unix openim sdk , use the HBuilderX/uni app 5.23 series, and prepare the native environment for each target: | Host | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | Supported, API 21+ | Supported, iOS 14+ | Not currently declared supported | | uni app x | Supported, API 21+ | Supported, iOS 14+ | Commercial edition, API 24 | | Web / H5 / Mini Program | Not supported | Not supported | Not supported | Android needs a compatible JDK and Android SDK, the plugin's declared AAR/Maven dependencies, and the ABI used by each target device. iOS needs compatible Xcode/CocoaPods. The final App must link, embed, and sign the plugin XCFrameworks correctly. HarmonyOS support is declared only for uni app x with the commercial edition, the HAR matching the plugin contract, and an API 24 project. The standard base does not contain these native dependencies. Build a custom base or use the project's local Android/iOS native workflow. Do not mix public and commercial native artifacts in one plugin directory, and do not read or modify the SDK database or native cache directly. See Integrate by host and platform /sdk/uniapp/getting started/environment specific implementation for lifecycle, type, and file path differences. Choose the platform identity Pass an exported constant to initSDK .platformID instead of a numeric literal: OpenIMPlatformAndroid for Android, OpenIMPlatformIOS for iPhone, or OpenIMPlatformHarmony for HarmonyOS. Initialization also requires a matching descriptive systemType , such as android , ios , or harmony . The platform constant and systemType participate in server side multi device policy and native runtime diagnostics, so they must identify the runtime that is actually executing the SDK. Release checklist Before releasing, test the environments and networks your product actually supports: initSDK succeeds, login succeeds, and onConnectSuccess is received. Foreground/background transitions, network interruption and recovery, token invalidation, and forced logout follow the product state machine. Android contains the required ABIs and has no duplicate classes or JNI libraries. The iOS device package links, embeds, and signs successfully, with complete usage descriptions and privacy manifests. HarmonyOS uses the exact commercial HAR required by the contract and reports platform unsupported capabilities explicitly. Two different accounts can send and receive normal messages, query history, and keep state isolated after logout. Commercial APIs are tested against the corresponding commercial services. Logs, screenshots, and automation evidence contain no tokens, secrets, full private message content, or unnecessary local absolute paths. Continue the integration After preparing these prerequisites, complete installation, initialization, and SDK inspection /sdk/uniapp/getting started/install initialize and inspect sdk , then authenticate and manage the session /sdk/uniapp/getting started/authenticate and manage session . Once the connection succeeds, send your first message /sdk/uniapp/getting started/send first message to a prepared user or group and verify the complete messaging flow." }, { "path": "/sdk/uniapp/getting-started/environment-specific-implementation", @@ -4205,7 +4205,7 @@ "description": "Understand the runtime and build boundaries for uni-app, uni-app x, Android, iOS, and HarmonyOS.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started environment-specific-implementation", - "content": "unix openim sdk exposes the same business functions to uni app and uni app x. Differences are limited mainly to language types, page lifecycle, and native build integration. Always import from the same flat plugin root. | Host | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared | | uni app x | API 21+ | iOS 14+ | Commercial API 24 | | H5 / Web / mini apps | Not supported | Not supported | Not supported | uni app JavaScript does not provide UTS static type checking, but Promise values and subscription handle semantics are identical. Keep SDK lifetime in an application service rather than reinitializing it from pages. import getLoginStatus, off, onConnectSuccess from '@/uni modules/unix openim sdk' const connection = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus off connection uni app x Import public UTS types instead of copying interfaces that can drift: import getLoginStatus, type OpenIMLoginStatus from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus For commercial raw signaling JSON, validate the string and required fields before mapping an UTSJSONObject to your own domain type. Native platform boundaries Android and iOS support public and commercial interfaces, but the plugin must be included in a custom base or local native project. The host App declares permissions, notifications, and background capabilities; the SDK does not request camera, microphone, photo, or notification access for your product. File APIs require a readable absolute native path. Resolve unifile:// through a uni API first. Do not pass a network URL, transient URL, or virtual sandbox path directly to OpenIM Core. HarmonyOS is declared only for uni app x commercial edition. updateFcmToken , updateToken , translateText , and translateMessage return platform unsupported . Ten unavailable events return unsupported subscriptions and never synthesize success; see Event overview /sdk/uniapp/events/overview events . Initialize Core once per application. Pages own and release only their listeners. Account switching must finish old account logout and cleanup before the new login; call unInitSDK only during complete SDK teardown." + "content": "unix openim sdk exposes the same business functions to uni app and uni app x. The differences are primarily language typing, page lifecycle, file paths, and native build packaging. Every supported host imports from the same plugin root and shares the one OpenIM Core in the host process. Support matrix | Host | Android | iOS | HarmonyOS | | | | | | | uni app Vue 2 / Vue 3 | API 21+ | iOS 14+ | Not currently declared supported | | uni app x | API 21+ | iOS 14+ | Commercial edition, API 24 | | Web / H5 / Mini Program | Not supported | Not supported | Not supported | Use the HBuilderX/uni app 5.23 series. Availability of public and commercial capabilities also depends on the plugin version, native artifacts, and OpenIMServer deployment; the host name alone does not determine capability support. Use the shared plugin entry Both uni app and uni app x import from @/uni modules/unix openim sdk . Do not use a bare package name or import platform implementation directories directly. import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' Promises resolve directly to business values instead of data . Event registration returns an OpenIMSDKEventSubscription ; release it with off subscription . uni app Vue 2 / Vue 3 A traditional uni app page can call the plugin from either Vue 2 or Vue 3 lifecycle code. JavaScript does not provide the full static checks available in UTS, but Promise results and subscription handles have the same runtime semantics. Keep SDK initialization, login, and global listeners in an App level service so navigation does not repeatedly initialize Core. import getLoginStatus, off, onConnectSuccess, from '@/uni modules/unix openim sdk' const connectSubscription = onConnectSuccess = console.log 'OpenIM connected' const status = await getLoginStatus // Run when the application service that owns the listener is destroyed. off connectSubscription Destroying a Vue component releases only subscriptions owned by that component or service; it must not call unInitSDK . If several pages need one event, subscribe once in a store or application service and distribute application state to the pages. uni app x uni app x uses UTS types. Import initialization parameters, message objects, and event payload types from the public plugin contract instead of copying local interfaces that can drift from the SDK. import getLoginStatus, type OpenIMLoginStatus, from '@/uni modules/unix openim sdk' const status : OpenIMLoginStatus = await getLoginStatus Handle nullable UTS results explicitly. Do not bypass null in an exported result type with an unsafe cast. Commercial signaling events return raw JSON strings; validate the outer payload and known fields before converting a UTSJSONObject into an application domain object. App lifecycle Initialize SDK Core once in the App scope. Page entry and exit manage only subscriptions owned by that page. To switch accounts, log out the old account and release its subscriptions and state before logging in the new account. Call unInitSDK only when the App will no longer use OpenIM. Foreground/background, network, badge, and push state should be reported by one App lifecycle owner instead of several pages. See Handle App lifecycle and device state /sdk/uniapp/getting started/handle app lifecycle and device state . Android Android requires API 21 or newer. The build output must contain the plugin's Maven/AAR dependencies and every target ABI. The standard base does not contain these native artifacts, so use a custom base containing the plugin or a local native Android project. Before release, verify at least the following: Manifest permissions match the product's network, notification, and storage requirements. Each target ABI contains exactly one OpenIM Core native library. The release/R8 build has no duplicate classes, duplicate JNI libraries, or reflection stripping failures. A physical device can reach apiAddr and wsAddr , and background recovery follows Android system constraints. The SDK does not request photo library, camera, microphone, or notification permission for the application. Declare and explain permissions required by the IM features you actually use. AV Runtime media permissions belong to a separate plugin boundary. iOS iOS requires version 14 or newer. Link, embed, and sign the plugin XCFrameworks with compatible CocoaPods and Xcode versions. Before release, validate framework slices, embedding, signing, privacy manifests, usage descriptions, and the App Store build on a physical device. A simulator build does not prove that device arm64 links correctly. If the host installs other native plugins, scan for duplicate frameworks and module names. SDK logs and the database live in the application sandbox. Do not persist simulator absolute paths in business configuration, and do not move or modify the Core database directly. HarmonyOS HarmonyOS support is declared only for uni app x with the Commercial edition, API 24 or newer, and the HAR matching the plugin contract. The following operations return platform unsupported : updateFcmToken updateToken translateText translateMessage Ten unsupported events return unsupported subscriptions and never fabricate callbacks; see Events overview /sdk/uniapp/events/overview events . Platform unsupported is distinct from commercial authentication failure. Application logic should distinguish capability absence, login state, network failure, and server rejection by their stable errors. File paths Image, sound, video, and file message operations using local files require a full path readable by native Core. Convert unifile:// , picker temporary URLs, and virtual sandbox paths through uni APIs before passing them to the SDK. Do not pass an HTTP URL to a by file or full path message creation operation. Keep a temporary file alive until message creation and upload have completed. Android and iOS sandbox paths are different; do not persist an absolute path on one platform and reuse it on another. The host application requests and explains file, photo library, and media permissions. Each message creation page distinguishes URL based creation from creation using a native full path. Local builds and custom bases A native UTS plugin must participate in native compilation. During development, either build a custom base containing the plugin with HBuilderX 5.23, or use a project maintained Android/iOS native project for compilation, installation, and automated tests. The local workflow should lock HBuilderX, the DCloud native SDK, JDK/Android SDK, Xcode/CocoaPods, and plugin versions. This prevents a locally working build from later being packaged with a different dependency set. The standard base can run pages without this native plugin, but it cannot be used to judge the plugin's capabilities. Shared SDK service Use one App level SDK service to own initialization status, the current logged in user, global subscription handles, and teardown order. Pages call its business methods and observe application state instead of deciding whether Core should be initialized again. The service must preserve the plugin's actual Promise and error semantics. Do not wrap results into the Wasm data shape, swallow platform unsupported , or use offAll to remove listeners owned elsewhere. To switch accounts, stop writes for the old account, await logout , release its handles, clear account state, and then login the new account. Unsupported targets The plugin does not support Web, H5, or Mini Programs. It depends on native Android, iOS, or HarmonyOS Core, a local database, and native network lifecycle; conditional compilation cannot make the same import run in a browser. If the product also has H5 or Mini Program targets, select the corresponding Web/Wasm or Mini Program SDK in an application adapter and manage initialization, login, events, and storage separately. Do not allow two SDKs to compete for the same App side login state. Verification and troubleshooting Confirm on the target platform that initSDK succeeds and onConnectSuccess arrives after login . Verify that query APIs return business values directly and subscription handles remain valid for asynchronous cleanup through off . Test network recovery, foreground/background transitions, forced logout, token invalidation, and reauthentication on a physical device. Test file messages with real picker or photo library paths in a release build, not only with a fixed sandbox fixture. Connect commercial APIs to commercial services; verify that HarmonyOS reports unsupported capabilities explicitly. Scan final Android/iOS packages for duplicate native dependencies, signing issues, and ABI/framework slice problems. Common problems | Symptom | Likely cause | Resolution | | | | | | The standard base reports that the native plugin is unavailable | The base does not contain the plugin's native dependencies | Build a custom base or use the local native project. | | A simulator connects but a physical device cannot | The service URL uses localhost , or TLS/LAN routing is unavailable | Verify API/WSS addresses, certificates, and reverse proxy from the physical device. | | An event runs more than once | A page or onShow registered it again without releasing the old handle | Move registration to a stable service and call off subscription for every owned handle. | | File message creation fails | The input is unifile:// , a temporary URL, or a path Core cannot read | Convert it to a native readable full path and preserve the file lifetime. | | A HarmonyOS API always fails | The locked HAR does not expose that capability | Handle platform unsupported and disable the feature or use an alternative flow. | | iOS works in the simulator but device linking fails | Device slice, embedding, signing, or deployment target is wrong | Build for an iPhone and inspect the XCFramework slices and signing. | Next steps Before you start /sdk/uniapp/getting started/before you start Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk Authenticate and manage a session /sdk/uniapp/getting started/authenticate and manage session Handle App lifecycle and device state /sdk/uniapp/getting started/handle app lifecycle and device state" }, { "path": "/sdk/uniapp/getting-started/authenticate-and-manage-session", @@ -4213,7 +4213,7 @@ "description": "Log in, observe connection and token events, inspect login state, and log out safely.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started authenticate-and-manage-session", - "content": "After initSDK , register account and connection events before calling login userID, token . Login Promise completion does not imply that the persistent connection is ready; wait for onConnectSuccess before network dependent queries and sends. import off, onConnectFailed, onConnectSuccess, onConnecting, onKickedOffline, onUserTokenExpired, onUserTokenInvalid, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onConnectSuccess = console.log 'OpenIM connected' , onConnecting = console.log 'OpenIM connecting' , onConnectFailed error = console.error error.errCode, error.errMsg , onKickedOffline = clearCurrentAccount , onUserTokenExpired = requestFreshToken , onUserTokenInvalid error = console.error error.errCode, error.errMsg , function releaseSessionSubscriptions subscriptions.forEach subscription = off subscription subscriptions.length = 0 When onKickedOffline arrives, Core is already transitioning offline. Clear references to the old account and start reauthentication; do not race it with logout . import login from '@/uni modules/unix openim sdk' await login userID, token The required call shape is login userID, token , not an object parameter. Obtain a token matching userID from a trusted backend; the optional diagnostic argument is intentionally omitted from normal examples. import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID from '@/uni modules/unix openim sdk' const status = await getLoginStatus if status == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreAccountState currentUserID Login state and network connectivity are different: a briefly disconnected account may remain logged in. Report application lifecycle and network transitions once from an application service: import networkStatusChanged, setAppBackgroundStatus from '@/uni modules/unix openim sdk' await setAppBackgroundStatus true await setAppBackgroundStatus false await networkStatusChanged To sign out, wait for logout , release account scoped subscriptions, and clear state. Finish this sequence before logging in another account. import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount" + "content": "unix openim sdk uses login to establish the current user's session. Before authentication, complete the server, account, plugin, and native runtime preparation in Before you start /sdk/uniapp/getting started/before you start , then install and initialize the SDK /sdk/uniapp/getting started/install initialize and inspect sdk . Use this order for a complete sign in flow: 1. Initialize the one OpenIM Core in the App scope. 2. Subscribe to connection, token, and forced offline events before login so no transition is missed. 3. Obtain a matching userID and OpenIMSDK token from a trusted backend. 4. Call login userID, token , await the Promise, and then wait for onConnectSuccess before treating the connection as ready. 5. Query user, friend, conversation, group, and message data only after the connection is ready. 6. For active sign out or account switching, call logout , then release old account subscriptions and clear application state. Initialize the SDK After installing the plugin, call initSDK once from an application level service. See Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk for configuration fields, platform constants, the required systemType , version inspection, and uninitialization. unix openim sdk exports flat functions. Business code does not create an SDK instance, and separate pages must not initialize Core repeatedly with different service addresses. The OpenIMServer environment is set by initSDK ; the current user identity is established by login . Initialization boundary initSDK receives OpenIMInitConfig , including the platform ID, HTTP and WebSocket addresses, logging options, and required systemType . These are App/deployment settings rather than user fields. Account switching reuses the existing initialization and must not move those settings into an object passed to login . Understand the UTS plugin unix openim sdk is a native UTS plugin, not a JavaScript singleton factory. It owns one OpenIM Core internally, and both uni app and uni app x access it through flat exports from @/uni modules/unix openim sdk . Because the standard base does not contain its native dependencies, both development and release packages must be native builds that include the plugin. Load sign in details for the current user Call the application backend session endpoint to obtain the current user's userID and token: const session = await loadOpenIMSDKSession const userID = session.userID const token = session.token userID is only an OpenIMSDK user identifier; it is not a credential. The token must come from a trusted backend and belong to that userID . The App does not create users or issue tokens, and it must not store administrator tokens or server secrets. Register connection events before login Register connection events before calling login . This captures failures caused by networking, service addresses, tokens, or server state during the login flow and lets the UI represent each connection state. import off, onConnectFailed, onConnectSuccess, onConnecting, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sessionSubscriptions : Array = sessionSubscriptions.push onConnecting = setConnectionState 'connecting' sessionSubscriptions.push onConnectSuccess = setConnectionState 'connected' sessionSubscriptions.push onConnectFailed errCode, errMsg = setConnectionState 'failed' console.error 'OpenIM SDK connection failed', errCode, errMsg The onConnectFailed handler receives two arguments, errCode and errMsg , rather than one error object. Every on... call returns its own OpenIMSDKEventSubscription ; the return value is not a cancellation function and must not be invoked directly. Login the current user import login from '@/uni modules/unix openim sdk' try await login userID, token catch error console.error 'OpenIM SDK login failed', userID, error throw error Parameters | Parameter | Type | Required | Description | | | | | | | userID | string | Yes | Current OpenIMSDK user ID matching the token. It is not a nickname, phone number, or temporary session ID. | | token | string | Yes | OpenIMSDK token for the current user, returned by a trusted backend. Do not issue it in the client. | The login Promise succeeding means that the login request has completed. onConnectSuccess means that the SDK's persistent connection is ready. These are separate stages; do not call connection dependent message, conversation, group, or user APIs merely because the Promise resolved. If the user taps login more than once, reuse the in flight login request and Promise instead of starting concurrent login calls. Platform ID, HTTP address, and WebSocket address belong to initialization and are not repeated in an object style login call. Handle API results Asynchronous plugin APIs resolve directly to business values rather than the Wasm data response wrapper. A failure rejects the Promise with a plugin error. Log only redacted error codes, method names, and user identifiers needed to correlate the failure with native logs. import getSelfUserInfo from '@/uni modules/unix openim sdk' try const currentUser = await getSelfUserInfo if currentUser = null useCurrentUser currentUser catch error console.error 'getSelfUserInfo failed', error A query result establishes a snapshot at call time. If a mutation returns no business object that can refresh the UI, follow that API page's event or requery guidance. Promise success, event arrival, and snapshot reconciliation are three separate stages. Inspect the current login state getLoginStatus and getLoginUserID take no business parameters: import OpenIMLoginStatusLogged, getLoginStatus, getLoginUserID, from '@/uni modules/unix openim sdk' const loginStatus = await getLoginStatus if loginStatus == OpenIMLoginStatusLogged const currentUserID = await getLoginUserID restoreSessionFor currentUserID The login status constants are: | Status | Description | | | | | OpenIMLoginStatusLogout | Core is not logged in. | | OpenIMLoginStatusLogging | Login is in progress; do not start another login concurrently. | | OpenIMLoginStatusLogged | Core is logged in. Use connection events separately to determine current network readiness. | getLoginUserID returns the user ID currently logged into Core. It is useful for checking that the application account and SDK account match, but it does not replace application authentication. Neither query triggers a connection event. Do not overwrite the current session by logging in with another user. Await logout for the old account, clear old subscriptions and state, and then call login for the new account. Report App runtime state Report Android, iOS, and HarmonyOS foreground/background and network state once from App level lifecycle code. Pass true to setAppBackgroundStatus when entering the background and false when returning to the foreground. Call networkStatusChanged when network availability or type changes. import networkStatusChanged, setAppBackgroundStatus, from '@/uni modules/unix openim sdk' async function reportAppBackground await setAppBackgroundStatus true async function reportAppForeground await setAppBackgroundStatus false async function reportNetworkAvailable await networkStatusChanged These operations only report runtime changes. They do not establish a new session and cannot replace login or token refresh. Ordinary page entry and exit must not repeat these App level calls. See Handle App lifecycle and device state /sdk/uniapp/getting started/handle app lifecycle and device state for uni app / uni app x lifecycle wiring, badges, and FCM tokens. Handle the token lifecycle OpenIMSDK tokens are issued by a trusted backend. The public flow fetches a fresh token and reauthenticates when a token expires or becomes invalid. The commercial edition can also hot update the token with updateToken ; see Update the token and observe the SDK session /sdk/uniapp/getting started/update token and observe sdk session . import onUserTokenExpired, onUserTokenInvalid, from '@/uni modules/unix openim sdk' sessionSubscriptions.push onUserTokenExpired = requestFreshTokenAndRelogin sessionSubscriptions.push onUserTokenInvalid errCode, errMsg = console.warn 'OpenIM SDK token is invalid', errCode, errMsg redirectToSignIn Like onConnectFailed , onUserTokenInvalid receives errCode, errMsg . Use these values for diagnostics and user facing state only; never use them to bypass reauthentication, and never store the token in logs or event state. Token model The client passes the current user's OpenIMSDK token to login . Issuance, expiration, refresh, revocation, and multi device policies belong to the application backend and OpenIMServer configuration. Implement short lived or one time application sessions in the backend, then reauthenticate the App in response to token lifecycle events. Handle forced logout Subscribe to the forced offline event. It usually means that the same account signed in on another client or that server policy requires the current client to end its session. import onKickedOffline from '@/uni modules/unix openim sdk' sessionSubscriptions.push onKickedOffline = clearCurrentAccount showSignedInElsewhereDialog When onKickedOffline arrives, SDK Core is already transitioning offline. Do not race that transition with a concurrent logout . Clear the application's current user, conversation, message view, and page state, then offer reauthentication according to product policy. Logout actively Call logout when the user actively signs out or switches accounts, then clear the current user's conversation list, message views, unread state, and application state. Forced offline is not an active logout and does not run this sequence. import logout from '@/uni modules/unix openim sdk' await logout releaseSessionSubscriptions clearCurrentAccount Promise success means that the SDK session has logged out. When switching accounts, wait for old account logout, clear old state and subscriptions, register the new account's listeners, and only then call login . Do not run two accounts' login/logout flows concurrently. Disconnecting only WebSocket The plugin does not expose a public operation that disconnects WebSocket while preserving the login session. Report foreground/background and network changes through the App lifecycle APIs. Use logout when the user session must end. Release session listeners This page is the complete owner for connection, token, and forced offline listeners. On logout, account switch, or destruction of the application service that owns them, pass every handle to off subscription : function releaseSessionSubscriptions sessionSubscriptions.forEach subscription = off subscription sessionSubscriptions.length = 0 Connection events have no business entity merge key. Isolate their state by the current Core and logged in user. Business pages establish snapshots through queries and then merge incremental state through each domain's event owner. Next steps Before you start /sdk/uniapp/getting started/before you start Send your first message /sdk/uniapp/getting started/send first message Events overview /sdk/uniapp/events/overview events Logger /sdk/uniapp/logger" }, { "path": "/sdk/uniapp/getting-started/send-first-message", @@ -4221,7 +4221,7 @@ "description": "Create and send a text message in a uni-app or uni-app x App.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started send-first-message", - "content": "Use this flow to verify installation, initialization, login, and messaging. Production applications should keep SDK lifetime in an application service. Register onConnectSuccess before login and release its handle when the application scope ends: import off, onConnectSuccess from '@/uni modules/unix openim sdk' const connection = onConnectSuccess = markOpenIMReady off connection For a direct message, set recvID and leave groupID empty. For a group message, leave recvID empty and set a group ID joined by the current user. import createTextMessage, sendMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage = await sendMessage message, recvID: 'user b', groupID: '', appendOutgoingMessage sentMessage createTextMessage creates a local message object; it does not send. sendMessage resolves directly to the final OpenIMMessageItem , without a data wrapper. Merge outgoing state by clientMsgID , and deduplicate incoming events by the same identifier. For a group: const sentGroupMessage = await sendMessage message, recvID: '', groupID: 'group 123', Verify with two accounts on independent clients: the sender receives a non empty clientMsgID , the receiver obtains the new message event, both clients can reload the message from history, and no old account state changes after logout." + "content": "This page shows how to install and initialize unix openim sdk in a uni app / uni app x App, sign in, and send the first text message. Before you begin, complete the server, user, token, plugin, and native build preparation in Before you start /sdk/uniapp/getting started/before you start . An OpenIMSDK message can target a user or a group. A one to one message uses the recipient's recvID ; a group message uses the destination groupID . Prepare a message target For a one to one test, prepare an existing recipient user. For a group test, prepare an existing groupID in which the current user is allowed to speak. A group message does not include a recipient user ID and does not target one individual member. | Scenario | Required target identifier | | | | | One to one conversation | An existing recipient user ID passed as recvID , while groupID is an empty string. | | Group conversation | An existing group ID passed as groupID , while recvID is an empty string. | Verify the target The first message normally verifies the complete path between the client, OpenIMServer, and another client. Before sending it, confirm that: The one to one recipient exists and server policy permits the current user to send to that recipient. The destination groupID exists, the current user has joined it, and group state or mute policy does not prohibit sending. Two independent test clients use different users; do not use same account UI behavior as proof that another user received the message. Get started Follow these steps to send the first text message. Step 1: Install the UTS plugin Install unix openim sdk at uni modules/unix openim sdk . Because the plugin has native dependencies, the standard base cannot load it. Build a custom base containing the plugin or use the project's local Android/iOS native build workflow. Business pages import functions and types from the flat plugin root: import createTextMessage, sendMessage, from '@/uni modules/unix openim sdk' Do not create an SDK instance or import an Android, iOS, or HarmonyOS implementation directory directly. Step 2: Initialize OpenIM SDK Call initSDK once in the App scope. This example uses Android; iOS and HarmonyOS use their own platform constant and systemType . import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' apiAddr and wsAddr must be reachable from the actual device, and systemType is required. See Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk for all fields, iOS/HarmonyOS constants, version queries, and uninitialization. Step 3: Connect to OpenIMServer Use the application endpoint prepared in Before you start /sdk/uniapp/getting started/before you start to load the current user's userID and token. Register connection and token events before login as described in Authenticate and manage a session /sdk/uniapp/getting started/authenticate and manage session . This page keeps only the main first message flow and does not redefine those complete listeners. import login from '@/uni modules/unix openim sdk' const session = await loadOpenIMSDKSession await login session.userID, session.token The login Promise succeeding means that the sign in request completed. Wait for onConnectSuccess , owned by the authentication page, before calling message APIs that depend on the connection. uni app / uni app x uses two positional arguments; it does not accept the Wasm object style login parameters. Step 4: Select the message target A one to one conversation needs only the recipient user ID. Put an existing, verified user ID in recvID : const recvID = 'user b' const groupID = '' A group conversation uses only the OpenIMSDK group ID. Reuse a groupID already known to the application, or create a test group through an admin console, the application backend, or group APIs and keep the returned ID: const recvID = '' const groupID = 'group 123' A group can have initial members, but sending the group message does not include an individual recipient user ID. Step 5: Create and send the message Sending an OpenIMSDK text message has two steps: create a local OpenIMMessageItem , then send it to the user or group with sendMessage . import createTextMessage, sendMessage, type OpenIMMessageItem, from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' const sentMessage : OpenIMMessageItem = await sendMessage recvID, groupID, message, appendOutgoingMessage sentMessage createTextMessage returns an unsent message object. It does not send a message or trigger a new message event. sendMessage returns the sent OpenIMMessageItem directly; there is no Wasm data wrapper. The sender should replace its pending item with sentMessage by clientMsgID . Another logged in client receives the message through a new message event. See Receive messages /sdk/uniapp/message/receiving messages/receive messages for complete listeners, batch and single callbacks, cleanup, and conversation routing; this page does not register those events again. Verify the result Use two users on two independent clients and verify each stage: 1. Client A's sendMessage succeeds and returns a non empty clientMsgID . 2. Client A merges the returned item by clientMsgID rather than appending a duplicate. 3. Client B receives the new message event and can read the same business content. 4. Both clients can later query the message from history. Promise success and remote event delivery are separate stages and must be verified independently. When troubleshooting, record redacted error codes, the current user ID, target user or group ID, and clientMsgID so they can be correlated with OpenIMServer logs. Do not record tokens or full private message content. Next steps Before you start /sdk/uniapp/getting started/before you start Authenticate and manage a session /sdk/uniapp/getting started/authenticate and manage session Integrate by host and platform /sdk/uniapp/getting started/environment specific implementation Send messages /sdk/uniapp/message/sending messages/send message Receive messages /sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk", @@ -4229,7 +4229,7 @@ "description": "Install the UTS plugin, initialize the only OpenIM Core, and inspect version and data paths.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started install-initialize-and-inspect-sdk", - "content": "After installing uni modules/unix openim sdk , initialize it once from an application service. The plugin exports flat functions; do not construct a second SDK instance. import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' Use OpenIMPlatformIOS with systemType: 'ios' , or OpenIMPlatformHarmony with systemType: 'harmony' . Reduce console logging in production and configure logFilePath according to your compliance policy. | OpenIMInitConfig field | Type | Description | | | | | | platformID | OpenIMPlatform | One of the exported platform constants. | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string \\| null optional | Core data directory; normally use the platform default. | | logFilePath | string \\| null optional | Log path following the platform artifact contract. | | logLevel | OpenIMLogLevel | For example OpenIMLogLevelError or OpenIMLogLevelInfo . | | isLogStandardOutput | boolean | Whether SDK logs are emitted to the system console. | | systemType | string | Required system description; never omit it. | Do not initialize concurrent environments in one process. Sign out, clear application state, and uninitialize before changing service addresses. getSdkVersion and getOpenIMDataPath are synchronous local operations: import getOpenIMDataPath, getSdkVersion from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath Use the data path only for diagnostics and storage policy. Never edit the SDK database or publish full sandbox paths in logs. import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK returns void . Stop new requests, sign out, and release subscriptions first. Page unload, App backgrounding, and AV Runtime disposal must not uninitialize the IM SDK." + "content": "After installing uni modules/unix openim sdk , initialize it once from an application service. The plugin exports flat functions; do not construct a second SDK instance. import OpenIMLogLevelInfo, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelInfo, isLogStandardOutput: true, systemType: 'android', const initialized = await initSDK config if initialized throw new Error 'OpenIM SDK initialization was not accepted' Use OpenIMPlatformIOS with systemType: 'ios' , or OpenIMPlatformHarmony with systemType: 'harmony' . Reduce console logging in production and configure logFilePath according to your compliance policy. | OpenIMInitConfig field | Type | Description | | | | | | platformID | OpenIMPlatform | One of the exported platform constants. | | apiAddr | string | OpenIMServer HTTP API address. | | wsAddr | string | OpenIMServer WebSocket address. | | dataDir | string or null optional | Core data directory; normally use the platform default. | | logFilePath | string or null optional | Log path following the platform artifact contract. | | logLevel | OpenIMLogLevel | For example OpenIMLogLevelError or OpenIMLogLevelInfo . | | isLogStandardOutput | boolean | Whether SDK logs are emitted to the system console. | | systemType | string | Required system description; never omit it. | Do not initialize concurrent environments in one process. Sign out, clear application state, and uninitialize before changing service addresses. getSdkVersion and getOpenIMDataPath are synchronous local operations: import getOpenIMDataPath, getSdkVersion from '@/uni modules/unix openim sdk' const version = getSdkVersion const dataPath = getOpenIMDataPath Use the data path only for diagnostics and storage policy. Never edit the SDK database or publish full sandbox paths in logs. import unInitSDK from '@/uni modules/unix openim sdk' unInitSDK unInitSDK returns void . Stop new requests, sign out, and release subscriptions first. Page unload, App backgrounding, and AV Runtime disposal must not uninitialize the IM SDK." }, { "path": "/sdk/uniapp/getting-started/handle-app-lifecycle-and-device-state", @@ -4245,7 +4245,7 @@ "description": "Commercially update a login token and use synthetic session snapshots to prevent cross-account work.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp getting-started update-token-and-observe-sdk-session", - "content": "This is a Commercial capability for hosts that share one OpenIM Core with dependent plugins such as AV Runtime. onSDKSessionChanged is synthesized by unix openim sdk ; it is not a native OpenIM Core listener. import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | Field | Type | Description | | | | | | loginStatus | OpenIMLoginStatus | Current login state. | | userID | string \\| null | Current SDK user, or null when logged out. | | sdkSessionEpoch | number | Session generation, incremented after successful lifecycle or account changes. | | sdkVersion | string | Version of the connected Core. | The snapshot never contains an IM token, API address, or WebSocket address. Pin userID and sdkSessionEpoch before asynchronous work and compare another snapshot before committing the result. import off, onSDKSessionChanged from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged next = cancelRequestsFromOlderEpoch next.sdkSessionEpoch replaceActiveSdkUser next.userID off sessionSubscription Initialization, login, logout, uninitialization, forced logout, token invalidation/expiry, and user changes can advance the epoch. Handlers must be idempotent and must not log tokens or trigger competing logins. import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Obtain the token from a trusted backend. updateToken is available on Android and iOS; HarmonyOS returns platform unsupported . Continue to use session and connection events after the Promise resolves. Dependent plugins should compare snapshots before and after initialization, cancel only their own work during disposal, and never call IM logout or unInitSDK . Dispose dependent plugins before switching users." + "content": "This is a Commercial capability for hosts that share one OpenIM Core with dependent plugins such as AV Runtime. onSDKSessionChanged is synthesized by unix openim sdk ; it is not a native OpenIM Core listener. import getSDKSessionSnapshot, type OpenIMSDKSessionSnapshot from '@/uni modules/unix openim sdk' const snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot | Field | Type | Description | | | | | | loginStatus | OpenIMLoginStatus | Current login state. | | userID | string or null | Current SDK user, or null when logged out. | | sdkSessionEpoch | number | Session generation, incremented after successful lifecycle or account changes. | | sdkVersion | string | Version of the connected Core. | The snapshot never contains an IM token, API address, or WebSocket address. Pin userID and sdkSessionEpoch before asynchronous work and compare another snapshot before committing the result. import off, onSDKSessionChanged from '@/uni modules/unix openim sdk' const sessionSubscription = onSDKSessionChanged next = cancelRequestsFromOlderEpoch next.sdkSessionEpoch replaceActiveSdkUser next.userID off sessionSubscription Initialization, login, logout, uninitialization, forced logout, token invalidation/expiry, and user changes can advance the epoch. Handlers must be idempotent and must not log tokens or trigger competing logins. import updateToken from '@/uni modules/unix openim sdk' await updateToken token: freshToken Obtain the token from a trusted backend. updateToken is available on Android and iOS; HarmonyOS returns platform unsupported . Continue to use session and connection events after the Promise resolves. Dependent plugins should compare snapshots before and after initialization, cancel only their own work during disposal, and never call IM logout or unInitSDK . Dispose dependent plugins before switching users." }, { "path": "/sdk/uniapp/user/overview-user", @@ -4253,7 +4253,7 @@ "description": "Understand user profiles, presence, friendships, friend requests, and the blacklist.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user overview-user", - "content": "The user domain covers the current profile, public profiles, presence, friendships, friend requests, and blacklist entries. Use stable userID values as keys; nicknames and avatars can change. OpenIMUserInfo includes public userID , nickname , faceURL , ex , and optional createTime . attachedInfo and globalRecvMsgOpt are Commercial extensions and must remain optional. Friend data uses OpenIMFriendUserItem , blacklist data uses OpenIMBlackUserItem , and requests use OpenIMFriendApplicationItem . Register events before loading a snapshot, then merge both sources idempotently by userID . Reload snapshots after reconnection, login, or process restoration; events alone are not a complete database. Read your profile /sdk/uniapp/user/profile/get self user info Subscribe to presence /sdk/uniapp/user/online status/subscribe users status List friends /sdk/uniapp/user/friends/get friend list page Read received friend requests /sdk/uniapp/user/friend applications/get friend application list as recipient Read the blacklist /sdk/uniapp/user/blacklist/get black list Your application backend remains authoritative for identity and authorization. Chat profiles must not replace account authentication." + "content": "unix openim sdk identifies users by userID . When implementing profile cards, friend requests, contacts, or blacklists, distinguish an application's public user profile from the current user's friendship, friend application, and blacklist state. Group member lists, in group nicknames, group roles, and member management belong to the group domain. See List group members /sdk/uniapp/group/retrieving group members/get group member list . Use userID as the cross platform stable key; nicknames and avatars can change. User types The SDK returns different user objects for different scenarios: | Type | Use case | Primary APIs | | | | | | OpenIMUserInfo | Current user's profile, settings page, avatar, and nickname | getSelfUserInfo , setSelfInfo | | OpenIMPublicUserItem | User lookup, friend candidates, and profiles for users who are not friends; public alias of OpenIMUserInfo | getUsersInfo | | OpenIMFriendUserItem | Friend list, remarks, pinning, and relationship extension data | getFriendListPage , getSpecifiedFriendsInfo | | OpenIMBlackUserItem | Users on the current account's blacklist | getBlackList , addBlack , removeBlack | | OpenIMFriendApplicationItem | Sent or received friend applications and their processing state | Friend application query, accept, reject, and delete APIs | | OpenIMUserStatusItem | Aggregated online state and online platforms | subscribeUsersStatus , getUserStatus | The same userID can appear in public, friend, blacklist, and group member data. Prefer OpenIMFriendUserItem for contacts, OpenIMPublicUserItem for a stranger's profile card, and OpenIMGroupMemberItem in group member lists. Conversation list and chat page titles come from conversation data and should use OpenIMConversationItem.showName . Public OpenIMUserInfo fields include userID , nickname , faceURL , ex , and optional createTime . attachedInfo and globalRecvMsgOpt are Commercial fields ; check for absence and do not assume that a public server returns them. Feature pages | Task | Recommended page | | | | | Query public profiles by userID for friend candidates or profile cards | Get user profiles /sdk/uniapp/user/profile/get users info | | Page through, search, or query friendships by ID | Get the friend list /sdk/uniapp/user/friends/get friend list page | | Send or process friend applications | Send a friend application /sdk/uniapp/user/friend applications/add friend , Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient | | Update friend information | Update friend information /sdk/uniapp/user/friends/update friends | | Delete a friendship | Delete a friend /sdk/uniapp/user/friends/delete friend | | View and maintain the blacklist | Get the blacklist /sdk/uniapp/user/blacklist/get black list | | Read or update the current user's nickname, avatar, and extension data | Update your profile /sdk/uniapp/user/profile/set self info | | Set account level message reception | Set global message reception /sdk/uniapp/user/profile/set global message reception | | Understand the current contract boundary for friend add permission | Set friend request permissions /sdk/uniapp/user/profile/set friend add permission | | Subscribe to and read online status | Subscribe to online status /sdk/uniapp/user/online status/subscribe users status | | List, search, or retrieve selected group member profiles | List group members /sdk/uniapp/group/retrieving group members/get group member list | The application backend remains authoritative for account identity, verified identity, organization relationships, and business authorization. SDK profile fields are for chat presentation and cannot replace application login or authorization. State updates Query the relevant snapshot when a page opens, then merge incremental events: Current user profile changes: Update your profile /sdk/uniapp/user/profile/set self info . Friend application changes: Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient . Friendship and friend profile changes: Get the friend list /sdk/uniapp/user/friends/get friend list page . Blacklist changes: Get the blacklist /sdk/uniapp/user/blacklist/get black list . Online status changes: Subscribe to online status /sdk/uniapp/user/online status/subscribe users status . Merge all these lists idempotently by userID . Events are not a complete database recovery mechanism; requery the snapshots needed by the current UI after reconnect, re login, account switch, or process restoration." }, { "path": "/sdk/uniapp/user/profile/get-users-info", @@ -4261,7 +4261,7 @@ "description": "Read public profiles for a list of user IDs.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", - "content": "getUsersInfo resolves to OpenIMUserListResult | null . import getUsersInfo from '@/uni modules/unix openim sdk' const result = await getUsersInfo 'user a', 'user b' const users = result?.users ?? users.forEach user = cacheUser user.userID, user Results can be shorter than the request and are not ordered like the input. Map by userID and retain placeholders for missing or inaccessible users. Treat commercial attachedInfo and globalRecvMsgOpt as optional, and never trust ex or attachedInfo as identity credentials. Batch and cache large lookups." + "content": "Use getUsersInfo to query application users' public profiles by userID . It is suitable for friend candidates, stranger profile cards, and message sender profiles. If the product searches by nickname, phone number, organization, email, or another application field, let a trusted backend perform the search and permission check first, then pass the returned userID values to getUsersInfo . Administrator tokens and user directory administration must remain on that backend. Query public profiles Pass an array of OpenIMSDK user IDs. Deduplicate them and limit each batch; do not issue one request per row while a long list scrolls. import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user The Promise resolves directly to OpenIMUserListResult or null . Its users field contains the matched OpenIMUserInfo ; OpenIMPublicUserItem is the public profile alias for that shape. The result can be shorter than the request and does not have to preserve input order. Build a map by userID and retain placeholder state for users that do not exist, are inaccessible, or were not returned. Common fields are: | Field | Type | Description | | | | | | userID | string | OpenIMSDK user ID. | | nickname | string | Account level public nickname. | | faceURL | string | Account level public avatar URL. | | createTime | number or null optional | Time when the user record was created. | | ex | string | Account level extension string whose format is defined by the application. | | attachedInfo Commercial field | string or null optional | Parse only according to a confirmed commercial business contract. | | globalRecvMsgOpt Commercial field | number or null optional | Account level message reception option. A stranger profile card normally does not need to display it. | Neither ex nor attachedInfo is a trusted identity, authorization, or authentication credential. This query is also read only for other accounts. Update only the signed in user's profile with setSelfInfo . Results and profile refresh Use the returned users to update the current public profile snapshot. Query again when opening a profile card, refreshing manually, reconnecting, or receiving a profile change notification from the application backend. When a page displays several users, collect the visible userID values, deduplicate them, query one batch, and merge by userID . The SDK has no general change event for arbitrary users' public profiles. onSelfInfoUpdated carries only the signed in user's profile and must not be written into another user's public profile cache. See Update your profile /sdk/uniapp/user/profile/set self info for current account profile updates and reconciliation. Search for users to add as friends The application backend normally returns candidate userID values first. The App then calls getUsersInfo for public presentation and continues to the friend application flow after the user selects a target. async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? If the product supports only exact user ID lookup, validate that input and pass it directly. For fuzzy search or sensitive fields, the backend must enforce authorization, rate limits, redaction, and auditing. Choose display data by context | Context | Preferred type | | | | | Application search or a stranger's profile card | OpenIMPublicUserItem / OpenIMUserInfo | | Friend list, contacts, or friend remarks | OpenIMFriendUserItem | | Group member list, in group nickname, or group role | OpenIMGroupMemberItem | Friend remarks and in group nicknames belong to friendship and group member data. See Get the friend list /sdk/uniapp/user/friends/get friend list page , Get specified friend information /sdk/uniapp/user/friends/get specified friends info , and List group members /sdk/uniapp/group/retrieving group members/get group member list . Next steps Get the friend list /sdk/uniapp/user/friends/get friend list page Get specified friend information /sdk/uniapp/user/friends/get specified friends info Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient" }, { "path": "/sdk/uniapp/user/profile/get-self-user-info", @@ -4269,7 +4269,7 @@ "description": "Read the OpenIM profile of the logged-in user.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", - "content": "getSelfUserInfo resolves to OpenIMUserInfo | null for the current logged in account. import getSelfUserInfo from '@/uni modules/unix openim sdk' const self = await getSelfUserInfo if self = null renderProfile self.nickname, self.faceURL Verify that the returned userID matches the application account. attachedInfo and globalRecvMsgOpt are optional Commercial fields. Refresh this snapshot after login or missed events; ongoing updates arrive through onSelfInfoUpdated on the profile update page." + "content": "After initialization, login, and connection readiness, call getSelfUserInfo to query the current account's profile: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL Return result The Promise resolves directly to OpenIMUserInfo or null , without a data wrapper. A non null object contains: | Field | Type | Description | | | | | | userID | string | Signed in user's OpenIMSDK user ID and the stable identifier for this profile snapshot. | | nickname | string | Account level nickname. | | faceURL | string | Account level avatar URL. | | createTime | number or null optional | Time when the user record was created. | | globalRecvMsgOpt Commercial field | number or null optional | Account level message reception option. See Set global message reception /sdk/uniapp/user/profile/set global message reception . | | attachedInfo Commercial field | string or null optional | SDK attachment data. Parse it only according to a confirmed application contract. | | ex | string | Account level extension string defined by the application. | Verify that the returned userID matches the current application account. Do not fabricate an empty user object when the result is null ; use login state and redacted diagnostics to determine why a snapshot is unavailable. This query establishes a snapshot and does not trigger a profile event. Clear it when switching accounts. See Update your profile /sdk/uniapp/user/profile/set self info for merging onSelfInfoUpdated and reconciling with another query." }, { "path": "/sdk/uniapp/user/profile/set-self-info", @@ -4277,7 +4277,7 @@ "description": "Update selected profile fields and process onSelfInfoUpdated.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", - "content": "Pass only fields that should change; do not use empty strings to mean “unchanged.” import off, onSelfInfoUpdated, setSelfInfo from '@/uni modules/unix openim sdk' const profileSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png' off profileSubscription OpenIMSetSelfInfoParams supports nickname , faceURL , ex , and commercial globalRecvMsgOpt . Replace cached data by userID from the event or a fresh query. Each page must release its own handle, or an application user store can own one shared subscription." + "content": "setSelfInfo updates the signed in user's basic display profile. Pass only the fields that really need to change; do not use empty strings or null to mean “unchanged.” Parameters | Parameter | Type | Required | Description | | | | | | | nickname | string or null | No | New nickname. | | faceURL | string or null | No | New avatar URL. | | ex | string or null | No | New extension string. It completely replaces the previous value. | | globalRecvMsgOpt Commercial field | OpenIMSetSelfInfoRecvMsgOpt or null | No | Account level message reception option; update it through the corresponding settings flow. | Pass at least one field that actually needs to change. import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex is a complete string; the SDK does not merge JSON automatically. If several application modules share it, read the current value first and merge each module's namespace before writing the complete replacement. setSelfInfo also carries the account level globalRecvMsgOpt , but do not save it together with ordinary profile data. See Set global message reception /sdk/uniapp/user/profile/set global message reception . The current Private rc.3 interface has no setter for the policy governing how other users add this account. Do not infer or call a method that exists only in the Wasm page; see Set friend request permissions /sdk/uniapp/user/profile/set friend add permission for the exact contract boundary. Promise success means that the update request completed, not that the profile event has arrived. Reconcile the final profile through onSelfInfoUpdated or another getSelfUserInfo query. Listen for current user profile changes This page is the complete owner for onSelfInfoUpdated . The event carries a complete updated OpenIMUserInfo ; replace the current user snapshot by userID . import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription Do not update only the local state of the page that sent the request. If several pages need the current profile, let one application user store subscribe, or let each owner keep and release its own handle. Call releaseSelfInfoSubscription on logout, account switch, or destruction of the user state layer." }, { "path": "/sdk/uniapp/user/profile/set-global-message-reception", @@ -4285,7 +4285,7 @@ "description": "Set the commercial account-wide globalRecvMsgOpt profile field.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", - "content": "globalRecvMsgOpt is a Commercial optional field of OpenIMSetSelfInfoParams . It controls the account globally and is different from a conversation's recvMsgOpt . import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo globalRecvMsgOpt: 0 Use exported OpenIMSetSelfInfoRecvMsgOpt constants and send only this field to avoid overwriting profile data. Confirm the final value with getSelfUserInfo . Hide or disable this control when the deployed edition does not expose the field." + "content": "globalRecvMsgOpt is a Commercial field that defines the account's default message reception and notification policy. It is not an ordinary nickname, avatar, or display profile field. import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, The contract permits these values: | Value | Meaning | | | | | 0 | Receive messages normally and allow offline push or notifications. | | 1 | Do not receive messages. Use only when the product explicitly needs to stop delivery and the server policy is understood. | | 2 | Receive messages without offline push or notifications, equivalent to all day do not disturb. | Pass only globalRecvMsgOpt so changing message policy does not overwrite nickname, avatar, or ex . The plugin has no separate setter for this field. A conversation's recvMsgOpt is a more specific conversation level option; see Set message reception for a conversation /sdk/uniapp/conversation/managing conversations/set message receive option . When account and conversation settings coexist, display the final conversation state returned by the server rather than inferring it only from a local switch. Promise success means that the update request completed, not that onSelfInfoUpdated has arrived. See Update your profile /sdk/uniapp/user/profile/set self info for the event and getSelfUserInfo reconciliation. Public editions may omit this field; show the control according to capability configuration and do not interpret absence as a particular policy." }, { "path": "/sdk/uniapp/user/profile/set-friend-add-permission", @@ -4293,7 +4293,7 @@ "description": "Understand the commercial friend-add policy and the current plugin write boundary.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-friend-add-permission", - "content": "Friend add permission is a Commercial account policy. unix openim sdk 0.2.0 rc.3 exposes the related profile data but OpenIMSetSelfInfoParams has no addFriendPermission setter. Do not invent a client setter or store this policy in ex . Change it through a supported commercial backend/administration API, then reload the user profile. If the field is absent, show the capability as unavailable instead of assuming a policy." + "content": "Friend add permission is a Commercial account policy. The locked unix openim sdk 0.2.0 rc.3 exposes related commercial profile data, but OpenIMSetSelfInfoParams has no addFriendPermission write parameter. This release therefore cannot expose or simulate a client setter. Do not store the policy in ex . Change it through a supported commercial backend or an administration API confirmed to support the field, then requery the current profile and refresh the UI. Perform a capability check before displaying this setting. If the field is absent on a public edition, older server, or response that does not expose it, show the setting as unavailable. Do not assume that absence means “anyone can add” or “verification required.” See Send a friend application /sdk/uniapp/user/friend applications/add friend and Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient for the client side friend request flow." }, { "path": "/sdk/uniapp/user/online-status/subscribe-users-status", @@ -4301,7 +4301,7 @@ "description": "Subscribe to user status and merge onUserStatusChanged updates.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user online-status subscribe-users-status", - "content": "Register the event before subscribing and querying a snapshot to minimize the event/snapshot gap. import getUserStatus, off, onUserStatusChanged, subscribeUsersStatus from '@/uni modules/unix openim sdk' const presenceSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status const userIDs = 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status off presenceSubscription Presence can include per platform details. Merge by user and platform; one offline device does not imply that every device is offline. Subscribe only to needed users and later call unsubscribeUsersStatus ." + "content": "Online status means that a user is connected to OpenIMServer. It does not mean that the user is viewing the App, a conversation, or a message. Subscribe only to users required by the current UI or product flow. One account can subscribe to at most 3,000 users; do not subscribe to the entire directory. subscribeUsersStatus establishes the subscription and resolves to a string result rather than a status array. After subscribing, call getUserStatus for the current snapshot and merge later changes from onUserStatusChanged . import getUserStatus, subscribeUsersStatus, from '@/uni modules/unix openim sdk' const userIDs = uniqueUserIDs 'user a', 'user b' await subscribeUsersStatus userIDs const snapshot = await getUserStatus userIDs snapshot?.statuses.forEach status = replaceUserStatus status.userID, status Remove blank and duplicate IDs first. Subscription success, snapshot query, and later events are three separate stages; do not treat the subscription's string result as an online status object. Online status fields getUserStatus returns OpenIMUserStatusListResult or null . Every statuses element is an OpenIMUserStatusItem : | Field | Type | Description | | | | | | userID | string | User that owns the state and the cache merge key. | | status | number | Aggregated online state. Interpret it with exported status constants rather than inventing numeric meanings. | | platformIDs | number | Currently online platforms. An empty array does not reveal a specific device or last active time. | One device going offline does not necessarily mean that all devices are offline. Display the aggregated status together with platformIDs according to the server's multi device policy. Listen for online status changes This page is the complete owner for onUserStatusChanged . Register the event before subscribing and querying the snapshot to minimize the gap: import off, onUserStatusChanged, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const statusSubscription = onUserStatusChanged result = result.statuses.forEach status = replaceUserStatus status.userID, status await subscribeUsersStatus userIDs const current = await getUserStatus userIDs current?.statuses.forEach status = replaceUserStatus status.userID, status function releaseStatusListener off statusSubscription Merge both snapshot and events idempotently by userID . Call releaseStatusListener on logout, account switch, or state layer destruction. When some users are no longer needed, also unsubscribe from their status /sdk/uniapp/user/online status/unsubscribe users status to release subscription capacity." }, { "path": "/sdk/uniapp/user/online-status/get-subscribe-users-status", @@ -4333,7 +4333,7 @@ "description": "Search current friends by ID, nickname, or remark.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends search-friends", - "content": "searchFriends searches only current friends, not every server user. import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? Reject an empty search in the UI, deduplicate results by userID , and merge later friend events. Search flags affect only this query and do not update profiles or server indexes." + "content": "searchFriends searches only current friends, not every server user. Use the boolean fields to choose which friend attributes are matched. The recommended flow uses one trimmed, non empty keyword; reject an empty search before calling the SDK. Parameters | Parameter | Type | Required | Description | | | | | | | keywordList | string | Yes | Search keywords. The current flow uses the first non empty keyword. | | isSearchUserID | boolean | Yes | Whether to match friend user IDs. | | isSearchNickname | boolean | Yes | Whether to match friend nicknames. | | isSearchRemark | boolean | Yes | Whether to match remarks set by the current user. | import searchFriends from '@/uni modules/unix openim sdk' const result = await searchFriends keywordList: 'Alice' , isSearchUserID: true, isSearchNickname: true, isSearchRemark: true, renderFriends result?.friends ?? The Promise resolves directly to OpenIMFriendListResult or null ; friends contains OpenIMFriendUserItem . See Get the friend list /sdk/uniapp/user/friends/get friend list page for friend fields. Search results are a snapshot for the current query. They do not modify friend profiles or server indexes and must not replace the full friend list. Link each result to existing friend state by userID and continue merging friend events. Use Get specified friend information /sdk/uniapp/user/friends/get specified friends info when the target friend IDs are already known." }, { "path": "/sdk/uniapp/user/friends/get-specified-friends-info", @@ -4357,7 +4357,7 @@ "description": "Update friend remarks, pinned state, or extension values.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friends update-friends", - "content": "updateFriends updates selected fields for one or more friendships. import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: 'Project team', isPinned: true friendUserIDs must not be empty. Omitted remark , isPinned , and ex fields remain unchanged. Confirm through onFriendInfoChanged or a new query. The commercial single user alternative uses pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: 'Owner' Do not race updateFriends and Commercial updateFriend for the same user." + "content": "updateFriends updates selected fields for one or more friendships. Parameters | Parameter | Type | Required | Description | | | | | | | friendUserIDs | string | Yes | Friend IDs to update. The same values are applied to every target. | | remark | string or null | No | New friend remark. | | isPinned | boolean or null | No | Whether to pin the friends. | | ex | string or null | No | New extension string; completely replaces the old value. | import updateFriends from '@/uni modules/unix openim sdk' await updateFriends friendUserIDs: 'user a', 'user b' , remark: 'Project team', isPinned: true, friendUserIDs must not be empty, and at least one update field must be present. If different friends need different values, call the operation separately. ex is a complete replacement string and is not merged as JSON by the SDK. Promise success means that the update request completed, not that the friend event arrived. Merge final state by userID from onFriendInfoChanged on Get the friend list /sdk/uniapp/user/friends/get friend list page , or requery when reconciliation is needed. The commercial single user alternative uses pinned : import updateFriend from '@/uni modules/unix openim sdk' await updateFriend userID: 'user a', pinned: true, remark: 'Owner' updateFriend addresses one userID and names the pin field pinned ; remark and ex remain complete replacement values. Do not race updateFriends and the Commercial updateFriend for the same user. Choose one entry and serialize changes through the friend store." }, { "path": "/sdk/uniapp/user/friends/delete-friend", @@ -4381,7 +4381,7 @@ "description": "Read received requests and process add, accept, reject, and delete events.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-recipient", - "content": "Register all request events before loading the snapshot. import getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onFriendApplicationAdded item = upsertApplication item , onFriendApplicationAccepted item = upsertApplication item , onFriendApplicationRejected item = upsertApplication item , onFriendApplicationDeleted item = removeApplication item , const page = await getFriendApplicationListAsRecipient offset: 0, count: 50 replaceReceivedApplications page?.applications ?? subscriptions.forEach subscription = off subscription Use a stable key based on both users and creation time. Handle a request with the accept or reject API; never mutate local state to imitate server success." + "content": "getFriendApplicationListAsRecipient queries applications sent to the current account. The uni app / uni app x OpenIMApplicationListParams has only pagination fields and does not expose Wasm's handleResults filter. Filter by handleResult after the query if the UI should show only pending applications. Parameters The parameter object can be omitted. To request an explicit page, use: | Parameter | Type | Required | Description | | | | | | | offset | number or null | No | Pagination offset; use 0 for the first page. | | count | number or null | No | Number of applications requested. | import getFriendApplicationListAsRecipient from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsRecipient offset: 0, count: 20, const applications = result?.applications ?? replaceReceivedApplications applications The Promise resolves directly to OpenIMFriendApplicationListResult or null . applications contains the current page of OpenIMFriendApplicationItem ; querying does not itself trigger an application event. Friend application fields | Field | Type | Description | | | | | | fromUserID | string | Applicant's user ID. | | fromNickname | string | Applicant nickname snapshot. | | fromFaceURL | string | Applicant avatar snapshot. | | toUserID | string | Recipient user ID. | | toNickname | string | Recipient nickname snapshot. | | toFaceURL | string | Recipient avatar snapshot. | | reqMsg | string | Application message. | | handleResult | number | Processing result: 0 pending, 1 accepted, 1 rejected. | | handlerUserID | string | Processing user ID; can be empty while pending. | | handleMsg | string | Processing comment. | | handleTime | number | Processing time; do not treat it as valid while pending. | | createTime | number | Record creation time. | | ex | string | Application extension string. | | attachedInfo | string | SDK attachment data; parse only a confirmed contract. | Use fromUserID:toUserID as the merge key. Nicknames and avatars are snapshots from application creation or synchronization. Query the relevant user's current profile with getUsersInfo when freshness matters. Synchronize friend application changes This page is the complete owner for the added, accepted, rejected, and deleted events. Register them before loading the snapshot. import getFriendApplicationListAsRecipient, off, onFriendApplicationAccepted, onFriendApplicationAdded, onFriendApplicationDeleted, onFriendApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions : Array = onFriendApplicationAdded item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationAccepted item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationRejected item = mergeFriendApplication item.fromUserID, item.toUserID, item , onFriendApplicationDeleted item = removeFriendApplication item.fromUserID, item.toUserID , const page = await getFriendApplicationListAsRecipient offset: 0, count: 50 replaceReceivedApplications page?.applications ?? function releaseFriendApplicationSubscriptions subscriptions.forEach subscription = off subscription subscriptions.length = 0 Route an event to the sent or received list according to whether the current user is toUserID . An accepted application creates a friendship that is merged through onFriendAdded on Get the friend list /sdk/uniapp/user/friends/get friend list page . Pagination can be reset when events alter the list. Accept or reject a received application through the corresponding API; never mutate handleResult locally to imitate server success. Call releaseFriendApplicationSubscriptions on logout, account switch, or destruction of the friend application state layer." }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant", @@ -4389,7 +4389,7 @@ "description": "Read friend requests sent by the current account.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications get-friend-application-list-as-applicant", - "content": "import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? Parameters are optional. Results can move while pages load, so deduplicate with participant IDs and time fields rather than array indexes. Reload after App restoration, login, or missed events." + "content": "getFriendApplicationListAsApplicant queries friend applications sent by the current account and returns OpenIMFriendApplicationListResult or null . Parameters The parameter object can be omitted. To request an explicit page, use: | Parameter | Type | Required | Description | | | | | | | offset | number or null | No | Pagination offset; use 0 for the first page. | | count | number or null | No | Number of applications requested. | import getFriendApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getFriendApplicationListAsApplicant offset: 0, count: 50 renderSentApplications result?.applications ?? After Promise success, applications contains the current page of sent OpenIMFriendApplicationItem . See Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient for the fields. This query does not trigger an application event. Pagination can change while it is loading. Merge events by fromUserID:toUserID instead of array position. If an event arrives during paging, reset pagination and requery when necessary. Complete friend application listeners live on the received applications page. Rebuild this snapshot after App restoration, re login, or any period in which events may have been missed." }, { "path": "/sdk/uniapp/user/friend-applications/get-friend-application-unhandled-count", @@ -4421,7 +4421,7 @@ "description": "Commercially delete selected friend-request records in a batch.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user friend-applications delete-friend-requests", - "content": "deleteFriendRequests is Commercial . import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , Each OpenIMSimpleFriendRequest identifies an exact request. Deleting request history does not remove an established friendship. Confirm targets in the UI and reload both the list and unhandled count; after a batch failure, do not assume which records were removed." + "content": "deleteFriendRequests is Commercial . Parameters The operation receives OpenIMDeleteFriendRequestsParams . Every item in friendRequests contains: | Parameter | Type | Required | Description | | | | | | | friendRequests .fromUserID | string | Yes | User ID of the applicant. | | friendRequests .toUserID | string | Yes | User ID of the recipient. | import deleteFriendRequests from '@/uni modules/unix openim sdk' await deleteFriendRequests friendRequests: fromUserID: 'user a', toUserID: 'user b' , , Each OpenIMSimpleFriendRequest identifies an exact request by fromUserID:toUserID . Deleting request history is not the same as rejecting an application and does not remove an established friendship. Use the friend deletion API to end a friendship. Promise success means that the deletion request completed. onFriendApplicationDeleted can arrive afterward; the complete listener is on Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient , where records are removed by fromUserID:toUserID . Confirm batch targets in the UI. After failure, do not assume that every or no item was deleted; requery both received and sent application lists to reconcile with the server snapshot." }, { "path": "/sdk/uniapp/user/blacklist/get-black-list", @@ -4429,7 +4429,7 @@ "description": "Load the blacklist and process add and remove events.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user blacklist get-black-list", - "content": "import getBlackList, off, onBlackAdded, onBlackDeleted from '@/uni modules/unix openim sdk' const added = onBlackAdded user = upsertBlackUser user const deleted = onBlackDeleted user = removeBlackUser user.userID const result = await getBlackList replaceBlackList result?.blackUsers ?? off added off deleted The commercial alternative returns a differently named wrapper field: import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlackList commercialResult?.blacks ?? Do not mix the blackUsers and Commercial blacks result shapes. Blacklist and friendship are independent relationships." + "content": "The OpenIMSDK blacklist records users that the current account has blocked. Use getBlackList to build blacklist settings, show relationship state on profile cards, and restrict chat entry points. Blacklist and group management are separate capabilities. Use group member APIs to mute, remove, or change a group member's role; getBlackList reads only the current user's personal blacklist. Get the blacklist Call getBlackList after initialization, login, and connection readiness. The Promise resolves directly to OpenIMBlackListResult or null ; an empty blackUsers array means there are no blocked users. import getBlackList from '@/uni modules/unix openim sdk' const result = await getBlackList const blockedUsers = result?.blackUsers ?? replaceBlockedUsers blockedUsers Profile cards, conversation menus, and contact lists normally need only a set of blocked userID values. Use userID as the key; nickname and avatar are presentation fields. const blockedUserIDs = new Set blockedUsers.forEach user = blockedUserIDs.add user.userID function isBlocked userID : string : boolean return blockedUserIDs.has userID The commercial edition also exposes getBlacks Commercial , whose wrapper field is named blacks : import getBlacks from '@/uni modules/unix openim sdk' const commercialResult = await getBlacks replaceBlockedUsers commercialResult?.blacks ?? Do not mix the blackUsers and blacks result shapes. Choose the entry that matches the installed edition rather than querying two snapshots. Blacklist item fields Every blackUsers item is an OpenIMBlackUserItem : | Field | Type | Description | | | | | | userID | string | Blocked user's ID and the merge key for the list and events. | | nickname | string | Display nickname. | | faceURL | string | Avatar URL. | | ownerUserID | string | Owner of this blacklist relationship, normally the signed in user. | | operatorUserID | string | User that performed the block operation. | | createTime | number | Time when the relationship was created. | | addSource | number | Source value for the relationship. | | ex | string | Application extension; parse only a confirmed format. | | attachedInfo | string | SDK attachment data; parse only a confirmed contract. | If the UI also displays public profile or friend remark data, merge by userID while preserving the distinct sources of OpenIMBlackUserItem , OpenIMFriendUserItem , and OpenIMPublicUserItem . Results and incremental changes Replace the current blacklist snapshot with the returned array after getBlackList succeeds. The query itself does not trigger add or delete events. Requery on first entry, re login, and explicit refresh. This page is the complete owner for onBlackAdded and onBlackDeleted : import off, onBlackAdded, onBlackDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const blacklistSubscriptions : Array = onBlackAdded user = upsertBlockedUser user.userID, user , onBlackDeleted user = removeBlockedUser user.userID , function releaseBlacklistSubscriptions blacklistSubscriptions.forEach subscription = off subscription blacklistSubscriptions.length = 0 Merge events by userID . After blocking, the other user cannot send to the current user, but the current user can still send to that user. Enforce a bidirectional product restriction separately if required. Blacklist and friendship remain independent state; do not assume that blocking removes a friend. Call releaseBlacklistSubscriptions on logout, account switch, or destruction of the blacklist state layer." }, { "path": "/sdk/uniapp/user/blacklist/add-black", @@ -4453,7 +4453,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Conversation overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation overview-conversation", - "content": "Conversations are local indexes for direct, group, and other message streams. Use conversationID as the stable key; titles, avatars, unread counts, and latest messages are mutable snapshots. latestMsg is serialized message JSON, so preserve the conversation and show a fallback summary if parsing fails. Register onNewConversation and onConversationChanged before loading a list, merge by conversationID , and reload after login or App restoration. Unread state, message read receipts, and commercial conversation groups are related but separate workflows." + "content": "A conversation is the local index and display snapshot for one to one, group, notification, and other message streams. It provides the stable conversationID , target identity, title, avatar, unread count, draft, pin state, receive option, and serialized latest message. Messages and conversations are related but not interchangeable. Message APIs create, send, and query OpenIMMessageItem ; conversation APIs organize chat entry points and aggregate unread and latest message state. Do not edit the SDK database or derive authoritative conversation state only from the visible message array. Conversation model Use conversationID as the stable merge key. Common OpenIMConversationItem fields are: | Field | Type | Description | | | | | | conversationID | string | Stable identifier for snapshots, events, routing, and mutation APIs. | | conversationType | number | Conversation/session type. Interpret it with exported constants. | | userID | string | Peer user ID for one to one conversations. | | groupID | string | Group ID for group conversations. | | showName | string | Current display name snapshot for conversation lists and chat titles. | | faceURL | string | Current avatar snapshot. | | unreadCount | number | Current unread count for this conversation. | | recvMsgOpt | number | Conversation level reception option. | | isPinned | boolean | Whether the conversation is pinned. | | latestMsg | string | Serialized latest OpenIMMessageItem ; validate before parsing. | | latestMsgSendTime | number | Latest message send time. | | draftText / draftTextTime | string / number | Local draft content and update time. | | ex | string | Application extension string. | latestMsg parsing failure does not mean the conversation is invalid. Keep the item and display a fallback summary until a later message or query provides recognizable content. Names, avatars, unread counts, latest messages, and drafts are snapshots and can change; never use them as keys. The Private contract adds commercial conversation policy, notification, attached info, burn duration, destruct, and grouping related fields. A mixed page must treat those fields as optional and keep the public conversation flow working when they are absent. Establish snapshots Use Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list for the main paginated snapshot. Other query pages cover one target, a known ID set, canonical ID generation, and local search. Query operations do not create conversations. A first sent or received message can later create one and trigger onNewConversation . After login, synchronization, reconnect, account switch, or process restoration, query the snapshots required by the current UI instead of expecting events alone to reconstruct the database. Update conversation state Conversation mutations include pinning, read state, draft text, receive options, marks, remarks, extensions, private chat policy, burn duration, and commercial grouping. A mutation Promise means only that its request completed. Merge onConversationChanged afterward or query again; do not assume that every other device and event stream has already updated. Unread state spans several scopes: Per conversation unread state is in OpenIMConversationItem.unreadCount . The application total is maintained by Get the total unread count /sdk/uniapp/conversation/managing conversations/get total unread count . Group message read receipts are message domain state, not the conversation unread total. Keep state synchronized The canonical onNewConversation and onConversationChanged listeners live on Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list . Register them before loading the first snapshot and merge by conversationID . Other events have their own owners: total unread count, commercial conversation deletion, and raw commercial conversation group changes. Do not register one event from every component. Let a conversation store own the listener handles and distribute state to pages. Conversation groups Commercial conversation groups organize one conversation into one or more custom groups without copying or moving its messages. Group items, membership, ordering, raw events, and queries are documented in Conversation groups overview /sdk/uniapp/conversation/managing conversation groups/overview conversation groups . Deleting a conversation group does not delete its conversations. Likewise, deleting or hiding a conversation and removing a conversation from a group are distinct operations. State and privacy boundaries The local conversation database belongs to OpenIM Core. Use SDK APIs to query and mutate it; do not inspect or edit database files. Clear all old account application snapshots on logout or account switch, and guard late asynchronous writes with the account identity or commercial session epoch. Do not put tokens, private message bodies, or unredacted custom payloads in ex , logs, analytics, or automation evidence. When rendering latestMsg , apply the same content validation and privacy policy used by the message UI." }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-by-target", @@ -4461,7 +4461,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Open a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-by-target", - "content": "getOneConversation resolves a conversation from session type and target ID. import getOneConversation from '@/uni modules/unix openim sdk' const result = await getOneConversation sessionType, sourceID const conversation = result?.conversation ?? null Use a user ID for direct chat or group ID for group chat. A nullable result means no current local conversation; it does not create one." + "content": "getOneConversation queries one conversation by target ID and OpenIMSessionType . It resolves directly to OpenIMConversationItem or null . Parameters | Parameter | Type | Required | Description | | | | | | | sourceID | string | Yes | Target ID: the other user's userID for one to one chat or groupID for group chat. | | sessionType | OpenIMSessionType | Yes | Conversation type. Use exported constants such as OpenIMSessionTypeSingle and the corresponding group type. | import OpenIMSessionTypeSingle, getOneConversation, from '@/uni modules/unix openim sdk' const conversation = await getOneConversation sourceID: 'user b', sessionType: OpenIMSessionTypeSingle, The same string can identify different targets under different session types, so both fields must be correct. Do not pass numeric literals, and do not pass a conversationID as sourceID ; use the conversation ID query when that ID is already known. null can mean that the local database does not yet contain the conversation. Sending or receiving the first message can create it through a later event. This query does not create a conversation or trigger an event. Merge a non null result by conversationID , not only by sourceID , so another session type is not overwritten." }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversation-id", @@ -4469,7 +4469,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Resolve a conversation ID.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversation-id", - "content": "import getConversationIDBySessionType from '@/uni modules/unix openim sdk' const conversationID = await getConversationIDBySessionType sourceID, sessionType The returned ID is the canonical local key for the given direct or group target. Use exported session type constants instead of numeric literals, and do not construct conversation IDs manually." + "content": "getConversationIDBySessionType returns the canonical conversationID used by Core. It is useful for building a route key before a conversation item exists. import OpenIMSessionTypeGroup, getConversationIDBySessionType, from '@/uni modules/unix openim sdk' const conversationID = await getConversationIDBySessionType sourceID: 'group 123', sessionType: OpenIMSessionTypeGroup, Do not concatenate a one to one or group conversation ID yourself; each session type has its own canonical rules. The returned string does not prove that a conversation exists and does not create server data. Query the conversation by target /sdk/uniapp/conversation/retrieving conversations/get conversation by target or the conversation list when complete conversation data is needed." }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/get-conversations-by-id", @@ -4477,7 +4477,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations by ID.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations get-conversations-by-id", - "content": "import getMultipleConversation from '@/uni modules/unix openim sdk' const result = await getMultipleConversation 'single user a', 'group group a' const conversations = result?.conversations ?? Results may be shorter or differently ordered than the request. Map by conversationID and preserve placeholders for missing local conversations." + "content": "getMultipleConversation queries a batch of conversations by conversationID and returns OpenIMConversationListResult or null . import getMultipleConversation from '@/uni modules/unix openim sdk' const result = await getMultipleConversation 'si user a user b', 'sg group 123' const conversations = result?.conversations ?? Results can be shorter than the request and need not preserve input order. Build a map by conversationID and keep placeholders for conversations missing from the local database. Split an unbounded set of IDs into reasonable batches. This operation establishes only a snapshot. It does not subscribe to changes. Continue to process the events owned by Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list for ongoing updates." }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/retrieve-conversation-list", @@ -4485,7 +4485,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get the conversation list.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations retrieve-conversation-list", - "content": "Register conversation events before loading a snapshot. Use getAllConversationList for a complete result or getConversationListSplit for pages. import getConversationListSplit, off, onConversationChanged, onNewConversation from '@/uni modules/unix openim sdk' const changed = onConversationChanged items = items.forEach upsertConversation const created = onNewConversation items = items.forEach upsertConversation const page = await getConversationListSplit offset: 0, count: 100 replaceConversations page?.conversations ?? off changed off created Paginate from offset 0, deduplicate by conversationID , and requery after account or synchronization changes." + "content": "Build the conversation list snapshot with paginated getConversationListSplit . Although the Private contract still exports getAllConversationList for compatibility, real applications and public documentation use the paginated operation so a large local database is not loaded in one call. Get conversations by page Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Pagination offset; use 0 for the first page. | | count | number | Yes | Number to read. Choose a reasonable limit for the page and device. | import getConversationListSplit, off, onConversationChanged, onNewConversation, from '@/uni modules/unix openim sdk' const newConversationSubscription = onNewConversation result = result.conversations.forEach item = upsertConversation item.conversationID, item const changedSubscription = onConversationChanged result = result.conversations.forEach item = upsertConversation item.conversationID, item const firstPage = await getConversationListSplit offset: 0, count: 100 replaceConversationSnapshot firstPage?.conversations ?? The Promise resolves directly to OpenIMConversationListResult or null ; read the page from conversations . Replace the current account snapshot with the first page and merge later pages by conversationID . Do not fabricate a successful empty list for null ; use login state and redacted diagnostics to decide whether to preserve the old snapshot or show a loading error. Increase offset until a page contains fewer than count items. Conversation events received during paging can change sorting and page boundaries. Merge by primary key, then rebuild from offset 0 on refresh or synchronization completion. Do not permanently append pages while relying on stale offsets. Conversation fields Common OpenIMConversationItem fields include: | Field | Description | | | | | conversationID | Stable key for list snapshots and events. | | conversationType | One to one, group, or notification conversation type. | | userID / groupID | Peer user or target group according to the conversation type. | | showName / faceURL | Display name and avatar snapshots. | | unreadCount | Current unread count. | | latestMsg | Serialized latest message. Preserve the conversation and show a fallback summary if parsing fails. | | latestMsgSendTime | Send time of the latest message; can participate in normal ordering. | | draftText / draftTextTime | Local draft and its update time. | | isPinned | Pin state. Apply pin ordering before time ordering. | | recvMsgOpt | Conversation level message reception option. | See Conversation overview /sdk/uniapp/conversation/overview conversation for complete fields and commercial extensions. Never update by array index because pin state, latest message, draft, and unread count can all reorder the list. Sort the list Write page and event results into a map keyed by conversationID , then derive the visible array. A common policy puts pinned conversations first, orders each section by latest message or draft time, and uses a stable ID tiebreaker. Do not swap page array items directly inside event handlers. If latestMsg cannot be parsed, keep the conversation and show an unknown message summary. A later recognizable message or requery will update it naturally. Keep the list synchronized This page is the complete owner for onNewConversation and onConversationChanged . Register events before the first query to minimize gaps during login synchronization. Both callbacks contain OpenIMConversationListResult ; iterate every item even if one conversation usually changed. Promise success, event arrival, and requery are separate stages. Rebuild the snapshot after foreground restoration, synchronization completion, reconnect, or account switch. On logout or store destruction, release the two owned handles: off newConversationSubscription off changedSubscription When switching accounts, stop writes from old account paging requests before querying the new account. A late old Promise must not merge its conversationID list into the new account. Use an application account generation or the commercial sdkSessionEpoch to revalidate before completion." }, { "path": "/sdk/uniapp/conversation/retrieving-conversations/search-conversations", @@ -4493,7 +4493,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Search conversations.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation retrieving-conversations search-conversations", - "content": "import searchConversation from '@/uni modules/unix openim sdk' const result = await searchConversation 'project' renderConversations result?.conversations ?? This searches local conversation metadata. Reject an empty keyword in the UI, deduplicate by conversationID , and do not treat local results as an authoritative server wide search." + "content": "searchConversation searches the local conversation database using a string keyword and returns OpenIMConversationListResult or null . import searchConversation from '@/uni modules/unix openim sdk' const result = await searchConversation 'Alice' renderSearchResults result?.conversations ?? Trim whitespace first. When the input is empty, show the normal conversation list from application state instead of issuing a search. The result is a snapshot at query time; rerun the search after conversation changes, or merge later event items by conversationID . The exact matched conversation metadata is determined by Core. Do not promise that this searches every message body. Use message domain search APIs for message content." }, { "path": "/sdk/uniapp/conversation/managing-conversations/pin-conversation", @@ -4501,7 +4501,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations pin-conversation", - "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPinned: true Pass only the field being changed; use false to unpin. Apply the final onConversationChanged snapshot before re sorting instead of assuming Promise completion defines the final order." + "content": "Use setConversation to pin or unpin one conversation. Pass only the field being changed. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPinned: true // Unpin the conversation. await setConversation conversationID, isPinned: false Promise success means that the update request completed. Apply the final onConversationChanged snapshot before deriving list order, rather than assuming the Promise defines final sorting. Omitted fields retain their values; do not copy and write a complete conversation merely to update the pin state. The list store should merge by conversationID , then sort pinned conversations with the product's stable ordering rule. Concurrent changes from another device are reconciled by the event or a new query." }, { "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation", @@ -4509,7 +4509,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Mark or unmark a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation", - "content": "Conversation marking is a Commercial concept, but the frozen 0.2.0 rc.3 contract has neither markConversation nor an isMarked setter field. Do not emulate it through ex or local only state. Use a supported commercial backend capability and then refresh conversations/groups, or disable the UI." + "content": "Conversation marking is a Commercial capability commonly used with a marked conversation group. The frozen UTS contract has neither a markConversation operation nor an isMarked field in OpenIMSetConversationParams . The client therefore cannot simulate a mark through ex or another field. Use a supported commercial business backend or confirmed upper layer service, then refresh the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list and conversation groups /sdk/uniapp/conversation/managing conversation groups/overview conversation groups . When no real write API is available, hide or disable the action instead of changing local only state that will disappear on the next query." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-remark", @@ -4517,7 +4517,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation remark.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-remark", - "content": "Conversation remarks are Commercial , but the frozen conversation model and setter expose no standard remark field. Do not encode one into ex as if it were a Core field. Maintain it through an authoritative commercial business API and merge it into the UI." + "content": "Conversation remarks are a Commercial extension. The current OpenIMConversationItem and OpenIMSetConversationParams have no independent remark field, so this plugin release cannot safely write that capability. Do not encode a remark into ex and present it as a standard Core field. Maintain it through an authoritative commercial business API and merge the returned business data into the conversation UI. If a future contract adds the field, the interface/schema hashes will require this page to be reviewed again. Until then, neither public nor commercial clients should call a setter that does not exist." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-extension", @@ -4525,7 +4525,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation extra data.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-extension", - "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, ex: JSON.stringify color: 'blue' ex is replaced as one string, not merged. Read and merge your versioned business schema first, preserve unknown fields, and never store tokens or server only secrets." + "content": "Use setConversation to replace a conversation's application ex string. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, ex: JSON.stringify color: 'blue' ex is a complete replacement, not a partial merge. Read the current string, validate its versioned business schema, merge the namespaces owned by the application, and preserve unknown fields before writing. Never store tokens, secrets, private message bodies, or server only data. Promise success means that the update request completed. Confirm final state through onConversationChanged or a new query. If an old schema or unknown field cannot be parsed, preserve the original string and degrade the UI rather than overwriting it." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-conversation-draft", @@ -4533,7 +4533,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set a conversation draft.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-conversation-draft", - "content": "import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText An empty draft clears it. Persist drafts deliberately as text, update UI from the changed conversation, and avoid storing tokens or sensitive transient editor state." + "content": "setConversationDraft saves a text draft for one local conversation. import setConversationDraft from '@/uni modules/unix openim sdk' await setConversationDraft conversationID, draftText: editorText Pass an explicit empty string to clear the draft: await setConversationDraft conversationID, draftText: '' State after the call Promise success means that the draft has been saved. Merge draftText and draftTextTime from onConversationChanged by conversationID ; the complete event ownership is on Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list . A draft is device local conversation state and should not be assumed to synchronize to another device. Clear editor memory on logout so an old account's text cannot appear under a new account. Do not store tokens or sensitive transient form state as a conversation draft." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-message-receive-option", @@ -4541,7 +4541,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set conversation message reception.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-receive-option", - "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 Use exported receive option constants rather than naked numbers. This conversation setting is distinct from the account wide option and can be constrained by both. Confirm through the changed conversation or a new query." + "content": "recvMsgOpt controls message reception for one conversation and is updated through setConversation . import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, recvMsgOpt: 1 Common values are 0 for normal reception with notifications and 2 for reception without notification. The contract also permits 1 for not receiving messages, but use it only when the product and server explicitly support that policy. Centralize these meanings in application constants instead of scattering numeric literals across pages. This setting affects only the specified conversation. The account level default is globalRecvMsgOpt ; see Set global message reception /sdk/uniapp/user/profile/set global message reception . Effective behavior can be constrained by both levels. Promise success, onConversationChanged , and requery are three stages. Merge the event by conversationID or query again to confirm final state instead of changing only the current page switch." }, { "path": "/sdk/uniapp/conversation/managing-conversations/clear-group-mentions", @@ -4549,7 +4549,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Reset group mention status.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-group-mentions", - "content": "import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, groupAtType: 0 Use the contract defined “no mention” value. This clears only the group mention indicator; it neither removes @ messages nor marks unread messages as read." + "content": "Use setConversation to clear the group mention indicator on one group conversation. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, groupAtType: 0 Use the contract defined “no mention” value for groupAtType ; do not invent another numeric meaning. Promise success means that the conversation update request completed. Merge the later onConversationChanged snapshot or query the conversation again. This only changes the conversation's mention prompt. It does not delete @ messages and does not clear unread count. To clear unread state, call Mark a conversation as read /sdk/uniapp/conversation/managing conversations/mark conversation read separately." }, { "path": "/sdk/uniapp/conversation/managing-conversations/mark-conversation-read", @@ -4557,7 +4557,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Mark a conversation as read.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-conversation-read", - "content": "Use markConversationMessageAsRead to clear normal unread state. The commercial resetConversationUnread is an additional reset entry point. Direct read receipts arrive through onRecvC2CReadReceipt . import markConversationMessageAsRead, off, onRecvC2CReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt items = mergeReadReceipts items await markConversationMessageAsRead conversationID off receiptSubscription Do not infer message level receipts solely from the conversation unread count." + "content": "Use markConversationMessageAsRead to clear ordinary unread state for one conversation. The commercial resetConversationUnread is an additional entry that can set unread count for multiple conversations. One to one message read receipts arrive through onRecvC2CReadReceipt . import markConversationMessageAsRead, off, onRecvC2CReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvC2CReadReceipt result = result.receipts.forEach receipt = mergeReadReceipt receipt await markConversationMessageAsRead conversationID The Commercial reset operation uses: import resetConversationUnread from '@/uni modules/unix openim sdk' await resetConversationUnread conversationIDs: conversationID , num: 0 Local unread reset and a remote read receipt are not the same stage. After Promise success, merge the latest conversation from onConversationChanged by conversationID or requery it. For a one to one receipt, locate the peer's conversation and update the messages listed in each receipt. For a group conversation, this API clears only the current account's conversation unread count. Use Send group read receipts /sdk/uniapp/message/managing read status/send group read receipts for member level group read state. Release receiptSubscription on component teardown, logout, or account switch: off receiptSubscription" }, { "path": "/sdk/uniapp/conversation/managing-conversations/mark-all-conversations-read", @@ -4565,7 +4565,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Mark all conversations as read.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations mark-all-conversations-read", - "content": "import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead This clears conversation unread state for the current account. Confirm final totals from unread events or a fresh query; it does not delete messages or guarantee per message read receipts." + "content": "markAllConversationMessageAsRead clears the unread state of all conversations currently found for the signed in account. import markAllConversationMessageAsRead from '@/uni modules/unix openim sdk' await markAllConversationMessageAsRead Because this is a wide scope state change, ask for confirmation. Promise success means that SDK Core finished the operation for the conversations it found. It does not mean that conversation events have arrived or that every other client's UI already synchronized. Do not merely set the badge to zero. Merge each onConversationChanged item by conversationID and replace the total through onTotalUnreadMessageCountChanged . See Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list and Get the total unread count /sdk/uniapp/conversation/managing conversations/get total unread count . Requery both snapshots if new unread messages may have arrived concurrently. This operation does not delete messages and does not change a conversation's message reception option or guarantee message level read receipts." }, { "path": "/sdk/uniapp/conversation/managing-conversations/get-total-unread-count", @@ -4573,7 +4573,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Track the total unread count.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations get-total-unread-count", - "content": "import getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged from '@/uni modules/unix openim sdk' const unreadSubscription = onTotalUnreadMessageCountChanged count = renderBadge count const count = await getTotalUnreadMsgCount renderBadge count ?? 0 off unreadSubscription Load a snapshot and then apply events. Requery after login or synchronization rather than maintaining only local increments." + "content": "getTotalUnreadMsgCount returns the current account's aggregate conversation unread count. The value is an account snapshot, not a sum that the UI should maintain independently. Register the event before querying to reduce the synchronization gap: import getTotalUnreadMsgCount, off, onTotalUnreadMessageCountChanged from '@/uni modules/unix openim sdk' const unreadSubscription = onTotalUnreadMessageCountChanged count = renderBadge count const count = await getTotalUnreadMsgCount renderBadge count ?? 0 off unreadSubscription Both the query and onTotalUnreadMessageCountChanged provide replacement totals. Do not apply local +1 and 1 deltas, which drift when messages are read on another device or during synchronization. This page is the complete owner for the total unread event. Call off unreadSubscription on logout, account switch, or destruction of the badge state layer. Requery after login and synchronization. When using the value for the TabBar or application badge /sdk/uniapp/getting started/handle app lifecycle and device state , also account for notification permission and operating system badge behavior." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-private-chat", @@ -4581,7 +4581,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Enable or disable burn after reading.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-private-chat", - "content": "isPrivateChat is a Commercial field accepted by the public setConversation operation. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPrivateChat: true Pass only this field. The host must still implement the corresponding product UI/security behavior; confirm the final flag from conversation updates." + "content": "isPrivateChat is a Commercial field written through the public setConversation operation. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, isPrivateChat: true Pass only the field being changed. Private chat message presentation, screenshot behavior, and destruction policy are jointly defined by the commercial server and client product. Setting one boolean does not implement every UI security rule automatically. Promise success means that the request completed. Use isPrivateChat from the final onConversationChanged snapshot or a new query as the authoritative conversation state." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-burn-duration", @@ -4589,7 +4589,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set the burn duration.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-burn-duration", - "content": "burnDuration is Commercial . import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 Use the server defined unit, range, and disabled value. Client countdown UI does not itself delete server messages; reload the conversation to confirm the setting." + "content": "burnDuration is a Commercial conversation field that defines the read burn duration in seconds. import setConversation from '@/uni modules/unix openim sdk' await setConversation conversationID, burnDuration: 30 The unit is seconds. Enabling or disabling read burn mode also requires isPrivateChat ; see Enable or disable private chat /sdk/uniapp/conversation/managing conversations/set private chat . Do not confuse burnDuration with the server message retention interval msgDestructTime . A client countdown is presentation only and must not directly delete server messages. Promise success means that the update request completed; merge burnDuration from onConversationChanged or requery the conversation. Disable the feature according to the product protocol rather than simulating server state with a local switch." }, { "path": "/sdk/uniapp/conversation/managing-conversations/set-message-destruct", @@ -4597,7 +4597,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Schedule server message deletion.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations set-message-destruct", - "content": "OpenIMConversationItem can expose commercial isMsgDestruct and msgDestructTime , but the frozen setter cannot write them. Treat them as read only Commercial state. Use an explicitly supported business API to change policy and then reload; client countdown UI is not authoritative deletion." + "content": "OpenIMConversationItem exposes Commercial isMsgDestruct and msgDestructTime state, but the current OpenIMSetConversationParams has no corresponding write fields. Together, isMsgDestruct and msgDestructTime describe periodic server message deletion. This is not read burn mode, which uses isPrivateChat and burnDuration . This plugin release can read and display the server's destruction policy but cannot copy Wasm's setConversation isMsgDestruct, msgDestructTime call. Do not simulate the setter through a similar field or ex . Use a confirmed, authenticated commercial business API and requery the conversation after it completes. When the interval is reached, server policy removes server side stored messages. It does not promise that already synchronized local copies disappear immediately from this or another device. After reinstall, local data clearing, or synchronization on a new device, messages already removed by the server may no longer be retrievable. A client countdown is presentation only. Actual destruction is determined by Core and server state. This page preserves the same business boundary as Wasm while explicitly recording that the current Unix contract has no write capability." }, { "path": "/sdk/uniapp/conversation/managing-conversations/hide-a-conversation", @@ -4605,7 +4605,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Hide a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-a-conversation", - "content": "import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID Hiding removes the conversation from the visible list without deleting its message history. A later incoming message or product action can make it visible again; reload the list rather than deleting cached history." + "content": "hideConversation removes one conversation from the current account's visible list without deleting its messages. import hideConversation from '@/uni modules/unix openim sdk' await hideConversation conversationID This affects only the signed in user's conversation entry. It does not remove a one to one relationship, leave a group, or change another user's state. A later incoming message or synchronization can make the conversation visible again. Use the explicit deletion API when messages should also be cleared, and explain the distinction in the UI. State after the call Promise success means that the hide request completed. The caller can remove the item from the current list by conversationID , but must still merge onConversationChanged or requery to reconcile. Do not update only a page array while leaving the conversation store unchanged; restore or update the original key if the conversation reappears." }, { "path": "/sdk/uniapp/conversation/managing-conversations/hide-all-conversations", @@ -4613,7 +4613,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Hide all conversations.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations hide-all-conversations", - "content": "import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations This hides every current conversation without deleting message history. Treat it as a destructive list action, confirm with the user, and rebuild the snapshot after completion." + "content": "hideAllConversations hides every current conversation for the signed in account without deleting message history. import hideAllConversations from '@/uni modules/unix openim sdk' await hideAllConversations This is a wide scope list operation; ask for confirmation. Promise success means that Core completed the current local reset. It does not delete local or server messages, groups, friend relationships, or another client's conversation state. A later new message or valid resynchronization can make a conversation appear again. After completion, requery both the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list and the total unread count /sdk/uniapp/conversation/managing conversations/get total unread count . Do not interpret Promise success as a remote event or permanent deletion." }, { "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation", @@ -4621,7 +4621,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation", - "content": "import deleteConversation from '@/uni modules/unix openim sdk' await deleteConversation conversationID This removes the conversation entry without promising to delete its message history. Use the explicit conversation and message operation when that is the intended product action, and confirm destructive actions in the UI." + "content": "deleteConversation removes one conversation entry without promising to delete its message history. import deleteConversation from '@/uni modules/unix openim sdk' await deleteConversation conversationID This is distinct from deleting a conversation and all messages /sdk/uniapp/conversation/managing conversations/delete conversation with messages . Use this operation when local history is intended to remain. A later incoming message can cause the conversation to appear again. Promise success means that the delete request completed. Requery the conversation list or merge the later event by conversationID ; do not delete cached message state unless the selected product action explicitly includes it." }, { "path": "/sdk/uniapp/conversation/managing-conversations/delete-conversation-with-messages", @@ -4629,7 +4629,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation and its messages.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations delete-conversation-with-messages", - "content": "import deleteConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await deleteConversationAndDeleteAllMsg conversationID This destructive operation removes the conversation and its messages according to Core/server policy. Ask for confirmation, stop writes to the conversation, and reload lists after completion." + "content": "deleteConversationAndDeleteAllMsg removes a conversation entry and all of its messages according to Core/server policy. import deleteConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await deleteConversationAndDeleteAllMsg conversationID This operation is difficult to recover. Ask for confirmation, stop pagination and writes for the conversation, and do not confuse it with hiding a conversation or clearing messages while keeping the entry. Promise success means that the deletion request completed. Clear the corresponding message store and rebuild the conversation list. If another device or a later event creates state again, reconcile by conversationID rather than retaining a tombstone based only on the old array index." }, { "path": "/sdk/uniapp/conversation/managing-conversations/clear-conversation-messages", @@ -4637,7 +4637,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Clear messages in a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversations clear-conversation-messages", - "content": "import clearConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await clearConversationAndDeleteAllMsg conversationID The conversation remains while its messages are cleared according to Core/server policy. Confirm the action, stop concurrent pagination/sends, and reload both conversation and message state afterward." + "content": "clearConversationAndDeleteAllMsg clears every message from one conversation while keeping the conversation entry. import clearConversationAndDeleteAllMsg from '@/uni modules/unix openim sdk' await clearConversationAndDeleteAllMsg conversationID Ask for confirmation first and stop in flight history pagination. Promise success means that Core completed the clear request; then clear the message store and requery the conversation so latest message, sequence, and unread state come from Core. This operation is different from deleting the conversation together with its messages. Use Delete a conversation and all messages /sdk/uniapp/conversation/managing conversations/delete conversation with messages when the conversation entry must also be removed." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups", @@ -4645,7 +4645,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Conversation group overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups overview-conversation-groups", - "content": "Conversation groups are Commercial . Keep group and membership stores synchronized from snapshots plus five events. import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, from '@/uni modules/unix openim sdk' const subscriptions = onConversationGroupAdded upsertGroup , onConversationGroupChanged upsertGroup , onConversationGroupDeleted removeGroup , onConversationGroupMemberAdded mergeMembers , onConversationGroupMemberDeleted removeMembers , subscriptions.forEach subscription = off subscription Merge by group and conversation IDs, preserve ordering, and reload snapshots after login or synchronization gaps." + "content": "Conversation groups are Commercial . They organize conversations into custom groups with a name, order, hidden state, unread snapshot, and member conversation IDs. Group types Creation uses OpenIMConversationGroupType ; queries use OpenIMConversationGroupQueryType . They belong to different operation contracts. Do not pass a UI tab index directly as either SDK type. One conversation can belong to several groups. Groups organize conversation entry points; they do not copy or move message data. Deleting a group or removing membership does not delete the underlying conversation. Group data Every OpenIMConversationGroupItem field is optional: | Field | Type | Description | | | | | | conversationGroupID | string or null | Stable group identifier. Cache only after validating it. | | name | string or null | Group name. | | order | number or null | Sort value. | | ex | string or null | Application extension; parse only a confirmed format. | | conversationGroupType | number or null | Group type. | | hidden | boolean or null | Whether the group is hidden. | | unreadCount | number or null | Group level unread snapshot. | | conversationIDs | string or null | Member IDs included in this response; it might not be a complete paginated set. | Use a non empty conversationGroupID as the index key. Names, order, and hidden state can change. Query group information with conversations /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations when complete membership, conversation objects, and total count are needed. Available operations | Task | Page | | | | | Create a group and optionally add one initial conversation | Create a conversation group /sdk/uniapp/conversation/managing conversation groups/create conversation group | | Query groups | Get conversation groups /sdk/uniapp/conversation/managing conversation groups/get conversation groups | | Query group metadata, members, and total count | Get a group with its conversations /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations | | Query all groups containing one conversation | Get groups for a conversation /sdk/uniapp/conversation/managing conversation groups/get conversation group by conversation id | | Add or remove membership | Add conversations to groups /sdk/uniapp/conversation/managing conversation groups/add conversations to groups , Remove conversations from groups /sdk/uniapp/conversation/managing conversation groups/remove conversations from groups | | Update name, extension, or hidden state | Update a conversation group /sdk/uniapp/conversation/managing conversation groups/update conversation group | | Change group ordering | Set conversation group order /sdk/uniapp/conversation/managing conversation groups/set conversation group order | | Delete a group | Delete a conversation group /sdk/uniapp/conversation/managing conversation groups/delete conversation group | Query a snapshot when the page opens. After a mutation Promise succeeds, continue to wait for an event or requery. When raw event fields are not frozen, never replace a query result with guessed local state. Listen for group changes The five group events return opaque JSON strings rather than typed objects: import off, onConversationGroupAdded, onConversationGroupChanged, onConversationGroupDeleted, onConversationGroupMemberAdded, onConversationGroupMemberDeleted, from '@/uni modules/unix openim sdk' function refreshFromRawGroupEvent payload : string try const value = JSON.parseObject payload if value = null refreshConversationGroups catch console.error 'Invalid conversation group event payload' const addedSubscription = onConversationGroupAdded refreshFromRawGroupEvent const subscriptions : Array = addedSubscription, onConversationGroupChanged refreshFromRawGroupEvent , onConversationGroupDeleted refreshFromRawGroupEvent , onConversationGroupMemberAdded refreshFromRawGroupEvent , onConversationGroupMemberDeleted refreshFromRawGroupEvent , subscriptions.forEach subscription = off subscription The added, changed, and deleted events describe group objects; the member added and member deleted events describe membership. Because the raw payload has no frozen DTO, validate only that it is valid JSON and then requery the related snapshot. Do not depend on unfrozen fields after JSON validation. Handlers should return quickly and isolate refresh tasks by the current logged in user. Stop old account writes before releasing each handle on account switch or dispose. Never log a complete payload because ex and other fields can contain application data." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group", @@ -4653,7 +4653,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a conversation group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups create-conversation-group", - "content": "import createConversationGroup from '@/uni modules/unix openim sdk' const group = await createConversationGroup groupName: 'Priority', conversationIDList This is Commercial . Use non empty unique conversation IDs and merge the returned group/event by its stable ID." + "content": "createConversationGroup Commercial creates a custom group and can add one initial conversation. Parameters | Parameter | Type | Required | Description | | | | | | | name | string | Yes | Group name. Validate blank values and length according to product rules. | | order | number | Yes | Sort value. Use one consistent direction throughout the product. | | conversationGroupType | OpenIMConversationGroupType | Yes | Group type allowed by the plugin contract. | | conversationID | string or null | No | Initial conversation added during creation. | | ex | string or null | No | Extension string. It is a complete value and is not merged as JSON. | import createConversationGroup from '@/uni modules/unix openim sdk' const result = await createConversationGroup name: 'Priority', order: 100, conversationGroupType: 0, conversationID, ex: '', const group = result?.conversationGroup Return result The Promise resolves directly to OpenIMCreateConversationGroupResult or null . Its conversationGroup is the new snapshot and can itself be null ; add it to the local index only after validating a non empty conversationGroupID . Promise completion and onConversationGroupAdded are separate stages. Requery after the raw event to reconcile the final list. If conversationID was provided, reconcile that membership from the query as well." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups", @@ -4661,7 +4661,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get conversation groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-groups", - "content": "import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups replaceConversationGroups result?.groups ?? This Commercial snapshot is ordered by server/Core state. Merge later group events and reload after account or synchronization changes." + "content": "getConversationGroups Commercial queries groups by conversationGroupType . conversationGroupType is a required OpenIMConversationGroupQueryType . Use the contract value for normal custom groups when rendering the normal grouping UI, or the contract value that queries all types when the product needs a complete snapshot. Do not mix a creation type, UI tab index, or local enum with the query type. import getConversationGroups from '@/uni modules/unix openim sdk' const result = await getConversationGroups conversationGroupType: 0 const groups = result?.conversationGroups ?? Return result The Promise resolves directly to OpenIMGetConversationGroupsResult or null . Read the snapshot from conversationGroups , deduplicate valid IDs, and sort by order . Conversation group fields Every OpenIMConversationGroupItem field can be absent: | Field | Type | Description | | | | | | conversationGroupID | string or null | Stable group ID and merge key for group events. Validate it before caching. | | name | string or null | Display name. | | order | number or null | Server/Core sort value. | | conversationGroupType | number or null | Group type. | | conversationIDs | string or null | Conversation IDs included in this snapshot, not complete conversation objects. | | hidden | boolean or null | Whether the group is hidden. | | unreadCount | number or null | Aggregate unread count snapshot. | | ex | string or null | Application extension string; parse only a confirmed format. | The item stores conversation IDs rather than complete conversation details. Use Get a group with its conversations /sdk/uniapp/conversation/managing conversation groups/get conversation group info with conversations when member conversation objects, pages, and the total count are needed. This operation only establishes a snapshot and does not trigger a group event. Merge later incremental events and query again to reconcile after reconnect, account change, or an event gap. See Conversation groups overview /sdk/uniapp/conversation/managing conversation groups/overview conversation groups for the event list." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations", @@ -4669,7 +4669,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-info-with-conversations", - "content": "import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID The Commercial result combines group metadata with member conversations. Treat it as a snapshot and merge later group/membership events by stable IDs." + "content": "getConversationGroupInfoWithConversations Commercial returns group metadata, the total conversation count, and one page of conversations. Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group to query. | | pagination.pageNumber | number | Yes | Page number; this contract example starts at 1 . | | pagination.showNumber | number | Yes | Conversations requested per page. | import getConversationGroupInfoWithConversations from '@/uni modules/unix openim sdk' const result = await getConversationGroupInfoWithConversations conversationGroupID: groupID, pagination: pageNumber: 1, showNumber: 100 , Return result The Promise resolves directly to OpenIMGetConversationGroupInfoWithConversationsResult or null : | Field | Type | Description | | | | | | conversationGroup | OpenIMConversationGroupItem or null | Group metadata. Do not continue paging if it is null . | | ConversationTotal | number or null optional | Total conversations. The initial uppercase C is part of the contract. | | conversations | OpenIMConversationItem | Current page. | Membership can change while pages load. Deduplicate by conversationID , and rebuild pagination on the first page or after a membership event. Do not replace ConversationTotal with the current array length." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id", @@ -4677,7 +4677,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for getConversationGroupByConversationID.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups get-conversation-group-by-conversation-id", - "content": "import getConversationGroupByConversationID from '@/uni modules/unix openim sdk' const result = await getConversationGroupByConversationID conversationID This Commercial operation returns the group association for one conversation. Use the returned group ID rather than inferring membership from UI order." + "content": "import getConversationGroupByConversationID from '@/uni modules/unix openim sdk' const result = await getConversationGroupByConversationID conversationID const groups = result?.conversationGroups ?? This Commercial operation returns every group containing one conversation. A conversation can belong to several groups, so do not read only the first item. Deduplicate by conversationGroupID ; an empty array means that the conversation currently belongs to no group, not that the query failed." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group", @@ -4685,7 +4685,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Update a conversation group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups update-conversation-group", - "content": "import updateConversationGroup from '@/uni modules/unix openim sdk' await updateConversationGroup conversationGroupID, groupName: 'Important' The Commercial update changes only supplied fields. Confirm final state through onConversationGroupChanged or a fresh group query." + "content": "updateConversationGroup Commercial updates only the supplied fields. Parameters | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group to update. | | name | string or null | No | New name. | | ex | string or null | No | New extension string; completely replaces the old value. | | hidden | boolean or null | No | Whether the application UI hides the group. | import updateConversationGroup from '@/uni modules/unix openim sdk' const result = await updateConversationGroup conversationGroupID: groupID, name: 'Important', hidden: false, Provide at least one real update field in addition to conversationGroupID . ex is a complete replacement; if several modules share it, read and merge their application namespaces first. Return result The Promise resolves directly to OpenIMUpdateConversationGroupResult or null . conversationGroup is the updated snapshot or null . Merge it immediately only when it has a valid ID, then reconcile through onConversationGroupChanged or a new query." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order", @@ -4693,7 +4693,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Reorder conversation groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups set-conversation-group-order", - "content": "import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupIDList Send the complete desired unique group ID order for this Commercial operation. Serialize concurrent reorder requests and refresh after failure." + "content": "setConversationGroupOrder Commercial submits group IDs with their new sort values in one batch. Parameters conversationGroupOrders is a non empty array. Every item contains: | Parameter | Type | Required | Description | | | | | | | conversationGroupID | string | Yes | Group to reorder. | | order | number | Yes | New sort value. Avoid duplicate values or unstable ordering rules in one batch. | import setConversationGroupOrder from '@/uni modules/unix openim sdk' await setConversationGroupOrder conversationGroupOrders: conversationGroupID: 'group a', order: 100 , conversationGroupID: 'group b', order: 200 , , Submit the complete affected set once when dragging ends rather than issuing one request per movement. Deduplicate by conversationGroupID and calculate all affected values with a stable algorithm. Return result The Promise resolves directly to a string result, meaning the reorder request completed. Requery groups or await the group change event to confirm final ordering. If several clients edit concurrently, use the final server order rather than retaining only the local drag order." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups", @@ -4701,7 +4701,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Add conversations to groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups add-conversations-to-groups", - "content": "import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationGroupIDList, conversationIDList This Commercial batch adds explicit conversations to explicit groups. Deduplicate both arrays and confirm membership from events or a new snapshot." + "content": "addConversationsToGroups Commercial updates membership using explicit sets of conversation IDs and group IDs. Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversations to add. | | conversationGroupIDs | string | Yes | Target groups. Every conversation is added to every target group. | import addConversationsToGroups from '@/uni modules/unix openim sdk' await addConversationsToGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , Both arrays must be non empty. Remove blank values and duplicates before calling. One conversation can belong to several groups; this operation does not alter its messages or remove its other group memberships. Return result The Promise resolves directly to Core's string result, meaning the membership request completed. It does not mean that the local group member event has arrived. Confirm final membership through onConversationGroupMemberAdded or a new query, and never retain a local only membership after failure. See Conversation groups overview /sdk/uniapp/conversation/managing conversation groups/overview conversation groups for the complete raw event handling." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups", @@ -4709,7 +4709,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Remove conversations from groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups remove-conversations-from-groups", - "content": "import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationGroupIDList, conversationIDList This Commercial batch changes group membership only; it does not hide or delete conversations. Refresh membership after partial or failed operations." + "content": "removeConversationsFromGroups Commercial uses the same membership parameters as the add operation. Parameters | Parameter | Type | Required | Description | | | | | | | conversationIDs | string | Yes | Conversations to remove. | | conversationGroupIDs | string | Yes | Groups from which to remove them. | import removeConversationsFromGroups from '@/uni modules/unix openim sdk' await removeConversationsFromGroups conversationIDs: conversationID , conversationGroupIDs: 'group a' , Both arrays must be non empty and deduplicated. Removing membership does not delete a conversation or its messages and does not affect that conversation's membership in other groups. Return result The Promise resolves directly to a string result, meaning the request completed rather than proving that the local snapshot is updated. Process onConversationGroupMemberDeleted or requery the group. Let the server's final state handle a repeated removal; do not retry forever or fabricate local success after failure." }, { "path": "/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group", @@ -4717,7 +4717,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete a conversation group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp conversation managing-conversation-groups delete-conversation-group", - "content": "import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID Deleting a Commercial group does not delete its conversations or messages. Confirm destructive UI and remove the group only after the event or refreshed snapshot." + "content": "deleteConversationGroup Commercial deletes one conversation group. The required conversationGroupID must come from the current account's group snapshot, not a name or array index. import deleteConversationGroup from '@/uni modules/unix openim sdk' await deleteConversationGroup conversationGroupID: groupID Return result The Promise resolves directly to a string result, meaning the deletion request completed. Deleting a group does not delete its conversations, messages, or the underlying conversation records. Ask for confirmation in the UI. After success, use onConversationGroupDeleted or a new query to remove the local group and membership indexes by conversationGroupID . Do not hide the group before a failed Promise, and prefer a new snapshot when event and local state disagree." }, { "path": "/sdk/uniapp/group/overview-group", @@ -4725,7 +4725,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Group overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group overview-group", - "content": "Groups use stable groupID keys. Build snapshots and then merge group events idempotently. import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted from '@/uni modules/unix openim sdk' const subscriptions = onGroupInfoChanged upsertGroup , onGroupDismissed removeGroup , onJoinedGroupAdded upsertGroup , onJoinedGroupDeleted removeGroup , subscriptions.forEach subscription = off subscription Treat membership roles, mute state, join policy, and commercial extension fields as server authoritative. Reload after login or synchronization gaps." + "content": "The group domain uses groupID as its stable primary key and includes group profiles, members, applications, and permissions. Group name, avatar, announcement, owner, and member count are mutable snapshots. Core data types | Type | Use case | | | | | OpenIMGroupItem | Joined group lists, group profile pages, and group state. | | OpenIMCreateGroupInfo | Name, type, announcement, introduction, avatar, and extension submitted when creating a group. | | OpenIMGroupMemberItem | Member profile, role, join source, and mute end time. | | OpenIMGroupApplicationItem | Join application, applicant, and processing state. | Common OpenIMGroupItem fields include groupID , groupName , notification , introduction , faceURL , ownerUserID , memberCount , status , groupType , needVerification , lookMemberInfo , applyMemberFriend , and ex . attachedInfo is a Commercial field ; parse it only according to a confirmed contract. Use groupID:userID as the stable merge key for a member. A member's in group nickname and faceURL are member snapshots and must not overwrite account level profile data. Find a task | Task | Page | | | | | Create, update, dismiss, or leave a group | Create a group /sdk/uniapp/group/create group , Update a group /sdk/uniapp/group/update group profile , Dismiss a group /sdk/uniapp/group/dismiss group , Leave a group /sdk/uniapp/group/quit group | | Page through joined groups or query selected profiles | List joined groups by page /sdk/uniapp/group/retrieving groups/get joined group list page , Get specified groups /sdk/uniapp/group/retrieving groups/get specified groups info | | Query, search, and manage members | List group members /sdk/uniapp/group/retrieving group members/get group member list , Search group members /sdk/uniapp/group/retrieving group members/search group members | | Invite or remove members and transfer ownership | Invite users /sdk/uniapp/group/managing group members/invite user to group , Remove members /sdk/uniapp/group/managing group members/kick group member , Transfer ownership /sdk/uniapp/group/managing group members/transfer group owner | | Send, query, and process join applications | Join a group /sdk/uniapp/group/join group , Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient | | Configure mute, verification, and member permissions | Use the corresponding group settings and member management pages. | State updates This page owns the four group profile and joined list events. Subscribe before querying the joined group snapshot. import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription Merge every event idempotently by groupID . Dismissal, active leave, and removal by another member have different business causes, but each can require closing the current chat page. onGroupInfoChanged updates profile data, onGroupDismissed means the group was dismissed, and onJoinedGroupAdded / onJoinedGroupDeleted update the current account's joined group list. Promise success, event arrival, and requery are three stages. Requery snapshots after App restoration, synchronization, or re login. Treat roles, mute state, join policy, and commercial extensions as server authoritative. Degrade when fields are absent instead of inventing default permission. Stop sending and clear the member store when the current user can no longer access the group. Release every owned handle on logout or group store destruction." }, { "path": "/sdk/uniapp/group/create-group", @@ -4733,7 +4733,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group create-group", - "content": "import createGroup from '@/uni modules/unix openim sdk' const result = await createGroup groupInfo: groupName: 'Project' , memberUserIDs: 'user b' Use valid group type and member IDs, then merge the returned group/event by groupID . Creation is not proof that every optional invite succeeded; reload membership when needed." + "content": "createGroup creates a group with initial profile data and member lists. Parameters | Parameter | Type | Required | Description | | | | | | | groupInfo.groupName | string | Yes | Group name. | | groupInfo.groupType | 2 | Yes | Group type supported by the current contract. | | groupInfo.notification | string or null | No | Initial announcement. | | groupInfo.introduction | string or null | No | Initial introduction. | | groupInfo.faceURL | string or null | No | Avatar URL. | | groupInfo.ex | string or null | No | Complete extension string. | | memberUserIDs | string | Yes | Initial regular members. | | adminUserIDs | string or null | No | Initial administrators. | import createGroup from '@/uni modules/unix openim sdk' const group = await createGroup groupInfo: groupName: 'Project group', groupType: 2 , memberUserIDs: 'user b', 'user c' , adminUserIDs: 'user b' , Remove blank and duplicate member IDs first. Administrators must also satisfy the server's membership and role rules; do not put the same user into conflicting role lists. ex is not merged as JSON by the SDK. Return result The Promise resolves directly to OpenIMGroupItem or null . Merge a non null result into the group store by groupID ; do not create a local only group for null . Promise success means that the creation request completed, not that every optional membership change has been observed. Reconcile the group list through onJoinedGroupAdded or a group query, and verify initial members and administrators through the member list." }, { "path": "/sdk/uniapp/group/update-group-profile", @@ -4741,7 +4741,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Update group profile.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: 'New project name', faceURL: avatarURL Pass only fields that should change. The server enforces role permissions; confirm final data through onGroupInfoChanged or a new query." + "content": "Use setGroupInfo to update basic group profile fields. Pass only the values that actually changed. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group to update. | | groupName | string or null | No | New group name. | | introduction | string or null | No | New introduction. | | faceURL | string or null | No | New avatar URL. | Provide at least one actual profile field besides groupID ; omitted fields retain their values. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, Do not mix announcement, join verification, or member permission fields into the ordinary profile save flow; editing a name must not overwrite unrelated settings. The server enforces owner/admin permission. Promise success means that OpenIMServer completed the request. Merge onGroupInfoChanged by groupID or call getSpecifiedGroupsInfo for immediate reconciliation. Do not overwrite fields that were not submitted. displayIsRead is a Commercial field . Do not send it when the public server or installed edition does not expose the capability." }, { "path": "/sdk/uniapp/group/set-group-announcement", @@ -4749,7 +4749,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Publish a group announcement.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-announcement", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, notification: 'Release on Friday at 17:00' Send only notification , then confirm its update time and author from group information. Announcements are visible to members and must not contain secrets." + "content": "Update a group's announcement through setGroupInfo and pass only notification in addition to groupID . import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, notification: 'Release on Friday at 17:00' Passing only the announcement avoids overwriting group name, avatar, or policy fields. Promise success means that the update request completed. Merge onGroupInfoChanged or query the group again to confirm notification , notificationUpdateTime , and notificationUserID . Announcements are visible to group members. Do not include tokens, internal secrets, or moderation evidence, and apply the product's length and content validation before submission." }, { "path": "/sdk/uniapp/group/set-group-extension", @@ -4757,7 +4757,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set group extra data.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-extension", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, ex: JSON.stringify department: 'R&D' ex is a whole value replacement. Parse and merge the existing versioned schema, preserve unknown fields, and never place secrets in member readable data." + "content": "Use setGroupInfo to replace the group's ex string. Read and merge the current versioned schema before writing. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, ex: JSON.stringify ...previous, projectID: 'project 42', , ex is a complete replacement. When several modules share it, use stable namespaces and preserve fields owned by the others. If parsing fails, keep the original value rather than overwriting it. Members allowed to read group profiles can see this data, so never store secrets. After Promise success, merge the latest group profile from onGroupInfoChanged by groupID or query it again." }, { "path": "/sdk/uniapp/group/set-group-join-verification", @@ -4765,7 +4765,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set group join verification.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-join-verification", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 Use exported OpenIMGroupNeedVerification constants. The policy affects future joins, not existing members or requests; confirm from the updated group." + "content": "Use setGroupInfo to change how future applications and invitations are verified. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, needVerification: 1 The OpenIMGroupNeedVerification range is: | needVerification | Meaning | | | | | 0 | User applications require review; member invitations can join directly. | | 1 | Applications and ordinary member invitations require review; owner/admin invitations are exempt. | | 2 | Applications and invitations can join directly. | Use the exported contract type rather than a UI index. The client can explain the policy, but OpenIMServer remains authoritative. It affects future applications and invitations and does not reprocess existing members or pending requests. After Promise success, merge the latest group through onGroupInfoChanged by groupID or query it again." }, { "path": "/sdk/uniapp/group/set-group-member-profile-access", @@ -4773,7 +4773,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set member profile access.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-profile-access", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 Use valid OpenIMGroupOption values. The server remains responsible for privacy enforcement; hiding a client control is not sufficient protection." + "content": "Use setGroupInfo to control whether ordinary members can view other members' profiles. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, lookMemberInfo: 1 The OpenIMGroupOption values are: | lookMemberInfo | Meaning | | | | | 0 | Allow members to view other members' profiles. | | 1 | Disallow members from viewing other members' profiles. | Do not interpret this as a normal boolean where 0 is false and 1 is true. It is independent of the friend application policy and does not replace backend privacy authorization. The server remains responsible for enforcement. After Promise success, merge the latest group through onGroupInfoChanged by groupID ." }, { "path": "/sdk/uniapp/group/set-group-member-friend-permission", @@ -4781,7 +4781,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set member friend request permission.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group set-group-member-friend-permission", - "content": "import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 Use valid OpenIMGroupOption values. The server enforces this policy; UI visibility alone is not an authorization boundary." + "content": "Use setGroupInfo to control whether a user can start a friend application from the group member relationship. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, applyMemberFriend: 1 The OpenIMGroupOption values are: | applyMemberFriend | Meaning | | | | | 0 | Allow friend applications through group membership. | | 1 | Disallow friend applications through group membership. | This policy controls only the friend application entry from a group member relationship; it is not the same as hiding member profiles. The server enforces it, so UI visibility is not an authorization boundary. Promise success means that the update request completed. Merge the latest value from onGroupInfoChanged by groupID ." }, { "path": "/sdk/uniapp/group/change-group-mute", @@ -4789,7 +4789,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Change group mute status.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group change-group-mute", - "content": "import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true The server validates moderator permissions. Confirm group wide mute from updated group information; do not assume it changes individual member mute expirations identically." + "content": "changeGroupMute turns group wide mute on or off. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group to update. | | isMute | boolean | Yes | true enables group wide mute; false disables it. | import changeGroupMute from '@/uni modules/unix openim sdk' await changeGroupMute groupID, isMute: true Only the owner or an administrator with server permission can perform this operation. The server still validates group state, role changes, and concurrent updates. Owners and administrators can normally keep sending, so group wide mute does not necessarily silence every account. Wasm's commercial muteBypassUserIDs extension is not present in the current uni app / uni app x contract. Do not pass that field. Even if a commercial server supports exceptions, rely on the exported plugin type and subsequent group snapshot. Return result The Promise resolves directly to a string result, meaning the server completed this mute request. It does not mean that every member UI updated. Merge onGroupInfoChanged by groupID or query the group again. Group wide mute and an individual member's mute interval are separate capabilities." }, { "path": "/sdk/uniapp/group/join-group", @@ -4797,7 +4797,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Apply to join a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group join-group", - "content": "import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: 'Please add me', joinSource: 2, ex: '' Use the documented GroupJoinSource value and keep request text free of secrets. Promise completion may mean pending verification rather than membership; verify from application state/events." + "content": "joinGroup submits the current user's request to join a group. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group to join. | | reqMsg | string | Yes | Application comment, which can be shown to owners or administrators. | | joinSource | number | Yes | Join source value agreed by the product and server. | | ex | string or null | No | Application extension; use only a confirmed format. | import joinGroup from '@/uni modules/unix openim sdk' await joinGroup groupID, reqMsg: 'Please add me', joinSource: 2, ex: '' The application comment and ex can be stored with the application. Do not include tokens, internal risk information, or unnecessary personal data. Verify that the group exists and the current user is not already a member. Promise success does not always mean membership. A no verification group can join directly, while another policy creates a pending application. Determine final state from application events, onJoinedGroupAdded , or a new joined group query. Never create local member state before the server confirms it." }, { "path": "/sdk/uniapp/group/quit-group", @@ -4805,7 +4805,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Leave a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group quit-group", - "content": "import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID Ask for confirmation. The group owner may need to transfer ownership or dismiss the group instead. Remove local state only after an event or refreshed joined group list." + "content": "quitGroup leaves one joined group for the current account. import quitGroup from '@/uni modules/unix openim sdk' await quitGroup groupID Ask for confirmation. The owner normally cannot leave directly and must first transfer ownership or dismiss the group. After success, close the group chat and reconcile through a joined group deletion event or a new query. Promise success means that the leave request completed, not that group list and member events have arrived. Remove this account's chat entry, member pages, and send permission by groupID ; other members retain the group. Serialize ownership transfer and leave: confirm the new owner through an event or query before calling quitGroup . Preserve chat and group state on failure instead of deleting it only because the user confirmed the dialog." }, { "path": "/sdk/uniapp/group/dismiss-group", @@ -4813,7 +4813,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Dismiss a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group dismiss-group", - "content": "import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID This owner only destructive action ends the group according to server policy. Confirm explicitly and process onGroupDismissed ; do not equate local navigation with successful dismissal." + "content": "dismissGroup permanently dismisses one group. Only an authorized owner can perform this high risk operation. import dismissGroup from '@/uni modules/unix openim sdk' await dismissGroup groupID Ask for explicit confirmation and show the group name and member impact. Prevent duplicate taps. The server validates ownership and current group state; local ownerUserID is not sufficient authorization. Promise success means that the dismiss request completed, not that every client processed the event. Wait for onGroupDismissed / onJoinedGroupDeleted or requery, then remove group, member, and chat entry state by groupID . Close the chat and management UI and stop sending group messages. Preserve current state when the Promise fails." }, { "path": "/sdk/uniapp/group/retrieving-groups/get-specified-groups-info", @@ -4821,7 +4821,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get group information.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-specified-groups-info", - "content": "import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo 'group a', 'group b' Results can be missing or reordered. Map by groupID and treat server returned role, policy, and mute fields as authoritative snapshots." + "content": "Group profile queries establish snapshots and do not trigger group events. Public group discovery and complex business directory permission filtering belong to the application backend; this SDK query works with known groupID values. getSpecifiedGroupsInfo receives an array of group IDs: import getSpecifiedGroupsInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupsInfo groupIDs const groups = result?.groups ?? Pass an array even when querying one group, and verify that a result exists rather than assuming groups 0 . Groups have no SDK URL or slug field; resolve an application route to a stable groupID first. The Promise returns matching OpenIMGroupItem in groups . It can be shorter or differently ordered than the input because a group is absent, dismissed, or inaccessible. Map by groupID and split a large ID set into batches. Merge subsequent events by groupID as shown in Group overview /sdk/uniapp/group/overview group ." }, { "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list", @@ -4829,7 +4829,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list", - "content": "import getJoinedGroupList from '@/uni modules/unix openim sdk' const result = await getJoinedGroupList replaceJoinedGroups result?.groups ?? Use this for a complete manageable snapshot, deduplicate by groupID , and merge joined/deleted/info events. Use the paged API for large lists." + "content": "getJoinedGroupList reads the current account's complete local joined group snapshot in one call. import getJoinedGroupList from '@/uni modules/unix openim sdk' const result = await getJoinedGroupList replaceJoinedGroups result?.groups ?? The Promise resolves to OpenIMGroupListResult or null ; read groups from groups and deduplicate by groupID . Use the paginated operation for large lists rather than loading an unbounded local database. This query establishes a snapshot and does not trigger group events. Merge joined, deleted, and info events from Group overview /sdk/uniapp/group/overview group , and requery after login or synchronization gaps." }, { "path": "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page", @@ -4837,7 +4837,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", - "content": "import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 Continue until a page returns fewer than count items. Group state may change during pagination, so deduplicate by groupID and merge events idempotently." + "content": "Use getJoinedGroupListPage for accounts with many joined groups. Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Offset; use 0 for the first page. | | count | number | Yes | Number of groups to read. | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? Return result The Promise resolves directly to OpenIMGroupListResult or null ; groups contains the current page. Increase the offset until a page contains fewer than count items. Group profile fields | Field | Description | | | | | groupID | Stable group identifier. | | groupName , faceURL | Group name and avatar snapshot. | | notification , introduction | Announcement and introduction. | | ownerUserID , creatorUserID , createTime | Owner, creator, and creation time. | | memberCount , status , groupType | Member count, group state, and type snapshot. | | needVerification | Join verification policy. | | lookMemberInfo , applyMemberFriend | Member profile and friend application policy. | | notificationUpdateTime , notificationUserID | Latest announcement update metadata. | | ex | Application extension string. | | attachedInfo Commercial field | Commercial attachment data; parse only a confirmed contract. | Member count and permission fields are snapshots and do not replace member pagination or server authorization. See Group overview /sdk/uniapp/group/overview group for events and the model. Group events can move page boundaries. Merge pages into a map keyed by groupID , rebuild from offset 0 after App restoration/synchronization or group add/delete events, and stop old account page writes during account switching. Use the first page to replace the current account's group snapshot and later pages to merge by groupID . Do not retain old account group objects after switching users. Group names and member counts can change while paging, so calculate visible ordering only after merging the latest snapshot and events." }, { "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", @@ -4845,7 +4845,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups is-join-group", - "content": "import isJoinGroup from '@/uni modules/unix openim sdk' const joined = await isJoinGroup groupID Use the returned boolean for current membership, but refresh after join/quit events or account changes. This query neither joins the group nor checks moderation permissions." + "content": "isJoinGroup returns whether the current account belongs to a specific group. import isJoinGroup from '@/uni modules/unix openim sdk' const joined = await isJoinGroup groupID The boolean is a snapshot at query time. Refresh it after join, leave, dismissal, removal, re login, or account change instead of caching one true permanently. This query neither joins the group nor proves moderator permission. When not joined, follow the group's verification policy and application flow rather than creating local member state." }, { "path": "/sdk/uniapp/group/retrieving-groups/search-groups", @@ -4853,7 +4853,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Search groups.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups search-groups", - "content": "import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: 'project' , isSearchGroupID: true, isSearchGroupName: true Reject empty searches, map results by groupID , and distinguish local/joined group search semantics from a server wide group directory." + "content": "searchGroups searches only groups joined by the current user and already synchronized locally. The current interface uses the first keyword in keywordList . Parameters | Parameter | Type | Required | Description | | | | | | | keywordList | string | Yes | One trimmed, non empty keyword. | | isSearchGroupID | boolean | Yes | Whether to match groupID . | | isSearchGroupName | boolean | Yes | Whether to match group name. | import searchGroups from '@/uni modules/unix openim sdk' const result = await searchGroups keywordList: keyword.trim , isSearchGroupID: true, isSearchGroupName: true, const groups = result?.groups ?? Return result groups contains matching OpenIMGroupItem . Reject an empty keyword in the UI. Deduplicate results by groupID ; they are a snapshot for the current keyword and must not replace the complete joined group list. This is not a server wide group directory. Public discovery, classification, and complex permission filters belong to a trusted application backend." }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient", @@ -4861,7 +4861,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get received group applications.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-recipient", - "content": "Register request events before loading the received snapshot. import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected from '@/uni modules/unix openim sdk' const subscriptions = onGroupApplicationAdded upsertRequest , onGroupApplicationAccepted upsertRequest , onGroupApplicationRejected upsertRequest , onGroupApplicationDeleted removeRequest , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceRequests result?.applications ?? subscriptions.forEach subscription = off subscription Merge with a stable group/applicant key and use explicit accept/reject operations." + "content": "getGroupApplicationListAsRecipient queries applications that the current account can manage. This page owns the added, accepted, rejected, and deleted application events. Parameters The parameter object can be omitted. For explicit pagination, offset and count are optional; use 0 for the first offset. Unlike the Wasm page, the Unix OpenIMApplicationListParams has no handleResults filter, so filter by handleResult after the query. Register events before loading the received snapshot. import getGroupApplicationListAsRecipient, off, onGroupApplicationAccepted, onGroupApplicationAdded, onGroupApplicationDeleted, onGroupApplicationRejected, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const addedSubscription = onGroupApplicationAdded item = upsertGroupApplication item const subscriptions : Array = addedSubscription, onGroupApplicationAccepted item = upsertGroupApplication item , onGroupApplicationRejected item = upsertGroupApplication item , onGroupApplicationDeleted item = removeGroupApplication item , const result = await getGroupApplicationListAsRecipient offset: 0, count: 50 replaceReceivedGroupApplications result?.applications ?? subscriptions.forEach subscription = off subscription Return result The Promise resolves directly to OpenIMGroupApplicationListResult or null ; applications contains the current page. Do not convert null into an empty state. Empty applications means that the page has no records; null requires login/error handling. Reset offset after processing an application to avoid duplicates across changed pages. Group application fields OpenIMGroupApplicationItem combines a group snapshot and applicant information: | Fields | Description | | | | | groupID , groupName , groupFaceURL | Target group ID, name, and avatar snapshot. | | notification , introduction | Announcement and introduction snapshot. | | ownerUserID , creatorUserID | Owner and creator user IDs. | | groupType , status , memberCount | Group type, state, and member count snapshot. | | userID , nickname , userFaceURL | Applicant ID, nickname, and avatar snapshot. | | handleResult | Pending, accepted, or rejected processing state. | | reqMsg , reqTime | Application comment and time. | | joinSource , inviterUserID | Join source and inviter. | | handleUserID , handledMsg , handledTime | Processing user, comment, and time. | | ex , attachedInfo | Extension and attachment data; parse only a confirmed contract. | Use groupID:userID as the application key. Names and avatars are snapshots; query current group or user data when freshness matters. handleResult , handledMsg , and handledTime describe the server's current processing snapshot. Do not derive permission only from these fields: the owner or administrator role can change after the record was created. reqMsg , ex , and attachedInfo are application controlled or service attachment data and must be rendered and logged under the product's privacy policy. Listen for application changes Merge all four events idempotently by groupID:userID ; a deletion event removes that key. Route received and sent application state according to the current account's role. Reset pagination after changes, and requery when owner/admin permission changes. Use the explicit accept or reject API instead of changing handleResult locally. Promise success, the application event, and later group/member updates are separate stages. Release every subscription on logout, account switch, or application store destruction. When an application is accepted, update the joined group list and member list through their own events or queries rather than inferring membership solely from this application record. Group profile changes and applicant nickname changes also require their domain snapshots; an old application item is not a live profile cache." }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-list-as-applicant", @@ -4869,7 +4869,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get sent group applications.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications get-group-application-list-as-applicant", - "content": "import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 This lists requests sent by the current account. Deduplicate across changing pages and reload after application events or App restoration." + "content": "getGroupApplicationListAsApplicant queries applications sent by the current account and returns OpenIMGroupApplicationListResult or null . Parameters The parameter object can be omitted. For explicit pagination: | Parameter | Type | Required | Description | | | | | | | offset | number or null | No | Offset; use 0 for the first page. | | count | number or null | No | Number of applications to read. | import getGroupApplicationListAsApplicant from '@/uni modules/unix openim sdk' const result = await getGroupApplicationListAsApplicant offset: 0, count: 50 Return result After Promise success, applications contains the current account's sent OpenIMGroupApplicationItem . See Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient for all fields. The query itself creates no application event. Use groupID:userID as the stable key and route events according to the current account's role. Reset pagination when state changes while a page is loading. Requery after reconnect, re login, or any interval in which events may have been missed." }, { "path": "/sdk/uniapp/group/group-applications/get-group-application-unhandled-count", @@ -4893,7 +4893,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Accept a group application.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications accept-group-application", - "content": "import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID, handleMsg: 'Accepted' The server validates moderator authority and request state. Disable duplicate UI actions and confirm both request and member state from events or snapshots." + "content": "acceptGroupApplication lets an authorized group member accept one join application. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | fromUserID | string | Yes | Applicant user ID. | | handleMsg | string | Yes | Processing comment. It can be shown to the applicant, so do not include internal risk information. | import acceptGroupApplication from '@/uni modules/unix openim sdk' await acceptGroupApplication groupID, fromUserID: 'user b', handleMsg: 'Approved' Promise success means that the accept request completed, not that both the application and member events arrived. Refresh the application and member lists separately, or merge onGroupApplicationAccepted and onGroupMemberAdded by their respective keys. Lock this application while the request is in flight so accept and reject cannot race. The server validates permission, current application state, member limits, and duplicate membership. On failure, preserve the application and requery instead of changing local handleResult ." }, { "path": "/sdk/uniapp/group/group-applications/refuse-group-application", @@ -4901,7 +4901,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Reject a group application.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications refuse-group-application", - "content": "import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID, handleMsg: 'Not accepted' Keep private moderation evidence out of the handling text. Acceptance and rejection are mutually exclusive; confirm from events or a refreshed request list." + "content": "refuseGroupApplication uses the same application identity fields as acceptance. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | fromUserID | string | Yes | Applicant user ID. | | handleMsg | string | Yes | Rejection comment, which can be visible to the applicant. | import refuseGroupApplication from '@/uni modules/unix openim sdk' await refuseGroupApplication groupID, fromUserID, handleMsg: 'Not accepted' Do not place internal risk information, internal account names, or sensitive review evidence in handleMsg . Lock the application while the request is in flight so accept and reject cannot race. Promise success means that the reject request completed, not that onGroupApplicationRejected arrived. Use the event or a new query as final state. Preserve the application on failure instead of hiding it locally." }, { "path": "/sdk/uniapp/group/group-applications/delete-group-requests", @@ -4909,7 +4909,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete group applications.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group group-applications delete-group-requests", - "content": "import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID This Commercial batch deletes request records, not group membership. Confirm targets and refresh both request list and count after any failure." + "content": "deleteGroupRequests Commercial deletes explicitly selected application records. Parameters groupRequests is a non empty array of OpenIMSimpleGroupRequest items: | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | fromUserID | string | Yes | Applicant user ID. | import deleteGroupRequests from '@/uni modules/unix openim sdk' await deleteGroupRequests groupRequests: groupID, fromUserID Use groupID:fromUserID to identify and deduplicate records. Deleting history is not the same as rejecting a pending application and does not remove an existing member. Promise success means that the delete request completed; a deletion event can arrive afterward. See Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient for the complete listener. After batch failure, do not assume which records were deleted; requery the application list and count." }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-group-member-list", @@ -4917,7 +4917,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for List group members.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-group-member-list", - "content": "import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged from '@/uni modules/unix openim sdk' const added = onGroupMemberAdded upsertMember const deleted = onGroupMemberDeleted removeMember const changed = onGroupMemberInfoChanged upsertMember const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? off added ; off deleted ; off changed Use exported filters, paginate, and merge by groupID,userID . Reload after role or synchronization changes." + "content": "getGroupMemberList reads members by filter and page. This page owns the added, deleted, and info changed member events. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | filter | number | Yes | Server defined member filter; do not use a UI index. | | offset | number | Yes | Offset; use 0 for the first page. | | count | number | Yes | Members requested in this page. | import getGroupMemberList, off, onGroupMemberAdded, onGroupMemberDeleted, onGroupMemberInfoChanged from '@/uni modules/unix openim sdk' const added = onGroupMemberAdded member = upsertMember member const deleted = onGroupMemberDeleted member = removeMember member.groupID, member.userID const changed = onGroupMemberInfoChanged member = upsertMember member const result = await getGroupMemberList groupID, filter: 0, offset: 0, count: 100 replaceMembers result?.members ?? off added ; off deleted ; off changed The Promise resolves directly to OpenIMGroupMemberListResult or null ; members contains the current page. A null result is not the same as an empty member page. Preserve error/loading state for null , and interpret an empty array as a valid page with no members. Group member fields | Field | Description | | | | | groupID , userID | Stable member identity, combined as groupID:userID . | | nickname , faceURL | In group display profile. | | roleLevel | Owner, administrator, or regular member role. | | joinTime , joinSource , inviterUserID | Join time, source, and inviter. | | muteEndTime | Mute end time; compare it with current time. | | operatorUserID | User that performed the latest relevant operation. | | ex , attachedInfo | Extension data; parse only a confirmed business contract. | Cache by groupID:userID . Do not overwrite in group display data with account level getUsersInfo results, and do not reuse role or mute state across groups. Continue until a page is shorter than count . Joins, exits, removals, and role changes can move page boundaries, so merge events by key and rebuild from offset 0 when complete ordering matters. Listen for member changes This page is the complete owner for the three member events. Add or replace by groupID:userID ; delete the exact same key. Do not mutate an array position when pagination and events run concurrently. If deletion targets the current user, stop sending and refresh the joined group list. Recompute permissions after role or mute changes. Release every handle on logout, account switch, or member store destruction. Query Promise success establishes only a page snapshot and does not itself trigger member events. Inviting, removing, muting, or editing a member has three possible observations: the mutation Promise, the member event, and a reconciliation query. Treat them separately and never make a local object change stand in for server confirmation." }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-specified-group-members-info", @@ -4925,7 +4925,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get specified group member profiles.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-specified-group-members-info", - "content": "import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList: 'user a', 'user b' Map results by userID ; missing entries can reflect non membership or access policy. Do not rely on input order." + "content": "getSpecifiedGroupMembersInfo queries selected users' member profiles in one group. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | userIDList | string | Yes | Member user IDs to query. | import getSpecifiedGroupMembersInfo from '@/uni modules/unix openim sdk' const result = await getSpecifiedGroupMembersInfo groupID, userIDList: 'user a', 'user b' The Promise returns matching OpenIMGroupMemberItem in members . Results can be shorter or differently ordered because a user is not a member or cannot be accessed. Do not rely on input position. The same user can have a different nickname, role, and mute state in each group. Cache by groupID:userID , not only userID , and do not replace member data with ordinary public profile data. The query does not trigger events; later changes are owned by List group members /sdk/uniapp/group/retrieving group members/get group member list ." }, { "path": "/sdk/uniapp/group/retrieving-group-members/get-users-in-group", @@ -4933,7 +4933,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Check group membership.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members get-users-in-group", - "content": "import getUsersInGroup from '@/uni modules/unix openim sdk' const result = await getUsersInGroup groupID, userIDList Use this to check which requested users belong to one group. Interpret results by user ID, not position; it does not add or remove members." + "content": "getUsersInGroup filters a candidate list to the user IDs that belong to one group. It returns string or null . import getUsersInGroup from '@/uni modules/unix openim sdk' const members = await getUsersInGroup groupID, userIDList: candidateUserIDs The result contains user IDs only, not member profiles. Query specified members when the UI needs in group nickname, role, or mute state. Deduplicate input first and interpret results by value rather than input position. Treat null as no valid result and an empty array as no matching members. This operation does not add, invite, or remove members and does not trigger a member event." }, { "path": "/sdk/uniapp/group/retrieving-group-members/search-group-members", @@ -4941,7 +4941,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Search group members.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-group-members search-group-members", - "content": "import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: 'Alice' , isSearchUserID: true, isSearchMemberNickname: true Reject empty keywords and use explicit search flags. This searches group member data and does not replace public user lookup." + "content": "searchGroupMembers searches members within one group, for example to build an @ mention picker. The current interface uses only the first keyword. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | keywordList | string | Yes | Search keywords; pass one trimmed non empty keyword. | | isSearchUserID | boolean | Yes | Whether to match user ID. | | isSearchMemberNickname | boolean | Yes | Whether to match in group nickname. | import searchGroupMembers from '@/uni modules/unix openim sdk' const result = await searchGroupMembers groupID, keywordList: keyword.trim , isSearchUserID: true, isSearchMemberNickname: true, const members = result?.members ?? Unlike the Wasm version, this interface has no offset or count ; it returns the current matches. Reject an empty keyword and replace the search snapshot when the input changes. members contains matching OpenIMGroupMemberItem . Deduplicate by groupID:userID and do not replace the complete member list. This searches member data, not the global user directory." }, { "path": "/sdk/uniapp/group/managing-group-members/invite-user-to-group", @@ -4949,7 +4949,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Invite users to a group.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members invite-user-to-group", - "content": "import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, userIDList: 'user b' , reason: 'Project collaboration' The server applies group policy and permissions. Promise completion does not guarantee every target joined; confirm with member events or a refreshed member list." + "content": "Owners and administrators can manage members within the permissions granted by OpenIMServer. The client can use roleLevel to display controls, but the server remains authoritative. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | reason | string | Yes | Invitation comment; pass an empty string if unused. | | userIDList | string | Yes | Users to invite. | import inviteUserToGroup from '@/uni modules/unix openim sdk' await inviteUserToGroup groupID, userIDList: 'user b' , reason: 'Project collaboration' Deduplicate userIDList . The reason can be visible to invitees, so do not include tokens or other sensitive information. Promise success means that the server accepted the invitation request, not that every target joined. A policy requiring review can first produce an application event. Merge actual members through onGroupMemberAdded or query the member list again." }, { "path": "/sdk/uniapp/group/managing-group-members/kick-group-member", @@ -4957,7 +4957,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Remove group members.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members kick-group-member", - "content": "import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, userIDList: 'user b' , reason: 'Removed by moderator' Confirm this destructive moderation action and keep private evidence out of a potentially visible reason. Apply member deleted events or reload membership." + "content": "An authorized owner or administrator can call kickGroupMember . Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group from which to remove members. | | reason | string | Yes | Removal comment; use an empty string when no public explanation is needed. | | userIDList | string | Yes | Members to remove. | import kickGroupMember from '@/uni modules/unix openim sdk' await kickGroupMember groupID, userIDList: 'user b' , reason: 'Removed by moderator' This operation cannot remove the owner; transfer ownership first. The server checks whether an administrator may act on each target. Confirm this high impact moderation action and keep private evidence out of a potentially visible reason. Promise success means that the removal request completed. Merge later onGroupMemberDeleted events by groupID:userID or reload membership. Do not remove a target locally before a failed request." }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-nickname", @@ -4965,7 +4965,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Update a member’s group nickname.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-nickname", - "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', nickname: 'Alice Design ' Send only the nickname field and confirm through member info events. The server validates who can edit each member." + "content": "An in group nickname changes only the member profile in the specified group and does not update the account nickname. import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', nickname: 'Alice Design ' groupID and userID together identify the member. The server applies group role and policy checks to determine whether the current user can edit this member. Promise success means that the server completed the request. Merge a later onGroupMemberInfoChanged item by groupID:userID ; do not update only the current page." }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-role-level", @@ -4973,7 +4973,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Manage group administrators.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-role-level", - "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', roleLevel: 60 Use exported OpenIMGroupMemberRoleLevel constants. Role changes are high risk moderation actions; require confirmation and let the server enforce authority." + "content": "Use roleLevel to promote a regular member to administrator or remove administrator status. import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', roleLevel: 60 The role values are: | roleLevel | Meaning | | | | | 20 | Regular member. | | 60 | Group administrator. | | 100 | Group owner; use for identification only. | Pass 60 to create an administrator and 20 to remove administrator status. Although OpenIMGroupMemberRoleLevel permits 100 , writing it is not the ownership transfer operation; use Transfer group ownership /sdk/uniapp/group/managing group members/transfer group owner . Require confirmation for this high risk moderation action and let the server enforce authority. After Promise success, merge onGroupMemberInfoChanged by groupID:userID ." }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-avatar", @@ -4981,7 +4981,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Update a group member’s avatar.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-avatar", - "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', faceURL: avatarURL Upload local media first and pass a remotely reachable HTTPS URL. Do not store unifile:// or a sandbox path as a remote avatar." + "content": "faceURL changes the member avatar only within the specified group. import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', faceURL: avatarURL An in group avatar is different from the user's account avatar. Use Update your profile /sdk/uniapp/user/profile/set self info for the latter. Upload local media first and pass a remotely reachable HTTPS URL; never store unifile:// or a sandbox path as a remote avatar. After Promise success, merge onGroupMemberInfoChanged by groupID:userID . The complete listener is on List group members /sdk/uniapp/group/retrieving group members/get group member list ." }, { "path": "/sdk/uniapp/group/managing-group-members/set-group-member-extension", @@ -4989,7 +4989,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set a group member extension.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members set-group-member-extension", - "content": "import setGroupMemberInfo from '@/uni modules/unix openim sdk' await setGroupMemberInfo groupID, userID: 'user b', ex: JSON.stringify title: 'PM' ex replaces the whole value. Merge a versioned schema, preserve unknown fields, and store no secrets in member visible data." + "content": "ex is one complete string; the SDK does not merge JSON. Preserve other application modules' namespaces before writing. import setGroupMemberInfo from '@/uni modules/unix openim sdk' const previous = JSON.parse member.ex || ' ' await setGroupMemberInfo groupID, userID: 'user b', ex: JSON.stringify ...previous, title: 'maintainer' , Preserve unknown fields in a versioned schema and keep the original value when parsing fails. Users allowed to view member profiles can see the extension; store no tokens or secrets. After Promise success, merge onGroupMemberInfoChanged by groupID:userID ." }, { "path": "/sdk/uniapp/group/managing-group-members/transfer-group-owner", @@ -4997,7 +4997,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Transfer group ownership.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members transfer-group-owner", - "content": "import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: 'user b' Require explicit confirmation: ownership and moderator permissions change immediately according to server policy. Reload group/member role state after completion." + "content": "Only the current owner can call transferGroupOwner . newOwnerUserID must identify an existing member of the group. The operation receives groupID and newOwnerUserID . Validate both against the latest group/member snapshot and prevent a duplicate submission while transfer is in flight. Local role visibility is only a UI hint; OpenIMServer verifies ownership and target membership. import transferGroupOwner from '@/uni modules/unix openim sdk' await transferGroupOwner groupID, newOwnerUserID: 'user b' State after the call Promise success means that OpenIMServer completed the transfer: the previous owner becomes a regular member and the target obtains the owner role. onGroupMemberInfoChanged carries individual member records, so one transfer can produce changes for both users. Merge each by groupID:userID . Do not infer success from the number of events. Query the affected members again when the UI must confirm roles. If the old owner intends to leave, complete and verify the transfer first, then call quitGroup . Dismissing the group affects every member and is not a substitute for ordinary transfer. Require explicit confirmation and explain the permission change. After transfer, recalculate every management action in the UI from the new member roles. Stop any old owner only mutation that was queued before the transfer, and revalidate the account and group before writing a late asynchronous result." }, { "path": "/sdk/uniapp/group/managing-group-members/change-group-member-mute", @@ -5005,7 +5005,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Mute or unmute a group member.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group managing-group-members change-group-member-mute", - "content": "import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: 'user b', mutedSeconds: 600 Use server defined duration limits and the defined unmute value. Confirm from member updates; client countdown UI is not the authorization source." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Target group ID. | | userID | string | Yes | Member to mute. | | mutedSeconds | number | Yes | Duration in seconds; pass 0 to unmute. | import changeGroupMemberMute from '@/uni modules/unix openim sdk' await changeGroupMemberMute groupID, userID: 'user b', mutedSeconds: 600 The group owner can mute administrators and regular members; an administrator can mute only regular members. OpenIMServer performs the final permission check and enforces duration limits. Promise success means that the server completed the setting. Use the member's returned muteEndTime as final state rather than deriving it only from submitted seconds. Merge onGroupMemberInfoChanged by groupID:userID as documented on List group members /sdk/uniapp/group/retrieving group members/get group member list ." }, { "path": "/sdk/uniapp/group/check-full-sync-state", @@ -5021,7 +5021,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Message overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message overview-message", - "content": "Use clientMsgID as the stable client identifier and merge send results, realtime events, and history by conversationID,clientMsgID . Creation only builds an OpenIMMessageItem ; sendMessage performs delivery. import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress from '@/uni modules/unix openim sdk' const send = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const file = onUploadFileProgress event = updateCurrentUpload event.progress const logs = onUploadLogsProgress event = updateLogUpload event.progress off send ; off file ; off logs Progress can repeat or skip values; only final API completion defines success. Convert unifile:// to a readable native path before local file creation." + "content": "The uni app / uni app x plugin represents every message with OpenIMMessageItem . Sending has two phases: create an outgoing message object for the desired content, then send that object to a user or group. A create method does not send anything, and a successful send Promise does not prove that another client has received the message. Realtime delivery, history, search, and message management are all conversation scoped. Merge send results, realtime events, and history idempotently with the composite key conversationID:clientMsgID : conversationID identifies the conversation and clientMsgID identifies the message. Message processing flow | Phase | Main operation | Notes | | | | | | Create | Call the appropriate create Message method | Returns an OpenIMMessageItem ; it does not write to the server or emit a new message event. | | Send | Call sendMessage or sendMessageNotOss | For a single chat, set recvID ; for a group chat, set groupID . Pass an empty string for the unused target. | | Receive | Subscribe to new message events | Resolve the target conversation from the routing fields and merge by clientMsgID . | | Query | Load history, search, or find messages by ID | Queries return a snapshot and do not emit new message events. | | Update | Delete, revoke, modify, pin, or report read status | Handle the Promise, related events, and any required reconciliation query separately. | Messages created from a readable native image, audio, video, or file path are uploaded by sendMessage . If your application already uploaded the media and has a URL, use the corresponding create MessageByURL method and send it with sendMessageNotOss to avoid uploading it again. OpenIMMessageItem structure | Field | Type | Description | | | | | | clientMsgID | string or null | Stable client ID used for deduplication, state updates, lookup, and pagination cursors. | | serverMsgID | string or null | Server message ID; an unsent or failed message may not have one. | | sessionType | OpenIMSessionType | Conversation type. | | sendID , recvID , groupID | string or null | Sender and single/group routing fields. | | contentType | OpenIMMessageType | Content type that determines which elem field to read. | | createTime , sendTime | number | Creation and send times. | | seq | number | Server sequence number. | | senderPlatformID | OpenIMPlatform | Sender platform. | | senderNickname , senderFaceUrl | string or null | Sender profile snapshot. | | status | OpenIMMessageStatus | Current send status. | | isRead | boolean | Current read state snapshot. | | offlinePush | OpenIMOfflinePush or null | Offline push settings used for the send. | | content , attachedInfo | string or null | SDK serialized content and attached information. | | ex | string or null | Extension string synchronized with the message. | | localEx | string or null | Extension string stored only on this device. | Read message bodies from the elem that matches contentType : textElem for text; pictureElem , soundElem , videoElem , and fileElem for media; atTextElem and quoteElem for mentions and replies; mergeElem and customElem for merged and custom messages; cardElem , locationElem , and faceElem for cards, locations, and emoji; and advancedTextElem , typingElem , and notificationElem for advanced text, typing, and notifications. Do not infer the message type from display text or array position. conversationID identifies the containing conversation but is not an OpenIMMessageItem field. Obtain it from the active conversation, query condition, search result, or event context, then merge state by conversationID:clientMsgID . Create messages with different content types | Content | Page | Notes | | | | | | Text and Markdown | Create a text message /sdk/uniapp/message/creating messages/create text message , Create a Markdown message /sdk/uniapp/message/creating messages/create markdown message | Render Markdown safely on the receiver. | | Group mentions | Create an @ message /sdk/uniapp/message/creating messages/create text at message | Can only be sent to a group. | | Images, audio, video, and files | Create an image from a full path /sdk/uniapp/message/creating messages/create image message from full path , Create an image from a URL /sdk/uniapp/message/creating messages/create image message by url | Other media types use the same local path or pre uploaded URL flow. | | Cards, locations, and emoji | Create a card message /sdk/uniapp/message/creating messages/create card message , Create a location message /sdk/uniapp/message/creating messages/create location message , Create a face message /sdk/uniapp/message/creating messages/create face message | Creation stores a content snapshot. | | Replies, forwarding, and merging | Create a quote message /sdk/uniapp/message/creating messages/create quote message , Create a forwarded message /sdk/uniapp/message/creating messages/create forward message , Create a merged message /sdk/uniapp/message/creating messages/create merger message | The returned object still must be sent explicitly. | | Custom business content | Create a custom message /sdk/uniapp/message/creating messages/create custom message | Receivers must validate the business schema. | Put device only presentation state in localEx , not in business content that must synchronize to other users. See Set a local message extension /sdk/uniapp/message/managing messages/set message local ex . Progress events for message sends, file uploads, and log uploads belong to this page: import off, onSendMessageProgress, onUploadFileProgress, onUploadLogsProgress, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const sendProgressSubscription = onSendMessageProgress event = updateMessageProgress event.clientMsgID, event.progress const subscriptions : Array = sendProgressSubscription, onUploadFileProgress event = updateCurrentUpload event.progress , onUploadLogsProgress event = updateLogUpload event.progress , function removeProgressListeners subscriptions.forEach subscription = off subscription Progress may repeat, skip values, or arrive before or after the final Promise. Display it monotonically and use the API result as the source of truth. Call removeProgressListeners when logging out, switching accounts, or disposing the progress state. A local media path must be readable by the native layer. Resolve unifile:// to a real sandbox path; use the by URL create method for network URLs. Find a page by task | Task | Page | | | | | Send a normal or pre uploaded media message | Send a message /sdk/uniapp/message/sending messages/send message , Send pre uploaded media /sdk/uniapp/message/sending messages/send message not oss | | Receive online, offline, and online only messages | Receive messages /sdk/uniapp/message/receiving messages/receive messages | | Load history or surrounding context | Load older messages /sdk/uniapp/message/retrieving messages/load older messages , Load message context /sdk/uniapp/message/retrieving messages/load message context | | Find by ID or search local messages | Find messages by ID /sdk/uniapp/message/retrieving messages/find messages by id , Search messages /sdk/uniapp/message/searching messages/search messages | | Delete, revoke, modify, or pin | Delete saved messages /sdk/uniapp/message/managing messages/delete saved messages , Revoke a message /sdk/uniapp/message/managing messages/revoke a message , Modify a message /sdk/uniapp/message/managing messages/modify a message , Pin a message /sdk/uniapp/message/managing messages/set message pinned | | Group member level read status | Send group read receipts /sdk/uniapp/message/managing read status/send group read receipts , Get group message readers /sdk/uniapp/message/managing read status/get group message readers | | Typing status or speech recognition | Update typing status /sdk/uniapp/message/composing messages/update typing status , Transcribe audio /sdk/uniapp/message/composing messages/transcribe audio | State synchronization boundaries The complete listeners for new messages, deletion, revocation, modification, pinning, group read status, and typing status live on their task pages. Message creation and pure query methods only establish snapshots from their Promise result and do not emit shared message events. For mutations, treat Promise completion, event delivery, and reconciliation queries as separate phases. Conversation unread counts, total unread counts, and group mention reminders are conversation state. Maintain them with Mark a conversation as read /sdk/uniapp/conversation/managing conversations/mark conversation read , Maintain the total unread count /sdk/uniapp/conversation/managing conversations/get total unread count , and the events on Retrieve the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list ." }, { "path": "/sdk/uniapp/message/creating-messages/create-text-message", @@ -5029,7 +5029,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a text message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-message", - "content": "import createTextMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' Validate product length limits first. Creation does not send; pass the returned OpenIMMessageItem to sendMessage rather than constructing one manually." + "content": "import createTextMessage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Hello, OpenIMSDK' if message == null throw new Error 'Failed to create text message' The Promise returns OpenIMMessageItem | null and does not send it. Validate product length limits first, then pass the returned object to Send a message /sdk/uniapp/message/sending messages/send message . Do not construct OpenIMMessageItem manually." }, { "path": "/sdk/uniapp/message/creating-messages/create-text-at-message", @@ -5037,7 +5037,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create an @ message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-text-at-message", - "content": "import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@Alice please review', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alice' , quoteMessage: null, Keep mention IDs and display metadata aligned. Commercial getAtAllTag returns the deployed “mention everyone” tag. Send the created message with a target group ID." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | text | string | Yes | Message text; use stable @userID markers. | | atUserIDList | string | Yes | Mentioned users; obtain the special tag from getAtAllTag for everyone. | | atUsersInfo | OpenIMAtUsersInfoItem or null | No | User IDs and group display names. | | quoteMessage | OpenIMMessageItem or null | No | Original quoted message. | import createTextAtMessage from '@/uni modules/unix openim sdk' const message = await createTextAtMessage text: '@user a please review', atUserIDList: 'user a' , atUsersInfo: atUserID: 'user a', groupNickname: 'Alex' , The Promise creates OpenIMMessageItem | null . This message can only be sent to a group. Keep atUserIDList aligned with atUsersInfo ; creation does not change conversation mention state or emit events. Mention everyone Do not hard code the everyone tag. Obtain the deployed value from commercial getAtAllTag Commercial , then place it in both the text and ID list: import getAtAllTag from '@/uni modules/unix openim sdk' const atAllResult = await getAtAllTag const atAllTag = atAllResult?.tag if atAllTag = null const message = await createTextAtMessage text: $ atAllTag please read the announcement , atUserIDList: atAllTag , getAtAllTag only reads the convention. Send the created message separately with the target group ID." }, { "path": "/sdk/uniapp/message/creating-messages/create-custom-message", @@ -5045,7 +5045,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a custom message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-custom-message", - "content": "import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify orderID: 'order 123' , extension: '', descriptionText: 'Order card', All fields reach the recipient. Version and validate a shared schema and store no secrets. createAdvancedTextMessage creates entity/styled text; reject entity ranges outside the original text." + "content": "Use createCustomMessage for orders, tasks, invitations, polls, or other business messages whose schema is shared by sender and receiver. Parameters | Parameter | Type | Required | Description | | | | | | | data | string | Yes | Complete business payload, normally serialized JSON. | | extension | string | Yes | Complete business extension string. | | descriptionText | string | Yes | Type description or fallback text for unsupported clients. | import createCustomMessage from '@/uni modules/unix openim sdk' const message = await createCustomMessage data: JSON.stringify type: 'task', taskID: 'task 42' , extension: JSON.stringify schemaVersion: 1 , descriptionText: 'Task card', All three fields reach the recipient. Never store secrets; validate schema version, size, and fields before mapping to a business model, and never execute untrusted content. The uni app / uni app x contract does not include the Wasm commercial searchText parameter. The Promise creates OpenIMMessageItem | null ; sending and custom business events are separate flows. Advanced text messages createAdvancedTextMessage creates entity/styled text from OpenIMCreateAdvancedTextMessageParams . Entity ranges must refer to indexes in the original text; reject out of range values before calling the SDK. Both APIs only create messages." }, { "path": "/sdk/uniapp/message/creating-messages/create-image-message-from-full-path", @@ -5061,7 +5061,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create an image message from a URL.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-image-message-by-url", - "content": "import createImageMessageByURL from '@/uni modules/unix openim sdk' const message = await createImageMessageByURL pictureElem Provide uploaded source/thumbnail URLs and matching dimensions, size, and type. URLs must be accessible to conversation participants; do not place local paths in URL fields." + "content": "createImageMessageByURL creates a message from already uploaded image metadata. The source, large image, and thumbnail can use different resources; this example reuses one object only when all three are identical. Parameters | Parameter | Type | Description | | | | | | sourcePicture | OpenIMPicture or null | Original image metadata. | | bigPicture | OpenIMPicture or null | Large image metadata. | | snapshotPicture | OpenIMPicture or null | Thumbnail metadata. | | sourcePath | string or null | Local name or business path; use an empty string for a remote only resource. | Each picture object has nullable uuid , type , size , width , height , and url fields. Supply the real upload result for a complete, displayable message. import createImageMessageByURL from '@/uni modules/unix openim sdk' const picture = uuid: createBusinessUUID , type: 'image/jpeg', size: 120000, width: 1280, height: 720, url: uploaded.url, const message = await createImageMessageByURL sourcePicture: picture, bigPicture: picture, snapshotPicture: picture, sourcePath: '', URLs must be accessible to conversation participants, and dimensions, size, and type must match the real resource. Do not place local paths in URL fields. The Promise only creates an outgoing object; send an already uploaded image with sendMessageNotOss ." }, { "path": "/sdk/uniapp/message/creating-messages/create-sound-message-from-full-path", @@ -5077,7 +5077,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create an audio message from a URL.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-sound-message-by-url", - "content": "import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL soundElem Use upload result URL, UUID, size, duration, and type values. The remote resource must be accessible to recipients; a sandbox path is not a media URL." + "content": "createSoundMessageByURL creates a message from already uploaded audio metadata. Parameters | Parameter | Type | Description | | | | | | uuid | string or null | Unique audio resource ID. | | soundPath | string or null | Local name or business path; use an empty string for a remote only resource. | | sourceUrl | string or null | Accessible uploaded audio URL. | | dataSize | number or null | Audio size in bytes. | | duration | number or null | Duration in the unit defined by the server protocol. | import createSoundMessageByURL from '@/uni modules/unix openim sdk' const message = await createSoundMessageByURL uuid: createBusinessUUID , soundPath: '', sourceUrl: uploaded.url, dataSize: uploaded.size, duration, Use upload result URL, UUID, size, and duration values. The remote resource must be accessible to recipients; a sandbox path is not a media URL. OpenIMSoundElem does not contain the Wasm soundType field. The Promise only creates a message; send it with sendMessageNotOss ." }, { "path": "/sdk/uniapp/message/creating-messages/create-video-message-from-full-path", @@ -5093,7 +5093,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a video message from URLs.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-video-message-by-url", - "content": "import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoElem Populate video and cover upload metadata accurately. Both resources must be accessible to recipients and must not expose private storage credentials." + "content": "createVideoMessageByURL creates a message from uploaded video and snapshot metadata. Parameters | Parameter | Type | Description | | | | | | videoPath | string or null | Local name or business path; use an empty string for remote only media. | | duration | number or null | Video duration. | | videoType | string or null | Video MIME type. | | videoUUID , videoUrl , videoSize | nullable | Uploaded video ID, URL, and byte size. | | snapshotPath | string or null | Snapshot local name or business path. | | snapshotUUID , snapshotUrl , snapshotSize | nullable | Uploaded snapshot ID, URL, and byte size. | | snapshotWidth , snapshotHeight | number or null | Snapshot dimensions in pixels. | import createVideoMessageByURL from '@/uni modules/unix openim sdk' const message = await createVideoMessageByURL videoPath: '', duration, videoType: uploadedVideo.contentType, videoUUID: createBusinessUUID , videoUrl: uploadedVideo.url, videoSize: uploadedVideo.size, snapshotPath: '', snapshotUUID: createBusinessUUID , snapshotSize: uploadedSnapshot.size, snapshotUrl: uploadedSnapshot.url, snapshotWidth, snapshotHeight, Use real uploaded URLs, IDs, sizes, duration, and MIME type. Both resources must be accessible to recipients and must not expose private storage credentials. OpenIMVideoElem does not contain the Wasm snapShotType field. Send the created message with sendMessageNotOss ." }, { "path": "/sdk/uniapp/message/creating-messages/create-file-message-from-full-path", @@ -5109,7 +5109,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a file message from a URL.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-file-message-by-url", - "content": "import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL fileElem Use trusted upload result URL, name, UUID, size, and type values. The URL must be accessible to recipients without exposing private storage credentials." + "content": "Use createFileMessageByURL with metadata from a file that is already uploaded. Parameters | Parameter | Type | Description | | | | | | filePath | string or null | Local name or business path; use an empty string when only a remote resource exists. | | fileName | string or null | Display filename. | | uuid | string or null | Unique resource identifier. | | sourceUrl | string or null | Accessible URL of the uploaded file. | | fileSize | number or null | File size in bytes. | import createFileMessageByURL from '@/uni modules/unix openim sdk' const message = await createFileMessageByURL filePath: '', fileName: 'report.pdf', uuid: createBusinessUUID , sourceUrl: uploaded.url, fileSize: uploaded.size, Use real upload result URL, name, UUID, and size values. The URL must be accessible to recipients without exposing private storage credentials. OpenIMFileElem does not contain the Wasm fileType field. The Promise creates OpenIMMessageItem | null . Because the resource is already uploaded, send it with sendMessageNotOss ." }, { "path": "/sdk/uniapp/message/creating-messages/create-card-message", @@ -5117,7 +5117,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a contact card message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-card-message", - "content": "import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alice', faceURL: 'https://cdn.example.com/alice.png', ex: '' A card is a send time snapshot. Resolve current profile data by userID when opened, and never treat card fields as authenticated identity." + "content": "Parameters createCardMessage accepts OpenIMCardElem . Its fields are nullable in the contract, but a useful card should provide a complete snapshot: | Parameter | Type | Recommendation | Description | | | | | | | userID | string or null | Required | User represented by the card. | | nickname | string or null | Required | Display name snapshot. | | faceURL | string or null | Required | Avatar URL snapshot. | | ex | string or null | Required | Extension data; use an empty string when unused. | import createCardMessage from '@/uni modules/unix openim sdk' const message = await createCardMessage userID: 'user b', nickname: 'Alex', faceURL: 'https://example.com/avatar.png', ex: '', The Promise creates OpenIMMessageItem | null and does not send it. A card is a send time snapshot and does not track profile changes. Resolve current data by userID when opened, and never treat card fields as authenticated identity." }, { "path": "/sdk/uniapp/message/creating-messages/create-location-message", @@ -5125,7 +5125,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a location message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-location-message", - "content": "import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: 'Room A', longitude: 121.47, latitude: 31.23 Obtain user permission and validate coordinate ranges. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | descriptionText | string | Yes | Place name or address. | | longitude | number | Yes | Longitude. | | latitude | number | Yes | Latitude. | import createLocationMessage from '@/uni modules/unix openim sdk' const message = await createLocationMessage descriptionText: 'Room A', longitude: 121.47, latitude: 31.23 Obtain location only after user authorization and reduce precision according to your privacy policy. Clearly communicate recipients before sending sensitive location data, and omit precise coordinates from logs. The Promise only creates OpenIMMessageItem | null ." }, { "path": "/sdk/uniapp/message/creating-messages/create-face-message", @@ -5133,7 +5133,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create an emoji message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-face-message", - "content": "import createFaceMessage from '@/uni modules/unix openim sdk' const message = await createFaceMessage index: 1, data: 'smile' Sender and receiver must share the same sticker package/version mapping. Render an unknown index placeholder instead of failing the message list." + "content": "import createFaceMessage from '@/uni modules/unix openim sdk' const message = await createFaceMessage index: 1, data: 'smile' The Promise creates OpenIMMessageItem | null and does not send it. Sender and receiver must share the same sticker package/version mapping. Render an unknown index placeholder instead of failing the message list." }, { "path": "/sdk/uniapp/message/creating-messages/create-quote-message", @@ -5157,7 +5157,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a forwarded message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-forward-message", - "content": "import createForwardMessage from '@/uni modules/unix openim sdk' const forward = await createForwardMessage sourceMessage Creation does not send. Check content sharing permissions and privacy first; device local extension/send state fields are not recipient authoritative data." + "content": "import createForwardMessage from '@/uni modules/unix openim sdk' const forward = await createForwardMessage sourceMessage The Promise creates OpenIMMessageItem | null and does not send it. Check content sharing permissions and privacy first. Device local extension and send state fields are not recipient authoritative data." }, { "path": "/sdk/uniapp/message/creating-messages/create-merger-message", @@ -5165,7 +5165,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Create a merged forward message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message creating-messages create-merger-message", - "content": "import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: 'Chat history', abstractList: 'Alice: Approved' , Keep summaries consistent with source messages, verify sharing permission and sensitive content, and limit total message count/size." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | messageList | OpenIMMessageItem | Yes | Sent messages to merge. | | title | string | Yes | Card title. | | abstractList | string | Yes | Summary rows displayed on the card. | import createMergerMessage from '@/uni modules/unix openim sdk' const merger = await createMergerMessage messageList: selectedMessages, title: 'Project discussion', abstractList: selectedMessages.slice 0, 4 .map buildSummary , The Promise creates a new outgoing message and does not modify its source messages. Keep summaries consistent with source content and provide fallback text for unsupported types. Verify sharing permission and sensitive content, and limit total message count and size." }, { "path": "/sdk/uniapp/message/sending-messages/send-message", @@ -5181,7 +5181,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Send an uploaded media message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message sending-messages send-message-not-oss", - "content": "import sendMessageNotOss from '@/uni modules/unix openim sdk' const sent = await sendMessageNotOss message, recvID, groupID Use this only when the message already contains complete remotely accessible media metadata. A local path message sent through this route may be inaccessible to recipients; use normal sendMessage for local uploads." + "content": "Use sendMessageNotOss when an image, audio, video, or file was already uploaded by your business service and the message contains its URL. This avoids the SDK upload phase. Parameters | Parameter | Type | Required | Description | | | | | | | recvID | string | Conditional | Receiver user ID for a single chat; otherwise pass an empty string. | | groupID | string | Conditional | Group ID for a group chat; otherwise pass an empty string. | | message | OpenIMMessageItem | Yes | Outgoing message returned by a by URL create API with complete remote resource metadata. | | offlinePushInfo | OpenIMOfflinePush or null | No | Offline push title, description, and platform settings. | | isOnlineOnly | boolean or null | No | Deliver only to online clients; such a message is not stored in local history. | import sendMessageNotOss from '@/uni modules/unix openim sdk' const sentMessage = await sendMessageNotOss recvID: receiverUserID, groupID: '', message: urlMessage, The URL, size, type, dimensions, and duration must come from the real upload result. The Promise resolves directly to the server confirmed OpenIMMessageItem ; merge it by clientMsgID . This method does not upload resources and must not receive a message that only contains a local file path, or recipients may be unable to access it. Send local file messages with sendMessage ." }, { "path": "/sdk/uniapp/message/receiving-messages/receive-messages", @@ -5189,7 +5189,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Receive messages.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message receiving-messages receive-messages", - "content": "Subscribe to single, batch, offline, and online only delivery paths, then deduplicate by conversationID,clientMsgID . import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage from '@/uni modules/unix openim sdk' const subscriptions = onRecvNewMessage mergeMessage , onRecvOfflineNewMessage mergeMessage , onRecvOnlineOnlyMessage mergeOnlineOnlyMessage , onRecvNewMessages result = result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = result.messages.forEach mergeMessage , subscriptions.forEach subscription = off subscription Online only messages may not exist in history. A single application message store should own these global listeners; history queries remain necessary for snapshots and recovery." + "content": "Message views normally combine realtime messages, messages received while the app was in the background, online only messages, and a history snapshot loaded when the conversation opens. Events provide increments; history APIs provide a conversationID scoped snapshot. Different Core versions and recovery paths may deliver through single message or batch events. Subscribe to all five paths for completeness, but deduplicate by conversationID:clientMsgID . Before a component is destroyed, the user logs out, or the account changes, call off with every subscription handle. Register these handlers on the same login scoped plugin session. Do not interpret an incoming event as the completion callback for a history or mark as read request; each flow has its own lifecycle. Message types Choose rendering from contentType and the corresponding elem on OpenIMMessageItem : textElem for text, atTextElem for mentions, customElem for custom content, and the matching media elem for images, audio, video, and files. Show a safe fallback for unknown types instead of executing unvalidated content . function renderMessage message : OpenIMMessageItem if message.textElem = null return renderTextMessage message if message.atTextElem = null return renderMentionMessage message if message.customElem = null return renderCustomMessage message if message.pictureElem = null || message.soundElem = null || message.videoElem = null || message.fileElem = null return renderFileLikeMessage message return renderUnsupportedMessage message Events can contain messages for conversations that are not currently open. OpenIMMessageItem does not carry conversationID ; derive or look up the conversation from sessionType , sendID , recvID , and groupID , then deduplicate by clientMsgID . function mergeMessage message : OpenIMMessageItem const targetConversationID = getConversationIDForMessage message if targetConversationID.length == 0 return mergeMessageByClientMsgID targetConversationID, message Image, audio, video, and file messages The receiver does not upload these files again. Read and render the resource URL, size, filename, duration, or snapshot from the media elem. To send several files, applications normally send several file messages or one versioned custom message describing a group; each message still uses clientMsgID as its stable identifier. Event handlers import off, onRecvNewMessage, onRecvNewMessages, onRecvOfflineNewMessage, onRecvOfflineNewMessages, onRecvOnlineOnlyMessage, type OpenIMMessageItem, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const subscriptions = onRecvNewMessage message = if message = null mergeMessage message , onRecvOfflineNewMessage message = if message = null mergeMessage message , onRecvOnlineOnlyMessage message = if message = null mergeOnlineOnlyMessage message , onRecvNewMessages result = if result = null result.messages.forEach mergeMessage , onRecvOfflineNewMessages result = if result = null result.messages.forEach mergeMessage , function removeMessageListeners subscriptions.forEach subscription = off subscription onRecvNewMessages and onRecvOfflineNewMessages return OpenIMMessageListResult | null ; its messages field is the array. The three single message handlers return OpenIMMessageItem | null . Single and batch paths may describe the same message, so never insert by event count. Unlike the Wasm recommendation to select one canonical batch path for a known deployment, the native plugin exposes compatibility paths that may vary with Core delivery and recovery behavior. The application store can subscribe to all of them only because it uses one shared idempotent merge function. Messages that arrive after setAppBackgroundStatus true normally use an offline path. Set the status back to false on foreground entry. Reuse one merge function for offline and realtime delivery, filter by conversation, deduplicate by clientMsgID , and preserve chronological order. An online only message has isOnlineOnly: true on the send. It is not stored in local SDK history and cannot be recovered through a history API. Use it only for transient hints or business notifications, and do not treat it as a reliable chat record. Decide separately whether an online only item belongs in the visible chat view. If it is rendered, keep it out of durable pagination and make the temporary behavior clear to users. This page owns all five receive events. Resolve the target conversation first and then merge by conversationID:clientMsgID . A single application message store should own these global listeners. Call removeMessageListeners when that login scoped store is disposed. Revocation arrives through onNewRecvMessageRevoked ; see Revoke a message /sdk/uniapp/message/managing messages/revoke a message . Load history when opening a conversation Events only describe newly delivered messages. Load a history snapshot when a conversation first opens, when the user pages upward, or when restoring gaps after a disconnect. See Load older messages /sdk/uniapp/message/retrieving messages/load older messages . History and events can contain the same message, so use the same deduplication key for both. Do not register this global listener set every time a chat page opens. The page should only query its conversation snapshot; a login scoped store owns the events. After login changes, clear the previous account's state and establish a new event scope. A history query does not trigger any of the receive events. Because pagination and realtime delivery may overlap, the history merge must use exactly the same conversationID:clientMsgID key as the global event store. Mark a group conversation as read After the user opens a group chat and sees its latest messages, clear the conversation unread count as described in Mark a conversation as read /sdk/uniapp/conversation/managing conversations/mark conversation read . This is separate from member level group read receipts. Conversation events eventually synchronize the list and total badge. Verify the receive flow Send from another logged in account and verify that the foreground message renders once. Set the app background state, send again, and verify offline merging before restoring foreground state. Send an online only message and verify that it is absent from local history. Revoke a message and verify that the matching clientMsgID becomes revoked. Mark the conversation as read and verify the conversation and total unread counts. When testing single and batch delivery, assert that each clientMsgID appears once rather than requiring one particular callback. Also verify balanced foreground/background calls and that old subscriptions stop affecting state after logout. Related pages Message overview /sdk/uniapp/message/overview message Send a message /sdk/uniapp/message/sending messages/send message Load older messages /sdk/uniapp/message/retrieving messages/load older messages Mark a conversation as read /sdk/uniapp/conversation/managing conversations/mark conversation read" }, { "path": "/sdk/uniapp/message/receiving-messages/receive-custom-business-messages", @@ -5205,7 +5205,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Load message history.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-older-messages", - "content": "import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: '', count: 50 Use an empty cursor for the first page and the earliest boundary message ID for the next. Deduplicate by clientMsgID and honor the returned end marker. Commercial getHistoryMessageList additionally supports isReverse , viewType , and lastMinSeq ; direction is a parameter, not a separate reverse history API." + "content": "Use public getAdvancedHistoryMessageList to establish the first snapshot when a chat opens. To load older records, pass the current earliest message's clientMsgID as the next cursor. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation whose history is being loaded. | | startClientMsgID | string | Yes | Paging anchor; pass an empty string for the first page. | | count | number | Yes | Number of messages to request. | | lastMinSeq | number or null | No | Minimum sequence returned by the previous page. | import getAdvancedHistoryMessageList from '@/uni modules/unix openim sdk' const page = await getAdvancedHistoryMessageList conversationID, startClientMsgID: oldestMessage?.clientMsgID ?? '', count: 30, lastMinSeq, Return result The Promise resolves to OpenIMAdvancedHistoryMessageListResult | null : | Field | Type | Description | | | | | | messageList | OpenIMMessageItem | Messages in this page. | | lastMinSeq | number | Minimum sequence to send with the next request. | | isEnd | boolean | Whether the history boundary in this direction was reached. | | errCode | number | History result status code. | | errMsg | string | Description associated with the status code. | Merge messageList only when errCode reports success; handle a rejected Promise through the normal error path. Scope the list by conversationID and deduplicate by clientMsgID . History queries do not emit new message events. Commercial getHistoryMessageList Commercial additionally requires isReverse and supports optional viewType and lastMinSeq . Direction is a parameter, not a separate reverse history API." }, { "path": "/sdk/uniapp/message/retrieving-messages/find-messages-by-id", @@ -5213,7 +5213,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Find messages by ID.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages find-messages-by-id", - "content": "import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: 'msg a', 'msg b' Map OpenIMFindMessageResult by conversation and requested message IDs. Missing messages should not invalidate the complete batch." + "content": "Keep both conversationID and clientMsgID when a search result, quoted message, or notification navigates to a message, then use findMessageList to retrieve the locally synchronized record. Parameters findMessageList accepts an array of query groups: | Parameter | Type | Required | Description | | | | | | | items .conversationID | string | Yes | Conversation that owns the requested messages. | | items .clientMsgIDList | string | Yes | Client message IDs to find in that conversation. | import findMessageList from '@/uni modules/unix openim sdk' const result = await findMessageList conversationID, clientMsgIDList: clientMsgID , const targetMessage = result?.findResultItems 0 ?.messageList 0 The Promise resolves to OpenIMFindMessageResult | null , containing totalCount and findResultItems . Each result item includes the conversationID , conversationType , conversation display snapshot, messageCount , and messageList . One call can query several conversations. Do not assume response items preserve input order; match by the result conversationID and each message's clientMsgID . A result can be missing when local data has not synchronized, the message was deleted, or the ID does not exist. This query does not emit message events. To retrieve records around a hit, see Load message context /sdk/uniapp/message/retrieving messages/load message context ." }, { "path": "/sdk/uniapp/message/retrieving-messages/load-message-context", @@ -5221,7 +5221,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Load message context.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message retrieving-messages load-message-context", - "content": "import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20 This is Commercial . Use a complete SDK message as the anchor, merge duplicates by clientMsgID , and preserve chronological ordering." + "content": "When navigating from a search result or quoted message into chat context, use the complete OpenIMMessageItem you already obtained as the anchor. fetchSurroundingMessages is Commercial . Parameters | Parameter | Type | Required | Description | | | | | | | startMessage | OpenIMMessageItem | Yes | Complete anchor message. | | viewType | number | Yes | Context direction defined by the server contract. | | before | number | Yes | Maximum number of messages before the anchor. | | after | number | Yes | Maximum number of messages after the anchor. | import fetchSurroundingMessages from '@/uni modules/unix openim sdk' const result = await fetchSurroundingMessages startMessage: targetMessage, viewType: 0, before: 20, after: 20, const surroundingMessages = result?.messages ?? On success, result?.messages is the surrounding OpenIMMessageItem . The uni app / uni app x field is messages , not the Wasm messageList field. before and after limit each side of the anchor. The result can contain fewer messages near a boundary or after deletions. It can also overlap realtime events, so deduplicate by conversationID:clientMsgID and preserve chronological order. Do not construct a fake anchor containing only an ID; first use Find messages by ID /sdk/uniapp/message/retrieving messages/find messages by id when necessary." }, { "path": "/sdk/uniapp/message/searching-messages/search-messages", @@ -5229,7 +5229,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Search messages.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message searching-messages search-messages", - "content": "import searchLocalMessages from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: , messageTypeList: , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 50, Use contract defined matching and time semantics. Search covers locally synchronized/indexable data, not guaranteed full server history. Deduplicate by conversation and message ID." + "content": "searchLocalMessages searches messages already synchronized into the current user's local database. For a group, pass the group's conversationID , not the groupID used when sending. If you only have the group ID, first obtain the conversation ID with Get a conversation ID /sdk/uniapp/conversation/retrieving conversations/get conversation id . Use a backend search service for cross user audit, complete server side history, complex permission filtering, or global ranking. It can return conversationID and clientMsgID so the client can locate each hit. Create a search query keywordList accepts one or more terms. A normal search box represents one input, so trim it and reject empty values before calling the SDK. import OpenIMMessageTypeAtText, OpenIMMessageTypeText, searchLocalMessages, type OpenIMMessageItem, type OpenIMSearchMessageResult, from '@/uni modules/unix openim sdk' const result = await searchLocalMessages conversationID, keywordList: keyword.trim , keywordListMatchType: 0, senderUserIDList: , messageTypeList: OpenIMMessageTypeText, OpenIMMessageTypeAtText , searchTimePosition: 0, searchTimePeriod: 0, pageIndex: 1, count: 20, Advanced search Narrow the query by sender, content type, and time window. In OpenIMSearchLocalMessagesParams , every filter and paging field except conversationID is required. Use an empty array for an unrestricted list and the server defined 0 values when time is unrestricted. const result = await searchLocalMessages conversationID, keywordList: 'release' , keywordListMatchType: 0, senderUserIDList: senderUserID , messageTypeList: OpenIMMessageTypeText , searchTimePosition, searchTimePeriod, pageIndex: 1, count: 20, Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string or null | No | Conversation to search; omit it to search the current locally visible scope. | | keywordList | string | Yes | Search terms. | | keywordListMatchType | number | Yes | Multi keyword matching mode defined by the SDK contract. | | senderUserIDList | string | Yes | Restrict to these senders; use an empty array for no restriction. | | messageTypeList | OpenIMMessageType | Yes | Restrict to these content types; use an empty array for no restriction. | | searchTimePosition | number | Yes | End of the search window, as a Unix timestamp in seconds. | | searchTimePeriod | number | Yes | Number of seconds to search backward from the end position. | | pageIndex | number | Yes | Page number; the first page is 1 . | | count | number | Yes | Number of results per page. | Add the appropriate OpenIMMessageType constants when the UI searches images, files, or custom messages. Matching modes, time units, and page numbering must follow the SDK and server contract. Handle paginated results The Promise resolves to OpenIMSearchMessageResult | null : | Field | Type | Description | | | | | | totalCount | number | Total number of messages matching the query. | | searchResultItems | OpenIMSearchMessageResultItem | Results grouped by conversation. | Each result item contains: | Field | Type | Description | | | | | | conversationID | string | Owning conversation. | | conversationType | OpenIMSessionType | Conversation type. | | showName , faceURL | string | Conversation display name and avatar snapshot. | | latestMsgSendTime | number or null | Latest message time in this result group. | | messageCount | number | Number of matching messages in the group. | | messageList | OpenIMMessageItem | Matching messages. | Preserve both the conversation ID and message ID when flattening grouped results: type SearchMessageRow = conversationID : string clientMsgID : string message : OpenIMMessageItem function toSearchRows result : OpenIMSearchMessageResult : Array const rows : Array = result.searchResultItems.forEach item = item.messageList.forEach message = const clientMsgID = message.clientMsgID if clientMsgID = null rows.push conversationID: item.conversationID, clientMsgID, message return rows Keep all filters unchanged while incrementing pageIndex . When any condition changes, reset the page to 1 and clear old rows. Deduplicate by conversationID:clientMsgID ; do not persist selection by array position. A search does not emit message events. Handle changes to search results A hit can be revoked or deleted while the search page is open, and newly synchronized messages can change the result set. Use the shared handlers described in Receive messages /sdk/uniapp/message/receiving messages/receive messages , Delete saved messages /sdk/uniapp/message/managing messages/delete saved messages , and Revoke a message /sdk/uniapp/message/managing messages/revoke a message . This page owns querying and pagination, not duplicate event registrations. Navigate with the result's conversationID and clientMsgID . To display nearby chat records, use the complete hit as the start point for Load message context /sdk/uniapp/message/retrieving messages/load message context , rather than assembling context with findMessageList . Re run the current page query when the UI needs a fresh snapshot. Search Promises, event increments, and reconciliation queries are independent. Clear previous account search state after login changes. Related pages Find messages by ID /sdk/uniapp/message/retrieving messages/find messages by id Load older messages /sdk/uniapp/message/retrieving messages/load older messages Receive messages /sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/composing-messages/update-typing-status", @@ -5237,7 +5237,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Report typing status.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages update-typing-status", - "content": "changeInputStates updates typing/input state; commercial typingStatusUpdate provides the legacy compatible route. Receive updates through onConversationUserInputStatusChanged . import changeInputStates, off, onConversationUserInputStatusChanged from '@/uni modules/unix openim sdk' const typingSubscription = onConversationUserInputStatusChanged state = renderTyping state await changeInputStates conversationID, focus: true off typingSubscription Debounce high frequency UI changes and expire stale indicators locally." + "content": "Pass focus: true when the user starts typing. Pass false after sending, when the input loses focus, when switching conversations, or when typing stops. Typing state belongs to conversationID ; it neither saves a draft nor writes a message. import changeInputStates, off, onConversationUserInputStatusChanged from '@/uni modules/unix openim sdk' const typingSubscription = onConversationUserInputStatusChanged status = updateConversationInputStatus status await changeInputStates conversationID, userID: peerUserID, focus: true off typingSubscription Report true when the input gains focus and false on blur or page exit, and throttle high frequency changes. Commercial compatibility method typingStatusUpdate Commercial uses recvID and msgTip ; do not call both routes for one typing flow. Expire stale indicators locally. Deduplicate state changes instead of reporting every keyboard event. Promise completion only means the request was accepted; it does not mean a remote interface has already updated. This page is the sole owner of onConversationUserInputStatusChanged . Replace the current platformIDs snapshot by conversationID:userID , and call off typingSubscription when the component, login, or account scope ends." }, { "path": "/sdk/uniapp/message/composing-messages/get-typing-status", @@ -5245,7 +5245,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get typing status.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages get-typing-status", - "content": "import getInputStates from '@/uni modules/unix openim sdk' const state = await getInputStates conversationID This Commercial snapshot can become stale quickly. Combine it with typing events and a local timeout; never use it for authorization or durable presence." + "content": "import getInputStates from '@/uni modules/unix openim sdk' const result = await getInputStates conversationID, userID: peerUserID getInputStates is a Commercial snapshot query. Typing state is a short lived hint, not a durable business fact. Update the UI from events and apply a local expiry timeout so a disconnect cannot leave “typing” visible forever. Never use this snapshot for authorization or durable presence." }, { "path": "/sdk/uniapp/message/composing-messages/check-speech-to-text", @@ -5253,7 +5253,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Check audio transcription availability.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages check-speech-to-text", - "content": "import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities This Commercial query should gate transcription UI. Capability can vary by deployment and account; do not infer it solely from plugin version." + "content": "import getSpeechToTextCapabilities from '@/uni modules/unix openim sdk' const capabilities = await getSpeechToTextCapabilities This is a Commercial capability query. The Promise resolves to OpenIMSpeechToTextCapabilitiesResult | null : | Field | Type | Description | | | | | | format | string or null | Supported audio formats. | | sampleRateHz | number or null | Supported sample rates in hertz. | | maxRecordTimeMs | number or null | Maximum recording duration in milliseconds. | | maxFileSize | number or null | Maximum file size in bytes. | | provider | string or null | Current speech recognition provider. | | requestType | string or null | Request type required by the service. | | crossDomain | boolean or null | Whether cross domain processing is allowed. | Query and cache capabilities for the current login session before displaying transcription UI. Validate format, sample rate, duration, and size before sending audio. Capabilities can vary by service, language, and account, so refresh them after login changes. Disable transcription on failure instead of guessing limits. This query does not emit message events." }, { "path": "/sdk/uniapp/message/composing-messages/transcribe-audio", @@ -5261,7 +5261,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Transcribe audio.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages transcribe-audio", - "content": "import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText soundMessage This is Commercial . Use a complete sound message, expose consent/privacy behavior, and store the returned transcript according to product policy rather than modifying the original media." + "content": "import speechToText from '@/uni modules/unix openim sdk' const result = await speechToText filename: 'voice.m4a', data: audioBase64, if result?.text = null setTranscript result.text This is Commercial . Native files cannot cross the UTS boundary directly; encode the audio as the commercial service protocol requires. The Promise resolves to OpenIMSpeechToTextResult | null , whose optional text field contains the transcript. First query speech to text capabilities /sdk/uniapp/message/composing messages/check speech to text and enforce the supported size, format, sample rate, and duration. Do not log complete audio or Base64 content. Transcription neither edits the original audio message nor emits message events. Ask the user to confirm transcripts before high risk use; to persist one locally, see Save a local transcript /sdk/uniapp/message/composing messages/save local transcript ." }, { "path": "/sdk/uniapp/message/composing-messages/save-local-transcript", @@ -5269,7 +5269,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Save a local transcript.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message composing-messages save-local-transcript", - "content": "import setMessageLocalContent from '@/uni modules/unix openim sdk' await setMessageLocalContent conversationID, clientMsgID, content: transcript This Commercial local only value is device state and does not edit the server message. Version any structured content and avoid storing unnecessary sensitive transcript data." + "content": "import setMessageLocalContent from '@/uni modules/unix openim sdk' await setMessageLocalContent conversationID, message: updatedMessage setMessageLocalContent is Commercial and stores a complete message object in the specified conversation's local database. Merge the transcript into a copy of the original message first; do not overwrite its clientMsgID , routing fields, or unrelated business elems. The change is device local and must not be treated as a server or multi device edit. Version structured transcript data and avoid retaining unnecessary sensitive content." }, { "path": "/sdk/uniapp/message/composing-messages/translate-text-and-messages", @@ -5285,7 +5285,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete a local message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-local-message", - "content": "import deleteMessageFromLocalStorage from '@/uni modules/unix openim sdk' await deleteMessageFromLocalStorage conversationID, clientMsgID The compatible deleteMessage uses the same parameters. This affects only local storage and must not be presented as remote deletion or revocation." + "content": "import deleteMessageFromLocalStorage from '@/uni modules/unix openim sdk' await deleteMessageFromLocalStorage conversationID, clientMsgID The compatibility method deleteMessage uses the same parameters. This operation only removes the record from the current device. It does not revoke the peer's message and must not be presented as server deletion. Remove the row from the device store after success; use revocation or a commercial server delete capability when other participants must observe the change." }, { "path": "/sdk/uniapp/message/managing-messages/delete-saved-messages", @@ -5293,7 +5293,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete messages in a batch.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-saved-messages", - "content": "import deleteMessages, off, onMsgDeleted from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = removeMessageByID message.clientMsgID await deleteMessages deleteParams off deletedSubscription deleteMessages is Commercial and uses OpenIMDeleteMessagesParams ; onMsgDeleted is public. Merge request/event idempotently and follow the deployed service's cross device semantics." + "content": "deleteMessages is Commercial and batch deletes explicitly selected messages from one conversation. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the messages. | | clientMsgIDs | string | Yes | Message IDs; all IDs in one request must belong to this conversation. | | IsSync | boolean | Yes | Whether to synchronize deletion to this account's other clients. The capital I is part of the field name. | import deleteMessages, off, onMsgDeleted from '@/uni modules/unix openim sdk' const deletedSubscription = onMsgDeleted message = if message == null return removeMessage resolveConversationID message , message.clientMsgID await deleteMessages conversationID, clientMsgIDs: selectedMessageIDs, IsSync: true function removeMessageDeletedListener off deletedSubscription IsSync: false removes current device and current account server records; true also requests synchronization to other clients. It does not remove copies belonging to other conversation members and does not create a revoked message notice. Promise completion does not prove that every client received the event. Public onMsgDeleted belongs to this page and provides OpenIMMessageItem | null ; resolve its conversation and remove by clientMsgID idempotently. Remove the listener on logout/account change and reconcile with history when necessary." }, { "path": "/sdk/uniapp/message/managing-messages/delete-user-messages", @@ -5301,7 +5301,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Delete all messages from a user in a group chat.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages delete-user-messages", - "content": "import deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv from '@/uni modules/unix openim sdk' const subscription = onDeleteUserAllMsgsInConv payload = refreshAfterValidatedJson payload await deleteUserAllMessagesInConv conversationID, userID: targetUserID off subscription This Commercial range deletion requires authority and strong confirmation. Validate opaque JSON and refresh rather than depending on unfrozen fields." + "content": "deleteUserAllMessagesInConv and onDeleteUserAllMsgsInConv are Commercial . The operation applies only to group conversations and deletes every message sent by the selected user in that conversation. Treat it as a high impact moderation action, not a normal single message menu item; OpenIMServer validates operator permission. import deleteUserAllMessagesInConv, off, onDeleteUserAllMsgsInConv from '@/uni modules/unix openim sdk' const subscription = onDeleteUserAllMsgsInConv payload = refreshAfterValidatedJson payload await deleteUserAllMessagesInConv conversationID, userID: targetUserID off subscription Require strong confirmation. Promise completion does not mean the event has already arrived. The event payload is raw JSON in the uni app / uni app x contract, so parse it defensively and refresh the conversation instead of depending on unfrozen fields or logging the payload. This page owns onDeleteUserAllMsgsInConv . Remove its subscription when the component is destroyed, the user logs out, or the active account changes. Promise completion, event delivery, and a fresh history query are three independent stages." }, { "path": "/sdk/uniapp/message/managing-messages/revoke-a-message", @@ -5309,7 +5309,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Revoke a message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages revoke-a-message", - "content": "import off, onNewRecvMessageRevoked, revokeMessage from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked mergeRevokedInfo await revokeMessage conversationID, clientMsgID off revokedSubscription The server enforces sender, time, and permission rules. Keep a revoked placeholder instead of blindly removing the array entry; Promise and event order is not guaranteed." + "content": "Use revokeMessage when other conversation members should see a revoked message state. Normal deletion only changes current account visibility. To edit sent content instead, see Modify a message /sdk/uniapp/message/managing messages/modify a message . Do not substitute deletion for revocation because the recipient visible semantics differ. Revoke one message import off, onNewRecvMessageRevoked, revokeMessage from '@/uni modules/unix openim sdk' const revokedSubscription = onNewRecvMessageRevoked info = if info = null markMessageRevoked info.clientMsgID, info await revokeMessage conversationID, clientMsgID function removeRevokeListener off revokedSubscription After Promise success, the caller can mark the matching local message as revoked. Online clients receive onNewRecvMessageRevoked and should update the bubble rather than deleting the array entry. The server enforces sender, time window, and message type rules. If the call fails, do not leave a fabricated revoked placeholder. Promise success means only that the current request completed, not that every client interface has processed its event. Return result revokeMessage resolves to a string result, not a message object. Continue using the requested clientMsgID locally and reconcile other clients through the event. The event may arrive before the Promise resolves. Treat both paths as updates to the same stable message state instead of appending a second row. Listen for revocation events This page owns onNewRecvMessageRevoked . Its value is OpenIMMessageRevokedItem | null ; merge by clientMsgID . isAdminRevoke can select an administrator specific notice. Event and Promise order is not guaranteed, so processing must be idempotent. Remove the listener on component disposal, logout, or account change. After a new login, revocation changes are synchronized through message events. Do not retain a subscription from the previous account or infer revocation completion from a history request callback. Related pages Delete saved messages /sdk/uniapp/message/managing messages/delete saved messages Modify a message /sdk/uniapp/message/managing messages/modify a message Receive messages /sdk/uniapp/message/receiving messages/receive messages Send a message /sdk/uniapp/message/sending messages/send message Find messages by ID /sdk/uniapp/message/retrieving messages/find messages by id" }, { "path": "/sdk/uniapp/message/managing-messages/modify-a-message", @@ -5317,7 +5317,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Modify a message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages modify-a-message", - "content": "import modifyMessage, off, onMessageEdited, onMessageModified from '@/uni modules/unix openim sdk' const modified = onMessageModified refreshModifiedMessage const edited = onMessageEdited refreshModifiedMessage const result = await modifyMessage modifyParams off modified ; off edited These are Commercial . Validate raw event JSON, refresh by stable message ID, redact message bodies from logs, and use the server's final version for multi device conflicts." + "content": "modifyMessage is Commercial . Unlike deletion, which changes current account visibility, and revocation, which creates a revoked state for conversation members, modification replaces content and synchronizes it to other clients. Modify message content Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | message | OpenIMMessageItem | Yes | Complete edited message; preserve the original clientMsgID . | import modifyMessage, off, onMessageEdited, onMessageModified from '@/uni modules/unix openim sdk' const modified = onMessageModified refreshModifiedMessage const edited = onMessageEdited refreshModifiedMessage const result = await modifyMessage conversationID, message: buildEditedMessage message, editedText if result?.message = null replaceMessage result.message function removeMessageModifiedListeners off modified off edited This is not a partial patch. Copy the current message and change only the intended content, preserving its ID and other fields. The server enforces sender, time window, and content type rules. If the call fails, discard the optimistic edit instead of leaving content that exists only in local UI state. Redact message bodies from diagnostics and keep the previous server confirmed object until the request succeeds. Return result result?.message is the server confirmed OpenIMMessageItem | null . Replace the matching local message, but do not assume every device has updated. Promise completion confirms the current request only. Other clients merge the incremental update later, and the event can race with the Promise on the initiating client. Use clientMsgID and the server confirmed version rather than arrival order. Listen for message modifications Commercial onMessageModified and onMessageEdited deliver raw JSON. A deployment may use either event. If both are registered, validate JSON and deduplicate by stable message ID/version. Do not log message bodies. Remove both subscriptions when the login scope ends, and use the server's final version to resolve multi device edits. After validation, resolve the conversation from the message routing fields and replace the existing row by clientMsgID . If the raw payload does not expose a stable, contract approved shape, re query the message rather than casting it directly. Related pages Delete saved messages /sdk/uniapp/message/managing messages/delete saved messages Revoke a message /sdk/uniapp/message/managing messages/revoke a message Find messages by ID /sdk/uniapp/message/retrieving messages/find messages by id Send a message /sdk/uniapp/message/sending messages/send message Receive messages /sdk/uniapp/message/receiving messages/receive messages" }, { "path": "/sdk/uniapp/message/managing-messages/get-pinned-messages", @@ -5325,7 +5325,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get pinned messages in a conversation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages get-pinned-messages", - "content": "import getConversationPinnedMsg from '@/uni modules/unix openim sdk' const result = await getConversationPinnedMsg conversationID This is Commercial . Follow returned pagination/list fields, deduplicate by clientMsgID , and reload after pin change events." + "content": "import getConversationPinnedMsg from '@/uni modules/unix openim sdk' const result = await getConversationPinnedMsg conversationID replacePinnedMessages conversationID, result?.messages ?? This is Commercial . The Promise returns the conversation's current pinned message snapshot. Follow the returned DTO's message list and pagination fields, and see Message overview /sdk/uniapp/message/overview message for message fields. The query does not emit a pin change event. Deduplicate by clientMsgID , merge deletion, revocation, and modification events into displayed message content, and reload the pinned snapshot after the raw event described in Pin or unpin a message /sdk/uniapp/message/managing messages/set message pinned ." }, { "path": "/sdk/uniapp/message/managing-messages/set-message-pinned", @@ -5333,7 +5333,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Pin or unpin a message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-pinned", - "content": "import off, onChangedPinnedMsg, setConversationPinnedMsg from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg pinParams off pinnedSubscription Both are Commercial . Validate the raw event and reload the pinned list instead of casting opaque JSON directly to a message." + "content": "setConversationPinnedMsg and onChangedPinnedMsg are Commercial . Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | Message to pin or unpin. | | pinned | boolean | Yes | true to pin, false to unpin. | import off, onChangedPinnedMsg, setConversationPinnedMsg from '@/uni modules/unix openim sdk' const pinnedSubscription = onChangedPinnedMsg payload = refreshPinnedMessagesAfterValidJson payload await setConversationPinnedMsg conversationID, clientMsgID: message.clientMsgID, pinned: true function removePinnedListener off pinnedSubscription The server enforces permission, message type, and count limits. Promise success does not mean the event arrived. This page owns the raw JSON onChangedPinnedMsg event. Validate it, refresh the conversation's pinned set, and deduplicate by clientMsgID rather than casting opaque JSON directly to a message. Remove the subscription when the login scope ends." }, { "path": "/sdk/uniapp/message/managing-messages/insert-local-single-message", @@ -5341,7 +5341,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local one-to-one message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-single-message", - "content": "import insertSingleMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertSingleMessageToLocalStorage insertParams Use a real OpenIMInsertSingleMessageParams with message, sender, and receiver. This inserts device local history and sends nothing; prevent ID collisions and never fake remote delivery." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | message | OpenIMMessageItem | Yes | Complete message to store locally. | | recvID | string | Yes | Single chat receiver. | | sendID | string | Yes | Sender user ID. | import createTextMessage, insertSingleMessageToLocalStorage from '@/uni modules/unix openim sdk' const message = await createTextMessage 'Local notice' if message = null await insertSingleMessageToLocalStorage message, recvID: targetUserID, sendID: currentUserID The Promise only writes this device's database. It sends nothing and emits no new message event. Use the capability for migration or local notices, not to fake a sent message, and prevent message ID collisions." }, { "path": "/sdk/uniapp/message/managing-messages/insert-local-group-message", @@ -5349,7 +5349,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Insert a local group message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages insert-local-group-message", - "content": "import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage insertParams Use OpenIMInsertGroupMessageParams with group, sender, and message. This updates only local history and does not broadcast to group members." + "content": "Parameters | Parameter | Type | Required | Description | | | | | | | message | OpenIMMessageItem | Yes | Complete message to store locally. | | groupID | string | Yes | Target group. | | sendID | string | Yes | Sender user ID. | import insertGroupMessageToLocalStorage from '@/uni modules/unix openim sdk' await insertGroupMessageToLocalStorage message, groupID, sendID: currentUserID The Promise only changes this device's local database. It does not broadcast to group members or emit a new message event. Use it for migration or local notices, not to fake server delivery. Use a send API when you need delivery, offline push, or multi device synchronization." }, { "path": "/sdk/uniapp/message/managing-messages/clear-all-local-messages", @@ -5357,7 +5357,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Clear all local messages.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-local-messages", - "content": "import deleteAllMsgFromLocal from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocal This high risk operation clears all local messages for the account. Confirm, stop concurrent queries, and remember that server synchronization may restore some data." + "content": "import deleteAllMsgFromLocal from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocal This high risk operation clears all local messages for the current account. Require explicit confirmation and stop concurrent message queries before calling it. It does not guarantee deletion of server data, and later synchronization may restore some records. Rebuild the local message store after success and re query after an ambiguous failure." }, { "path": "/sdk/uniapp/message/managing-messages/clear-all-messages", @@ -5365,7 +5365,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Clear local and server messages.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages clear-all-messages", - "content": "import deleteAllMsgFromLocalAndSvr from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocalAndSvr This is a higher risk account wide local/server deletion. Explain scope/recovery, require strong confirmation, and rebuild conversation/message state after success or ambiguous failure." + "content": "import deleteAllMsgFromLocalAndSvr from '@/uni modules/unix openim sdk' await deleteAllMsgFromLocalAndSvr This is a higher risk account wide local/server deletion. Explain scope and recovery behavior, require strong confirmation, and block concurrent mutations. Rebuild conversation and message state after success. On a timeout or ambiguous failure, query current state instead of assuming the operation was atomic." }, { "path": "/sdk/uniapp/message/managing-messages/set-message-local-ex", @@ -5373,7 +5373,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Set a local message extension.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-messages set-message-local-ex", - "content": "import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify localState localEx is device local and replaced as one value. Merge/version JSON, constrain size, and store no tokens or irreplaceable business data." + "content": "localEx is stored only on this client. Use it for collapsed, selected, or local source display state, not for data that must synchronize. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Conversation containing the message. | | clientMsgID | string | Yes | Target message ID. | | localEx | string | Yes | Complete replacement string. | import setMessageLocalEx from '@/uni modules/unix openim sdk' await setMessageLocalEx conversationID, clientMsgID, localEx: JSON.stringify localState The Promise means the local value was updated. The method does not merge old JSON and emits no shared message event. Merge and version data in the application when old fields must survive, constrain size, and store no tokens or irreplaceable business data." }, { "path": "/sdk/uniapp/message/managing-read-status/send-group-read-receipts", @@ -5381,7 +5381,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Report group messages as read.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status send-group-read-receipts", - "content": "import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt refreshReadState await sendGroupMessageReadReceipt receiptParams off receiptSubscription Both are Commercial . Validate raw JSON and merge by message ID. Request completion, event arrival, and reader list updates are separate stages." + "content": "import off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt from '@/uni modules/unix openim sdk' const receiptSubscription = onRecvGroupReadReceipt payload = mergeValidatedGroupReadReceipt payload await sendGroupMessageReadReceipt conversationID, clientMsgIDs: visibleUnreadMessageIDs function removeGroupReadReceiptListener off receiptSubscription Both APIs are Commercial . All message IDs in one request must belong to the target group conversation. Promise success means the server accepted the report; it does not update the conversation unread count, which remains the responsibility of markConversationMessageAsRead . This page owns raw JSON event onRecvGroupReadReceipt . Validate JSON and merge counts/member data by conversationID + clientMsgID . Remove the subscription on logout or account change. Request completion, event delivery, and the snapshot returned by Get group message readers /sdk/uniapp/message/managing read status/get group message readers are independent phases." }, { "path": "/sdk/uniapp/message/managing-read-status/get-group-message-readers", @@ -5389,7 +5389,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get members who read a group message.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp message managing-read-status get-group-message-readers", - "content": "import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList readerParams This Commercial operation uses OpenIMGetGroupMessageReaderListParams . Continue through returned pagination fields, deduplicate by userID , and refresh because new receipts can change the list." + "content": "getGroupMessageReaderList is Commercial and paginates members who have or have not read a specific group message. Parameters | Parameter | Type | Required | Description | | | | | | | conversationID | string | Yes | Group conversation ID. | | clientMsgID | string | Yes | Message whose readers are queried. | | filter | number | Yes | 0 for readers, 1 for unread members. | | offset | number | Yes | Pagination offset; start with 0 . | | count | number | Yes | Number of members to request. | import getGroupMessageReaderList from '@/uni modules/unix openim sdk' const result = await getGroupMessageReaderList conversationID, clientMsgID, filter: 0, offset: 0, count: 50, const readers = result?.readers ?? result?.readers is the current page of OpenIMGroupMemberItem . Continue by increasing offset and deduplicate by groupID:userID . The query creates a snapshot and emits no receipt event; refresh the detail because later receipts can change it." }, { "path": "/sdk/uniapp/file-uploads/upload-file", @@ -5397,7 +5397,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Upload a file.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp file-uploads upload-file", - "content": "import uploadFile from '@/uni modules/unix openim sdk' const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', Use a readable absolute native path. Resolve unifile:// first and never pass a network URL as filepath . Observe progress through onUploadFileProgress . import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' cancelUpload is Commercial . The original upload Promise defines the final state. Do not delete a temporary file while native code may still read it." + "content": "uploadFile is an independent upload operation for avatars, group images, profile attachments, and other business files. It does not create a chat message. It uploads a native readable local file and returns its URL/URI, UUID, size, and media metadata. Parameters | Parameter | Type | Required | Description | | | | | | | filepath | string | Yes | Full local path readable by the native layer. | | name | string | Yes | Filename. | | contentType | string | Yes | MIME type. | | uuid | string | Yes | Stable task ID created by your application. | | cancelID | string or null | No | Stable ID used to cancel this upload. | | cause | string or null | No | Business purpose or reason for the upload. | Register the progress event before calling uploadFile so a small file cannot complete before the listener exists. import off, onUploadFileProgress, uploadFile from '@/uni modules/unix openim sdk' const progressSubscription = onUploadFileProgress event = if event == null return updateUploadProgress event.progress const result = await uploadFile filepath: '/data/user/0/app/cache/report.pdf', name: 'report.pdf', contentType: 'application/pdf', uuid: createStableUploadUUID , cancelID: 'upload report 1', function removeUploadListener off progressSubscription Resolve unifile:// to a platform sandbox path and never pass a network URL as filepath . Android and iOS temporary directories, grants, and lifetimes differ; do not move or delete the source while native code may still read it. The Promise resolves to OpenIMUploadFileResult | null : | Field | Type | Description | | | | | | url | string or null | Uploaded remote URL. | | uri | string or null | Resource URI returned by the server. | | uuid | string or null | Upload task identifier. | | size | number or null | File size. | | typ | number or null | Resource type returned by the server. | | mediaID | string or null | Media resource ID. | Use result?.url in a profile update or when creating the appropriate message. Upload success does not update profile data or create/send a chat message; those are separate operations. Listen for upload progress onUploadFileProgress returns an OpenIMSDKEventSubscription , and its event contains only progress . Unlike Wasm completion events, the current uni app / uni app x contract does not include a task ID. Do not correlate several concurrent uploads by array position; limit concurrency or track final state through each Promise. Call removeUploadListener when the account or upload store is disposed. Commercial applications can cancel the matching task with cancelUpload Commercial : import cancelUpload from '@/uni modules/unix openim sdk' await cancelUpload cancelID: 'upload report 1' Cancellation is asynchronous; the original upload Promise and error code define the final state. Do not delete a temporary file until the upload completes or cancellation is confirmed." }, { "path": "/sdk/uniapp/calling/overview-calling", @@ -5405,7 +5405,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Audio and video calling overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling overview-calling", - "content": "Every capability in this section is Commercial and requires the commercial signaling services. unix openim sdk handles invitations, accept/reject/cancel/hangup, room credentials, and events; it does not provide call UI or render camera/audio. For complete call and meeting UI, integrate openim av runtime . It reuses this plugin's only login through typed Host RPC and never initializes another OpenIM Core. A typical flow registers all signaling events, invites with OpenIMSignalingInvitationInfo , validates the raw incoming payload, requests media permission before accepting, creates media from room credentials, and drives one session state machine from cancel/timeout/hangup/multi device events. Never persist or log token, liveURL, or raw signaling payload." + "content": "Every capability in this section is Commercial and requires OpenIMServer commercial signaling services. unix openim sdk provides the signaling APIs required to invite, accept, reject, cancel, hang up, query rooms, and synchronize call state. It coordinates participants, room information, and the signaling lifecycle; it does not capture camera frames, render remote media, or provide call UI. The application passes the returned roomID , token , and liveURL to its realtime media engine and remains responsible for device permissions, media tracks, weak network behavior, and UI state. Signaling is not a complete WebRTC media SDK. For complete call and meeting UI, integrate openim av runtime ; it reuses the login owned by this plugin and never initializes a second OpenIM Core. Call flow 1. Log in to IM and register signaling listeners. Call signalingInvite for a one to one call or signalingInviteInGroup for a group call. 2. The invitee receives a raw JSON payload from onReceiveNewInvitation , validates it, maps it to OpenIMSignalingInvitationInfo , and presents incoming call UI. 3. The invitee requests media permission before calling signalingAccept , or calls signalingReject to decline. 4. Both sides use the returned room ID, token, and live URL to join the media engine. 5. Participant, stream, and custom signal events update the local call state while the room is active. 6. The inviter can cancel an unanswered invitation, and any participant can hang up an established call. Core data | Type | Description | | | | | OpenIMSignalingInvitationInfo | Inviter, invitees, group, room, media type, timeout, and session type. | | OpenIMSignalingInviteResult | Room ID, token, live URL, and busy user list returned by OpenIMServer. | | OpenIMSignalingAcceptResult | Room credentials returned when an invitation is accepted. | | OpenIMSignalingGetTokenByRoomIDResult | Refreshed token and live URL for a known room. | | OpenIMSignalingGetRoomByGroupIDResult | Room ID and invitation snapshot for a group call. | customData and custom signaling are suitable only for non secret negotiation data. Never put long lived credentials, administrator secrets, or private authorization state in them. State and event ownership For invite, accept, reject, cancel, and hangup operations, handle the Promise result separately from signaling events. Promise success means OpenIMServer accepted or completed that request; events describe incremental state observed by the inviter, invitee, other devices, or room participants. They are not the same completion signal. Signaling events carry raw JSON strings and must be validated before they enter application state. The complete invitation and room event lifecycle belongs to Handle call events /sdk/uniapp/calling/managing calls/handle call events . Custom signal events belong to Send a custom signal /sdk/uniapp/calling/sending custom signals/send a custom signal . Room, token, and startup invitation queries only return a snapshot from their Promise. Use roomID as the primary call key and combine it with user IDs for participant state. Re login creates a new event scope; query a room only when a current snapshot is needed. Find a task | Task | Page | | | | | Start a one to one or group call | Start a one to one call /sdk/uniapp/calling/managing calls/start single call , Start a group call /sdk/uniapp/calling/managing calls/start group call | | Accept or reject an invitation | Accept a call /sdk/uniapp/calling/managing calls/accept call , Reject a call /sdk/uniapp/calling/managing calls/reject call | | Cancel an invitation or end a call | Cancel a call invitation /sdk/uniapp/calling/managing calls/cancel call , End a call /sdk/uniapp/calling/managing calls/hang up call | | Restore a room or pending invitation | Get a group call room /sdk/uniapp/calling/retrieving call information/get room by group id , Get a call room token /sdk/uniapp/calling/retrieving call information/get token by room id , Restore a pending invitation /sdk/uniapp/calling/retrieving call information/restore pending invitation | | Handle lifecycle and business negotiation | Handle call events /sdk/uniapp/calling/managing calls/handle call events , Send a custom signal /sdk/uniapp/calling/sending custom signals/send a custom signal | Keep one active call or meeting per login/runtime. Never persist or log tokens, live URLs, or raw signaling payloads." }, { "path": "/sdk/uniapp/calling/managing-calls/start-single-call", @@ -5413,7 +5413,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Start a one-to-one call.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-single-call", - "content": "import signalingInvite from '@/uni modules/unix openim sdk' const result = await signalingInvite invitation: inviterUserID: selfUserID, inviteeUserIDList: peerUserID , mediaType: 'video', timeout: 30, sessionType: 1 , offlinePushInfo: title: 'Video call', desc: 'Incoming call' , This is Commercial . Treat roomID , token , liveURL , and busy user results as optional; cancel an accepted invitation if presentation fails, and never log credentials." + "content": "The Commercial signalingInvite operation starts a one to one audio or video call. unix openim sdk creates the signaling invitation; the application still joins its media engine with the returned room credentials. Parameters | Parameter | Type | Required | Description | | | | | | | invitation | OpenIMSignalingInvitationInfo | Yes | Invitation for this call. | | invitation.inviterUserID | string | Yes | Current logged in user ID. | | invitation.inviteeUserIDList | string | Yes | Invitees; use one peer for a one to one call. | | invitation.groupID | string | Yes | Use an empty string for one to one calls. | | invitation.roomID | string | Yes | Unique room identifier shared by all call state. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | Application convention such as audio or video . | | invitation.sessionType | number | Yes | Use OpenIMSessionTypeSingle . | | invitation.platformID | number | Yes | Current native platform constant. | | invitation.customData | string | No | Application extension data. | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | No | Offline push title, description, and iOS settings. | import OpenIMPlatformAndroid, OpenIMSessionTypeSingle, signalingInvite, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInvite invitation: inviterUserID: currentUserID, inviteeUserIDList: peerUserID , customData: JSON.stringify source: 'contact card' , groupID: '', roomID: createBusinessRoomID , timeout: 30, mediaType: 'video', sessionType: OpenIMSessionTypeSingle, platformID: OpenIMPlatformAndroid, , offlinePushInfo: title: 'Video call', desc: 'You have an incoming video call', ex: '', iOSPushSound: 'default', iOSBadgeCount: true, , Use OpenIMPlatformIOS on iOS. Generate a stable room ID for this call and keep it consistent across participants. Result The Promise resolves to OpenIMSignalingInviteResult | null : | Field | Type | Description | | | | | | roomID | string or null | Media room identifier. | | token | string or null | Short lived room credential. | | liveURL | string or null | Media service connection address. | | busyLineUserIDList | string or null | Users who were busy when invited. | | invitation | OpenIMSignalingInvitationInfo or null | Server invitation snapshot. | Join the media engine only after obtaining a valid room ID and token. Promise success does not mean the peer accepted; merge later state through call events /sdk/uniapp/calling/managing calls/handle call events . If the application cannot present outgoing call UI after the invite succeeds, actively cancel the invitation. Never log room credentials." }, { "path": "/sdk/uniapp/calling/managing-calls/start-group-call", @@ -5421,7 +5421,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Start a group call.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls start-group-call", - "content": "import signalingInviteInGroup from '@/uni modules/unix openim sdk' const result = await signalingInviteInGroup invitation: inviterUserID: selfUserID, inviteeUserIDList: selectedUserIDs, groupID, mediaType: 'audio', timeout: 30, sessionType: 2 , This is Commercial . Deduplicate targets and verify current membership. Busy users do not determine later accept/reject/timeout outcomes for all other invitees." + "content": "The Commercial signalingInviteInGroup operation starts a group call. It invites only the users listed in inviteeUserIDList ; setting groupID does not automatically invite every group member. Parameters | Parameter | Type | Required | Description | | | | | | | invitation.inviterUserID | string | Yes | Current user ID. | | invitation.inviteeUserIDList | string | Yes | Selected members; exclude the inviter. | | invitation.groupID | string | Yes | Target group ID. | | invitation.roomID | string | Yes | Shared unique room identifier. | | invitation.timeout | number | Yes | Invitation timeout in seconds. | | invitation.mediaType | string | Yes | audio or video by application convention. | | invitation.sessionType | number | Yes | Use the matching group session constant. | | invitation.platformID | number | Yes | Current native platform constant. | | invitation.customData | string | No | Application extension data. | | invitation.initiateTime | number | No | Invitation start time. The signaling flow normally maintains it, so new calls can omit it. | | invitation.busyLineUserIDList | string | No | Busy user list returned by an existing flow. Omit it when starting a new invitation. | | offlinePushInfo | OpenIMSignalingOfflinePushInfo | No | Offline push content. | | offlinePushInfo.title | string | Conditional | Push title, required when offlinePushInfo is provided. | | offlinePushInfo.desc | string | Conditional | Push body, required when offlinePushInfo is provided. | | offlinePushInfo.ex | string | Conditional | Extension string, required when offlinePushInfo is provided. Pass an empty string if unused. | | offlinePushInfo.iOSPushSound | string | Conditional | iOS push sound, required when offlinePushInfo is provided. | | offlinePushInfo.iOSBadgeCount | boolean | Conditional | Whether the push updates the iOS badge, required when offlinePushInfo is provided. | import OpenIMPlatformAndroid, OpenIMSessionTypeWriteGroup, signalingInviteInGroup, from '@/uni modules/unix openim sdk' const roomCredentials = await signalingInviteInGroup invitation: inviterUserID: currentUserID, inviteeUserIDList: selectedGroupMemberIDs, customData: JSON.stringify source: 'group call' , groupID, roomID: groupID, timeout: 30, mediaType: 'video', sessionType: OpenIMSessionTypeWriteGroup, platformID: OpenIMPlatformAndroid, , offlinePushInfo, This example reuses the group ID as the room ID. If the application generates a different room ID, all participants must use that value. Use OpenIMPlatformIOS on iOS. Exclude the current user, blank IDs, and duplicates, and verify that selected users are still group members. The Promise resolves to OpenIMSignalingInviteResult | null ; see Start a one to one call /sdk/uniapp/calling/managing calls/start single call for all fields. A busy user list only identifies members who were busy at invite time. It must not cancel invitations for other users, and success does not mean anyone has accepted. Merge later acceptance, rejection, and timeout through call events /sdk/uniapp/calling/managing calls/handle call events ." }, { "path": "/sdk/uniapp/calling/managing-calls/accept-call", @@ -5429,7 +5429,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Accept a call.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls accept-call", - "content": "import signalingAccept from '@/uni modules/unix openim sdk' const result = await signalingAccept invitation This is Commercial . Validate the session and obtain microphone/camera permission before sending accept. Keep optional token/room/live URL only in memory. Promise completion, remote events, and media connection are separate phases." + "content": "import signalingAccept from '@/uni modules/unix openim sdk' const roomCredentials = await signalingAccept invitation signalingAccept is Commercial . Pass the original OpenIMSignalingInvitationInfo received from onReceiveNewInvitation ; it must retain the room, inviter, invitees, and session type. Do not reconstruct it. Validate the active SDK session and request microphone or camera permission before accepting. If permission is denied, do not send an accept request; reject the call or explain the failure according to the product flow. Result The Promise resolves to OpenIMSignalingAcceptResult | null : | Field | Type | Description | | | | | | roomID | string or null | Media room identifier for this call. | | token | string or null | Short lived credential used to join the room. | | liveURL | string or null | Media service connection address. | | invitation | OpenIMSignalingInvitationInfo or null | Invitation snapshot returned by the server. | Keep these values only in memory. Join the media engine only after obtaining a valid roomID and token . Promise completion, remote signaling events, and an established media connection are separate phases; continue merging state through call events /sdk/uniapp/calling/managing calls/handle call events ." }, { "path": "/sdk/uniapp/calling/managing-calls/reject-call", @@ -5437,7 +5437,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Reject a call.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls reject-call", - "content": "import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation Use the complete received Commercial invitation; do not reconstruct it or alter roomID . Close local incoming UI and handle remote/multi device events idempotently." + "content": "import signalingReject from '@/uni modules/unix openim sdk' await signalingReject invitation When the user declines an incoming call, pass the complete received OpenIMSignalingInvitationInfo to the Commercial signalingReject operation. Do not reconstruct the invitation or alter its roomID . Promise success only means OpenIMServer completed the reject request. The local incoming call UI can then close, while the inviter updates through onInviteeRejected . Remote and multi device events may race with the local action and must be handled idempotently. See call events /sdk/uniapp/calling/managing calls/handle call events for the complete lifecycle." }, { "path": "/sdk/uniapp/calling/managing-calls/cancel-call", @@ -5445,7 +5445,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Cancel a call invitation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls cancel-call", - "content": "import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation This Commercial operation is for a caller before connection; hangup is for an accepted/connecting session. Prevent duplicate actions and resolve cancel/accept races from events." + "content": "import signalingCancel from '@/uni modules/unix openim sdk' await signalingCancel invitation signalingCancel is Commercial and is called by the inviter while the invitation is still unanswered. Pass the complete original OpenIMSignalingInvitationInfo ; a newly constructed object containing only roomID is not sufficient. Cancellation and hangup have different meanings: cancel an unanswered invitation, and hang up an accepted or connecting session. Promise success means the cancel signaling request completed. The app must also leave its local waiting state and release media resources that were prepared but not used. The remote side updates through onInvitationCancelled . Prevent duplicate actions and resolve cancel/accept races from call events /sdk/uniapp/calling/managing calls/handle call events ." }, { "path": "/sdk/uniapp/calling/managing-calls/hang-up-call", @@ -5453,7 +5453,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for End a call.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls hang-up-call", - "content": "import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation Lock the Commercial ending transition so local, remote, and network causes cannot execute it twice. Close media resources and process onHangUp idempotently." + "content": "import signalingHungUp from '@/uni modules/unix openim sdk' await signalingHungUp invitation After a call has connected, a participant uses the Commercial signalingHungUp operation. Pass the complete OpenIMSignalingInvitationInfo used by the current call; its roomID must match the active media room. Promise success only means the hangup signaling request completed. The application must also stop local capture, disconnect the media room, and release camera, microphone, and page resources. Lock the ending transition so local UI actions, remote hangup, timeout, and network errors cannot execute cleanup twice. Cancellation, rejection, timeout, and hangup should converge on one idempotent cleanup flow keyed by roomID . Continue handling onHangUp as documented in call events /sdk/uniapp/calling/managing calls/handle call events ." }, { "path": "/sdk/uniapp/calling/managing-calls/handle-call-events", @@ -5461,7 +5461,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Handle call events.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling managing-calls handle-call-events", - "content": "All Commercial call events deliver raw JSON strings. Acknowledge quickly, validate JSON, then map to your own call domain model. import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeRejected, onReceiveNewInvitation from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const subscriptions = onReceiveNewInvitation handleCallPayload , onInviteeAccepted handleCallPayload , onInviteeRejected handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , subscriptions.forEach subscription = off subscription Also register the documented other device and room participant events. HarmonyOS returns an unsupported subscription for onStreamChange . Deduplicate by room/session plus runtime generation, and never log raw payloads or RTC tokens." + "content": "Keep Commercial call listeners in one call state layer. Merge invitation lifecycle, participant connection, and stream changes into the same local state keyed by roomID . Every event delivers a raw JSON string; keep the callback short, validate JSON, and then map it to the application's call domain model. | Event | Purpose | | | | | onReceiveNewInvitation | A new call invitation arrived. | | onInviteeAccepted , onInviteeRejected | The current invitation was accepted or rejected. | | onInvitationCancelled , onInvitationTimeout | The invitation was cancelled or timed out. | | onInviteeAcceptedByOtherDevice , onInviteeRejectedByOtherDevice | Another device for the same account handled it. | | onHangUp | A participant ended the call. | | onRoomParticipantConnected , onRoomParticipantDisconnected | Room participant connection changed. | | onStreamChange | Participant media stream state changed. | import off, onHangUp, onInvitationCancelled, onInvitationTimeout, onInviteeAccepted, onInviteeAcceptedByOtherDevice, onInviteeRejected, onInviteeRejectedByOtherDevice, onReceiveNewInvitation, onRoomParticipantConnected, onRoomParticipantDisconnected, onStreamChange, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' function handleCallPayload payload : string try const value = JSON.parseObject payload if value = null routeValidatedCallEvent value catch console.error 'Invalid call event payload' const invitationSubscription = onReceiveNewInvitation handleCallPayload const subscriptions : Array = invitationSubscription, onInviteeAccepted handleCallPayload , onInviteeAcceptedByOtherDevice handleCallPayload , onInviteeRejected handleCallPayload , onInviteeRejectedByOtherDevice handleCallPayload , onInvitationCancelled handleCallPayload , onInvitationTimeout handleCallPayload , onHangUp handleCallPayload , onRoomParticipantConnected handleCallPayload , onRoomParticipantDisconnected handleCallPayload , onStreamChange handleCallPayload , function removeCallListeners subscriptions.forEach subscription = off subscription This page is the sole complete listener owner for these 11 events. Merge participant state using both room and user IDs; do not rely on event order, display names, or array positions. Deduplicate with the room ID, local session ID, and runtime generation so stale events cannot reopen UI. Call removeCallListeners when the call state layer is destroyed, the user logs out, or the account changes. HarmonyOS returns a platform unsupported subscription for onStreamChange and does not fabricate a stream event. The other signaling events on this page are supported. Never log raw payloads or RTC tokens." }, { "path": "/sdk/uniapp/calling/retrieving-call-information/restore-pending-invitation", @@ -5469,7 +5469,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Restore a pending call invitation.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information restore-pending-invitation", - "content": "Call this Commercial operation once after event listeners are armed: import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation No invitation legitimately resolves to null . Deduplicate recovery against realtime events by room/session ID and perform only one startup request per runtime initialization." + "content": "Call the Commercial signalingGetInvitationInfoStartApp operation once after event listeners are armed. It returns the invitation snapshot that may need recovery when the app starts or returns to the foreground: import signalingGetInvitationInfoStartApp from '@/uni modules/unix openim sdk' const result = await signalingGetInvitationInfoStartApp if result?.invitation = null recoverInvitation result.invitation An optional userID parameter can explicitly identify the queried user, but the current login session normally supplies it. Result The Promise resolves to OpenIMSignalingGetInvitationInfoStartAppResult | null . Its invitation field is OpenIMSignalingInvitationInfo | null . A null result or invitation: null is the valid “no pending invitation” state, not an error. This query only reads a snapshot and does not emit call events. Restore the incoming call UI only when the invitation and its roomID are valid. The recovered snapshot may duplicate a realtime event, so deduplicate by room and local session identifiers. Perform only one startup request per runtime initialization, then continue listening for cancellation, timeout, acceptance, and hangup through call events /sdk/uniapp/calling/managing calls/handle call events ." }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-room-by-group-id", @@ -5477,7 +5477,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get a group call room.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-room-by-group-id", - "content": "import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const result = await signalingGetRoomByGroupID groupID The Commercial room ID and invitation are optional. Empty means no joinable room. Treat the snapshot as short lived and obtain a valid token immediately before joining." + "content": "import signalingGetRoomByGroupID from '@/uni modules/unix openim sdk' const room = await signalingGetRoomByGroupID groupID The Commercial signalingGetRoomByGroupID operation takes a group ID, not a custom room ID. Result The Promise resolves to OpenIMSignalingGetRoomByGroupIDResult | null : | Field | Type | Description | | | | | | roomID | string or null | Room identifier for the current group call. | | invitation | OpenIMSignalingInvitationInfo or null | Original invitation associated with the room. | Unlike the Wasm result, the uni app / uni app x contract does not include participant records. Obtain participant state from the media engine or application state; do not invent a participant field. A null result or empty roomID means there is no joinable call. Treat the snapshot as short lived, continue handling signaling events, and obtain a valid token immediately before joining. Even when the application uses custom room IDs for group calls, query with groupID and merge the returned roomID into the active call state." }, { "path": "/sdk/uniapp/calling/retrieving-call-information/get-token-by-room-id", @@ -5485,7 +5485,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get a call room token.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling retrieving-call-information get-token-by-room-id", - "content": "import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const result = await signalingGetTokenByRoomID roomID This Commercial result contains optional token/live URL. Keep credentials only in memory, stop when fields are absent/expired, and never reuse or log an old token." + "content": "import signalingGetTokenByRoomID from '@/uni modules/unix openim sdk' const roomCredentials = await signalingGetTokenByRoomID roomID Use the Commercial signalingGetTokenByRoomID operation when the application already knows a room ID but needs fresh join credentials. The Promise resolves to OpenIMSignalingGetTokenByRoomIDResult | null , with optional token and liveURL fields. It does not return roomID again. Join the media engine with the room ID supplied to this request only after obtaining a valid token. Room tokens are short lived secrets. Keep them only in memory and never write them to logs, URLs, analytics events, files, or persistent storage. Stop the join flow when fields are absent or expired; do not reuse old credentials." }, { "path": "/sdk/uniapp/calling/sending-custom-signals/send-a-custom-signal", @@ -5493,7 +5493,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Send a custom signal.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp calling sending-custom-signals send-a-custom-signal", - "content": "import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling from '@/uni modules/unix openim sdk' const signal = onReceiveCustomSignal handleValidatedSignal const signaling = onReceiveCustomSignaling handleValidatedSignal await signalingSendCustomSignaling roomID, customInfo: JSON.stringify type: 'raise hand', version: 1 off signal ; off signaling These are Commercial . Compatible platforms may use either receive event, so deduplicate by event ID/content hash. Validate type/version/fields; custom content is not authorization and must not contain secrets." + "content": "The Commercial signalingSendCustomSignaling operation sends lightweight application negotiation data to a call room, such as a raised hand state or layout hint. It is not a chat message API and does not replace a media engine data channel. Send a signal customInfo is a string. Define and version a stable format before serializing structured data. import off, onReceiveCustomSignal, onReceiveCustomSignaling, signalingSendCustomSignaling, from '@/uni modules/unix openim sdk' const signal = version: 1, eventID: createBusinessEventID , type: 'hand raised', userID: currentUserID, sentAt: Date.now , await signalingSendCustomSignaling roomID, customInfo: JSON.stringify signal , Promise success means OpenIMServer accepted the send request, not that every participant processed it. Keep the payload small and include a protocol version and idempotency ID. Do not put files, chat history, durable state, or credentials in customInfo . Receive a signal onReceiveCustomSignal and onReceiveCustomSignaling are raw JSON compatibility events for different commercial Core/service versions. Subscribe only to the event produced by the actual deployment. If both are needed for compatibility, deduplicate by roomID:eventID . function handleValidatedSignal payload : string try const event = JSON.parseObject payload if event == null return const eventRoomID = event.getString 'roomID' const customInfo = event.getString 'customInfo' if eventRoomID = activeRoomID || customInfo == null return const signal = JSON.parseObject customInfo if signal == null return applyValidatedCallSignal eventRoomID, signal catch console.warn 'Invalid custom call signal' const signalSubscription = onReceiveCustomSignal handleValidatedSignal const signalingSubscription = onReceiveCustomSignaling handleValidatedSignal function removeCustomSignalListeners off signalSubscription off signalingSubscription Validate the outer room, then validate the custom JSON protocol version, event ID, type, and business fields before returning an application object. This page owns the complete listener examples for both compatibility events. Call removeCustomSignalListeners when leaving the call, logging out, or switching accounts. Custom client signals are not authorization. Never grant host, payment, or privacy permissions from them. Store authoritative state in a trusted backend, and refresh durable state from the room query or backend after reconnecting instead of treating transient custom signals as replayable records." }, { "path": "/sdk/uniapp/events/overview-events", @@ -5501,7 +5501,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Events overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp events overview-events", - "content": "Every on... call synchronously returns an OpenIMSDKEventSubscription with id and eventName . Release only your handle with off subscription . import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart from '@/uni modules/unix openim sdk' const subscriptions = onSyncServerStart reinstalled = beginSyncUI reinstalled , onSyncServerProgress updateSyncProgress , onSyncServerFinish reinstalled = finishSyncUI reinstalled , onSyncServerFailed reinstalled = failSyncUI reinstalled , subscriptions.forEach subscription = off subscription The boolean describes the contract's reinstall/sync context, not success. offAll eventName removes every handler for an event and is reserved for full App reset or controlled tests. HarmonyOS returns unsupported subscriptions for ten unavailable events: four migrations plus the documented message extension/KV, badge, and stream events. It never fabricates success. Handlers should return quickly and queue expensive work." + "content": "unix openim sdk publishes connection, synchronization, user, friend, conversation, group, message, and commercial signaling events through flat on... functions imported from @/uni modules/unix openim sdk . You do not create SDK instances or native listener objects for separate domains. Register and remove events Every on... call synchronously returns an independent OpenIMSDKEventSubscription containing an id and eventName . Save that handle and pass it to off subscription when the page, state layer, or account scope that owns it ends. import off, onConnectSuccess, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const connectionSubscription : OpenIMSDKEventSubscription = onConnectSuccess = setConnectionState 'connected' // Run when the scope that owns this listener ends. off connectionSubscription Do not use the obsolete pattern in which a listener registration returns a cancellation closure, and do not invoke connectionSubscription as a function. One event can have several subscribers; off removes only the handler represented by the supplied handle. offAll eventName removes every handler for one event name. Reserve it for complete App teardown, controlled test resets, or infrastructure that explicitly owns every listener for that event. Pages and feature modules must not use it as local cleanup because it also removes other consumers' listeners. Handlers should return quickly. Queue expensive queries, file work, and network requests, then revalidate the current login user or commercial session epoch before writing asynchronous results. Complete business handlers appear only on the canonical pages linked below; this overview does not duplicate each domain listener. Choose when to register | Event scope | Recommended lifecycle | Corresponding page | | | | | | Connection and token | Register before login and clean up when changing accounts | Authenticate and manage a session /sdk/uniapp/getting started/authenticate and manage session | | Users, friends, and blacklist | Register when initializing the contacts state layer | User overview /sdk/uniapp/user/overview user | | Conversation list | Register when initializing the conversation list state layer | Get the conversation list /sdk/uniapp/conversation/retrieving conversations/retrieve conversation list | | Conversation unread count | Register when initializing the application badge state layer | Maintain the total unread count /sdk/uniapp/conversation/managing conversations/get total unread count | | Group list | Register when initializing the group state layer | Group overview /sdk/uniapp/group/overview group | | Group members | Register when initializing the group member state layer | List group members /sdk/uniapp/group/retrieving group members/get group member list | | Group applications | Register when initializing the group application state layer | Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient | | Messages | Register when initializing the message state layer | Receive messages /sdk/uniapp/message/receiving messages/receive messages | | Commercial signaling | Register when initializing calling functionality | Call events /sdk/uniapp/calling/managing calls/handle call events | | SDK session | Register when a commercial plugin depending on the one Core is initialized | Update the token and observe the SDK session /sdk/uniapp/getting started/update token and observe sdk session | Do not register the same logic again on every component render, onShow , or list refresh. Duplicate registrations can insert messages more than once, repeatedly increment unread counts, or write asynchronous state from an old account into the current UI. Query APIs establish snapshots; events merge later changes. Use stable business identifiers: clientMsgID for messages, conversationID for conversations, userID for friends and blacklist, and groupID:userID for group members. Never deduplicate by array position or display name. Listen for initial synchronization After login, SDK Core synchronizes OpenIMServer data. Use these events for global synchronization status and progress: | Event | Handler argument | Meaning | | | | | | onSyncServerStart | reinstalled: boolean | Synchronization begins. The boolean identifies whether the local database is synchronizing after reinstall or equivalent rebuild. | | onSyncServerProgress | progress: number | Synchronization progress changed. Use it for display; the contract does not promise every integer value. | | onSyncServerFinish | reinstalled: boolean | The current synchronization completed. Interfaces requiring complete data can requery their snapshots. | | onSyncServerFailed | reinstalled: boolean | The current synchronization failed. Record the synchronization context and wait for retry or connection recovery. | import off, onSyncServerFailed, onSyncServerFinish, onSyncServerProgress, onSyncServerStart, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const syncSubscriptions : Array = onSyncServerStart reinstalled = setSyncState 'syncing', 0, reinstalled , onSyncServerProgress progress = setSyncProgress progress , onSyncServerFinish reinstalled = setSyncState 'ready', 100, reinstalled refreshVisibleSnapshots , onSyncServerFailed reinstalled = setSyncState 'failed', 0, reinstalled , function releaseSyncSubscriptions syncSubscriptions.forEach subscription = off subscription syncSubscriptions.length = 0 The three boolean callback values represent the reinstall/synchronization context defined by the contract; they are not generic operation success flags. The event name distinguishes completion from failure. Synchronization events describe Core's lifecycle rather than the Promise callback of one query, and they have no business entity merge key. Isolate this state by logged in user. This page is the canonical owner for the four synchronization events and for off / offAll control semantics. Call releaseSyncSubscriptions on logout, account change, or SDK scope destruction. Data can still change after synchronization finishes: requery snapshots needed by the current UI and continue merging domain events into the same state layer. Events unsupported on HarmonyOS The locked commercial HarmonyOS HAR lacks the following ten events. Registration returns platform unsupported and never fabricates a callback: onMigrationStart onMigrationProgress onMigrationFailed onMigrationFinished onRecvMessageExtensionsAdded onRecvMessageExtensionsChanged onRecvMessageExtensionsDeleted onMessageKvInfoChanged onStreamChange onGroupApplicationBadgeCountChanged Platform support and commercial ownership are separate dimensions. Handle platform unsupported by disabling the feature or selecting a platform alternative. Do not retry forever or simulate an event that did not occur." }, { "path": "/sdk/uniapp/events/handle-data-migration-events", @@ -5517,7 +5517,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Logging.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp logger", - "content": "Configure logLevel , isLogStandardOutput , and optional logFilePath during initialization. Use the lowest production level that supports diagnosis and redact tokens, private content, and commercial credentials. import uploadLogs from '@/uni modules/unix openim sdk' const operationID = diagnostic $ Date.now await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , operationID operationID is an optional diagnostic correlation value, not a user ID, idempotency key, or credential. Upload progress belongs to onUploadLogsProgress ; completion does not itself open a support case. Obtain user consent, limit line count/retries, keep ex redacted, disable verbose production output, and never upload the entire local database as a shortcut." + "content": "unix openim sdk logs diagnose initialization, login, and business API calls on Android, iOS, and HarmonyOS. Development and staging builds can emit detailed SDK logs. Production should retain only necessary errors and tracing fields and must avoid tokens, message bodies, file URLs, server credentials, and other private data. A diagnostic flow combines logging options in OpenIMInitConfig , an optional operationID for one call, the plugin error, upload progress events, and the application's structured logs. Log levels Configure logging through OpenIMInitConfig.logLevel when calling initSDK . From most to least verbose, the exported levels are: | Constant | Value | Description | | | | | | OpenIMLogLevelVerbose | 6 | Most detailed runtime tracing; use only for short, deep diagnostics. | | OpenIMLogLevelDebug | 5 | Development and integration details. | | OpenIMLogLevelInfo | 4 | Normal runtime information. | | OpenIMLogLevelWarn | 3 | Warnings. | | OpenIMLogLevelError | 2 | Errors. | | OpenIMLogLevelFatal | 1 | Fatal errors. | | OpenIMLogLevelPanic | 0 | Most severe level. | Do not leave Verbose or Debug enabled in production. Prefer an environment setting, staged feature flag, or explicit user initiated diagnostic flow that raises verbosity only temporarily. Recommended log levels | Scenario | Recommended configuration | Description | | | | | | Local development | OpenIMLogLevelDebug , isLogStandardOutput: true | Inspect SDK calls in Logcat or the Xcode console. | | Integration or staging | Temporarily use more detail when needed | Correlate user IDs, conversation IDs, error codes, and OpenIMServer logs. | | Production default | OpenIMLogLevelWarn or OpenIMLogLevelError , with unnecessary standard output disabled | Reduce noise and sensitive data exposure while retaining actionable errors. | | User diagnostic mode | Temporarily raise verbosity and explain the collection scope | Obtain consent and follow privacy, retention, and deletion requirements. | Configure logging Logging options belong to SDK initialization, not login . This Android example uses the corresponding platform identity and required systemType : import OpenIMLogLevelDebug, OpenIMPlatformAndroid, initSDK, type OpenIMInitConfig, from '@/uni modules/unix openim sdk' const config : OpenIMInitConfig = platformID: OpenIMPlatformAndroid, apiAddr: 'https://im api.example.com', wsAddr: 'wss://im ws.example.com', logLevel: OpenIMLogLevelDebug, isLogStandardOutput: true, systemType: 'android', await initSDK config Parameters | Parameter | Type | Required | Description | | | | | | | logLevel | OpenIMLogLevel | Yes | Controls the verbosity of SDK Core runtime logs. | | isLogStandardOutput | boolean | Yes | Writes SDK logs to the platform standard output. Enable it for development and temporary diagnostics. | | logFilePath | string or null | No | Custom log path. Normally use the plugin's platform default unless the application deliberately manages a sandbox path. | apiAddr , wsAddr , platform ID, and systemType are still required initialization settings, but they are not logging fields. Error codes and messages in plugin failures are also not logging configuration parameters. Trace one call with operationID operationID is an optional correlation identifier for one SDK call. Most asynchronous APIs accept it as the last parameter. Ordinary calls can omit it and let the plugin generate or delegate the value. Create and pass one explicitly only when a specific call must be correlated precisely with native and OpenIMServer logs. import getConversationListSplit from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID try const result = await getConversationListSplit offset: 0, count: 50 , operationID, appLogger.info 'openim api success', operationID, action: 'get conversation page', count: result?.conversations.length ?? 0, catch error appLogger.error 'openim api failed', operationID, action: 'get conversation page', error: sanitizeOpenIMError error , throw error Use a new operationID for every call. It is not a user identity, permission credential, conversation ID, or business idempotency key and cannot replace a token, conversationID , or clientMsgID . If one business flow contains several SDK calls, give every call its own operationID and use an application trace ID to correlate the whole flow. Record business context Application logs can contain the route, business action, operationID, redacted error code, and necessary target identifiers such as conversationID or clientMsgID . Do not log: User or administrator tokens, secrets, or commercial business credentials. Complete message bodies, raw custom message payloads, or private file URLs. Unnecessary user profiles, contact lists, or group member lists. SDK database contents or complete local sandbox paths. Apply support and privacy policy to target identifiers as well, and redact them again before publishing an issue or sharing logs across teams. Upload logs uploadLogs receives a line count and an extension description. Obtain user consent first and explain what is collected, why it is needed, and how long it is retained. import uploadLogs from '@/uni modules/unix openim sdk' const operationID = createDiagnosticOperationID await uploadLogs line: 2000, ex: JSON.stringify scene: 'login timeout' , , operationID, Parameters | Parameter | Type | Required | Description | | | | | | | line | number | Yes | Number of log lines to upload. Apply a limit instead of an unbounded upload. | | ex | string | Yes | Redacted diagnostic context, such as a scenario name. Never include tokens, message content, or credentials. | Promise success means that the log upload request completed. It does not create a support case or mean that the problem has been analyzed. Limit retries on failure to avoid sustained background data and battery usage. Observe upload progress onUploadLogsProgress returns an independent subscription handle. The canonical business owner for this event is Message overview /sdk/uniapp/message/overview message ; this page only defines how diagnostic UI uses the progress. The diagnostic service that owns the listener must release it with off subscription . Upload progress is display state, not proof that support analysis has completed. Never place raw log content or a token in progress state. Related pages Install, initialize, and inspect the SDK /sdk/uniapp/getting started/install initialize and inspect sdk Authenticate and manage a session /sdk/uniapp/getting started/authenticate and manage session Send your first message /sdk/uniapp/getting started/send first message Send a message /sdk/uniapp/message/sending messages/send message" }, { "path": "/sdk/wasm/overview", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index 3d29cd0e9d..2a63eda517 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -845,7 +845,7 @@ "title": "发送第一条消息" }, "/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk": { - "body": "项目安装 `uni_modules/unix-openim-sdk` 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。\n\n## 初始化\n\n```uts\nimport {\n OpenIMLogLevelInfo,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelInfo,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nconst initialized = await initSDK(config)\nif (!initialized) {\n throw new Error('OpenIM SDK initialization was not accepted')\n}\n```\n\niOS 改用 `OpenIMPlatformIOS` 和 `systemType: 'ios'`;HarmonyOS 改用 `OpenIMPlatformHarmony` 和 `systemType: 'harmony'`。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 `logFilePath`。\n\n### `OpenIMInitConfig`\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `platformID` | `OpenIMPlatform` | 使用插件导出的平台常量。 |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string \\| null`(可选) | Core 数据目录;通常让插件使用平台默认值。 |\n| `logFilePath` | `string \\| null`(可选) | 日志目录或文件路径,按平台产物约定配置。 |\n| `logLevel` | `OpenIMLogLevel` | 使用 `OpenIMLogLevelError`、`OpenIMLogLevelInfo` 等常量。 |\n| `isLogStandardOutput` | `boolean` | 是否把 SDK 日志输出到系统控制台。 |\n| `systemType` | `string` | 必填的系统说明,初始化示例不得省略。 |\n\n同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。\n\n## 查询版本与数据路径\n\n`getSdkVersion()` 和 `getOpenIMDataPath()` 是同步本地操作:\n\n```uts\nimport {\n getOpenIMDataPath,\n getSdkVersion,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst version = getSdkVersion()\nconst dataPath = getOpenIMDataPath()\n```\n\n数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。\n\n## 反初始化\n\n```uts\nimport { unInitSDK } from '@/uni_modules/unix-openim-sdk'\n\nunInitSDK()\n```\n\n`unInitSDK()` 返回 `void`。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。\n\n初始化完成后,进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。", + "body": "项目安装 `uni_modules/unix-openim-sdk` 后,在应用级 service 中初始化一次。插件导出扁平函数,不需要也不允许创建第二个 SDK 实例。\n\n## 初始化\n\n```uts\nimport {\n OpenIMLogLevelInfo,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelInfo,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nconst initialized = await initSDK(config)\nif (!initialized) {\n throw new Error('OpenIM SDK initialization was not accepted')\n}\n```\n\niOS 改用 `OpenIMPlatformIOS` 和 `systemType: 'ios'`;HarmonyOS 改用 `OpenIMPlatformHarmony` 和 `systemType: 'harmony'`。生产环境建议关闭标准输出或降低日志级别,并按合规要求配置 `logFilePath`。\n\n### `OpenIMInitConfig`\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `platformID` | `OpenIMPlatform` | 使用插件导出的平台常量。 |\n| `apiAddr` | `string` | OpenIMServer HTTP API 地址。 |\n| `wsAddr` | `string` | OpenIMServer WebSocket 地址。 |\n| `dataDir` | `string` 或 `null`(可选) | Core 数据目录;通常让插件使用平台默认值。 |\n| `logFilePath` | `string` 或 `null`(可选) | 日志目录或文件路径,按平台产物约定配置。 |\n| `logLevel` | `OpenIMLogLevel` | 使用 `OpenIMLogLevelError`、`OpenIMLogLevelInfo` 等常量。 |\n| `isLogStandardOutput` | `boolean` | 是否把 SDK 日志输出到系统控制台。 |\n| `systemType` | `string` | 必填的系统说明,初始化示例不得省略。 |\n\n同一进程不要用不同服务地址并发初始化。切换环境应先退出账号、清理业务状态并反初始化,再用新配置启动。\n\n## 查询版本与数据路径\n\n`getSdkVersion()` 和 `getOpenIMDataPath()` 是同步本地操作:\n\n```uts\nimport {\n getOpenIMDataPath,\n getSdkVersion,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst version = getSdkVersion()\nconst dataPath = getOpenIMDataPath()\n```\n\n数据路径仅用于诊断、备份策略和空间排查。不要直接打开、迁移或修改其中的数据库文件,也不要把完整沙盒路径作为公开日志字段。\n\n## 反初始化\n\n```uts\nimport { unInitSDK } from '@/uni_modules/unix-openim-sdk'\n\nunInitSDK()\n```\n\n`unInitSDK()` 返回 `void`。调用前先停止新的业务请求、退出当前账号并释放全部订阅。普通页面卸载、AV Runtime 关闭或暂时进入后台都不应反初始化 IM SDK。\n\n初始化完成后,进入[认证与管理登录会话](/sdk/uniapp/getting-started/authenticate-and-manage-session)。", "description": "安装 UTS 插件,初始化唯一 OpenIM Core,并查询 SDK 版本和数据目录。", "headings": [ { @@ -896,7 +896,7 @@ "title": "处理 App 生命周期、角标与推送 Token" }, "/sdk/uniapp/getting-started/update-token-and-observe-sdk-session": { - "body": "本页能力属于商业版。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。\n\n`onSDKSessionChanged` 是 `unix-openim-sdk` 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。\n\n## 读取 session 快照\n\n```uts\nimport {\n getSDKSessionSnapshot,\n type OpenIMSDKSessionSnapshot,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot()\n```\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `loginStatus` | `OpenIMLoginStatus` | 当前登录状态。 |\n| `userID` | `string \\| null` | 当前 SDK 用户;未登录时为 `null`。 |\n| `sdkSessionEpoch` | `number` | session 世代。生命周期或账号成功变化后递增。 |\n| `sdkVersion` | `string` | 当前插件所连接 Core 的版本。 |\n\n快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 `userID` 与 `sdkSessionEpoch`,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。\n\n## 订阅 session 变化\n\n```uts\nimport {\n off,\n onSDKSessionChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sessionSubscription = onSDKSessionChanged((snapshot) => {\n cancelRequestsFromOlderEpoch(snapshot.sdkSessionEpoch)\n replaceActiveSdkUser(snapshot.userID)\n})\n\n// 应用或依赖插件销毁时执行。\noff(sessionSubscription)\n```\n\n初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。\n\n## 热更新 Token\n\n```uts\nimport { updateToken } from '@/uni_modules/unix-openim-sdk'\n\nawait updateToken({ token: freshToken })\n```\n\nToken 由可信后端签发。`updateToken()` 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 `platform-unsupported`,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。\n\n## 与其他插件协作\n\nAV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 `logout()` 或 `unInitSDK()`。用户切换时先销毁依赖插件,再退出并登录新账号。", + "body": "本页能力属于商业版。它用于宿主与 AV Runtime 等插件共享唯一 OpenIM Core 时,读取当前登录快照、更新 Token,并在账号或 SDK 生命周期变化时取消旧请求。\n\n`onSDKSessionChanged` 是 `unix-openim-sdk` 的插件层合成事件,不是 OpenIM Core 原生 listener。Android、iOS 与 HarmonyOS 都由统一 session tracker 生成该事件。\n\n## 读取 session 快照\n\n```uts\nimport {\n getSDKSessionSnapshot,\n type OpenIMSDKSessionSnapshot,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst snapshot : OpenIMSDKSessionSnapshot = await getSDKSessionSnapshot()\n```\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `loginStatus` | `OpenIMLoginStatus` | 当前登录状态。 |\n| `userID` | `string` 或 `null` | 当前 SDK 用户;未登录时为 `null`。 |\n| `sdkSessionEpoch` | `number` | session 世代。生命周期或账号成功变化后递增。 |\n| `sdkVersion` | `string` | 当前插件所连接 Core 的版本。 |\n\n快照不包含 IM Token、API 地址或 WebSocket 地址。异步流程开始时保存 `userID` 与 `sdkSessionEpoch`,完成前再次读取并比较;不一致时丢弃旧结果,不要写入新账号状态。\n\n## 订阅 session 变化\n\n```uts\nimport {\n off,\n onSDKSessionChanged,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst sessionSubscription = onSDKSessionChanged((snapshot) => {\n cancelRequestsFromOlderEpoch(snapshot.sdkSessionEpoch)\n replaceActiveSdkUser(snapshot.userID)\n})\n\n// 应用或依赖插件销毁时执行。\noff(sessionSubscription)\n```\n\n初始化、登录、退出、反初始化、被踢下线、Token 无效或过期,以及当前用户变化,都可能推动 epoch。处理器必须幂等,不能在事件中记录 Token 或反复触发并行登录。\n\n## 热更新 Token\n\n```uts\nimport { updateToken } from '@/uni_modules/unix-openim-sdk'\n\nawait updateToken({ token: freshToken })\n```\n\nToken 由可信后端签发。`updateToken()` 只在 Android 和 iOS 可用;HarmonyOS 当前稳定返回 `platform-unsupported`,应按产品策略重新登录或等待后续平台实现。更新成功后继续以 session 事件和连接状态判断当前会话,不要把 Promise 成功等同于所有网络请求都已恢复。\n\n## 与其他插件协作\n\nAV Runtime 等依赖插件应在初始化前后各读取一次快照,确认用户与 epoch 未变化;dispose 时只取消自己的订阅和请求,不调用 IM SDK 的 `logout()` 或 `unInitSDK()`。用户切换时先销毁依赖插件,再退出并登录新账号。", "description": "商业版更新登录 Token,并通过合成 session 快照防止账号与异步请求串线。", "headings": [ { @@ -947,7 +947,7 @@ "title": "用户概览" }, "/sdk/uniapp/user/profile/get-users-info": { - "body": "`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。\n\n## 查询公开资料\n\n传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。\n\n```uts\nimport {\n getUsersInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDList : Array = uniqueUserIDs(['user_a', 'user_b'])\nconst result = await getUsersInfo(userIDList)\nconst users : Array = result?.users ?? []\n\nusers.forEach((user) => {\n cachePublicUser(user.userID, user)\n})\n```\n\nPromise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n页面常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `createTime` | `number \\| null`(可选) | 用户记录创建时间。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n| `attachedInfo` 商业版字段 | `string \\| null`(可选) | 仅按已确认的商业业务协议解析。 |\n| `globalRecvMsgOpt` 商业版字段 | `number \\| null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 |\n\n`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。\n\n## 调用结果与资料刷新\n\n以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。\n\nSDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n\n## 搜索添加好友\n\n搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。\n\n```uts\nasync function searchUsersForFriendRequest(keyword : string) : Promise> {\n const userIDs = await searchUserIDsFromBusinessBackend(keyword)\n if (userIDs.length == 0) {\n return []\n }\n\n const result = await getUsersInfo(uniqueUserIDs(userIDs))\n return result?.users ?? []\n}\n```\n\n如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。\n\n## 按场景选择展示数据\n\n| 场景 | 优先使用 |\n| --- | --- |\n| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` |\n| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` |\n| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` |\n\n好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。\n\n## 下一步\n\n- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)\n- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)\n- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)", + "body": "`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。\n\n## 查询公开资料\n\n传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。\n\n```uts\nimport {\n getUsersInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDList : Array = uniqueUserIDs(['user_a', 'user_b'])\nconst result = await getUsersInfo(userIDList)\nconst users : Array = result?.users ?? []\n\nusers.forEach((user) => {\n cachePublicUser(user.userID, user)\n})\n```\n\nPromise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n页面常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 |\n| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 |\n\n`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。\n\n## 调用结果与资料刷新\n\n以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。\n\nSDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n\n## 搜索添加好友\n\n搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。\n\n```uts\nasync function searchUsersForFriendRequest(keyword : string) : Promise> {\n const userIDs = await searchUserIDsFromBusinessBackend(keyword)\n if (userIDs.length == 0) {\n return []\n }\n\n const result = await getUsersInfo(uniqueUserIDs(userIDs))\n return result?.users ?? []\n}\n```\n\n如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。\n\n## 按场景选择展示数据\n\n| 场景 | 优先使用 |\n| --- | --- |\n| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` |\n| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` |\n| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` |\n\n好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。\n\n## 下一步\n\n- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)\n- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)\n- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)", "description": "按 userID 批量查询应用用户的公开资料。", "headings": [ { @@ -980,7 +980,7 @@ "title": "获取用户资料" }, "/sdk/uniapp/user/profile/get-self-user-info": { - "body": "完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料:\n\n```uts\nimport {\n getSelfUserInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst currentUser : OpenIMUserInfo | null = await getSelfUserInfo()\nif (currentUser != null) {\n renderProfile(currentUser.nickname, currentUser.faceURL)\n}\n```\n\n## 返回结果\n\nPromise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number \\| null`(可选) | 用户记录创建时间。 |\n| `globalRecvMsgOpt` 商业版字段 | `number \\| null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 |\n| `attachedInfo` 商业版字段 | `string \\| null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。\n\n该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。", + "body": "完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料:\n\n```uts\nimport {\n getSelfUserInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst currentUser : OpenIMUserInfo | null = await getSelfUserInfo()\nif (currentUser != null) {\n renderProfile(currentUser.nickname, currentUser.faceURL)\n}\n```\n\n## 返回结果\n\nPromise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 |\n| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。\n\n该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。", "description": "查询当前已登录用户的 OpenIM 资料快照。", "headings": [ { @@ -993,7 +993,7 @@ "title": "获取当前用户资料" }, "/sdk/uniapp/user/profile/set-self-info": { - "body": "`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string \\| null` | 否 | 新昵称。 |\n| `faceURL` | `string \\| null` | 否 | 新头像地址。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt \\| null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 |\n\n至少传入一个实际要更新的字段。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n ex: mergedExtra,\n})\n```\n\n`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。\n\n`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。\n\nPromise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。\n\n## 监听当前用户资料变化\n\n本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照:\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nfunction releaseSelfInfoSubscription() {\n off(selfInfoSubscription)\n}\n```\n\n不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。", + "body": "`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string` 或 `null` | 否 | 新昵称。 |\n| `faceURL` | `string` 或 `null` | 否 | 新头像地址。 |\n| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 |\n\n至少传入一个实际要更新的字段。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n ex: mergedExtra,\n})\n```\n\n`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。\n\n`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。\n\nPromise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。\n\n## 监听当前用户资料变化\n\n本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照:\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nfunction releaseSelfInfoSubscription() {\n off(selfInfoSubscription)\n}\n```\n\n不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。", "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", "headings": [ { @@ -1107,7 +1107,7 @@ "title": "检查好友关系" }, "/sdk/uniapp/user/friends/update-friends": { - "body": "`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 |\n| `remark` | `string \\| null` | 否 | 新备注。 |\n| `isPinned` | `boolean \\| null` | 否 | 是否置顶好友。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n\n```uts\nimport { updateFriends } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriends({\n friendUserIDs: ['user_a', 'user_b'],\n remark: '项目成员',\n isPinned: true,\n})\n```\n\n`friendUserIDs` 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。`ex` 是完整字符串,不会自动合并 JSON 字段。\n\nPromise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 `onFriendInfoChanged` 按 `userID` 合并,完整监听见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page);必要时重新查询校准。\n\n商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`:\n\n```uts\nimport { updateFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' })\n```\n\n`updateFriend()` 使用单个 `userID`,并把置顶字段命名为 `pinned`;其 `remark` 和 `ex` 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。", + "body": "`updateFriends()` 可批量更新好友关系上的备注、置顶或扩展字段。只传要修改的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `friendUserIDs` | `string[]` | 是 | 要更新的好友用户 ID 列表;同一组更新值会应用到全部目标。 |\n| `remark` | `string` 或 `null` | 否 | 新备注。 |\n| `isPinned` | `boolean` 或 `null` | 否 | 是否置顶好友。 |\n| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n\n```uts\nimport { updateFriends } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriends({\n friendUserIDs: ['user_a', 'user_b'],\n remark: '项目成员',\n isPinned: true,\n})\n```\n\n`friendUserIDs` 不能为空;除目标列表外,至少提供一个实际更新字段。不同好友需要不同值时应分别调用。`ex` 是完整字符串,不会自动合并 JSON 字段。\n\nPromise 成功表示更新请求完成,不等同于好友事件已经到达。最终资料通过 `onFriendInfoChanged` 按 `userID` 合并,完整监听见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page);必要时重新查询校准。\n\n商业版还提供 `updateFriend()` 商业版,参数为单个 `userID`,字段名使用 `pinned`:\n\n```uts\nimport { updateFriend } from '@/uni_modules/unix-openim-sdk'\n\nawait updateFriend({ userID: 'user_a', pinned: true, remark: '负责人' })\n```\n\n`updateFriend()` 使用单个 `userID`,并把置顶字段命名为 `pinned`;其 `remark` 和 `ex` 仍是完整覆盖值。不要同时对同一好友并发调用两个入口;选择一种并让好友 store 串行合并结果。", "description": "批量更新好友备注、置顶和扩展字段,并说明商业版单用户入口。", "headings": [ { @@ -1134,7 +1134,7 @@ "title": "发起好友申请" }, "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient": { - "body": "`getFriendApplicationListAsRecipient()` 查询其他用户发给当前账号的好友申请。uni-app / uni-app x 的 `OpenIMApplicationListParams` 只提供分页字段,不包含 Wasm 版本的 `handleResults` 筛选;需要只展示待处理申请时,在返回后根据 `handleResult` 过滤。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsRecipient({\n offset: 0,\n count: 20,\n})\n\nconst applications = result?.applications ?? []\nreplaceReceivedApplications(applications)\n```\n\nPromise 成功后直接返回 `OpenIMFriendApplicationListResult | null`,其中 `applications` 是当前页 `OpenIMFriendApplicationItem[]`。查询本身不会触发申请事件。\n\n### 好友申请字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `fromUserID` | `string` | 申请发起人的用户 ID。 |\n| `fromNickname` | `string` | 申请发起人的昵称快照。 |\n| `fromFaceURL` | `string` | 申请发起人的头像快照。 |\n| `toUserID` | `string` | 申请接收人的用户 ID。 |\n| `toNickname` | `string` | 申请接收人的昵称快照。 |\n| `toFaceURL` | `string` | 申请接收人的头像快照。 |\n| `reqMsg` | `string` | 申请附言。 |\n| `handleResult` | `number` | 当前处理结果:`0` 待处理、`1` 已同意、`-1` 已拒绝。 |\n| `handlerUserID` | `string` | 执行处理的用户 ID;未处理时可能为空。 |\n| `handleMsg` | `string` | 处理时填写的说明。 |\n| `handleTime` | `number` | 处理时间;未处理时不应当作有效时间展示。 |\n| `createTime` | `number` | 申请记录创建时间。 |\n| `ex` | `string` | 申请记录扩展字符串。 |\n| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 |\n\n申请记录使用 `fromUserID:toUserID` 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 `userID` 调用 `getUsersInfo()`。\n\n## 同步好友申请变化\n\n本页是 `onFriendApplicationAdded`、`onFriendApplicationAccepted`、`onFriendApplicationRejected` 和 `onFriendApplicationDeleted` 的完整监听归属页。推荐先注册事件,再查询快照:\n\n```uts\nimport {\n off,\n onFriendApplicationAccepted,\n onFriendApplicationAdded,\n onFriendApplicationDeleted,\n onFriendApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst applicationSubscriptions : Array = [\n onFriendApplicationAdded((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationAccepted((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationRejected((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationDeleted((item) => {\n removeFriendApplication(item.fromUserID, item.toUserID)\n }),\n]\n\nfunction releaseFriendApplicationSubscriptions() {\n applicationSubscriptions.forEach((subscription) => off(subscription))\n applicationSubscriptions.length = 0\n}\n```\n\n按当前用户是否为 `toUserID`,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)归属的 `onFriendAdded` 合并。\n\n收到申请后应调用接受或拒绝 API,不要只修改本地 `handleResult` 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 `releaseFriendApplicationSubscriptions()`。", + "body": "`getFriendApplicationListAsRecipient()` 查询其他用户发给当前账号的好友申请。uni-app / uni-app x 的 `OpenIMApplicationListParams` 只提供分页字段,不包含 Wasm 版本的 `handleResults` 筛选;需要只展示待处理申请时,在返回后根据 `handleResult` 过滤。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` 或 `null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsRecipient } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsRecipient({\n offset: 0,\n count: 20,\n})\n\nconst applications = result?.applications ?? []\nreplaceReceivedApplications(applications)\n```\n\nPromise 成功后直接返回 `OpenIMFriendApplicationListResult | null`,其中 `applications` 是当前页 `OpenIMFriendApplicationItem[]`。查询本身不会触发申请事件。\n\n### 好友申请字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `fromUserID` | `string` | 申请发起人的用户 ID。 |\n| `fromNickname` | `string` | 申请发起人的昵称快照。 |\n| `fromFaceURL` | `string` | 申请发起人的头像快照。 |\n| `toUserID` | `string` | 申请接收人的用户 ID。 |\n| `toNickname` | `string` | 申请接收人的昵称快照。 |\n| `toFaceURL` | `string` | 申请接收人的头像快照。 |\n| `reqMsg` | `string` | 申请附言。 |\n| `handleResult` | `number` | 当前处理结果:`0` 待处理、`1` 已同意、`-1` 已拒绝。 |\n| `handlerUserID` | `string` | 执行处理的用户 ID;未处理时可能为空。 |\n| `handleMsg` | `string` | 处理时填写的说明。 |\n| `handleTime` | `number` | 处理时间;未处理时不应当作有效时间展示。 |\n| `createTime` | `number` | 申请记录创建时间。 |\n| `ex` | `string` | 申请记录扩展字符串。 |\n| `attachedInfo` | `string` | SDK 附加信息,只按已确认的业务约定解析。 |\n\n申请记录使用 `fromUserID:toUserID` 作为合并标识。昵称和头像是申请创建或同步时的快照;需要最新账号资料时,再按相应 `userID` 调用 `getUsersInfo()`。\n\n## 同步好友申请变化\n\n本页是 `onFriendApplicationAdded`、`onFriendApplicationAccepted`、`onFriendApplicationRejected` 和 `onFriendApplicationDeleted` 的完整监听归属页。推荐先注册事件,再查询快照:\n\n```uts\nimport {\n off,\n onFriendApplicationAccepted,\n onFriendApplicationAdded,\n onFriendApplicationDeleted,\n onFriendApplicationRejected,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst applicationSubscriptions : Array = [\n onFriendApplicationAdded((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationAccepted((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationRejected((item) => {\n mergeFriendApplication(item.fromUserID, item.toUserID, item)\n }),\n onFriendApplicationDeleted((item) => {\n removeFriendApplication(item.fromUserID, item.toUserID)\n }),\n]\n\nfunction releaseFriendApplicationSubscriptions() {\n applicationSubscriptions.forEach((subscription) => off(subscription))\n applicationSubscriptions.length = 0\n}\n```\n\n按当前用户是否为 `toUserID`,把事件分流到收到或发出的列表。分页期间收到变化时可以重置分页;申请被同意后,新好友关系由[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)归属的 `onFriendAdded` 合并。\n\n收到申请后应调用接受或拒绝 API,不要只修改本地 `handleResult` 冒充服务端成功。退出登录、切换账号或销毁好友申请状态层时,调用 `releaseFriendApplicationSubscriptions()`。", "description": "分页查询当前用户收到的好友申请,并同步申请状态变化。", "headings": [ { @@ -1157,7 +1157,7 @@ "title": "获取收到的好友申请" }, "/sdk/uniapp/user/friend-applications/get-friend-application-list-as-applicant": { - "body": "`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number \\| null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number \\| null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentApplications(result?.applications ?? [])\n```\n\nPromise 成功后,`applications` 是当前页已发出的 `OpenIMFriendApplicationItem[]`,字段含义见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。该查询本身不会触发申请事件。\n\n分页结果可能在查询期间发生变化。事件按 `fromUserID:toUserID` 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。", + "body": "`getFriendApplicationListAsApplicant()` 查询当前账号发出的申请,返回 `OpenIMFriendApplicationListResult | null`。\n\n## 参数说明\n\n参数对象可以省略;显式分页时使用:\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` 或 `null` | 否 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` 或 `null` | 否 | 本次请求的申请数量。 |\n\n```uts\nimport { getFriendApplicationListAsApplicant } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getFriendApplicationListAsApplicant({ offset: 0, count: 50 })\nrenderSentApplications(result?.applications ?? [])\n```\n\nPromise 成功后,`applications` 是当前页已发出的 `OpenIMFriendApplicationItem[]`,字段含义见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。该查询本身不会触发申请事件。\n\n分页结果可能在查询期间发生变化。事件按 `fromUserID:toUserID` 合并,而不是按数组下标更新;分页期间收到变化时可以重置分页并重新查询。完整监听统一放在收到的申请页面。App 恢复、重新登录或事件可能遗漏时,重新建立本列表快照。", "description": "分页读取当前账号发出的好友申请。", "headings": [ { @@ -1489,7 +1489,7 @@ "title": "清空会话消息" }, "/sdk/uniapp/conversation/managing-conversation-groups/overview-conversation-groups": { - "body": "会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。\n\n## 分组类型\n\n创建分组时使用 `OpenIMConversationGroupType`,查询分组时使用 `OpenIMConversationGroupQueryType`。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。\n\n同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。\n\n## 分组数据\n\n`OpenIMConversationGroupItem` 的字段均可选:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroupID` | `string \\| null` | 分组稳定标识;非空后才能作为缓存主键。 |\n| `name` | `string \\| null` | 分组名称。 |\n| `order` | `number \\| null` | 分组排序值。 |\n| `ex` | `string \\| null` | 业务扩展字符串,只按已约定格式解析。 |\n| `conversationGroupType` | `number \\| null` | 分组类型。 |\n| `hidden` | `boolean \\| null` | 当前分组是否隐藏。 |\n| `unreadCount` | `number \\| null` | 分组维度的未读数快照。 |\n| `conversationIDs` | `string[] \\| null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 |\n\n读取非空 `conversationGroupID` 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。\n\n## 可用操作\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建分组并可选加入初始会话 | [创建会话分组](/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group) |\n| 查询分组列表 | [查询会话分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups) |\n| 查询分组资料、成员与总数 | [查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) |\n| 查询一个会话所属的全部分组 | [查询会话所属分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id) |\n| 加入或移出分组 | [把会话加入分组](/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups)、[把会话移出分组](/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups) |\n| 更新名称、扩展和隐藏状态 | [更新会话分组](/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group) |\n| 调整分组顺序 | [设置会话分组顺序](/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order) |\n| 删除分组 | [删除会话分组](/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group) |\n\n页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。\n\n## 监听分组变化\n\n五个分组事件返回 opaque JSON 字符串,不是类型化对象:\n\n```uts\nimport {\n off,\n onConversationGroupAdded,\n onConversationGroupChanged,\n onConversationGroupDeleted,\n onConversationGroupMemberAdded,\n onConversationGroupMemberDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction refreshFromRawGroupEvent(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationGroups()\n } catch (_) {\n console.error('Invalid conversation group event payload')\n }\n}\n\nconst addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent)\nconst subscriptions : Array = [\n addedSubscription,\n onConversationGroupChanged(refreshFromRawGroupEvent),\n onConversationGroupDeleted(refreshFromRawGroupEvent),\n onConversationGroupMemberAdded(refreshFromRawGroupEvent),\n onConversationGroupMemberDeleted(refreshFromRawGroupEvent),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`onConversationGroupAdded`、`onConversationGroupChanged` 和 `onConversationGroupDeleted` 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。\n\n校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 `ex` 或其他字段可能包含业务数据。", + "body": "会话分组属于商业版,用于把会话组织为自定义组,并维护名称、顺序、隐藏状态、未读数和成员会话 ID。\n\n## 分组类型\n\n创建分组时使用 `OpenIMConversationGroupType`,查询分组时使用 `OpenIMConversationGroupQueryType`。二者属于不同操作的合同类型,不应把 UI tab 下标直接当作 SDK 类型值。\n\n同一个会话可以属于多个自定义分组。分组只组织会话入口,不复制或移动会话消息;删除分组或移除成员也不会删除会话本身。\n\n## 分组数据\n\n`OpenIMConversationGroupItem` 的字段均可选:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroupID` | `string` 或 `null` | 分组稳定标识;非空后才能作为缓存主键。 |\n| `name` | `string` 或 `null` | 分组名称。 |\n| `order` | `number` 或 `null` | 分组排序值。 |\n| `ex` | `string` 或 `null` | 业务扩展字符串,只按已约定格式解析。 |\n| `conversationGroupType` | `number` 或 `null` | 分组类型。 |\n| `hidden` | `boolean` 或 `null` | 当前分组是否隐藏。 |\n| `unreadCount` | `number` 或 `null` | 分组维度的未读数快照。 |\n| `conversationIDs` | `string[]` 或 `null` | 当前返回携带的成员会话 ID;可能不是完整分页结果。 |\n\n读取非空 `conversationGroupID` 后再建立索引;名称、顺序和隐藏状态可以变化,不能用作主键。需要完整成员、会话资料和总数时,调用[查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations)。\n\n## 可用操作\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建分组并可选加入初始会话 | [创建会话分组](/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group) |\n| 查询分组列表 | [查询会话分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-groups) |\n| 查询分组资料、成员与总数 | [查询分组及会话](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations) |\n| 查询一个会话所属的全部分组 | [查询会话所属分组](/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-by-conversation-id) |\n| 加入或移出分组 | [把会话加入分组](/sdk/uniapp/conversation/managing-conversation-groups/add-conversations-to-groups)、[把会话移出分组](/sdk/uniapp/conversation/managing-conversation-groups/remove-conversations-from-groups) |\n| 更新名称、扩展和隐藏状态 | [更新会话分组](/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group) |\n| 调整分组顺序 | [设置会话分组顺序](/sdk/uniapp/conversation/managing-conversation-groups/set-conversation-group-order) |\n| 删除分组 | [删除会话分组](/sdk/uniapp/conversation/managing-conversation-groups/delete-conversation-group) |\n\n页面首次进入时查询快照,状态变更操作的 Promise 成功后继续等待事件或重新查询。raw 事件没有冻结字段时,不要用本地猜测替代查询结果。\n\n## 监听分组变化\n\n五个分组事件返回 opaque JSON 字符串,不是类型化对象:\n\n```uts\nimport {\n off,\n onConversationGroupAdded,\n onConversationGroupChanged,\n onConversationGroupDeleted,\n onConversationGroupMemberAdded,\n onConversationGroupMemberDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nfunction refreshFromRawGroupEvent(payload : string) {\n try {\n const value = JSON.parseObject(payload)\n if (value != null) refreshConversationGroups()\n } catch (_) {\n console.error('Invalid conversation group event payload')\n }\n}\n\nconst addedSubscription = onConversationGroupAdded(refreshFromRawGroupEvent)\nconst subscriptions : Array = [\n addedSubscription,\n onConversationGroupChanged(refreshFromRawGroupEvent),\n onConversationGroupDeleted(refreshFromRawGroupEvent),\n onConversationGroupMemberAdded(refreshFromRawGroupEvent),\n onConversationGroupMemberDeleted(refreshFromRawGroupEvent),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n`onConversationGroupAdded`、`onConversationGroupChanged` 和 `onConversationGroupDeleted` 对应分组本身变化;成员新增与删除事件对应会话成员关系。raw payload 没有公开冻结为 DTO,因此这里只验证它是有效 JSON,然后重新查询相关快照。\n\n校验 JSON 后仍不要依赖未冻结字段。事件处理器应快速返回,并以当前登录用户隔离刷新任务;切换账号或 dispose 时先停止旧状态写入,再逐个释放句柄。日志不要输出完整 payload,因为 `ex` 或其他字段可能包含业务数据。", "description": "商业版会话分组模型、raw 事件解析和生命周期。", "headings": [ { @@ -1517,7 +1517,7 @@ "title": "会话分组概览" }, "/sdk/uniapp/conversation/managing-conversation-groups/create-conversation-group": { - "body": "`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `name` | `string` | 是 | 分组名称。提交前按产品规则校验空值和长度。 |\n| `order` | `number` | 是 | 分组排序值;排序方向应在业务中保持一致。 |\n| `conversationGroupType` | `OpenIMConversationGroupType` | 是 | 分组类型,使用插件合同允许的值。 |\n| `conversationID` | `string \\| null` | 否 | 创建时加入分组的初始会话 ID。 |\n| `ex` | `string \\| null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 |\n\n```uts\nimport { createConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await createConversationGroup({\n name: '重要会话',\n order: 100,\n conversationGroupType: 0,\n conversationID: conversationID,\n ex: '',\n})\n\nconst group = result?.conversationGroup\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMCreateConversationGroupResult | null`。非空结果的 `conversationGroup` 是新分组快照,也可能为 `null`;先校验非空 `conversationGroupID` 再加入本地索引。\n\nPromise 成功和 `onConversationGroupAdded` 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 `conversationID`,成员关系也应以查询结果校准。", + "body": "`createConversationGroup()` 商业版 创建分组,并可把一个会话作为初始成员。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `name` | `string` | 是 | 分组名称。提交前按产品规则校验空值和长度。 |\n| `order` | `number` | 是 | 分组排序值;排序方向应在业务中保持一致。 |\n| `conversationGroupType` | `OpenIMConversationGroupType` | 是 | 分组类型,使用插件合同允许的值。 |\n| `conversationID` | `string` 或 `null` | 否 | 创建时加入分组的初始会话 ID。 |\n| `ex` | `string` 或 `null` | 否 | 分组扩展字符串,完整覆盖,不会自动合并 JSON。 |\n\n```uts\nimport { createConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await createConversationGroup({\n name: '重要会话',\n order: 100,\n conversationGroupType: 0,\n conversationID: conversationID,\n ex: '',\n})\n\nconst group = result?.conversationGroup\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMCreateConversationGroupResult | null`。非空结果的 `conversationGroup` 是新分组快照,也可能为 `null`;先校验非空 `conversationGroupID` 再加入本地索引。\n\nPromise 成功和 `onConversationGroupAdded` 到达是两个阶段。最终列表以 raw 事件触发后的重新查询为准;若指定了初始 `conversationID`,成员关系也应以查询结果校准。", "description": "商业版创建自定义会话分组。", "headings": [ { @@ -1553,7 +1553,7 @@ "title": "查询会话分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/get-conversation-group-info-with-conversations": { - "body": "`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 |\n| `pagination.pageNumber` | `number` | 是 | 页码;本合同示例从 `1` 开始。 |\n| `pagination.showNumber` | `number` | 是 | 每页会话数量。 |\n\n```uts\nimport { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupInfoWithConversations({\n conversationGroupID: groupID,\n pagination: { pageNumber: 1, showNumber: 100 },\n})\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGetConversationGroupInfoWithConversationsResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroup` | `OpenIMConversationGroupItem \\| null` | 当前分组资料;为 `null` 时不要继续分页。 |\n| `ConversationTotal` | `number \\| null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 |\n| `conversations` | `OpenIMConversationItem[]` | 当前页会话。 |\n\n分页期间成员可能变化。按 `conversationID` 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 `ConversationTotal`。", + "body": "`getConversationGroupInfoWithConversations()` 商业版 返回分组资料、会话总数和一页会话。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要查询的会话分组 ID。 |\n| `pagination.pageNumber` | `number` | 是 | 页码;本合同示例从 `1` 开始。 |\n| `pagination.showNumber` | `number` | 是 | 每页会话数量。 |\n\n```uts\nimport { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getConversationGroupInfoWithConversations({\n conversationGroupID: groupID,\n pagination: { pageNumber: 1, showNumber: 100 },\n})\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGetConversationGroupInfoWithConversationsResult | null`:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `conversationGroup` | `OpenIMConversationGroupItem` 或 `null` | 当前分组资料;为 `null` 时不要继续分页。 |\n| `ConversationTotal` | `number` 或 `null`(可选) | 分组内会话总数;字段名首字母大写,必须按合同读取。 |\n| `conversations` | `OpenIMConversationItem[]` | 当前页会话。 |\n\n分页期间成员可能变化。按 `conversationID` 去重,第一页或成员事件到达时重新建立分页快照;不要用当前数组长度替代 `ConversationTotal`。", "description": "商业版分页读取一个会话分组及其成员会话。", "headings": [ { @@ -1578,7 +1578,7 @@ "title": "查询会话所属分组" }, "/sdk/uniapp/conversation/managing-conversation-groups/update-conversation-group": { - "body": "`updateConversationGroup()` 商业版 只更新提供的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要更新的分组 ID。 |\n| `name` | `string \\| null` | 否 | 新分组名称。 |\n| `ex` | `string \\| null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `hidden` | `boolean \\| null` | 否 | 是否在业务界面隐藏该分组。 |\n\n```uts\nimport { updateConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await updateConversationGroup({\n conversationGroupID: groupID,\n name: '重点跟进',\n hidden: false,\n})\n```\n\n除 `conversationGroupID` 外,至少提供一个实际更新字段。`ex` 是整段替换,多个模块共用时先读取并合并已有业务字段。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMUpdateConversationGroupResult | null`,其中 `conversationGroup` 是更新后的分组快照或 `null`。只有非空且带有效 ID 时才立即合并;最终状态通过 `onConversationGroupChanged` 或重新查询校准。", + "body": "`updateConversationGroup()` 商业版 只更新提供的字段。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `conversationGroupID` | `string` | 是 | 要更新的分组 ID。 |\n| `name` | `string` 或 `null` | 否 | 新分组名称。 |\n| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `hidden` | `boolean` 或 `null` | 否 | 是否在业务界面隐藏该分组。 |\n\n```uts\nimport { updateConversationGroup } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await updateConversationGroup({\n conversationGroupID: groupID,\n name: '重点跟进',\n hidden: false,\n})\n```\n\n除 `conversationGroupID` 外,至少提供一个实际更新字段。`ex` 是整段替换,多个模块共用时先读取并合并已有业务字段。\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMUpdateConversationGroupResult | null`,其中 `conversationGroup` 是更新后的分组快照或 `null`。只有非空且带有效 ID 时才立即合并;最终状态通过 `onConversationGroupChanged` 或重新查询校准。", "description": "商业版更新分组名称、扩展字段或隐藏状态。", "headings": [ { @@ -2913,7 +2913,7 @@ "title": "处理数据迁移事件" }, "/sdk/uniapp/logger": { - "body": "`unix-openim-sdk` 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。\n\n日志链路通常包含 `OpenIMInitConfig` 中的日志配置、单次调用可选的 `operationID`、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。\n\n## 日志级别\n\n日志级别在 `initSDK()` 时通过 `OpenIMInitConfig.logLevel` 配置。从最详细到最简略依次为:\n\n| 常量 | 数值 | 说明 |\n| --- | --- | --- |\n| `OpenIMLogLevelVerbose` | `6` | 最详细的运行跟踪,只用于短期深度诊断。 |\n| `OpenIMLogLevelDebug` | `5` | 开发与联调信息。 |\n| `OpenIMLogLevelInfo` | `4` | 常规运行信息。 |\n| `OpenIMLogLevelWarn` | `3` | 警告信息。 |\n| `OpenIMLogLevelError` | `2` | 错误信息。 |\n| `OpenIMLogLevelFatal` | `1` | 严重错误。 |\n| `OpenIMLogLevelPanic` | `0` | 最严重级别。 |\n\n生产环境不建议长期使用 `Verbose` 或 `Debug`。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。\n\n### 日志级别建议\n\n| 场景 | 建议配置 | 说明 |\n| --- | --- | --- |\n| 本地开发 | `OpenIMLogLevelDebug`,`isLogStandardOutput: true` | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 |\n| 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 |\n| 生产默认 | `OpenIMLogLevelWarn` 或 `OpenIMLogLevelError`,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 |\n| 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 |\n\n## 配置日志\n\n日志选项属于 SDK 初始化配置,不是 `login()` 参数。下面以 Android 为例:\n\n```uts\nimport {\n OpenIMLogLevelDebug,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelDebug,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nawait initSDK(config)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `logLevel` | `OpenIMLogLevel` | 是 | 控制 Core 运行日志的详细程度。 |\n| `isLogStandardOutput` | `boolean` | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 |\n| `logFilePath` | `string \\| null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 |\n\n`apiAddr`、`wsAddr`、平台和 `systemType` 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。\n\n## 使用 operationID 定位一次调用\n\n`operationID` 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。\n\n```uts\nimport { getConversationListSplit } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\ntry {\n const result = await getConversationListSplit(\n { offset: 0, count: 50 },\n operationID,\n )\n\n appLogger.info('openim_api_success', {\n operationID,\n action: 'get_conversation_page',\n count: result?.conversations.length ?? 0,\n })\n} catch (error) {\n appLogger.error('openim_api_failed', {\n operationID,\n action: 'get_conversation_page',\n error: sanitizeOpenIMError(error),\n })\n throw error\n}\n```\n\n每次调用使用新的 `operationID`,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、`conversationID` 或 `clientMsgID`。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。\n\n## 记录业务上下文\n\n应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 `conversationID` 或 `clientMsgID`。不要记录:\n\n- 用户 Token、管理员 Token、secret 或商业业务凭据。\n- 完整消息正文、原始自定义消息 payload、私人文件 URL。\n- 不必要的用户资料、通讯录、群成员清单。\n- SDK 数据库内容和完整本机沙盒路径。\n\n日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。\n\n## 上传日志\n\n`uploadLogs()` 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。\n\n```uts\nimport { uploadLogs } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\nawait uploadLogs(\n {\n line: 2000,\n ex: JSON.stringify({ scene: 'login-timeout' }),\n },\n operationID,\n)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 |\n| `ex` | `string` | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 |\n\nPromise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。\n\n## 观察上传进度\n\n`onUploadLogsProgress()` 返回独立订阅句柄。进度事件的完整业务归属在[消息概览](/sdk/uniapp/message/overview-message);日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 `off(subscription)` 释放。\n\n上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。\n\n## 相关页面\n\n- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)\n- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message)\n- [发送消息](/sdk/uniapp/message/sending-messages/send-message)", + "body": "`unix-openim-sdk` 的日志用于定位 Android、iOS、HarmonyOS 上的初始化、登录和业务 API 调用问题。开发与预发布环境可以输出更详细的 SDK 日志;生产环境应只保留必要的错误与追踪字段,避免记录 Token、消息正文、文件 URL、服务端凭据或其他用户隐私。\n\n日志链路通常包含 `OpenIMInitConfig` 中的日志配置、单次调用可选的 `operationID`、插件抛出的诊断信息、上传进度事件,以及应用自己的结构化日志。\n\n## 日志级别\n\n日志级别在 `initSDK()` 时通过 `OpenIMInitConfig.logLevel` 配置。从最详细到最简略依次为:\n\n| 常量 | 数值 | 说明 |\n| --- | --- | --- |\n| `OpenIMLogLevelVerbose` | `6` | 最详细的运行跟踪,只用于短期深度诊断。 |\n| `OpenIMLogLevelDebug` | `5` | 开发与联调信息。 |\n| `OpenIMLogLevelInfo` | `4` | 常规运行信息。 |\n| `OpenIMLogLevelWarn` | `3` | 警告信息。 |\n| `OpenIMLogLevelError` | `2` | 错误信息。 |\n| `OpenIMLogLevelFatal` | `1` | 严重错误。 |\n| `OpenIMLogLevelPanic` | `0` | 最严重级别。 |\n\n生产环境不建议长期使用 `Verbose` 或 `Debug`。更稳妥的方式是按环境、灰度开关或用户主动提交诊断信息时临时提高日志级别。\n\n### 日志级别建议\n\n| 场景 | 建议配置 | 说明 |\n| --- | --- | --- |\n| 本地开发 | `OpenIMLogLevelDebug`,`isLogStandardOutput: true` | 在 Logcat 或 Xcode 控制台查看 SDK 调用细节。 |\n| 联调或预发布 | 根据问题临时使用更详细级别 | 配合用户 ID、会话 ID、错误码和 OpenIMServer 日志定位。 |\n| 生产默认 | `OpenIMLogLevelWarn` 或 `OpenIMLogLevelError`,关闭不必要的标准输出 | 降低噪声和敏感信息泄露风险。 |\n| 用户诊断模式 | 临时提高级别,并说明收集范围 | 取得用户同意,遵守隐私、保留与删除策略。 |\n\n## 配置日志\n\n日志选项属于 SDK 初始化配置,不是 `login()` 参数。下面以 Android 为例:\n\n```uts\nimport {\n OpenIMLogLevelDebug,\n OpenIMPlatformAndroid,\n initSDK,\n type OpenIMInitConfig,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst config : OpenIMInitConfig = {\n platformID: OpenIMPlatformAndroid,\n apiAddr: 'https://im-api.example.com',\n wsAddr: 'wss://im-ws.example.com',\n logLevel: OpenIMLogLevelDebug,\n isLogStandardOutput: true,\n systemType: 'android',\n}\n\nawait initSDK(config)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `logLevel` | `OpenIMLogLevel` | 是 | 控制 Core 运行日志的详细程度。 |\n| `isLogStandardOutput` | `boolean` | 是 | 是否把 SDK 日志写到平台标准输出;开发与短期诊断时使用。 |\n| `logFilePath` | `string` 或 `null` | 否 | 自定义日志路径;通常让插件使用平台默认目录,只有明确管理沙盒路径时才覆盖。 |\n\n`apiAddr`、`wsAddr`、平台和 `systemType` 仍是初始化必需配置,但不是日志字段。插件错误中的错误码与错误信息也不是初始化日志参数。\n\n## 使用 operationID 定位一次调用\n\n`operationID` 是单次 SDK 调用的可选链路标识。多数异步 API 把它作为最后一个参数;日常调用可以省略,由插件生成或交给 Core 处理。只有需要把一次具体调用与原生日志、OpenIMServer 日志精确对应时,才显式创建并传入。\n\n```uts\nimport { getConversationListSplit } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\ntry {\n const result = await getConversationListSplit(\n { offset: 0, count: 50 },\n operationID,\n )\n\n appLogger.info('openim_api_success', {\n operationID,\n action: 'get_conversation_page',\n count: result?.conversations.length ?? 0,\n })\n} catch (error) {\n appLogger.error('openim_api_failed', {\n operationID,\n action: 'get_conversation_page',\n error: sanitizeOpenIMError(error),\n })\n throw error\n}\n```\n\n每次调用使用新的 `operationID`,不要让多个无关请求共享同一个值。它不是用户身份、权限凭据、会话 ID 或业务幂等键,不能替代 Token、`conversationID` 或 `clientMsgID`。一个业务流程包含多次 SDK 调用时,为每次调用生成独立 operationID,另用业务侧 trace ID 串联整个流程。\n\n## 记录业务上下文\n\n应用日志可以保留页面路由、业务动作、operationID、脱敏错误码和必要的目标标识,例如 `conversationID` 或 `clientMsgID`。不要记录:\n\n- 用户 Token、管理员 Token、secret 或商业业务凭据。\n- 完整消息正文、原始自定义消息 payload、私人文件 URL。\n- 不必要的用户资料、通讯录、群成员清单。\n- SDK 数据库内容和完整本机沙盒路径。\n\n日志中的目标标识也应按支持与隐私策略处理。公开 issue 或跨团队传递前再次脱敏。\n\n## 上传日志\n\n`uploadLogs()` 接收上传行数和扩展说明。上传前必须取得用户同意,并说明收集范围、用途和保留策略。\n\n```uts\nimport { uploadLogs } from '@/uni_modules/unix-openim-sdk'\n\nconst operationID = createDiagnosticOperationID()\n\nawait uploadLogs(\n {\n line: 2000,\n ex: JSON.stringify({ scene: 'login-timeout' }),\n },\n operationID,\n)\n```\n\n### 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `line` | `number` | 是 | 本次上传的日志行数。应设置上限,避免无界上传。 |\n| `ex` | `string` | 是 | 脱敏后的诊断扩展信息,例如场景名称;不要放 Token、消息或凭据。 |\n\nPromise 成功表示日志上传请求已经完成,不代表问题已经提交给支持团队或已经得到处理。失败时限制重试次数,避免后台持续消耗流量与电量。\n\n## 观察上传进度\n\n`onUploadLogsProgress()` 返回独立订阅句柄。进度事件的完整业务归属在[消息概览](/sdk/uniapp/message/overview-message);日志页面只说明诊断上传时的使用边界。拥有该监听的诊断 service 结束时,必须通过 `off(subscription)` 释放。\n\n上传进度用于界面展示,不代表服务端已经完成问题分析。不要把原始日志内容或 Token 塞入进度状态。\n\n## 相关页面\n\n- [安装、初始化与 SDK 信息](/sdk/uniapp/getting-started/install-initialize-and-inspect-sdk)\n- [用户认证](/sdk/uniapp/getting-started/authenticate-and-manage-session)\n- [发送第一条消息](/sdk/uniapp/getting-started/send-first-message)\n- [发送消息](/sdk/uniapp/message/sending-messages/send-message)", "description": "配置 UTS 插件日志级别,使用 operationID 关联调用链路,并在用户同意后上传脱敏日志。", "headings": [ { From 144dda67d49923195cf974f736b275e23ed56b7f Mon Sep 17 00:00:00 2001 From: bloomingg <1293499952@qq.com> Date: Thu, 13 Aug 2026 18:57:34 +0800 Subject: [PATCH 20/20] fix(docs): render commercial badges in tables --- .../docs/chat/sdk/uniapp/group/overview-group.mdx | 2 +- .../get-joined-group-list-page.mdx | 2 +- .../sdk/uniapp/group/update-group-profile.mdx | 2 +- .../uniapp/user/profile/get-self-user-info.mdx | 4 ++-- .../sdk/uniapp/user/profile/get-users-info.mdx | 4 ++-- .../user/profile/set-global-message-reception.mdx | 2 +- .../sdk/uniapp/user/profile/set-self-info.mdx | 2 +- .../docs/chat/sdk/uniapp/group/overview-group.mdx | 2 +- .../get-joined-group-list-page.mdx | 2 +- .../docs/chat/sdk/uniapp/user/overview-user.mdx | 2 +- .../uniapp/user/profile/get-self-user-info.mdx | 4 ++-- .../sdk/uniapp/user/profile/get-users-info.mdx | 4 ++-- .../user/profile/set-global-message-reception.mdx | 2 +- .../sdk/uniapp/user/profile/set-self-info.mdx | 2 +- scripts/__tests__/uniapp-commercial.test.mjs | 15 +++++++++++++++ src/components/docs/markdown-content.tsx | 13 ++++++++++--- src/generated/search-index-zh.json | 14 +++++++------- src/generated/search-index.json | 14 +++++++------- src/generated/uniapp-sdk-zh-content.json | 14 +++++++------- src/lib/client-sdk-commercial.ts | 7 +++++++ 20 files changed, 71 insertions(+), 42 deletions(-) diff --git a/content/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/docs/chat/sdk/uniapp/group/overview-group.mdx index d0a1394a7d..2acd1f6859 100644 --- a/content/docs/chat/sdk/uniapp/group/overview-group.mdx +++ b/content/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -22,7 +22,7 @@ The group domain uses `groupID` as its stable primary key and includes group pro | `OpenIMGroupMemberItem` | Member profile, role, join source, and mute-end time. | | `OpenIMGroupApplicationItem` | Join application, applicant, and processing state. | -Common `OpenIMGroupItem` fields include `groupID`, `groupName`, `notification`, `introduction`, `faceURL`, `ownerUserID`, `memberCount`, `status`, `groupType`, `needVerification`, `lookMemberInfo`, `applyMemberFriend`, and `ex`. `attachedInfo` is a Commercial field; parse it only according to a confirmed contract. +Common `OpenIMGroupItem` fields include `groupID`, `groupName`, `notification`, `introduction`, `faceURL`, `ownerUserID`, `memberCount`, `status`, `groupType`, `needVerification`, `lookMemberInfo`, `applyMemberFriend`, and `ex`. `attachedInfo` is an Enterprise field; parse it only according to a confirmed contract. Use `groupID:userID` as the stable merge key for a member. A member's in-group `nickname` and `faceURL` are member snapshots and must not overwrite account-level profile data. diff --git a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx index 26e5b041df..8157d1ce31 100644 --- a/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx +++ b/content/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -44,7 +44,7 @@ The Promise resolves directly to `OpenIMGroupListResult` or `null`; `groups` con | `lookMemberInfo`, `applyMemberFriend` | Member-profile and friend-application policy. | | `notificationUpdateTime`, `notificationUserID` | Latest announcement update metadata. | | `ex` | Application extension string. | -| `attachedInfo` Commercial field | Commercial attachment data; parse only a confirmed contract. | +| `attachedInfo` Enterprise | Commercial attachment data; parse only a confirmed contract. | Member count and permission fields are snapshots and do not replace member pagination or server authorization. See [Group overview](/sdk/uniapp/group/overview-group) for events and the model. diff --git a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx index 81eccc34db..ecb21f4c5f 100644 --- a/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx +++ b/content/docs/chat/sdk/uniapp/group/update-group-profile.mdx @@ -39,4 +39,4 @@ Do not mix announcement, join-verification, or member-permission fields into the Promise success means that OpenIMServer completed the request. Merge `onGroupInfoChanged` by `groupID` or call `getSpecifiedGroupsInfo()` for immediate reconciliation. Do not overwrite fields that were not submitted. -`displayIsRead` is a Commercial field. Do not send it when the public server or installed edition does not expose the capability. +`displayIsRead` is an Enterprise field. Do not send it when the public server or installed edition does not expose the capability. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 2ef999a208..22f07b16d4 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -35,8 +35,8 @@ The Promise resolves directly to `OpenIMUserInfo` or `null`, without a `{ data } | `nickname` | `string` | Account-level nickname. | | `faceURL` | `string` | Account-level avatar URL. | | `createTime` | `number` or `null` (optional) | Time when the user record was created. | -| `globalRecvMsgOpt` Commercial field | `number` or `null` (optional) | Account-level message reception option. See [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception). | -| `attachedInfo` Commercial field | `string` or `null` (optional) | SDK attachment data. Parse it only according to a confirmed application contract. | +| `globalRecvMsgOpt` Enterprise | `number` or `null` (optional) | Account-level message reception option. See [Set global message reception](/sdk/uniapp/user/profile/set-global-message-reception). | +| `attachedInfo` Enterprise | `string` or `null` (optional) | SDK attachment data. Parse it only according to a confirmed application contract. | | `ex` | `string` | Account-level extension string defined by the application. | Verify that the returned `userID` matches the current application account. Do not fabricate an empty user object when the result is `null`; use login state and redacted diagnostics to determine why a snapshot is unavailable. diff --git a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index 622a35ccf0..a1a42fe776 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -45,8 +45,8 @@ Common fields are: | `faceURL` | `string` | Account-level public avatar URL. | | `createTime` | `number` or `null` (optional) | Time when the user record was created. | | `ex` | `string` | Account-level extension string whose format is defined by the application. | -| `attachedInfo` Commercial field | `string` or `null` (optional) | Parse only according to a confirmed commercial business contract. | -| `globalRecvMsgOpt` Commercial field | `number` or `null` (optional) | Account-level message reception option. A stranger profile card normally does not need to display it. | +| `attachedInfo` Enterprise | `string` or `null` (optional) | Parse only according to a confirmed commercial business contract. | +| `globalRecvMsgOpt` Enterprise | `number` or `null` (optional) | Account-level message reception option. A stranger profile card normally does not need to display it. | Neither `ex` nor `attachedInfo` is a trusted identity, authorization, or authentication credential. This query is also read-only for other accounts. Update only the signed-in user's profile with `setSelfInfo()`. diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx index 4d188c19f9..2597ae8d4a 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -11,7 +11,7 @@ platform: 'uniapp' sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' --- -`globalRecvMsgOpt` is a Commercial field that defines the account's default message-reception and notification policy. It is not an ordinary nickname, avatar, or display-profile field. +`globalRecvMsgOpt` is an Enterprise field that defines the account's default message-reception and notification policy. It is not an ordinary nickname, avatar, or display-profile field. ```uts import { diff --git a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index 2853ea96d3..aa93c7d7dd 100644 --- a/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -20,7 +20,7 @@ sourcePath: '/sdk/uniapp/user/profile/set-self-info' | `nickname` | `string` or `null` | No | New nickname. | | `faceURL` | `string` or `null` | No | New avatar URL. | | `ex` | `string` or `null` | No | New extension string. It completely replaces the previous value. | -| `globalRecvMsgOpt` Commercial field | `OpenIMSetSelfInfoRecvMsgOpt` or `null` | No | Account-level message reception option; update it through the corresponding settings flow. | +| `globalRecvMsgOpt` Enterprise | `OpenIMSetSelfInfoRecvMsgOpt` or `null` | No | Account-level message reception option; update it through the corresponding settings flow. | Pass at least one field that actually needs to change. diff --git a/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx index fd9ea1f6bb..3f73470d7f 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/overview-group.mdx @@ -15,7 +15,7 @@ sourcePath: '/sdk/uniapp/group/overview-group' | `OpenIMGroupMemberItem` | 群成员资料、角色、入群来源和禁言结束时间。 | | `OpenIMGroupApplicationItem` | 入群申请及其申请人与处理状态。 | -`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。 +`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。 成员对象使用 `groupID:userID` 作为稳定合并标识。群内 `nickname` 和 `faceURL` 属于成员快照,不应被写回为用户账号级资料。 diff --git a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx index bbc8bf92b6..4a4281c641 100644 --- a/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx +++ b/content/zh/docs/chat/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page.mdx @@ -45,7 +45,7 @@ Promise 成功直接返回 `OpenIMGroupListResult | null`,从 `groups` 读取 | `notificationUpdateTime` | `number` | 群公告更新时间。 | | `notificationUserID` | `string` | 最近更新群公告的用户 ID。 | | `ex` | `string` | 群扩展字符串。 | -| `attachedInfo` 商业版字段 | `string` | 商业附加信息,只按已确认协议解析。 | +| `attachedInfo` 商业版 | `string` | 商业附加信息,只按已确认协议解析。 | `memberCount` 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见[群组概览](/sdk/uniapp/group/overview-group)。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx index 14b59f79ea..561d50b4f1 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/overview-user.mdx @@ -23,7 +23,7 @@ SDK 会根据使用场景返回不同的用户对象: 同一个 `userID` 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 `OpenIMFriendUserItem`;陌生人资料卡使用 `OpenIMPublicUserItem`;群成员列表使用 `OpenIMGroupMemberItem`。会话列表和聊天页标题属于会话数据,应使用 `OpenIMConversationItem.showName`。 -`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。 +`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。 ## 功能入口 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx index 958672acc3..e9541fbb48 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-self-user-info.mdx @@ -28,8 +28,8 @@ Promise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装 | `nickname` | `string` | 账号级昵称。 | | `faceURL` | `string` | 账号级头像地址。 | | `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 | -| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 | -| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 | +| `globalRecvMsgOpt` 商业版 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 | +| `attachedInfo` 商业版 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 | | `ex` | `string` | 由业务约定的账号级扩展字符串。 | 以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx index 00a88f8257..6d23f8f41d 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/get-users-info.mdx @@ -38,8 +38,8 @@ Promise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是 | `faceURL` | `string` | 账号级公开头像地址。 | | `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 | | `ex` | `string` | 账号级扩展字段,格式由业务约定。 | -| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 | -| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | +| `attachedInfo` 商业版 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 | +| `globalRecvMsgOpt` 商业版 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | `ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。 diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx index 3652a9da36..dbe889bde9 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-global-message-reception.mdx @@ -4,7 +4,7 @@ description: '设置当前账号在全部会话中的默认消息接收与通知 sourcePath: '/sdk/uniapp/user/profile/set-global-message-reception' --- -`globalRecvMsgOpt` 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 +`globalRecvMsgOpt` 商业版字段是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 当前插件通过 `setSelfInfo()` 更新该字段: diff --git a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx index 1a30c3c325..a15b9fde82 100644 --- a/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx +++ b/content/zh/docs/chat/sdk/uniapp/user/profile/set-self-info.mdx @@ -13,7 +13,7 @@ sourcePath: '/sdk/uniapp/user/profile/set-self-info' | `nickname` | `string` 或 `null` | 否 | 新昵称。 | | `faceURL` | `string` 或 `null` | 否 | 新头像地址。 | | `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 | -| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | +| `globalRecvMsgOpt` 商业版 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 diff --git a/scripts/__tests__/uniapp-commercial.test.mjs b/scripts/__tests__/uniapp-commercial.test.mjs index a4ea60d3f3..3d1df9dd83 100644 --- a/scripts/__tests__/uniapp-commercial.test.mjs +++ b/scripts/__tests__/uniapp-commercial.test.mjs @@ -2,10 +2,25 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import { + enterpriseBadgeMarkupPatternSource, getPageCommercialInfo, getPageCommercialNames, + isEnterpriseBadgeMarkup, } from '../../src/lib/client-sdk-commercial.ts'; +test('recognizes every commercial badge label used by client SDK content', () => { + for (const label of ['商业版', '商业版字段', 'Enterprise', 'Commercial', 'Commercial field']) { + const markup = `${label}`; + assert.equal(isEnterpriseBadgeMarkup(markup), true, label); + assert.match(markup, new RegExp(`^${enterpriseBadgeMarkupPatternSource}$`)); + } + + assert.equal( + isEnterpriseBadgeMarkup('Unknown'), + false, + ); +}); + test('derives uni-app commercial pages from the Private documentation ownership manifest', () => { assert.equal( getPageCommercialInfo('/sdk/uniapp/calling/managing-calls/start-single-call').kind, diff --git a/src/components/docs/markdown-content.tsx b/src/components/docs/markdown-content.tsx index 8dbf4a4560..2885eb7b13 100644 --- a/src/components/docs/markdown-content.tsx +++ b/src/components/docs/markdown-content.tsx @@ -4,7 +4,10 @@ import { CodeBlock, CodeTabs, type CodeTab } from '@/src/components/docs/code-bl import { createHeadingIdGenerator } from '@/src/lib/heading-ids'; import type { Locale } from '@/src/lib/i18n'; import { t, toLocalizedPath } from '@/src/lib/i18n'; -import { matchCommercialSymbol } from '@/src/lib/client-sdk-commercial'; +import { + enterpriseBadgeMarkupPatternSource, + matchCommercialSymbol, +} from '@/src/lib/client-sdk-commercial'; type MarkdownBlock = | { type: 'blockquote'; lines: string[] } @@ -300,8 +303,12 @@ function parseCodeTabTitle(meta: string | undefined, language: string) { function renderInlineMarkdown(value: string, options: InlineRenderOptions): ReactNode[] { const nodes: ReactNode[] = []; - const pattern = - /!\[([^\]]*)]\(([^)]+)\)|\[([^\]]+)]\(([^)]+)\)|`([^`]+)`|\*\*([^*]+)\*\*|((?:商业版|Enterprise)<\/span>)/g; + const pattern = new RegExp( + '!\\[([^\\]]*)]\\(([^)]+)\\)|\\[([^\\]]+)]\\(([^)]+)\\)|`([^`]+)`|\\*\\*([^*]+)\\*\\*|(' + + enterpriseBadgeMarkupPatternSource + + ')', + 'g', + ); let cursor = 0; const badgeLabel = t(options.locale).article.commercialBadge; diff --git a/src/generated/search-index-zh.json b/src/generated/search-index-zh.json index f8335f9efb..778d752264 100644 --- a/src/generated/search-index-zh.json +++ b/src/generated/search-index-zh.json @@ -4253,7 +4253,7 @@ "description": "了解 uni-app / uni-app x SDK 中的用户资料、好友关系、黑名单和在线状态。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user overview-user", - "content": "unix openim sdk 使用 userID 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。 群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 userID 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。 用户类型 SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要接口 | | | | | | OpenIMUserInfo | 当前登录用户资料、设置页、当前账号头像和昵称 | getSelfUserInfo 、 setSelfInfo | | OpenIMPublicUserItem | 应用用户查询、好友候选人、陌生人资料卡;它是 OpenIMUserInfo 的公开别名 | getUsersInfo | | OpenIMFriendUserItem | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | OpenIMBlackUserItem | 当前用户黑名单中的用户 | getBlackList 、 addBlack 、 removeBlack | | OpenIMFriendApplicationItem | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API | | OpenIMUserStatusItem | 用户汇总在线状态和在线平台 | subscribeUsersStatus 、 getUserStatus | 同一个 userID 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 OpenIMFriendUserItem ;陌生人资料卡使用 OpenIMPublicUserItem ;群成员列表使用 OpenIMGroupMemberItem 。会话列表和聊天页标题属于会话数据,应使用 OpenIMConversationItem.showName 。 OpenIMUserInfo 的公共字段包括 userID 、 nickname 、 faceURL 、 ex 和可选 createTime 。 attachedInfo 与 globalRecvMsgOpt 是 商业版字段 ,读取前应判空,不要假定公共服务端一定返回。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于查找好友候选人或展示资料卡 | 获取用户资料 /sdk/uniapp/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page | | 发送或处理好友申请 | 发送好友申请 /sdk/uniapp/user/friend applications/add friend 、 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient | | 修改好友资料 | 更新好友资料 /sdk/uniapp/user/friends/update friends | | 删除好友关系 | 删除好友 /sdk/uniapp/user/friends/delete friend | | 查看和维护当前用户黑名单 | 获取黑名单 /sdk/uniapp/user/blacklist/get black list | | 读取或更新当前用户昵称、头像和扩展资料 | 更新当前用户资料 /sdk/uniapp/user/profile/set self info | | 设置账号级消息接收策略 | 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception | | 查看加好友权限的当前合同边界 | 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission | | 订阅和读取在线状态 | 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status | | 读取群成员、搜索成员或查询指定成员资料 | 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list | 业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。 状态更新 页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量: 当前用户资料变化:见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 好友申请变化:见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。 好友关系和资料变化:见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 。 黑名单变化:见 获取黑名单 /sdk/uniapp/user/blacklist/get black list 。 在线状态变化:见 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 。 这些列表都按 userID 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。" + "content": "unix openim sdk 使用 userID 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。 群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 userID 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。 用户类型 SDK 会根据使用场景返回不同的用户对象: | 类型 | 适用场景 | 主要接口 | | | | | | OpenIMUserInfo | 当前登录用户资料、设置页、当前账号头像和昵称 | getSelfUserInfo 、 setSelfInfo | | OpenIMPublicUserItem | 应用用户查询、好友候选人、陌生人资料卡;它是 OpenIMUserInfo 的公开别名 | getUsersInfo | | OpenIMFriendUserItem | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | getFriendListPage 、 getSpecifiedFriendsInfo | | OpenIMBlackUserItem | 当前用户黑名单中的用户 | getBlackList 、 addBlack 、 removeBlack | | OpenIMFriendApplicationItem | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API | | OpenIMUserStatusItem | 用户汇总在线状态和在线平台 | subscribeUsersStatus 、 getUserStatus | 同一个 userID 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 OpenIMFriendUserItem ;陌生人资料卡使用 OpenIMPublicUserItem ;群成员列表使用 OpenIMGroupMemberItem 。会话列表和聊天页标题属于会话数据,应使用 OpenIMConversationItem.showName 。 OpenIMUserInfo 的公共字段包括 userID 、 nickname 、 faceURL 、 ex 和可选 createTime 。 attachedInfo 与 globalRecvMsgOpt 是 商业版 字段,读取前应判空,不要假定公共服务端一定返回。 功能入口 | 需求 | 推荐页面 | | | | | 按 userID 查询公开资料,用于查找好友候选人或展示资料卡 | 获取用户资料 /sdk/uniapp/user/profile/get users info | | 分页、搜索或按 ID 查询好友关系 | 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page | | 发送或处理好友申请 | 发送好友申请 /sdk/uniapp/user/friend applications/add friend 、 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient | | 修改好友资料 | 更新好友资料 /sdk/uniapp/user/friends/update friends | | 删除好友关系 | 删除好友 /sdk/uniapp/user/friends/delete friend | | 查看和维护当前用户黑名单 | 获取黑名单 /sdk/uniapp/user/blacklist/get black list | | 读取或更新当前用户昵称、头像和扩展资料 | 更新当前用户资料 /sdk/uniapp/user/profile/set self info | | 设置账号级消息接收策略 | 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception | | 查看加好友权限的当前合同边界 | 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission | | 订阅和读取在线状态 | 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status | | 读取群成员、搜索成员或查询指定成员资料 | 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list | 业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。 状态更新 页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量: 当前用户资料变化:见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 好友申请变化:见 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient 。 好友关系和资料变化:见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 。 黑名单变化:见 获取黑名单 /sdk/uniapp/user/blacklist/get black list 。 在线状态变化:见 订阅用户在线状态 /sdk/uniapp/user/online status/subscribe users status 。 这些列表都按 userID 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。" }, { "path": "/sdk/uniapp/user/profile/get-users-info", @@ -4261,7 +4261,7 @@ "description": "按 userID 批量查询应用用户的公开资料。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", - "content": "getUsersInfo 可以按 userID 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 查询公开资料 传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user Promise 成功后直接返回 OpenIMUserListResult | null ,其中 users 是查询到的 OpenIMUserInfo ; OpenIMPublicUserItem 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 页面常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | ex | string | 账号级扩展字段,格式由业务约定。 | | attachedInfo 商业版字段 | string 或 null (可选) | 仅按已确认的商业业务协议解析。 | | globalRecvMsgOpt 商业版字段 | number 或 null (可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | ex 和 attachedInfo 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 setSelfInfo 更新。 调用结果与资料刷新 以返回的 users 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 userID ,去重后批量查询,再按 userID 合并结果。 SDK 没有面向任意公开用户资料的通用变更事件。 onSelfInfoUpdated 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 搜索添加好友 搜索并添加好友时,通常先由业务后端返回候选 userID ,再调用 getUsersInfo 展示公开资料。用户确认目标后,再进入好友申请流程。 async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? 如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 userID 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 按场景选择展示数据 | 场景 | 优先使用 | | | | | 应用用户搜索、陌生人资料卡 | OpenIMPublicUserItem / OpenIMUserInfo | | 好友列表、联系人页、好友备注 | OpenIMFriendUserItem | | 群成员列表、群内昵称、群角色 | OpenIMGroupMemberItem | 好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 、 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 和 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 下一步 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient" + "content": "getUsersInfo 可以按 userID 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。 如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 userID 传给 getUsersInfo 。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。 查询公开资料 传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。 import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user Promise 成功后直接返回 OpenIMUserListResult | null ,其中 users 是查询到的 OpenIMUserInfo ; OpenIMPublicUserItem 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 userID 建立映射,并为不存在、无权限或未返回的用户保留占位状态。 页面常用字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | OpenIMSDK 用户 ID。 | | nickname | string | 账号级公开昵称。 | | faceURL | string | 账号级公开头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | ex | string | 账号级扩展字段,格式由业务约定。 | | attachedInfo 商业版 | string 或 null (可选) | 仅按已确认的商业业务协议解析。 | | globalRecvMsgOpt 商业版 | number 或 null (可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 | ex 和 attachedInfo 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 setSelfInfo 更新。 调用结果与资料刷新 以返回的 users 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 userID ,去重后批量查询,再按 userID 合并结果。 SDK 没有面向任意公开用户资料的通用变更事件。 onSelfInfoUpdated 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。 搜索添加好友 搜索并添加好友时,通常先由业务后端返回候选 userID ,再调用 getUsersInfo 展示公开资料。用户确认目标后,再进入好友申请流程。 async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? 如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 userID 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。 按场景选择展示数据 | 场景 | 优先使用 | | | | | 应用用户搜索、陌生人资料卡 | OpenIMPublicUserItem / OpenIMUserInfo | | 好友列表、联系人页、好友备注 | OpenIMFriendUserItem | | 群成员列表、群内昵称、群角色 | OpenIMGroupMemberItem | 好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 、 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 和 分页查询群成员 /sdk/uniapp/group/retrieving group members/get group member list 。 下一步 分页获取好友列表 /sdk/uniapp/user/friends/get friend list page 获取指定好友资料 /sdk/uniapp/user/friends/get specified friends info 获取收到的好友申请 /sdk/uniapp/user/friend applications/get friend application list as recipient" }, { "path": "/sdk/uniapp/user/profile/get-self-user-info", @@ -4269,7 +4269,7 @@ "description": "查询当前已登录用户的 OpenIM 资料快照。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", - "content": "完成初始化、登录并确认连接可用后,调用 getSelfUserInfo 查询当前账号资料: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL 返回结果 Promise 成功后直接返回 OpenIMUserInfo | null ,没有 data 包装。非空对象字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | globalRecvMsgOpt 商业版字段 | number 或 null (可选) | 当前账号的全局消息接收方式;常量和语义见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。 | | attachedInfo 商业版字段 | string 或 null (可选) | SDK 附加信息;只按已确认的业务约定解析。 | | ex | string | 由业务约定的账号级扩展字符串。 | 以返回的 userID 校验应用账号与 SDK 当前账号是否一致。 null 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 onSelfInfoUpdated 合并和重新查询方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。" + "content": "完成初始化、登录并确认连接可用后,调用 getSelfUserInfo 查询当前账号资料: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL 返回结果 Promise 成功后直接返回 OpenIMUserInfo | null ,没有 data 包装。非空对象字段如下: | 字段 | 类型 | 说明 | | | | | | userID | string | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 | | nickname | string | 账号级昵称。 | | faceURL | string | 账号级头像地址。 | | createTime | number 或 null (可选) | 用户记录创建时间。 | | globalRecvMsgOpt 商业版 | number 或 null (可选) | 当前账号的全局消息接收方式;常量和语义见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。 | | attachedInfo 商业版 | string 或 null (可选) | SDK 附加信息;只按已确认的业务约定解析。 | | ex | string | 由业务约定的账号级扩展字符串。 | 以返回的 userID 校验应用账号与 SDK 当前账号是否一致。 null 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。 该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 onSelfInfoUpdated 合并和重新查询方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。" }, { "path": "/sdk/uniapp/user/profile/set-self-info", @@ -4277,7 +4277,7 @@ "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", - "content": "setSelfInfo 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 null 代替“保持不变”。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string 或 null | 否 | 新昵称。 | | faceURL | string 或 null | 否 | 新头像地址。 | | ex | string 或 null | 否 | 新扩展字符串,会完整覆盖旧值。 | | globalRecvMsgOpt 商业版字段 | OpenIMSetSelfInfoRecvMsgOpt 或 null | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 setSelfInfo 也承载账号级 globalRecvMsgOpt ,但不应与普通资料一起保存。消息接收策略见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission 。 Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 onSelfInfoUpdated 或重新调用 getSelfUserInfo 校准。 监听当前用户资料变化 本页是 onSelfInfoUpdated 的完整监听归属页。事件携带更新后的完整 OpenIMUserInfo ,应按 userID 替换当前用户快照: import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription 不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 releaseSelfInfoSubscription 。" + "content": "setSelfInfo 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 null 代替“保持不变”。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | nickname | string 或 null | 否 | 新昵称。 | | faceURL | string 或 null | 否 | 新头像地址。 | | ex | string 或 null | 否 | 新扩展字符串,会完整覆盖旧值。 | | globalRecvMsgOpt 商业版 | OpenIMSetSelfInfoRecvMsgOpt 或 null | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 | 至少传入一个实际要更新的字段。 import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。 setSelfInfo 也承载账号级 globalRecvMsgOpt ,但不应与普通资料一起保存。消息接收策略见 设置全局消息接收方式 /sdk/uniapp/user/profile/set global message reception 。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见 设置加好友权限 /sdk/uniapp/user/profile/set friend add permission 。 Promise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 onSelfInfoUpdated 或重新调用 getSelfUserInfo 校准。 监听当前用户资料变化 本页是 onSelfInfoUpdated 的完整监听归属页。事件携带更新后的完整 OpenIMUserInfo ,应按 userID 替换当前用户快照: import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription 不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 releaseSelfInfoSubscription 。" }, { "path": "/sdk/uniapp/user/profile/set-global-message-reception", @@ -4285,7 +4285,7 @@ "description": "设置当前账号在全部会话中的默认消息接收与通知方式。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", - "content": "globalRecvMsgOpt 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 当前插件通过 setSelfInfo 更新该字段: import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, OpenIMSetSelfInfoRecvMsgOpt 的合同允许以下数值: | 数值 | 含义 | | | | | 0 | 正常接收消息,并允许离线推送或通知。 | | 1 | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 | | 2 | 接收消息,但不触发离线推送或通知,即全天免打扰。 | 只传 globalRecvMsgOpt ,避免在切换接收策略时意外覆盖昵称、头像或 ex 。当前插件没有为这一字段提供独立 setter。 单个会话的 recvMsgOpt 是更细粒度的会话设置,见 设置会话消息接收方式 /sdk/uniapp/conversation/managing conversations/set message receive option 。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。 Promise 成功表示设置请求完成,不等于 onSelfInfoUpdated 已经到达。事件监听和 getSelfUserInfo 校准方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。" + "content": "globalRecvMsgOpt 商业版 字段是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。 当前插件通过 setSelfInfo 更新该字段: import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, OpenIMSetSelfInfoRecvMsgOpt 的合同允许以下数值: | 数值 | 含义 | | | | | 0 | 正常接收消息,并允许离线推送或通知。 | | 1 | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 | | 2 | 接收消息,但不触发离线推送或通知,即全天免打扰。 | 只传 globalRecvMsgOpt ,避免在切换接收策略时意外覆盖昵称、头像或 ex 。当前插件没有为这一字段提供独立 setter。 单个会话的 recvMsgOpt 是更细粒度的会话设置,见 设置会话消息接收方式 /sdk/uniapp/conversation/managing conversations/set message receive option 。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。 Promise 成功表示设置请求完成,不等于 onSelfInfoUpdated 已经到达。事件监听和 getSelfUserInfo 校准方式见 更新当前用户资料 /sdk/uniapp/user/profile/set self info 。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。" }, { "path": "/sdk/uniapp/user/profile/set-friend-add-permission", @@ -4725,7 +4725,7 @@ "description": "理解群资料、成员、申请、权限和群组事件。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group overview-group", - "content": "群组领域以 groupID 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 核心数据类型 | 类型 | 用途 | | | | | OpenIMGroupItem | 已加入群组列表、群资料页和群状态。 | | OpenIMCreateGroupInfo | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 | | OpenIMGroupMemberItem | 群成员资料、角色、入群来源和禁言结束时间。 | | OpenIMGroupApplicationItem | 入群申请及其申请人与处理状态。 | OpenIMGroupItem 常用字段包括 groupID 、 groupName 、 notification 、 introduction 、 faceURL 、 ownerUserID 、 memberCount 、 status 、 groupType 、 needVerification 、 lookMemberInfo 、 applyMemberFriend 和 ex 。 attachedInfo 是 商业版字段 ,只按已确认协议解析。 成员对象使用 groupID:userID 作为稳定合并标识。群内 nickname 和 faceURL 属于成员快照,不应被写回为用户账号级资料。 按任务查找页面 | 需求 | 页面 | | | | | 创建、更新、解散或退出群组 | 创建群组 /sdk/uniapp/group/create group 、 更新群资料 /sdk/uniapp/group/update group profile 、 解散群组 /sdk/uniapp/group/dismiss group 、 退出群组 /sdk/uniapp/group/quit group | | 分页查询已加入群组或指定群资料 | 分页查询已加入群组 /sdk/uniapp/group/retrieving groups/get joined group list page 、 查询指定群资料 /sdk/uniapp/group/retrieving groups/get specified groups info | | 查询、搜索和管理群成员 | 查询群成员列表 /sdk/uniapp/group/retrieving group members/get group member list 、 搜索群成员 /sdk/uniapp/group/retrieving group members/search group members | | 邀请或移除成员、转让群主 | 邀请用户入群 /sdk/uniapp/group/managing group members/invite user to group 、 移除群成员 /sdk/uniapp/group/managing group members/kick group member 、 转让群主 /sdk/uniapp/group/managing group members/transfer group owner | | 发送、查询和处理入群申请 | 申请加入群组 /sdk/uniapp/group/join group 、 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient | | 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 | 状态更新 本页归属群资料与已加入群列表的四个事件: import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription 先订阅事件,再查询已加入群组快照。按 groupID 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 onGroupInfoChanged 更新资料, onGroupDismissed 表示群已解散, onJoinedGroupAdded / onJoinedGroupDeleted 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。 群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 off subscription 。" + "content": "群组领域以 groupID 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。 核心数据类型 | 类型 | 用途 | | | | | OpenIMGroupItem | 已加入群组列表、群资料页和群状态。 | | OpenIMCreateGroupInfo | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 | | OpenIMGroupMemberItem | 群成员资料、角色、入群来源和禁言结束时间。 | | OpenIMGroupApplicationItem | 入群申请及其申请人与处理状态。 | OpenIMGroupItem 常用字段包括 groupID 、 groupName 、 notification 、 introduction 、 faceURL 、 ownerUserID 、 memberCount 、 status 、 groupType 、 needVerification 、 lookMemberInfo 、 applyMemberFriend 和 ex 。 attachedInfo 是 商业版 字段,只按已确认协议解析。 成员对象使用 groupID:userID 作为稳定合并标识。群内 nickname 和 faceURL 属于成员快照,不应被写回为用户账号级资料。 按任务查找页面 | 需求 | 页面 | | | | | 创建、更新、解散或退出群组 | 创建群组 /sdk/uniapp/group/create group 、 更新群资料 /sdk/uniapp/group/update group profile 、 解散群组 /sdk/uniapp/group/dismiss group 、 退出群组 /sdk/uniapp/group/quit group | | 分页查询已加入群组或指定群资料 | 分页查询已加入群组 /sdk/uniapp/group/retrieving groups/get joined group list page 、 查询指定群资料 /sdk/uniapp/group/retrieving groups/get specified groups info | | 查询、搜索和管理群成员 | 查询群成员列表 /sdk/uniapp/group/retrieving group members/get group member list 、 搜索群成员 /sdk/uniapp/group/retrieving group members/search group members | | 邀请或移除成员、转让群主 | 邀请用户入群 /sdk/uniapp/group/managing group members/invite user to group 、 移除群成员 /sdk/uniapp/group/managing group members/kick group member 、 转让群主 /sdk/uniapp/group/managing group members/transfer group owner | | 发送、查询和处理入群申请 | 申请加入群组 /sdk/uniapp/group/join group 、 查询收到的入群申请 /sdk/uniapp/group/group applications/get group application list as recipient | | 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 | 状态更新 本页归属群资料与已加入群列表的四个事件: import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription 先订阅事件,再查询已加入群组快照。按 groupID 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。 onGroupInfoChanged 更新资料, onGroupDismissed 表示群已解散, onJoinedGroupAdded / onJoinedGroupDeleted 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。 群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 off subscription 。" }, { "path": "/sdk/uniapp/group/create-group", @@ -4837,7 +4837,7 @@ "description": "按 offset 和 count 分页读取已加入群组。", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", - "content": "getJoinedGroupListPage 适合群数量较大的账号。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次读取的群数量。 | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? 返回结果 Promise 成功直接返回 OpenIMGroupListResult | null ,从 groups 读取当前页 OpenIMGroupItem 。 offset 从 0 开始,直到返回数量小于 count 。 群资料字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群稳定标识。 | | groupName | string | 群名称。 | | notification | string | 群公告。 | | introduction | string | 群简介。 | | faceURL | string | 群头像地址。 | | ownerUserID | string | 当前群主用户 ID。 | | creatorUserID | string | 群创建人用户 ID。 | | createTime | number | 群创建时间。 | | memberCount | number | 当前成员数快照。 | | status | number | 群状态。 | | groupType | number | 群类型。 | | needVerification | number | 入群验证策略。 | | lookMemberInfo | number | 普通成员查看成员资料的策略。 | | applyMemberFriend | number | 群成员之间申请好友的策略。 | | notificationUpdateTime | number | 群公告更新时间。 | | notificationUserID | string | 最近更新群公告的用户 ID。 | | ex | string | 群扩展字符串。 | | attachedInfo 商业版字段 | string | 商业附加信息,只按已确认协议解析。 | memberCount 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见 群组概览 /sdk/uniapp/group/overview group 。 分页期间群事件可能改变列表,应先把结果写入以 groupID 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。 第一页应替换当前账号快照,后续页按 groupID 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。" + "content": "getJoinedGroupListPage 适合群数量较大的账号。 参数说明 | 参数 | 类型 | 是否必填 | 说明 | | | | | | | offset | number | 是 | 分页偏移量,首页传 0 。 | | count | number | 是 | 本次读取的群数量。 | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? 返回结果 Promise 成功直接返回 OpenIMGroupListResult | null ,从 groups 读取当前页 OpenIMGroupItem 。 offset 从 0 开始,直到返回数量小于 count 。 群资料字段 | 字段 | 类型 | 说明 | | | | | | groupID | string | 群稳定标识。 | | groupName | string | 群名称。 | | notification | string | 群公告。 | | introduction | string | 群简介。 | | faceURL | string | 群头像地址。 | | ownerUserID | string | 当前群主用户 ID。 | | creatorUserID | string | 群创建人用户 ID。 | | createTime | number | 群创建时间。 | | memberCount | number | 当前成员数快照。 | | status | number | 群状态。 | | groupType | number | 群类型。 | | needVerification | number | 入群验证策略。 | | lookMemberInfo | number | 普通成员查看成员资料的策略。 | | applyMemberFriend | number | 群成员之间申请好友的策略。 | | notificationUpdateTime | number | 群公告更新时间。 | | notificationUserID | string | 最近更新群公告的用户 ID。 | | ex | string | 群扩展字符串。 | | attachedInfo 商业版 | string | 商业附加信息,只按已确认协议解析。 | memberCount 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见 群组概览 /sdk/uniapp/group/overview group 。 分页期间群事件可能改变列表,应先把结果写入以 groupID 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。 第一页应替换当前账号快照,后续页按 groupID 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。" }, { "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", diff --git a/src/generated/search-index.json b/src/generated/search-index.json index 25c9441d83..b7000640a9 100644 --- a/src/generated/search-index.json +++ b/src/generated/search-index.json @@ -4261,7 +4261,7 @@ "description": "Read public profiles for a list of user IDs.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-users-info", - "content": "Use getUsersInfo to query application users' public profiles by userID . It is suitable for friend candidates, stranger profile cards, and message sender profiles. If the product searches by nickname, phone number, organization, email, or another application field, let a trusted backend perform the search and permission check first, then pass the returned userID values to getUsersInfo . Administrator tokens and user directory administration must remain on that backend. Query public profiles Pass an array of OpenIMSDK user IDs. Deduplicate them and limit each batch; do not issue one request per row while a long list scrolls. import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user The Promise resolves directly to OpenIMUserListResult or null . Its users field contains the matched OpenIMUserInfo ; OpenIMPublicUserItem is the public profile alias for that shape. The result can be shorter than the request and does not have to preserve input order. Build a map by userID and retain placeholder state for users that do not exist, are inaccessible, or were not returned. Common fields are: | Field | Type | Description | | | | | | userID | string | OpenIMSDK user ID. | | nickname | string | Account level public nickname. | | faceURL | string | Account level public avatar URL. | | createTime | number or null optional | Time when the user record was created. | | ex | string | Account level extension string whose format is defined by the application. | | attachedInfo Commercial field | string or null optional | Parse only according to a confirmed commercial business contract. | | globalRecvMsgOpt Commercial field | number or null optional | Account level message reception option. A stranger profile card normally does not need to display it. | Neither ex nor attachedInfo is a trusted identity, authorization, or authentication credential. This query is also read only for other accounts. Update only the signed in user's profile with setSelfInfo . Results and profile refresh Use the returned users to update the current public profile snapshot. Query again when opening a profile card, refreshing manually, reconnecting, or receiving a profile change notification from the application backend. When a page displays several users, collect the visible userID values, deduplicate them, query one batch, and merge by userID . The SDK has no general change event for arbitrary users' public profiles. onSelfInfoUpdated carries only the signed in user's profile and must not be written into another user's public profile cache. See Update your profile /sdk/uniapp/user/profile/set self info for current account profile updates and reconciliation. Search for users to add as friends The application backend normally returns candidate userID values first. The App then calls getUsersInfo for public presentation and continues to the friend application flow after the user selects a target. async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? If the product supports only exact user ID lookup, validate that input and pass it directly. For fuzzy search or sensitive fields, the backend must enforce authorization, rate limits, redaction, and auditing. Choose display data by context | Context | Preferred type | | | | | Application search or a stranger's profile card | OpenIMPublicUserItem / OpenIMUserInfo | | Friend list, contacts, or friend remarks | OpenIMFriendUserItem | | Group member list, in group nickname, or group role | OpenIMGroupMemberItem | Friend remarks and in group nicknames belong to friendship and group member data. See Get the friend list /sdk/uniapp/user/friends/get friend list page , Get specified friend information /sdk/uniapp/user/friends/get specified friends info , and List group members /sdk/uniapp/group/retrieving group members/get group member list . Next steps Get the friend list /sdk/uniapp/user/friends/get friend list page Get specified friend information /sdk/uniapp/user/friends/get specified friends info Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient" + "content": "Use getUsersInfo to query application users' public profiles by userID . It is suitable for friend candidates, stranger profile cards, and message sender profiles. If the product searches by nickname, phone number, organization, email, or another application field, let a trusted backend perform the search and permission check first, then pass the returned userID values to getUsersInfo . Administrator tokens and user directory administration must remain on that backend. Query public profiles Pass an array of OpenIMSDK user IDs. Deduplicate them and limit each batch; do not issue one request per row while a long list scrolls. import getUsersInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const userIDList : Array = uniqueUserIDs 'user a', 'user b' const result = await getUsersInfo userIDList const users : Array = result?.users ?? users.forEach user = cachePublicUser user.userID, user The Promise resolves directly to OpenIMUserListResult or null . Its users field contains the matched OpenIMUserInfo ; OpenIMPublicUserItem is the public profile alias for that shape. The result can be shorter than the request and does not have to preserve input order. Build a map by userID and retain placeholder state for users that do not exist, are inaccessible, or were not returned. Common fields are: | Field | Type | Description | | | | | | userID | string | OpenIMSDK user ID. | | nickname | string | Account level public nickname. | | faceURL | string | Account level public avatar URL. | | createTime | number or null optional | Time when the user record was created. | | ex | string | Account level extension string whose format is defined by the application. | | attachedInfo Enterprise | string or null optional | Parse only according to a confirmed commercial business contract. | | globalRecvMsgOpt Enterprise | number or null optional | Account level message reception option. A stranger profile card normally does not need to display it. | Neither ex nor attachedInfo is a trusted identity, authorization, or authentication credential. This query is also read only for other accounts. Update only the signed in user's profile with setSelfInfo . Results and profile refresh Use the returned users to update the current public profile snapshot. Query again when opening a profile card, refreshing manually, reconnecting, or receiving a profile change notification from the application backend. When a page displays several users, collect the visible userID values, deduplicate them, query one batch, and merge by userID . The SDK has no general change event for arbitrary users' public profiles. onSelfInfoUpdated carries only the signed in user's profile and must not be written into another user's public profile cache. See Update your profile /sdk/uniapp/user/profile/set self info for current account profile updates and reconciliation. Search for users to add as friends The application backend normally returns candidate userID values first. The App then calls getUsersInfo for public presentation and continues to the friend application flow after the user selects a target. async function searchUsersForFriendRequest keyword : string : Promise const userIDs = await searchUserIDsFromBusinessBackend keyword if userIDs.length == 0 return const result = await getUsersInfo uniqueUserIDs userIDs return result?.users ?? If the product supports only exact user ID lookup, validate that input and pass it directly. For fuzzy search or sensitive fields, the backend must enforce authorization, rate limits, redaction, and auditing. Choose display data by context | Context | Preferred type | | | | | Application search or a stranger's profile card | OpenIMPublicUserItem / OpenIMUserInfo | | Friend list, contacts, or friend remarks | OpenIMFriendUserItem | | Group member list, in group nickname, or group role | OpenIMGroupMemberItem | Friend remarks and in group nicknames belong to friendship and group member data. See Get the friend list /sdk/uniapp/user/friends/get friend list page , Get specified friend information /sdk/uniapp/user/friends/get specified friends info , and List group members /sdk/uniapp/group/retrieving group members/get group member list . Next steps Get the friend list /sdk/uniapp/user/friends/get friend list page Get specified friend information /sdk/uniapp/user/friends/get specified friends info Get received friend applications /sdk/uniapp/user/friend applications/get friend application list as recipient" }, { "path": "/sdk/uniapp/user/profile/get-self-user-info", @@ -4269,7 +4269,7 @@ "description": "Read the OpenIM profile of the logged-in user.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile get-self-user-info", - "content": "After initialization, login, and connection readiness, call getSelfUserInfo to query the current account's profile: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL Return result The Promise resolves directly to OpenIMUserInfo or null , without a data wrapper. A non null object contains: | Field | Type | Description | | | | | | userID | string | Signed in user's OpenIMSDK user ID and the stable identifier for this profile snapshot. | | nickname | string | Account level nickname. | | faceURL | string | Account level avatar URL. | | createTime | number or null optional | Time when the user record was created. | | globalRecvMsgOpt Commercial field | number or null optional | Account level message reception option. See Set global message reception /sdk/uniapp/user/profile/set global message reception . | | attachedInfo Commercial field | string or null optional | SDK attachment data. Parse it only according to a confirmed application contract. | | ex | string | Account level extension string defined by the application. | Verify that the returned userID matches the current application account. Do not fabricate an empty user object when the result is null ; use login state and redacted diagnostics to determine why a snapshot is unavailable. This query establishes a snapshot and does not trigger a profile event. Clear it when switching accounts. See Update your profile /sdk/uniapp/user/profile/set self info for merging onSelfInfoUpdated and reconciling with another query." + "content": "After initialization, login, and connection readiness, call getSelfUserInfo to query the current account's profile: import getSelfUserInfo, type OpenIMUserInfo, from '@/uni modules/unix openim sdk' const currentUser : OpenIMUserInfo | null = await getSelfUserInfo if currentUser = null renderProfile currentUser.nickname, currentUser.faceURL Return result The Promise resolves directly to OpenIMUserInfo or null , without a data wrapper. A non null object contains: | Field | Type | Description | | | | | | userID | string | Signed in user's OpenIMSDK user ID and the stable identifier for this profile snapshot. | | nickname | string | Account level nickname. | | faceURL | string | Account level avatar URL. | | createTime | number or null optional | Time when the user record was created. | | globalRecvMsgOpt Enterprise | number or null optional | Account level message reception option. See Set global message reception /sdk/uniapp/user/profile/set global message reception . | | attachedInfo Enterprise | string or null optional | SDK attachment data. Parse it only according to a confirmed application contract. | | ex | string | Account level extension string defined by the application. | Verify that the returned userID matches the current application account. Do not fabricate an empty user object when the result is null ; use login state and redacted diagnostics to determine why a snapshot is unavailable. This query establishes a snapshot and does not trigger a profile event. Clear it when switching accounts. See Update your profile /sdk/uniapp/user/profile/set self info for merging onSelfInfoUpdated and reconciling with another query." }, { "path": "/sdk/uniapp/user/profile/set-self-info", @@ -4277,7 +4277,7 @@ "description": "Update selected profile fields and process onSelfInfoUpdated.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-self-info", - "content": "setSelfInfo updates the signed in user's basic display profile. Pass only the fields that really need to change; do not use empty strings or null to mean “unchanged.” Parameters | Parameter | Type | Required | Description | | | | | | | nickname | string or null | No | New nickname. | | faceURL | string or null | No | New avatar URL. | | ex | string or null | No | New extension string. It completely replaces the previous value. | | globalRecvMsgOpt Commercial field | OpenIMSetSelfInfoRecvMsgOpt or null | No | Account level message reception option; update it through the corresponding settings flow. | Pass at least one field that actually needs to change. import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex is a complete string; the SDK does not merge JSON automatically. If several application modules share it, read the current value first and merge each module's namespace before writing the complete replacement. setSelfInfo also carries the account level globalRecvMsgOpt , but do not save it together with ordinary profile data. See Set global message reception /sdk/uniapp/user/profile/set global message reception . The current Private rc.3 interface has no setter for the policy governing how other users add this account. Do not infer or call a method that exists only in the Wasm page; see Set friend request permissions /sdk/uniapp/user/profile/set friend add permission for the exact contract boundary. Promise success means that the update request completed, not that the profile event has arrived. Reconcile the final profile through onSelfInfoUpdated or another getSelfUserInfo query. Listen for current user profile changes This page is the complete owner for onSelfInfoUpdated . The event carries a complete updated OpenIMUserInfo ; replace the current user snapshot by userID . import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription Do not update only the local state of the page that sent the request. If several pages need the current profile, let one application user store subscribe, or let each owner keep and release its own handle. Call releaseSelfInfoSubscription on logout, account switch, or destruction of the user state layer." + "content": "setSelfInfo updates the signed in user's basic display profile. Pass only the fields that really need to change; do not use empty strings or null to mean “unchanged.” Parameters | Parameter | Type | Required | Description | | | | | | | nickname | string or null | No | New nickname. | | faceURL | string or null | No | New avatar URL. | | ex | string or null | No | New extension string. It completely replaces the previous value. | | globalRecvMsgOpt Enterprise | OpenIMSetSelfInfoRecvMsgOpt or null | No | Account level message reception option; update it through the corresponding settings flow. | Pass at least one field that actually needs to change. import setSelfInfo from '@/uni modules/unix openim sdk' await setSelfInfo nickname: 'OpenIM User', faceURL: 'https://cdn.example.com/avatar.png', ex: mergedExtra, ex is a complete string; the SDK does not merge JSON automatically. If several application modules share it, read the current value first and merge each module's namespace before writing the complete replacement. setSelfInfo also carries the account level globalRecvMsgOpt , but do not save it together with ordinary profile data. See Set global message reception /sdk/uniapp/user/profile/set global message reception . The current Private rc.3 interface has no setter for the policy governing how other users add this account. Do not infer or call a method that exists only in the Wasm page; see Set friend request permissions /sdk/uniapp/user/profile/set friend add permission for the exact contract boundary. Promise success means that the update request completed, not that the profile event has arrived. Reconcile the final profile through onSelfInfoUpdated or another getSelfUserInfo query. Listen for current user profile changes This page is the complete owner for onSelfInfoUpdated . The event carries a complete updated OpenIMUserInfo ; replace the current user snapshot by userID . import off, onSelfInfoUpdated, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const selfInfoSubscription = onSelfInfoUpdated user = replaceCurrentUser user.userID, user function releaseSelfInfoSubscription off selfInfoSubscription Do not update only the local state of the page that sent the request. If several pages need the current profile, let one application user store subscribe, or let each owner keep and release its own handle. Call releaseSelfInfoSubscription on logout, account switch, or destruction of the user state layer." }, { "path": "/sdk/uniapp/user/profile/set-global-message-reception", @@ -4285,7 +4285,7 @@ "description": "Set the commercial account-wide globalRecvMsgOpt profile field.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp user profile set-global-message-reception", - "content": "globalRecvMsgOpt is a Commercial field that defines the account's default message reception and notification policy. It is not an ordinary nickname, avatar, or display profile field. import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, The contract permits these values: | Value | Meaning | | | | | 0 | Receive messages normally and allow offline push or notifications. | | 1 | Do not receive messages. Use only when the product explicitly needs to stop delivery and the server policy is understood. | | 2 | Receive messages without offline push or notifications, equivalent to all day do not disturb. | Pass only globalRecvMsgOpt so changing message policy does not overwrite nickname, avatar, or ex . The plugin has no separate setter for this field. A conversation's recvMsgOpt is a more specific conversation level option; see Set message reception for a conversation /sdk/uniapp/conversation/managing conversations/set message receive option . When account and conversation settings coexist, display the final conversation state returned by the server rather than inferring it only from a local switch. Promise success means that the update request completed, not that onSelfInfoUpdated has arrived. See Update your profile /sdk/uniapp/user/profile/set self info for the event and getSelfUserInfo reconciliation. Public editions may omit this field; show the control according to capability configuration and do not interpret absence as a particular policy." + "content": "globalRecvMsgOpt is an Enterprise field that defines the account's default message reception and notification policy. It is not an ordinary nickname, avatar, or display profile field. import setSelfInfo, type OpenIMSetSelfInfoRecvMsgOpt, from '@/uni modules/unix openim sdk' const receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2 await setSelfInfo globalRecvMsgOpt: receiveWithoutNotification, The contract permits these values: | Value | Meaning | | | | | 0 | Receive messages normally and allow offline push or notifications. | | 1 | Do not receive messages. Use only when the product explicitly needs to stop delivery and the server policy is understood. | | 2 | Receive messages without offline push or notifications, equivalent to all day do not disturb. | Pass only globalRecvMsgOpt so changing message policy does not overwrite nickname, avatar, or ex . The plugin has no separate setter for this field. A conversation's recvMsgOpt is a more specific conversation level option; see Set message reception for a conversation /sdk/uniapp/conversation/managing conversations/set message receive option . When account and conversation settings coexist, display the final conversation state returned by the server rather than inferring it only from a local switch. Promise success means that the update request completed, not that onSelfInfoUpdated has arrived. See Update your profile /sdk/uniapp/user/profile/set self info for the event and getSelfUserInfo reconciliation. Public editions may omit this field; show the control according to capability configuration and do not interpret absence as a particular policy." }, { "path": "/sdk/uniapp/user/profile/set-friend-add-permission", @@ -4725,7 +4725,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Group overview.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group overview-group", - "content": "The group domain uses groupID as its stable primary key and includes group profiles, members, applications, and permissions. Group name, avatar, announcement, owner, and member count are mutable snapshots. Core data types | Type | Use case | | | | | OpenIMGroupItem | Joined group lists, group profile pages, and group state. | | OpenIMCreateGroupInfo | Name, type, announcement, introduction, avatar, and extension submitted when creating a group. | | OpenIMGroupMemberItem | Member profile, role, join source, and mute end time. | | OpenIMGroupApplicationItem | Join application, applicant, and processing state. | Common OpenIMGroupItem fields include groupID , groupName , notification , introduction , faceURL , ownerUserID , memberCount , status , groupType , needVerification , lookMemberInfo , applyMemberFriend , and ex . attachedInfo is a Commercial field ; parse it only according to a confirmed contract. Use groupID:userID as the stable merge key for a member. A member's in group nickname and faceURL are member snapshots and must not overwrite account level profile data. Find a task | Task | Page | | | | | Create, update, dismiss, or leave a group | Create a group /sdk/uniapp/group/create group , Update a group /sdk/uniapp/group/update group profile , Dismiss a group /sdk/uniapp/group/dismiss group , Leave a group /sdk/uniapp/group/quit group | | Page through joined groups or query selected profiles | List joined groups by page /sdk/uniapp/group/retrieving groups/get joined group list page , Get specified groups /sdk/uniapp/group/retrieving groups/get specified groups info | | Query, search, and manage members | List group members /sdk/uniapp/group/retrieving group members/get group member list , Search group members /sdk/uniapp/group/retrieving group members/search group members | | Invite or remove members and transfer ownership | Invite users /sdk/uniapp/group/managing group members/invite user to group , Remove members /sdk/uniapp/group/managing group members/kick group member , Transfer ownership /sdk/uniapp/group/managing group members/transfer group owner | | Send, query, and process join applications | Join a group /sdk/uniapp/group/join group , Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient | | Configure mute, verification, and member permissions | Use the corresponding group settings and member management pages. | State updates This page owns the four group profile and joined list events. Subscribe before querying the joined group snapshot. import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription Merge every event idempotently by groupID . Dismissal, active leave, and removal by another member have different business causes, but each can require closing the current chat page. onGroupInfoChanged updates profile data, onGroupDismissed means the group was dismissed, and onJoinedGroupAdded / onJoinedGroupDeleted update the current account's joined group list. Promise success, event arrival, and requery are three stages. Requery snapshots after App restoration, synchronization, or re login. Treat roles, mute state, join policy, and commercial extensions as server authoritative. Degrade when fields are absent instead of inventing default permission. Stop sending and clear the member store when the current user can no longer access the group. Release every owned handle on logout or group store destruction." + "content": "The group domain uses groupID as its stable primary key and includes group profiles, members, applications, and permissions. Group name, avatar, announcement, owner, and member count are mutable snapshots. Core data types | Type | Use case | | | | | OpenIMGroupItem | Joined group lists, group profile pages, and group state. | | OpenIMCreateGroupInfo | Name, type, announcement, introduction, avatar, and extension submitted when creating a group. | | OpenIMGroupMemberItem | Member profile, role, join source, and mute end time. | | OpenIMGroupApplicationItem | Join application, applicant, and processing state. | Common OpenIMGroupItem fields include groupID , groupName , notification , introduction , faceURL , ownerUserID , memberCount , status , groupType , needVerification , lookMemberInfo , applyMemberFriend , and ex . attachedInfo is an Enterprise field; parse it only according to a confirmed contract. Use groupID:userID as the stable merge key for a member. A member's in group nickname and faceURL are member snapshots and must not overwrite account level profile data. Find a task | Task | Page | | | | | Create, update, dismiss, or leave a group | Create a group /sdk/uniapp/group/create group , Update a group /sdk/uniapp/group/update group profile , Dismiss a group /sdk/uniapp/group/dismiss group , Leave a group /sdk/uniapp/group/quit group | | Page through joined groups or query selected profiles | List joined groups by page /sdk/uniapp/group/retrieving groups/get joined group list page , Get specified groups /sdk/uniapp/group/retrieving groups/get specified groups info | | Query, search, and manage members | List group members /sdk/uniapp/group/retrieving group members/get group member list , Search group members /sdk/uniapp/group/retrieving group members/search group members | | Invite or remove members and transfer ownership | Invite users /sdk/uniapp/group/managing group members/invite user to group , Remove members /sdk/uniapp/group/managing group members/kick group member , Transfer ownership /sdk/uniapp/group/managing group members/transfer group owner | | Send, query, and process join applications | Join a group /sdk/uniapp/group/join group , Get received group applications /sdk/uniapp/group/group applications/get group application list as recipient | | Configure mute, verification, and member permissions | Use the corresponding group settings and member management pages. | State updates This page owns the four group profile and joined list events. Subscribe before querying the joined group snapshot. import off, onGroupDismissed, onGroupInfoChanged, onJoinedGroupAdded, onJoinedGroupDeleted, type OpenIMSDKEventSubscription, from '@/uni modules/unix openim sdk' const infoSubscription = onGroupInfoChanged group = upsertGroup group.groupID, group const subscriptions : Array = infoSubscription, onGroupDismissed group = removeGroup group.groupID , onJoinedGroupAdded group = upsertGroup group.groupID, group , onJoinedGroupDeleted group = removeGroup group.groupID , subscriptions.forEach subscription = off subscription Merge every event idempotently by groupID . Dismissal, active leave, and removal by another member have different business causes, but each can require closing the current chat page. onGroupInfoChanged updates profile data, onGroupDismissed means the group was dismissed, and onJoinedGroupAdded / onJoinedGroupDeleted update the current account's joined group list. Promise success, event arrival, and requery are three stages. Requery snapshots after App restoration, synchronization, or re login. Treat roles, mute state, join policy, and commercial extensions as server authoritative. Degrade when fields are absent instead of inventing default permission. Stop sending and clear the member store when the current user can no longer access the group. Release every owned handle on logout or group store destruction." }, { "path": "/sdk/uniapp/group/create-group", @@ -4741,7 +4741,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Update group profile.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group update-group-profile", - "content": "Use setGroupInfo to update basic group profile fields. Pass only the values that actually changed. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group to update. | | groupName | string or null | No | New group name. | | introduction | string or null | No | New introduction. | | faceURL | string or null | No | New avatar URL. | Provide at least one actual profile field besides groupID ; omitted fields retain their values. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, Do not mix announcement, join verification, or member permission fields into the ordinary profile save flow; editing a name must not overwrite unrelated settings. The server enforces owner/admin permission. Promise success means that OpenIMServer completed the request. Merge onGroupInfoChanged by groupID or call getSpecifiedGroupsInfo for immediate reconciliation. Do not overwrite fields that were not submitted. displayIsRead is a Commercial field . Do not send it when the public server or installed edition does not expose the capability." + "content": "Use setGroupInfo to update basic group profile fields. Pass only the values that actually changed. Parameters | Parameter | Type | Required | Description | | | | | | | groupID | string | Yes | Group to update. | | groupName | string or null | No | New group name. | | introduction | string or null | No | New introduction. | | faceURL | string or null | No | New avatar URL. | Provide at least one actual profile field besides groupID ; omitted fields retain their values. import setGroupInfo from '@/uni modules/unix openim sdk' await setGroupInfo groupID, groupName: groupName.trim , introduction: introduction.trim , faceURL, Do not mix announcement, join verification, or member permission fields into the ordinary profile save flow; editing a name must not overwrite unrelated settings. The server enforces owner/admin permission. Promise success means that OpenIMServer completed the request. Merge onGroupInfoChanged by groupID or call getSpecifiedGroupsInfo for immediate reconciliation. Do not overwrite fields that were not submitted. displayIsRead is an Enterprise field. Do not send it when the public server or installed edition does not expose the capability." }, { "path": "/sdk/uniapp/group/set-group-announcement", @@ -4837,7 +4837,7 @@ "description": "OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.", "context": "SDKs · uni-app / uni-app x · v4", "keywords": "sdk uniapp v4 sdk uniapp group retrieving-groups get-joined-group-list-page", - "content": "Use getJoinedGroupListPage for accounts with many joined groups. Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Offset; use 0 for the first page. | | count | number | Yes | Number of groups to read. | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? Return result The Promise resolves directly to OpenIMGroupListResult or null ; groups contains the current page. Increase the offset until a page contains fewer than count items. Group profile fields | Field | Description | | | | | groupID | Stable group identifier. | | groupName , faceURL | Group name and avatar snapshot. | | notification , introduction | Announcement and introduction. | | ownerUserID , creatorUserID , createTime | Owner, creator, and creation time. | | memberCount , status , groupType | Member count, group state, and type snapshot. | | needVerification | Join verification policy. | | lookMemberInfo , applyMemberFriend | Member profile and friend application policy. | | notificationUpdateTime , notificationUserID | Latest announcement update metadata. | | ex | Application extension string. | | attachedInfo Commercial field | Commercial attachment data; parse only a confirmed contract. | Member count and permission fields are snapshots and do not replace member pagination or server authorization. See Group overview /sdk/uniapp/group/overview group for events and the model. Group events can move page boundaries. Merge pages into a map keyed by groupID , rebuild from offset 0 after App restoration/synchronization or group add/delete events, and stop old account page writes during account switching. Use the first page to replace the current account's group snapshot and later pages to merge by groupID . Do not retain old account group objects after switching users. Group names and member counts can change while paging, so calculate visible ordering only after merging the latest snapshot and events." + "content": "Use getJoinedGroupListPage for accounts with many joined groups. Parameters | Parameter | Type | Required | Description | | | | | | | offset | number | Yes | Offset; use 0 for the first page. | | count | number | Yes | Number of groups to read. | import getJoinedGroupListPage from '@/uni modules/unix openim sdk' const result = await getJoinedGroupListPage offset: 0, count: 100 appendGroups result?.groups ?? Return result The Promise resolves directly to OpenIMGroupListResult or null ; groups contains the current page. Increase the offset until a page contains fewer than count items. Group profile fields | Field | Description | | | | | groupID | Stable group identifier. | | groupName , faceURL | Group name and avatar snapshot. | | notification , introduction | Announcement and introduction. | | ownerUserID , creatorUserID , createTime | Owner, creator, and creation time. | | memberCount , status , groupType | Member count, group state, and type snapshot. | | needVerification | Join verification policy. | | lookMemberInfo , applyMemberFriend | Member profile and friend application policy. | | notificationUpdateTime , notificationUserID | Latest announcement update metadata. | | ex | Application extension string. | | attachedInfo Enterprise | Commercial attachment data; parse only a confirmed contract. | Member count and permission fields are snapshots and do not replace member pagination or server authorization. See Group overview /sdk/uniapp/group/overview group for events and the model. Group events can move page boundaries. Merge pages into a map keyed by groupID , rebuild from offset 0 after App restoration/synchronization or group add/delete events, and stop old account page writes during account switching. Use the first page to replace the current account's group snapshot and later pages to merge by groupID . Do not retain old account group objects after switching users. Group names and member counts can change while paging, so calculate visible ordering only after merging the latest snapshot and events." }, { "path": "/sdk/uniapp/group/retrieving-groups/is-join-group", diff --git a/src/generated/uniapp-sdk-zh-content.json b/src/generated/uniapp-sdk-zh-content.json index 2a63eda517..20638039cf 100644 --- a/src/generated/uniapp-sdk-zh-content.json +++ b/src/generated/uniapp-sdk-zh-content.json @@ -924,7 +924,7 @@ "title": "更新 Token 与观察 SDK session" }, "/sdk/uniapp/user/overview-user": { - "body": "`unix-openim-sdk` 使用 `userID` 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。\n\n群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。`userID` 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。\n\n## 用户类型\n\nSDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要接口 |\n| --- | --- | --- |\n| `OpenIMUserInfo` | 当前登录用户资料、设置页、当前账号头像和昵称 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `OpenIMPublicUserItem` | 应用用户查询、好友候选人、陌生人资料卡;它是 `OpenIMUserInfo` 的公开别名 | `getUsersInfo()` |\n| `OpenIMFriendUserItem` | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` |\n| `OpenIMBlackUserItem` | 当前用户黑名单中的用户 | `getBlackList()`、`addBlack()`、`removeBlack()` |\n| `OpenIMFriendApplicationItem` | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API |\n| `OpenIMUserStatusItem` | 用户汇总在线状态和在线平台 | `subscribeUsersStatus()`、`getUserStatus()` |\n\n同一个 `userID` 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 `OpenIMFriendUserItem`;陌生人资料卡使用 `OpenIMPublicUserItem`;群成员列表使用 `OpenIMGroupMemberItem`。会话列表和聊天页标题属于会话数据,应使用 `OpenIMConversationItem.showName`。\n\n`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于查找好友候选人或展示资料卡 | [获取用户资料](/sdk/uniapp/user/profile/get-users-info) |\n| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page) |\n| 发送或处理好友申请 | [发送好友申请](/sdk/uniapp/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) |\n| 修改好友资料 | [更新好友资料](/sdk/uniapp/user/friends/update-friends) |\n| 删除好友关系 | [删除好友](/sdk/uniapp/user/friends/delete-friend) |\n| 查看和维护当前用户黑名单 | [获取黑名单](/sdk/uniapp/user/blacklist/get-black-list) |\n| 读取或更新当前用户昵称、头像和扩展资料 | [更新当前用户资料](/sdk/uniapp/user/profile/set-self-info) |\n| 设置账号级消息接收策略 | [设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception) |\n| 查看加好友权限的当前合同边界 | [设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission) |\n| 订阅和读取在线状态 | [订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) |\n| 读取群成员、搜索成员或查询指定成员资料 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) |\n\n业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。\n\n## 状态更新\n\n页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量:\n\n- 当前用户资料变化:见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n- 好友申请变化:见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。\n- 好友关系和资料变化:见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。\n- 黑名单变化:见[获取黑名单](/sdk/uniapp/user/blacklist/get-black-list)。\n- 在线状态变化:见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。\n\n这些列表都按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。", + "body": "`unix-openim-sdk` 使用 `userID` 标识用户。实现资料卡、好友添加、联系人或黑名单功能时,首先要区分应用用户的公开资料、当前用户维护的好友关系、好友申请和黑名单状态。\n\n群成员列表、群内昵称、群角色和成员管理属于群组能力,相关用法见[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。`userID` 是跨端稳定标识;昵称和头像可以变化,不能作为状态主键。\n\n## 用户类型\n\nSDK 会根据使用场景返回不同的用户对象:\n\n| 类型 | 适用场景 | 主要接口 |\n| --- | --- | --- |\n| `OpenIMUserInfo` | 当前登录用户资料、设置页、当前账号头像和昵称 | `getSelfUserInfo()`、`setSelfInfo()` |\n| `OpenIMPublicUserItem` | 应用用户查询、好友候选人、陌生人资料卡;它是 `OpenIMUserInfo` 的公开别名 | `getUsersInfo()` |\n| `OpenIMFriendUserItem` | 当前用户的好友列表、好友备注、置顶和关系扩展字段 | `getFriendListPage()`、`getSpecifiedFriendsInfo()` |\n| `OpenIMBlackUserItem` | 当前用户黑名单中的用户 | `getBlackList()`、`addBlack()`、`removeBlack()` |\n| `OpenIMFriendApplicationItem` | 发出或收到的好友申请及其处理状态 | 好友申请查询、接受、拒绝和删除 API |\n| `OpenIMUserStatusItem` | 用户汇总在线状态和在线平台 | `subscribeUsersStatus()`、`getUserStatus()` |\n\n同一个 `userID` 可能同时出现在公开资料、好友资料、黑名单和群成员资料中。联系人页优先使用 `OpenIMFriendUserItem`;陌生人资料卡使用 `OpenIMPublicUserItem`;群成员列表使用 `OpenIMGroupMemberItem`。会话列表和聊天页标题属于会话数据,应使用 `OpenIMConversationItem.showName`。\n\n`OpenIMUserInfo` 的公共字段包括 `userID`、`nickname`、`faceURL`、`ex` 和可选 `createTime`。`attachedInfo` 与 `globalRecvMsgOpt` 是商业版字段,读取前应判空,不要假定公共服务端一定返回。\n\n## 功能入口\n\n| 需求 | 推荐页面 |\n| --- | --- |\n| 按 `userID` 查询公开资料,用于查找好友候选人或展示资料卡 | [获取用户资料](/sdk/uniapp/user/profile/get-users-info) |\n| 分页、搜索或按 ID 查询好友关系 | [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page) |\n| 发送或处理好友申请 | [发送好友申请](/sdk/uniapp/user/friend-applications/add-friend)、[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient) |\n| 修改好友资料 | [更新好友资料](/sdk/uniapp/user/friends/update-friends) |\n| 删除好友关系 | [删除好友](/sdk/uniapp/user/friends/delete-friend) |\n| 查看和维护当前用户黑名单 | [获取黑名单](/sdk/uniapp/user/blacklist/get-black-list) |\n| 读取或更新当前用户昵称、头像和扩展资料 | [更新当前用户资料](/sdk/uniapp/user/profile/set-self-info) |\n| 设置账号级消息接收策略 | [设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception) |\n| 查看加好友权限的当前合同边界 | [设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission) |\n| 订阅和读取在线状态 | [订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status) |\n| 读取群成员、搜索成员或查询指定成员资料 | [分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list) |\n\n业务后端仍是账号身份、实名信息、组织关系和业务权限的权威来源。SDK 用户资料适合聊天展示,不能替代业务登录和授权。\n\n## 状态更新\n\n页面首次进入时先调用对应查询 API 建立快照,再通过事件合并增量:\n\n- 当前用户资料变化:见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n- 好友申请变化:见[获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)。\n- 好友关系和资料变化:见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)。\n- 黑名单变化:见[获取黑名单](/sdk/uniapp/user/blacklist/get-black-list)。\n- 在线状态变化:见[订阅用户在线状态](/sdk/uniapp/user/online-status/subscribe-users-status)。\n\n这些列表都按 `userID` 幂等合并。不要只依赖事件恢复完整列表;断线重连、重新登录、切换账号或 App 被系统回收后,应重新查询当前界面所需的快照。", "description": "了解 uni-app / uni-app x SDK 中的用户资料、好友关系、黑名单和在线状态。", "headings": [ { @@ -947,7 +947,7 @@ "title": "用户概览" }, "/sdk/uniapp/user/profile/get-users-info": { - "body": "`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。\n\n## 查询公开资料\n\n传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。\n\n```uts\nimport {\n getUsersInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDList : Array = uniqueUserIDs(['user_a', 'user_b'])\nconst result = await getUsersInfo(userIDList)\nconst users : Array = result?.users ?? []\n\nusers.forEach((user) => {\n cachePublicUser(user.userID, user)\n})\n```\n\nPromise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n页面常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 |\n| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 |\n\n`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。\n\n## 调用结果与资料刷新\n\n以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。\n\nSDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n\n## 搜索添加好友\n\n搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。\n\n```uts\nasync function searchUsersForFriendRequest(keyword : string) : Promise> {\n const userIDs = await searchUserIDsFromBusinessBackend(keyword)\n if (userIDs.length == 0) {\n return []\n }\n\n const result = await getUsersInfo(uniqueUserIDs(userIDs))\n return result?.users ?? []\n}\n```\n\n如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。\n\n## 按场景选择展示数据\n\n| 场景 | 优先使用 |\n| --- | --- |\n| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` |\n| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` |\n| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` |\n\n好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。\n\n## 下一步\n\n- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)\n- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)\n- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)", + "body": "`getUsersInfo()` 可以按 `userID` 查询应用用户的公开资料,适合展示好友候选人、陌生人资料卡和消息发送者资料。\n\n如果产品需要按昵称、手机号、组织、邮箱或其他业务字段检索用户,应先由业务后端完成搜索和权限校验,再把返回的 `userID` 传给 `getUsersInfo()`。管理员 Token 只能保存在可信后端,用户目录管理也必须由后端执行。\n\n## 查询公开资料\n\n传入要查询的 OpenIMSDK 用户 ID 数组。调用前应去重并控制单次请求数量;不要在长列表滚动时为每一行单独请求。\n\n```uts\nimport {\n getUsersInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst userIDList : Array = uniqueUserIDs(['user_a', 'user_b'])\nconst result = await getUsersInfo(userIDList)\nconst users : Array = result?.users ?? []\n\nusers.forEach((user) => {\n cachePublicUser(user.userID, user)\n})\n```\n\nPromise 成功后直接返回 `OpenIMUserListResult | null`,其中 `users` 是查询到的 `OpenIMUserInfo[]`;`OpenIMPublicUserItem` 是该资料类型的公开场景别名。返回列表不保证与输入顺序一致,也可能少于请求数量。应按 `userID` 建立映射,并为不存在、无权限或未返回的用户保留占位状态。\n\n页面常用字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | OpenIMSDK 用户 ID。 |\n| `nickname` | `string` | 账号级公开昵称。 |\n| `faceURL` | `string` | 账号级公开头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `ex` | `string` | 账号级扩展字段,格式由业务约定。 |\n| `attachedInfo` 商业版 | `string` 或 `null`(可选) | 仅按已确认的商业业务协议解析。 |\n| `globalRecvMsgOpt` 商业版 | `number` 或 `null`(可选) | 账号全局消息接收选项;陌生人资料卡通常不需要展示。 |\n\n`ex` 和 `attachedInfo` 都不能作为可信身份、权限或认证凭据。客户端也不能通过用户 API 修改其他账号资料;当前用户自己的资料通过 `setSelfInfo()` 更新。\n\n## 调用结果与资料刷新\n\n以返回的 `users` 更新当前公开资料快照。打开资料卡、手动刷新、断线重连,或收到业务后端的资料变更通知时,重新调用该方法。页面同时展示多个用户时,先收集可见项中的 `userID`,去重后批量查询,再按 `userID` 合并结果。\n\nSDK 没有面向任意公开用户资料的通用变更事件。`onSelfInfoUpdated` 只携带当前登录用户的资料,不能把它作为其他用户的公开资料写入缓存。当前账号资料的读取、更新和事件同步见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。\n\n## 搜索添加好友\n\n搜索并添加好友时,通常先由业务后端返回候选 `userID`,再调用 `getUsersInfo()` 展示公开资料。用户确认目标后,再进入好友申请流程。\n\n```uts\nasync function searchUsersForFriendRequest(keyword : string) : Promise> {\n const userIDs = await searchUserIDsFromBusinessBackend(keyword)\n if (userIDs.length == 0) {\n return []\n }\n\n const result = await getUsersInfo(uniqueUserIDs(userIDs))\n return result?.users ?? []\n}\n```\n\n如果产品只支持按用户 ID 精确搜索,可以直接把经过格式校验的输入值作为 `userID` 查询。模糊搜索或按敏感字段搜索时,后端必须负责鉴权、限流、脱敏和审计。\n\n## 按场景选择展示数据\n\n| 场景 | 优先使用 |\n| --- | --- |\n| 应用用户搜索、陌生人资料卡 | `OpenIMPublicUserItem` / `OpenIMUserInfo` |\n| 好友列表、联系人页、好友备注 | `OpenIMFriendUserItem` |\n| 群成员列表、群内昵称、群角色 | `OpenIMGroupMemberItem` |\n\n好友备注和群内昵称分别来自好友关系与群成员资料。相关用法见[分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)、[获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)和[分页查询群成员](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)。\n\n## 下一步\n\n- [分页获取好友列表](/sdk/uniapp/user/friends/get-friend-list-page)\n- [获取指定好友资料](/sdk/uniapp/user/friends/get-specified-friends-info)\n- [获取收到的好友申请](/sdk/uniapp/user/friend-applications/get-friend-application-list-as-recipient)", "description": "按 userID 批量查询应用用户的公开资料。", "headings": [ { @@ -980,7 +980,7 @@ "title": "获取用户资料" }, "/sdk/uniapp/user/profile/get-self-user-info": { - "body": "完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料:\n\n```uts\nimport {\n getSelfUserInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst currentUser : OpenIMUserInfo | null = await getSelfUserInfo()\nif (currentUser != null) {\n renderProfile(currentUser.nickname, currentUser.faceURL)\n}\n```\n\n## 返回结果\n\nPromise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `globalRecvMsgOpt` 商业版字段 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 |\n| `attachedInfo` 商业版字段 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。\n\n该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。", + "body": "完成初始化、登录并确认连接可用后,调用 `getSelfUserInfo()` 查询当前账号资料:\n\n```uts\nimport {\n getSelfUserInfo,\n type OpenIMUserInfo,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst currentUser : OpenIMUserInfo | null = await getSelfUserInfo()\nif (currentUser != null) {\n renderProfile(currentUser.nickname, currentUser.faceURL)\n}\n```\n\n## 返回结果\n\nPromise 成功后直接返回 `OpenIMUserInfo | null`,没有 `{ data }` 包装。非空对象字段如下:\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `userID` | `string` | 当前登录用户的 OpenIMSDK 用户 ID,也是资料快照的稳定标识。 |\n| `nickname` | `string` | 账号级昵称。 |\n| `faceURL` | `string` | 账号级头像地址。 |\n| `createTime` | `number` 或 `null`(可选) | 用户记录创建时间。 |\n| `globalRecvMsgOpt` 商业版 | `number` 或 `null`(可选) | 当前账号的全局消息接收方式;常量和语义见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。 |\n| `attachedInfo` 商业版 | `string` 或 `null`(可选) | SDK 附加信息;只按已确认的业务约定解析。 |\n| `ex` | `string` | 由业务约定的账号级扩展字符串。 |\n\n以返回的 `userID` 校验应用账号与 SDK 当前账号是否一致。`null` 不应被伪造成空用户对象;应结合登录状态和错误日志判断当前是否没有可用快照。\n\n该查询只建立当前资料快照,不触发资料事件。切换账号时必须清理旧快照;资料更新后的 `onSelfInfoUpdated` 合并和重新查询方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。", "description": "查询当前已登录用户的 OpenIM 资料快照。", "headings": [ { @@ -993,7 +993,7 @@ "title": "获取当前用户资料" }, "/sdk/uniapp/user/profile/set-self-info": { - "body": "`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string` 或 `null` | 否 | 新昵称。 |\n| `faceURL` | `string` 或 `null` | 否 | 新头像地址。 |\n| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `globalRecvMsgOpt` 商业版字段 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 |\n\n至少传入一个实际要更新的字段。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n ex: mergedExtra,\n})\n```\n\n`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。\n\n`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。\n\nPromise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。\n\n## 监听当前用户资料变化\n\n本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照:\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nfunction releaseSelfInfoSubscription() {\n off(selfInfoSubscription)\n}\n```\n\n不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。", + "body": "`setSelfInfo()` 更新当前登录用户的基础展示资料。只传本次确实需要更新的字段;不要用空字符串或 `null` 代替“保持不变”。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `nickname` | `string` 或 `null` | 否 | 新昵称。 |\n| `faceURL` | `string` 或 `null` | 否 | 新头像地址。 |\n| `ex` | `string` 或 `null` | 否 | 新扩展字符串,会完整覆盖旧值。 |\n| `globalRecvMsgOpt` 商业版 | `OpenIMSetSelfInfoRecvMsgOpt` 或 `null` | 否 | 账号级消息接收方式;应在对应设置流程中单独更新。 |\n\n至少传入一个实际要更新的字段。\n\n```uts\nimport { setSelfInfo } from '@/uni_modules/unix-openim-sdk'\n\nawait setSelfInfo({\n nickname: 'OpenIM User',\n faceURL: 'https://cdn.example.com/avatar.png',\n ex: mergedExtra,\n})\n```\n\n`ex` 是完整字符串,SDK 不会自动合并 JSON。多个业务模块共用时,应先读取当前值,在应用层合并各自命名空间后再完整写回。\n\n`setSelfInfo()` 也承载账号级 `globalRecvMsgOpt`,但不应与普通资料一起保存。消息接收策略见[设置全局消息接收方式](/sdk/uniapp/user/profile/set-global-message-reception)。当前 Private rc.3 接口没有修改“其他用户添加当前账号时的权限”的 setter,不要从 Wasm 页面推断或调用不存在的方法;合同边界见[设置加好友权限](/sdk/uniapp/user/profile/set-friend-add-permission)。\n\nPromise 成功表示设置请求完成,不等同于资料事件已到达。最终资料通过 `onSelfInfoUpdated` 或重新调用 `getSelfUserInfo()` 校准。\n\n## 监听当前用户资料变化\n\n本页是 `onSelfInfoUpdated` 的完整监听归属页。事件携带更新后的完整 `OpenIMUserInfo`,应按 `userID` 替换当前用户快照:\n\n```uts\nimport {\n off,\n onSelfInfoUpdated,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst selfInfoSubscription = onSelfInfoUpdated((user) => {\n replaceCurrentUser(user.userID, user)\n})\n\nfunction releaseSelfInfoSubscription() {\n off(selfInfoSubscription)\n}\n```\n\n不要只修改发起请求的页面局部状态。多个页面都需要当前用户资料时,由应用级用户 store 统一订阅,或让每个拥有者保存并释放自己的句柄。退出登录、切换账号或销毁用户状态层时调用 `releaseSelfInfoSubscription()`。", "description": "更新当前登录用户的昵称、头像和扩展资料,并同步资料变化事件。", "headings": [ { @@ -1011,7 +1011,7 @@ "title": "更新当前用户资料" }, "/sdk/uniapp/user/profile/set-global-message-reception": { - "body": "`globalRecvMsgOpt` 商业版字段 是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。\n\n当前插件通过 `setSelfInfo()` 更新该字段:\n\n```uts\nimport {\n setSelfInfo,\n type OpenIMSetSelfInfoRecvMsgOpt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2\nawait setSelfInfo({\n globalRecvMsgOpt: receiveWithoutNotification,\n})\n```\n\n`OpenIMSetSelfInfoRecvMsgOpt` 的合同允许以下数值:\n\n| 数值 | 含义 |\n| --- | --- |\n| `0` | 正常接收消息,并允许离线推送或通知。 |\n| `1` | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 |\n| `2` | 接收消息,但不触发离线推送或通知,即全天免打扰。 |\n\n只传 `globalRecvMsgOpt`,避免在切换接收策略时意外覆盖昵称、头像或 `ex`。当前插件没有为这一字段提供独立 setter。\n\n单个会话的 `recvMsgOpt` 是更细粒度的会话设置,见[设置会话消息接收方式](/sdk/uniapp/conversation/managing-conversations/set-message-receive-option)。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。\n\nPromise 成功表示设置请求完成,不等于 `onSelfInfoUpdated` 已经到达。事件监听和 `getSelfUserInfo()` 校准方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。", + "body": "`globalRecvMsgOpt` 商业版字段是账号级默认策略,控制当前账号是否接收消息以及是否允许通知。它不属于昵称、头像等普通展示资料。\n\n当前插件通过 `setSelfInfo()` 更新该字段:\n\n```uts\nimport {\n setSelfInfo,\n type OpenIMSetSelfInfoRecvMsgOpt,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst receiveWithoutNotification : OpenIMSetSelfInfoRecvMsgOpt = 2\nawait setSelfInfo({\n globalRecvMsgOpt: receiveWithoutNotification,\n})\n```\n\n`OpenIMSetSelfInfoRecvMsgOpt` 的合同允许以下数值:\n\n| 数值 | 含义 |\n| --- | --- |\n| `0` | 正常接收消息,并允许离线推送或通知。 |\n| `1` | 不接收消息。只有产品明确需要停收消息并确认服务端策略时使用。 |\n| `2` | 接收消息,但不触发离线推送或通知,即全天免打扰。 |\n\n只传 `globalRecvMsgOpt`,避免在切换接收策略时意外覆盖昵称、头像或 `ex`。当前插件没有为这一字段提供独立 setter。\n\n单个会话的 `recvMsgOpt` 是更细粒度的会话设置,见[设置会话消息接收方式](/sdk/uniapp/conversation/managing-conversations/set-message-receive-option)。同时存在账号级和会话级设置时,客户端应展示服务端返回的最终会话状态,不要只根据本地开关推断。\n\nPromise 成功表示设置请求完成,不等于 `onSelfInfoUpdated` 已经到达。事件监听和 `getSelfUserInfo()` 校准方式见[更新当前用户资料](/sdk/uniapp/user/profile/set-self-info)。公共版中该字段可能不存在,业务 UI 应按能力配置显示入口,不能把缺失值解释为某个确定策略。", "description": "设置当前账号在全部会话中的默认消息接收与通知方式。", "headings": [], "sourcePath": "/sdk/uniapp/user/profile/set-global-message-reception", @@ -1663,7 +1663,7 @@ "title": "删除会话分组" }, "/sdk/uniapp/group/overview-group": { - "body": "群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。\n\n## 核心数据类型\n\n| 类型 | 用途 |\n| --- | --- |\n| `OpenIMGroupItem` | 已加入群组列表、群资料页和群状态。 |\n| `OpenIMCreateGroupInfo` | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 |\n| `OpenIMGroupMemberItem` | 群成员资料、角色、入群来源和禁言结束时间。 |\n| `OpenIMGroupApplicationItem` | 入群申请及其申请人与处理状态。 |\n\n`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。\n\n成员对象使用 `groupID:userID` 作为稳定合并标识。群内 `nickname` 和 `faceURL` 属于成员快照,不应被写回为用户账号级资料。\n\n## 按任务查找页面\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建、更新、解散或退出群组 | [创建群组](/sdk/uniapp/group/create-group)、[更新群资料](/sdk/uniapp/group/update-group-profile)、[解散群组](/sdk/uniapp/group/dismiss-group)、[退出群组](/sdk/uniapp/group/quit-group) |\n| 分页查询已加入群组或指定群资料 | [分页查询已加入群组](/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)、[查询指定群资料](/sdk/uniapp/group/retrieving-groups/get-specified-groups-info) |\n| 查询、搜索和管理群成员 | [查询群成员列表](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)、[搜索群成员](/sdk/uniapp/group/retrieving-group-members/search-group-members) |\n| 邀请或移除成员、转让群主 | [邀请用户入群](/sdk/uniapp/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/uniapp/group/managing-group-members/kick-group-member)、[转让群主](/sdk/uniapp/group/managing-group-members/transfer-group-owner) |\n| 发送、查询和处理入群申请 | [申请加入群组](/sdk/uniapp/group/join-group)、[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) |\n| 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 |\n\n## 状态更新\n\n本页归属群资料与已加入群列表的四个事件:\n\n```uts\nimport {\n off,\n onGroupDismissed,\n onGroupInfoChanged,\n onJoinedGroupAdded,\n onJoinedGroupDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group))\nconst subscriptions : Array = [\n infoSubscription,\n onGroupDismissed((group) => removeGroup(group.groupID)),\n onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)),\n onJoinedGroupDeleted((group) => removeGroup(group.groupID)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。\n\n`onGroupInfoChanged` 更新资料,`onGroupDismissed` 表示群已解散,`onJoinedGroupAdded` / `onJoinedGroupDeleted` 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。\n\n群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 `off(subscription)`。", + "body": "群组领域以 `groupID` 为稳定主键,包含群资料、成员、申请和权限。群名、头像、公告、群主和成员数都是可变快照。\n\n## 核心数据类型\n\n| 类型 | 用途 |\n| --- | --- |\n| `OpenIMGroupItem` | 已加入群组列表、群资料页和群状态。 |\n| `OpenIMCreateGroupInfo` | 创建群时提交的群名、类型、公告、简介、头像和扩展字段。 |\n| `OpenIMGroupMemberItem` | 群成员资料、角色、入群来源和禁言结束时间。 |\n| `OpenIMGroupApplicationItem` | 入群申请及其申请人与处理状态。 |\n\n`OpenIMGroupItem` 常用字段包括 `groupID`、`groupName`、`notification`、`introduction`、`faceURL`、`ownerUserID`、`memberCount`、`status`、`groupType`、`needVerification`、`lookMemberInfo`、`applyMemberFriend` 和 `ex`。`attachedInfo` 是商业版字段,只按已确认协议解析。\n\n成员对象使用 `groupID:userID` 作为稳定合并标识。群内 `nickname` 和 `faceURL` 属于成员快照,不应被写回为用户账号级资料。\n\n## 按任务查找页面\n\n| 需求 | 页面 |\n| --- | --- |\n| 创建、更新、解散或退出群组 | [创建群组](/sdk/uniapp/group/create-group)、[更新群资料](/sdk/uniapp/group/update-group-profile)、[解散群组](/sdk/uniapp/group/dismiss-group)、[退出群组](/sdk/uniapp/group/quit-group) |\n| 分页查询已加入群组或指定群资料 | [分页查询已加入群组](/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page)、[查询指定群资料](/sdk/uniapp/group/retrieving-groups/get-specified-groups-info) |\n| 查询、搜索和管理群成员 | [查询群成员列表](/sdk/uniapp/group/retrieving-group-members/get-group-member-list)、[搜索群成员](/sdk/uniapp/group/retrieving-group-members/search-group-members) |\n| 邀请或移除成员、转让群主 | [邀请用户入群](/sdk/uniapp/group/managing-group-members/invite-user-to-group)、[移除群成员](/sdk/uniapp/group/managing-group-members/kick-group-member)、[转让群主](/sdk/uniapp/group/managing-group-members/transfer-group-owner) |\n| 发送、查询和处理入群申请 | [申请加入群组](/sdk/uniapp/group/join-group)、[查询收到的入群申请](/sdk/uniapp/group/group-applications/get-group-application-list-as-recipient) |\n| 设置群禁言、验证和成员权限 | 对应群设置与成员管理页面 |\n\n## 状态更新\n\n本页归属群资料与已加入群列表的四个事件:\n\n```uts\nimport {\n off,\n onGroupDismissed,\n onGroupInfoChanged,\n onJoinedGroupAdded,\n onJoinedGroupDeleted,\n type OpenIMSDKEventSubscription,\n} from '@/uni_modules/unix-openim-sdk'\n\nconst infoSubscription = onGroupInfoChanged((group) => upsertGroup(group.groupID, group))\nconst subscriptions : Array = [\n infoSubscription,\n onGroupDismissed((group) => removeGroup(group.groupID)),\n onJoinedGroupAdded((group) => upsertGroup(group.groupID, group)),\n onJoinedGroupDeleted((group) => removeGroup(group.groupID)),\n]\n\nsubscriptions.forEach((subscription) => off(subscription))\n```\n\n先订阅事件,再查询已加入群组快照。按 `groupID` 幂等合并;群解散、退出和被移出群的事件语义不同,但都可能要求关闭当前聊天页。\n\n`onGroupInfoChanged` 更新资料,`onGroupDismissed` 表示群已解散,`onJoinedGroupAdded` / `onJoinedGroupDeleted` 更新当前账号的已加入群列表。Promise 成功、事件到达和重新查询是三个阶段;App 恢复、同步完成或重新登录后重新查询快照。\n\n群解散、当前用户退出和被移出群的业务原因不同,但都可能要求关闭聊天页、停止发送并清理成员 store。字段缺失时降级,不伪造默认权限。退出账号或销毁群组 store 时逐个 `off(subscription)`。", "description": "理解群资料、成员、申请、权限和群组事件。", "headings": [ { @@ -1811,7 +1811,7 @@ "title": "查询已加入群组" }, "/sdk/uniapp/group/retrieving-groups/get-joined-group-list-page": { - "body": "`getJoinedGroupListPage()` 适合群数量较大的账号。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的群数量。 |\n\n```uts\nimport { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupListPage({ offset: 0, count: 100 })\nappendGroups(result?.groups ?? [])\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupListResult | null`,从 `groups` 读取当前页 `OpenIMGroupItem[]`。`offset` 从 0 开始,直到返回数量小于 `count`。\n\n### 群资料字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 群稳定标识。 |\n| `groupName` | `string` | 群名称。 |\n| `notification` | `string` | 群公告。 |\n| `introduction` | `string` | 群简介。 |\n| `faceURL` | `string` | 群头像地址。 |\n| `ownerUserID` | `string` | 当前群主用户 ID。 |\n| `creatorUserID` | `string` | 群创建人用户 ID。 |\n| `createTime` | `number` | 群创建时间。 |\n| `memberCount` | `number` | 当前成员数快照。 |\n| `status` | `number` | 群状态。 |\n| `groupType` | `number` | 群类型。 |\n| `needVerification` | `number` | 入群验证策略。 |\n| `lookMemberInfo` | `number` | 普通成员查看成员资料的策略。 |\n| `applyMemberFriend` | `number` | 群成员之间申请好友的策略。 |\n| `notificationUpdateTime` | `number` | 群公告更新时间。 |\n| `notificationUserID` | `string` | 最近更新群公告的用户 ID。 |\n| `ex` | `string` | 群扩展字符串。 |\n| `attachedInfo` 商业版字段 | `string` | 商业附加信息,只按已确认协议解析。 |\n\n`memberCount` 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见[群组概览](/sdk/uniapp/group/overview-group)。\n\n分页期间群事件可能改变列表,应先把结果写入以 `groupID` 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。\n\n第一页应替换当前账号快照,后续页按 `groupID` 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。", + "body": "`getJoinedGroupListPage()` 适合群数量较大的账号。\n\n## 参数说明\n\n| 参数 | 类型 | 是否必填 | 说明 |\n| --- | --- | --- | --- |\n| `offset` | `number` | 是 | 分页偏移量,首页传 `0`。 |\n| `count` | `number` | 是 | 本次读取的群数量。 |\n\n```uts\nimport { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'\n\nconst result = await getJoinedGroupListPage({ offset: 0, count: 100 })\nappendGroups(result?.groups ?? [])\n```\n\n## 返回结果\n\nPromise 成功直接返回 `OpenIMGroupListResult | null`,从 `groups` 读取当前页 `OpenIMGroupItem[]`。`offset` 从 0 开始,直到返回数量小于 `count`。\n\n### 群资料字段\n\n| 字段 | 类型 | 说明 |\n| --- | --- | --- |\n| `groupID` | `string` | 群稳定标识。 |\n| `groupName` | `string` | 群名称。 |\n| `notification` | `string` | 群公告。 |\n| `introduction` | `string` | 群简介。 |\n| `faceURL` | `string` | 群头像地址。 |\n| `ownerUserID` | `string` | 当前群主用户 ID。 |\n| `creatorUserID` | `string` | 群创建人用户 ID。 |\n| `createTime` | `number` | 群创建时间。 |\n| `memberCount` | `number` | 当前成员数快照。 |\n| `status` | `number` | 群状态。 |\n| `groupType` | `number` | 群类型。 |\n| `needVerification` | `number` | 入群验证策略。 |\n| `lookMemberInfo` | `number` | 普通成员查看成员资料的策略。 |\n| `applyMemberFriend` | `number` | 群成员之间申请好友的策略。 |\n| `notificationUpdateTime` | `number` | 群公告更新时间。 |\n| `notificationUserID` | `string` | 最近更新群公告的用户 ID。 |\n| `ex` | `string` | 群扩展字符串。 |\n| `attachedInfo` 商业版 | `string` | 商业附加信息,只按已确认协议解析。 |\n\n`memberCount` 和权限字段都是查询时快照,不能替代成员分页或服务端权限校验。完整模型与事件见[群组概览](/sdk/uniapp/group/overview-group)。\n\n分页期间群事件可能改变列表,应先把结果写入以 `groupID` 为键的映射,再计算排序;不要依赖页内位置。App 恢复、同步完成或群新增/删除事件到达后,可从 offset 0 重建快照。\n\n第一页应替换当前账号快照,后续页按 `groupID` 合并。切换账号时停止旧分页结果写入并清空群 store,避免把旧账号群列表追加到新账号。", "description": "按 offset 和 count 分页读取已加入群组。", "headings": [ { diff --git a/src/lib/client-sdk-commercial.ts b/src/lib/client-sdk-commercial.ts index 3fc2edeb5f..853227b2a3 100644 --- a/src/lib/client-sdk-commercial.ts +++ b/src/lib/client-sdk-commercial.ts @@ -29,6 +29,13 @@ export type PageCommercialInfo = { events: string[]; }; +export const enterpriseBadgeMarkupPatternSource = + '(?:商业版(?:字段)?|Enterprise|Commercial(?: field)?)<\\/span>'; + +export function isEnterpriseBadgeMarkup(value: string): boolean { + return new RegExp(`^${enterpriseBadgeMarkupPatternSource}$`).test(value); +} + const methods = ownership.methods as OwnershipEntry[]; const events = ownership.events as OwnershipEntry[]; const commercialMethodNames = new Set(