@tencent-rtc/mcp 1.0.9 → 1.1.6

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 (351) hide show
  1. package/README.md +5 -1
  2. package/index.js +2 -0
  3. package/index.js.map +1 -1
  4. package/libs/TLSSigAPIv2.d.ts +134 -0
  5. package/libs/TLSSigAPIv2.js +243 -0
  6. package/package.json +1 -1
  7. package/resource/doc/chatuikit/react/chat_window_integration.md +92 -0
  8. package/resource/doc/chatuikit/react/integration.md +14 -10
  9. package/resource/doc/chatuikit/vue/chat_window_integration.md +155 -0
  10. package/resource/doc/chatuikit/vue/components/chat.md +8 -0
  11. package/resource/doc/chatuikit/vue/components/chatheader.md +1 -1
  12. package/resource/doc/chatuikit/vue/components/conversation-list.md +5 -0
  13. package/resource/doc/chatuikit/vue/components/message-input.md +4 -1
  14. package/resource/doc/chatuikit/vue/init.md +40 -0
  15. package/resource/doc/chatuikit/vue/integration.md +34 -74
  16. package/resource/doc/livekit/vue/components/barrage.md +616 -0
  17. package/resource/doc/livekit/vue/components/broadcast.md +595 -0
  18. package/resource/doc/livekit/vue/components/co-guest-panel.md +130 -0
  19. package/resource/doc/livekit/vue/components/live-audience-list.md +282 -0
  20. package/resource/doc/livekit/vue/components/live-list.md +200 -0
  21. package/resource/doc/livekit/vue/components/live-player.md +269 -0
  22. package/resource/doc/livekit/vue/components/live-scene-panel.md +175 -0
  23. package/resource/doc/livekit/vue/components/live-view.md +398 -0
  24. package/resource/doc/livekit/vue/components/stream-mixer.md +446 -0
  25. package/resource/doc/livekit/vue/states/live-state.md +3591 -0
  26. package/resource/doc/roomkit/vue/states/device-state.md +369 -0
  27. package/resource/doc/roomkit/vue/states/login-state.md +59 -0
  28. package/resource/doc/roomkit/vue/states/room-list-state.md +355 -0
  29. package/resource/doc/roomkit/vue/states/room-participant-state.md +388 -0
  30. package/server-config.js +35 -0
  31. package/server-config.js.map +1 -0
  32. package/tools/chat/get-chat-faq.js +3 -3
  33. package/tools/chat/get-chat-faq.js.map +1 -1
  34. package/tools/chat/get-native-chat-integration.js +4 -4
  35. package/tools/chat/get-web-chat-component-detail.js +4 -3
  36. package/tools/chat/get-web-chat-component-detail.js.map +1 -1
  37. package/tools/chat/get-web-chat-integration.js +9 -9
  38. package/tools/chat/get-web-chat-integration.js.map +1 -1
  39. package/tools/chat/{get-web-chat-uikit-login.js → get-web-chat-uikit-init.js} +7 -7
  40. package/tools/chat/get-web-chat-uikit-init.js.map +1 -0
  41. package/tools/chat/get-web-chat-window-integration.js +37 -0
  42. package/tools/chat/get-web-chat-window-integration.js.map +1 -0
  43. package/tools/common/get-usersig.js +31 -26
  44. package/tools/common/get-usersig.js.map +1 -1
  45. package/tools/common/present-framework-choice.js +1 -1
  46. package/tools/common/record-prompt.js +5 -5
  47. package/tools/common/record-result.js +8 -7
  48. package/tools/common/record-result.js.map +1 -1
  49. package/tools/index.js +24 -9
  50. package/tools/index.js.map +1 -1
  51. package/tools/live/get-web-live-component-detail.js +34 -0
  52. package/tools/live/get-web-live-component-detail.js.map +1 -0
  53. package/tools/live/get-web-live-state-detail.js +34 -0
  54. package/tools/live/get-web-live-state-detail.js.map +1 -0
  55. package/tools/room/get-web-room-state-detail.js +34 -0
  56. package/tools/room/get-web-room-state-detail.js.map +1 -0
  57. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js +35 -0
  58. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js.map +1 -0
  59. package/tools/rtcengine/{get-rtcenigne-faq.js → get-trtc-web-sdk-faq.js} +5 -5
  60. package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +1 -0
  61. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js +36 -0
  62. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js.map +1 -0
  63. package/utils/generate-usersig.js +7 -9
  64. package/utils/generate-usersig.js.map +1 -1
  65. package/utils/handle-component-name.js +53 -8
  66. package/utils/handle-component-name.js.map +1 -1
  67. package/utils/handle-state-name.js +29 -0
  68. package/utils/handle-state-name.js.map +1 -0
  69. package/@tencent/aegis-node-sdk/CHANGELOG.md +0 -8
  70. package/@tencent/aegis-node-sdk/LICENSE +0 -21
  71. package/@tencent/aegis-node-sdk/README.md +0 -562
  72. package/@tencent/aegis-node-sdk/lib/aegis.min.js +0 -1
  73. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -14
  74. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -1
  75. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -9
  76. package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -2
  77. package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -85
  78. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -3
  79. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -9
  80. package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -3
  81. package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -9
  82. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -62
  83. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -11
  84. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -4
  85. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -130
  86. package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -34
  87. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -2
  88. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -18
  89. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -8
  90. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -8
  91. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -2
  92. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -4
  93. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -10
  94. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -3
  95. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -3
  96. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -34
  97. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -12
  98. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -14
  99. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -2
  100. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -12
  101. package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -3
  102. package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -33
  103. package/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
  104. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -2
  105. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -18
  106. package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -60
  107. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -15
  108. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -5
  109. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -6
  110. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -18
  111. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -12
  112. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -10
  113. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -20
  114. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -27
  115. package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -2
  116. package/@tencent/aegis-node-sdk/package.json +0 -19
  117. package/@tencent/polaris/README.md +0 -407
  118. package/@tencent/polaris/dist/consumer/health.d.ts +0 -126
  119. package/@tencent/polaris/dist/consumer/health.js +0 -283
  120. package/@tencent/polaris/dist/consumer/health.js.map +0 -1
  121. package/@tencent/polaris/dist/consumer/index.d.ts +0 -120
  122. package/@tencent/polaris/dist/consumer/index.js +0 -348
  123. package/@tencent/polaris/dist/consumer/index.js.map +0 -1
  124. package/@tencent/polaris/dist/consumer/monitor.d.ts +0 -145
  125. package/@tencent/polaris/dist/consumer/monitor.js +0 -343
  126. package/@tencent/polaris/dist/consumer/monitor.js.map +0 -1
  127. package/@tencent/polaris/dist/consumer/selector.d.ts +0 -73
  128. package/@tencent/polaris/dist/consumer/selector.js +0 -316
  129. package/@tencent/polaris/dist/consumer/selector.js.map +0 -1
  130. package/@tencent/polaris/dist/errors.d.ts +0 -373
  131. package/@tencent/polaris/dist/errors.js +0 -154
  132. package/@tencent/polaris/dist/errors.js.map +0 -1
  133. package/@tencent/polaris/dist/global.d.ts +0 -16
  134. package/@tencent/polaris/dist/global.js +0 -18
  135. package/@tencent/polaris/dist/global.js.map +0 -1
  136. package/@tencent/polaris/dist/index.d.ts +0 -62
  137. package/@tencent/polaris/dist/index.js +0 -145
  138. package/@tencent/polaris/dist/index.js.map +0 -1
  139. package/@tencent/polaris/dist/instance.d.ts +0 -109
  140. package/@tencent/polaris/dist/instance.js +0 -38
  141. package/@tencent/polaris/dist/instance.js.map +0 -1
  142. package/@tencent/polaris/dist/limiter/bucket.d.ts +0 -51
  143. package/@tencent/polaris/dist/limiter/bucket.js +0 -152
  144. package/@tencent/polaris/dist/limiter/bucket.js.map +0 -1
  145. package/@tencent/polaris/dist/limiter/index.d.ts +0 -73
  146. package/@tencent/polaris/dist/limiter/index.js +0 -149
  147. package/@tencent/polaris/dist/limiter/index.js.map +0 -1
  148. package/@tencent/polaris/dist/limiter/ratelimit.d.ts +0 -27
  149. package/@tencent/polaris/dist/limiter/ratelimit.js +0 -134
  150. package/@tencent/polaris/dist/limiter/ratelimit.js.map +0 -1
  151. package/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +0 -17
  152. package/@tencent/polaris/dist/limiter/ratelimiter/base.js +0 -15
  153. package/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +0 -1
  154. package/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +0 -59
  155. package/@tencent/polaris/dist/limiter/ratelimiter/global.js +0 -397
  156. package/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +0 -1
  157. package/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +0 -3
  158. package/@tencent/polaris/dist/limiter/ratelimiter/index.js +0 -19
  159. package/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +0 -1
  160. package/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +0 -17
  161. package/@tencent/polaris/dist/limiter/ratelimiter/local.js +0 -52
  162. package/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +0 -1
  163. package/@tencent/polaris/dist/location.d.ts +0 -48
  164. package/@tencent/polaris/dist/location.js +0 -67
  165. package/@tencent/polaris/dist/location.js.map +0 -1
  166. package/@tencent/polaris/dist/logging.d.ts +0 -106
  167. package/@tencent/polaris/dist/logging.js +0 -130
  168. package/@tencent/polaris/dist/logging.js.map +0 -1
  169. package/@tencent/polaris/dist/metadata.d.ts +0 -78
  170. package/@tencent/polaris/dist/metadata.js +0 -119
  171. package/@tencent/polaris/dist/metadata.js.map +0 -1
  172. package/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +0 -47
  173. package/@tencent/polaris/dist/plugins/breaker/polaris.js +0 -162
  174. package/@tencent/polaris/dist/plugins/breaker/polaris.js.map +0 -1
  175. package/@tencent/polaris/dist/plugins/lb/base.d.ts +0 -24
  176. package/@tencent/polaris/dist/plugins/lb/base.js +0 -32
  177. package/@tencent/polaris/dist/plugins/lb/base.js.map +0 -1
  178. package/@tencent/polaris/dist/plugins/lb/edf.d.ts +0 -24
  179. package/@tencent/polaris/dist/plugins/lb/edf.js +0 -77
  180. package/@tencent/polaris/dist/plugins/lb/edf.js.map +0 -1
  181. package/@tencent/polaris/dist/plugins/lb/hashring.d.ts +0 -24
  182. package/@tencent/polaris/dist/plugins/lb/hashring.js +0 -53
  183. package/@tencent/polaris/dist/plugins/lb/hashring.js.map +0 -1
  184. package/@tencent/polaris/dist/plugins/lb/sticky.d.ts +0 -31
  185. package/@tencent/polaris/dist/plugins/lb/sticky.js +0 -88
  186. package/@tencent/polaris/dist/plugins/lb/sticky.js.map +0 -1
  187. package/@tencent/polaris/dist/plugins/lb/swrr.d.ts +0 -25
  188. package/@tencent/polaris/dist/plugins/lb/swrr.js +0 -72
  189. package/@tencent/polaris/dist/plugins/lb/swrr.js.map +0 -1
  190. package/@tencent/polaris/dist/plugins/lb/wr.d.ts +0 -17
  191. package/@tencent/polaris/dist/plugins/lb/wr.js +0 -50
  192. package/@tencent/polaris/dist/plugins/lb/wr.js.map +0 -1
  193. package/@tencent/polaris/dist/plugins/lb/wrr.d.ts +0 -19
  194. package/@tencent/polaris/dist/plugins/lb/wrr.js +0 -81
  195. package/@tencent/polaris/dist/plugins/lb/wrr.js.map +0 -1
  196. package/@tencent/polaris/dist/plugins/logging/console.d.ts +0 -10
  197. package/@tencent/polaris/dist/plugins/logging/console.js +0 -38
  198. package/@tencent/polaris/dist/plugins/logging/console.js.map +0 -1
  199. package/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +0 -32
  200. package/@tencent/polaris/dist/plugins/naming/local-server/index.js +0 -88
  201. package/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +0 -1
  202. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -124
  203. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -398
  204. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -1
  205. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -27
  206. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -287
  207. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -1
  208. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -15
  209. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -43
  210. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -1
  211. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -28
  212. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -249
  213. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -1
  214. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -19
  215. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -222
  216. package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -1
  217. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -26
  218. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -99
  219. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -1
  220. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -60
  221. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -259
  222. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -1
  223. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -24
  224. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -18
  225. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -12
  226. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -39
  227. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -115
  228. package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -1
  229. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -24
  230. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -22
  231. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -28
  232. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -80
  233. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -18
  234. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -65
  235. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -66
  236. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -95
  237. package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -1568
  238. package/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -36
  239. package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +0 -51
  240. package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -1
  241. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -18
  242. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -67
  243. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -82
  244. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -11
  245. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -46
  246. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -16
  247. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -10
  248. package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -1102
  249. package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -29
  250. package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +0 -77
  251. package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -1
  252. package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -12
  253. package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -28
  254. package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -395
  255. package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -13
  256. package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +0 -116
  257. package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -1
  258. package/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -67
  259. package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +0 -67
  260. package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -1
  261. package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -99
  262. package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +0 -217
  263. package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -1
  264. package/@tencent/polaris/dist/plugins/registry/memory.d.ts +0 -10
  265. package/@tencent/polaris/dist/plugins/registry/memory.js +0 -50
  266. package/@tencent/polaris/dist/plugins/registry/memory.js.map +0 -1
  267. package/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -51
  268. package/@tencent/polaris/dist/plugins/router/polaris/nearby.js +0 -145
  269. package/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +0 -1
  270. package/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +0 -11
  271. package/@tencent/polaris/dist/plugins/router/polaris/rule.js +0 -174
  272. package/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +0 -1
  273. package/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +0 -25
  274. package/@tencent/polaris/dist/plugins/router/trpc/canary.js +0 -36
  275. package/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +0 -1
  276. package/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +0 -10
  277. package/@tencent/polaris/dist/plugins/router/trpc/env.js +0 -34
  278. package/@tencent/polaris/dist/plugins/router/trpc/env.js.map +0 -1
  279. package/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +0 -56
  280. package/@tencent/polaris/dist/plugins/router/trpc/set.js +0 -106
  281. package/@tencent/polaris/dist/plugins/router/trpc/set.js.map +0 -1
  282. package/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +0 -31
  283. package/@tencent/polaris/dist/plugins/shaping/unirate.js +0 -124
  284. package/@tencent/polaris/dist/plugins/shaping/unirate.js.map +0 -1
  285. package/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +0 -61
  286. package/@tencent/polaris/dist/plugins/shaping/warmup.js +0 -171
  287. package/@tencent/polaris/dist/plugins/shaping/warmup.js.map +0 -1
  288. package/@tencent/polaris/dist/plugins/weight/polaris.d.ts +0 -23
  289. package/@tencent/polaris/dist/plugins/weight/polaris.js +0 -159
  290. package/@tencent/polaris/dist/plugins/weight/polaris.js.map +0 -1
  291. package/@tencent/polaris/dist/plugins.d.ts +0 -619
  292. package/@tencent/polaris/dist/plugins.js +0 -91
  293. package/@tencent/polaris/dist/plugins.js.map +0 -1
  294. package/@tencent/polaris/dist/polaris.d.ts +0 -33
  295. package/@tencent/polaris/dist/polaris.js +0 -59
  296. package/@tencent/polaris/dist/polaris.js.map +0 -1
  297. package/@tencent/polaris/dist/provider/index.d.ts +0 -102
  298. package/@tencent/polaris/dist/provider/index.js +0 -168
  299. package/@tencent/polaris/dist/provider/index.js.map +0 -1
  300. package/@tencent/polaris/dist/registry.d.ts +0 -174
  301. package/@tencent/polaris/dist/registry.js +0 -660
  302. package/@tencent/polaris/dist/registry.js.map +0 -1
  303. package/@tencent/polaris/dist/rules.d.ts +0 -163
  304. package/@tencent/polaris/dist/rules.js +0 -24
  305. package/@tencent/polaris/dist/rules.js.map +0 -1
  306. package/@tencent/polaris/dist/scripts/postinstall.d.ts +0 -1
  307. package/@tencent/polaris/dist/scripts/postinstall.js +0 -71
  308. package/@tencent/polaris/dist/scripts/postinstall.js.map +0 -1
  309. package/@tencent/polaris/dist/service.d.ts +0 -18
  310. package/@tencent/polaris/dist/service.js +0 -3
  311. package/@tencent/polaris/dist/service.js.map +0 -1
  312. package/@tencent/polaris/dist/skeleton.d.ts +0 -87
  313. package/@tencent/polaris/dist/skeleton.js +0 -282
  314. package/@tencent/polaris/dist/skeleton.js.map +0 -1
  315. package/@tencent/polaris/dist/utils.d.ts +0 -36
  316. package/@tencent/polaris/dist/utils.js +0 -74
  317. package/@tencent/polaris/dist/utils.js.map +0 -1
  318. package/@tencent/polaris/dist/weak.d.ts +0 -11
  319. package/@tencent/polaris/dist/weak.js +0 -44
  320. package/@tencent/polaris/dist/weak.js.map +0 -1
  321. package/@tencent/polaris/package.json +0 -114
  322. package/libs/lib-generate-test-usersig-es.min.d.ts +0 -6
  323. package/libs/lib-generate-test-usersig-es.min.js +0 -2
  324. package/resource/doc/chatuikit/react/generate_UserSig.md +0 -306
  325. package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -202
  326. package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -279
  327. package/resource/doc/chatuikit/vue/generate_UserSig.md +0 -306
  328. package/resource/doc/chatuikit/vue/integrate_only_tuichat_Vue_web.md +0 -124
  329. package/resource/doc/chatuikit/vue/integrate_tuikit_Vue_web.md +0 -552
  330. package/resource/doc/chatuikit/vue/login.md +0 -31
  331. package/resource/doc/chatuikit/vue3/components/MessageInput.md +0 -1272
  332. package/resource/doc/chatuikit/vue3/components/avatar.md +0 -137
  333. package/resource/doc/chatuikit/vue3/components/chatheader.md +0 -189
  334. package/resource/doc/chatuikit/vue3/components/component-list.md +0 -102
  335. package/resource/doc/chatuikit/vue3/components/userpicker.md +0 -315
  336. package/resource/doc/chatuikit/vue3/integration.md +0 -256
  337. package/streamableHttp.js +0 -74
  338. package/streamableHttp.js.map +0 -1
  339. package/tools/call/get-native-call-integration-guide.js +0 -36
  340. package/tools/call/get-native-call-integration-guide.js.map +0 -1
  341. package/tools/call/get-web-call-integration-guide.js +0 -35
  342. package/tools/call/get-web-call-integration-guide.js.map +0 -1
  343. package/tools/chat/get-native-chat-integration-guide.js +0 -34
  344. package/tools/chat/get-native-chat-integration-guide.js.map +0 -1
  345. package/tools/chat/get-web-chat-integration-guide.js +0 -35
  346. package/tools/chat/get-web-chat-integration-guide.js.map +0 -1
  347. package/tools/chat/get-web-chat-uikit-login.js.map +0 -1
  348. package/tools/rtcengine/get-rtcengine-integration-guide.js +0 -33
  349. package/tools/rtcengine/get-rtcengine-integration-guide.js.map +0 -1
  350. package/tools/rtcengine/get-rtcenigne-faq.js.map +0 -1
  351. /package/resource/doc/chatuikit/react/{login.md → init.md} +0 -0
@@ -1,306 +0,0 @@
1
- This document outlines two authentication methods for Chat services, with a focus on UserSig, a security signature by Tencent Cloud to safeguard against unauthorized access. For basic cloud service usage, provide SDKAppID, UserID, and UserSig during SDK initialization or login.
2
- - SDKAppID is used to identify your application.
3
-
4
- - UserID is used to identify your user.
5
-
6
- - UserSig is a security signature calculated based on the first two using the HMAC SHA256 encryption algorithm. As long as attackers cannot forge the UserSig, they cannot steal your cloud service traffic.
7
-
8
-
9
- ## Obtaining a Key
10
- 1. Log in to the [Chat console](https://console.trtc.io/chat).
11
-
12
-
13
- > **Note: **
14
- >
15
-
16
- > If you do not have any app, [create an app](https://intl.cloud.tencent.com/document/product/1047/45914) and then perform [step 2](https://write.woa.com/#step2).
17
- >
18
-
19
- 2. Click the target app card to go to its basic configuration page.
20
-
21
- 3. In the **Basic Information** section, click **Display key** to the right of **Key**.
22
-
23
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100026631907/9da6a1d5f4df11efa823525400e889b2.png)
24
-
25
- 4. Click **Copy** to copy and save the key information.
26
-
27
-
28
- > **Note: **
29
- >
30
-
31
- > Store the key information properly to prevent disclosure.
32
- >
33
-
34
-
35
- ## Calculating UserSig on the Client
36
-
37
- The `GenerateTestUserSig` open-source module provided in the sample code of the Chat SDK can help you quickly generate a UserSig. You only need to configure three member variables, including SDKAPPID (SDKAppID of the app), EXPIRETIME (UserSig expiration time), and SECRETKEY (key information), and then call the genTestUserSig() function to quickly obtain a UserSig.
38
-
39
- To simplify this process, we provide the source code for computing a UserSig for the following languages and platforms. You can directly download and integrate the source code into your client.
40
- <table>
41
- <tr>
42
- <td rowspan="1" colSpan="1" >Programing Language</td>
43
-
44
- <td rowspan="1" colSpan="1" >Platform</td>
45
-
46
- <td rowspan="1" colSpan="1" >GenerateTestUserSig Source Code</td>
47
- </tr>
48
-
49
- <tr>
50
- <td rowspan="1" colSpan="1" >Java</td>
51
-
52
- <td rowspan="1" colSpan="1" >Android</td>
53
-
54
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.java](https://github.com/tencentyun/TIMSDK/blob/master/Android/Demo/app/src/main/java/com/tencent/qcloud/tim/demo/signature/GenerateTestUserSig.java)</td>
55
- </tr>
56
-
57
- <tr>
58
- <td rowspan="1" colSpan="1" >Objective-C</td>
59
-
60
- <td rowspan="1" colSpan="1" >iOS</td>
61
-
62
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.h](https://github.com/tencentyun/TIMSDK/blob/master/iOS/Demo/TUIKitDemo/Private/GenerateTestUserSig.h)</td>
63
- </tr>
64
-
65
- <tr>
66
- <td rowspan="1" colSpan="1" >Objective-C</td>
67
-
68
- <td rowspan="1" colSpan="1" >Mac</td>
69
-
70
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.h](https://github.com/tencentyun/TIMSDK/blob/master/Mac/Demo/TUIKitDemo/Debug/GenerateTestUserSig.h)</td>
71
- </tr>
72
-
73
- <tr>
74
- <td rowspan="1" colSpan="1" >C++</td>
75
-
76
- <td rowspan="1" colSpan="1" >Windows</td>
77
-
78
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.h](https://github.com/tencentyun/TIMSDK/blob/master/Windows/Demo/IMApp/GenerateTestUserSig.h)</td>
79
- </tr>
80
-
81
- <tr>
82
- <td rowspan="1" colSpan="1" >Javascript</td>
83
-
84
- <td rowspan="1" colSpan="1" >Web</td>
85
-
86
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.js](https://github.com/TencentCloud/chat-uikit-uniapp/blob/main/TUIKit/debug/GenerateTestUserSig.js)</td>
87
- </tr>
88
-
89
- <tr>
90
- <td rowspan="1" colSpan="1" >Dart</td>
91
-
92
- <td rowspan="1" colSpan="1" >Flutter</td>
93
-
94
- <td rowspan="1" colSpan="1" >[GenerateTestUserSig.dart](https://github.com/TencentCloud/chat-demo-flutter/blob/main/lib/utils/GenerateTestUserSig.dart )</td>
95
- </tr>
96
- </table>
97
-
98
-
99
- > **Note: **
100
- >
101
-
102
- > In this method, the `SECRETKEY` is vulnerable to decompilation and reverse engineering. Once your `SECRETKEY` is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, **this method is only suitable for locally running a demo project and feature debugging**.
103
- The correct way to issue a UserSig is to integrate the UserSig computing code into your server and provide app-oriented APIs. When UserSig is needed, your app will send a request to the business server to obtain a dynamic UserSig. For more information, see [How to Calculate UserSig](https://write.woa.com/#GeneratingdynamicUserSig).
104
- >
105
-
106
-
107
- ## Calculating UserSig on the Server
108
-
109
- Generating a UserSig on the server provides maximum protection against the disclosure of the key used for calculating the UserSig. You only need to deploy the code for calculating the UserSig on your server and provide an app-oriented API. When a UserSig is needed, your app will send a request to the business server to obtain a dynamic UserSig.
110
- To simplify this process, we provide the source code for calculating a UserSig for the following languages and platforms. You can directly download and integrate the source code into your server.
111
- <table>
112
- <tr>
113
- <td rowspan="1" colSpan="1" >Programming Language</td>
114
-
115
- <td rowspan="1" colSpan="1" >Key Function</td>
116
-
117
- <td rowspan="1" colSpan="1" >Download URL</td>
118
- </tr>
119
-
120
- <tr>
121
- <td rowspan="1" colSpan="1" >Java</td>
122
-
123
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
124
-
125
- <td rowspan="1" colSpan="1" >[genSig](https://github.com/Tencent-RTC/tls-sig-api-v2-java/blob/main/src/main/java/com/tencentcloud/TLSSigAPIv2.java)</td>
126
- </tr>
127
-
128
- <tr>
129
- <td rowspan="1" colSpan="1" >GO</td>
130
-
131
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
132
-
133
- <td rowspan="1" colSpan="1" >[GenSig](https://github.com/Tencent-RTC/tls-sig-api-v2-golang/blob/main/tencentyun/TLSSigAPI.go)</td>
134
- </tr>
135
-
136
- <tr>
137
- <td rowspan="1" colSpan="1" >PHP</td>
138
-
139
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
140
-
141
- <td rowspan="1" colSpan="1" >[genSig](https://github.com/Tencent-RTC/tls-sig-api-v2-php/blob/main/src/TLSSigAPIv2.php)</td>
142
- </tr>
143
-
144
- <tr>
145
- <td rowspan="1" colSpan="1" >Nodejs</td>
146
-
147
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
148
-
149
- <td rowspan="1" colSpan="1" >[genSig](https://github.com/Tencent-RTC/tls-sig-api-v2-node/blob/main/TLSSigAPIv2.js)</td>
150
- </tr>
151
-
152
- <tr>
153
- <td rowspan="1" colSpan="1" >Python</td>
154
-
155
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
156
-
157
- <td rowspan="1" colSpan="1" >[gen_sig](https://github.com/Tencent-RTC/tls-sig-api-v2-python/blob/main/TLSSigAPIv2.py)</td>
158
- </tr>
159
-
160
- <tr>
161
- <td rowspan="1" colSpan="1" >C#</td>
162
-
163
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
164
-
165
- <td rowspan="1" colSpan="1" >[GenSig](https://github.com/Tencent-RTC/tls-sig-api-v2-cs/blob/main/tls-sig-api-v2-cs/TLSSigAPIv2.cs)</td>
166
- </tr>
167
-
168
- <tr>
169
- <td rowspan="1" colSpan="1" >C++</td>
170
-
171
- <td rowspan="1" colSpan="1" >HMAC-SHA256</td>
172
-
173
- <td rowspan="1" colSpan="1" >[gen_sig](https://github.com/Tencent-RTC/tls-sig-api-v2-cpp)</td>
174
- </tr>
175
- </table>
176
-
177
-
178
- Key fields in a UserSig calculation function include the SDKAppID, UserID, and UserSig validity period, as described in the following table.
179
-
180
- > **Note: **
181
- >
182
-
183
- > The following table uses the field names in the Java source code as an example. The field names may be different in other languages.
184
- >
185
-
186
- <table>
187
- <tr>
188
- <td rowspan="1" colSpan="1" >Field Name (Example)</td>
189
-
190
- <td rowspan="1" colSpan="1" >Description</td>
191
- </tr>
192
-
193
- <tr>
194
- <td rowspan="1" colSpan="1" >sdkappid</td>
195
-
196
- <td rowspan="1" colSpan="1" >SDKAppID of the app. You can obtain the SDKAppID on the app card in the [Chat console](https://console.trtc.io/chat).</td>
197
- </tr>
198
-
199
- <tr>
200
- <td rowspan="1" colSpan="1" >userId</td>
201
-
202
- <td rowspan="1" colSpan="1" >User ID (former name: `Identifier`).</td>
203
- </tr>
204
-
205
- <tr>
206
- <td rowspan="1" colSpan="1" >expire</td>
207
-
208
- <td rowspan="1" colSpan="1" >UserSig validity period, in seconds.</td>
209
- </tr>
210
-
211
- <tr>
212
- <td rowspan="1" colSpan="1" >userbuf</td>
213
-
214
- <td rowspan="1" colSpan="1" >This field is set to `null` by default because APIs without UserBuf are used in Chat by default.APIs with UserBuf may be required in some TRTC use cases, for example, when entering a room. For more information, see [Enabling Advanced Permission Control](https://intl.cloud.tencent.com/document/product/647/35157).</td>
215
- </tr>
216
-
217
- <tr>
218
- <td rowspan="1" colSpan="1" >key</td>
219
-
220
- <td rowspan="1" colSpan="1" >Key. You can obtain a key on the app details page in the [Chat console](https://console.trtc.io/chat). For more information, see [Obtaining a Key](https://write.woa.com/#getkey).</td>
221
- </tr>
222
- </table>
223
-
224
-
225
- ## Old Version of Algorithm
226
-
227
- To simplify signature computing so that customers can conveniently and quickly use Tencent Cloud services, the signature algorithm of the Chat service has been upgraded from ECDSA-SHA256 to HMAC-SHA256 since July 19, 2019. This means that all SDKAppIDs created after July 19, 2019 will use the new HMAC-SHA256 algorithm.
228
-
229
- If your SDKAppID was created before July 19, 2019, we recommend that you upgrade the signature algorithm to [HMAC-SHA256](https://write.woa.com/#GeneratingdynamicUserSig). The upgrade will not affect your business. Alternatively, you can still use the signature algorithm of an earlier version. The URLs for downloading the source code for the ECDSA-SHA256 algorithm are as follows:
230
- <table>
231
- <tr>
232
- <td rowspan="1" colSpan="1" >Programming Language</td>
233
-
234
- <td rowspan="1" colSpan="1" >Signature Algorithm</td>
235
-
236
- <td rowspan="1" colSpan="1" >Download Link</td>
237
- </tr>
238
-
239
- <tr>
240
- <td rowspan="1" colSpan="1" >Java</td>
241
-
242
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
243
-
244
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-java)</td>
245
- </tr>
246
-
247
- <tr>
248
- <td rowspan="1" colSpan="1" >GO</td>
249
-
250
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
251
-
252
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-golang)</td>
253
- </tr>
254
-
255
- <tr>
256
- <td rowspan="1" colSpan="1" >PHP</td>
257
-
258
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
259
-
260
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-php)</td>
261
- </tr>
262
-
263
- <tr>
264
- <td rowspan="1" colSpan="1" >Nodejs</td>
265
-
266
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
267
-
268
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-node)</td>
269
- </tr>
270
-
271
- <tr>
272
- <td rowspan="1" colSpan="1" >Python</td>
273
-
274
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
275
-
276
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-python)</td>
277
- </tr>
278
-
279
- <tr>
280
- <td rowspan="1" colSpan="1" >C#</td>
281
-
282
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
283
-
284
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api-cs)</td>
285
- </tr>
286
-
287
- <tr>
288
- <td rowspan="1" colSpan="1" >C++</td>
289
-
290
- <td rowspan="1" colSpan="1" >ECDSA-SHA256</td>
291
-
292
- <td rowspan="1" colSpan="1" >[GitHub](https://github.com/tencentyun/tls-sig-api)</td>
293
- </tr>
294
- </table>
295
-
296
-
297
- ## Get UserSig from the console
298
- - Log in to Tencent-RTC Console, navigate to Development Tools > [UserSig Tools](https://console.trtc.io/usersig).
299
-
300
- - Under the UserSig Generation Tool, select the corresponding SDKAppID and UserID.
301
-
302
- - Click the Generate button to compute the corresponding UserSig.
303
-
304
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100026631907/bf1ed039f4df11ef920e5254005ef0f7.png)
305
-
306
-
@@ -1,202 +0,0 @@
1
- ## Applicable Scenarios
2
-
3
- Web & H5 platform, integrate independently private chat (1V1) or Group chat. This scenario is applicable for such as real estate consultancy, e-commerce customer service, remote insurance claims assessment.
4
-
5
- You can directly experience the chat below. Meanwhile, you can quickly try online code implementation through [**Experience Sandbox**](https://codesandbox.io/p/sandbox/trtc-chat-only-gmtmfw).
6
- <iframe src="https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/im/demo/docs-example/sample-chat/index.html#/chatbox?page=intergrationchat" style="width:100%;height:700px;border:none" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="no-referrer-when-downgrade" allowfullscreen></iframe>
7
-
8
-
9
- ## Development Environment Requirement
10
- - React version 18
11
-
12
- - TypeScript
13
-
14
- - [Node.js](https://nodejs.org/en/) version 18+
15
-
16
- - npm (version should match node version)
17
-
18
-
19
- ## Chat-Uikit-React Integration
20
-
21
- ### Step 1: Create Project
22
-
23
- Create a new React project named **chat-app** (select React 18 during project creation and recommend using the Typescript template), and follow the prompt to run the initial project.
24
-
25
-
26
- 【shell】
27
- ``` bash
28
- npm create rsbuild@latest
29
- ```
30
-
31
- ### Step 2: Download the Chat-Uikit-React Component
32
-
33
- Download [chat-uikit-react](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react) via npm and use it in the project.
34
-
35
-
36
- 【shell】
37
- ``` bash
38
- npm i @tencentcloud/chat-uikit-react
39
- ```
40
-
41
- ### Step 3: Introduce the Chat-Uikit-React Component, Create and Open a Session to Chat
42
-
43
- > **Note:**
44
- >
45
-
46
- > Note: The following code does not auto-fill `SDKAppID`, `userID`, or `userSig`. Retrieve related information in [procedure 4](https://write.woa.com/#step4) and replace them.
47
- >
48
-
49
-
50
- > **Note:**
51
- >
52
- > - Call API [createC2CConversation](https://write.woa.com/document/155521474134589440) to create a one-to-one chat.
53
- > - Call API [createGroupConversation](https://write.woa.com/document/155521474134589440) to create a group chat.
54
- > - Ways to enter a chat:
55
- > - Call API [setActiveConversation](https://write.woa.com/document/155521474134589440), input conversationID to enter the chat page.
56
-
57
-
58
- Replace the content in App.tsx, or you can create a new component and introduce it. [Experience Sandbox ->](https://codesandbox.io/p/sandbox/trtc-chat-only-gmtmfw?from-embed=)
59
- ``` typescript
60
- import {
61
- UIKitProvider,
62
- useLoginState,
63
- LoginStatus,
64
- useConversationListState,
65
- Chat,
66
- MessageList,
67
- MessageInput,
68
- ChatHeader,
69
- useUIOpenControlState,
70
- ChatSetting,
71
- Search,
72
- VariantType,
73
- } from "@tencentcloud/chat-uikit-react"
74
-
75
- export default function App() {
76
-
77
- const { isChatSettingOpen, isChatSearchOpen } = useUIOpenControlState();
78
- const { setActiveConversation, createC2CConversation } = useConversationListState();
79
- const { status } = useLoginState({
80
- SDKAppID: 0, // Your SDKAppID, see procedure 4
81
- userID: '', // Your logged in UserID, see procedure 5
82
- userSig: '', // Your userSig, see procedure 5
83
- onSuccess() {
84
- const userID = ''; // userID: recipient's userID
85
- createC2CConversation(userID).then((conversation) => {
86
- setActiveConversation(conversation.conversationID);
87
- })
88
- }
89
- });
90
-
91
- if (status !== LoginStatus.SUCCESS) {
92
- return <div>loading...</div>;
93
- }
94
-
95
- // Language support en-US(default) / zh-CN / ja-JP / ko-KR / zh-TW
96
- // Theme supports light(default) / dark
97
- return (
98
- <div style={{display: 'flex', height: '100vh'}}>
99
- <UIKitProvider language='en-US' theme='light'>
100
- <Chat style={{ width: '100vw' }}>
101
- <ChatHeader />
102
- <MessageList />
103
- <MessageInput />
104
- </Chat>
105
- {isChatSettingOpen && <ChatSetting />}
106
- {isChatSearchOpen && <Search style={{ minWidth: '300px'}} variant={VariantType.EMBEDDED} />}
107
- </UIKitProvider>
108
- </div>
109
- );
110
- }
111
- ```
112
-
113
- ### Step 4: Creating an Application
114
- 1. Log in to the [Chat Console](https://console.trtc.io/).
115
-
116
- 2. Click "Create Application", enter your application name, then click "Create".
117
-
118
-
119
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/327c29cf622711f0a64452540099c741.png)
120
-
121
- 3. After creation, you can see the application status, service version, SDKAppID, createTime, tag, and expiration time on the console overview page.
122
-
123
-
124
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/3340d098622711f0ad0f5254005ef0f7.png)
125
-
126
-
127
- ### Procedure 5: Obtain UserID and UserSig
128
- - `userID`
129
-
130
- - Click to enter the [Application](https://console.trtc.io/app) you created above. The `Chat` product entry will be shown in the left sidebar. Click to enter.
131
-
132
- - After entering the Chat product subpage, click `Users` to enter the user management page.
133
-
134
- - Click `Create account`, and a pop-up input box for account information will appear. If you are merely an ordinary member, we recommend you select the `General` data type.
135
-
136
- - For a better experience in message sending and receiving and other features, we recommend creating two userIDs.
137
-
138
-
139
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/322318b9622711f0ad0f5254005ef0f7.png)
140
-
141
- - `userSig`, usable development tools provided by the console to generate in real-time. Please click [Chat Console > Development Tools > UserSig Tools > Signature (UserSig) Generator](https://console.trtc.io/usersig).
142
-
143
-
144
- ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100033438418/323eb909622711f0a64452540099c741.png)
145
-
146
-
147
- ### Step 6: Start Project
148
-
149
- Replace the SDKAppID, userID, and userSig in App.tsx, then run the command as follows:
150
-
151
-
152
- 【shell】
153
- ``` bash
154
- npm run start
155
- ```
156
-
157
- > **Note:**
158
- >
159
- > 1. Please ensure the [procedure 3](https://write.woa.com/#step3) code has successfully replaced `SDKAppID`, `userID`, and `userSig`. If not replaced, it will lead to abnormal project performance.
160
- > 2. `userID` and `userSig` have a one-to-one relationship. Refer to [generate UserSig](https://trtc.io/document/39074?product=consoleguide).
161
- > 3. If the project fails to start, please check whether the [development environment requirement](https://write.woa.com/#required) are met.
162
-
163
-
164
- ### Step 7: Send Your First Message
165
-
166
- enter the message in the input box and press **enter** to send.
167
- <iframe src="https://codesandbox.io/embed/gmtmfw?view=split&amp;module=%2Fsrc%2FApp.tsx" style="width:100%;height:750px;border:0;border-radius:4px;overflow:hidden" title="chat-react-test" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
168
-
169
-
170
- ## FAQs
171
-
172
- #### What Is UserSig
173
-
174
- UserSig is the password for user login to Chat, which is essentially the encrypted ciphertext of UserID and other information.
175
-
176
- #### How to Generate UserSig
177
-
178
- The UserSig issuance method involves integrating the UserSig calculation code into your server and providing a project-oriented API. When UserSig is required, your project initiates a request to the business server to obtain a dynamic UserSig. For more details, see [UserSig generation by the server](https://cloud.tencent.com/document/product/269/32688#GeneratingdynamicUserSig).
179
-
180
- > **Note:**
181
- >
182
-
183
- > The example code in this document uses a solution to obtain UserSig by configuring SECRETKEY in client-side code. In this method, SECRETKEY can be easily decompiled and reverse-engineered. Once your key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, **this method is only suitable for local debugging**. For the correct UserSig issuance method, please refer to the context before.
184
- >
185
-
186
-
187
- #### Does React 17.X Version Support
188
-
189
- Currently does not support version 17.x. Only React ≥ v18.0 is supported.
190
-
191
- ## Reference Documentation
192
-
193
- #### UIKit Related
194
- - [chat-uikit-react npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react)
195
-
196
- - [Demo source code and running example](https://github.com/TencentCloud/chat-uikit-react)
197
-
198
-
199
- #### Implementing More Features, Refer to ChatEngine API Document
200
- - [chat-uikit-engine API manual](https://web.sdk.qcloud.com/im/doc/chat-engine/index.html)
201
-
202
- - [chat-uikit-engine npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-engine)