@tencentcloud/sdk-mcp 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/index.js +7 -8
  2. package/index.js.map +1 -1
  3. package/libs/lib-generate-test-usersig-es.min.d.ts +6 -0
  4. package/libs/lib-generate-test-usersig-es.min.js +2 -0
  5. package/package.json +2 -1
  6. package/resource/doc/chatuikit/react/components/avatar.md +105 -0
  7. package/resource/doc/chatuikit/react/components/chat.md +38 -0
  8. package/resource/doc/chatuikit/react/components/chatheader.md +153 -0
  9. package/resource/doc/chatuikit/react/components/component-list.md +36 -0
  10. package/resource/doc/chatuikit/react/components/conversation-list.md +765 -0
  11. package/resource/doc/chatuikit/react/components/message-input.md +799 -0
  12. package/resource/doc/chatuikit/react/components/message-list.md +385 -0
  13. package/resource/doc/chatuikit/react/components/tuikit.md +64 -0
  14. package/resource/doc/chatuikit/react/integration.md +68 -0
  15. package/resource/doc/chatuikit/react/login.md +25 -0
  16. package/resource/doc/chatuikit/vue/components/MessageInput.md +546 -0
  17. package/resource/doc/chatuikit/vue/components/avatar.md +105 -0
  18. package/resource/doc/chatuikit/vue/components/chat.md +38 -0
  19. package/resource/doc/chatuikit/vue/components/chatheader.md +153 -0
  20. package/resource/doc/chatuikit/vue/components/component-list.md +90 -0
  21. package/resource/doc/chatuikit/vue/components/conversation-list.md +590 -0
  22. package/resource/doc/chatuikit/vue/components/login.md +29 -0
  23. package/resource/doc/chatuikit/vue/components/message-input.md +546 -0
  24. package/resource/doc/chatuikit/vue/components/message-list.md +548 -0
  25. package/resource/doc/chatuikit/vue/components/tuikit.md +110 -0
  26. package/resource/doc/chatuikit/vue/components/userpicker.md +256 -0
  27. package/resource/doc/chatuikit/vue/integration.md +218 -0
  28. package/resource/doc/chatuikit/vue/login.md +29 -0
  29. package/resource/doc/chatuikit/vue3/components/MessageInput.md +546 -0
  30. package/resource/doc/chatuikit/vue3/components/MessageList.md +385 -0
  31. package/resource/doc/chatuikit/vue3/components/avatar.md +105 -0
  32. package/resource/doc/chatuikit/vue3/components/chatheader.md +153 -0
  33. package/resource/doc/chatuikit/vue3/components/component-list.md +88 -0
  34. package/resource/doc/chatuikit/vue3/components/userpicker.md +256 -0
  35. package/resource/doc/chatuikit/vue3/integration.md +218 -0
  36. package/server.js +10 -181
  37. package/server.js.map +1 -1
  38. package/{streamableHttp.js → streamable-http.js} +8 -13
  39. package/streamable-http.js.map +1 -0
  40. package/tools/call/get-call-faq.js +31 -0
  41. package/tools/call/get-call-faq.js.map +1 -0
  42. package/tools/call/get-native-call-integration-guide.js +35 -0
  43. package/tools/call/get-native-call-integration-guide.js.map +1 -0
  44. package/tools/call/get-native-call-integration.js +35 -0
  45. package/tools/call/get-native-call-integration.js.map +1 -0
  46. package/tools/call/get-web-call-integration-guide.js +34 -0
  47. package/tools/call/get-web-call-integration-guide.js.map +1 -0
  48. package/tools/call/get-web-call-integration.js +34 -0
  49. package/tools/call/get-web-call-integration.js.map +1 -0
  50. package/tools/chat/get-chat-faq.js +31 -0
  51. package/tools/chat/get-chat-faq.js.map +1 -0
  52. package/tools/chat/get-native-chat-integration-guide.js +33 -0
  53. package/tools/chat/get-native-chat-integration-guide.js.map +1 -0
  54. package/tools/chat/get-native-chat-integration.js +33 -0
  55. package/tools/chat/get-native-chat-integration.js.map +1 -0
  56. package/tools/chat/get-web-chat-component-detail.js +36 -0
  57. package/tools/chat/get-web-chat-component-detail.js.map +1 -0
  58. package/tools/chat/get-web-chat-integration-guide.js +42 -0
  59. package/tools/chat/get-web-chat-integration-guide.js.map +1 -0
  60. package/tools/chat/get-web-chat-integration.js +36 -0
  61. package/tools/chat/get-web-chat-integration.js.map +1 -0
  62. package/tools/chat/get-web-chat-uikit-login.js +30 -0
  63. package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
  64. package/tools/common/get-usersig.js +35 -0
  65. package/tools/common/get-usersig.js.map +1 -0
  66. package/tools/common/present-framework-choice.js +32 -0
  67. package/tools/common/present-framework-choice.js.map +1 -0
  68. package/tools/common/record-prompt.js +31 -0
  69. package/tools/common/record-prompt.js.map +1 -0
  70. package/tools/common/record-result.js +35 -0
  71. package/tools/common/record-result.js.map +1 -0
  72. package/tools/index.js +39 -0
  73. package/tools/index.js.map +1 -0
  74. package/tools/rtcengine/get-rtcengine-integration-guide.js +32 -0
  75. package/tools/rtcengine/get-rtcengine-integration-guide.js.map +1 -0
  76. package/tools/rtcengine/get-rtcenigne-faq.js +31 -0
  77. package/tools/rtcengine/get-rtcenigne-faq.js.map +1 -0
  78. package/utils/aegis-client.js +8 -0
  79. package/utils/aegis-client.js.map +1 -0
  80. package/utils/generate-usersig.js +14 -0
  81. package/utils/generate-usersig.js.map +1 -0
  82. package/utils/get-doc-content.js +46 -0
  83. package/utils/get-doc-content.js.map +1 -0
  84. package/utils/handle-component-name.js +12 -0
  85. package/utils/handle-component-name.js.map +1 -0
  86. package/utils/handle-framework.js +9 -0
  87. package/utils/handle-framework.js.map +1 -0
  88. package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -185
  89. package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -212
  90. package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +0 -149
  91. package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +0 -248
  92. package/streamableHttp.js.map +0 -1
  93. /package/{@tencent → libs/@tencent}/aegis-node-sdk/CHANGELOG.md +0 -0
  94. /package/{@tencent → libs/@tencent}/aegis-node-sdk/LICENSE +0 -0
  95. /package/{@tencent → libs/@tencent}/aegis-node-sdk/README.md +0 -0
  96. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/aegis.min.js +0 -0
  97. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -0
  98. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -0
  99. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -0
  100. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -0
  101. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -0
  102. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -0
  103. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -0
  104. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -0
  105. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -0
  106. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -0
  107. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -0
  108. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -0
  109. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -0
  110. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -0
  111. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -0
  112. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -0
  113. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -0
  114. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -0
  115. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -0
  116. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -0
  117. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -0
  118. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -0
  119. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -0
  120. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -0
  121. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -0
  122. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -0
  123. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -0
  124. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -0
  125. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -0
  126. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -0
  127. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
  128. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -0
  129. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -0
  130. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -0
  131. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -0
  132. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -0
  133. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -0
  134. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -0
  135. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -0
  136. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -0
  137. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -0
  138. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -0
  139. /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -0
  140. /package/{@tencent → libs/@tencent}/aegis-node-sdk/package.json +0 -0
  141. /package/{@tencent → libs/@tencent}/polaris/README.md +0 -0
  142. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.d.ts +0 -0
  143. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js +0 -0
  144. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js.map +0 -0
  145. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.d.ts +0 -0
  146. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js +0 -0
  147. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js.map +0 -0
  148. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.d.ts +0 -0
  149. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js +0 -0
  150. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js.map +0 -0
  151. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.d.ts +0 -0
  152. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js +0 -0
  153. /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js.map +0 -0
  154. /package/{@tencent → libs/@tencent}/polaris/dist/errors.d.ts +0 -0
  155. /package/{@tencent → libs/@tencent}/polaris/dist/errors.js +0 -0
  156. /package/{@tencent → libs/@tencent}/polaris/dist/errors.js.map +0 -0
  157. /package/{@tencent → libs/@tencent}/polaris/dist/global.d.ts +0 -0
  158. /package/{@tencent → libs/@tencent}/polaris/dist/global.js +0 -0
  159. /package/{@tencent → libs/@tencent}/polaris/dist/global.js.map +0 -0
  160. /package/{@tencent → libs/@tencent}/polaris/dist/index.d.ts +0 -0
  161. /package/{@tencent → libs/@tencent}/polaris/dist/index.js +0 -0
  162. /package/{@tencent → libs/@tencent}/polaris/dist/index.js.map +0 -0
  163. /package/{@tencent → libs/@tencent}/polaris/dist/instance.d.ts +0 -0
  164. /package/{@tencent → libs/@tencent}/polaris/dist/instance.js +0 -0
  165. /package/{@tencent → libs/@tencent}/polaris/dist/instance.js.map +0 -0
  166. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.d.ts +0 -0
  167. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js +0 -0
  168. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js.map +0 -0
  169. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.d.ts +0 -0
  170. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js +0 -0
  171. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js.map +0 -0
  172. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.d.ts +0 -0
  173. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js +0 -0
  174. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js.map +0 -0
  175. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.d.ts +0 -0
  176. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js +0 -0
  177. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js.map +0 -0
  178. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.d.ts +0 -0
  179. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js +0 -0
  180. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js.map +0 -0
  181. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.d.ts +0 -0
  182. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js +0 -0
  183. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js.map +0 -0
  184. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.d.ts +0 -0
  185. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js +0 -0
  186. /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js.map +0 -0
  187. /package/{@tencent → libs/@tencent}/polaris/dist/location.d.ts +0 -0
  188. /package/{@tencent → libs/@tencent}/polaris/dist/location.js +0 -0
  189. /package/{@tencent → libs/@tencent}/polaris/dist/location.js.map +0 -0
  190. /package/{@tencent → libs/@tencent}/polaris/dist/logging.d.ts +0 -0
  191. /package/{@tencent → libs/@tencent}/polaris/dist/logging.js +0 -0
  192. /package/{@tencent → libs/@tencent}/polaris/dist/logging.js.map +0 -0
  193. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.d.ts +0 -0
  194. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js +0 -0
  195. /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js.map +0 -0
  196. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.d.ts +0 -0
  197. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js +0 -0
  198. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js.map +0 -0
  199. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.d.ts +0 -0
  200. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js +0 -0
  201. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js.map +0 -0
  202. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.d.ts +0 -0
  203. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js +0 -0
  204. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js.map +0 -0
  205. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.d.ts +0 -0
  206. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js +0 -0
  207. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js.map +0 -0
  208. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.d.ts +0 -0
  209. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js +0 -0
  210. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js.map +0 -0
  211. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.d.ts +0 -0
  212. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js +0 -0
  213. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js.map +0 -0
  214. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.d.ts +0 -0
  215. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js +0 -0
  216. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js.map +0 -0
  217. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.d.ts +0 -0
  218. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js +0 -0
  219. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js.map +0 -0
  220. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.d.ts +0 -0
  221. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js +0 -0
  222. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js.map +0 -0
  223. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.d.ts +0 -0
  224. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js +0 -0
  225. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js.map +0 -0
  226. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -0
  227. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -0
  228. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -0
  229. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -0
  230. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -0
  231. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -0
  232. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -0
  233. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -0
  234. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -0
  235. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -0
  236. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -0
  237. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -0
  238. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -0
  239. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -0
  240. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -0
  241. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -0
  242. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -0
  243. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -0
  244. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -0
  245. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -0
  246. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -0
  247. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -0
  248. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -0
  249. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -0
  250. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -0
  251. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -0
  252. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -0
  253. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -0
  254. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -0
  255. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -0
  256. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -0
  257. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -0
  258. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -0
  259. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -0
  260. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -0
  261. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -0
  262. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -0
  263. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js +0 -0
  264. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -0
  265. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -0
  266. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -0
  267. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -0
  268. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -0
  269. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -0
  270. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -0
  271. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -0
  272. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -0
  273. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -0
  274. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js +0 -0
  275. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -0
  276. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -0
  277. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -0
  278. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -0
  279. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -0
  280. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js +0 -0
  281. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -0
  282. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -0
  283. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js +0 -0
  284. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -0
  285. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -0
  286. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js +0 -0
  287. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -0
  288. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.d.ts +0 -0
  289. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js +0 -0
  290. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js.map +0 -0
  291. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -0
  292. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js +0 -0
  293. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js.map +0 -0
  294. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.d.ts +0 -0
  295. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js +0 -0
  296. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js.map +0 -0
  297. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.d.ts +0 -0
  298. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js +0 -0
  299. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js.map +0 -0
  300. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.d.ts +0 -0
  301. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js +0 -0
  302. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js.map +0 -0
  303. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.d.ts +0 -0
  304. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js +0 -0
  305. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js.map +0 -0
  306. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.d.ts +0 -0
  307. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js +0 -0
  308. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js.map +0 -0
  309. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.d.ts +0 -0
  310. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js +0 -0
  311. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js.map +0 -0
  312. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.d.ts +0 -0
  313. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js +0 -0
  314. /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js.map +0 -0
  315. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.d.ts +0 -0
  316. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js +0 -0
  317. /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js.map +0 -0
  318. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.d.ts +0 -0
  319. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js +0 -0
  320. /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js.map +0 -0
  321. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.d.ts +0 -0
  322. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js +0 -0
  323. /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js.map +0 -0
  324. /package/{@tencent → libs/@tencent}/polaris/dist/registry.d.ts +0 -0
  325. /package/{@tencent → libs/@tencent}/polaris/dist/registry.js +0 -0
  326. /package/{@tencent → libs/@tencent}/polaris/dist/registry.js.map +0 -0
  327. /package/{@tencent → libs/@tencent}/polaris/dist/rules.d.ts +0 -0
  328. /package/{@tencent → libs/@tencent}/polaris/dist/rules.js +0 -0
  329. /package/{@tencent → libs/@tencent}/polaris/dist/rules.js.map +0 -0
  330. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.d.ts +0 -0
  331. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js +0 -0
  332. /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js.map +0 -0
  333. /package/{@tencent → libs/@tencent}/polaris/dist/service.d.ts +0 -0
  334. /package/{@tencent → libs/@tencent}/polaris/dist/service.js +0 -0
  335. /package/{@tencent → libs/@tencent}/polaris/dist/service.js.map +0 -0
  336. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.d.ts +0 -0
  337. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js +0 -0
  338. /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js.map +0 -0
  339. /package/{@tencent → libs/@tencent}/polaris/dist/utils.d.ts +0 -0
  340. /package/{@tencent → libs/@tencent}/polaris/dist/utils.js +0 -0
  341. /package/{@tencent → libs/@tencent}/polaris/dist/utils.js.map +0 -0
  342. /package/{@tencent → libs/@tencent}/polaris/dist/weak.d.ts +0 -0
  343. /package/{@tencent → libs/@tencent}/polaris/dist/weak.js +0 -0
  344. /package/{@tencent → libs/@tencent}/polaris/dist/weak.js.map +0 -0
  345. /package/{@tencent → libs/@tencent}/polaris/package.json +0 -0
  346. /package/resource/doc/chatuikit/{iOS → ios}/client_api_iOS.md +0 -0
  347. /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuichat_only_iOS.md +0 -0
  348. /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuikit_iOS.md +0 -0
  349. /package/resource/doc/chatuikit/{iOS → ios}/ui_api_iOS.md +0 -0
  350. /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallKit.md +0 -0
  351. /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallObserver.md +0 -0
  352. /package/resource/doc/tuicallkit/{iOS → ios}/how_to_integrated_iOS_callkit.md +0 -0
  353. /package/resource/doc/tuicallkit/{iOS → ios}/how_to_run_iOS_callkit_demo.md +0 -0
@@ -1,185 +0,0 @@
1
- ## 适用场景
2
-
3
- Web & H5 平台,独立集成私信聊天(1V1)或者群聊(Group),例如房产中介咨询、电商在线客服、保险远程定损等。
4
-
5
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/d6a3e0917e4811ef96bb5254000dcb0f.png)
6
-
7
-
8
- ## 开发环境要求
9
- - React ≥ v18.0 (17.x 版本不支持)
10
-
11
- - TypeScript
12
-
13
- - node(node.js ≥ 16.0.0)
14
-
15
- - npm(版本请与 node 版本匹配)
16
-
17
-
18
- ## chat-uikit-react 集成
19
-
20
- ### 步骤1:创建项目
21
- 1. 创建一个新的 React 项目,您可自行选择是否需要使用 ts 模板。
22
-
23
-
24
-
25
- 【shell】
26
- ``` bash
27
- npx create-react-app sample-chat --template typescript
28
- ```
29
- 2. 创建项目完成后,切换到项目所在目录。
30
-
31
-
32
-
33
- 【shell】
34
- ``` bash
35
- cd sample-chat
36
- ```
37
-
38
- ### 步骤2:下载 chat-uikit-react 组件
39
-
40
- 通过 npm 方式下载 [chat-uikit-react](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react) 并在项目中使用。
41
-
42
-
43
- 【shell】
44
- ``` bash
45
- npm i @tencentcloud/chat-uikit-react @tencentcloud/uikit-base-component-react
46
- ```
47
-
48
- ### 步骤3:引入 chat-uikit-react 组件,创建并打开会话进行聊天
49
-
50
- > **注意:**
51
- >
52
-
53
- > 以下代码中未填入 `SDKAppID`、`userID` 和 `userSig`,需在 [步骤4](https://write.woa.com/#step4) 中获取相关信息后进行替换。
54
- >
55
-
56
-
57
- > **说明:**
58
- >
59
- > - 关于群聊:
60
- > - 可以通过调用 API [createC2CConversation](https://write.woa.com/document/157860942511771648) 来创建单聊。
61
- > - 可以通过调用 API [createGroupConversation](https://write.woa.com/document/157860942511771648) 来创建群聊。
62
- > - 进入聊天的方式:
63
- > - 通过调用 API [setActiveConversation](https://write.woa.com/document/157860942511771648),传入 conversationID 进入聊天页面。
64
-
65
-
66
- 替换 App.tsx 中的内容,或者您可以新建一个组件引入。
67
- ``` javascript
68
- import React from 'react';
69
- import {
70
- Chat,
71
- ChatHeader,
72
- MessageList,
73
- MessageInput,
74
- ChatSetting,
75
- Search,
76
- VariantType,
77
- useUIOpenControlState,
78
- useLoginState,
79
- useConversationListState,
80
- } from '@tencentcloud/chat-uikit-react';
81
- import { UIKitProvider } from '@tencentcloud/uikit-base-component-react';
82
-
83
- const config = {
84
- SDKAppID: 0, // 您的 SDKAppID, 参考步骤4
85
- userID: 'test-user1', // 您登录的 UserID, 参考步骤4
86
- userSig: '', // 您的 userSig, 参考步骤4
87
- }
88
-
89
- export default function App() {
90
- // 语言支持 en-US(default) / zh-CN / ja-JP / ko-KR / zh-TW
91
- // 主题支持 light(default) / dark
92
- const { isChatSettingOpen, isChatSearchOpen } = useUIOpenControlState();
93
- const { setActiveConversation, createC2CConversation } = useConversationListState();
94
- const { login } = useLoginState();
95
- login(config).then(() => {
96
- const userID = 'test-user2'; // userID: 消息接收方的 userID
97
- createC2CConversation(userID).then((conversation) => {
98
- setActiveConversation(conversation.conversationID);
99
- })
100
- }).catch(() => {});
101
- return (
102
- <div style={{display: 'flex', height: '100vh'}}>
103
- <UIKitProvider language='en-US' theme='light'>
104
- <Chat>
105
- <ChatHeader />
106
- <MessageList />
107
- <MessageInput />
108
- </Chat>
109
- {isChatSettingOpen && <ChatSetting />}
110
- {isChatSearchOpen && <Search style={{ minWidth: '300px'}} variant={VariantType.EMBEDDED} />}
111
- </UIKitProvider>
112
- </div>
113
- );
114
- }
115
- ```
116
-
117
- ### 步骤4:获取 SDKAppID、userID 和 userSig
118
- - SDKAppID:SDKAppID 是腾讯云 IM 服务区分客户账号的唯一标识。我们建议每一个独立的 App 都申请一个新的 SDKAppID。不同 SDKAppID 之间的消息是天然隔离的,不能互通。
119
-
120
-
121
- 您可以在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 查看所有的 SDKAppID,单击**创建新应用**,可以创建新的 SDKAppID。
122
-
123
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/bd48a26f1c9a11efb275525400720cb5.png)
124
-
125
- - userID:可通过单击 [即时通信 IM 控制台 > 账号管理](https://console.cloud.tencent.com/im/account-management),切换至目标应用所在账号,即可创建账号并获取 userID。**您可以创建两个或多个 userID 便于体验聊天。**
126
-
127
-
128
- **例如:创建 test-user1、test-user2 两个账号**
129
-
130
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/bd56161b1c9a11efb7495254005ac0ca.png)
131
-
132
- - userSig:可单击 [即时通信 IM 控制台 > 开发工具 > UserSig生成&校验](https://console.cloud.tencent.com/im/tool-usersig),填写创建的 UserID,即可生成 UserSig。
133
-
134
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/bd2617a61c9a11ef949d52540019e87e.png)
135
-
136
-
137
- ### 步骤5:启动项目
138
-
139
-
140
- 【shell】
141
- ``` bash
142
- npm run start
143
- ```
144
-
145
- > **注意:**
146
- >
147
- > 1. 请确保 [步骤3](https://write.woa.com/#step3) 代码中 SDKAppID、userID 和 userSig 均已成功替换,如未替换将会导致项目表现异常。
148
- > 2. userID 和 userSig 为一一对应关系,具体参见 [生成 UserSig](https://console.cloud.tencent.com/im/tool-usersig)。
149
- > 3. 如遇到项目启动失败,请检查 开发环境要求 是否满足。
150
-
151
-
152
- ### 步骤6:发送您的第一条消息
153
-
154
- 在输入框输入消息,按下 **enter **键发送。
155
-
156
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/511f1c4d7e4811efb9d8525400f69702.png)
157
-
158
-
159
- ## 常见问题
160
-
161
- #### 什么是 UserSig?
162
-
163
- UserSig 是用户登录即时通信 IM 的密码,其本质是对 UserID 等信息加密后得到的密文。
164
-
165
- #### 如何生成 UserSig?
166
-
167
- UserSig 签发方式是将 UserSig 的计算代码集成到您的服务端,并提供面向项目的接口,在需要 UserSig 时由您的项目向业务服务器发起请求获取动态 UserSig。更多详情请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。
168
-
169
- > **注意:**
170
- >
171
-
172
- > 本文示例代码采用的获取 UserSig 的方案是在客户端代码中配置 SECRETKEY,该方法中 SECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通功能调试**。 正确的 UserSig 签发方式请参见上文。
173
- >
174
-
175
-
176
- #### 是否支持 react 17.x 版本?
177
-
178
- 目前不支持 17.x 版本,仅支持 React ≥ v18.0。
179
-
180
- ## 参考文档
181
- - [chat-uikit-react npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react)
182
-
183
- - [Demo源码及跑通示例](https://github.com/TencentCloud/chat-uikit-react)
184
-
185
-
@@ -1,212 +0,0 @@
1
- ## chat-uikit-react 介绍
2
-
3
- chat-uikit-react 是基于腾讯云 Chat SDK 的一款 react UI 组件库,它提供了一些通用的 UI 组件,包含会话、聊天、群组等功能。基于这些精心设计的 UI 组件,您可以快速构建优雅的、可靠的、可扩展的 Chat 应用。 chat-uikit-react 界面效果如下图所示:
4
-
5
- 您可以在线体验:
6
- - [Web Demo](https://web.sdk.qcloud.com/im/demo/react/index.html?scene=social)
7
-
8
- - [H5 Demo](https://trtc.io/demo/homepage/#/detail?scene=messenger)
9
-
10
-
11
- **TUIKit Web 端**界面效果如下图所示:
12
-
13
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/73e9ee987e4611efa9f2525400044e04.png)
14
-
15
-
16
- **TUIKit H5 端**界面效果如下图所示:
17
-
18
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/847619c67e4611ef80ff525400d5f8ef.png)
19
-
20
-
21
- ## 开发环境要求
22
- - React v18
23
-
24
- - TypeScript
25
-
26
- - Node.js ≥ v18
27
-
28
- - npm(版本请与 node 版本匹配)
29
-
30
-
31
- ## chat-uikit-react 集成
32
-
33
- ### 步骤1:创建项目
34
-
35
- 创建一个新的名为 **chat-app** 的 React 项目(创建项目时选择 React 18,并且建议使用 TypeScript 模板),并按照提示跑通脚手架初始项目。
36
-
37
-
38
- 【shell】
39
- ``` bash
40
- npm create rsbuild@latest
41
- ```
42
-
43
- ### 步骤2:下载 chat-uikit-react 组件
44
-
45
- 通过 npm 方式下载 [chat-uikit-react](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react) 并在项目中使用。
46
-
47
-
48
- 【shell】
49
- ``` bash
50
- npm i @tencentcloud/chat-uikit-react
51
- ```
52
-
53
- ### 步骤3:引入 chat-uikit-react 组件
54
-
55
- > **注意:**
56
- >
57
- > - 以下代码中未填入 `SDKAppID`、`userID` 和 `userSig`,需在 [步骤4](https://write.woa.com/#step4) 中获取相关信息后进行替换。
58
- > - 为了尊重表情符号设计的版权,Demo/UIKit 项目不包括大型表情元素的剪切图。请在正式商业发布之前,用您自己设计或拥有版权的表情包替换它们。默认的小黄脸表情包由腾讯云拥有版权,并可以收费授权。如果您希望获得授权,请提交工单与我们联系。
59
-
60
-
61
- 替换 App.tsx 中的内容,或者您可以新建一个组件引入。
62
- ``` typescript
63
- import {
64
- UIKitProvider,
65
- useLoginState,
66
- LoginStatus,
67
- ConversationList,
68
- Chat,
69
- ChatHeader,
70
- MessageList,
71
- MessageInput,
72
- useUIOpenControlState,
73
- ChatSetting,
74
- Search,
75
- VariantType,
76
- ContactList,
77
- ContactInfo,
78
- } from "@tencentcloud/chat-uikit-react";
79
- import { useState } from "react";
80
-
81
- function App() {
82
- const { isChatSettingOpen, isChatSearchOpen } = useUIOpenControlState();
83
- const [activeTab, setActiveTab] = useState('chats');
84
-
85
- const { status } = useLoginState({
86
- SDKAppID: 0, // 参考步骤 4
87
- userID: '', // 参考步骤 4
88
- userSig: '', // 参考步骤 4
89
- })
90
-
91
- if (status !== LoginStatus.SUCCESS) {
92
- return <div>Loading...</div>
93
- }
94
-
95
- // 语言支持 en-US(default) / zh-CN / ja-JP / ko-KR / zh-TW
96
- // 主题支持 light(default) / dark
97
- return (
98
- <UIKitProvider>
99
- <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
100
- <ul>
101
- <li onClick={() => {setActiveTab('chats')}}>chats</li>
102
- <li onClick={() => {setActiveTab('contacts')}}>contact</li>
103
- </ul>
104
- {
105
- activeTab === 'chats' && (
106
- <>
107
- <ConversationList style={{ minWidth: '300px', maxWidth: '350px' }}/>
108
- <Chat PlaceholderEmpty="No messages yet">
109
- <ChatHeader />
110
- <MessageList />
111
- <MessageInput />
112
- </Chat>
113
- {isChatSettingOpen && <ChatSetting />}
114
- {isChatSearchOpen && <Search style={{ minWidth: '300px'}} variant={VariantType.EMBEDDED} />}
115
- </>
116
- )
117
- }
118
- {
119
- activeTab === 'contacts' && (
120
- <>
121
- <ContactList style={{ minWidth: '300px', maxWidth: '350px' }}/>
122
- <ContactInfo
123
- PlaceholderEmpty="No contact yet"
124
- onSendMessage={() => {setActiveTab('chats')}}
125
- onEnterGroup={() => {setActiveTab('chats')}}
126
- />
127
- </>
128
- )
129
- }
130
- </div>
131
- </UIKitProvider>
132
- );
133
- }
134
-
135
- export default App;
136
- ```
137
-
138
- ### 步骤4:获取 SDKAppID、userID 和 userSig
139
- - SDKAppID:SDKAppID 是腾讯云 IM 服务区分客户账号的唯一标识。我们建议每一个独立的 App 都申请一个新的 SDKAppID。不同 SDKAppID 之间的消息是天然隔离的,不能互通。
140
-
141
-
142
- 您可以在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 查看所有的 SDKAppID,单击**创建新应用**,可以创建新的 SDKAppID。
143
-
144
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/ce047e42ce0d11eeb6e6525400170219.png)
145
-
146
- - userID:可通过单击 [ 即时通信 IM 控制台 -【账号管理】](https://console.cloud.tencent.com/im/account-management),切换至目标应用所在账号,即可创建账号并获取 userID。
147
-
148
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/f1d10c67175311efa66f525400f65c2a.png)
149
-
150
- - userSig:可单击 [ 即时通信 IM 控制台 > 开发工具 > UserSig生成&校验](https://console.cloud.tencent.com/im/tool-usersig),填写创建的 userID,即可生成 userSig。
151
-
152
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/47b38334175311ef9c015254002977b6.png)
153
-
154
-
155
- ### 步骤5:启动项目
156
-
157
-
158
- 【shell】
159
- ``` bash
160
- npm run dev
161
- ```
162
-
163
- > **注意:**
164
- >
165
- > 1. 请确保 [步骤3](https://write.woa.com/#step3) 代码中 SDKAppID、userID 和 userSig 均已成功替换,如未替换将会导致项目表现异常。
166
- > 2. userID 和 userSig 为一一对应关系,具体参见 [生成 UserSig(用户鉴权)](https://write.woa.com/document/107052240244191232)。
167
- > 3. 如遇到项目启动失败,请检查 开发环境要求 是否满足。
168
-
169
-
170
- ### 步骤6:发送您的第一条消息
171
- 1. 项目启动成功后,单击 **+ **图标,创建会话。
172
-
173
- 2. 在输入框中搜索另一个用户的 userID(参考:[步骤4 -> 创建账号并获取 userID](https://write.woa.com/#step4))。
174
-
175
- 3. 单击用户头像发起会话。
176
-
177
- 4. 在输入框输入消息,按下 **Enter **键发送。
178
-
179
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100025598411/6bd24a6ecd3d11ed9d66525400c56988.gif)
180
-
181
-
182
- ## 常见问题
183
-
184
- #### 什么是 UserSig?
185
-
186
- UserSig 是用户登录即时通信 IM 的密码,其本质是对 UserID 等信息加密后得到的密文。
187
-
188
- #### 如何生成 UserSig?
189
-
190
- UserSig 签发方式是将 UserSig 的计算代码集成到您的服务端,并提供面向项目的接口,在需要 UserSig 时由您的项目向业务服务器发起请求获取动态 UserSig。更多详情请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。
191
-
192
- > **注意:**
193
- >
194
-
195
- > 本文示例代码采用的获取 UserSig 的方案是在客户端代码中配置 SECRETKEY,该方法中 SECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通功能调试**。 正确的 UserSig 签发方式请参见上文。
196
- >
197
-
198
-
199
- #### 是否支持 react 17.x 版本?
200
-
201
- 目前不支持 17.x 版本,仅支持 React v18。
202
-
203
- ## 相关文档
204
-
205
- ## 参考文档
206
-
207
- #### UIKit 相关:
208
- - [chat-uikit-react npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react)
209
-
210
- - [Demo 跑通示例](https://github.com/TencentCloud/chat-uikit-react)
211
-
212
-
@@ -1,149 +0,0 @@
1
- ## 适用场景
2
-
3
- Web & H5 平台,独立集成私信聊天(1V1)或者群聊(Group),例如房产中介咨询、电商在线客服、保险远程定损等。
4
-
5
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/003531a5822811f0b3fe525400bf7822.png)
6
-
7
-
8
- ## 开发环境要求
9
- - vue3
10
-
11
- - TypeScript
12
-
13
- - node(node.js ≥ 16.0.0)
14
-
15
- - npm(版本请与 node 版本匹配)
16
-
17
-
18
- ## 集成指引
19
-
20
- ### 步骤1:创建项目
21
- 1. 创建一个新的名称为 **chat-example** 的 Vue3 项目,您可自行选择是否需要使用 ts 模板。
22
-
23
-
24
-
25
- 【shell】
26
- ``` bash
27
- npm create vite@latest
28
- ```
29
- 2. 创建项目完成后,切换到项目所在目录。
30
-
31
-
32
-
33
- 【shell】
34
- ``` bash
35
- cd chat-example
36
- npm install
37
- ```
38
-
39
- ### 步骤2:下载 chat-uikit-vue3 组件
40
-
41
-
42
- 【shell】
43
- ``` bash
44
- npm i @tencentcloud/chat-uikit-vue3
45
- ```
46
-
47
- ### 步骤3:仅引入 Chat 相关组件
48
-
49
- ##### 在 App.vue 页面中实现以下代码,即可快速搭建聊天界面并开启指定会话:
50
-
51
- > **说明:**
52
- >
53
-
54
- > conversationID:会话 ID。会话ID组成方式如下:
55
- >
56
- > - C2C${userID}(单聊),例如 `C2C123456`
57
- > - GROUP${groupID}(群聊),例如 `GROUP123456`
58
-
59
- ``` javascript
60
- <template>
61
- <div class="app">
62
- <UIKitProvider>
63
- <Chat style="flex: 1;">
64
- <ChatHeader />
65
- <MessageList />
66
- <MessageInput />
67
- </Chat>
68
- </UIKitProvider>
69
- </div>
70
- </template>
71
- <script lang="ts" setup>
72
- import {
73
- Chat,
74
- MessageList,
75
- MessageInput,
76
- ChatHeader,
77
- UIKitProvider,
78
- useLoginState,
79
- useConversationListState,
80
- } from '@tencentcloud/chat-uikit-vue3';
81
- const config = {
82
- sdkAppId : 0, // SDKAppID, 可以参考步骤 4 获取
83
- userId: 'xxx', // UserID, 可以参考步骤 4 获取
84
- userSig: 'xxx', // userSig, 可以参考步骤 4 获取
85
- }
86
-
87
- const { login } = useLoginState();
88
- const { setActiveConversation } = useConversationListState();
89
- const conversationID="YOUR_CONVERSATIONID"; // 参考说明设置您需要的会话 ID。
90
-
91
- login({
92
- ...config,
93
- useUploadPlugin: true
94
- })
95
- .then(() => {
96
- setActiveConversation(conversationID)
97
- })
98
- .catch(() => {});
99
- </script>
100
- <style lang="scss">
101
- .app {
102
- width: 100vw;
103
- height: 100vh;
104
- display: flex;
105
- }
106
- </style>
107
- ```
108
-
109
- ### 步骤4:获取 SDKAppID、userID 和 userSig
110
- - SDKAppID:SDKAppID 是腾讯云 IM 服务区分客户账号的唯一标识。我们建议每一个独立的 App 都申请一个新的 SDKAppID。不同 SDKAppID 之间的消息是天然隔离的,不能互通。
111
-
112
-
113
- 您可以在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 查看所有的 SDKAppID,单击**创建新应用**,可以创建新的 SDKAppID。
114
-
115
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/a8b350bd822a11f08aa952540099c741.png)
116
-
117
- - userID:可通过单击 [ 即时通信 IM 控制台 -【账号管理】](https://console.cloud.tencent.com/im/account-management),切换至目标应用所在账号,即可创建账号并获取 userID。
118
-
119
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/a8c18ed1822a11f0b3fe525400bf7822.png)
120
-
121
- - userSig:可单击 [ 即时通信 IM 控制台 > 开发工具 > UserSig生成&校验](https://console.cloud.tencent.com/im/tool-usersig),填写创建的 userID,即可生成 userSig。
122
-
123
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/a8bd7f1e822a11f0b1df52540044a08e.png)
124
-
125
-
126
- ### 步骤5:启动项目
127
-
128
-
129
- 【shell】
130
- ``` bash
131
- npm run dev
132
- ```
133
-
134
- > **注意:**
135
- >
136
- > 1. 请确保 [步骤3](https://write.woa.com/#step3) 代码中 SDKAppID、userID 和 userSig 均已成功替换,如未替换将会导致项目表现异常。
137
- > 2. userID 和 userSig 为一一对应关系,具体参见 生成 UserSig。
138
- > 3. 如遇到项目启动失败,请检查 开发环境要求 是否满足。
139
-
140
-
141
- ## 相关文档
142
- - [chat-uikit-vue3 npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-vue3)
143
-
144
- - [github Demo](https://github.com/Tencent-RTC/TUIKit_Vue3/tree/main/demos/rtcube-vite-vue3)
145
-
146
-
147
- ## 交流与反馈
148
-
149
- 如遇任何问题,可联系 [官网售后](https://cloud.tencent.com/act/event/connect-service#/) 反馈,享有专业工程师的支持,解决您的难题。