@tablestore/tablestore-agent-cli 0.1.3 → 0.1.4

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 (549) hide show
  1. package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +1 -1
  3. package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
  4. package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +27 -27
  5. package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +4 -4
  6. package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +6 -6
  7. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  8. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  9. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
  10. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
  11. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
  12. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
  13. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
  14. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page_client-reference-manifest.js +1 -1
  15. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page_client-reference-manifest.js +1 -1
  16. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page_client-reference-manifest.js +1 -1
  17. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page_client-reference-manifest.js +1 -1
  18. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  19. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page_client-reference-manifest.js +1 -1
  20. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page_client-reference-manifest.js +1 -1
  21. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
  22. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
  23. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
  24. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
  25. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
  26. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
  27. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page/app-paths-manifest.json +3 -0
  28. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page/next-font-manifest.json +1 -1
  29. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page.js +8 -8
  30. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page.js.nft.json +1 -1
  31. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +3 -0
  32. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
  33. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
  34. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  35. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  36. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  37. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  38. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  39. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
  40. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +1 -1
  41. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  42. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  43. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  44. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  45. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  46. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  47. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js +1 -1
  48. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
  49. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js +1 -1
  50. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
  51. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +1 -1
  52. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
  53. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +1 -1
  54. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
  55. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +1 -1
  56. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
  57. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +1 -1
  58. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
  59. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +1 -1
  60. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
  61. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +1 -1
  62. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
  63. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +1 -1
  64. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
  65. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +1 -1
  66. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
  67. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +1 -1
  68. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
  69. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +1 -1
  70. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
  71. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +1 -1
  72. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
  73. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +1 -1
  74. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
  75. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +1 -1
  76. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
  77. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +1 -1
  78. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
  79. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +1 -1
  80. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
  81. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +1 -1
  82. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
  83. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +1 -1
  84. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
  85. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +1 -1
  86. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
  87. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +1 -1
  88. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
  89. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +1 -1
  90. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
  91. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +1 -1
  92. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
  93. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +1 -1
  94. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
  95. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +1 -1
  96. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
  97. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +1 -1
  98. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
  99. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.html +1 -2
  100. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.meta +2 -0
  101. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.rsc +24 -27
  102. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/!KGRhc2hib2FyZCk/chat/__PAGE__.segment.rsc +2 -2
  103. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/!KGRhc2hib2FyZCk/chat.segment.rsc +2 -2
  104. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  105. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/_full.segment.rsc +24 -27
  106. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/_head.segment.rsc +1 -1
  107. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/_index.segment.rsc +1 -1
  108. package/dist/dashboard-runtime/dashboard/.next/server/app/chat.segments/_tree.segment.rsc +1 -1
  109. package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
  110. package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +1 -1
  111. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  112. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +1 -1
  113. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
  114. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +1 -1
  115. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  116. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.html +1 -2
  117. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.meta +2 -0
  118. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.rsc +24 -27
  119. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/!KGRhc2hib2FyZCk/knowledge-base/create/__PAGE__.segment.rsc +2 -2
  120. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/!KGRhc2hib2FyZCk/knowledge-base/create.segment.rsc +1 -1
  121. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/!KGRhc2hib2FyZCk/knowledge-base.segment.rsc +1 -1
  122. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  123. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/_full.segment.rsc +24 -27
  124. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/_head.segment.rsc +1 -1
  125. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/_index.segment.rsc +1 -1
  126. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base/create.segments/_tree.segment.rsc +1 -1
  127. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.html +1 -2
  128. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.meta +2 -0
  129. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.rsc +23 -26
  130. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/!KGRhc2hib2FyZCk/knowledge-base/__PAGE__.segment.rsc +2 -2
  131. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/!KGRhc2hib2FyZCk/knowledge-base.segment.rsc +1 -1
  132. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  133. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/_full.segment.rsc +23 -26
  134. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/_head.segment.rsc +1 -1
  135. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/_index.segment.rsc +1 -1
  136. package/dist/dashboard-runtime/dashboard/.next/server/app/knowledge-base.segments/_tree.segment.rsc +1 -1
  137. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.html +1 -2
  138. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.meta +2 -0
  139. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.rsc +21 -25
  140. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/!KGRhc2hib2FyZCk/llm-providers/new/__PAGE__.segment.rsc +2 -2
  141. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/!KGRhc2hib2FyZCk/llm-providers/new.segment.rsc +1 -1
  142. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/!KGRhc2hib2FyZCk/llm-providers.segment.rsc +2 -2
  143. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  144. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/_full.segment.rsc +21 -25
  145. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/_head.segment.rsc +1 -1
  146. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/_index.segment.rsc +1 -1
  147. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers/new.segments/_tree.segment.rsc +1 -1
  148. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.html +1 -1
  149. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.meta +2 -0
  150. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.rsc +23 -27
  151. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/!KGRhc2hib2FyZCk/llm-providers/__PAGE__.segment.rsc +2 -2
  152. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/!KGRhc2hib2FyZCk/llm-providers.segment.rsc +2 -2
  153. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  154. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/_full.segment.rsc +23 -27
  155. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/_head.segment.rsc +1 -1
  156. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/_index.segment.rsc +1 -1
  157. package/dist/dashboard-runtime/dashboard/.next/server/app/llm-providers.segments/_tree.segment.rsc +1 -1
  158. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.html +1 -2
  159. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.meta +2 -0
  160. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.rsc +26 -28
  161. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/!KGRhc2hib2FyZCk/memory/create/__PAGE__.segment.rsc +2 -2
  162. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/!KGRhc2hib2FyZCk/memory/create.segment.rsc +1 -1
  163. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +2 -2
  164. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  165. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/_full.segment.rsc +26 -28
  166. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/_head.segment.rsc +1 -1
  167. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/_index.segment.rsc +1 -1
  168. package/dist/dashboard-runtime/dashboard/.next/server/app/memory/create.segments/_tree.segment.rsc +1 -1
  169. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.html +1 -2
  170. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.meta +2 -0
  171. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.rsc +24 -27
  172. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +2 -2
  173. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +2 -2
  174. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -9
  175. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/_full.segment.rsc +24 -27
  176. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/_head.segment.rsc +1 -1
  177. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/_index.segment.rsc +1 -1
  178. package/dist/dashboard-runtime/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +1 -1
  179. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  180. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
  181. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +3 -3
  182. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
  183. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
  184. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +1 -1
  185. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  186. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
  187. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +2 -2
  188. package/dist/dashboard-runtime/dashboard/.next/server/app/projects.html +1 -0
  189. package/dist/dashboard-runtime/dashboard/.next/server/app/{instances.meta → projects.meta} +5 -3
  190. package/dist/dashboard-runtime/dashboard/.next/server/app/projects.rsc +34 -0
  191. package/dist/dashboard-runtime/dashboard/.next/server/app/{instances.segments/!KGRhc2hib2FyZCk/instances → projects.segments/!KGRhc2hib2FyZCk/projects}/__PAGE__.segment.rsc +2 -2
  192. package/dist/dashboard-runtime/dashboard/.next/server/app/{instances.segments/!KGRhc2hib2FyZCk/instances.segment.rsc → projects.segments/!KGRhc2hib2FyZCk/projects.segment.rsc} +2 -2
  193. package/dist/dashboard-runtime/dashboard/.next/server/app/projects.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -0
  194. package/dist/dashboard-runtime/dashboard/.next/server/app/projects.segments/_full.segment.rsc +34 -0
  195. package/dist/dashboard-runtime/dashboard/.next/server/app/{instances.segments → projects.segments}/_head.segment.rsc +1 -1
  196. package/dist/dashboard-runtime/dashboard/.next/server/app/{instances.segments → projects.segments}/_index.segment.rsc +1 -1
  197. package/dist/dashboard-runtime/dashboard/.next/server/app/projects.segments/_tree.segment.rsc +3 -0
  198. package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +1 -1
  199. package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0a7o_lg._.js → [root-of-the-server]__07jfil8._.js} +21 -16
  200. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0bfezi5._.js +1 -1
  201. package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0vj8eh_._.js → [root-of-the-server]__0f990w9._.js} +21 -16
  202. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g9--xh._.js +1 -1
  203. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0r4amj5._.js +1 -1
  204. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12lk-nv._.js +1 -1
  205. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12sqoa8._.js +1 -1
  206. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{0p91_next_dist_esm_build_templates_app-page_0ybndzm.js → 0p91_next_dist_esm_build_templates_app-page_0c9pavn.js} +3 -3
  207. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0_bm190._.js → [root-of-the-server]__0ct6ysu._.js} +2 -2
  208. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0getqb1._.js → [root-of-the-server]__0k7~7-.._.js} +1 -1
  209. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0y8rrcu._.js +1 -1
  210. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.a5w1p._.js +1 -1
  211. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0476v7r._.js +3 -0
  212. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ce~2ba._.js +1 -1
  213. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0z0rlpq._.js +1 -1
  214. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_11fl7_r._.js +3 -0
  215. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_(dashboard)_projects_page_actions_0b8.3qe.js +3 -0
  216. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_065m1.j._.js +1 -1
  217. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0o4a.29._.js +1 -1
  218. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0suis9l._.js +6 -2
  219. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
  220. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
  221. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_projects_error_tsx_0lm0vqh._.js +3 -0
  222. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_projects_loading_tsx_0c1mchn._.js +3 -0
  223. package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
  224. package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.js +1 -1
  225. package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.json +1 -1
  226. package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
  227. package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
  228. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
  229. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
  230. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0-ps54o0cl-hh.js → 0-.-yvgh3s-60.js} +1 -1
  231. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0212ujx60nooy.js +1 -0
  232. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ja2he~jl53.n.js +1 -0
  233. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0s3mvx9_dr13c.js +1 -0
  234. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0g_uneyk~9dg0.js → 0sg6z8.ci0l2b.js} +1 -1
  235. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u-_fvx_r85sr.js +1 -0
  236. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~5hi.pq6~znn.js +1 -0
  237. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{13lz27klh_al4.js → 16lab3t3ovnyq.js} +1 -1
  238. package/dist/dashboard-runtime/dashboard/package.json +3 -1
  239. package/dist/dashboard-runtime/dashboard/server.js +1 -1
  240. package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-dialog.tsx +2 -2
  241. package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +62 -9
  242. package/dist/dashboard-runtime/dashboard/src/components/instance/edit-instance-dialog.tsx +19 -5
  243. package/dist/dashboard-runtime/dashboard/src/components/layout/breadcrumb-bar.tsx +1 -0
  244. package/dist/dashboard-runtime/dashboard/src/components/layout/instance-switcher.tsx +41 -8
  245. package/dist/dashboard-runtime/dashboard/src/components/qa/qa-chat-panel.tsx +35 -3
  246. package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +32 -10
  247. package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +62 -16
  248. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
  249. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
  250. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
  251. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
  252. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.d.ts +17 -0
  253. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.d.ts.map +1 -0
  254. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.js +39 -0
  255. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.js.map +1 -0
  256. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +33 -17
  257. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  258. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +159 -207
  259. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  260. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.d.ts.map +1 -1
  261. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.js +2 -1
  262. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.js.map +1 -1
  263. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.d.ts.map +1 -1
  264. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.js +2 -1
  265. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.js.map +1 -1
  266. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +10 -6
  267. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  268. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +37 -42
  269. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  270. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts +5 -3
  271. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
  272. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +92 -30
  273. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
  274. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  275. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/package.json +2 -2
  276. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
  277. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +89 -11
  278. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
  279. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
  280. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
  281. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
  282. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
  283. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
  284. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.d.ts +17 -0
  285. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.d.ts.map +1 -0
  286. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.js +39 -0
  287. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/managed-section-writer.js.map +1 -0
  288. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +33 -17
  289. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  290. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +159 -207
  291. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  292. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.d.ts.map +1 -1
  293. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.js +2 -1
  294. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-oss.js.map +1 -1
  295. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.d.ts.map +1 -1
  296. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.js +2 -1
  297. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/managed-ots.js.map +1 -1
  298. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +10 -6
  299. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  300. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +37 -42
  301. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  302. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts +5 -3
  303. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
  304. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +92 -30
  305. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
  306. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  307. package/dist/node_modules/@tablestore/tablestore-agent-sdk/package.json +2 -2
  308. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
  309. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +89 -11
  310. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
  311. package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
  312. package/package.json +3 -3
  313. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/index.js +0 -2
  314. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/client.js +0 -672
  315. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/config.js +0 -70
  316. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/core.js +0 -30
  317. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/event_listeners.js +0 -199
  318. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/filter.js +0 -204
  319. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/http/node.js +0 -146
  320. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/http/xhr.js +0 -113
  321. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/http.js +0 -81
  322. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/long.js +0 -21
  323. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/metadata.js +0 -65
  324. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/build_proto.sh +0 -4
  325. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/decoder.js +0 -677
  326. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/encoder.js +0 -1593
  327. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/plain_buffer_coded_stream.js +0 -631
  328. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/plain_buffer_consts.js +0 -44
  329. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/plain_buffer_crc8.js +0 -79
  330. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/plain_buffer_stream.js +0 -209
  331. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/plian_buffer_builder.js +0 -252
  332. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/sql.fbs +0 -36
  333. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/sql_generated.js +0 -961
  334. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/tablestore.proto +0 -676
  335. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/tablestore_compiled_proto.js +0 -54728
  336. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/tablestore_filter.proto +0 -45
  337. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/protocol/tablestore_search.proto +0 -1010
  338. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/request.js +0 -235
  339. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/retry/default_retry_policy.js +0 -74
  340. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/retry/retry_util.js +0 -94
  341. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/search.js +0 -209
  342. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/sequential_executor.js +0 -240
  343. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/signer.js +0 -70
  344. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/sql.js +0 -111
  345. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/util-browser.js +0 -756
  346. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/lib/util.js +0 -602
  347. package/dist/dashboard-runtime/dashboard/.next/node_modules/tablestore-c965f3f5727f9a6d/package.json +0 -39
  348. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/instances/page/app-paths-manifest.json +0 -3
  349. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/instances/page_client-reference-manifest.js +0 -3
  350. package/dist/dashboard-runtime/dashboard/.next/server/app/instances.html +0 -1
  351. package/dist/dashboard-runtime/dashboard/.next/server/app/instances.rsc +0 -38
  352. package/dist/dashboard-runtime/dashboard/.next/server/app/instances.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -11
  353. package/dist/dashboard-runtime/dashboard/.next/server/app/instances.segments/_full.segment.rsc +0 -38
  354. package/dist/dashboard-runtime/dashboard/.next/server/app/instances.segments/_tree.segment.rsc +0 -3
  355. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hr5-78._.js +0 -3
  356. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0v1vjve._.js +0 -3
  357. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_(dashboard)_instances_page_actions_0h2z.wc.js +0 -3
  358. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_instances_error_tsx_0n991op._.js +0 -3
  359. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_instances_loading_tsx_0vo~r9q._.js +0 -3
  360. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0--ug1fajm138.js +0 -1
  361. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0014~.2un25~~.js +0 -1
  362. package/dist/dashboard-runtime/dashboard/.next/static/chunks/067_.vm1v8kg3.js +0 -1
  363. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jw5s5e8qwbpx.js +0 -1
  364. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0l75a30.ubt1z.js +0 -1
  365. package/dist/dashboard-runtime/node_modules/@protobufjs/aspromise/index.js +0 -52
  366. package/dist/dashboard-runtime/node_modules/@protobufjs/aspromise/package.json +0 -21
  367. package/dist/dashboard-runtime/node_modules/@protobufjs/base64/index.js +0 -139
  368. package/dist/dashboard-runtime/node_modules/@protobufjs/base64/package.json +0 -21
  369. package/dist/dashboard-runtime/node_modules/@protobufjs/eventemitter/index.js +0 -76
  370. package/dist/dashboard-runtime/node_modules/@protobufjs/eventemitter/package.json +0 -21
  371. package/dist/dashboard-runtime/node_modules/@protobufjs/float/index.js +0 -335
  372. package/dist/dashboard-runtime/node_modules/@protobufjs/float/package.json +0 -26
  373. package/dist/dashboard-runtime/node_modules/@protobufjs/inquire/index.js +0 -17
  374. package/dist/dashboard-runtime/node_modules/@protobufjs/inquire/package.json +0 -21
  375. package/dist/dashboard-runtime/node_modules/@protobufjs/pool/index.js +0 -48
  376. package/dist/dashboard-runtime/node_modules/@protobufjs/pool/package.json +0 -21
  377. package/dist/dashboard-runtime/node_modules/@protobufjs/utf8/index.js +0 -105
  378. package/dist/dashboard-runtime/node_modules/@protobufjs/utf8/package.json +0 -21
  379. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
  380. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
  381. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
  382. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
  383. package/dist/dashboard-runtime/node_modules/flatbuffers/LICENSE.txt +0 -202
  384. package/dist/dashboard-runtime/node_modules/flatbuffers/js/flatbuffers.js +0 -1259
  385. package/dist/dashboard-runtime/node_modules/flatbuffers/js/flatbuffers.mjs +0 -1259
  386. package/dist/dashboard-runtime/node_modules/flatbuffers/package.json +0 -34
  387. package/dist/dashboard-runtime/node_modules/flatbuffers/readme.md +0 -58
  388. package/dist/dashboard-runtime/node_modules/int64-buffer/int64-buffer.js +0 -293
  389. package/dist/dashboard-runtime/node_modules/int64-buffer/package.json +0 -57
  390. package/dist/dashboard-runtime/node_modules/protobufjs/LICENSE +0 -39
  391. package/dist/dashboard-runtime/node_modules/protobufjs/README.md +0 -905
  392. package/dist/dashboard-runtime/node_modules/protobufjs/bin/pbjs +0 -6
  393. package/dist/dashboard-runtime/node_modules/protobufjs/bin/pbts +0 -6
  394. package/dist/dashboard-runtime/node_modules/protobufjs/cli/LICENSE +0 -33
  395. package/dist/dashboard-runtime/node_modules/protobufjs/cli/README.md +0 -174
  396. package/dist/dashboard-runtime/node_modules/protobufjs/cli/bin/pbjs +0 -6
  397. package/dist/dashboard-runtime/node_modules/protobufjs/cli/bin/pbts +0 -6
  398. package/dist/dashboard-runtime/node_modules/protobufjs/cli/index.d.ts +0 -3
  399. package/dist/dashboard-runtime/node_modules/protobufjs/cli/index.js +0 -3
  400. package/dist/dashboard-runtime/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +0 -21
  401. package/dist/dashboard-runtime/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +0 -23
  402. package/dist/dashboard-runtime/node_modules/protobufjs/cli/lib/tsd-jsdoc/plugin.js +0 -21
  403. package/dist/dashboard-runtime/node_modules/protobufjs/cli/lib/tsd-jsdoc/publish.js +0 -705
  404. package/dist/dashboard-runtime/node_modules/protobufjs/cli/lib/tsd-jsdoc.json +0 -18
  405. package/dist/dashboard-runtime/node_modules/protobufjs/cli/package.json +0 -10
  406. package/dist/dashboard-runtime/node_modules/protobufjs/cli/package.standalone.json +0 -32
  407. package/dist/dashboard-runtime/node_modules/protobufjs/cli/pbjs.d.ts +0 -9
  408. package/dist/dashboard-runtime/node_modules/protobufjs/cli/pbjs.js +0 -330
  409. package/dist/dashboard-runtime/node_modules/protobufjs/cli/pbts.d.ts +0 -9
  410. package/dist/dashboard-runtime/node_modules/protobufjs/cli/pbts.js +0 -197
  411. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/json-module.js +0 -38
  412. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/json.js +0 -8
  413. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/proto.js +0 -326
  414. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/proto2.js +0 -10
  415. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/proto3.js +0 -10
  416. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/static-module.js +0 -29
  417. package/dist/dashboard-runtime/node_modules/protobufjs/cli/targets/static.js +0 -711
  418. package/dist/dashboard-runtime/node_modules/protobufjs/cli/util.js +0 -183
  419. package/dist/dashboard-runtime/node_modules/protobufjs/cli/wrappers/amd.js +0 -7
  420. package/dist/dashboard-runtime/node_modules/protobufjs/cli/wrappers/closure.js +0 -7
  421. package/dist/dashboard-runtime/node_modules/protobufjs/cli/wrappers/commonjs.js +0 -7
  422. package/dist/dashboard-runtime/node_modules/protobufjs/cli/wrappers/default.js +0 -15
  423. package/dist/dashboard-runtime/node_modules/protobufjs/cli/wrappers/es6.js +0 -5
  424. package/dist/dashboard-runtime/node_modules/protobufjs/dist/README.md +0 -31
  425. package/dist/dashboard-runtime/node_modules/protobufjs/dist/light/README.md +0 -31
  426. package/dist/dashboard-runtime/node_modules/protobufjs/dist/light/protobuf.js +0 -7326
  427. package/dist/dashboard-runtime/node_modules/protobufjs/dist/light/protobuf.js.map +0 -1
  428. package/dist/dashboard-runtime/node_modules/protobufjs/dist/light/protobuf.min.js +0 -8
  429. package/dist/dashboard-runtime/node_modules/protobufjs/dist/light/protobuf.min.js.map +0 -1
  430. package/dist/dashboard-runtime/node_modules/protobufjs/dist/minimal/README.md +0 -31
  431. package/dist/dashboard-runtime/node_modules/protobufjs/dist/minimal/protobuf.js +0 -2714
  432. package/dist/dashboard-runtime/node_modules/protobufjs/dist/minimal/protobuf.js.map +0 -1
  433. package/dist/dashboard-runtime/node_modules/protobufjs/dist/minimal/protobuf.min.js +0 -8
  434. package/dist/dashboard-runtime/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +0 -1
  435. package/dist/dashboard-runtime/node_modules/protobufjs/dist/protobuf.js +0 -8968
  436. package/dist/dashboard-runtime/node_modules/protobufjs/dist/protobuf.js.map +0 -1
  437. package/dist/dashboard-runtime/node_modules/protobufjs/dist/protobuf.min.js +0 -8
  438. package/dist/dashboard-runtime/node_modules/protobufjs/dist/protobuf.min.js.map +0 -1
  439. package/dist/dashboard-runtime/node_modules/protobufjs/ext/debug/README.md +0 -4
  440. package/dist/dashboard-runtime/node_modules/protobufjs/ext/debug/index.js +0 -71
  441. package/dist/dashboard-runtime/node_modules/protobufjs/ext/descriptor/README.md +0 -72
  442. package/dist/dashboard-runtime/node_modules/protobufjs/ext/descriptor/index.d.ts +0 -191
  443. package/dist/dashboard-runtime/node_modules/protobufjs/ext/descriptor/index.js +0 -1052
  444. package/dist/dashboard-runtime/node_modules/protobufjs/ext/descriptor/test.js +0 -54
  445. package/dist/dashboard-runtime/node_modules/protobufjs/google/LICENSE +0 -27
  446. package/dist/dashboard-runtime/node_modules/protobufjs/google/README.md +0 -1
  447. package/dist/dashboard-runtime/node_modules/protobufjs/google/api/annotations.json +0 -83
  448. package/dist/dashboard-runtime/node_modules/protobufjs/google/api/annotations.proto +0 -11
  449. package/dist/dashboard-runtime/node_modules/protobufjs/google/api/http.json +0 -86
  450. package/dist/dashboard-runtime/node_modules/protobufjs/google/api/http.proto +0 -31
  451. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/api.json +0 -118
  452. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/api.proto +0 -34
  453. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/descriptor.json +0 -739
  454. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/descriptor.proto +0 -286
  455. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/source_context.json +0 -20
  456. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/source_context.proto +0 -7
  457. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/type.json +0 -202
  458. package/dist/dashboard-runtime/node_modules/protobufjs/google/protobuf/type.proto +0 -89
  459. package/dist/dashboard-runtime/node_modules/protobufjs/index.d.ts +0 -2739
  460. package/dist/dashboard-runtime/node_modules/protobufjs/index.js +0 -4
  461. package/dist/dashboard-runtime/node_modules/protobufjs/light.d.ts +0 -2
  462. package/dist/dashboard-runtime/node_modules/protobufjs/light.js +0 -4
  463. package/dist/dashboard-runtime/node_modules/protobufjs/minimal.d.ts +0 -2
  464. package/dist/dashboard-runtime/node_modules/protobufjs/minimal.js +0 -4
  465. package/dist/dashboard-runtime/node_modules/protobufjs/node_modules/.bin/pbjs +0 -16
  466. package/dist/dashboard-runtime/node_modules/protobufjs/node_modules/.bin/pbts +0 -16
  467. package/dist/dashboard-runtime/node_modules/protobufjs/package.json +0 -122
  468. package/dist/dashboard-runtime/node_modules/protobufjs/scripts/postinstall.js +0 -35
  469. package/dist/dashboard-runtime/node_modules/protobufjs/src/common.js +0 -399
  470. package/dist/dashboard-runtime/node_modules/protobufjs/src/converter.js +0 -293
  471. package/dist/dashboard-runtime/node_modules/protobufjs/src/decoder.js +0 -128
  472. package/dist/dashboard-runtime/node_modules/protobufjs/src/encoder.js +0 -100
  473. package/dist/dashboard-runtime/node_modules/protobufjs/src/enum.js +0 -181
  474. package/dist/dashboard-runtime/node_modules/protobufjs/src/field.js +0 -374
  475. package/dist/dashboard-runtime/node_modules/protobufjs/src/index-light.js +0 -104
  476. package/dist/dashboard-runtime/node_modules/protobufjs/src/index-minimal.js +0 -36
  477. package/dist/dashboard-runtime/node_modules/protobufjs/src/index.js +0 -12
  478. package/dist/dashboard-runtime/node_modules/protobufjs/src/mapfield.js +0 -126
  479. package/dist/dashboard-runtime/node_modules/protobufjs/src/message.js +0 -139
  480. package/dist/dashboard-runtime/node_modules/protobufjs/src/method.js +0 -160
  481. package/dist/dashboard-runtime/node_modules/protobufjs/src/namespace.js +0 -434
  482. package/dist/dashboard-runtime/node_modules/protobufjs/src/object.js +0 -243
  483. package/dist/dashboard-runtime/node_modules/protobufjs/src/oneof.js +0 -203
  484. package/dist/dashboard-runtime/node_modules/protobufjs/src/parse.js +0 -820
  485. package/dist/dashboard-runtime/node_modules/protobufjs/src/reader.js +0 -411
  486. package/dist/dashboard-runtime/node_modules/protobufjs/src/reader_buffer.js +0 -51
  487. package/dist/dashboard-runtime/node_modules/protobufjs/src/root.js +0 -363
  488. package/dist/dashboard-runtime/node_modules/protobufjs/src/roots.js +0 -18
  489. package/dist/dashboard-runtime/node_modules/protobufjs/src/rpc/service.js +0 -142
  490. package/dist/dashboard-runtime/node_modules/protobufjs/src/rpc.js +0 -36
  491. package/dist/dashboard-runtime/node_modules/protobufjs/src/service.js +0 -167
  492. package/dist/dashboard-runtime/node_modules/protobufjs/src/tokenize.js +0 -403
  493. package/dist/dashboard-runtime/node_modules/protobufjs/src/type.js +0 -589
  494. package/dist/dashboard-runtime/node_modules/protobufjs/src/types.js +0 -196
  495. package/dist/dashboard-runtime/node_modules/protobufjs/src/typescript.jsdoc +0 -15
  496. package/dist/dashboard-runtime/node_modules/protobufjs/src/util/longbits.js +0 -200
  497. package/dist/dashboard-runtime/node_modules/protobufjs/src/util/minimal.js +0 -421
  498. package/dist/dashboard-runtime/node_modules/protobufjs/src/util.js +0 -212
  499. package/dist/dashboard-runtime/node_modules/protobufjs/src/verifier.js +0 -177
  500. package/dist/dashboard-runtime/node_modules/protobufjs/src/wrappers.js +0 -102
  501. package/dist/dashboard-runtime/node_modules/protobufjs/src/writer.js +0 -465
  502. package/dist/dashboard-runtime/node_modules/protobufjs/src/writer_buffer.js +0 -85
  503. package/dist/dashboard-runtime/node_modules/protobufjs/tsconfig.json +0 -7
  504. package/dist/dashboard-runtime/node_modules/tablestore/index.js +0 -2
  505. package/dist/dashboard-runtime/node_modules/tablestore/lib/client.js +0 -672
  506. package/dist/dashboard-runtime/node_modules/tablestore/lib/config.js +0 -70
  507. package/dist/dashboard-runtime/node_modules/tablestore/lib/core.js +0 -30
  508. package/dist/dashboard-runtime/node_modules/tablestore/lib/event_listeners.js +0 -199
  509. package/dist/dashboard-runtime/node_modules/tablestore/lib/filter.js +0 -204
  510. package/dist/dashboard-runtime/node_modules/tablestore/lib/http/node.js +0 -146
  511. package/dist/dashboard-runtime/node_modules/tablestore/lib/http/xhr.js +0 -113
  512. package/dist/dashboard-runtime/node_modules/tablestore/lib/http.js +0 -81
  513. package/dist/dashboard-runtime/node_modules/tablestore/lib/long.js +0 -21
  514. package/dist/dashboard-runtime/node_modules/tablestore/lib/metadata.js +0 -65
  515. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/build_proto.sh +0 -4
  516. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/decoder.js +0 -677
  517. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/encoder.js +0 -1593
  518. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/plain_buffer_coded_stream.js +0 -631
  519. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/plain_buffer_consts.js +0 -44
  520. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/plain_buffer_crc8.js +0 -79
  521. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/plain_buffer_stream.js +0 -209
  522. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/plian_buffer_builder.js +0 -252
  523. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/sql.fbs +0 -36
  524. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/sql_generated.js +0 -961
  525. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/tablestore.proto +0 -676
  526. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/tablestore_compiled_proto.js +0 -54728
  527. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/tablestore_filter.proto +0 -45
  528. package/dist/dashboard-runtime/node_modules/tablestore/lib/protocol/tablestore_search.proto +0 -1010
  529. package/dist/dashboard-runtime/node_modules/tablestore/lib/request.js +0 -235
  530. package/dist/dashboard-runtime/node_modules/tablestore/lib/retry/default_retry_policy.js +0 -74
  531. package/dist/dashboard-runtime/node_modules/tablestore/lib/retry/retry_util.js +0 -94
  532. package/dist/dashboard-runtime/node_modules/tablestore/lib/search.js +0 -209
  533. package/dist/dashboard-runtime/node_modules/tablestore/lib/sequential_executor.js +0 -240
  534. package/dist/dashboard-runtime/node_modules/tablestore/lib/signer.js +0 -70
  535. package/dist/dashboard-runtime/node_modules/tablestore/lib/sql.js +0 -111
  536. package/dist/dashboard-runtime/node_modules/tablestore/lib/util-browser.js +0 -756
  537. package/dist/dashboard-runtime/node_modules/tablestore/lib/util.js +0 -602
  538. package/dist/dashboard-runtime/node_modules/tablestore/package.json +0 -39
  539. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
  540. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
  541. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
  542. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
  543. /package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page/build-manifest.json +0 -0
  544. /package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page/react-loadable-manifest.json +0 -0
  545. /package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page/server-reference-manifest.json +0 -0
  546. /package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/{instances → projects}/page.js.map +0 -0
  547. /package/dist/dashboard-runtime/dashboard/.next/static/{w-uHfh2BKcsjuH1pgOcYM → 5v9SZKIfkbolPwH_qGQog}/_buildManifest.js +0 -0
  548. /package/dist/dashboard-runtime/dashboard/.next/static/{w-uHfh2BKcsjuH1pgOcYM → 5v9SZKIfkbolPwH_qGQog}/_clientMiddlewareManifest.js +0 -0
  549. /package/dist/dashboard-runtime/dashboard/.next/static/{w-uHfh2BKcsjuH1pgOcYM → 5v9SZKIfkbolPwH_qGQog}/_ssgManifest.js +0 -0
@@ -1,1593 +0,0 @@
1
- var TableStore = require('../core');
2
-
3
- var BaseProto = require('./tablestore_compiled_proto.js');
4
- var tsProtos = BaseProto.main.proto;
5
- var tsFilterProtos = BaseProto.filter.proto;
6
- var tsSearchProtos = BaseProto.search.proto;
7
-
8
-
9
- const COLUMN_CONDITION_TYPE_MAP = {
10
- COMPOSITE_COLUMN_CONDITION: tsFilterProtos.FT_COMPOSITE_COLUMN_VALUE,
11
- SINGLE_COLUMN_CONDITION: tsFilterProtos.FT_SINGLE_COLUMN_VALUE,
12
- };
13
-
14
- TableStore.encoder = {
15
- encode: function (operation, params) {
16
- return tsMap[operation](params);
17
- },
18
-
19
- encodeCreateTable: function (params) {
20
- if (!params.reservedThroughput || !params.tableOptions) {
21
- throw new Error('reservedThroughput and tableOptions are required');
22
- }
23
-
24
- var properties = {};
25
-
26
- var primaryKey = [];
27
- TableStore.util.arrayEach(params.tableMeta.primaryKey, function(pk) {
28
- primaryKey.push({
29
- name: pk.name,
30
- type: TableStore.PrimaryKeyType[pk.type] || pk.type,
31
- option: TableStore.PrimaryKeyOption[pk.option] || pk.option
32
- });
33
- });
34
-
35
- properties.tableMeta = {
36
- tableName: params.tableMeta.tableName,
37
- primaryKey: primaryKey
38
- };
39
-
40
- properties.reservedThroughput = {
41
- capacityUnit: params.reservedThroughput.capacityUnit
42
- };
43
-
44
- if (Object.prototype.toString.call(params.tableMeta.definedColumn) === '[object Array]') {
45
- properties.tableMeta.definedColumn = params.tableMeta.definedColumn;
46
- }
47
-
48
- if (params.tableOptions) {
49
- properties.tableOptions = {
50
- timeToLive: params.tableOptions.timeToLive,
51
- maxVersions: params.tableOptions.maxVersions,
52
- allowUpdate: params.tableOptions.allowUpdate
53
- };
54
- if (params.tableOptions.maxTimeDeviation) {
55
- properties.tableOptions.deviationCellVersionInSec =
56
- params.tableOptions.maxTimeDeviation
57
- }
58
- }
59
- if (params.streamSpecification) {
60
- properties.streamSpec = {
61
- enableStream: params.streamSpecification.enableStream,
62
- expirationTime: params.streamSpecification.expirationTime
63
- }
64
- }
65
- if (Object.prototype.toString.call(params.indexMetas) === '[object Array]') {
66
- var indexMetas = [];
67
- TableStore.util.arrayEach(params.indexMetas, function(meta) {
68
- indexMetas.push({
69
- name: meta.name,
70
- primaryKey: meta.primaryKey,
71
- definedColumn: meta.definedColumn,
72
- indexUpdateMode: meta.indexUpdateMode || TableStore.IndexUpdateMode.IUM_ASYNC_INDEX,//默认增量
73
- indexType: meta.indexType || TableStore.IndexType.IT_GLOBAL_INDEX,//IT_GLOBAL_INDEX
74
- });
75
- });
76
- properties.indexMetas = indexMetas;
77
- }
78
-
79
- var request = tsProtos.CreateTableRequest.create(properties);
80
-
81
- return request;
82
- },
83
- encodeListTable: function () {
84
- var request = tsProtos.ListTableRequest.create();
85
- return request;
86
- },
87
- encodeDeleteTable: function (params) {
88
- var properties = {
89
- tableName: params.tableName
90
- };
91
-
92
- var request = tsProtos.DeleteTableRequest.create(properties);
93
-
94
- return request;
95
- },
96
- encodeUpdateTable: function (params) {
97
- var properties = {
98
- tableName: params.tableName,
99
- tableOptions: {
100
- timeToLive: params.tableOptions.timeToLive,
101
- maxVersions: params.tableOptions.maxVersions,
102
- allowUpdate: params.tableOptions.allowUpdate,
103
- deviationCellVersionInSec: params.tableOptions.maxTimeDeviation
104
- }
105
- };
106
-
107
- if (params.reservedThroughput) {
108
- properties.reservedThroughput = {
109
- capacityUnit: params.reservedThroughput.capacityUnit
110
- };
111
- }
112
-
113
- if (params.streamSpecification) {
114
- properties.streamSpec = {
115
- enableStream: params.streamSpecification.enableStream,
116
- expirationTime: params.streamSpecification.expirationTime
117
- }
118
- }
119
-
120
- var request = tsProtos.UpdateTableRequest.create(properties);
121
-
122
- return request;
123
- },
124
- encodeDescribeTable: function (params) {
125
- var properties = {
126
- tableName: params.tableName
127
- };
128
- var request = tsProtos.DescribeTableRequest.create(properties);
129
- return request;
130
- },
131
-
132
- encodeGetRow: function (params) {
133
- var properties = {
134
- tableName: params.tableName,
135
- primaryKey: TableStore.PlainBufferBuilder.serializePrimaryKey(params.primaryKey),
136
- attributeColumns: params.attributeColumns
137
- };
138
-
139
- if (params.maxVersions) {
140
- properties.maxVersions = params.maxVersions;
141
- } else {
142
- properties.maxVersions = 1;
143
- }
144
-
145
- if (params.columnFilter) {
146
- var filterProperties = {};
147
- TableStore.encoder._makeColumnCondition(filterProperties, params.columnFilter);
148
-
149
- var pbFilter = tsFilterProtos.Filter.create(filterProperties)
150
- var filterWriter = tsFilterProtos.Filter.encode(pbFilter);
151
-
152
- properties.filter = filterWriter.finish();
153
- }
154
-
155
- if (params.timeRange) {
156
- properties.timeRange = {
157
- startTime: params.timeRange.startTime,
158
- endTime: params.timeRange.endTime,
159
- specificTime: params.timeRange.specificTime
160
- };
161
- }
162
-
163
- if (params.startColumn) {
164
- properties.startColumn = params.startColumn;
165
- }
166
- if (params.endColumn) {
167
- properties.endColumn = params.endColumn;
168
- }
169
-
170
- if (params.columnsToGet) {
171
- properties.columnsToGet = params.columnsToGet
172
- }
173
-
174
- if (params.transactionId) {
175
- properties.transactionId = params.transactionId
176
- }
177
-
178
-
179
- if (params.maxVersions) {
180
- properties.maxVersions = params.maxVersions;
181
- } else {
182
- properties.maxVersions = 1;
183
- }
184
-
185
- var request = tsProtos.GetRowRequest.create(properties);
186
-
187
- return request;
188
- },
189
- encodePutRow: function (params) {
190
- var properties = {
191
- tableName: params.tableName,
192
- row: TableStore.PlainBufferBuilder.serializeForPutRow(params.primaryKey, params.attributeColumns)
193
- };
194
-
195
- if (params.condition === undefined || params.condition === null) {
196
- properties.condtion = new TableStore.Condition(TableStore.RowExistenceExpectation.IGNORE, null);
197
- }
198
- properties.condition = {};
199
- TableStore.encoder._makeCondition(properties.condition, params.condition);
200
-
201
- if (params.returnContent && params.returnContent.returnType) {
202
- properties.returnContent = {
203
- returnType: params.returnContent.returnType
204
- };
205
- }
206
-
207
- if (params.transactionId) {
208
- properties.transactionId = params.transactionId
209
- }
210
-
211
- var request = tsProtos.PutRowRequest.create(properties);
212
- return request;
213
- },
214
- encodeUpdateRow: function (params) {
215
- var properties = {
216
- tableName: params.tableName,
217
- rowChange: TableStore.PlainBufferBuilder.serializeForUpdateRow(params.primaryKey, params.updateOfAttributeColumns)
218
- };
219
-
220
- if (params.condition === undefined || params.condition === null) {
221
- params.condtion = new TableStore.Condition(TableStore.RowExistenceExpectation.IGNORE, null);
222
- }
223
- properties.condition = {};
224
- TableStore.encoder._makeCondition(properties.condition, params.condition);
225
-
226
- if (params.returnContent && params.returnContent.returnType) {
227
- properties.returnContent = {
228
- returnType: params.returnContent.returnType,
229
- returnColumnNames: params.returnContent.returnColumns
230
- };
231
- }
232
-
233
- if (params.transactionId) {
234
- properties.transactionId = params.transactionId
235
- }
236
-
237
- var request = tsProtos.UpdateRowRequest.create(properties);
238
-
239
- return request;
240
- },
241
- encodeDeleteRow: function (params) {
242
- var properties = {
243
- tableName: params.tableName,
244
- primaryKey: TableStore.PlainBufferBuilder.serializeForDeleteRow(params.primaryKey)
245
- };
246
-
247
- if (params.condition === undefined || params.condition === null) {
248
- params.condtion = new TableStore.Condition(TableStore.RowExistenceExpectation.IGNORE, null);
249
- }
250
- properties.condition = {};
251
- TableStore.encoder._makeCondition(properties.condition, params.condition);
252
-
253
- if (params.returnContent && params.returnContent.returnType) {
254
- properties.returnContent = {
255
- returnType: params.returnContent.returnType
256
- };
257
- }
258
-
259
- if (params.transactionId) {
260
- properties.transactionId = params.transactionId
261
- }
262
-
263
- var request = tsProtos.DeleteRowRequest.create(properties);
264
-
265
- return request;
266
- },
267
- encodeGetRange: function (params) {
268
- var properties = {
269
- tableName: params.tableName,
270
- inclusiveStartPrimaryKey: TableStore.PlainBufferBuilder.serializePrimaryKey(params.inclusiveStartPrimaryKey),
271
- exclusiveEndPrimaryKey: TableStore.PlainBufferBuilder.serializePrimaryKey(params.exclusiveEndPrimaryKey),
272
- direction: tsProtos.Direction[params.direction]
273
- };
274
-
275
- if (params.maxVersions) {
276
- properties.maxVersions = params.maxVersions;
277
- } else {
278
- properties.maxVersions = 1;
279
- }
280
-
281
- if (params.columnFilter) {
282
- var filterProperties = {};
283
- TableStore.encoder._makeColumnCondition(filterProperties, params.columnFilter);
284
-
285
- var pbFilter = tsFilterProtos.Filter.create(filterProperties);
286
- var filterWriter = tsFilterProtos.Filter.encode(pbFilter);
287
-
288
- properties.filter = filterWriter.finish();
289
- }
290
-
291
- if (params.limit) {
292
- properties.limit = params.limit;
293
- }
294
-
295
- if (params.timeRange) {
296
- properties.timeRange = {
297
- startTime: params.timeRange.startTime,
298
- endTime: params.timeRange.endTime,
299
- specificTime: params.timeRange.specificTime
300
- };
301
- }
302
-
303
- if (params.startColumn) {
304
- properties.startColumn = params.startColumn;
305
- }
306
- if (params.endColumn) {
307
- properties.endColumn = params.endColumn;
308
- }
309
-
310
- if (params.columnsToGet) {
311
- properties.columnsToGet = params.columnsToGet
312
- }
313
-
314
- if (params.transactionId) {
315
- properties.transactionId = params.transactionId
316
- }
317
-
318
- var request = tsProtos.GetRangeRequest.create(properties);
319
-
320
- return request;
321
- },
322
- encodeBatchGetRow: function (params) {
323
- if (params.tables === undefined || params.tables === null) {
324
- throw new Error('params.tables is not correct');
325
- }
326
-
327
- var properties = {
328
- tables: []
329
- };
330
-
331
- for (var i = 0; i < params.tables.length; i++) {
332
- var item = {
333
- tableName: params.tables[i].tableName,
334
- primaryKey: [],
335
- };
336
-
337
- for (var pk in params.tables[i].primaryKey) {
338
- item.primaryKey.push(TableStore.PlainBufferBuilder.serializePrimaryKey(params.tables[i].primaryKey[pk]));
339
- }
340
-
341
- if (params.tables[i].columnFilter) {
342
- var filterProperties = {};
343
- TableStore.encoder._makeColumnCondition(filterProperties, params.tables[i].columnFilter);
344
-
345
- var pbFilter = tsFilterProtos.Filter.create(filterProperties);
346
- var filterWriter = tsFilterProtos.Filter.encode(pbFilter);
347
-
348
- item.filter = filterWriter.finish();
349
- }
350
-
351
- if (params.tables[i].maxVersions) {
352
- item.maxVersions = params.tables[i].maxVersions;
353
- } else {
354
- item.maxVersions = 1;
355
- }
356
-
357
- if (params.tables[i].timeRange) {
358
- item.timeRange = {
359
- startTime: params.tables[i].timeRange.startTime,
360
- endTime: params.tables[i].timeRange.endTime,
361
- specificTime: params.tables[i].timeRange.specificTime
362
- };
363
- }
364
-
365
- if (params.tables[i].startColumn) {
366
- item.startColumn = params.tables[i].startColumn;
367
- }
368
- if (params.tables[i].endColumn) {
369
- item.endColumn = params.tables[i].endColumn;
370
- }
371
-
372
- if (params.tables[i].columnsToGet) {
373
- item.columnsToGet = params.tables[i].columnsToGet
374
- }
375
-
376
- properties.tables.push(item);
377
- }
378
-
379
- if (params.transactionId) {
380
- properties.transactionId = params.transactionId
381
- }
382
-
383
- var request = tsProtos.BatchGetRowRequest.create(properties);
384
-
385
- return request;
386
- },
387
- encodeBatchWriteRow: function (params) {
388
- if (params.tables === undefined || params.tables === null || params.tables.length <= 0) {
389
- throw new Error('params.tables is not correct');
390
- }
391
-
392
- var properties = {
393
- tables: []
394
- };
395
-
396
- for (var i = 0; i < params.tables.length; i++) {
397
- var item = {
398
- tableName: params.tables[i].tableName,
399
- rows: []
400
- };
401
-
402
- for (var attr in params.tables[i].rows) {
403
- var row = {};
404
- var batchWriteType = params.tables[i].rows[attr].type;
405
- row.type = ~["PUT", "UPDATE", "DELETE"].indexOf(batchWriteType) ? TableStore.BatchWriteType[batchWriteType] : batchWriteType;
406
- switch (batchWriteType) {
407
- case 'PUT':
408
- row.rowChange = TableStore.PlainBufferBuilder.serializeForPutRow(
409
- params.tables[i].rows[attr].primaryKey, params.tables[i].rows[attr].attributeColumns);
410
- break;
411
- case 'UPDATE':
412
- row.rowChange = TableStore.PlainBufferBuilder.serializeForUpdateRow(
413
- params.tables[i].rows[attr].primaryKey, params.tables[i].rows[attr].attributeColumns);
414
- break;
415
- case 'DELETE':
416
- row.rowChange = TableStore.PlainBufferBuilder.serializeForDeleteRow(
417
- params.tables[i].rows[attr].primaryKey, params.tables[i].rows[attr].attributeColumns);
418
- break;
419
- default:
420
- throw new Error('batchwriterow type is error:' + params.tables[i].rows[attr].type);
421
- }
422
-
423
- if (params.tables[i].rows[attr].condition) {
424
- row.condition = {};
425
- TableStore.encoder._makeCondition(row.condition, params.tables[i].rows[attr].condition);
426
- }
427
-
428
- if (params.tables[i].rows[attr].returnContent &&
429
- params.tables[i].rows[attr].returnContent.returnType) {
430
- row.returnContent = { returnType: params.tables[i].rows[attr].returnContent.returnType };
431
-
432
- if (params.tables[i].rows[attr].returnContent.returnColumns) {
433
- row.returnContent.returnColumnNames = params.tables[i].rows[attr].returnContent.returnColumns;
434
-
435
- }
436
- }
437
-
438
- item.rows.push(row);
439
- }
440
-
441
- properties.tables.push(item);
442
- }
443
-
444
- if (params.transactionId) {
445
- properties.transactionId = params.transactionId
446
- }
447
-
448
- var request = tsProtos.BatchWriteRowRequest.create(properties);
449
-
450
- return request;
451
- },
452
- _makeColumnCondition: function (proto, column_condition) {
453
- if (column_condition === null) {
454
- return;
455
- }
456
-
457
- if (!column_condition instanceof TableStore.ColumnCondition) {
458
- throw new Error("column condition should be an instance of ColumnCondition");
459
- }
460
-
461
- proto.type = column_condition.getType();
462
- if (proto.type === null) {
463
- throw new Error("column_condition_type should be one of TableStore.ColumnConditionType");
464
- }
465
-
466
- // condition
467
- if (column_condition instanceof TableStore.CompositeCondition) {
468
- proto.filter = TableStore.encoder._makeCompositeCondition(column_condition);
469
- } else if (column_condition instanceof TableStore.SingleColumnCondition) {
470
- proto.filter = TableStore.encoder._makeSingleColumnCondition(column_condition);
471
- } else if (column_condition instanceof TableStore.ColumnPaginationFilter) {
472
- proto.filter = TableStore.encoder._makeColumnPaginationFilter(column_condition);
473
- } else {
474
- throw new Error("expect CompositeCondition, RelationCondition, ColumnPaginationFilter but not ");
475
- }
476
- },
477
- _makeCompositeCondition: function (condition) {
478
- if (condition.combinator === undefined || condition.combinator === null) {
479
- throw new Error("LogicalOperator should be one of TableStore.LogicalOperator");
480
- }
481
- var subFilters = [];
482
- for (sub in condition.sub_conditions) {
483
- var subFilter = {};
484
- TableStore.encoder._makeColumnCondition(subFilter, condition.sub_conditions[sub]);
485
- subFilters.push(subFilter);
486
- }
487
-
488
- var properties = {
489
- combinator: condition.combinator,
490
- subFilters: subFilters
491
- };
492
-
493
- var proto = tsFilterProtos.CompositeColumnValueFilter.create(properties);
494
- var writer = tsFilterProtos.CompositeColumnValueFilter.encode(proto);
495
-
496
- return writer.finish();
497
- },
498
-
499
- _makeSingleColumnCondition: function (condition) {
500
- if (condition.comparator === null) {
501
- throw new Error("ComparatorType should be one of [%s], not %s");
502
- }
503
-
504
- var properties = {
505
- comparator: condition.comparator,
506
- columnName: condition.columnName,
507
- columnValue: TableStore.PlainBufferBuilder.serializeColumnValue(condition.columnValue),
508
- filterIfMissing: !condition.passIfMissing,
509
- latestVersionOnly: condition.latestVersionOnly
510
- };
511
-
512
- var proto = tsFilterProtos.SingleColumnValueFilter.create(properties);
513
- var writer = tsFilterProtos.SingleColumnValueFilter.encode(proto);
514
- return writer.finish();
515
- },
516
- _makeColumnPaginationFilter: function (condition) {
517
- var properties = {
518
- offset: condition.offset,
519
- limit: condition.limit
520
- };
521
-
522
- var proto = tsFilterProtos.ColumnPaginationFilter.create(properties);
523
- var writer = tsFilterProtos.ColumnPaginationFilter.encode(proto);
524
- return writer.finish();
525
- },
526
- _makeCondition: function (proto, condition) {
527
- if (!condition instanceof TableStore.Condition) {
528
- throw new Error("condition should be an instance of TableStore.Condition");
529
- }
530
-
531
- proto.rowExistence = condition.rowExistenceExpectation;
532
- if (proto.rowExistence === undefined || proto.rowExistence === null) {
533
- throw new Error("rowExistenceExpectation should be one of TableStore.RowExistenceExpectation");
534
- }
535
-
536
- if (condition.columnCondition != null) {
537
- var properties = {};
538
- TableStore.encoder._makeColumnCondition(properties, condition.columnCondition);
539
- var pbFilter = tsFilterProtos.Filter.create(properties);
540
- var filterWriter = tsFilterProtos.Filter.encode(pbFilter);
541
-
542
- proto.columnCondition = filterWriter.finish();
543
- }
544
- },
545
- encodeListSearchIndex: function (params) {
546
- var request = tsSearchProtos.ListSearchIndexRequest.create({
547
- tableName: params.tableName
548
- });
549
- return request;
550
- },
551
- encodeDescribeSearchIndex: function (params) {
552
- var request = tsSearchProtos.DescribeSearchIndexRequest.create({
553
- tableName: params.tableName,
554
- indexName: params.indexName
555
- });
556
- return request;
557
- },
558
- encodeUpdateSearchIndex: function (params) {
559
- return tsSearchProtos.UpdateSearchIndexRequest.create({
560
- tableName: params.tableName,
561
- indexName: params.indexName,
562
- timeToLive: params.timeToLive,
563
- });
564
- },
565
- encodeCreateSearchIndex: function (params) {
566
- const properties = {
567
- tableName: params.tableName,
568
- indexName: params.indexName,
569
- sourceIndexName: params.sourceIndexName,
570
- timeToLive: params.timeToLive,
571
- schema: TableStore.encoder._makeIndexSchema(params.schema)
572
- };
573
-
574
- var request = tsSearchProtos.CreateSearchIndexRequest.create(properties);
575
-
576
- return request;
577
- },
578
- _makeIndexSchema: function(schema) {
579
- var properties = {
580
- fieldSchemas: TableStore.encoder._makeFieldSchemaArray(schema.fieldSchemas),
581
- indexSetting: TableStore.encoder._makeIndexSetting(schema.indexSetting)
582
- };
583
- if (schema.indexSort) {
584
- properties.indexSort = TableStore.encoder._makeSort(schema.indexSort);
585
- }
586
- var indexSchema = tsSearchProtos.IndexSchema.create(properties);
587
-
588
- return indexSchema;
589
- },
590
- _makeSingleWordAnalyzerParameter: function(aParameter) {
591
- const properties = {
592
- caseSensitive: aParameter.caseSensitive,
593
- delimitWord: aParameter.delimitWord,
594
- };
595
- return tsSearchProtos.SingleWordAnalyzerParameter.encode(properties).finish();
596
- },
597
- _makeSplitAnalyzerParameter: function(aParameter) {
598
- const properties = {
599
- delimiter: aParameter.delimiter,
600
- };
601
- return tsSearchProtos.SplitAnalyzerParameter.encode(properties).finish();
602
- },
603
- _makeFuzzyAnalyzerParameter: function(aParameter) {
604
- const properties = {
605
- minChars: aParameter.minChars,
606
- maxChars: aParameter.maxChars,
607
- };
608
- return tsSearchProtos.FuzzyAnalyzerParameter.encode(properties).finish();
609
- },
610
- _makeAnalyzerParameter: function(schema) {
611
- if (schema.analyzer) {
612
- if (schema.analyzer === "single_word") {
613
- return TableStore.encoder._makeSingleWordAnalyzerParameter(schema.analyzerParameter);
614
- }
615
- if (schema.analyzer === "split") {
616
- return TableStore.encoder._makeSplitAnalyzerParameter(schema.analyzerParameter);
617
- }
618
- if (schema.analyzer === "fuzzy") {
619
- return TableStore.encoder._makeFuzzyAnalyzerParameter(schema.analyzerParameter);
620
- }
621
- }
622
- return null
623
- },
624
- _makeFieldSchemaArray: function(fieldSchemaArray) {
625
- if (!fieldSchemaArray) return null;
626
-
627
- var fieldSchemas = [];
628
- TableStore.util.arrayEach(fieldSchemaArray, function(fieldSchema) {
629
- fieldSchemas.push(TableStore.encoder._makeFieldSchema(fieldSchema));
630
- });
631
- return fieldSchemas;
632
- },
633
- _makeFieldSchema: function(aFieldSchema) {
634
- const properties = {
635
- fieldName: aFieldSchema.fieldName,
636
- fieldType: aFieldSchema.fieldType,
637
- indexOptions: aFieldSchema.indexOptions || null,
638
- enableHighlighting: aFieldSchema.enableHighlighting || null,
639
- analyzer: aFieldSchema.analyzer || null,
640
- index: aFieldSchema.index || null,
641
- docValues: aFieldSchema.enableSortAndAgg || null,
642
- store: aFieldSchema.store || null,
643
- isArray: aFieldSchema.isAnArray || null,
644
- fieldSchemas: TableStore.encoder._makeFieldSchemaArray(aFieldSchema.fieldSchemas),
645
- analyzerParameter: TableStore.encoder._makeAnalyzerParameter(aFieldSchema),
646
- isVirtualField: aFieldSchema.isVirtualField || null,
647
- sourceFieldNames: aFieldSchema.sourceFieldNames || null,
648
- dateFormats: aFieldSchema.dateFormats || null,
649
- vectorOptions: aFieldSchema.vectorOptions || null,
650
- };
651
-
652
- return tsSearchProtos.FieldSchema.create(properties);
653
- },
654
- _makeIndexSetting: function(aIndexSetting) {
655
- var properties = {
656
- numberOfShards: 1,
657
- routingFields: aIndexSetting && aIndexSetting.routingFields || null,
658
- routingPartitionSize: aIndexSetting && aIndexSetting.routingPartitionSize || null
659
- };
660
-
661
- var indexSetting = tsSearchProtos.IndexSetting.create(properties);
662
-
663
- return indexSetting;
664
- },
665
- encodeDeleteSearchIndex: function (params) {
666
- var properties = {
667
- tableName: params.tableName,
668
- indexName: params.indexName
669
- };
670
- var request = tsSearchProtos.DeleteSearchIndexRequest.create(properties);
671
-
672
- return request;
673
- },
674
- encodeSearch: function (params) {
675
- const properties = {
676
- tableName: params.tableName,
677
- indexName: params.indexName,
678
- searchQuery: TableStore.encoder._makeSearchQuery(params.searchQuery),
679
- columnsToGet: TableStore.encoder._makeColumnToGet(params.columnToGet),
680
- timeoutMs: params.timeoutMs || 10000
681
- };
682
-
683
- if (Object.prototype.toString.call(params.routingValues) === '[object Array]') {
684
- properties.routingValues = TableStore.encoder._makeRoutingValues(params.routingValues);
685
- }
686
-
687
- return tsSearchProtos.SearchRequest.create(properties);
688
- },
689
- encodeComputeSplits: function (params) {
690
- let properties = {
691
- tableName: params.tableName,
692
- };
693
- if (params.searchIndexSplitsOptions) {
694
- properties.searchIndexSplitsOptions = {
695
- indexName: params.searchIndexSplitsOptions.indexName,
696
- }
697
- }
698
- return tsSearchProtos.ComputeSplitsRequest.create(properties);
699
- },
700
- encodeParallelScan: function (params) {
701
- let properties = {
702
- tableName: params.tableName,
703
- indexName: params.indexName,
704
- columnsToGet: TableStore.encoder._makeColumnToGet(params.columnToGet),
705
- sessionId: params.sessionId,
706
- scanQuery: TableStore.encoder._makeScanQuery(params.scanQuery),
707
- timeoutMs: params.timeoutMs || 20000
708
- };
709
- return tsSearchProtos.ParallelScanRequest.create(properties);
710
- },
711
- _makeScanQuery(aScanQuery) {
712
- let properties = {
713
- query: TableStore.encoder._makeQuery(aScanQuery.query),
714
- limit: aScanQuery.limit,
715
- aliveTime: aScanQuery.aliveTime,
716
- token: aScanQuery.token,
717
- currentParallelId: aScanQuery.currentParallelId,
718
- maxParallel: aScanQuery.maxParallel,
719
- };
720
- return tsSearchProtos.ScanQuery.create(properties);
721
- },
722
- _makeSearchQuery(aSearchQuery) {
723
- var properties = {
724
- offset: aSearchQuery.offset,
725
- limit: aSearchQuery.limit,
726
- query: TableStore.encoder._makeQuery(aSearchQuery.query),
727
- getTotalCount: aSearchQuery.getTotalCount || false
728
- };
729
-
730
- if (aSearchQuery.token) {
731
- properties.token = aSearchQuery.token;
732
- }
733
- if (aSearchQuery.sort) {
734
- properties.sort = TableStore.encoder._makeSort(aSearchQuery.sort);
735
- }
736
- if (aSearchQuery.aggs) {
737
- properties.aggs = TableStore.encoder._makeAggregations(aSearchQuery.aggs)
738
- }
739
- if (aSearchQuery.groupBys) {
740
- properties.groupBys = TableStore.encoder._makeGroupBys(aSearchQuery.groupBys)
741
- }
742
- if(aSearchQuery.highlight) {
743
- properties.highlight = TableStore.encoder._makeHighlight(aSearchQuery.highlight);
744
- }
745
- if (aSearchQuery.collapse) {
746
- properties.collapse = TableStore.encoder._makeCollapse(aSearchQuery.collapse)
747
- }
748
- var searchQuery = tsSearchProtos.SearchQuery.create(properties);
749
- var writer = tsSearchProtos.SearchQuery.encode(searchQuery);
750
-
751
- return writer.finish();
752
- },
753
- _makeQuery(aQuery) {
754
- var query = TableStore.encoder._constrctQueryParam(aQuery.queryType, aQuery.query);
755
- var writer = Object.getPrototypeOf(query).constructor.encode(query);
756
-
757
- var properties = {
758
- type: aQuery.queryType,
759
- query: writer.finish()
760
- };
761
-
762
- var query = tsSearchProtos.Query.create(properties);
763
-
764
- return query;
765
- },
766
- _makeCollapse(aCollapse) {
767
- const properties = {};
768
- if (aCollapse.fieldName) {
769
- properties.fieldName = aCollapse.fieldName;
770
- }
771
- return tsSearchProtos.Collapse.create(properties);
772
- },
773
- _makeAggregations(aggs) {
774
- let aggArray = [];
775
- for (let agg of aggs.aggs) {
776
- aggArray.push(TableStore.encoder._makeAggregation(agg));
777
- }
778
- return {aggs: aggArray};
779
- },
780
- _makeAggregation(agg) {
781
- const aggBody = TableStore.encoder._constructAggregationParam(agg.type, agg.body);
782
- const writer = Object.getPrototypeOf(aggBody).constructor.encode(aggBody);
783
- const properties = {
784
- name: agg.name,
785
- type: agg.type,
786
- body: writer.finish(),
787
- };
788
- return tsSearchProtos.Aggregation.create(properties);
789
- },
790
- _constructAggregationParam(aggType, agg) {
791
- switch (aggType) {
792
- case TableStore.AggregationType.AGG_AVG: {
793
- const properties = {
794
- fieldName: agg.fieldName,
795
- };
796
- if (agg.missing) {
797
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
798
- }
799
- return tsSearchProtos.AvgAggregation.create(properties);
800
- }
801
- case TableStore.AggregationType.AGG_MAX: {
802
- const properties = {
803
- fieldName: agg.fieldName,
804
- };
805
- if (agg.missing) {
806
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
807
- }
808
- return tsSearchProtos.MaxAggregation.create(properties);
809
- }
810
- case TableStore.AggregationType.AGG_MIN: {
811
- const properties = {
812
- fieldName: agg.fieldName,
813
- };
814
- if (agg.missing) {
815
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
816
- }
817
- return tsSearchProtos.MinAggregation.create(properties);
818
- }
819
- case TableStore.AggregationType.AGG_SUM: {
820
- const properties = {
821
- fieldName: agg.fieldName,
822
- };
823
- if (agg.missing) {
824
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
825
- }
826
- return tsSearchProtos.SumAggregation.create(properties);
827
- }
828
- case TableStore.AggregationType.AGG_COUNT: {
829
- const properties = {
830
- fieldName: agg.fieldName,
831
- };
832
- return tsSearchProtos.CountAggregation.create(properties);
833
- }
834
- case TableStore.AggregationType.AGG_DISTINCT_COUNT: {
835
- const properties = {
836
- fieldName: agg.fieldName,
837
- };
838
- if (agg.missing) {
839
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
840
- }
841
- return tsSearchProtos.DistinctCountAggregation.create(properties);
842
- }
843
- case TableStore.AggregationType.AGG_TOP_ROWS: {
844
- const properties = {
845
- limit: agg.limit,
846
- };
847
- if (agg.sort) {
848
- properties.sort = TableStore.encoder._makeSort(agg.sort);
849
- }
850
- return tsSearchProtos.TopRowsAggregation.create(properties);
851
- }
852
- case TableStore.AggregationType.AGG_PERCENTILES: {
853
- const properties = {
854
- fieldName: agg.fieldName,
855
- percentiles: agg.percentiles,
856
- };
857
- if (agg.missing) {
858
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(agg.missing, "agg.missing");
859
- }
860
- return tsSearchProtos.PercentilesAggregation.create(properties);
861
- }
862
- default:
863
- throw new Error("not exist AggregationType: " + aggType);
864
- }
865
- },
866
- _makeGroupBys(group_bys) {
867
- let groupByArray = [];
868
- for (let groupBy of group_bys.groupBys) {
869
- groupByArray.push(TableStore.encoder._makeGroupBy(groupBy));
870
- }
871
- return {groupBys: groupByArray};
872
- },
873
- _makeGroupBy(groupBy) {
874
- const groupByBody = TableStore.encoder._constructGroupByParam(groupBy.type, groupBy.body);
875
- const writer = Object.getPrototypeOf(groupByBody).constructor.encode(groupByBody);
876
- const properties = {
877
- name: groupBy.name,
878
- type: groupBy.type,
879
- body: writer.finish(),
880
- };
881
- return tsSearchProtos.GroupBy.create(properties);
882
- },
883
- _constructGroupByParam(groupByType, groupBy) {
884
- switch (groupByType) {
885
- case TableStore.GroupByType.GROUP_BY_FIELD: {
886
- let properties = {
887
- fieldName: groupBy.fieldName,
888
- size: groupBy.size,
889
- minDocCount: groupBy.minDocCount,
890
- };
891
- if (groupBy.sort) {
892
- properties.sort = TableStore.encoder._makeGroupBySort(groupBy.sort);
893
- }
894
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
895
- return tsSearchProtos.GroupByField.create(properties);
896
- }
897
- case TableStore.GroupByType.GROUP_BY_RANGE: {
898
- const properties = {
899
- fieldName: groupBy.fieldName,
900
- ranges: TableStore.encoder._makeRange(groupBy.ranges),
901
- };
902
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
903
- return tsSearchProtos.GroupByRange.create(properties);
904
- }
905
- case TableStore.GroupByType.GROUP_BY_FILTER: {
906
- const properties = {
907
- filters: [],
908
- };
909
- TableStore.util.arrayEach(groupBy.filters, function (f) {
910
- let q = TableStore.encoder._makeQuery(f)
911
- properties.filters.push(q);
912
- });
913
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
914
- return tsSearchProtos.GroupByFilter.create(properties);
915
- }
916
- case TableStore.GroupByType.GROUP_BY_GEO_DISTANCE: {
917
- const properties = {
918
- fieldName: groupBy.fieldName,
919
- ranges: TableStore.encoder._makeRange(groupBy.ranges),
920
- origin: tsSearchProtos.GeoPoint.create(groupBy.origin),
921
- };
922
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
923
- return tsSearchProtos.GroupByGeoDistance.create(properties);
924
- }
925
- case TableStore.GroupByType.GROUP_BY_HISTOGRAM: {
926
- const properties = {
927
- fieldName: groupBy.fieldName,
928
- minDocCount: groupBy.minDocCount,
929
- };
930
- if (groupBy.sort) {
931
- properties.sort = TableStore.encoder._makeGroupBySort(groupBy.sort);
932
- }
933
- if (groupBy.fieldRange) {
934
- properties.fieldRange = TableStore.encoder._makeFieldRange(groupBy.fieldRange);
935
- }
936
- if (groupBy.interval) {
937
- properties.interval = TableStore.PlainBufferBuilder.serializeSearchValue(groupBy.interval, "groupBy.interval");
938
- }
939
- if (groupBy.missing) {
940
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(groupBy.missing, "groupByHistogram.missing");
941
- }
942
- if (groupBy.offset) {
943
- properties.offset = TableStore.PlainBufferBuilder.serializeSearchValue(groupBy.offset, "groupByHistogram.offset");
944
- }
945
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy)
946
- return tsSearchProtos.GroupByHistogram.create(properties);
947
- }
948
- case TableStore.GroupByType.GROUP_BY_DATE_HISTOGRAM: {
949
- const properties = {
950
- fieldName: groupBy.fieldName,
951
- minDocCount: groupBy.minDocCount,
952
- };
953
- if (groupBy.sort) {
954
- properties.sort = TableStore.encoder._makeGroupBySort(groupBy.sort);
955
- }
956
- if (groupBy.fieldRange) {
957
- properties.fieldRange = TableStore.encoder._makeFieldRange(groupBy.fieldRange);
958
- }
959
- if (groupBy.interval) {
960
- properties.interval = TableStore.encoder._makeDateTimeValue(groupBy.interval);
961
- }
962
- if (groupBy.missing) {
963
- properties.missing = TableStore.PlainBufferBuilder.serializeSearchValue(groupBy.missing, "groupByDateHistogram.missing");
964
- }
965
- if (groupBy.offset) {
966
- properties.offset = TableStore.encoder._makeDateTimeValue(groupBy.offset);
967
- }
968
- if (groupBy.timeZone) {
969
- properties.timeZone = groupBy.timeZone;
970
- }
971
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
972
- return tsSearchProtos.GroupByDateHistogram.create(properties);
973
- }
974
- case TableStore.GroupByType.GROUP_BY_GEO_GRID: {
975
- const properties = {
976
- fieldName: groupBy.fieldName,
977
- };
978
- if (groupBy.precision) {
979
- properties.precision = groupBy.precision;
980
- }
981
- if (groupBy.size) {
982
- properties.size = groupBy.size;
983
- }
984
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
985
- return tsSearchProtos.GroupByGeoGrid.create(properties);
986
- }
987
- case TableStore.GroupByType.GROUP_BY_COMPOSITE: {
988
- const properties = {};
989
- if (groupBy.nextToken) {
990
- properties.nextToken = groupBy.nextToken;
991
- }
992
- if (groupBy.size) {
993
- properties.size = groupBy.size;
994
- }
995
- if (groupBy.sources) {
996
- properties.sources = TableStore.encoder._makeGroupBys(groupBy.sources);
997
- }
998
- TableStore.encoder._makeSubAggsAndSubGroupBys(properties, groupBy);
999
- return tsSearchProtos.GroupByComposite.create(properties);
1000
- }
1001
- default:
1002
- throw new Error("not exist GroupByType: " + groupByType);
1003
- }
1004
- },
1005
- _makeSubAggsAndSubGroupBys(properties, groupBy){
1006
- if (groupBy.subAggs) {
1007
- properties.subAggs = TableStore.encoder._makeAggregations(groupBy.subAggs);
1008
- }
1009
- if (groupBy.subGroupBys) {
1010
- properties.subGroupBys = TableStore.encoder._makeGroupBys(groupBy.subGroupBys);
1011
- }
1012
- },
1013
- _makeRange(aRanges) {
1014
- let ranges = []
1015
- TableStore.util.arrayEach(aRanges, function (range) {
1016
- ranges.push(tsSearchProtos.Range.create(range));
1017
- });
1018
- return ranges;
1019
- },
1020
- _makeFieldRange(aFieldRange) {
1021
- return {
1022
- min: TableStore.PlainBufferBuilder.serializeSearchValue(aFieldRange.min, "FieldRange.min"),
1023
- max: TableStore.PlainBufferBuilder.serializeSearchValue(aFieldRange.max, "FieldRange.max"),
1024
- };
1025
- },
1026
- _constrctQueryParam(queryType, aQuery) {
1027
- switch (queryType) {
1028
- case TableStore.QueryType.MATCH_QUERY://1
1029
- var properties = {
1030
- fieldName: aQuery.fieldName,
1031
- text: aQuery.text,
1032
- weight: aQuery.weight,
1033
- };
1034
- if (typeof aQuery.minimumShouldMatch === "number") {
1035
- properties.minimumShouldMatch = aQuery.minimumShouldMatch;
1036
- }
1037
- if (aQuery.operator) {
1038
- properties.operator = aQuery.operator
1039
- }
1040
-
1041
- var matchQuery = tsSearchProtos.MatchQuery.create(properties);
1042
-
1043
- return matchQuery;
1044
- break;
1045
- case TableStore.QueryType.MATCH_PHRASE_QUERY://2
1046
- var properties = {
1047
- fieldName: aQuery.fieldName,
1048
- text: aQuery.text,
1049
- weight: aQuery.weight,
1050
- };
1051
- var matchPhraseQuery = tsSearchProtos.MatchPhraseQuery.create(properties);
1052
-
1053
- return matchPhraseQuery;
1054
- break;
1055
- case TableStore.QueryType.TERM_QUERY://3
1056
- var properties = {
1057
- fieldName: aQuery.fieldName,
1058
- term: TableStore.PlainBufferBuilder.serializeSearchValue(aQuery.term, "term"),
1059
- weight: aQuery.weight,
1060
- };
1061
- var termQuery = tsSearchProtos.TermQuery.create(properties);
1062
-
1063
- return termQuery;
1064
- break;
1065
- case TableStore.QueryType.RANGE_QUERY://4
1066
- var properties = {
1067
- fieldName: aQuery.fieldName
1068
- };
1069
- if (aQuery.rangeFrom !== undefined && aQuery.rangeFrom !== null) {
1070
- properties.rangeFrom= TableStore.PlainBufferBuilder.serializeSearchValue(aQuery.rangeFrom, "rangeFrom");
1071
- if (aQuery.includeLower !== undefined) {
1072
- properties.includeLower = aQuery.includeLower;
1073
- }
1074
- }
1075
- if (aQuery.rangeTo !== undefined && aQuery.rangeTo !== null) {
1076
- properties.rangeTo= TableStore.PlainBufferBuilder.serializeSearchValue(aQuery.rangeTo, "rangeTo");
1077
- if (aQuery.includeUpper !== undefined) {
1078
- properties.includeUpper = aQuery.includeUpper;
1079
- }
1080
- }
1081
-
1082
- var rangeQuery = tsSearchProtos.RangeQuery.create(properties);
1083
-
1084
- return rangeQuery;
1085
- break;
1086
- case TableStore.QueryType.PREFIX_QUERY://5
1087
- var properties = {
1088
- fieldName: aQuery.fieldName,
1089
- prefix: aQuery.prefix,
1090
- weight: aQuery.weight,
1091
- };
1092
-
1093
- var prefixQuery = tsSearchProtos.PrefixQuery.create(properties);
1094
-
1095
- return prefixQuery;
1096
- break;
1097
- case TableStore.QueryType.BOOL_QUERY://6
1098
- var properties = {};
1099
-
1100
- if (Object.prototype.toString.call(aQuery.mustQueries) === '[object Array]') {
1101
- properties.mustQueries = [];
1102
- TableStore.util.arrayEach(aQuery.mustQueries, function (query) {
1103
- properties.mustQueries.push(TableStore.encoder._makeQuery(query));
1104
- })
1105
- }
1106
- if (Object.prototype.toString.call(aQuery.mustNotQueries) === '[object Array]') {
1107
- properties.mustNotQueries = [];
1108
- TableStore.util.arrayEach(aQuery.mustNotQueries, function (query) {
1109
- properties.mustNotQueries.push(TableStore.encoder._makeQuery(query));
1110
- })
1111
- }
1112
- if (Object.prototype.toString.call(aQuery.filterQueries) === '[object Array]') {
1113
- properties.filterQueries = [];
1114
- TableStore.util.arrayEach(aQuery.filterQueries, function (query) {
1115
- properties.filterQueries.push(TableStore.encoder._makeQuery(query));
1116
- })
1117
- }
1118
- if (Object.prototype.toString.call(aQuery.shouldQueries) === '[object Array]') {
1119
- if (typeof aQuery.minimumShouldMatch !== 'number' || aQuery.minimumShouldMatch % 1 !== 0) {
1120
- throw new Error("Expect minimumShouldMatch which should be an int32 number");
1121
- }
1122
- properties.minimumShouldMatch = aQuery.minimumShouldMatch;
1123
- properties.shouldQueries = [];
1124
- TableStore.util.arrayEach(aQuery.shouldQueries, function (query) {
1125
- properties.shouldQueries.push(TableStore.encoder._makeQuery(query));
1126
- })
1127
- }
1128
-
1129
- var boolQuery = tsSearchProtos.BoolQuery.create(properties);
1130
-
1131
- return boolQuery;
1132
- break;
1133
- case TableStore.QueryType.CONST_SCORE_QUERY://7
1134
- var properties = {
1135
- filter: TableStore.encoder._makeQuery(aQuery.filter)
1136
- };
1137
- var constScoreQuery = tsSearchProtos.ConstScoreQuery.create(properties);
1138
-
1139
- return constScoreQuery;
1140
- break;
1141
- case TableStore.QueryType.FUNCTION_SCORE_QUERY://8
1142
- var properties = {
1143
- query: TableStore.encoder._makeQuery(aQuery.query)
1144
- };
1145
-
1146
- if (!aQuery.fieldValueFactor || typeof aQuery.fieldValueFactor.fieldName !== 'string') {
1147
- throw new Error("Except fieldValueFactor.fieldName which should be string");
1148
- }
1149
- var fieldValueFactorProperties = {
1150
- fieldName: aQuery.fieldValueFactor.fieldName
1151
- };
1152
- var fieldValueFactor = tsSearchProtos.FieldValueFactor.create(fieldValueFactorProperties);
1153
-
1154
- properties.fieldValueFactor = fieldValueFactor;
1155
-
1156
- var functionScoreQuery = tsSearchProtos.FunctionScoreQuery.create(properties);
1157
-
1158
- return functionScoreQuery;
1159
- break;
1160
- case TableStore.QueryType.NESTED_QUERY://9
1161
- var properties = {
1162
- path: aQuery.path,
1163
- query: TableStore.encoder._makeQuery(aQuery.query),
1164
- scoreMode: aQuery.scoreMode || TableStore.ScoreMode.SCORE_MODE_AVG,
1165
- weight: aQuery.weight,
1166
- };
1167
- if (aQuery.innerHits) {
1168
- properties.innerHits = TableStore.encoder._makeInnerHits(aQuery.innerHits);
1169
- }
1170
-
1171
- var nestedQeury = tsSearchProtos.NestedQuery.create(properties);
1172
-
1173
- return nestedQeury;
1174
- break;
1175
- case TableStore.QueryType.WILDCARD_QUERY://10
1176
- var properties = {
1177
- fieldName: aQuery.fieldName,
1178
- value: aQuery.value,
1179
- weight: aQuery.weight,
1180
- };
1181
-
1182
- var wildcardQuery = tsSearchProtos.WildcardQuery.create(properties);
1183
-
1184
- return wildcardQuery;
1185
- break;
1186
- case TableStore.QueryType.MATCH_ALL_QUERY://11
1187
- var matchAllQuery = tsSearchProtos.MatchAllQuery.create();
1188
-
1189
- return matchAllQuery;
1190
- break;
1191
- case TableStore.QueryType.GEO_BOUNDING_BOX_QUERY://12
1192
- var properties = {
1193
- fieldName: aQuery.fieldName,
1194
- topLeft: aQuery.topLeft,
1195
- bottomRight: aQuery.bottomRight
1196
- };
1197
- var geoBoundingBoxQuery = tsSearchProtos.GeoBoundingBoxQuery.create(properties);
1198
-
1199
- return geoBoundingBoxQuery;
1200
- break;
1201
- case TableStore.QueryType.GEO_DISTANCE_QUERY://13
1202
- var properties = {
1203
- fieldName: aQuery.fieldName,
1204
- centerPoint: aQuery.centerPoint,
1205
- distance: aQuery.distance
1206
- };
1207
- var geoDistanceQuery = tsSearchProtos.GeoDistanceQuery.create(properties);
1208
-
1209
- return geoDistanceQuery;
1210
- break;
1211
- case TableStore.QueryType.GEO_POLYGON_QUERY://14
1212
- var properties = {
1213
- fieldName: aQuery.fieldName,
1214
- points: aQuery.points
1215
- };
1216
- var geoPolygonQuery = tsSearchProtos.GeoPolygonQuery.create(properties);
1217
-
1218
- return geoPolygonQuery;
1219
- break;
1220
- case TableStore.QueryType.TERMS_QUERY://15
1221
- var properties = {
1222
- fieldName: aQuery.fieldName,
1223
- terms: TableStore.encoder._makeTerms(aQuery.terms),
1224
- weight: aQuery.weight,
1225
- };
1226
- var termsQuery = tsSearchProtos.TermsQuery.create(properties);
1227
-
1228
- return termsQuery;
1229
- break;
1230
- case TableStore.QueryType.EXISTS_QUERY://16
1231
- var properties = {
1232
- fieldName: aQuery.fieldName
1233
- };
1234
- var termsQuery = tsSearchProtos.TermsQuery.create(properties);
1235
-
1236
- return termsQuery;
1237
- break;
1238
- case TableStore.QueryType.KNN_VECTOR_QUERY://17
1239
- var properties = {
1240
- fieldName: aQuery.fieldName,
1241
- }
1242
- if (aQuery.topK) {
1243
- properties.topK = aQuery.topK;
1244
- }
1245
- if (aQuery.float32QueryVector) {
1246
- properties.float32QueryVector = aQuery.float32QueryVector;
1247
- }
1248
- if (aQuery.filter) {
1249
- properties.filter = TableStore.encoder._makeQuery(aQuery.filter);
1250
- }
1251
- if (aQuery.weight) {
1252
- properties.weight = aQuery.weight;
1253
- }
1254
- var knnVectorQuery = tsSearchProtos.KnnVectorQuery.create(properties);
1255
-
1256
- return knnVectorQuery;
1257
- break;
1258
- case TableStore.QueryType.FUNCTIONS_SCORE_QUERY://18
1259
- var properties = {};
1260
- if(aQuery.query){
1261
- properties.query = TableStore.encoder._makeQuery(aQuery.query);
1262
- }
1263
- if(aQuery.minScore){
1264
- properties.minScore = aQuery.minScore;
1265
- }
1266
- if(aQuery.maxScore){
1267
- properties.maxScore = aQuery.maxScore;
1268
- }
1269
- if(aQuery.scoreMode){
1270
- properties.scoreMode = aQuery.scoreMode;
1271
- }
1272
- if(aQuery.combineMode){
1273
- properties.combineMode = aQuery.combineMode;
1274
- }
1275
- properties.functions = [];
1276
- if(aQuery.functions){
1277
- TableStore.util.arrayEach(aQuery.functions, function (scoreFunction) {
1278
- var scoreFunctionProperties = {
1279
- weight: scoreFunction.weight || null,
1280
- }
1281
- if(scoreFunction.filter) {
1282
- scoreFunctionProperties.filter = TableStore.encoder._makeQuery(scoreFunction.filter);
1283
- }
1284
- if (scoreFunction.fieldValueFactorFunction) {
1285
- scoreFunctionProperties.fieldValueFactor = tsSearchProtos.FieldValueFactorFunction.create(scoreFunction.fieldValueFactorFunction);
1286
- }
1287
- if (scoreFunction.decayFunction) {
1288
- const paramBody = TableStore.encoder._constructDecayParam(scoreFunction.decayFunction.decayParamType, scoreFunction.decayFunction.decayParam);
1289
- const writer = Object.getPrototypeOf(paramBody).constructor.encode(paramBody);
1290
- var decayFunctionProperties = {
1291
- fieldName: scoreFunction.decayFunction.fieldName,
1292
- mathFunction: scoreFunction.decayFunction.mathFunction || null,
1293
- paramType: scoreFunction.decayFunction.decayParamType,
1294
- param: writer.finish(),
1295
- decay: scoreFunction.decayFunction.decay || null,
1296
- multiValueMode: scoreFunction.decayFunction.multiValueMode || null,
1297
- }
1298
- scoreFunctionProperties.decay = tsSearchProtos.DecayFunction.create(decayFunctionProperties);
1299
- }
1300
- if (scoreFunction.randomFunction) {
1301
- scoreFunctionProperties.random = tsSearchProtos.RandomScoreFunction.create(scoreFunction.randomFunction);
1302
- }
1303
- properties.functions.push(scoreFunctionProperties);
1304
- })
1305
- }
1306
- var functionsScoreQuery = tsSearchProtos.FunctionsScoreQuery.create(properties);
1307
-
1308
- return functionsScoreQuery;
1309
- break;
1310
- default:
1311
- throw new Error("queryTypeExpectation not exist queryType: " + queryType);
1312
- }
1313
- },
1314
- _constructDecayParam(type, param){
1315
- if (type === TableStore.DecayFuncParamType.DF_DATE_PARAM) {
1316
- return tsSearchProtos.DecayFuncDateParam.create(param);
1317
- }
1318
- if (type === TableStore.DecayFuncParamType.DF_GEO_PARAM) {
1319
- return tsSearchProtos.DecayFuncGeoParam.create(param);
1320
- }
1321
- if (type === TableStore.DecayFuncParamType.DF_NUMERIC_PARAM) {
1322
- return tsSearchProtos.DecayFuncNumericParam.create(param);
1323
- }
1324
- return null;
1325
- },
1326
- _makeColumnToGet(aColumnToGet) {
1327
- var properties = {
1328
- returnType: aColumnToGet.returnType
1329
- };
1330
- if (aColumnToGet.returnType === TableStore.ColumnReturnType.RETURN_SPECIFIED) {
1331
- properties.columnNames = aColumnToGet.returnNames;
1332
- }
1333
-
1334
- var columnsToGet = tsSearchProtos.ColumnsToGet.create(properties);
1335
-
1336
- return columnsToGet;
1337
- },
1338
- _makeRoutingValues(routingValues) {
1339
- var values = [];
1340
- TableStore.util.arrayEach(routingValues, function(primaryKey) {
1341
- values.push(TableStore.PlainBufferBuilder.serializePrimaryKey(primaryKey))
1342
- });
1343
-
1344
- return values;
1345
- },
1346
- // _makeSearchAfter(aSearchAfter) {
1347
- // var searchAfter = new tsSearchProtos.SearchAfter();
1348
- // var values = [];
1349
- //
1350
- // TableStore.util.arrayEach(aSearchAfter.values, function(value) {
1351
- // values.push(TableStore.PlainBufferBuilder.serializeSearchValue(value, "searchAfter.value"))
1352
- // });
1353
- // searchAfter.values = values;
1354
- //
1355
- // return searchAfter;
1356
- // },
1357
- _makeTerms(terms) {
1358
- var theTerms = [];
1359
- if (Object.prototype.toString.call(terms) !== '[object Array]') {
1360
- return theTerms;
1361
- }
1362
-
1363
- TableStore.util.arrayEach(terms, function (term) {
1364
- var theTerm = TableStore.PlainBufferBuilder.serializeSearchValue(term, "term");
1365
- theTerms.push(theTerm);
1366
- });
1367
-
1368
- return theTerms;
1369
- },
1370
- _makeSort(aSort) {
1371
- var properties = {
1372
- sorter: []
1373
- };
1374
-
1375
- TableStore.util.arrayEach(aSort.sorters, function(sorter) {
1376
- var theSorter = TableStore.encoder._makeSorter(sorter);
1377
- properties.sorter.push(theSorter);
1378
- });
1379
-
1380
- var sort = tsSearchProtos.Sort.create(properties);
1381
-
1382
- return sort;
1383
- },
1384
- _makeSorter(aSorter) {
1385
- const properties = {};
1386
-
1387
- if (aSorter.fieldSort) {
1388
- var fieldSortProperties = {
1389
- fieldName: aSorter.fieldSort.fieldName,
1390
- order: aSorter.fieldSort.order,
1391
- mode: aSorter.fieldSort.mode
1392
- };
1393
- if (aSorter.fieldSort.missingValue) {
1394
- fieldSortProperties.missingValue = TableStore.PlainBufferBuilder.serializeSearchValue(aSorter.fieldSort.missingValue, "missingValue");
1395
- } else if (aSorter.fieldSort.missing) {
1396
- fieldSortProperties.missingValue = TableStore.PlainBufferBuilder.serializeSearchValue(aSorter.fieldSort.missing, "missing");
1397
- }
1398
- if (aSorter.fieldSort.nestedFilter) {
1399
- var nestedFilterProperties = {
1400
- path: aSorter.fieldSort.nestedFilter.path,
1401
- filter: TableStore.encoder._makeQuery(aSorter.fieldSort.nestedFilter.filter)
1402
- };
1403
- fieldSortProperties.nestedFilter = tsSearchProtos.NestedFilter.create(nestedFilterProperties);
1404
- }
1405
- if (aSorter.fieldSort.missingField) {
1406
- fieldSortProperties.missingField = aSorter.fieldSort.missingField;
1407
- }
1408
- properties.fieldSort = tsSearchProtos.FieldSort.create(fieldSortProperties);
1409
- } else if (aSorter.geoDistanceSort) {
1410
- var geoDistanceSortProperties = {
1411
- fieldName: aSorter.geoDistanceSort.fieldName,
1412
- points: aSorter.geoDistanceSort.points,
1413
- order: aSorter.geoDistanceSort.order,
1414
- mode: aSorter.geoDistanceSort.mode,
1415
- distanceType: aSorter.geoDistanceSort.distanceType
1416
- };
1417
- if (aSorter.geoDistanceSort.nestedFilter) {
1418
- var nestedFilterProperties = {
1419
- path: aSorter.geoDistanceSort.nestedFilter.path,
1420
- filter: TableStore.encoder._makeQuery(aSorter.geoDistanceSort.nestedFilter.filter)
1421
- };
1422
-
1423
- geoDistanceSortProperties.nestedFilter = tsSearchProtos.NestedFilter.create(nestedFilterProperties);
1424
- }
1425
-
1426
- var geoDistanceSort = tsSearchProtos.GeoDistanceSort.create(geoDistanceSortProperties);
1427
-
1428
- properties.geoDistanceSort = geoDistanceSort;
1429
- } else if (aSorter.scoreSort) {
1430
- var scoreSortProperties = {
1431
- order: aSorter.scoreSort.order
1432
- };
1433
- var scoreSort = tsSearchProtos.ScoreSort.create(scoreSortProperties);
1434
-
1435
- properties.scoreSort = scoreSort;
1436
- } else if (aSorter.primaryKeySort) {
1437
- var primaryKeySortProperties = {
1438
- order: aSorter.primaryKeySort.order
1439
- };
1440
- var primaryKeySort = tsSearchProtos.PrimaryKeySort.create(primaryKeySortProperties)
1441
-
1442
- properties.pkSort = primaryKeySort;
1443
- } else if (aSorter.docSort) {
1444
- var docSortProperties = {
1445
- order: aSorter.docSort.order
1446
- }
1447
- var docSort = tsSearchProtos.DocSort.create(docSortProperties);
1448
-
1449
- properties.docSort = docSort;
1450
- }
1451
-
1452
- return tsSearchProtos.Sorter.create(properties);
1453
- },
1454
- _makeGroupBySort: function(aSort) {
1455
- const properties = {
1456
- sorters: []
1457
- };
1458
- TableStore.util.arrayEach(aSort.sorters, function(sorter) {
1459
- const theSorter = TableStore.encoder._makeGroupBySorter(sorter);
1460
- properties.sorters.push(theSorter);
1461
- });
1462
- return tsSearchProtos.GroupBySort.create(properties);
1463
- },
1464
- _makeGroupBySorter(aSorter) {
1465
- const properties = {};
1466
- if (aSorter.groupKeySort) {
1467
- const groupKeySortProperties = {
1468
- order: aSorter.groupKeySort.order,
1469
- };
1470
- properties.groupKeySort = tsSearchProtos.GroupKeySort.create(groupKeySortProperties);
1471
- } else if (aSorter.rowCountSort) {
1472
- const rowCountSortProperties = {
1473
- order: aSorter.rowCountSort.order,
1474
- };
1475
- properties.rowCountSort = tsSearchProtos.RowCountSort.create(rowCountSortProperties);
1476
- } else if (aSorter.subAggSort) {
1477
- const subAggSortProperties = {
1478
- subAggName: aSorter.subAggSort.subAggName,
1479
- order: aSorter.subAggSort.order,
1480
- };
1481
- properties.subAggSort = tsSearchProtos.SubAggSort.create(subAggSortProperties);
1482
- }
1483
- return tsSearchProtos.GroupBySorter.create(properties);
1484
- },
1485
- _makeDateTimeValue(dateTimeValue) {
1486
- const properties = {
1487
- value: dateTimeValue.value,
1488
- unit: dateTimeValue.unit
1489
- };
1490
- return tsSearchProtos.DateTimeValue.create(properties);
1491
- },
1492
- _makeInnerHits(innerHits){
1493
- var properties = {
1494
- offset: innerHits.offset || null,
1495
- limit : innerHits.limit || null,
1496
- };
1497
- if (innerHits.sort) {
1498
- properties.sort = TableStore.encoder._makeSort(innerHits.sort);
1499
- }
1500
- if(innerHits.highlight) {
1501
- properties.highlight = TableStore.encoder._makeHighlight(innerHits.highlight);
1502
- }
1503
- return tsSearchProtos.InnerHits.create(properties);
1504
- },
1505
- _makeHighlight(highlight) {
1506
- var properties = {
1507
- highlightEncoder: highlight.highlightEncoder,
1508
- highlightParameters: highlight.highlightParameters
1509
- }
1510
- return tsSearchProtos.Highlight.create(properties);
1511
- },
1512
- encodeCreateIndex: function(params) {
1513
- var request = tsProtos.CreateIndexRequest.create({
1514
- mainTableName: params.mainTableName,
1515
- includeBaseData: params.includeBaseData || false,
1516
- indexMeta: new tsProtos.IndexMeta({
1517
- name: params.indexMeta.name,
1518
- primaryKey: params.indexMeta.primaryKey,
1519
- definedColumn: params.indexMeta.definedColumn,
1520
- indexUpdateMode: params.indexMeta.indexUpdateMode || TableStore.IndexUpdateMode.IUM_ASYNC_INDEX,//默认增量
1521
- indexType: params.indexMeta.indexType || TableStore.IndexType.IT_GLOBAL_INDEX,//IT_GLOBAL_INDEX
1522
- })
1523
- });
1524
-
1525
- return request;
1526
- },
1527
- encodeDropIndex: function(params) {
1528
- var request = tsProtos.DropIndexRequest.create({
1529
- mainTableName: params.mainTableName,
1530
- indexName: params.indexName
1531
- });
1532
- return request;
1533
- },
1534
- encodeStartLocalTransaction: function (params) {
1535
- var request = tsProtos.StartLocalTransactionRequest.create({
1536
- tableName: params.tableName,
1537
- key: TableStore.PlainBufferBuilder.serializePrimaryKey(params.primaryKey)
1538
- });
1539
- return request;
1540
- },
1541
- encodeCommitTransaction: function (params) {
1542
- var request = tsProtos.CommitTransactionRequest.create({
1543
- transactionId: typeof params === 'string' ? params : params.transactionId
1544
- });
1545
- return request;
1546
- },
1547
- encodeAbortTransaction: function (params) {
1548
- var request = tsProtos.AbortTransactionRequest.create({
1549
- transactionId: typeof params === 'string' ? params : params.transactionId
1550
- });
1551
- return request;
1552
- },
1553
- encodeSQLQuery: function (params) {
1554
- if (params.version && params.version !== TableStore.SQLPayloadVersion.SQL_FLAT_BUFFERS) {
1555
- throw new Error("SQL payload version only support: 'TableStore.SQLPayloadVersion.SQL_FLAT_BUFFERS', " +
1556
- "please use fixed tablestore node sdk version '5.2.2' to use 'TableStore.SQLPayloadVersion.SQL_PLAIN_BUFFER'");
1557
- }
1558
- const properties = {
1559
- query: params.query,
1560
- version: TableStore.SQLPayloadVersion.SQL_FLAT_BUFFERS,
1561
- };
1562
- return tsProtos.SQLQueryRequest.create(properties);
1563
- },
1564
- };
1565
-
1566
- var tsMap = {
1567
- 'createTable': TableStore.encoder.encodeCreateTable,
1568
- 'listTable': TableStore.encoder.encodeListTable,
1569
- 'deleteTable': TableStore.encoder.encodeDeleteTable,
1570
- 'updateTable': TableStore.encoder.encodeUpdateTable,
1571
- 'describeTable': TableStore.encoder.encodeDescribeTable,
1572
- 'getRow': TableStore.encoder.encodeGetRow,
1573
- 'putRow': TableStore.encoder.encodePutRow,
1574
- 'updateRow': TableStore.encoder.encodeUpdateRow,
1575
- 'deleteRow': TableStore.encoder.encodeDeleteRow,
1576
- 'getRange': TableStore.encoder.encodeGetRange,
1577
- 'batchGetRow': TableStore.encoder.encodeBatchGetRow,
1578
- 'batchWriteRow': TableStore.encoder.encodeBatchWriteRow,
1579
- 'listSearchIndex': TableStore.encoder.encodeListSearchIndex,
1580
- 'describeSearchIndex': TableStore.encoder.encodeDescribeSearchIndex,
1581
- 'updateSearchIndex': TableStore.encoder.encodeUpdateSearchIndex,
1582
- 'createSearchIndex': TableStore.encoder.encodeCreateSearchIndex,
1583
- 'deleteSearchIndex': TableStore.encoder.encodeDeleteSearchIndex,
1584
- 'search': TableStore.encoder.encodeSearch,
1585
- 'computeSplits': TableStore.encoder.encodeComputeSplits,
1586
- 'parallelScan': TableStore.encoder.encodeParallelScan,
1587
- 'createIndex': TableStore.encoder.encodeCreateIndex,
1588
- 'dropIndex': TableStore.encoder.encodeDropIndex,
1589
- 'startLocalTransaction': TableStore.encoder.encodeStartLocalTransaction,
1590
- 'commitTransaction': TableStore.encoder.encodeCommitTransaction,
1591
- 'abortTransaction': TableStore.encoder.encodeAbortTransaction,
1592
- 'SQLQuery': TableStore.encoder.encodeSQLQuery,
1593
- };