@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
@@ -0,0 +1,1018 @@
1
+ /**
2
+ * 分域 API 客户端
3
+ *
4
+ * 按业务域组织(bff / sql / dataset / dblink / db-analysis),与研发态 OpenAPI 路径前缀自然对齐。
5
+ * 统一认证、超时、错误处理;命令层通过导出函数调用。
6
+ */
7
+ import type { Paging } from "../framework/response.js";
8
+ import type { FetchDocOptions, FetchModelListResult } from "../types/index.js";
9
+ export declare function setActiveCookie(cookie: string): void;
10
+ export declare function clearActiveCookie(): void;
11
+ export declare function isPlatformTransportFailure(error: unknown): boolean;
12
+ export declare function getPlatformErrorCode(error: unknown): string | undefined;
13
+ export interface DevelopmentFileUploadResponse {
14
+ fileName?: string | null;
15
+ filePath?: string | null;
16
+ fileUrl?: string | null;
17
+ downloadFlag?: boolean;
18
+ fileType?: string | null;
19
+ size?: number | null;
20
+ sourceDir?: string | null;
21
+ [key: string]: unknown;
22
+ }
23
+ export interface DevelopmentFileUrlResponse {
24
+ fileName?: string | null;
25
+ filePath?: string | null;
26
+ fileUrl?: string | null;
27
+ downloadFlag?: boolean;
28
+ longTerm?: boolean;
29
+ expiresInDays?: number | null;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface DevelopmentOcrResponse {
33
+ text?: string | null;
34
+ lines?: string[];
35
+ type?: string | null;
36
+ width?: number | null;
37
+ height?: number | null;
38
+ pageNo?: number | null;
39
+ subImageCount?: number | null;
40
+ algoVersion?: string | null;
41
+ kvExcelUrl?: string | null;
42
+ xmlResult?: string | null;
43
+ rawData?: string | null;
44
+ kvData?: Record<string, string>;
45
+ requestId?: string | null;
46
+ [key: string]: unknown;
47
+ }
48
+ export declare function uploadDevelopmentFile(appCode: string, filePath: string): Promise<DevelopmentFileUploadResponse>;
49
+ export declare function queryDevelopmentFileUrl(filePath: string, options?: {
50
+ download?: boolean;
51
+ longTerm?: boolean;
52
+ }): Promise<DevelopmentFileUrlResponse>;
53
+ export declare function recognizeDevelopmentOcr(appCode: string, input: {
54
+ url: string;
55
+ type: string;
56
+ }): Promise<DevelopmentOcrResponse>;
57
+ export interface PlatformFetchOptions {
58
+ method?: "GET" | "POST";
59
+ body?: Record<string, any>;
60
+ cookie: string;
61
+ /** 用于错误消息的操作标签 */
62
+ label: string;
63
+ }
64
+ /**
65
+ * 平台 API 统一 Fetch。
66
+ * 封装 Cookie / Content-Type / 401 → CliErrors.authRequired / !success 检查。
67
+ * 适用于不走 _activeCookie 管道、而由调用方显式传入 cookie 的场景。
68
+ */
69
+ export declare function platformFetch<T = any>(url: string, opts: PlatformFetchOptions): Promise<T>;
70
+ /**
71
+ * 平台 API path-based 请求入口。
72
+ *
73
+ * 新增服务端接口 wrapper 优先使用该函数,把 API 域名拼接收敛在 core 层。
74
+ * platformFetch 保留给历史调用与少数确需绝对 URL 的场景。
75
+ */
76
+ export declare function platformRequest<T = any>(path: string, opts: PlatformFetchOptions): Promise<T>;
77
+ export interface KnowledgeBaseRecord {
78
+ id: number;
79
+ scope: "company" | "personal";
80
+ appCode: string;
81
+ title: string;
82
+ version: number;
83
+ content: string;
84
+ createTime?: string | number | null;
85
+ updateTime?: string | number | null;
86
+ }
87
+ export interface KnowledgeBaseListFilters {
88
+ currentPage?: number;
89
+ pageSize?: number;
90
+ appCode?: string;
91
+ title?: string;
92
+ }
93
+ export declare function listEnterpriseKnowledgeBases(cookie: string, filters?: KnowledgeBaseListFilters): Promise<{
94
+ items: KnowledgeBaseRecord[];
95
+ paging?: Paging;
96
+ }>;
97
+ export declare function getEnterpriseKnowledgeBase(cookie: string, id: number): Promise<KnowledgeBaseRecord>;
98
+ export declare function createEnterpriseKnowledgeBase(cookie: string, input: {
99
+ appCode: string;
100
+ title: string;
101
+ content: string;
102
+ }): Promise<KnowledgeBaseRecord>;
103
+ export declare function updateEnterpriseKnowledgeBase(cookie: string, input: {
104
+ id: number;
105
+ title?: string;
106
+ content?: string;
107
+ }): Promise<KnowledgeBaseRecord>;
108
+ export declare function deleteEnterpriseKnowledgeBase(cookie: string, id: number): Promise<void>;
109
+ /**
110
+ * 获取研发态数据集模型列表。
111
+ */
112
+ export declare function fetchModelList(appCode: string, cookie: string): Promise<FetchModelListResult>;
113
+ /**
114
+ * 获取单个数据集的 Markdown 文档。
115
+ */
116
+ export declare function fetchDatasetDoc(options: FetchDocOptions): Promise<string>;
117
+ /**
118
+ * 获取在线菜单树。
119
+ */
120
+ export interface MenuTreeRecord {
121
+ id: number;
122
+ appCode?: string | null;
123
+ parentId?: number | null;
124
+ path?: string | null;
125
+ url?: string | null;
126
+ label?: string | null;
127
+ type?: string | null;
128
+ visible?: boolean | null;
129
+ sort?: number | null;
130
+ pageId?: number | null;
131
+ pageType?: string | null;
132
+ modelType?: string | null;
133
+ datasetId?: number | null;
134
+ datasetCode?: string | null;
135
+ extend?: Record<string, unknown> | null;
136
+ createTime?: string | number | null;
137
+ updateTime?: string | number | null;
138
+ createUserId?: string | null;
139
+ createUserName?: string | null;
140
+ updateUserId?: string | null;
141
+ updateUserName?: string | null;
142
+ children?: MenuTreeRecord[];
143
+ }
144
+ export interface MenuCreateRecordInput {
145
+ appCode: string;
146
+ parentId?: number | null;
147
+ label: string;
148
+ path?: string;
149
+ url?: string;
150
+ type: string;
151
+ sort?: number;
152
+ visible?: boolean;
153
+ extend?: Record<string, unknown> | null;
154
+ }
155
+ export interface MenuUpdateRecordInput {
156
+ id: number;
157
+ appCode: string;
158
+ parentId?: number;
159
+ path?: string;
160
+ url?: string;
161
+ label?: string;
162
+ type?: string;
163
+ visible?: boolean;
164
+ sort?: number;
165
+ extend?: Record<string, unknown> | null;
166
+ }
167
+ export interface MenuMutationRecord extends Omit<MenuTreeRecord, "label" | "children"> {
168
+ label: string;
169
+ key?: string;
170
+ order?: number;
171
+ url?: string;
172
+ i18nKey?: string;
173
+ visibleType?: string | null;
174
+ mobileVisibleType?: string | null;
175
+ visibleScope?: unknown[];
176
+ externalDatasourceIds?: unknown[] | null;
177
+ formPath?: string | null;
178
+ materialDraftInfo?: unknown;
179
+ materialFormalInfo?: unknown;
180
+ deleted?: boolean;
181
+ children?: MenuMutationRecord[];
182
+ }
183
+ export interface MenuRegroupChildInput {
184
+ id: number;
185
+ label: string;
186
+ }
187
+ export interface MenuRegroupGroupInput {
188
+ label: string;
189
+ type: "folder";
190
+ description?: string;
191
+ children: MenuRegroupChildInput[];
192
+ }
193
+ export interface MenuRegroupInput {
194
+ appCode: string;
195
+ menuGroups: MenuRegroupGroupInput[];
196
+ }
197
+ export interface AsyncTaskStatusRecord {
198
+ taskId: string;
199
+ status: string;
200
+ errorMessage?: string | null;
201
+ }
202
+ export declare function getMenuTree(appCode: string, cookie: string): Promise<MenuTreeRecord[]>;
203
+ /**
204
+ * 创建菜单记录。
205
+ */
206
+ export declare function createMenuRecord(body: MenuCreateRecordInput, cookie: string, label: string): Promise<MenuMutationRecord>;
207
+ /**
208
+ * 更新菜单记录。
209
+ */
210
+ export declare function updateMenuRecord(body: MenuUpdateRecordInput, cookie: string, label: string): Promise<MenuMutationRecord>;
211
+ /**
212
+ * 按 ID 删除菜单记录。
213
+ */
214
+ export declare function deleteMenuRecord(id: number, cookie: string, label: string): Promise<boolean>;
215
+ /**
216
+ * 按已审阅的 ID 列表批量删除菜单记录。
217
+ */
218
+ export declare function batchDeleteMenuRecords(ids: number[], cookie: string, label: string): Promise<number>;
219
+ /**
220
+ * 创建一个菜单重新分组任务。
221
+ *
222
+ * 返回的 taskId 跟踪后台执行的菜单重新分组任务。
223
+ */
224
+ export declare function startMenuRegroup(body: MenuRegroupInput, cookie: string, label: string): Promise<AsyncTaskStatusRecord>;
225
+ /**
226
+ * 查询一个应用范围内的通用异步任务状态。
227
+ */
228
+ export declare function getAsyncTaskStatus(taskId: string, appCode: string, cookie: string): Promise<AsyncTaskStatusRecord>;
229
+ export interface BffScript {
230
+ id: number;
231
+ appCode: string;
232
+ functionName?: string;
233
+ functionNode?: string;
234
+ description: string;
235
+ scriptType: string;
236
+ scriptContent?: string;
237
+ version?: number;
238
+ dependencyRefs?: string;
239
+ enableTransaction?: boolean;
240
+ datasetId?: number | null;
241
+ operationType?: string | null;
242
+ createdTime?: string;
243
+ updatedTime?: string;
244
+ }
245
+ export interface BffSaveResult {
246
+ id?: number;
247
+ action?: "created" | "updated";
248
+ cacheCleared?: boolean;
249
+ blocked?: boolean;
250
+ errorCode?: string;
251
+ message?: string;
252
+ }
253
+ /**
254
+ * Normalized save result for BFF script mutations.
255
+ *
256
+ * Why:
257
+ * the backend is in a compatibility window where `/scripts/save` may return
258
+ * either a legacy numeric id or the full saved script object. Callers should
259
+ * consume a stable shape and not guess which contract is active.
260
+ */
261
+ export interface BffSavedScript {
262
+ id: number;
263
+ script?: BffScript;
264
+ }
265
+ export interface BffScriptStatistics {
266
+ datasetCode: string;
267
+ operationType: string;
268
+ beforeScriptId: number | null;
269
+ afterScriptId: number | null;
270
+ }
271
+ export declare function listBffScripts(appCode: string, type?: string, options?: {
272
+ scriptName?: string;
273
+ }): Promise<BffScript[]>;
274
+ export declare function getBffScriptInfo(id: number): Promise<BffScript>;
275
+ export declare function saveBffScript(params: {
276
+ appCode: string;
277
+ functionName: string;
278
+ scriptType: string;
279
+ scriptContent: string;
280
+ id?: number;
281
+ version?: number;
282
+ description?: string;
283
+ functionNode?: string;
284
+ datasetId?: number;
285
+ operationType?: string;
286
+ }): Promise<BffSavedScript>;
287
+ export declare function deleteBffScript(id: number): Promise<void>;
288
+ export declare function getBffScriptStatistics(appCode: string): Promise<BffScriptStatistics[]>;
289
+ export declare function clearBffScriptCache(): Promise<string>;
290
+ export declare function listBffDatasetOperations(appCode: string, datasetId: number): Promise<Record<string, unknown> | null>;
291
+ export interface SqlQuery {
292
+ id: number;
293
+ tenantCode?: string;
294
+ appCode: string;
295
+ sqlCode: string;
296
+ sqlName: string;
297
+ description?: string;
298
+ dbId?: number;
299
+ version?: number;
300
+ sqlContent?: string;
301
+ sqlConfig?: string | null;
302
+ params?: string | null;
303
+ }
304
+ export interface SqlListResult {
305
+ tableData: SqlQuery[];
306
+ paging: Paging;
307
+ }
308
+ export interface SqlSaveResult {
309
+ id?: number;
310
+ sqlCode?: string;
311
+ sqlName?: string;
312
+ action?: "created" | "updated";
313
+ blocked?: boolean;
314
+ errorCode?: string;
315
+ message?: string;
316
+ }
317
+ export declare function listSqlQueries(appCode: string, options?: {
318
+ currentPage?: number;
319
+ pageSize?: number;
320
+ sqlCode?: string;
321
+ sqlName?: string;
322
+ }): Promise<SqlListResult>;
323
+ export declare function getSqlQueryInfo(appCode: string, sqlCode: string): Promise<SqlQuery>;
324
+ export declare function getSqlQueryDetail(sqlCode: string): Promise<SqlQuery>;
325
+ export declare function getSqlQueryDetailById(id: number): Promise<SqlQuery>;
326
+ export declare function createSqlQuery(params: {
327
+ appCode: string;
328
+ sqlName: string;
329
+ dbId: number;
330
+ sqlContent: string;
331
+ sqlConfig?: string;
332
+ }): Promise<SqlQuery>;
333
+ export declare function updateSqlQuery(params: {
334
+ id: number;
335
+ appCode: string;
336
+ sqlCode?: string;
337
+ sqlName: string;
338
+ dbId: number;
339
+ version?: number;
340
+ sqlContent: string;
341
+ sqlConfig?: string;
342
+ }): Promise<SqlQuery>;
343
+ export declare function deleteSqlQuery(params: {
344
+ id?: number;
345
+ sqlCode?: string;
346
+ }): Promise<void>;
347
+ export declare function saveSqlQuery(params: {
348
+ appCode: string;
349
+ sqlCode?: string;
350
+ sqlName?: string;
351
+ dbId?: number;
352
+ sqlContent: string;
353
+ description?: string;
354
+ }): Promise<SqlSaveResult>;
355
+ export declare function executeSql(appCode: string, sqlCode: string, params?: Record<string, string | number>): Promise<any>;
356
+ /**
357
+ * Read-only runtime data operations supported by rabetbase-cli.
358
+ *
359
+ * The command surface intentionally stays narrow for now: users mainly need
360
+ * `filter` and `getOne` to inspect real records while designing pages.
361
+ */
362
+ export type DatasetDataReadOperation = "filter" | "getOne";
363
+ /**
364
+ * Executes a read-only dataset data operation against the runtime WebAPI.
365
+ *
366
+ * The runtime dataset metadata already exposes concrete paths such as
367
+ * `/api/{appCode}/{datasetCode}/filter` and `/getOne`. Calling those paths
368
+ * directly keeps rabetbase aligned with the platform's cookie-authenticated
369
+ * runtime behavior without pulling in the runtime CLI's SDK stack.
370
+ *
371
+ * @param appCode - Resolved app code.
372
+ * @param datasetCode - Target dataset code.
373
+ * @param operation - Read-only operation name.
374
+ * @param params - Request body sent to the runtime API.
375
+ * @returns Raw runtime response payload.
376
+ */
377
+ export declare function executeDatasetDataOperation(appCode: string, datasetCode: string, operation: DatasetDataReadOperation, params?: Record<string, any>): Promise<any>;
378
+ export interface DatasetItem {
379
+ id: number;
380
+ name: string;
381
+ code: string;
382
+ source?: string;
383
+ description?: string;
384
+ dbtableConfig?: {
385
+ tableName?: string;
386
+ dbId?: number;
387
+ dbName?: string;
388
+ dbType?: string;
389
+ datasetKey?: string;
390
+ pkField?: string;
391
+ allFields?: string;
392
+ };
393
+ [key: string]: any;
394
+ }
395
+ export declare function listDatasets(appCode: string, options?: {
396
+ code?: string;
397
+ name?: string;
398
+ deleted?: boolean;
399
+ }): Promise<DatasetItem[]>;
400
+ export declare function deleteDataset(appCode: string, datasetId: number): Promise<void>;
401
+ export declare function restoreDataset(appCode: string, datasetId: number): Promise<void>;
402
+ export interface TextGeneratedDatasetPreviewInput {
403
+ datasetName: string;
404
+ requirementDescription: string;
405
+ }
406
+ export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
407
+ export interface TextGeneratedDatasetJobStartResult {
408
+ operationId?: string;
409
+ clientOperationId?: string;
410
+ status?: string;
411
+ progressRate?: number;
412
+ currentStep?: string;
413
+ reused?: boolean;
414
+ warnings?: string[];
415
+ result?: any;
416
+ [key: string]: any;
417
+ }
418
+ export interface TextGeneratedDatasetJobStatus {
419
+ operationId?: string;
420
+ clientOperationId?: string;
421
+ status?: string;
422
+ progressRate?: number;
423
+ currentStep?: string;
424
+ errorMsg?: string;
425
+ warnings?: string[];
426
+ result?: any;
427
+ [key: string]: any;
428
+ }
429
+ export declare function startTextGeneratedDataset(appCode: string, design: Record<string, any>, options?: {
430
+ clientOperationId?: string;
431
+ }): Promise<TextGeneratedDatasetJobStartResult>;
432
+ export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
433
+ operationId?: string;
434
+ clientOperationId?: string;
435
+ }): Promise<TextGeneratedDatasetJobStatus>;
436
+ /**
437
+ * 优先服务端过滤(name),再客户端补充匹配 code / tableName / description。
438
+ * 如果 keyword 恰好是 datasetCode 格式,同时发起 code 精确查询合并结果。
439
+ */
440
+ export declare function searchDatasets(appCode: string, keyword: string): Promise<DatasetItem[]>;
441
+ /**
442
+ * API 可能返回 operations 为数组,或按名称索引的对象。
443
+ */
444
+ export declare function normalizeDatasetOperations(raw: unknown): any[];
445
+ export declare function getDatasetDetail(datasetIdOrCode: string): Promise<any>;
446
+ export declare function updateDrivenData(drivenData: Record<string, any>): Promise<any>;
447
+ export interface OperationInfo {
448
+ name: string;
449
+ displayName?: string;
450
+ type?: string;
451
+ method?: string;
452
+ path?: string;
453
+ enabled?: boolean;
454
+ requestFields?: any[];
455
+ responseFields?: any[];
456
+ [key: string]: any;
457
+ }
458
+ export declare function getDatasetOperations(datasetIdOrCode: string): Promise<{
459
+ dataset: any;
460
+ operations: OperationInfo[];
461
+ }>;
462
+ export declare function getOperationDetail(appCode: string, datasetIdOrCode: string, operationName: string): Promise<{
463
+ dataset: any;
464
+ operation: any;
465
+ }>;
466
+ export interface GenerateStandardPagesResultItem {
467
+ datasetCode?: string;
468
+ datasetName?: string;
469
+ success?: boolean;
470
+ errorMsg?: string | null;
471
+ listPageId?: number | null;
472
+ createPageId?: number | null;
473
+ editPageId?: number | null;
474
+ detailPageId?: number | null;
475
+ [key: string]: any;
476
+ }
477
+ export interface GenerateStandardPagesResult {
478
+ successCount: number;
479
+ failCount: number;
480
+ results: GenerateStandardPagesResultItem[];
481
+ [key: string]: any;
482
+ }
483
+ export interface StandardPageGenerateJobStartResult {
484
+ operationId?: string;
485
+ status?: string;
486
+ progressRate?: number | null;
487
+ currentStep?: string | null;
488
+ reused?: boolean;
489
+ [key: string]: any;
490
+ }
491
+ export interface StandardPageGenerateResultSummaryItem {
492
+ datasetCode?: string;
493
+ datasetName?: string;
494
+ success?: boolean;
495
+ errorMsg?: string | null;
496
+ listPageId?: number | null;
497
+ createPageId?: number | null;
498
+ editPageId?: number | null;
499
+ detailPageId?: number | null;
500
+ [key: string]: any;
501
+ }
502
+ export interface StandardPageGenerateResultSummary {
503
+ datasetCode?: string;
504
+ successCount?: number;
505
+ failCount?: number;
506
+ results?: StandardPageGenerateResultSummaryItem[];
507
+ [key: string]: any;
508
+ }
509
+ export interface StandardPageGenerateJobStatus {
510
+ operationId?: string;
511
+ status?: string;
512
+ progressRate?: number | null;
513
+ currentStep?: string | null;
514
+ datasetCode?: string;
515
+ appCode?: string;
516
+ clientOperationId?: string | null;
517
+ errorMsg?: string | null;
518
+ result?: StandardPageGenerateResultSummary | null;
519
+ [key: string]: any;
520
+ }
521
+ export interface StandardPageStatusPageFact {
522
+ pageId?: number | null;
523
+ title?: string;
524
+ type?: string;
525
+ deleted?: boolean;
526
+ hasMenu?: boolean;
527
+ menuVisible?: boolean | null;
528
+ menuPath?: string | null;
529
+ [key: string]: any;
530
+ }
531
+ export interface StandardPageStatusPageSet {
532
+ versionTag?: string | null;
533
+ complete?: boolean;
534
+ pages?: StandardPageStatusPageFact[];
535
+ [key: string]: any;
536
+ }
537
+ export interface StandardPageStatus {
538
+ datasetId?: number | null;
539
+ datasetCode?: string;
540
+ pageSets?: StandardPageStatusPageSet[];
541
+ totalSets?: number;
542
+ completeSets?: number;
543
+ incompleteSets?: number;
544
+ residualPages?: StandardPageStatusPageFact[];
545
+ menuPages?: StandardPageStatusPageFact[];
546
+ [key: string]: any;
547
+ }
548
+ export interface PageSyncResultItem {
549
+ pageId?: number | null;
550
+ title?: string;
551
+ errorMsg?: string | null;
552
+ [key: string]: any;
553
+ }
554
+ export interface DatasetSyncToPagesResult {
555
+ totalPages?: number;
556
+ successPages: PageSyncResultItem[];
557
+ failedPages: PageSyncResultItem[];
558
+ [key: string]: any;
559
+ }
560
+ export interface PageDetailConfig {
561
+ pageVersion?: number | null;
562
+ versionTag?: string | null;
563
+ [key: string]: any;
564
+ }
565
+ export interface RelatedPageInfo {
566
+ id?: number;
567
+ type?: string;
568
+ code?: string;
569
+ title?: string;
570
+ deleted?: boolean;
571
+ }
572
+ export interface PageDetail {
573
+ pageId: number;
574
+ pageCode?: string;
575
+ name: string;
576
+ code: string;
577
+ appCode?: string;
578
+ datasetIds?: number[];
579
+ type?: string;
580
+ config?: PageDetailConfig | null;
581
+ relatedPageInfoList?: RelatedPageInfo[];
582
+ [key: string]: any;
583
+ }
584
+ export type DeletedPageType = "STANDARD" | "JSX";
585
+ export interface DeletedPageItem {
586
+ pageType: DeletedPageType;
587
+ id: number;
588
+ appCode: string;
589
+ name: string;
590
+ type?: string | null;
591
+ datasetIds?: number[] | null;
592
+ createTime?: number | null;
593
+ createUserName?: string | null;
594
+ updateTime?: number | null;
595
+ updateUserName?: string | null;
596
+ }
597
+ export interface DeletedPageListResult {
598
+ tableData: DeletedPageItem[];
599
+ paging: {
600
+ currentPage: number;
601
+ totalCount: number;
602
+ pageSize: number;
603
+ };
604
+ tableColumns?: unknown[];
605
+ }
606
+ export declare function startGenerateStandardPages(appCode: string, datasetCode: string, options?: {
607
+ clientOperationId?: string;
608
+ }): Promise<StandardPageGenerateJobStartResult>;
609
+ export declare function getGenerateStandardPagesStatus(appCode: string, datasetCode: string, options: {
610
+ operationId?: string;
611
+ clientOperationId?: string;
612
+ }): Promise<StandardPageGenerateJobStatus>;
613
+ export declare function getStandardPageStatus(appCode: string, datasetCode: string): Promise<StandardPageStatus>;
614
+ export declare function tryGetStandardPageStatus(appCode: string, datasetCode: string): Promise<StandardPageStatus | null>;
615
+ export declare function syncStandardPages(appCode: string, datasetCode: string): Promise<DatasetSyncToPagesResult>;
616
+ export declare function getPageDetail(pageId: number): Promise<PageDetail>;
617
+ export declare function listDeletedPages(appCode: string, pageType: DeletedPageType, options: {
618
+ currentPage: number;
619
+ pageSize: number;
620
+ }): Promise<DeletedPageListResult>;
621
+ export declare function restoreStandardPage(pageId: number): Promise<void>;
622
+ export declare function restoreJsxPage(appCode: string, pageId: number): Promise<boolean>;
623
+ export declare function updatePage(appCode: string, pageId: number, code: string, datasetIds: number[]): Promise<boolean>;
624
+ export declare function generateSdkCode(dataset: {
625
+ name: string;
626
+ code: string;
627
+ tableName?: string;
628
+ }, operation: any, options?: {
629
+ includeImports?: boolean;
630
+ }): string;
631
+ export declare function generateSqlCodeTemplate(sql: SqlQuery, options?: {
632
+ target?: "sdk" | "bff";
633
+ includeImports?: boolean;
634
+ }): string;
635
+ export interface ErDataset {
636
+ datasetId: number;
637
+ datasetCode: string;
638
+ datasetName: string;
639
+ tableName: string;
640
+ tableComment: string;
641
+ sourceType: string;
642
+ businessGroup?: string;
643
+ fields: Array<{
644
+ name: string;
645
+ displayName: string;
646
+ dbType: string;
647
+ isPrimaryKey: boolean;
648
+ isForeignKey: boolean;
649
+ }>;
650
+ relations: Array<{
651
+ fromField: string;
652
+ toDataset: string;
653
+ toDatasetName: string;
654
+ toField: string;
655
+ joinType: string;
656
+ condition: string | null;
657
+ }>;
658
+ }
659
+ export interface ErConfig {
660
+ meta: {
661
+ appCode: string;
662
+ appName: string;
663
+ dbId: number | null;
664
+ dbName: string | null;
665
+ };
666
+ datasets: ErDataset[];
667
+ relationships: any[];
668
+ }
669
+ export declare function getErConfig(appCode: string, dblinkId: number | null): Promise<ErConfig>;
670
+ export type ErRelationCardinality = "ONE_TO_ONE" | "ONE_TO_MANY" | "MANY_TO_ONE" | "MANY_TO_MANY";
671
+ export type ErRelationSourceType = "DB_TABLE" | "METADATA";
672
+ export interface ErRelationDetail {
673
+ relationId: number;
674
+ fromDatasetCode: string | null;
675
+ fromDatasetName: string | null;
676
+ fromSourceType: ErRelationSourceType;
677
+ fromTableName: string | null;
678
+ fromField: string | null;
679
+ toDatasetCode: string | null;
680
+ toDatasetName: string | null;
681
+ toSourceType: ErRelationSourceType;
682
+ toTableName: string | null;
683
+ toField: string | null;
684
+ refTableLabelName: string | null;
685
+ cardinality: ErRelationCardinality | null;
686
+ bizRelationType: "main_sub" | null;
687
+ condition: string | null;
688
+ }
689
+ export interface ErRelationMutation {
690
+ relationId?: number;
691
+ fromDatasetCode: string;
692
+ fromField: string;
693
+ toDatasetCode: string;
694
+ toField: string;
695
+ refTableLabelName?: string;
696
+ cardinality?: ErRelationCardinality;
697
+ bizRelationType?: "main_sub" | null;
698
+ }
699
+ export interface ErRelationMutationPayload {
700
+ appCode: string;
701
+ relation: ErRelationMutation;
702
+ }
703
+ export interface ErRelationDeletePayload {
704
+ appCode: string;
705
+ relation: {
706
+ relationId: number;
707
+ };
708
+ }
709
+ export interface ErBusinessGroupUpdatePayload {
710
+ appCode: string;
711
+ datasetCode: string;
712
+ businessGroup?: string;
713
+ }
714
+ export declare function getErRelationDetail(appCode: string, relationId: number): Promise<ErRelationDetail | null>;
715
+ export declare function createErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
716
+ export declare function updateErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
717
+ export declare function deleteErRelation(payload: ErRelationDeletePayload): Promise<boolean>;
718
+ export declare function updateErBusinessGroup(payload: ErBusinessGroupUpdatePayload): Promise<boolean>;
719
+ export interface DbLinkInfo {
720
+ id: number;
721
+ appCode: string;
722
+ dbName: string;
723
+ dbDesc?: string;
724
+ dbType: string;
725
+ dbVersion: string;
726
+ dbUrl: string;
727
+ dbParam?: string;
728
+ username: string;
729
+ password?: string;
730
+ gmtModified?: string;
731
+ latestAnalysisStatus?: string | null;
732
+ latestAnalysisTraceId?: string;
733
+ latestAnalysisSuccessTime?: string;
734
+ [key: string]: unknown;
735
+ }
736
+ export interface DbTableInfo {
737
+ tableName: string;
738
+ tableComment?: string;
739
+ tagList: string[];
740
+ }
741
+ export interface DbTableDiffInfo {
742
+ tableName: string;
743
+ tableComment?: string;
744
+ diffType: string;
745
+ fieldDiff?: {
746
+ addedColumns?: string[];
747
+ deletedColumns?: string[];
748
+ modifiedColumns?: string[];
749
+ };
750
+ }
751
+ export interface DbTableDiffResult {
752
+ totalCount: number;
753
+ physicalTableCount: number;
754
+ datasetTableCount: number;
755
+ summary?: string;
756
+ tableList: DbTableDiffInfo[];
757
+ }
758
+ export interface DbAnalysisStatus {
759
+ status?: string | null;
760
+ inputParams?: string | null;
761
+ jobContext?: string | null;
762
+ costTimeMs?: number | null;
763
+ firstStartTime?: number | string | null;
764
+ startTime?: number | string | null;
765
+ endTime?: number | string | null;
766
+ [key: string]: unknown;
767
+ }
768
+ export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM" | "WEBHOOK";
769
+ export interface NotificationChannelConfigItem {
770
+ id?: number | null;
771
+ appCode?: string | null;
772
+ configName?: string | null;
773
+ configCode?: string | null;
774
+ channelType?: string | null;
775
+ endpointUrl?: string | null;
776
+ channelConfig?: string | null;
777
+ description?: string | null;
778
+ connectTimeout?: number | null;
779
+ readTimeout?: number | null;
780
+ createTime?: string | null;
781
+ updateTime?: string | null;
782
+ [key: string]: unknown;
783
+ }
784
+ /**
785
+ * GET /notification/channel-config/list:查询当前应用的应用级通知渠道配置。
786
+ *
787
+ * 返回对象包含服务端脱敏后的完整配置;命令层仍必须做安全投影,
788
+ * 只输出 configCode 和用于人工选择的描述字段。
789
+ */
790
+ export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
791
+ export interface AppConfigItem {
792
+ id?: number;
793
+ appCode: string;
794
+ key: string;
795
+ value?: string | null;
796
+ tags?: string | null;
797
+ encrypted?: number | null;
798
+ operatorId?: number | null;
799
+ gmtCreate?: string;
800
+ gmtModified?: string;
801
+ }
802
+ export interface AppConfigWriteInput {
803
+ id?: number;
804
+ appCode: string;
805
+ key: string;
806
+ value: string;
807
+ tags?: string;
808
+ }
809
+ export declare function listAppConfigs(appCode: string, filters?: {
810
+ key?: string;
811
+ tags?: string;
812
+ }): Promise<AppConfigItem[]>;
813
+ export declare function getAppConfigByKey(appCode: string, key: string): Promise<AppConfigItem | null>;
814
+ export declare function createAppConfig(input: AppConfigWriteInput): Promise<unknown>;
815
+ export declare function updateAppConfig(input: AppConfigWriteInput & {
816
+ id: number;
817
+ }): Promise<void>;
818
+ export declare function deleteAppConfig(params: {
819
+ appCode: string;
820
+ id: number;
821
+ }): Promise<void>;
822
+ export declare function listDbLinks(appCode: string, options?: {
823
+ currentPage?: number;
824
+ pageSize?: number;
825
+ }): Promise<{
826
+ items: DbLinkInfo[];
827
+ paging?: Paging;
828
+ }>;
829
+ export declare function getDbLinkInfo(id: number): Promise<DbLinkInfo>;
830
+ export declare function createDbLink(data: DbLinkInfo): Promise<DbLinkInfo>;
831
+ export declare function updateDbLink(data: DbLinkInfo): Promise<DbLinkInfo>;
832
+ export declare function deleteDbLink(id: number): Promise<void>;
833
+ /** @returns 后端返回的连通性结果(多为 boolean) */
834
+ export declare function testDbLinkConnect(id: number): Promise<unknown>;
835
+ export interface DbAnalysisStartResult {
836
+ planId: string;
837
+ estimatedMinutes: number;
838
+ estimatedDurationDesc: string;
839
+ }
840
+ export declare function startDbAnalysis(dbLinkId: number, tableNames?: string[]): Promise<DbAnalysisStartResult>;
841
+ export declare function cancelDbAnalysis(planId: string): Promise<void>;
842
+ export declare function getDbAnalysisStatus(planId: string): Promise<DbAnalysisStatus>;
843
+ export declare function getDbAllTableList(appCode: string, dbLinkId: number): Promise<DbTableInfo[]>;
844
+ export declare function getDbTableDiff(appCode: string, dbLinkId: number, opts?: {
845
+ pageIndex?: number;
846
+ pageSize?: number;
847
+ tableName?: string;
848
+ }): Promise<DbTableDiffResult>;
849
+ export interface RemoteApp {
850
+ id?: number | string;
851
+ appCode: string;
852
+ appName: string;
853
+ appDesc?: string;
854
+ [key: string]: any;
855
+ }
856
+ export declare function listRemoteApps(): Promise<RemoteApp[]>;
857
+ /** 角色/用户组类型;ALL(-1)/SELF(0) 为特殊组,仅来自 get-permit-list */
858
+ export type AppRoleType = "ADMIN" | "DEV" | "USER" | "CUSTOM" | "ALL" | "SELF";
859
+ /** 资源权限动作枚举(工作台 checkbox 值) */
860
+ export type PermitAction = "0" | "access" | "default";
861
+ export interface AppRole {
862
+ id: number;
863
+ roleName: string;
864
+ remark?: string;
865
+ roleType: AppRoleType;
866
+ userCount: number;
867
+ permitCount: number;
868
+ }
869
+ export interface RoleUserRef {
870
+ userId: number;
871
+ username: string;
872
+ nickname?: string;
873
+ avatar?: string;
874
+ email?: string;
875
+ mobile?: string;
876
+ }
877
+ export interface RoleUsers {
878
+ id: number;
879
+ roleName: string;
880
+ roleType: "ADMIN" | "DEV" | "USER" | "CUSTOM";
881
+ userList: RoleUserRef[];
882
+ applyUserList?: RoleUserRef[];
883
+ }
884
+ export interface MenuResource {
885
+ resourceType: "MENU" | "NODE";
886
+ resourceCode: string;
887
+ resourceName: string;
888
+ allowed?: boolean;
889
+ allowedActions: PermitAction[];
890
+ menuType: "folder" | "lowcode";
891
+ pageId: number | null;
892
+ pageNodeList: MenuResource[] | null;
893
+ }
894
+ export interface ApiResource {
895
+ resourceType: "API";
896
+ resourceName: string;
897
+ datasetCode: string;
898
+ apiType: "DATASET" | "OTHER";
899
+ apiList?: Record<string, PermitAction[]>;
900
+ }
901
+ export interface PagePermitResourceSlot {
902
+ resourceCode: string;
903
+ resourceType: "MENU" | "DATA_CREATE" | "DATA_UPDATE" | "DATA_DELETE" | "DATA_DETAIL" | "DATA_EXPORT" | "DATA_ROW";
904
+ rolePermit: AppRole[];
905
+ }
906
+ export interface PagePermit {
907
+ menuId: number;
908
+ appCode: string;
909
+ menuPermit: PagePermitResourceSlot;
910
+ dataCreate?: PagePermitResourceSlot;
911
+ dataUpdate?: PagePermitResourceSlot;
912
+ dataDelete?: PagePermitResourceSlot;
913
+ dataDetail?: PagePermitResourceSlot;
914
+ dataExport?: PagePermitResourceSlot;
915
+ dataPermit?: PagePermitResourceSlot;
916
+ }
917
+ /** 租户成员(查人:nickname/username → userId) */
918
+ export interface TenantMember {
919
+ userId: number;
920
+ username?: string;
921
+ nickname?: string;
922
+ status?: string;
923
+ email?: string;
924
+ mobile?: string;
925
+ avatar?: string;
926
+ }
927
+ /** 当前登录账号的一条租户成员关系 */
928
+ export interface TenantMembership {
929
+ id?: number;
930
+ tenantCode: string;
931
+ tenantName?: string;
932
+ userId?: number;
933
+ status?: string;
934
+ }
935
+ /** 租户目录原始成员;公开命令必须在命令层做脱敏投影 */
936
+ export interface TenantDirectoryMember {
937
+ id?: number;
938
+ tenantCode?: string;
939
+ userId?: number;
940
+ username?: string;
941
+ nickname?: string;
942
+ status?: string;
943
+ adminFlag?: boolean;
944
+ email?: string;
945
+ mobile?: string;
946
+ avatar?: string;
947
+ }
948
+ /** POST /smartapi/permit/role/get-list:应用下所有用户组(不含 ALL/SELF 特殊组) */
949
+ export declare function listAppRoles(appCode: string, options?: {
950
+ currentPage?: number;
951
+ pageSize?: number;
952
+ }): Promise<{
953
+ items: AppRole[];
954
+ paging?: Paging;
955
+ }>;
956
+ /** GET /smartapi/permit/role/get-one?id=:按主键读取单个用户组 */
957
+ export declare function getAppRole(id: number): Promise<AppRole | null>;
958
+ /**
959
+ * POST /smartapi/permit/role/create:创建自定义用户组(服务端固定 roleType=CUSTOM)。
960
+ * 服务端返回创建后的完整角色对象。
961
+ */
962
+ export declare function createAppRole(input: {
963
+ appCode: string;
964
+ roleName: string;
965
+ remark?: string;
966
+ }): Promise<AppRole>;
967
+ /**
968
+ * POST /smartapi/permit/role/update:更新用户组。
969
+ * - 改名/备注:传 roleName / remark(不传 roleType / permits)。
970
+ * - 保存菜单权限:roleType="PAGE" + permits(resourceCode → actions)。
971
+ * - 保存 API 权限:roleType="API" + permits(resourceCode → actions)。
972
+ */
973
+ export declare function updateAppRole(input: {
974
+ id: number;
975
+ appCode: string;
976
+ roleType?: "PAGE" | "API";
977
+ roleName?: string;
978
+ remark?: string;
979
+ permits?: Record<string, PermitAction[]>;
980
+ }): Promise<unknown>;
981
+ /** POST /smartapi/permit/role/delete:删除用户组 */
982
+ export declare function deleteAppRole(id: number): Promise<void>;
983
+ /**
984
+ * POST /smartapi/permit/role/get-permit-list:应用下所有用户组 + 特殊组
985
+ * ({id:-1, roleType:"ALL"}, {id:0, roleType:"SELF"})。用于解析 SELF/ALL 字面量。
986
+ */
987
+ export declare function listPermitRoles(appCode: string, options?: {
988
+ needSelf?: boolean;
989
+ needPublic?: boolean;
990
+ }): Promise<AppRole[]>;
991
+ /** POST /smartapi/permit/resource/get-menu-list:角色当前菜单资源矩阵 */
992
+ export declare function getRoleMenuResources(appCode: string, roleId: number): Promise<MenuResource[]>;
993
+ /**
994
+ * POST /smartapi/permit/resource/get-api-list:角色当前 API 资源矩阵。
995
+ * 服务端标 @Deprecated,但为 datasetCode→resourceCode 映射与全量状态的唯一来源;
996
+ * 仅供 permit service 内部读取,不做公开命令(见 spec §3.2)。
997
+ */
998
+ export declare function getRoleApiResources(appCode: string, roleId: number): Promise<ApiResource[]>;
999
+ /** POST /smartapi/permit/user-role/get-user-list:应用下所有用户组的成员(全量) */
1000
+ export declare function listRoleUsers(appCode: string): Promise<RoleUsers[]>;
1001
+ /**
1002
+ * POST /smartapi/permit/user-role/update-user-list:全量回写所有用户组成员。
1003
+ * 命令层必须 read-merge-write,只改目标组,其余组原样带回(见 spec §5.3-3)。
1004
+ */
1005
+ export declare function updateRoleUsers(appCode: string, roleList: RoleUsers[]): Promise<void>;
1006
+ /** GET /smartapi/permit/page/get-one?menuId=:菜单页面权限快照 */
1007
+ export declare function getPagePermit(menuId: number): Promise<PagePermit>;
1008
+ /** POST /smartapi/permit/page/save:回写完整菜单页面权限配置 */
1009
+ export declare function savePagePermit(data: PagePermit): Promise<PagePermit>;
1010
+ /** GET /userTenant/queryBelongsTenants:当前登录账号所属的启用租户关系 */
1011
+ export declare function listCurrentUserTenantMemberships(): Promise<TenantMembership[]>;
1012
+ /** GET /userTenant/getByTenantCode?code=:保留全部成员状态的租户目录 */
1013
+ export declare function listTenantDirectoryMembers(tenantCode: string): Promise<TenantDirectoryMember[]>;
1014
+ /**
1015
+ * 租户成员目录(查人)兼容 wrapper。
1016
+ * 只返回 status=ENABLE 的成员,供现有 role user-* 流程继续使用。
1017
+ */
1018
+ export declare function getTenantMembers(tenantCode: string): Promise<TenantMember[]>;