@tencent-rtc/mcp 1.0.6 → 1.0.9

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 (342) hide show
  1. package/README.md +4 -4
  2. package/index.js +7 -8
  3. package/index.js.map +1 -1
  4. package/libs/@tencent/aegis-node-sdk/CHANGELOG.md +8 -0
  5. package/libs/@tencent/aegis-node-sdk/LICENSE +21 -0
  6. package/libs/@tencent/aegis-node-sdk/README.md +562 -0
  7. package/libs/@tencent/aegis-node-sdk/lib/aegis.min.js +1 -0
  8. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +14 -0
  9. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +1 -0
  10. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +9 -0
  11. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +2 -0
  12. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +85 -0
  13. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +3 -0
  14. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +9 -0
  15. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +3 -0
  16. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +9 -0
  17. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +62 -0
  18. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +11 -0
  19. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +4 -0
  20. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +130 -0
  21. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +34 -0
  22. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +2 -0
  23. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +18 -0
  24. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +8 -0
  25. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +8 -0
  26. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +2 -0
  27. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +4 -0
  28. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +10 -0
  29. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +3 -0
  30. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +3 -0
  31. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +34 -0
  32. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +12 -0
  33. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +14 -0
  34. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +2 -0
  35. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +12 -0
  36. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +3 -0
  37. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +33 -0
  38. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
  39. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +2 -0
  40. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +18 -0
  41. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +60 -0
  42. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +15 -0
  43. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +5 -0
  44. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +6 -0
  45. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +18 -0
  46. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +12 -0
  47. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +10 -0
  48. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +20 -0
  49. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +27 -0
  50. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +2 -0
  51. package/libs/@tencent/aegis-node-sdk/package.json +19 -0
  52. package/libs/@tencent/polaris/README.md +407 -0
  53. package/libs/@tencent/polaris/dist/consumer/health.d.ts +126 -0
  54. package/libs/@tencent/polaris/dist/consumer/health.js +283 -0
  55. package/libs/@tencent/polaris/dist/consumer/health.js.map +1 -0
  56. package/libs/@tencent/polaris/dist/consumer/index.d.ts +120 -0
  57. package/libs/@tencent/polaris/dist/consumer/index.js +348 -0
  58. package/libs/@tencent/polaris/dist/consumer/index.js.map +1 -0
  59. package/libs/@tencent/polaris/dist/consumer/monitor.d.ts +145 -0
  60. package/libs/@tencent/polaris/dist/consumer/monitor.js +343 -0
  61. package/libs/@tencent/polaris/dist/consumer/monitor.js.map +1 -0
  62. package/libs/@tencent/polaris/dist/consumer/selector.d.ts +73 -0
  63. package/libs/@tencent/polaris/dist/consumer/selector.js +316 -0
  64. package/libs/@tencent/polaris/dist/consumer/selector.js.map +1 -0
  65. package/libs/@tencent/polaris/dist/errors.d.ts +373 -0
  66. package/libs/@tencent/polaris/dist/errors.js +154 -0
  67. package/libs/@tencent/polaris/dist/errors.js.map +1 -0
  68. package/libs/@tencent/polaris/dist/global.d.ts +16 -0
  69. package/libs/@tencent/polaris/dist/global.js +18 -0
  70. package/libs/@tencent/polaris/dist/global.js.map +1 -0
  71. package/libs/@tencent/polaris/dist/index.d.ts +62 -0
  72. package/libs/@tencent/polaris/dist/index.js +145 -0
  73. package/libs/@tencent/polaris/dist/index.js.map +1 -0
  74. package/libs/@tencent/polaris/dist/instance.d.ts +109 -0
  75. package/libs/@tencent/polaris/dist/instance.js +38 -0
  76. package/libs/@tencent/polaris/dist/instance.js.map +1 -0
  77. package/libs/@tencent/polaris/dist/limiter/bucket.d.ts +51 -0
  78. package/libs/@tencent/polaris/dist/limiter/bucket.js +152 -0
  79. package/libs/@tencent/polaris/dist/limiter/bucket.js.map +1 -0
  80. package/libs/@tencent/polaris/dist/limiter/index.d.ts +73 -0
  81. package/libs/@tencent/polaris/dist/limiter/index.js +149 -0
  82. package/libs/@tencent/polaris/dist/limiter/index.js.map +1 -0
  83. package/libs/@tencent/polaris/dist/limiter/ratelimit.d.ts +27 -0
  84. package/libs/@tencent/polaris/dist/limiter/ratelimit.js +134 -0
  85. package/libs/@tencent/polaris/dist/limiter/ratelimit.js.map +1 -0
  86. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +17 -0
  87. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js +15 -0
  88. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +1 -0
  89. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +59 -0
  90. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js +397 -0
  91. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +1 -0
  92. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +3 -0
  93. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js +19 -0
  94. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +1 -0
  95. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +17 -0
  96. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js +52 -0
  97. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +1 -0
  98. package/libs/@tencent/polaris/dist/location.d.ts +48 -0
  99. package/libs/@tencent/polaris/dist/location.js +67 -0
  100. package/libs/@tencent/polaris/dist/location.js.map +1 -0
  101. package/libs/@tencent/polaris/dist/logging.d.ts +106 -0
  102. package/libs/@tencent/polaris/dist/logging.js +130 -0
  103. package/libs/@tencent/polaris/dist/logging.js.map +1 -0
  104. package/libs/@tencent/polaris/dist/metadata.d.ts +78 -0
  105. package/libs/@tencent/polaris/dist/metadata.js +119 -0
  106. package/libs/@tencent/polaris/dist/metadata.js.map +1 -0
  107. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +47 -0
  108. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js +162 -0
  109. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js.map +1 -0
  110. package/libs/@tencent/polaris/dist/plugins/lb/base.d.ts +24 -0
  111. package/libs/@tencent/polaris/dist/plugins/lb/base.js +32 -0
  112. package/libs/@tencent/polaris/dist/plugins/lb/base.js.map +1 -0
  113. package/libs/@tencent/polaris/dist/plugins/lb/edf.d.ts +24 -0
  114. package/libs/@tencent/polaris/dist/plugins/lb/edf.js +77 -0
  115. package/libs/@tencent/polaris/dist/plugins/lb/edf.js.map +1 -0
  116. package/libs/@tencent/polaris/dist/plugins/lb/hashring.d.ts +24 -0
  117. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js +53 -0
  118. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js.map +1 -0
  119. package/libs/@tencent/polaris/dist/plugins/lb/sticky.d.ts +31 -0
  120. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js +88 -0
  121. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js.map +1 -0
  122. package/libs/@tencent/polaris/dist/plugins/lb/swrr.d.ts +25 -0
  123. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js +72 -0
  124. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js.map +1 -0
  125. package/libs/@tencent/polaris/dist/plugins/lb/wr.d.ts +17 -0
  126. package/libs/@tencent/polaris/dist/plugins/lb/wr.js +50 -0
  127. package/libs/@tencent/polaris/dist/plugins/lb/wr.js.map +1 -0
  128. package/libs/@tencent/polaris/dist/plugins/lb/wrr.d.ts +19 -0
  129. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js +81 -0
  130. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js.map +1 -0
  131. package/libs/@tencent/polaris/dist/plugins/logging/console.d.ts +10 -0
  132. package/libs/@tencent/polaris/dist/plugins/logging/console.js +38 -0
  133. package/libs/@tencent/polaris/dist/plugins/logging/console.js.map +1 -0
  134. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +32 -0
  135. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js +88 -0
  136. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +1 -0
  137. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +124 -0
  138. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +398 -0
  139. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +1 -0
  140. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +27 -0
  141. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +287 -0
  142. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +1 -0
  143. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +15 -0
  144. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +43 -0
  145. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +1 -0
  146. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +28 -0
  147. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +249 -0
  148. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +1 -0
  149. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +19 -0
  150. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +222 -0
  151. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +1 -0
  152. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +26 -0
  153. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +99 -0
  154. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +1 -0
  155. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +60 -0
  156. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +259 -0
  157. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +1 -0
  158. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +24 -0
  159. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +18 -0
  160. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +12 -0
  161. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +39 -0
  162. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +115 -0
  163. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +1 -0
  164. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +24 -0
  165. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +22 -0
  166. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +28 -0
  167. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +80 -0
  168. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +18 -0
  169. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +65 -0
  170. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +66 -0
  171. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +95 -0
  172. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +1568 -0
  173. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +36 -0
  174. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +51 -0
  175. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +1 -0
  176. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +18 -0
  177. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +67 -0
  178. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +82 -0
  179. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +11 -0
  180. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +46 -0
  181. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +16 -0
  182. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +10 -0
  183. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +1102 -0
  184. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +29 -0
  185. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +77 -0
  186. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +1 -0
  187. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +12 -0
  188. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +28 -0
  189. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +395 -0
  190. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +13 -0
  191. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +116 -0
  192. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +1 -0
  193. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +67 -0
  194. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +67 -0
  195. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +1 -0
  196. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +99 -0
  197. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +217 -0
  198. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +1 -0
  199. package/libs/@tencent/polaris/dist/plugins/registry/memory.d.ts +10 -0
  200. package/libs/@tencent/polaris/dist/plugins/registry/memory.js +50 -0
  201. package/libs/@tencent/polaris/dist/plugins/registry/memory.js.map +1 -0
  202. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +51 -0
  203. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js +145 -0
  204. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +1 -0
  205. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +11 -0
  206. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js +174 -0
  207. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +1 -0
  208. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +25 -0
  209. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js +36 -0
  210. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +1 -0
  211. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +10 -0
  212. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js +34 -0
  213. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js.map +1 -0
  214. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +56 -0
  215. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js +106 -0
  216. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js.map +1 -0
  217. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +31 -0
  218. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js +124 -0
  219. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js.map +1 -0
  220. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +61 -0
  221. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js +171 -0
  222. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js.map +1 -0
  223. package/libs/@tencent/polaris/dist/plugins/weight/polaris.d.ts +23 -0
  224. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js +159 -0
  225. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js.map +1 -0
  226. package/libs/@tencent/polaris/dist/plugins.d.ts +619 -0
  227. package/libs/@tencent/polaris/dist/plugins.js +91 -0
  228. package/libs/@tencent/polaris/dist/plugins.js.map +1 -0
  229. package/libs/@tencent/polaris/dist/polaris.d.ts +33 -0
  230. package/libs/@tencent/polaris/dist/polaris.js +59 -0
  231. package/libs/@tencent/polaris/dist/polaris.js.map +1 -0
  232. package/libs/@tencent/polaris/dist/provider/index.d.ts +102 -0
  233. package/libs/@tencent/polaris/dist/provider/index.js +168 -0
  234. package/libs/@tencent/polaris/dist/provider/index.js.map +1 -0
  235. package/libs/@tencent/polaris/dist/registry.d.ts +174 -0
  236. package/libs/@tencent/polaris/dist/registry.js +660 -0
  237. package/libs/@tencent/polaris/dist/registry.js.map +1 -0
  238. package/libs/@tencent/polaris/dist/rules.d.ts +163 -0
  239. package/libs/@tencent/polaris/dist/rules.js +24 -0
  240. package/libs/@tencent/polaris/dist/rules.js.map +1 -0
  241. package/libs/@tencent/polaris/dist/scripts/postinstall.d.ts +1 -0
  242. package/libs/@tencent/polaris/dist/scripts/postinstall.js +71 -0
  243. package/libs/@tencent/polaris/dist/scripts/postinstall.js.map +1 -0
  244. package/libs/@tencent/polaris/dist/service.d.ts +18 -0
  245. package/libs/@tencent/polaris/dist/service.js +3 -0
  246. package/libs/@tencent/polaris/dist/service.js.map +1 -0
  247. package/libs/@tencent/polaris/dist/skeleton.d.ts +87 -0
  248. package/libs/@tencent/polaris/dist/skeleton.js +282 -0
  249. package/libs/@tencent/polaris/dist/skeleton.js.map +1 -0
  250. package/libs/@tencent/polaris/dist/utils.d.ts +36 -0
  251. package/libs/@tencent/polaris/dist/utils.js +74 -0
  252. package/libs/@tencent/polaris/dist/utils.js.map +1 -0
  253. package/libs/@tencent/polaris/dist/weak.d.ts +11 -0
  254. package/libs/@tencent/polaris/dist/weak.js +44 -0
  255. package/libs/@tencent/polaris/dist/weak.js.map +1 -0
  256. package/libs/@tencent/polaris/package.json +114 -0
  257. package/libs/lib-generate-test-usersig-es.min.d.ts +6 -0
  258. package/libs/lib-generate-test-usersig-es.min.js +2 -0
  259. package/package.json +2 -1
  260. package/resource/doc/chatuikit/react/components/avatar.md +137 -0
  261. package/resource/doc/chatuikit/react/components/chat.md +44 -0
  262. package/resource/doc/chatuikit/react/components/chatheader.md +189 -0
  263. package/resource/doc/chatuikit/react/components/component-list.md +48 -0
  264. package/resource/doc/chatuikit/react/components/conversation-list.md +1017 -0
  265. package/resource/doc/chatuikit/react/components/message-input.md +950 -0
  266. package/resource/doc/chatuikit/react/components/message-list.md +485 -0
  267. package/resource/doc/chatuikit/react/components/tuikit.md +80 -0
  268. package/resource/doc/chatuikit/react/create-group.md +23 -0
  269. package/resource/doc/chatuikit/react/integration.md +83 -0
  270. package/resource/doc/chatuikit/react/login.md +26 -0
  271. package/resource/doc/chatuikit/vue/components/avatar.md +137 -0
  272. package/resource/doc/chatuikit/vue/components/chat.md +42 -0
  273. package/resource/doc/chatuikit/vue/components/chatheader.md +189 -0
  274. package/resource/doc/chatuikit/vue/components/component-list.md +102 -0
  275. package/resource/doc/chatuikit/vue/components/conversation-list.md +765 -0
  276. package/resource/doc/chatuikit/vue/components/message-input.md +1272 -0
  277. package/resource/doc/chatuikit/vue/components/message-list.md +662 -0
  278. package/resource/doc/chatuikit/vue/components/tuikit.md +45 -0
  279. package/resource/doc/chatuikit/vue/components/userpicker.md +315 -0
  280. package/resource/doc/chatuikit/vue/create-group.md +25 -0
  281. package/resource/doc/chatuikit/vue/integration.md +256 -0
  282. package/resource/doc/chatuikit/vue/login.md +31 -0
  283. package/resource/doc/chatuikit/vue3/components/MessageInput.md +1272 -0
  284. package/resource/doc/chatuikit/vue3/components/avatar.md +137 -0
  285. package/resource/doc/chatuikit/vue3/components/chatheader.md +189 -0
  286. package/resource/doc/chatuikit/vue3/components/component-list.md +102 -0
  287. package/resource/doc/chatuikit/vue3/components/userpicker.md +315 -0
  288. package/resource/doc/chatuikit/vue3/integration.md +256 -0
  289. package/server.js +10 -181
  290. package/server.js.map +1 -1
  291. package/streamable-http.js +69 -0
  292. package/streamable-http.js.map +1 -0
  293. package/tools/call/get-call-faq.js +32 -0
  294. package/tools/call/get-call-faq.js.map +1 -0
  295. package/tools/call/get-native-call-integration-guide.js +36 -0
  296. package/tools/call/get-native-call-integration-guide.js.map +1 -0
  297. package/tools/call/get-native-call-integration.js +35 -0
  298. package/tools/call/get-native-call-integration.js.map +1 -0
  299. package/tools/call/get-web-call-integration-guide.js +35 -0
  300. package/tools/call/get-web-call-integration-guide.js.map +1 -0
  301. package/tools/call/get-web-call-integration.js +35 -0
  302. package/tools/call/get-web-call-integration.js.map +1 -0
  303. package/tools/chat/create-group.js +30 -0
  304. package/tools/chat/create-group.js.map +1 -0
  305. package/tools/chat/get-chat-faq.js +32 -0
  306. package/tools/chat/get-chat-faq.js.map +1 -0
  307. package/tools/chat/get-native-chat-integration-guide.js +34 -0
  308. package/tools/chat/get-native-chat-integration-guide.js.map +1 -0
  309. package/tools/chat/get-native-chat-integration.js +34 -0
  310. package/tools/chat/get-native-chat-integration.js.map +1 -0
  311. package/tools/chat/get-web-chat-component-detail.js +36 -0
  312. package/tools/chat/get-web-chat-component-detail.js.map +1 -0
  313. package/tools/chat/get-web-chat-integration-guide.js +35 -0
  314. package/tools/chat/get-web-chat-integration-guide.js.map +1 -0
  315. package/tools/chat/get-web-chat-integration.js +37 -0
  316. package/tools/chat/get-web-chat-integration.js.map +1 -0
  317. package/tools/chat/get-web-chat-uikit-login.js +30 -0
  318. package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
  319. package/tools/common/get-usersig.js +35 -0
  320. package/tools/common/get-usersig.js.map +1 -0
  321. package/tools/common/present-framework-choice.js +23 -0
  322. package/tools/common/present-framework-choice.js.map +1 -0
  323. package/tools/common/record-prompt.js +31 -0
  324. package/tools/common/record-prompt.js.map +1 -0
  325. package/tools/common/record-result.js +36 -0
  326. package/tools/common/record-result.js.map +1 -0
  327. package/tools/index.js +41 -0
  328. package/tools/index.js.map +1 -0
  329. package/tools/rtcengine/get-rtcengine-integration-guide.js +33 -0
  330. package/tools/rtcengine/get-rtcengine-integration-guide.js.map +1 -0
  331. package/tools/rtcengine/get-rtcenigne-faq.js +32 -0
  332. package/tools/rtcengine/get-rtcenigne-faq.js.map +1 -0
  333. package/utils/aegis-client.js +8 -0
  334. package/utils/aegis-client.js.map +1 -0
  335. package/utils/generate-usersig.js +14 -0
  336. package/utils/generate-usersig.js.map +1 -0
  337. package/utils/get-doc-content.js +47 -0
  338. package/utils/get-doc-content.js.map +1 -0
  339. package/utils/handle-component-name.js +12 -0
  340. package/utils/handle-component-name.js.map +1 -0
  341. package/utils/handle-framework.js +9 -0
  342. package/utils/handle-framework.js.map +1 -0
@@ -0,0 +1,485 @@
1
+ # Component Overview
2
+
3
+ MessageList is a powerful chat message list component with complete message display, interaction, and custom function. The component support includes message grouping, read receipt, message manipulation, scroll control, and other core chat features, while providing various custom options to satisfy different business needs.
4
+
5
+
6
+ ## Props Configuration
7
+ <table>
8
+ <tr>
9
+ <td rowspan="1" colSpan="1">Field</td>
10
+
11
+
12
+ <td rowspan="1" colSpan="1">Type</td>
13
+
14
+
15
+ <td rowspan="1" colSpan="1">Default Value</td>
16
+
17
+
18
+ <td rowspan="1" colSpan="1">Description</td>
19
+ </tr>
20
+
21
+
22
+ <tr>
23
+ <td rowspan="1" colSpan="1" >[alignment](https://write.woa.com/document/181344255270170624)</td>
24
+
25
+
26
+ <td rowspan="1" colSpan="1" >'left' \| 'right' \| 'two-sided'</td>
27
+
28
+
29
+ <td rowspan="1" colSpan="1" >'two-sided'</td>
30
+
31
+
32
+ <td rowspan="1" colSpan="1">Message alignment mode.<br>- left: Align all messages to the left.<br>- right: Align all messages to the right.<br>- two-sided: Right-align sent messages and left-align received messages.</td>
33
+ </tr>
34
+
35
+
36
+ <tr>
37
+ <td rowspan="1" colSpan="1" >[enableReadReceipt](https://write.woa.com/document/181344255270170624)</td>
38
+
39
+
40
+ <td rowspan="1" colSpan="1" >boolean</td>
41
+
42
+
43
+ <td rowspan="1" colSpan="1" >false</td>
44
+
45
+
46
+ <td rowspan="1" colSpan="1">Whether to enable the read receipt feature.</td>
47
+ </tr>
48
+
49
+
50
+ <tr>
51
+ <td rowspan="1" colSpan="1" >[messageActionList](https://write.woa.com/document/181344255270170624)</td>
52
+
53
+
54
+ <td rowspan="1" colSpan="1" >IMessageAction[]</td>
55
+
56
+
57
+ <td rowspan="1" colSpan="1" >undefined</td>
58
+
59
+
60
+ <td rowspan="1" colSpan="1">Custom message operation list, such as copy, revoke, delete.</td>
61
+ </tr>
62
+
63
+
64
+ <tr>
65
+ <td rowspan="1" colSpan="1" >[messageAggregationTime](https://write.woa.com/document/181344255270170624)</td>
66
+
67
+
68
+ <td rowspan="1" colSpan="1" >number</td>
69
+
70
+
71
+ <td rowspan="1" colSpan="1">300 (5 minutes)</td>
72
+
73
+
74
+ <td rowspan="1" colSpan="1">Message aggregation interval (seconds). Consecutive messages from the same sender within this period will be aggregated and displayed.</td>
75
+ </tr>
76
+
77
+
78
+ <tr>
79
+ <td rowspan="1" colSpan="1" >[filter](https://write.woa.com/document/181344255270170624)</td>
80
+
81
+
82
+ <td rowspan="1" colSpan="1" >(message: IMessageModel) => boolean</td>
83
+
84
+
85
+ <td rowspan="1" colSpan="1" >undefined</td>
86
+
87
+
88
+ <td rowspan="1" colSpan="1">Message filtering function, used to control which messages to display.</td>
89
+ </tr>
90
+
91
+
92
+ <tr>
93
+ <td rowspan="1" colSpan="1" >[className](https://write.woa.com/document/181344255270170624)</td>
94
+
95
+
96
+ <td rowspan="1" colSpan="1" >string</td>
97
+
98
+
99
+ <td rowspan="1" colSpan="1" >undefined</td>
100
+
101
+
102
+ <td rowspan="1" colSpan="1">Custom CSS class name.</td>
103
+ </tr>
104
+
105
+
106
+ <tr>
107
+ <td rowspan="1" colSpan="1" >[style](https://write.woa.com/document/181344255270170624)</td>
108
+
109
+
110
+ <td rowspan="1" colSpan="1" >React.CSSProperties</td>
111
+
112
+
113
+ <td rowspan="1" colSpan="1" >undefined</td>
114
+
115
+
116
+ <td rowspan="1" colSpan="1">Custom inline style.</td>
117
+ </tr>
118
+
119
+
120
+ <tr>
121
+ <td rowspan="1" colSpan="1" >[Message](https://write.woa.com/document/181344255270170624)</td>
122
+
123
+
124
+ <td rowspan="1" colSpan="1" >React.ComponentType</td>
125
+
126
+
127
+ <td rowspan="1" colSpan="1" >Message</td>
128
+
129
+
130
+ <td rowspan="1" colSpan="1">Custom message component.</td>
131
+ </tr>
132
+
133
+
134
+ <tr>
135
+ <td rowspan="1" colSpan="1" >[MessageTimeDivider](https://write.woa.com/document/181344255270170624)</td>
136
+
137
+
138
+ <td rowspan="1" colSpan="1" >React.ComponentType</td>
139
+
140
+
141
+ <td rowspan="1" colSpan="1" >MessageTimeDivider</td>
142
+
143
+
144
+ <td rowspan="1" colSpan="1">Custom time dividing line component.</td>
145
+ </tr>
146
+ </table>
147
+
148
+
149
+
150
+
151
+ ## Prop field explanation
152
+
153
+
154
+ ### alignment
155
+
156
+
157
+ Parameter type: `'left' | 'right' | 'two-sided'`
158
+
159
+
160
+ alignment is used to set the message alignment mode, supporting three modes: `left`, `right`, and `two-sided`. Default value is `'two-sided'`.
161
+ - `two-sided`: Non-person messages are on the left, my messages are on the right
162
+
163
+
164
+ - `left`: All messages are on the left
165
+
166
+
167
+ - `right`: All messages are on the right
168
+
169
+
170
+
171
+
172
+ ### enableReadReceipt
173
+
174
+
175
+ Parameter type: `boolean`
176
+
177
+
178
+ enableReadReceipt is used to set whether the message read receipt feature is enabled. Default value: `false`.
179
+
180
+
181
+ ### messageActionList
182
+
183
+
184
+ Parameter type: `IMessageAction[]`
185
+
186
+
187
+ The messageActionList is used to set the actions list of messages, such as copy, recall, and delete. The default value is the complete message operation list `['copy', 'recall', 'quote', 'forward', 'delete']`.
188
+ ``` tsx
189
+ interface IMessageAction {
190
+ key: 'copy' | 'recall' | 'quote' | 'forward' | 'delete' | string;
191
+ label?: string;
192
+ icon?: React.ReactNode;
193
+ onClick?: (message: IMessageModel) => void;
194
+ visible?: ((message: IMessageModel) => boolean) | boolean;
195
+ component?: React.ComponentType<{ message: IMessageModel }>;
196
+ style?: React.CSSProperties;
197
+ }
198
+ ```
199
+
200
+
201
+ Use `useMessageAction` to obtain the complete message operation list, then customize as needed.
202
+
203
+
204
+ #### Example 1: Change the order of the action list
205
+
206
+
207
+ Assuming the message actions list is displayed in the order: `forward`, `copy`, `recall`, `quote`, `delete`.
208
+ ``` tsx
209
+ import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
210
+
211
+
212
+ const App = () => {
213
+ const actions = useMessageActions(['forward', 'copy', 'recall', 'quote', 'delete']);
214
+ return (
215
+ <Chat>
216
+ <MessageList messageActionList={actions} />
217
+ </Chat>
218
+ );
219
+ }
220
+ ```
221
+
222
+
223
+ #### Example 2: Only show some message actions
224
+
225
+
226
+ Only show `forward`, `copy`, `recall` operations.
227
+ ``` tsx
228
+ import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
229
+
230
+
231
+ const App = () => {
232
+ const actions = useMessageActions(['forward', 'copy', 'recall']);
233
+ return (
234
+ <Chat>
235
+ <MessageList messageActionList={actions} />
236
+ </Chat>
237
+ );
238
+ }
239
+
240
+
241
+ ```
242
+
243
+
244
+ #### Example 3: Customize the style of message actions
245
+
246
+
247
+ Here is an example of a custom recall operation:
248
+ 1. Change the tag to 'recall ⚠️'
249
+
250
+
251
+ 2. Change the color to orange
252
+
253
+
254
+ 3. Only text messages can be withdrawn
255
+
256
+
257
+ ``` tsx
258
+ import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
259
+ import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
260
+
261
+ const ChatApp = () => {
262
+ const actions = useMessageActions(['copy', {
263
+ key: 'recall',
264
+ label: 'Recall ⚠️',
265
+ style: {
266
+ color: 'orange'
267
+ },
268
+ visible: (message) => message.type === TUIChatEngine.TYPES.MSG_TEXT,
269
+ }, 'quote', 'forward', 'delete']);
270
+
271
+ return (
272
+ <Chat>
273
+ <MessageList messageActionList={actions} />
274
+ </Chat>
275
+ );
276
+ }
277
+ ```
278
+
279
+
280
+ #### Example 4: Add new custom message actions
281
+
282
+
283
+ Assuming custom message actions are required, for example, only messages sent by others can be tagged as 'like' and inserted after the 'recall' operation.
284
+ ``` tsx
285
+ import { useMessageAction } from '@tencentcloud/chat-uikit-react';
286
+ import { yourApi } from '@/api/yourApi';
287
+
288
+
289
+ const customActions = {
290
+ key: 'like',
291
+ label: 'Like',
292
+ icon: <span>👍</span>,
293
+ style: {
294
+ color: '#E53888',
295
+ },
296
+ visible: (message) => message.flow === 'in',
297
+ onClick: (message) => {
298
+ yourApi.likeMessage(message.ID);
299
+ }
300
+ }
301
+
302
+
303
+ function ChatApp() {
304
+ const actions = useMessageAction(['forward', 'copy', 'recall', customActions, 'quote', 'delete']);
305
+ return <MessageList messageActionList={actions} />;
306
+ }
307
+ ```
308
+
309
+
310
+ ### messageAggregationTime
311
+
312
+
313
+ Parameter type: `number`
314
+
315
+
316
+ messageAggregationTime is used to set the message aggregation interval. Consecutive messages from the same sender will be aggregated and displayed. Default value: `300` (seconds).
317
+
318
+
319
+ ### filter
320
+
321
+
322
+ Parameter type: `(message: IMessageModel) => boolean`
323
+
324
+
325
+ filter is used to set the message filtering function to control which messages to display. Default value: `undefined`.
326
+
327
+
328
+ #### Example: Filter out error messages sent by robots
329
+ ``` tsx
330
+ import { MessageList } from '@/components/MessageList';
331
+ import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
332
+
333
+
334
+ const messageFilter = (message) => {
335
+ // Filter out text messages where sender nickname contains '_robot' and content contains 'operation-failed'
336
+ if (
337
+ message.nick?.includes('_robot')
338
+ && message.type === TUIChatEngine.TYPES.MSG_TEXT
339
+ && message.payload?.text?.includes('operation-failed')
340
+ ) {
341
+ return false;
342
+ }
343
+ return true;
344
+ };
345
+
346
+
347
+ function ChatApp() {
348
+ return <MessageList filter={messageFilter} />;
349
+ }
350
+ ```
351
+
352
+
353
+ ### className
354
+
355
+
356
+ Parameter type: `string`
357
+
358
+
359
+ className is used to set the root container's custom CSS class name. Default value: `undefined`.
360
+
361
+
362
+ ### style
363
+
364
+
365
+ Parameter type: `React.CSSProperties`
366
+
367
+
368
+ style is used to set the root container's custom inline style. Default value: `undefined`.
369
+
370
+
371
+ ### Message
372
+
373
+
374
+ Parameter type: `React.ComponentType`
375
+
376
+
377
+ Message is used to set the custom message component, replacing the default message rendering component. Default value: built-in `Message` component.
378
+
379
+
380
+ #### Example: Custom CUSTOM message click redirection component of messages
381
+ ``` tsx
382
+ import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
383
+ import { Chat, MessageList, Message } from '@tencentcloud/chat-uikit-react';
384
+
385
+
386
+ function CustomMessage(props) {
387
+ const { message } = props;
388
+
389
+
390
+ if (message.type === TUIChatEngine.TYPES.MSG_CUSTOM) {
391
+ const { businessID, ...restData } = JSON.parse(message.payload.data);
392
+ if (businessID === 'text_link') {
393
+ return (
394
+ <div>
395
+ <div>{restData.text}</div>
396
+ <a href={restData.link}>
397
+ Redirect to external website address {restData.link}
398
+ </a>
399
+ </div>
400
+ );
401
+ }
402
+ } else {
403
+ Other message types use the default message component
404
+ return <Message {...props} />;
405
+ }
406
+ }
407
+
408
+
409
+ function ChatApp() {
410
+ return (
411
+ <Chat>
412
+ <MessageList Message={CustomMessage} />
413
+ </Chat>
414
+ );
415
+ }
416
+ ```
417
+
418
+
419
+ ### MessageTimeDivider
420
+
421
+
422
+ Parameter type: `React.ComponentType`
423
+
424
+
425
+ MessageTimeDivider is used to set the custom time dividing line component. Default value: built-in `MessageTimeDivider` component.
426
+
427
+
428
+ #### Example: Case-sensitive working hour dividing line
429
+ ``` tsx
430
+ import { Chat, MessageList, MessageTimeDivider } from '@tencentcloud/chat-uikit-react';
431
+
432
+
433
+ const BusinessTimeDivider: typeof MessageTimeDivider = ({ prevMessage, currentMessage }) => {
434
+ if (!prevMessage || !currentMessage) return null;
435
+
436
+ For each message to be rendered, get the current and previous message time, convert them to date objects, and determine whether they cross days or exceed a 4-hour interval.
437
+ const currentTime = new Date(currentMessage.time * 1000);
438
+ const prevTime = new Date(prevMessage.time * 1000);
439
+
440
+ // Display only when crossing days or the interval exceeds 4 hours
441
+ const shouldShow = currentTime.toDateString() !== prevTime.toDateString() ||
442
+ (currentTime.getTime() - prevTime.getTime()) > 4 * 60 * 60 * 1000;
443
+
444
+ if (!shouldShow) return null;
445
+
446
+ Check working hours (9:00-18:00, Monday through Friday)
447
+ const isWorkingTime = () => {
448
+ const hour = currentTime.getHours();
449
+ const day = currentTime.getDay();
450
+ return day >= 1 && day <= 5 && hour >= 9 && hour <= 18;
451
+ };
452
+
453
+ const timeLabel = isWorkingTime() ? 'working hour' : 'off hours';
454
+ const timeColor = isWorkingTime() ? '#52c41a' : '#faad14';
455
+
456
+ return (
457
+ <div style={{ textAlign: 'center', margin: '16px 0' }}>
458
+ <span style={{
459
+ backgroundColor: timeColor,
460
+ color: 'white',
461
+ padding: '2px 8px',
462
+ borderRadius: '12px',
463
+ marginRight: '8px'
464
+ }}>
465
+ {timeLabel}
466
+ </span>
467
+ {currentTime.toLocaleString()}
468
+ </div>
469
+ );
470
+ };
471
+
472
+
473
+ function ChatApp() {
474
+ return (
475
+ <Chat>
476
+ <MessageList MessageTimeDivider={BusinessTimeDivider} />
477
+ </Chat>
478
+ );
479
+ }
480
+ ```
481
+
482
+
483
+ ## Summary
484
+
485
+ The MessageList component provides complete message list functionality and various custom options. By reasonably configuring Props and custom components, you can create a chat interface that meets business requirements. It is advisable to select appropriate configuration based on specific scenarios in actual use.
@@ -0,0 +1,80 @@
1
+ # TUIKit Introduction
2
+
3
+ TUIKit is a UI component library based on Tencent Cloud IM SDK. It provides some common UI components, including session, chat, relationship chain, group, audio and video call, and other features.
4
+ Based on UI components, you can quickly build your own business logic like building blocks.
5
+ TUIKit components implement UI features while calling the appropriate IM SDK APIs to handle IM-related logic and data. Therefore, developers using TUIKit only need to focus on their business or personalized expansion.
6
+ TUIKit, developed with React, features a UI style that better fits the usage habits of overseas customers and supports internationalization. If your business needs to go global, welcome to integration.
7
+
8
+
9
+ ## TUIKit composition
10
+
11
+ TUIKit is mainly divided into ConversationList, Chat, ChatSetting, and Profile modules. Each module is responsible for different content. See the open-source code (https://github.com/TencentCloud/chat-uikit-react).
12
+
13
+
14
+ The UI effect on the Web is as shown below.
15
+
16
+
17
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/ca60ad0a7e4011ef852f52540075b605.png)
18
+
19
+
20
+
21
+
22
+ The UI effect on HTML5 is as shown below.
23
+
24
+
25
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/72617d0b7e4111efa87a525400bdab9d.png)
26
+
27
+
28
+
29
+
30
+ Key Feature Introduction
31
+
32
+
33
+ Chat is primarily responsible for showing the message interface. You can use it to directly send different types of messages, supporting text/emoji/image/video/file/custom message types, and simultaneously support message forwarding/withdrawal/reference, queries, read receipt, and other features.
34
+
35
+
36
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/ae44c9c27e4211ef80ff525400d5f8ef.png)
37
+
38
+
39
+
40
+
41
+ Feature introduction for ConversationList
42
+
43
+
44
+ ConversationList is primarily responsible for showing and editing the session list, including session pinning, delete conversation, and other features.
45
+
46
+
47
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/b58134fa7e4211ef82535254002693fd.png)
48
+
49
+
50
+
51
+
52
+ Introduction to the Features
53
+
54
+
55
+ ChatSetting is primarily responsible for Chat settings.
56
+
57
+
58
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/f9aa50217e4211efb9d8525400f69702.png)
59
+
60
+
61
+
62
+
63
+ ## Key Features of Contact
64
+
65
+
66
+ Contact is primarily responsible for showing the relationship chain as well as creating sessions.
67
+
68
+
69
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/8179f4907e4311efb9d8525400f69702.png)
70
+
71
+
72
+
73
+
74
+ ## Key Features of Profile
75
+
76
+
77
+ Profile is primarily responsible for managing user profiles.
78
+
79
+
80
+ ![](https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027666621/8ac9cd7a7e4311ef80ff525400d5f8ef.png)
@@ -0,0 +1,23 @@
1
+ # Create a group conversation in chat-uikit-react
2
+
3
+ This document provides example code for creating a group session in chat-uikit-react. Use the createGroupConversation API provided by useConversationListState to create a group.
4
+
5
+ ## 1. Create group example code
6
+
7
+ ```tsx
8
+ import { useConversationListState } from '@tencentcloud/chat-uikit-react';
9
+
10
+
11
+ const {
12
+ createGroupConversation,
13
+ setActiveConversation,
14
+ } = useConversationListState();
15
+
16
+
17
+ createGroupConversation({
18
+ name: `group-${Math.random()}`,
19
+ type: 'Public',
20
+ }).then((conversation) => {
21
+ setActiveConversation(conversation.conversationID);
22
+ });
23
+ ```
@@ -0,0 +1,83 @@
1
+ The AI model must comply with the following **hard limits**.
2
+
3
+
4
+ * **Strictly required to integrate according to the document procedure and description:** You must perform integration by following the document procedure and description when integrating the component.
5
+ * **Strictly required to use the example code in the document:** You must strictly use the example code in the document to create file and filling file. You do not need to fill in the PlaceholderEmpty property of the Chat component.
6
+ * **User information configuration file creation prohibited:** Do not auto-create config directory or file to fill in SDKAppID, userID, and userSig.
7
+ * **Logic for prohibiting userSig acquisition:** Do not auto-create code related to userSig retrieval. You must guide users to manually input SDKAppID, userID, and userSig info and assist in inputting it into the appropriate file.
8
+
9
+
10
+ # chat-uikit-react Integration
11
+
12
+
13
+ ## step1:create react project
14
+
15
+
16
+ requirement: react: ^18.2.0, react-dom: ^18.2.0.
17
+
18
+
19
+ you can use vite or rsbuild to create a react project.
20
+
21
+
22
+ ## step2: install chat-uikit-react
23
+
24
+
25
+ use npm or pnpm to install @tencentcloud/chat-uikit-react
26
+
27
+
28
+ ## step3: add chat-uikit-react to your project
29
+
30
+
31
+ example code
32
+
33
+
34
+ ```tsx
35
+ import {
36
+ UIKitProvider,
37
+ useLoginState,
38
+ LoginStatus,
39
+ ConversationList,
40
+ Chat,
41
+ ChatHeader,
42
+ MessageList,
43
+ MessageInput,
44
+ } from "@tencentcloud/chat-uikit-react";
45
+
46
+
47
+ function App() {
48
+ const userID = ''; // TODO: Replace with your userID
49
+ const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
50
+ const userSig = ''; // TODO: Replace with your userSig
51
+
52
+ const { status } = useLoginState({
53
+ SDKAppID,
54
+ userID,
55
+ userSig,
56
+ })
57
+
58
+
59
+ if (status !== LoginStatus.SUCCESS) {
60
+ return <div>Loading...</div>
61
+ }
62
+
63
+ // Language support en-US(default) / zh-CN / ja-JP / ko-KR / zh-TW
64
+ // Theme support light(default) / dark
65
+ return (
66
+ <UIKitProvider language='en-US' theme='light'>
67
+ <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
68
+ <ConversationList style={{ minWidth: '300px', maxWidth: '350px' }}/>
69
+ <Chat PlaceholderEmpty=''>
70
+ <ChatHeader />
71
+ <MessageList />
72
+ <MessageInput />
73
+ </Chat>
74
+ </div>
75
+ </UIKitProvider>
76
+ );
77
+ }
78
+
79
+
80
+ export default App;
81
+ ```
82
+
83
+
@@ -0,0 +1,26 @@
1
+ # chat-uikit-react Login
2
+
3
+ This document provides example code for chat-uikit-react login. The component login is driven by the login API provided by useLoginState.
4
+
5
+ ## 1. Login
6
+
7
+ ```tsx
8
+ import { ref } from 'vue';
9
+ import { useLoginState } from '@tencentcloud/chat-uikit-react';
10
+
11
+
12
+ const userID = ''; // TODO: Replace with your userID
13
+ const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
14
+ const userSig = ''; // TODO: Replace with your userSig
15
+
16
+
17
+ const { status } = useLoginState({
18
+ SDKAppID,
19
+ userID,
20
+ userSig,
21
+ })
22
+
23
+ if (status !== LoginStatus.SUCCESS) {
24
+ return <div>Loading...</div>
25
+ }
26
+ ```