@lovrabet/rabetbase-cli 2.3.16-beta.3 → 2.3.16-beta.5

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 (568) 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
  561. package/lib/commands/page/react/create.js +0 -1
  562. package/lib/commands/page/react/detail.js +0 -1
  563. package/lib/commands/page/react/list.js +0 -1
  564. package/lib/commands/page/react/publish.js +0 -1
  565. package/lib/commands/page/react/shared.js +0 -1
  566. package/lib/commands/page/react/syntax.js +0 -1
  567. package/lib/commands/page/react/template.js +0 -1
  568. package/lib/commands/page/react/update.js +0 -1
@@ -0,0 +1,105 @@
1
+ import { type PageDetail } from "../../core/api-client.js";
2
+ import type { RuntimeContext } from "../../framework/types.js";
3
+ export interface NormalizedRelatedPage {
4
+ id: number;
5
+ type: string;
6
+ code?: string;
7
+ title: string;
8
+ deleted: boolean;
9
+ }
10
+ export interface NormalizedDatasetDetail {
11
+ id: number;
12
+ code: string;
13
+ name: string;
14
+ appCode?: string;
15
+ fieldCount: number;
16
+ relatedPages: NormalizedRelatedPage[];
17
+ raw: any;
18
+ }
19
+ export interface NormalizedPageDetail {
20
+ pageId: number;
21
+ appCode?: string;
22
+ name: string;
23
+ code: string;
24
+ type: string;
25
+ datasetIds: number[];
26
+ pageVersion: number | null;
27
+ versionTag: string | null;
28
+ relatedPages: NormalizedRelatedPage[];
29
+ raw: PageDetail;
30
+ }
31
+ export interface NormalizedStandardPageFact {
32
+ pageId: number;
33
+ title: string;
34
+ type: string;
35
+ deleted: boolean;
36
+ hasMenu: boolean;
37
+ menuVisible?: boolean | null;
38
+ menuPath?: string | null;
39
+ }
40
+ export interface NormalizedStandardPageSet {
41
+ versionTag: string | null;
42
+ complete: boolean;
43
+ pages: NormalizedStandardPageFact[];
44
+ }
45
+ export interface NormalizedStandardPageStatus {
46
+ datasetId: number | null;
47
+ datasetCode: string;
48
+ pageSets: NormalizedStandardPageSet[];
49
+ totalSets: number;
50
+ completeSets: number;
51
+ incompleteSets: number;
52
+ residualPages: NormalizedStandardPageFact[];
53
+ menuPages: NormalizedStandardPageFact[];
54
+ source: "standard-page-status";
55
+ }
56
+ export type PageGenerateStatus = "generated_complete_set" | "already_exists_complete_set" | "blocked_multiple_complete_sets" | "blocked_incomplete_sets" | "blocked_complete_plus_residual_sets" | "operation_pending" | "operation_running" | "operation_failed" | "unknown_after_timeout" | "unknown_reconcile_failed" | "no_standard_pages_found";
57
+ export interface GenerateOperationStateAssessment {
58
+ status: PageGenerateStatus;
59
+ manualResolutionRequired: boolean;
60
+ message: string;
61
+ nextAction?: "run_generate_start" | "run_sync" | "query_operation_status" | "manual_resolution_required";
62
+ }
63
+ export interface StandardPageStateAssessment {
64
+ status: "generated_complete_set" | "already_exists_complete_set" | "blocked_multiple_complete_sets" | "blocked_incomplete_sets" | "blocked_complete_plus_residual_sets" | "no_standard_pages_found" | "unknown_reconcile_failed";
65
+ allowGenerate: boolean;
66
+ manualResolutionRequired: boolean;
67
+ message: string;
68
+ nextAction?: "run_generate_start" | "run_sync" | "query_operation_status" | "manual_resolution_required";
69
+ }
70
+ export declare function getPageIdFlag(ctx: RuntimeContext): number | undefined;
71
+ export declare function validateDatasetSelector(ctx: RuntimeContext): void;
72
+ export declare function validateGenerateOperationSelector(ctx: RuntimeContext): void;
73
+ export declare function validatePageTargetSelector(ctx: RuntimeContext): void;
74
+ export declare function resolveDatasetCode(ctx: RuntimeContext): string;
75
+ export declare function loadDatasetDetailForPage(ctx: RuntimeContext): Promise<NormalizedDatasetDetail>;
76
+ export declare function loadPageDetailForPage(ctx: RuntimeContext, pageId: number): Promise<NormalizedPageDetail>;
77
+ export declare function getUndeletedRelatedPages(detail: NormalizedDatasetDetail): NormalizedRelatedPage[];
78
+ export declare function buildPageGenerateOperationStatusQueryCommand(datasetCode: string, options?: {
79
+ appCode?: string;
80
+ operationId?: string;
81
+ clientOperationId?: string;
82
+ }): string;
83
+ export declare function createPageGenerateClientOperationId(): string;
84
+ export declare function buildStandardPageStatusQueryCommand(datasetCode: string, appCode?: string): string;
85
+ export declare function prepareDatasetAction(dataset: NormalizedDatasetDetail, action: "generate" | "sync"): {
86
+ dataset: NormalizedDatasetDetail;
87
+ undeletedPages: NormalizedRelatedPage[];
88
+ };
89
+ export declare function prepareGenerateDatasetAction(dataset: NormalizedDatasetDetail, standardPageStatus: NormalizedStandardPageStatus | null): {
90
+ dataset: NormalizedDatasetDetail;
91
+ undeletedPages: NormalizedRelatedPage[];
92
+ standardPageStatus: NormalizedStandardPageStatus | null;
93
+ };
94
+ export declare function assessStandardPageState(datasetCode: string, standardPageStatus: NormalizedStandardPageStatus | null, options?: {
95
+ successStatus?: "generated_complete_set" | "already_exists_complete_set";
96
+ fallbackUndeletedPages?: NormalizedRelatedPage[];
97
+ }): StandardPageStateAssessment;
98
+ export declare function assessGenerateOperationState(datasetCode: string, jobStatus: string | null | undefined, standardPageStatus: NormalizedStandardPageStatus | null): GenerateOperationStateAssessment;
99
+ export declare function normalizePageDetail(detail: PageDetail): NormalizedPageDetail;
100
+ export declare function serializeDryRunDescription(value: unknown): string;
101
+ export declare function loadStandardPageStatusForGenerate(ctx: RuntimeContext, datasetCode: string): Promise<NormalizedStandardPageStatus | null>;
102
+ export declare function selectVersionTagGroup<T>(items: T[], getVersionTag: (item: T) => string | null | undefined, requestedTag?: string): {
103
+ items: T[];
104
+ availableTags: string[];
105
+ };
@@ -1 +1 @@
1
- (function(_0x9dffaf,_0x580d75){const _0xec2aaf=a150_0x266a,_0x1c9163=_0x9dffaf();while(!![]){try{const _0x1215ff=-parseInt(_0xec2aaf(0x150))/0x1+-parseInt(_0xec2aaf(0x142))/0x2*(parseInt(_0xec2aaf(0x13c))/0x3)+-parseInt(_0xec2aaf(0x133))/0x4+parseInt(_0xec2aaf(0x12e))/0x5+-parseInt(_0xec2aaf(0x195))/0x6+-parseInt(_0xec2aaf(0x154))/0x7+parseInt(_0xec2aaf(0x16f))/0x8;if(_0x1215ff===_0x580d75)break;else _0x1c9163['push'](_0x1c9163['shift']());}catch(_0x3c9abb){_0x1c9163['push'](_0x1c9163['shift']());}}}(a150_0x163f,0xd64cd));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x30e42a){const _0x1ef763=a150_0x266a,_0x120744=_0x30e42a['flag']('id');if(typeof _0x120744===_0x1ef763(0x193)&&Number[_0x1ef763(0x180)](_0x120744)&&_0x120744>0x0)return _0x120744;return undefined;}export function validateDatasetSelector(_0x2ff613){const _0x4e0330=a150_0x266a,_0x173378=Boolean(_0x2ff613[_0x4e0330(0x12d)](_0x4e0330(0x14d))),_0x53b257=Boolean(_0x2ff613[_0x4e0330(0x12d)](_0x4e0330(0x18a)));if(_0x173378&&_0x53b257)throw CliErrors[_0x4e0330(0x122)](_0x4e0330(0x173));if(!_0x173378&&!_0x53b257)throw CliErrors[_0x4e0330(0x122)](_0x4e0330(0x178));}export function validateGenerateOperationSelector(_0x2f73b6){const _0x46fe52=a150_0x266a,_0x107a14=Boolean(_0x2f73b6[_0x46fe52(0x12d)](_0x46fe52(0x121))),_0x1dd4a7=Boolean(_0x2f73b6[_0x46fe52(0x12d)](_0x46fe52(0x17a)));if(_0x107a14&&_0x1dd4a7)throw CliErrors[_0x46fe52(0x122)](_0x46fe52(0x182));if(!_0x107a14&&!_0x1dd4a7)throw CliErrors[_0x46fe52(0x122)](_0x46fe52(0x17f));}export function validatePageTargetSelector(_0x3e3db4){const _0x442dea=a150_0x266a,_0x118e4a=getPageIdFlag(_0x3e3db4)!==undefined,_0x2c58fb=Boolean(_0x3e3db4[_0x442dea(0x12d)](_0x442dea(0x14d))||_0x3e3db4['str'](_0x442dea(0x18a)));if(_0x118e4a&&_0x2c58fb)throw CliErrors['validation']('Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.');if(!_0x118e4a&&!_0x2c58fb)throw CliErrors[_0x442dea(0x122)]('One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.');if(_0x3e3db4[_0x442dea(0x12d)]('version-tag')&&!_0x2c58fb)throw CliErrors[_0x442dea(0x122)](_0x442dea(0x157));}export function resolveDatasetCode(_0x1c48e9){const _0x2b5f7f=a150_0x266a;validateDatasetSelector(_0x1c48e9);const _0x2dfbdb=_0x1c48e9[_0x2b5f7f(0x12d)](_0x2b5f7f(0x14d));if(_0x2dfbdb)return _0x2dfbdb;const _0x324201=_0x1c48e9[_0x2b5f7f(0x12d)](_0x2b5f7f(0x18a)),_0x46fd7f=resolveApiFilePath(_0x1c48e9[_0x2b5f7f(0x12f)],_0x1c48e9[_0x2b5f7f(0x18b)]),_0x469f7f=resolveAlias(_0x1c48e9[_0x2b5f7f(0x12f)],_0x324201,undefined,_0x46fd7f);if(_0x469f7f)return _0x469f7f;const _0x11b15b=loadAliasMap(_0x1c48e9[_0x2b5f7f(0x12f)],undefined,_0x46fd7f),_0x28e0a1=_0x11b15b[_0x2b5f7f(0x181)]>0x0?_0x2b5f7f(0x13b)+_0x11b15b['map'](_0x13d719=>_0x13d719[_0x2b5f7f(0x18a)])[_0x2b5f7f(0x152)](',\x20'):_0x2b5f7f(0x169)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.';throw CliErrors['validation'](_0x2b5f7f(0x170)+_0x324201+_0x2b5f7f(0x199)+_0x28e0a1);}export async function loadDatasetDetailForPage(_0x3603e1){const _0x2f9e7e=a150_0x266a,_0x407e8f=resolveDatasetCode(_0x3603e1),_0x5bfe8d=await getDatasetDetail(_0x407e8f),_0x456ace=normalizeDatasetDetail(_0x5bfe8d,_0x407e8f);return ensureAppOwnership(_0x3603e1[_0x2f9e7e(0x18b)],_0x456ace[_0x2f9e7e(0x18b)],_0x2f9e7e(0x168)+_0x456ace[_0x2f9e7e(0x120)]+_0x2f9e7e(0x197)+_0x456ace[_0x2f9e7e(0x18b)]+_0x2f9e7e(0x13d)+_0x3603e1[_0x2f9e7e(0x18b)]+'\x22.'),_0x456ace;}export async function loadPageDetailForPage(_0x2877ea,_0x1e6cfd){const _0x51daa4=a150_0x266a,_0x217db0=await getPageDetail(_0x1e6cfd),_0xcebece=normalizePageDetail(_0x217db0);return ensureAppOwnership(_0x2877ea['appCode'],_0xcebece['appCode'],_0x51daa4(0x18f)+_0x1e6cfd+_0x51daa4(0x197)+_0xcebece['appCode']+'\x22,\x20not\x20current\x20app\x20\x22'+_0x2877ea['appCode']+'\x22.'),_0xcebece;}export function getUndeletedRelatedPages(_0x1c39fd){const _0x537db7=a150_0x266a;return _0x1c39fd[_0x537db7(0x139)]['filter'](_0x572e18=>!_0x572e18['deleted']);}export function buildPageGenerateOperationStatusQueryCommand(_0x27b55c,_0xfd30fc){const _0x2b2ee2=a150_0x266a,_0x1a8ab8=_0xfd30fc?.[_0x2b2ee2(0x18b)]&&_0xfd30fc[_0x2b2ee2(0x18b)][_0x2b2ee2(0x130)]()!==''?_0x2b2ee2(0x177)+_0xfd30fc[_0x2b2ee2(0x18b)]:'',_0xf9fa5c=_0xfd30fc?.['operationId']&&_0xfd30fc[_0x2b2ee2(0x18d)][_0x2b2ee2(0x130)]()!==''?_0x2b2ee2(0x11f)+_0xfd30fc[_0x2b2ee2(0x18d)]:_0xfd30fc?.['clientOperationId']&&_0xfd30fc['clientOperationId'][_0x2b2ee2(0x130)]()!==''?_0x2b2ee2(0x12c)+_0xfd30fc['clientOperationId']:'';return CLI_BIN_NAME+_0x2b2ee2(0x156)+_0x27b55c+_0x1a8ab8+_0xf9fa5c+_0x2b2ee2(0x134);}export function createPageGenerateClientOperationId(){const _0x20e420=a150_0x266a;return _0x20e420(0x124)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x54dc67,_0x1cd7f0){const _0x4c59dd=a150_0x266a,_0x932951=_0x1cd7f0&&_0x1cd7f0[_0x4c59dd(0x130)]()!==''?_0x4c59dd(0x177)+_0x1cd7f0:'';return CLI_BIN_NAME+_0x4c59dd(0x14c)+_0x54dc67+_0x932951+_0x4c59dd(0x134);}function a150_0x163f(){const _0x305d4e=['--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','blocked_incomplete_sets','run_generate_start','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','relatedPageInfoList','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','versionTag','unknown','menuPath','isArray','name','stringify','no_standard_pages_found','deleted','operation_pending','CANCELLED','boolean','Dataset\x20\x22','Run\x20`','PARTIAL_SUCCESS','push','datasetId','successStatus','blocked_complete_plus_residual_sets','39951680yRaVsW','Alias\x20\x22','map','type','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','unknown_reconcile_failed','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','\x20--appcode\x20','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','totalSets','client-operation-id','sync','object','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','isFinite','length','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','SUCCESS','properties','\x22\x20not\x20found.','filter','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','<empty>','PENDING','alias','appCode','modelId','operationId','title','Page\x20\x22','incompleteSets','set','dataset','number','status','7306314VhDOcm','run_sync','\x22\x20belongs\x20to\x20app\x20\x22','pages','\x22\x20not\x20found.\x20','datasetCode','UNKNOWN','query_operation_status','residualPages','generated_complete_set','Operation\x20finished\x20for\x20dataset\x20\x22','CANCELING','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','\x20--operation-id\x20','code','operation-id','validation','pageVersion','page-generate-','pageId','get','`\x20first,\x20then\x20poll\x20`','generate','string','manual_resolution_required','menuPages','\x20--client-operation-id\x20','str','6430505kdjrVV','apiDir','trim','hasMenu','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','2066952DMEbiO','\x20--format\x20json','page-','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','fields','modelCode','relatedPages','keys','Available\x20aliases:\x20','3877743pNIiTq','\x22,\x20not\x20current\x20app\x20\x22','toUpperCase','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','completeSets','operation_failed','2glnnls','\x20page\x20sync\x20--datasetcode\x20','from','config','pageSets','complete','FAILED','__EMPTY__','`\x20instead.','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','\x20page\x20standard-page-status\x20--datasetcode\x20','datasetcode','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.','1451676eszjQO','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','join','Switch\x20app\x20with\x20`','6465018DsoFmh','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','\x20page\x20generate-status\x20--datasetcode\x20'];a150_0x163f=function(){return _0x305d4e;};return a150_0x163f();}export function prepareDatasetAction(_0x407778,_0x5c7e56){const _0x2bad02=a150_0x266a,_0x12f1c5=getUndeletedRelatedPages(_0x407778);if(_0x5c7e56===_0x2bad02(0x128)&&_0x12f1c5['length']>0x0)throw CliErrors[_0x2bad02(0x122)](_0x2bad02(0x168)+_0x407778['code']+_0x2bad02(0x14b),_0x2bad02(0x169)+CLI_BIN_NAME+_0x2bad02(0x143)+_0x407778[_0x2bad02(0x120)]+'`\x20instead.');if(_0x5c7e56===_0x2bad02(0x17b)&&_0x12f1c5[_0x2bad02(0x181)]===0x0)throw CliErrors['validation'](_0x2bad02(0x168)+_0x407778[_0x2bad02(0x120)]+'\x22\x20has\x20no\x20undeleted\x20related\x20pages.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20generate-start\x20--datasetcode\x20'+_0x407778[_0x2bad02(0x120)]+_0x2bad02(0x127)+CLI_BIN_NAME+_0x2bad02(0x156)+_0x407778['code']+_0x2bad02(0x175));return{'dataset':_0x407778,'undeletedPages':_0x12f1c5};}export function prepareGenerateDatasetAction(_0x2eccec,_0x43e918){const _0x7d6127=a150_0x266a,_0x588f74=getUndeletedRelatedPages(_0x2eccec);if(!_0x43e918){if(_0x588f74['length']>0x0)throw CliErrors[_0x7d6127(0x122)]('Dataset\x20\x22'+_0x2eccec[_0x7d6127(0x120)]+_0x7d6127(0x14b),_0x7d6127(0x169)+CLI_BIN_NAME+_0x7d6127(0x143)+_0x2eccec[_0x7d6127(0x120)]+_0x7d6127(0x14a));return{'dataset':_0x2eccec,'undeletedPages':_0x588f74,'standardPageStatus':null};}const _0x398774=_0x43e918['completeSets'],_0x421080=_0x43e918[_0x7d6127(0x190)],_0x12ac59=_0x43e918[_0x7d6127(0x11a)]['length'];if(_0x398774===0x0&&_0x421080===0x0&&_0x12ac59===0x0)return{'dataset':_0x2eccec,'undeletedPages':_0x588f74,'standardPageStatus':_0x43e918};if(_0x398774===0x1&&_0x421080===0x0&&_0x12ac59===0x0)throw CliErrors[_0x7d6127(0x122)](_0x7d6127(0x168)+_0x2eccec['code']+'\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','Run\x20`'+CLI_BIN_NAME+_0x7d6127(0x143)+_0x2eccec['code']+_0x7d6127(0x14a));throw CliErrors[_0x7d6127(0x122)](_0x7d6127(0x168)+_0x2eccec['code']+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.',_0x7d6127(0x13f));}export function assessStandardPageState(_0x18c680,_0x130135,_0x2a74a7){const _0xad544=a150_0x266a,_0x53b099=_0x2a74a7?.[_0xad544(0x16d)]??'already_exists_complete_set',_0x294d35=_0x2a74a7?.['fallbackUndeletedPages']??[];if(!_0x130135){if(_0x294d35[_0xad544(0x181)]>0x0)return{'status':_0xad544(0x158),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x155),'nextAction':_0xad544(0x12a)};return{'status':_0xad544(0x163),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x187),'nextAction':_0xad544(0x159)};}const _0x35bc2d=_0x130135[_0xad544(0x140)],_0x428f13=_0x130135[_0xad544(0x190)],_0x3bc4e5=_0x130135[_0xad544(0x11a)][_0xad544(0x181)];if(_0x35bc2d===0x0&&_0x428f13===0x0&&_0x3bc4e5===0x0)return{'status':_0xad544(0x163),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x187),'nextAction':_0xad544(0x159)};if(_0x35bc2d>0x1)return{'status':'blocked_multiple_complete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x151),'nextAction':_0xad544(0x12a)};if(_0x428f13>0x0)return{'status':_0xad544(0x158),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x15a),'nextAction':'manual_resolution_required'};if(_0x35bc2d===0x1&&_0x3bc4e5>0x0)return{'status':_0xad544(0x16e),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x18c680+_0xad544(0x17d),'nextAction':'manual_resolution_required'};if(_0x35bc2d===0x1)return{'status':_0x53b099,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x53b099==='generated_complete_set'?_0xad544(0x168)+_0x18c680+_0xad544(0x17e):_0xad544(0x168)+_0x18c680+'\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','nextAction':_0x53b099===_0xad544(0x11b)?undefined:_0xad544(0x196)};return{'status':_0xad544(0x174),'allowGenerate':![],'manualResolutionRequired':![],'message':_0xad544(0x168)+_0x18c680+_0xad544(0x14e),'nextAction':_0xad544(0x119)};}export function assessGenerateOperationState(_0x5ddadd,_0x2e1f3,_0x59daac){const _0x585ae2=a150_0x266a,_0x2ae214=String(_0x2e1f3||'')[_0x585ae2(0x130)]()[_0x585ae2(0x13e)]();if(_0x2ae214===_0x585ae2(0x189))return{'status':_0x585ae2(0x165),'manualResolutionRequired':![],'message':_0x585ae2(0x176)+_0x5ddadd+'\x22.','nextAction':_0x585ae2(0x119)};if(_0x2ae214==='RUNNING'||_0x2ae214==='RETRYING'||_0x2ae214===_0x585ae2(0x11d))return{'status':'operation_running','manualResolutionRequired':![],'message':_0x585ae2(0x136)+_0x5ddadd+'\x22.','nextAction':_0x585ae2(0x119)};if(_0x2ae214===_0x585ae2(0x183)||_0x2ae214===_0x585ae2(0x16a)){if(!_0x59daac)return{'status':_0x585ae2(0x174),'manualResolutionRequired':![],'message':_0x585ae2(0x11c)+_0x5ddadd+_0x585ae2(0x11e),'nextAction':_0x585ae2(0x119)};const _0x2cb769=assessStandardPageState(_0x5ddadd,_0x59daac,{'successStatus':_0x585ae2(0x11b)});if(_0x2cb769[_0x585ae2(0x194)]===_0x585ae2(0x163))return{'status':_0x585ae2(0x174),'manualResolutionRequired':![],'message':_0x585ae2(0x11c)+_0x5ddadd+_0x585ae2(0x15c),'nextAction':'query_operation_status'};return _0x2cb769;}if(_0x2ae214===_0x585ae2(0x148)||_0x2ae214===_0x585ae2(0x166)||_0x2ae214==='')return{'status':_0x585ae2(0x141),'manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22'+_0x5ddadd+'\x22.','nextAction':_0x585ae2(0x119)};return{'status':_0x585ae2(0x174),'manualResolutionRequired':![],'message':_0x585ae2(0x168)+_0x5ddadd+_0x585ae2(0x132)+_0x2ae214+'\x22.','nextAction':'query_operation_status'};}export function normalizePageDetail(_0x204932){const _0x23a022=a150_0x266a;return{'pageId':Number(_0x204932[_0x23a022(0x125)]),'appCode':_0x204932[_0x23a022(0x18b)],'name':_0x204932[_0x23a022(0x161)]||_0x23a022(0x135)+_0x204932['pageId'],'code':_0x204932[_0x23a022(0x120)]||'','type':_0x204932[_0x23a022(0x172)]?String(_0x204932[_0x23a022(0x172)]):_0x23a022(0x118),'datasetIds':Array[_0x23a022(0x160)](_0x204932['datasetIds'])?_0x204932['datasetIds'][_0x23a022(0x171)](_0x401aa9=>Number(_0x401aa9))['filter'](_0x4da951=>Number[_0x23a022(0x180)](_0x4da951)):[],'pageVersion':_0x204932['config']&&typeof _0x204932[_0x23a022(0x145)][_0x23a022(0x123)]==='number'?_0x204932[_0x23a022(0x145)][_0x23a022(0x123)]:null,'versionTag':_0x204932[_0x23a022(0x145)]&&typeof _0x204932[_0x23a022(0x145)]['versionTag']==='string'&&_0x204932[_0x23a022(0x145)]['versionTag']['trim']()!==''?_0x204932[_0x23a022(0x145)][_0x23a022(0x15d)]:null,'relatedPages':normalizeRelatedPages(_0x204932[_0x23a022(0x15b)]),'raw':_0x204932};}export function serializeDryRunDescription(_0x2abdee){const _0x29e217=a150_0x266a;return JSON[_0x29e217(0x162)](_0x2abdee,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x1011bc,_0x1b21f0){const _0x1fae59=a150_0x266a,_0x545a0b=await tryGetStandardPageStatus(_0x1011bc[_0x1fae59(0x18b)],_0x1b21f0);if(!_0x545a0b)return null;return normalizeStandardPageStatus(_0x545a0b,_0x1b21f0);}export function selectVersionTagGroup(_0x1e9c3c,_0x39cb01,_0x4ecd83){const _0x256465=a150_0x266a,_0x4c6cfd=new Map();for(const _0x5a1192 of _0x1e9c3c){const _0x60d59d=normalizeVersionTag(_0x39cb01(_0x5a1192)),_0x4588d5=_0x4c6cfd[_0x256465(0x126)](_0x60d59d)??[];_0x4588d5[_0x256465(0x16b)](_0x5a1192),_0x4c6cfd[_0x256465(0x191)](_0x60d59d,_0x4588d5);}const _0x72b20e=Array[_0x256465(0x144)](_0x4c6cfd[_0x256465(0x13a)]());if(_0x72b20e[_0x256465(0x181)]<=0x1&&!_0x4ecd83)return{'items':_0x1e9c3c,'availableTags':_0x72b20e};if(_0x4ecd83){const _0x3f327b=normalizeVersionTag(_0x4ecd83),_0x3624ba=_0x4c6cfd[_0x256465(0x126)](_0x3f327b);if(!_0x3624ba)throw CliErrors['validation']('Version\x20tag\x20\x22'+_0x4ecd83+_0x256465(0x185),buildVersionTagHint(_0x72b20e));return{'items':_0x3624ba,'availableTags':_0x72b20e};}throw CliErrors[_0x256465(0x122)]('Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.',buildVersionTagHint(_0x72b20e));}function normalizeDatasetDetail(_0x1811be,_0x3c4470){const _0xc2f220=a150_0x266a,_0x130076=Array[_0xc2f220(0x160)](_0x1811be['fields'])?_0x1811be[_0xc2f220(0x137)]:Array[_0xc2f220(0x160)](_0x1811be[_0xc2f220(0x184)])?_0x1811be[_0xc2f220(0x184)]:[];return{'id':Number(_0x1811be['id']??_0x1811be[_0xc2f220(0x18c)]??0x0),'code':String(_0x1811be[_0xc2f220(0x120)]||_0x1811be[_0xc2f220(0x138)]||_0x3c4470),'name':String(_0x1811be['name']||_0x3c4470),'appCode':_0x1811be[_0xc2f220(0x18b)]||_0x1811be[_0xc2f220(0x192)]?.[_0xc2f220(0x18b)],'fieldCount':_0x130076[_0xc2f220(0x181)],'relatedPages':normalizeRelatedPages(_0x1811be[_0xc2f220(0x15b)]),'raw':_0x1811be};}function a150_0x266a(_0x34f6c3,_0x884283){_0x34f6c3=_0x34f6c3-0x117;const _0x163fc8=a150_0x163f();let _0x266adc=_0x163fc8[_0x34f6c3];return _0x266adc;}function normalizeStandardPageStatus(_0xd9eae7,_0x14d285){const _0x3e23b1=a150_0x266a,_0x23f4eb=_0x21fb6b=>({'pageId':Number(_0x21fb6b['pageId']??_0x21fb6b['id']??0x0),'title':String(_0x21fb6b[_0x3e23b1(0x18e)]||_0x21fb6b[_0x3e23b1(0x161)]||_0x3e23b1(0x135)+(_0x21fb6b[_0x3e23b1(0x125)]??_0x21fb6b['id']??_0x3e23b1(0x15e))),'type':_0x21fb6b[_0x3e23b1(0x172)]?String(_0x21fb6b['type']):'UNKNOWN','deleted':_0x21fb6b[_0x3e23b1(0x164)]===!![],'hasMenu':_0x21fb6b[_0x3e23b1(0x131)]===!![],'menuVisible':typeof _0x21fb6b['menuVisible']===_0x3e23b1(0x167)?_0x21fb6b['menuVisible']:null,'menuPath':typeof _0x21fb6b[_0x3e23b1(0x15f)]===_0x3e23b1(0x129)&&_0x21fb6b['menuPath'][_0x3e23b1(0x130)]()!==''?_0x21fb6b[_0x3e23b1(0x15f)]:null}),_0x3e248c=Array[_0x3e23b1(0x160)](_0xd9eae7[_0x3e23b1(0x146)])?_0xd9eae7[_0x3e23b1(0x146)][_0x3e23b1(0x171)](_0x5c474a=>({'versionTag':typeof _0x5c474a[_0x3e23b1(0x15d)]==='string'&&_0x5c474a[_0x3e23b1(0x15d)][_0x3e23b1(0x130)]()!==''?_0x5c474a[_0x3e23b1(0x15d)]:null,'complete':_0x5c474a[_0x3e23b1(0x147)]===!![],'pages':Array['isArray'](_0x5c474a[_0x3e23b1(0x198)])?_0x5c474a[_0x3e23b1(0x198)]['map'](_0x23f4eb):[]})):[];return{'datasetId':typeof _0xd9eae7[_0x3e23b1(0x16c)]===_0x3e23b1(0x193)&&Number[_0x3e23b1(0x180)](_0xd9eae7[_0x3e23b1(0x16c)])?_0xd9eae7[_0x3e23b1(0x16c)]:null,'datasetCode':typeof _0xd9eae7[_0x3e23b1(0x117)]===_0x3e23b1(0x129)&&_0xd9eae7[_0x3e23b1(0x117)][_0x3e23b1(0x130)]()!==''?_0xd9eae7['datasetCode']:_0x14d285,'pageSets':_0x3e248c,'totalSets':typeof _0xd9eae7['totalSets']===_0x3e23b1(0x193)&&Number['isFinite'](_0xd9eae7[_0x3e23b1(0x179)])?_0xd9eae7['totalSets']:_0x3e248c['length'],'completeSets':typeof _0xd9eae7[_0x3e23b1(0x140)]===_0x3e23b1(0x193)&&Number[_0x3e23b1(0x180)](_0xd9eae7[_0x3e23b1(0x140)])?_0xd9eae7['completeSets']:_0x3e248c[_0x3e23b1(0x186)](_0x48af76=>_0x48af76[_0x3e23b1(0x147)])['length'],'incompleteSets':typeof _0xd9eae7[_0x3e23b1(0x190)]===_0x3e23b1(0x193)&&Number[_0x3e23b1(0x180)](_0xd9eae7['incompleteSets'])?_0xd9eae7[_0x3e23b1(0x190)]:_0x3e248c[_0x3e23b1(0x186)](_0x31b5ef=>!_0x31b5ef['complete']&&_0x31b5ef[_0x3e23b1(0x198)][_0x3e23b1(0x181)]>0x0)[_0x3e23b1(0x181)],'residualPages':Array[_0x3e23b1(0x160)](_0xd9eae7[_0x3e23b1(0x11a)])?_0xd9eae7[_0x3e23b1(0x11a)][_0x3e23b1(0x171)](_0x23f4eb):[],'menuPages':Array[_0x3e23b1(0x160)](_0xd9eae7[_0x3e23b1(0x12b)])?_0xd9eae7[_0x3e23b1(0x12b)]['map'](_0x23f4eb):[],'source':'standard-page-status'};}function normalizeRelatedPages(_0x562a32){const _0x11a70b=a150_0x266a;if(!Array[_0x11a70b(0x160)](_0x562a32))return[];return _0x562a32[_0x11a70b(0x186)](_0x33165c=>_0x33165c&&typeof _0x33165c===_0x11a70b(0x17c))[_0x11a70b(0x171)](_0x3d85a5=>({'id':Number(_0x3d85a5['id']),'type':_0x3d85a5['type']?String(_0x3d85a5['type']):'UNKNOWN','code':_0x3d85a5[_0x11a70b(0x120)]||undefined,'title':_0x3d85a5[_0x11a70b(0x18e)]||_0x3d85a5['name']||_0x11a70b(0x135)+_0x3d85a5['id'],'deleted':_0x3d85a5[_0x11a70b(0x164)]===!![]}))[_0x11a70b(0x186)](_0x266e47=>Number[_0x11a70b(0x180)](_0x266e47['id']));}function ensureAppOwnership(_0x17d13d,_0x2bc84b,_0x56ac9f){const _0x3da234=a150_0x266a;if(!_0x2bc84b)return;if(_0x2bc84b!==_0x17d13d)throw CliErrors['validation'](_0x56ac9f,_0x3da234(0x153)+CLI_BIN_NAME+_0x3da234(0x14f));}function normalizeVersionTag(_0x26aaea){const _0x350581=a150_0x266a;return _0x26aaea&&_0x26aaea[_0x350581(0x130)]()!==''?_0x26aaea:_0x350581(0x149);}function buildVersionTagHint(_0x12e67a){const _0x4c8abf=a150_0x266a,_0x2c180e=_0x12e67a['map'](_0xc6768=>_0xc6768===_0x4c8abf(0x149)?_0x4c8abf(0x188):_0xc6768)[_0x4c8abf(0x152)](',\x20');return'Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20'+_0x2c180e;}
1
+ (function(_0x24420c,_0x5f17e7){const _0x4d3fbd=a142_0x5b38,_0x55a13d=_0x24420c();while(!![]){try{const _0x1ca43b=parseInt(_0x4d3fbd(0x22a))/0x1+parseInt(_0x4d3fbd(0x24c))/0x2*(-parseInt(_0x4d3fbd(0x229))/0x3)+parseInt(_0x4d3fbd(0x1fe))/0x4*(-parseInt(_0x4d3fbd(0x257))/0x5)+parseInt(_0x4d3fbd(0x1f5))/0x6+parseInt(_0x4d3fbd(0x1fa))/0x7*(parseInt(_0x4d3fbd(0x216))/0x8)+-parseInt(_0x4d3fbd(0x243))/0x9*(parseInt(_0x4d3fbd(0x23b))/0xa)+parseInt(_0x4d3fbd(0x217))/0xb;if(_0x1ca43b===_0x5f17e7)break;else _0x55a13d['push'](_0x55a13d['shift']());}catch(_0x43d123){_0x55a13d['push'](_0x55a13d['shift']());}}}(a142_0x185f,0xdeb3d));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x322c8f){const _0x505efb=a142_0x5b38,_0x1f7a13=_0x322c8f['flag']('id');if(typeof _0x1f7a13===_0x505efb(0x21e)&&Number[_0x505efb(0x1dc)](_0x1f7a13)&&_0x1f7a13>0x0)return _0x1f7a13;return undefined;}export function validateDatasetSelector(_0x1c2e40){const _0x4da1dd=a142_0x5b38,_0x126f26=Boolean(_0x1c2e40[_0x4da1dd(0x215)](_0x4da1dd(0x1e0))),_0xe4cdbf=Boolean(_0x1c2e40[_0x4da1dd(0x215)](_0x4da1dd(0x249)));if(_0x126f26&&_0xe4cdbf)throw CliErrors[_0x4da1dd(0x241)]('Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.');if(!_0x126f26&&!_0xe4cdbf)throw CliErrors[_0x4da1dd(0x241)](_0x4da1dd(0x22f));}export function validateGenerateOperationSelector(_0x427e58){const _0x5d1fc2=a142_0x5b38,_0x1a9087=Boolean(_0x427e58['str'](_0x5d1fc2(0x23e))),_0x15c4ac=Boolean(_0x427e58['str'](_0x5d1fc2(0x21b)));if(_0x1a9087&&_0x15c4ac)throw CliErrors['validation']('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0x1a9087&&!_0x15c4ac)throw CliErrors[_0x5d1fc2(0x241)]('One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.');}function a142_0x5b38(_0x149890,_0x4d7753){_0x149890=_0x149890-0x1d8;const _0x185f16=a142_0x185f();let _0x5b3856=_0x185f16[_0x149890];return _0x5b3856;}export function validatePageTargetSelector(_0x28e06c){const _0x52b188=a142_0x5b38,_0x330e6a=getPageIdFlag(_0x28e06c)!==undefined,_0x3a5162=Boolean(_0x28e06c[_0x52b188(0x215)](_0x52b188(0x1e0))||_0x28e06c[_0x52b188(0x215)]('alias'));if(_0x330e6a&&_0x3a5162)throw CliErrors['validation'](_0x52b188(0x233));if(!_0x330e6a&&!_0x3a5162)throw CliErrors[_0x52b188(0x241)](_0x52b188(0x21f));if(_0x28e06c['str']('version-tag')&&!_0x3a5162)throw CliErrors[_0x52b188(0x241)](_0x52b188(0x1e6));}export function resolveDatasetCode(_0x356ddf){const _0x1a6a59=a142_0x5b38;validateDatasetSelector(_0x356ddf);const _0x200781=_0x356ddf[_0x1a6a59(0x215)](_0x1a6a59(0x1e0));if(_0x200781)return _0x200781;const _0xd2007c=_0x356ddf['str'](_0x1a6a59(0x249)),_0x40b349=resolveApiFilePath(_0x356ddf[_0x1a6a59(0x208)],_0x356ddf[_0x1a6a59(0x1e9)]),_0x2ca3f5=resolveAlias(_0x356ddf['apiDir'],_0xd2007c,undefined,_0x40b349);if(_0x2ca3f5)return _0x2ca3f5;const _0x495bb4=loadAliasMap(_0x356ddf[_0x1a6a59(0x208)],undefined,_0x40b349),_0x3261ad=_0x495bb4['length']>0x0?_0x1a6a59(0x223)+_0x495bb4['map'](_0x3c7850=>_0x3c7850[_0x1a6a59(0x249)])[_0x1a6a59(0x1db)](',\x20'):_0x1a6a59(0x22d)+CLI_BIN_NAME+_0x1a6a59(0x222);throw CliErrors[_0x1a6a59(0x241)](_0x1a6a59(0x1e7)+_0xd2007c+_0x1a6a59(0x221)+_0x3261ad);}export async function loadDatasetDetailForPage(_0x2d02f9){const _0x477d49=a142_0x5b38,_0x18cb06=resolveDatasetCode(_0x2d02f9),_0x9de890=await getDatasetDetail(_0x18cb06),_0x30a673=normalizeDatasetDetail(_0x9de890,_0x18cb06);return ensureAppOwnership(_0x2d02f9[_0x477d49(0x1e9)],_0x30a673[_0x477d49(0x1e9)],_0x477d49(0x238)+_0x30a673['code']+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x30a673['appCode']+_0x477d49(0x209)+_0x2d02f9[_0x477d49(0x1e9)]+'\x22.'),_0x30a673;}function a142_0x185f(){const _0xb08639=['residualPages','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','code','isArray','manual_resolution_required','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','\x20--appcode\x20','\x20--format\x20json','PARTIAL_SUCCESS','menuPages','4499395IcAODH','properties','Page\x20\x22','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','keys','pageSets','fallbackUndeletedPages','join','isFinite','config','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','menuPath','datasetcode','pageId','operation_failed','blocked_incomplete_sets','\x20--client-operation-id\x20','UNKNOWN','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','Alias\x20\x22','title','appCode','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','push','incompleteSets','from','query_operation_status','unknown_reconcile_failed','PENDING','name','generate','`\x20first,\x20then\x20poll\x20`','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','6854358dwOHFg','dataset','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','datasetIds','1617YcgElf','page-generate-','generated_complete_set','run_generate_start','4tZkAgR','relatedPageInfoList','complete','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','already_exists_complete_set','clientOperationId','datasetId','Version\x20tag\x20\x22','toUpperCase','pageVersion','apiDir','\x22,\x20not\x20current\x20app\x20\x22','modelCode','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','pages','map','length','\x20page\x20generate-start\x20--datasetcode\x20','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','filter','SUCCESS','fields','Switch\x20app\x20with\x20`','str','46488HcINiR','13283072KJnSKr','\x20page\x20standard-page-status\x20--datasetcode\x20','\x20page\x20sync\x20--datasetcode\x20','completeSets','client-operation-id','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','object','number','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','<empty>','\x22\x20not\x20found.\x20','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','Available\x20aliases:\x20','status','get','\x20page\x20generate-status\x20--datasetcode\x20','boolean','CANCELING','1387962NFTnto','1148060iPujnx','\x22\x20belongs\x20to\x20app\x20\x22','string','Run\x20`','totalSets','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','no_standard_pages_found','versionTag','RETRYING','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','blocked_multiple_complete_sets','\x22\x20not\x20found.','stringify','menuVisible','Dataset\x20\x22','set','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','16403160GTLmqZ','deleted','blocked_complete_plus_residual_sets','operation-id','operationId','page-','validation','standard-page-status','9XuqgTW','operation_running','type','modelId','RUNNING','__EMPTY__','alias','datasetCode','trim','6intini'];a142_0x185f=function(){return _0xb08639;};return a142_0x185f();}export async function loadPageDetailForPage(_0x4b863e,_0x51fdb1){const _0x35187a=a142_0x5b38,_0x4401a6=await getPageDetail(_0x51fdb1),_0x479bae=normalizePageDetail(_0x4401a6);return ensureAppOwnership(_0x4b863e[_0x35187a(0x1e9)],_0x479bae[_0x35187a(0x1e9)],_0x35187a(0x259)+_0x51fdb1+_0x35187a(0x22b)+_0x479bae['appCode']+_0x35187a(0x209)+_0x4b863e['appCode']+'\x22.'),_0x479bae;}export function getUndeletedRelatedPages(_0x3619cb){const _0x58a9e2=a142_0x5b38;return _0x3619cb['relatedPages'][_0x58a9e2(0x211)](_0x3bdab3=>!_0x3bdab3[_0x58a9e2(0x23c)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x1bcb22,_0xeaac4e){const _0x502eb3=a142_0x5b38,_0x37d7be=_0xeaac4e?.[_0x502eb3(0x1e9)]&&_0xeaac4e[_0x502eb3(0x1e9)]['trim']()!==''?_0x502eb3(0x253)+_0xeaac4e[_0x502eb3(0x1e9)]:'',_0x398f17=_0xeaac4e?.[_0x502eb3(0x23f)]&&_0xeaac4e[_0x502eb3(0x23f)][_0x502eb3(0x24b)]()!==''?'\x20--operation-id\x20'+_0xeaac4e[_0x502eb3(0x23f)]:_0xeaac4e?.[_0x502eb3(0x203)]&&_0xeaac4e[_0x502eb3(0x203)]['trim']()!==''?_0x502eb3(0x1e4)+_0xeaac4e[_0x502eb3(0x203)]:'';return CLI_BIN_NAME+_0x502eb3(0x226)+_0x1bcb22+_0x37d7be+_0x398f17+_0x502eb3(0x254);}export function createPageGenerateClientOperationId(){const _0x165c50=a142_0x5b38;return _0x165c50(0x1fb)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x3b8c26,_0x13a805){const _0x5bad50=a142_0x5b38,_0x3f9bfe=_0x13a805&&_0x13a805[_0x5bad50(0x24b)]()!==''?_0x5bad50(0x253)+_0x13a805:'';return CLI_BIN_NAME+_0x5bad50(0x218)+_0x3b8c26+_0x3f9bfe+_0x5bad50(0x254);}export function prepareDatasetAction(_0x54ba31,_0x5c4833){const _0x3194e2=a142_0x5b38,_0x4b88f1=getUndeletedRelatedPages(_0x54ba31);if(_0x5c4833===_0x3194e2(0x1f2)&&_0x4b88f1[_0x3194e2(0x20e)]>0x0)throw CliErrors[_0x3194e2(0x241)](_0x3194e2(0x238)+_0x54ba31[_0x3194e2(0x24f)]+_0x3194e2(0x20b),_0x3194e2(0x22d)+CLI_BIN_NAME+_0x3194e2(0x219)+_0x54ba31[_0x3194e2(0x24f)]+'`\x20instead.');if(_0x5c4833==='sync'&&_0x4b88f1[_0x3194e2(0x20e)]===0x0)throw CliErrors[_0x3194e2(0x241)](_0x3194e2(0x238)+_0x54ba31[_0x3194e2(0x24f)]+_0x3194e2(0x21c),_0x3194e2(0x22d)+CLI_BIN_NAME+_0x3194e2(0x20f)+_0x54ba31[_0x3194e2(0x24f)]+_0x3194e2(0x1f3)+CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x54ba31[_0x3194e2(0x24f)]+'\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.');return{'dataset':_0x54ba31,'undeletedPages':_0x4b88f1};}export function prepareGenerateDatasetAction(_0x350d2e,_0x22587d){const _0x166faa=a142_0x5b38,_0x37634d=getUndeletedRelatedPages(_0x350d2e);if(!_0x22587d){if(_0x37634d['length']>0x0)throw CliErrors[_0x166faa(0x241)](_0x166faa(0x238)+_0x350d2e[_0x166faa(0x24f)]+_0x166faa(0x20b),_0x166faa(0x22d)+CLI_BIN_NAME+_0x166faa(0x219)+_0x350d2e[_0x166faa(0x24f)]+'`\x20instead.');return{'dataset':_0x350d2e,'undeletedPages':_0x37634d,'standardPageStatus':null};}const _0x5c59e6=_0x22587d[_0x166faa(0x21a)],_0xf7d458=_0x22587d['incompleteSets'],_0x33da3e=_0x22587d[_0x166faa(0x24d)]['length'];if(_0x5c59e6===0x0&&_0xf7d458===0x0&&_0x33da3e===0x0)return{'dataset':_0x350d2e,'undeletedPages':_0x37634d,'standardPageStatus':_0x22587d};if(_0x5c59e6===0x1&&_0xf7d458===0x0&&_0x33da3e===0x0)throw CliErrors[_0x166faa(0x241)](_0x166faa(0x238)+_0x350d2e[_0x166faa(0x24f)]+_0x166faa(0x1de),_0x166faa(0x22d)+CLI_BIN_NAME+_0x166faa(0x219)+_0x350d2e[_0x166faa(0x24f)]+'`\x20instead.');throw CliErrors[_0x166faa(0x241)](_0x166faa(0x238)+_0x350d2e[_0x166faa(0x24f)]+_0x166faa(0x24e),'Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.');}export function assessStandardPageState(_0x3f1050,_0x560040,_0x4cedcf){const _0x537b37=a142_0x5b38,_0x30de80=_0x4cedcf?.['successStatus']??_0x537b37(0x202),_0x319fde=_0x4cedcf?.[_0x537b37(0x1da)]??[];if(!_0x560040){if(_0x319fde[_0x537b37(0x20e)]>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x537b37(0x238)+_0x3f1050+'\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','nextAction':_0x537b37(0x251)};return{'status':_0x537b37(0x230),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x537b37(0x238)+_0x3f1050+_0x537b37(0x1f7),'nextAction':_0x537b37(0x1fd)};}const _0x14ca0d=_0x560040[_0x537b37(0x21a)],_0x3418ab=_0x560040[_0x537b37(0x1ec)],_0x3a0ba4=_0x560040[_0x537b37(0x24d)][_0x537b37(0x20e)];if(_0x14ca0d===0x0&&_0x3418ab===0x0&&_0x3a0ba4===0x0)return{'status':'no_standard_pages_found','allowGenerate':!![],'manualResolutionRequired':![],'message':_0x537b37(0x238)+_0x3f1050+_0x537b37(0x1f7),'nextAction':_0x537b37(0x1fd)};if(_0x14ca0d>0x1)return{'status':_0x537b37(0x234),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x537b37(0x238)+_0x3f1050+_0x537b37(0x25a),'nextAction':_0x537b37(0x251)};if(_0x3418ab>0x0)return{'status':_0x537b37(0x1e3),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x537b37(0x238)+_0x3f1050+'\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','nextAction':_0x537b37(0x251)};if(_0x14ca0d===0x1&&_0x3a0ba4>0x0)return{'status':_0x537b37(0x23d),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x3f1050+'\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','nextAction':_0x537b37(0x251)};if(_0x14ca0d===0x1)return{'status':_0x30de80,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x30de80==='generated_complete_set'?_0x537b37(0x238)+_0x3f1050+_0x537b37(0x1ea):'Dataset\x20\x22'+_0x3f1050+_0x537b37(0x1de),'nextAction':_0x30de80==='generated_complete_set'?undefined:'run_sync'};return{'status':_0x537b37(0x1ef),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x537b37(0x238)+_0x3f1050+_0x537b37(0x252),'nextAction':_0x537b37(0x1ee)};}export function assessGenerateOperationState(_0xe692ef,_0x2f5b0c,_0x5be1fa){const _0x3ceb46=a142_0x5b38,_0x389347=String(_0x2f5b0c||'')[_0x3ceb46(0x24b)]()[_0x3ceb46(0x206)]();if(_0x389347===_0x3ceb46(0x1f0))return{'status':'operation_pending','manualResolutionRequired':![],'message':_0x3ceb46(0x201)+_0xe692ef+'\x22.','nextAction':'query_operation_status'};if(_0x389347===_0x3ceb46(0x247)||_0x389347===_0x3ceb46(0x232)||_0x389347===_0x3ceb46(0x228))return{'status':_0x3ceb46(0x244),'manualResolutionRequired':![],'message':_0x3ceb46(0x23a)+_0xe692ef+'\x22.','nextAction':_0x3ceb46(0x1ee)};if(_0x389347===_0x3ceb46(0x212)||_0x389347===_0x3ceb46(0x255)){if(!_0x5be1fa)return{'status':_0x3ceb46(0x1ef),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0xe692ef+_0x3ceb46(0x1f8),'nextAction':_0x3ceb46(0x1ee)};const _0x5c78f7=assessStandardPageState(_0xe692ef,_0x5be1fa,{'successStatus':_0x3ceb46(0x1fc)});if(_0x5c78f7[_0x3ceb46(0x224)]==='no_standard_pages_found')return{'status':_0x3ceb46(0x1ef),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0xe692ef+'\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','nextAction':_0x3ceb46(0x1ee)};return _0x5c78f7;}if(_0x389347==='FAILED'||_0x389347==='CANCELLED'||_0x389347==='')return{'status':_0x3ceb46(0x1e2),'manualResolutionRequired':![],'message':_0x3ceb46(0x210)+_0xe692ef+'\x22.','nextAction':'query_operation_status'};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0xe692ef+_0x3ceb46(0x1f4)+_0x389347+'\x22.','nextAction':'query_operation_status'};}export function normalizePageDetail(_0x3f9e59){const _0x4983e2=a142_0x5b38;return{'pageId':Number(_0x3f9e59[_0x4983e2(0x1e1)]),'appCode':_0x3f9e59[_0x4983e2(0x1e9)],'name':_0x3f9e59['name']||_0x4983e2(0x240)+_0x3f9e59[_0x4983e2(0x1e1)],'code':_0x3f9e59[_0x4983e2(0x24f)]||'','type':_0x3f9e59[_0x4983e2(0x245)]?String(_0x3f9e59['type']):'UNKNOWN','datasetIds':Array[_0x4983e2(0x250)](_0x3f9e59[_0x4983e2(0x1f9)])?_0x3f9e59['datasetIds']['map'](_0x2ba113=>Number(_0x2ba113))[_0x4983e2(0x211)](_0x3355b3=>Number['isFinite'](_0x3355b3)):[],'pageVersion':_0x3f9e59[_0x4983e2(0x1dd)]&&typeof _0x3f9e59['config'][_0x4983e2(0x207)]==='number'?_0x3f9e59[_0x4983e2(0x1dd)][_0x4983e2(0x207)]:null,'versionTag':_0x3f9e59[_0x4983e2(0x1dd)]&&typeof _0x3f9e59[_0x4983e2(0x1dd)]['versionTag']===_0x4983e2(0x22c)&&_0x3f9e59[_0x4983e2(0x1dd)][_0x4983e2(0x231)]['trim']()!==''?_0x3f9e59[_0x4983e2(0x1dd)][_0x4983e2(0x231)]:null,'relatedPages':normalizeRelatedPages(_0x3f9e59['relatedPageInfoList']),'raw':_0x3f9e59};}export function serializeDryRunDescription(_0x386302){const _0x53d687=a142_0x5b38;return JSON[_0x53d687(0x236)](_0x386302,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x42d010,_0x32c408){const _0x3765c6=a142_0x5b38,_0x2154a6=await tryGetStandardPageStatus(_0x42d010[_0x3765c6(0x1e9)],_0x32c408);if(!_0x2154a6)return null;return normalizeStandardPageStatus(_0x2154a6,_0x32c408);}export function selectVersionTagGroup(_0x351888,_0x45c44f,_0x4c6e69){const _0x51916a=a142_0x5b38,_0x32b8b7=new Map();for(const _0x178e1c of _0x351888){const _0x139e8a=normalizeVersionTag(_0x45c44f(_0x178e1c)),_0x4b154e=_0x32b8b7['get'](_0x139e8a)??[];_0x4b154e[_0x51916a(0x1eb)](_0x178e1c),_0x32b8b7[_0x51916a(0x239)](_0x139e8a,_0x4b154e);}const _0x30f94c=Array[_0x51916a(0x1ed)](_0x32b8b7[_0x51916a(0x1d8)]());if(_0x30f94c[_0x51916a(0x20e)]<=0x1&&!_0x4c6e69)return{'items':_0x351888,'availableTags':_0x30f94c};if(_0x4c6e69){const _0x3fb051=normalizeVersionTag(_0x4c6e69),_0x34a187=_0x32b8b7[_0x51916a(0x225)](_0x3fb051);if(!_0x34a187)throw CliErrors[_0x51916a(0x241)](_0x51916a(0x205)+_0x4c6e69+_0x51916a(0x235),buildVersionTagHint(_0x30f94c));return{'items':_0x34a187,'availableTags':_0x30f94c};}throw CliErrors['validation'](_0x51916a(0x25b),buildVersionTagHint(_0x30f94c));}function normalizeDatasetDetail(_0x239947,_0x2f5463){const _0x1c2a8d=a142_0x5b38,_0x37b7d5=Array[_0x1c2a8d(0x250)](_0x239947['fields'])?_0x239947[_0x1c2a8d(0x213)]:Array[_0x1c2a8d(0x250)](_0x239947[_0x1c2a8d(0x258)])?_0x239947['properties']:[];return{'id':Number(_0x239947['id']??_0x239947[_0x1c2a8d(0x246)]??0x0),'code':String(_0x239947[_0x1c2a8d(0x24f)]||_0x239947[_0x1c2a8d(0x20a)]||_0x2f5463),'name':String(_0x239947[_0x1c2a8d(0x1f1)]||_0x2f5463),'appCode':_0x239947[_0x1c2a8d(0x1e9)]||_0x239947[_0x1c2a8d(0x1f6)]?.['appCode'],'fieldCount':_0x37b7d5[_0x1c2a8d(0x20e)],'relatedPages':normalizeRelatedPages(_0x239947[_0x1c2a8d(0x1ff)]),'raw':_0x239947};}function normalizeStandardPageStatus(_0x157f37,_0x23c2d6){const _0x5b5d72=a142_0x5b38,_0x5a5736=_0xdafcbf=>({'pageId':Number(_0xdafcbf['pageId']??_0xdafcbf['id']??0x0),'title':String(_0xdafcbf[_0x5b5d72(0x1e8)]||_0xdafcbf[_0x5b5d72(0x1f1)]||_0x5b5d72(0x240)+(_0xdafcbf[_0x5b5d72(0x1e1)]??_0xdafcbf['id']??'unknown')),'type':_0xdafcbf['type']?String(_0xdafcbf[_0x5b5d72(0x245)]):'UNKNOWN','deleted':_0xdafcbf[_0x5b5d72(0x23c)]===!![],'hasMenu':_0xdafcbf['hasMenu']===!![],'menuVisible':typeof _0xdafcbf[_0x5b5d72(0x237)]===_0x5b5d72(0x227)?_0xdafcbf[_0x5b5d72(0x237)]:null,'menuPath':typeof _0xdafcbf[_0x5b5d72(0x1df)]===_0x5b5d72(0x22c)&&_0xdafcbf[_0x5b5d72(0x1df)][_0x5b5d72(0x24b)]()!==''?_0xdafcbf[_0x5b5d72(0x1df)]:null}),_0x5ec049=Array[_0x5b5d72(0x250)](_0x157f37[_0x5b5d72(0x1d9)])?_0x157f37[_0x5b5d72(0x1d9)][_0x5b5d72(0x20d)](_0x4fb3ef=>({'versionTag':typeof _0x4fb3ef[_0x5b5d72(0x231)]===_0x5b5d72(0x22c)&&_0x4fb3ef['versionTag'][_0x5b5d72(0x24b)]()!==''?_0x4fb3ef['versionTag']:null,'complete':_0x4fb3ef[_0x5b5d72(0x200)]===!![],'pages':Array[_0x5b5d72(0x250)](_0x4fb3ef[_0x5b5d72(0x20c)])?_0x4fb3ef[_0x5b5d72(0x20c)][_0x5b5d72(0x20d)](_0x5a5736):[]})):[];return{'datasetId':typeof _0x157f37[_0x5b5d72(0x204)]===_0x5b5d72(0x21e)&&Number[_0x5b5d72(0x1dc)](_0x157f37[_0x5b5d72(0x204)])?_0x157f37[_0x5b5d72(0x204)]:null,'datasetCode':typeof _0x157f37['datasetCode']===_0x5b5d72(0x22c)&&_0x157f37['datasetCode'][_0x5b5d72(0x24b)]()!==''?_0x157f37[_0x5b5d72(0x24a)]:_0x23c2d6,'pageSets':_0x5ec049,'totalSets':typeof _0x157f37[_0x5b5d72(0x22e)]===_0x5b5d72(0x21e)&&Number[_0x5b5d72(0x1dc)](_0x157f37[_0x5b5d72(0x22e)])?_0x157f37[_0x5b5d72(0x22e)]:_0x5ec049[_0x5b5d72(0x20e)],'completeSets':typeof _0x157f37[_0x5b5d72(0x21a)]===_0x5b5d72(0x21e)&&Number[_0x5b5d72(0x1dc)](_0x157f37['completeSets'])?_0x157f37['completeSets']:_0x5ec049['filter'](_0x29e6b8=>_0x29e6b8[_0x5b5d72(0x200)])[_0x5b5d72(0x20e)],'incompleteSets':typeof _0x157f37[_0x5b5d72(0x1ec)]===_0x5b5d72(0x21e)&&Number['isFinite'](_0x157f37[_0x5b5d72(0x1ec)])?_0x157f37[_0x5b5d72(0x1ec)]:_0x5ec049[_0x5b5d72(0x211)](_0x4c0445=>!_0x4c0445[_0x5b5d72(0x200)]&&_0x4c0445['pages'][_0x5b5d72(0x20e)]>0x0)[_0x5b5d72(0x20e)],'residualPages':Array[_0x5b5d72(0x250)](_0x157f37[_0x5b5d72(0x24d)])?_0x157f37[_0x5b5d72(0x24d)]['map'](_0x5a5736):[],'menuPages':Array['isArray'](_0x157f37[_0x5b5d72(0x256)])?_0x157f37[_0x5b5d72(0x256)]['map'](_0x5a5736):[],'source':_0x5b5d72(0x242)};}function normalizeRelatedPages(_0x55b72a){const _0x9a33d6=a142_0x5b38;if(!Array['isArray'](_0x55b72a))return[];return _0x55b72a[_0x9a33d6(0x211)](_0x1eaa69=>_0x1eaa69&&typeof _0x1eaa69===_0x9a33d6(0x21d))[_0x9a33d6(0x20d)](_0x22eb90=>({'id':Number(_0x22eb90['id']),'type':_0x22eb90[_0x9a33d6(0x245)]?String(_0x22eb90[_0x9a33d6(0x245)]):_0x9a33d6(0x1e5),'code':_0x22eb90['code']||undefined,'title':_0x22eb90[_0x9a33d6(0x1e8)]||_0x22eb90[_0x9a33d6(0x1f1)]||_0x9a33d6(0x240)+_0x22eb90['id'],'deleted':_0x22eb90[_0x9a33d6(0x23c)]===!![]}))['filter'](_0x551e81=>Number[_0x9a33d6(0x1dc)](_0x551e81['id']));}function ensureAppOwnership(_0x45672d,_0x47300c,_0xfe920f){const _0xd6e437=a142_0x5b38;if(!_0x47300c)return;if(_0x47300c!==_0x45672d)throw CliErrors[_0xd6e437(0x241)](_0xfe920f,_0xd6e437(0x214)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.');}function normalizeVersionTag(_0x59ea65){const _0x2161f2=a142_0x5b38;return _0x59ea65&&_0x59ea65[_0x2161f2(0x24b)]()!==''?_0x59ea65:_0x2161f2(0x248);}function buildVersionTagHint(_0x3194b0){const _0x6acca1=a142_0x5b38,_0xe67abc=_0x3194b0[_0x6acca1(0x20d)](_0x3629be=>_0x3629be==='__EMPTY__'?_0x6acca1(0x220):_0x3629be)[_0x6acca1(0x1db)](',\x20');return'Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20'+_0xe67abc;}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageStandardPageStatus: CommandDefinition;
@@ -1 +1 @@
1
- function a151_0x14ec(){const _0x87454a=['page','14500NYlCrY','13043200FeXgod','7UCXNau','status','appCode','name','alias','query-standard-page-status','31090GNeWrd','string','relatedPages','10362918WgnjIj','11245113IYDeln','read','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','manualResolutionRequired','GET','2775414zxkxkl','3HCnDQU','523783fviOxy','/standard-page-status?appCode=','325vmXTMJ','related-pages-fallback','code','standard-page-status','length','18931ZpqBIx','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','nextAction'];a151_0x14ec=function(){return _0x87454a;};return a151_0x14ec();}const a151_0x4a7689=a151_0x51a7;(function(_0x1487f0,_0xe0469a){const _0xcfad63=a151_0x51a7,_0x104920=_0x1487f0();while(!![]){try{const _0x27c367=parseInt(_0xcfad63(0x1fc))/0x1+parseInt(_0xcfad63(0x1fa))/0x2*(parseInt(_0xcfad63(0x1fb))/0x3)+parseInt(_0xcfad63(0x1e9))/0x4*(-parseInt(_0xcfad63(0x1fe))/0x5)+parseInt(_0xcfad63(0x1f4))/0x6*(parseInt(_0xcfad63(0x1eb))/0x7)+parseInt(_0xcfad63(0x1ea))/0x8+parseInt(_0xcfad63(0x1f5))/0x9+parseInt(_0xcfad63(0x1f1))/0xa*(-parseInt(_0xcfad63(0x203))/0xb);if(_0x27c367===_0xe0469a)break;else _0x104920['push'](_0x104920['shift']());}catch(_0x4bf8a4){_0x104920['push'](_0x104920['shift']());}}}(a151_0x14ec,0xe39be));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a151_0x51a7(_0x4bf243,_0x1258cf){_0x4bf243=_0x4bf243-0x1e6;const _0x14ec68=a151_0x14ec();let _0x51a72a=_0x14ec68[_0x4bf243];return _0x51a72a;}export const pageStandardPageStatus={'service':a151_0x4a7689(0x1e8),'command':a151_0x4a7689(0x201),'description':a151_0x4a7689(0x1f7),'risk':a151_0x4a7689(0x1f6),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x4a7689(0x1ef),'type':a151_0x4a7689(0x1f2),'description':a151_0x4a7689(0x1e6)}],async 'validate'(_0x5c2f89){validateDatasetSelector(_0x5c2f89);},async 'dryRun'(_0x1af9ee){const _0x1b9e5c=a151_0x4a7689,_0x25bd7f=await loadDatasetDetailForPage(_0x1af9ee);return{'method':_0x1b9e5c(0x1f9),'url':'/smartapi/lovrabet/dataset/'+_0x25bd7f['code']+_0x1b9e5c(0x1fd)+encodeURIComponent(_0x1af9ee[_0x1b9e5c(0x1ed)]),'description':serializeDryRunDescription({'dataset':{'id':_0x25bd7f['id'],'code':_0x25bd7f[_0x1b9e5c(0x200)],'name':_0x25bd7f[_0x1b9e5c(0x1ee)]},'action':_0x1b9e5c(0x1f0)})};},async 'execute'(_0x157ca0){const _0x573ef4=a151_0x4a7689,_0x2a2343=await loadDatasetDetailForPage(_0x157ca0),_0x38b5ca=await loadStandardPageStatusForGenerate(_0x157ca0,_0x2a2343[_0x573ef4(0x200)]),_0x5cedf5=getUndeletedRelatedPages(_0x2a2343),_0x3bdbb6=assessStandardPageState(_0x2a2343[_0x573ef4(0x200)],_0x38b5ca,{'fallbackUndeletedPages':_0x5cedf5});return{'ok':!![],'data':{'datasetCode':_0x2a2343[_0x573ef4(0x200)],'precheckSource':_0x38b5ca?.['source']??_0x573ef4(0x1ff),'status':_0x3bdbb6[_0x573ef4(0x1ec)],'manualResolutionRequired':_0x3bdbb6[_0x573ef4(0x1f8)],'nextAction':_0x3bdbb6[_0x573ef4(0x1e7)],'standardPageStatus':_0x38b5ca,'relatedPages':{'total':_0x2a2343[_0x573ef4(0x1f3)][_0x573ef4(0x202)],'undeletedCount':_0x5cedf5[_0x573ef4(0x202)]}}};}};
1
+ const a143_0x2ba80d=a143_0x20f4;(function(_0x533b97,_0x1d7ec4){const _0x3e9c1d=a143_0x20f4,_0x253582=_0x533b97();while(!![]){try{const _0x3546ee=parseInt(_0x3e9c1d(0x1a4))/0x1+-parseInt(_0x3e9c1d(0x1aa))/0x2+parseInt(_0x3e9c1d(0x19d))/0x3*(-parseInt(_0x3e9c1d(0x1a6))/0x4)+-parseInt(_0x3e9c1d(0x1b8))/0x5+-parseInt(_0x3e9c1d(0x1b9))/0x6*(-parseInt(_0x3e9c1d(0x1b3))/0x7)+-parseInt(_0x3e9c1d(0x19b))/0x8*(-parseInt(_0x3e9c1d(0x1a3))/0x9)+-parseInt(_0x3e9c1d(0x1a8))/0xa;if(_0x3546ee===_0x1d7ec4)break;else _0x253582['push'](_0x253582['shift']());}catch(_0x14e0c8){_0x253582['push'](_0x253582['shift']());}}}(a143_0x567d,0xa8cf1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a143_0x2ba80d(0x1a5),'command':a143_0x2ba80d(0x1ad),'description':a143_0x2ba80d(0x19f),'risk':a143_0x2ba80d(0x1b6),'defaultOutputFormat':a143_0x2ba80d(0x1af),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x2ba80d(0x1a1),'type':a143_0x2ba80d(0x1a7),'description':a143_0x2ba80d(0x19c)}],async 'validate'(_0x1534e4){validateDatasetSelector(_0x1534e4);},async 'dryRun'(_0x2de42f){const _0x5f2d33=a143_0x2ba80d,_0x43ea1b=await loadDatasetDetailForPage(_0x2de42f);return{'method':_0x5f2d33(0x1a2),'url':_0x5f2d33(0x1ab)+_0x43ea1b[_0x5f2d33(0x1b2)]+_0x5f2d33(0x1a0)+encodeURIComponent(_0x2de42f[_0x5f2d33(0x1ae)]),'description':serializeDryRunDescription({'dataset':{'id':_0x43ea1b['id'],'code':_0x43ea1b[_0x5f2d33(0x1b2)],'name':_0x43ea1b[_0x5f2d33(0x19e)]},'action':_0x5f2d33(0x1b1)})};},async 'execute'(_0x3a5a4d){const _0x39d3d0=a143_0x2ba80d,_0x556c49=await loadDatasetDetailForPage(_0x3a5a4d),_0x31f39f=await loadStandardPageStatusForGenerate(_0x3a5a4d,_0x556c49['code']),_0x34cb49=getUndeletedRelatedPages(_0x556c49),_0x1bfbc8=assessStandardPageState(_0x556c49[_0x39d3d0(0x1b2)],_0x31f39f,{'fallbackUndeletedPages':_0x34cb49});return{'ok':!![],'data':{'datasetCode':_0x556c49[_0x39d3d0(0x1b2)],'precheckSource':_0x31f39f?.['source']??_0x39d3d0(0x1a9),'status':_0x1bfbc8[_0x39d3d0(0x1b0)],'manualResolutionRequired':_0x1bfbc8[_0x39d3d0(0x1b7)],'nextAction':_0x1bfbc8[_0x39d3d0(0x1ac)],'standardPageStatus':_0x31f39f,'relatedPages':{'total':_0x556c49[_0x39d3d0(0x1b5)][_0x39d3d0(0x1b4)],'undeletedCount':_0x34cb49[_0x39d3d0(0x1b4)]}}};}};function a143_0x20f4(_0x53803e,_0x4476b8){_0x53803e=_0x53803e-0x19b;const _0x567dd8=a143_0x567d();let _0x20f401=_0x567dd8[_0x53803e];return _0x20f401;}function a143_0x567d(){const _0x97e4e9=['14854Asmbll','length','relatedPages','read','manualResolutionRequired','739315TQInii','3738ppoYbB','8bPUmbz','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1149fMoLhG','name','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','alias','GET','9778419zdBixh','255285yBPREC','page','7204KIJPBG','string','1910320ILOfgP','related-pages-fallback','1887326DlIMZd','/smartapi/lovrabet/dataset/','nextAction','standard-page-status','appCode','compress','status','query-standard-page-status','code'];a143_0x567d=function(){return _0x97e4e9;};return a143_0x567d();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const pageSync: CommandDefinition;
@@ -1 +1 @@
1
- function a152_0x5395(){const _0x3db1b5=['alias','部分页面同步失败','281330UwDuEq','sync','relatedPages','7vePZsf','dataset','2487768OQfzcI','1IQWVFG','6265914CJwxBH','appCode','588aDprtW','string','16910bsHITP','page','18344380xEUFDP','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','\x20undeleted\x20related\x20page(s)\x20found','code','/smartapi/lovrabet/dataset/','length','write','7707560ZkKRMr','5352363ZWVjqE','/sync-to-pages','POST','failedPages','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','undeletedPages','compress'];a152_0x5395=function(){return _0x3db1b5;};return a152_0x5395();}const a152_0xac7dbb=a152_0x11c5;(function(_0x236e08,_0x194f4e){const _0x39298a=a152_0x11c5,_0x2837cb=_0x236e08();while(!![]){try{const _0xd71f90=-parseInt(_0x39298a(0xe8))/0x1*(parseInt(_0x39298a(0xe2))/0x2)+-parseInt(_0x39298a(0xe7))/0x3+-parseInt(_0x39298a(0xeb))/0x4*(-parseInt(_0x39298a(0xed))/0x5)+-parseInt(_0x39298a(0xe9))/0x6*(parseInt(_0x39298a(0xe5))/0x7)+parseInt(_0x39298a(0xd8))/0x8+-parseInt(_0x39298a(0xd9))/0x9+parseInt(_0x39298a(0xd1))/0xa;if(_0xd71f90===_0x194f4e)break;else _0x2837cb['push'](_0x2837cb['shift']());}catch(_0x2c9c06){_0x2837cb['push'](_0x2837cb['shift']());}}}(a152_0x5395,0xa780a));function a152_0x11c5(_0x1f724b,_0x54e32f){_0x1f724b=_0x1f724b-0xd0;const _0x539529=a152_0x5395();let _0x11c522=_0x539529[_0x1f724b];return _0x11c522;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a152_0xac7dbb(0xd0),'command':a152_0xac7dbb(0xe3),'description':a152_0xac7dbb(0xdd),'risk':a152_0xac7dbb(0xd7),'defaultOutputFormat':a152_0xac7dbb(0xdf),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a152_0xac7dbb(0xe0),'type':a152_0xac7dbb(0xec),'description':a152_0xac7dbb(0xd2)}],async 'validate'(_0x29d84f){validateDatasetSelector(_0x29d84f);},async 'dryRun'(_0x373691){const _0x40b2cd=a152_0xac7dbb,_0x5c646a=await prepare(_0x373691);return{'method':_0x40b2cd(0xdb),'url':_0x40b2cd(0xd5)+_0x5c646a[_0x40b2cd(0xe6)]['code']+_0x40b2cd(0xda),'body':{'appCode':_0x373691[_0x40b2cd(0xea)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5c646a['dataset']['id'],'code':_0x5c646a[_0x40b2cd(0xe6)][_0x40b2cd(0xd4)],'name':_0x5c646a[_0x40b2cd(0xe6)]['name'],'fieldCount':_0x5c646a['dataset']['fieldCount']},'relatedPages':{'total':_0x5c646a[_0x40b2cd(0xe6)][_0x40b2cd(0xe4)][_0x40b2cd(0xd6)],'undeletedCount':_0x5c646a[_0x40b2cd(0xde)][_0x40b2cd(0xd6)]},'action':_0x40b2cd(0xe3),'reason':_0x5c646a[_0x40b2cd(0xde)][_0x40b2cd(0xd6)]+_0x40b2cd(0xd3)})};},async 'execute'(_0x5d55e6){const _0x34a000=a152_0xac7dbb,_0x3c885b=await prepare(_0x5d55e6),_0x45304e=await syncStandardPages(_0x5d55e6[_0x34a000(0xea)],_0x3c885b[_0x34a000(0xe6)][_0x34a000(0xd4)]),_0x5e9c35=Array['isArray'](_0x45304e[_0x34a000(0xdc)])&&_0x45304e[_0x34a000(0xdc)][_0x34a000(0xd6)]>0x0,_0x42c774=_0x5e9c35?_0x34a000(0xe1):'同步成功';return{'ok':!![],'message':_0x42c774,'data':{'datasetCode':_0x3c885b[_0x34a000(0xe6)]['code'],..._0x45304e}};}};async function prepare(_0x3b75aa){const _0x2e1437=a152_0xac7dbb,_0x288e6b=await loadDatasetDetailForPage(_0x3b75aa);return prepareDatasetAction(_0x288e6b,_0x2e1437(0xe3));}
1
+ const a144_0x2e6fbc=a144_0x25f3;(function(_0x5bb77b,_0x626b5a){const _0x12adf5=a144_0x25f3,_0x232c26=_0x5bb77b();while(!![]){try{const _0x39c670=parseInt(_0x12adf5(0xcf))/0x1*(-parseInt(_0x12adf5(0xeb))/0x2)+-parseInt(_0x12adf5(0xdc))/0x3*(-parseInt(_0x12adf5(0xe4))/0x4)+parseInt(_0x12adf5(0xd8))/0x5*(-parseInt(_0x12adf5(0xe3))/0x6)+parseInt(_0x12adf5(0xdd))/0x7*(parseInt(_0x12adf5(0xe2))/0x8)+parseInt(_0x12adf5(0xe9))/0x9*(-parseInt(_0x12adf5(0xd6))/0xa)+parseInt(_0x12adf5(0xda))/0xb*(-parseInt(_0x12adf5(0xe6))/0xc)+-parseInt(_0x12adf5(0xd1))/0xd*(-parseInt(_0x12adf5(0xea))/0xe);if(_0x39c670===_0x626b5a)break;else _0x232c26['push'](_0x232c26['shift']());}catch(_0x4ed6e6){_0x232c26['push'](_0x232c26['shift']());}}}(a144_0x2c1d,0x84230));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x25f3(_0x5b9daa,_0x5ce636){_0x5b9daa=_0x5b9daa-0xcb;const _0x2c1dd6=a144_0x2c1d();let _0x25f393=_0x2c1dd6[_0x5b9daa];return _0x25f393;}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x2e6fbc(0xdb),'command':a144_0x2e6fbc(0xd5),'description':a144_0x2e6fbc(0xe5),'risk':a144_0x2e6fbc(0xcb),'defaultOutputFormat':a144_0x2e6fbc(0xe7),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a144_0x2e6fbc(0xcd)}],async 'validate'(_0x526025){validateDatasetSelector(_0x526025);},async 'dryRun'(_0x3d4bfd){const _0xc3773c=a144_0x2e6fbc,_0x55a7e1=await prepare(_0x3d4bfd);return{'method':_0xc3773c(0xd0),'url':_0xc3773c(0xd2)+_0x55a7e1[_0xc3773c(0xd3)]['code']+'/sync-to-pages','body':{'appCode':_0x3d4bfd[_0xc3773c(0xce)]},'description':serializeDryRunDescription({'dataset':{'id':_0x55a7e1['dataset']['id'],'code':_0x55a7e1['dataset']['code'],'name':_0x55a7e1['dataset'][_0xc3773c(0xec)],'fieldCount':_0x55a7e1[_0xc3773c(0xd3)][_0xc3773c(0xde)]},'relatedPages':{'total':_0x55a7e1[_0xc3773c(0xd3)][_0xc3773c(0xd7)][_0xc3773c(0xdf)],'undeletedCount':_0x55a7e1[_0xc3773c(0xd4)][_0xc3773c(0xdf)]},'action':_0xc3773c(0xd5),'reason':_0x55a7e1[_0xc3773c(0xd4)][_0xc3773c(0xdf)]+_0xc3773c(0xd9)})};},async 'execute'(_0x1f0340){const _0x541e04=a144_0x2e6fbc,_0x2e7edf=await prepare(_0x1f0340),_0x3391a3=await syncStandardPages(_0x1f0340[_0x541e04(0xce)],_0x2e7edf['dataset'][_0x541e04(0xe1)]),_0x2394c5=Array['isArray'](_0x3391a3[_0x541e04(0xcc)])&&_0x3391a3['failedPages'][_0x541e04(0xdf)]>0x0,_0x335a32=_0x2394c5?_0x541e04(0xe0):_0x541e04(0xe8);return{'ok':!![],'message':_0x335a32,'data':{'datasetCode':_0x2e7edf[_0x541e04(0xd3)][_0x541e04(0xe1)],..._0x3391a3}};}};async function prepare(_0x49d5b1){const _0x2800b9=a144_0x2e6fbc,_0x3f531e=await loadDatasetDetailForPage(_0x49d5b1);return prepareDatasetAction(_0x3f531e,_0x2800b9(0xd5));}function a144_0x2c1d(){const _0x32335=['19596430EeDouQ','1529986nUJvyI','name','write','failedPages','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','1covuYj','POST','13JNVCKN','/smartapi/lovrabet/dataset/','dataset','undeletedPages','sync','140DksYKg','relatedPages','12695OfjnvX','\x20undeleted\x20related\x20page(s)\x20found','2583823edKnet','page','3thxHBB','8995SOxkTS','fieldCount','length','部分页面同步失败','code','2152YbVERd','258rTxQtK','3217552UuPGYo','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','48BuFjPU','compress','同步成功','125244VIIeLC'];a144_0x2c1d=function(){return _0x32335;};return a144_0x2c1d();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- (function(_0x36ba34,_0x2ec061){const _0x2643a6=a153_0x4d81,_0x3a7777=_0x36ba34();while(!![]){try{const _0x3d9251=parseInt(_0x2643a6(0x1eb))/0x1*(parseInt(_0x2643a6(0x1f1))/0x2)+parseInt(_0x2643a6(0x1ef))/0x3*(-parseInt(_0x2643a6(0x1ed))/0x4)+-parseInt(_0x2643a6(0x1ee))/0x5*(parseInt(_0x2643a6(0x1f0))/0x6)+-parseInt(_0x2643a6(0x1ec))/0x7*(-parseInt(_0x2643a6(0x1ea))/0x8)+parseInt(_0x2643a6(0x1e9))/0x9+parseInt(_0x2643a6(0x1f3))/0xa*(-parseInt(_0x2643a6(0x1e8))/0xb)+parseInt(_0x2643a6(0x1f2))/0xc;if(_0x3d9251===_0x2ec061)break;else _0x3a7777['push'](_0x3a7777['shift']());}catch(_0x262fdf){_0x3a7777['push'](_0x3a7777['shift']());}}}(a153_0x3f64,0x9431b));import{permitPageGet}from'../../commands/permit/page-get.js';function a153_0x3f64(){const _0x5ca51f=['2BxDJqd','3556637IpSfsX','4588NxLqmN','201400nKfIUH','867qHJSlC','24RjFvIn','800138OxBTCz','224580SlZMxX','8210ZRLQOI','10912XLQjtr','5283846lUhaQw','8wLEmct'];a153_0x3f64=function(){return _0x5ca51f;};return a153_0x3f64();}import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';function a153_0x4d81(_0x1fe15f,_0x49ea34){_0x1fe15f=_0x1fe15f-0x1e8;const _0x3f6485=a153_0x3f64();let _0x4d819d=_0x3f6485[_0x1fe15f];return _0x4d819d;}export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ function a145_0x5664(_0x3f0f75,_0x696694){_0x3f0f75=_0x3f0f75-0x14c;const _0x521516=a145_0x5215();let _0x56645f=_0x521516[_0x3f0f75];return _0x56645f;}function a145_0x5215(){const _0x306e9e=['11edAlZN','319571PRDIaS','3673520lTMWnh','6ckaFzf','4188768HfYLUR','1734USvnkQ','206yyHLCJ','48mhBvwC','467310TmfEnu','183272cWBQzv','4803129nUQCEy'];a145_0x5215=function(){return _0x306e9e;};return a145_0x5215();}(function(_0x5efd08,_0x5a2990){const _0xa00738=a145_0x5664,_0xac1c70=_0x5efd08();while(!![]){try{const _0x297034=parseInt(_0xa00738(0x14c))/0x1*(-parseInt(_0xa00738(0x14d))/0x2)+parseInt(_0xa00738(0x155))/0x3*(-parseInt(_0xa00738(0x150))/0x4)+-parseInt(_0xa00738(0x154))/0x5+-parseInt(_0xa00738(0x14e))/0x6*(-parseInt(_0xa00738(0x153))/0x7)+parseInt(_0xa00738(0x156))/0x8+parseInt(_0xa00738(0x151))/0x9+-parseInt(_0xa00738(0x14f))/0xa*(parseInt(_0xa00738(0x152))/0xb);if(_0x297034===_0x5a2990)break;else _0xac1c70['push'](_0xac1c70['shift']());}catch(_0x4b82c3){_0xac1c70['push'](_0xac1c70['shift']());}}}(a145_0x5215,0x5a88c));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitPageGet: CommandDefinition;
@@ -1 +1 @@
1
- function a154_0x5add(){const _0x31863b=['permit','148239QMpJuc','259824gfKUPb','menu-id','num','221536LLwNxQ','read','64464WnUpEF','12nLTZsW','page-get','5dqSGGy','171iypZEQ','2088970YEyxhT','27470aGKCBu','122662XBKCyd','Page\x20permit\x20for\x20menu\x20','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu'];a154_0x5add=function(){return _0x31863b;};return a154_0x5add();}const a154_0x1ce417=a154_0x3a11;(function(_0x16b708,_0x3df7c3){const _0x3cfe81=a154_0x3a11,_0x38bea9=_0x16b708();while(!![]){try{const _0x581793=-parseInt(_0x3cfe81(0xd6))/0x1+parseInt(_0x3cfe81(0xd5))/0x2*(-parseInt(_0x3cfe81(0xd0))/0x3)+parseInt(_0x3cfe81(0xde))/0x4*(-parseInt(_0x3cfe81(0xd2))/0x5)+-parseInt(_0x3cfe81(0xdb))/0x6+parseInt(_0x3cfe81(0xda))/0x7+-parseInt(_0x3cfe81(0xcf))/0x8*(-parseInt(_0x3cfe81(0xd3))/0x9)+parseInt(_0x3cfe81(0xd4))/0xa;if(_0x581793===_0x3df7c3)break;else _0x38bea9['push'](_0x38bea9['shift']());}catch(_0x1e3ae1){_0x38bea9['push'](_0x38bea9['shift']());}}}(a154_0x5add,0x1a186));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';function a154_0x3a11(_0x55aabe,_0x26c063){_0x55aabe=_0x55aabe-0xce;const _0x5addbd=a154_0x5add();let _0x3a11d1=_0x5addbd[_0x55aabe];return _0x3a11d1;}export const permitPageGet={'service':a154_0x1ce417(0xd9),'command':a154_0x1ce417(0xd1),'description':a154_0x1ce417(0xd8),'risk':a154_0x1ce417(0xce),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f8e61){const _0x2d391b=a154_0x1ce417,_0x218ebe=_0x2f8e61[_0x2d391b(0xdd)](_0x2d391b(0xdc)),_0xdad498=await getPagePermit(_0x218ebe);return{'ok':!![],'data':{'page':projectPagePermit(_0xdad498)},'message':_0x2d391b(0xd7)+_0x218ebe};}};
1
+ const a146_0x4a2c88=a146_0x3931;(function(_0x94135b,_0x4edd1b){const _0x38a499=a146_0x3931,_0x7076e5=_0x94135b();while(!![]){try{const _0x72fa10=parseInt(_0x38a499(0xda))/0x1+parseInt(_0x38a499(0xd8))/0x2+parseInt(_0x38a499(0xd7))/0x3+parseInt(_0x38a499(0xd6))/0x4*(-parseInt(_0x38a499(0xd1))/0x5)+parseInt(_0x38a499(0xcd))/0x6+parseInt(_0x38a499(0xdb))/0x7*(-parseInt(_0x38a499(0xd0))/0x8)+parseInt(_0x38a499(0xd3))/0x9;if(_0x72fa10===_0x4edd1b)break;else _0x7076e5['push'](_0x7076e5['shift']());}catch(_0x3bf1cc){_0x7076e5['push'](_0x7076e5['shift']());}}}(a146_0xaceb,0x9c8db));function a146_0x3931(_0x3b0359,_0x570e29){_0x3b0359=_0x3b0359-0xcd;const _0xaceb61=a146_0xaceb();let _0x39312f=_0xaceb61[_0x3b0359];return _0x39312f;}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x4a2c88(0xd4),'command':a146_0x4a2c88(0xd2),'description':a146_0x4a2c88(0xce),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4198dd){const _0x401857=a146_0x4a2c88,_0x13ea12=_0x4198dd[_0x401857(0xd5)](_0x401857(0xd9)),_0x59b72f=await getPagePermit(_0x13ea12);return{'ok':!![],'data':{'page':projectPagePermit(_0x59b72f)},'message':_0x401857(0xcf)+_0x13ea12};}};function a146_0xaceb(){const _0x42ec72=['20788fFqtCx','1035390lNKQGg','302066HyJKbI','menu-id','301413QanUur','28lCTIMe','7441200KTrQxC','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','Page\x20permit\x20for\x20menu\x20','506512IIFlbA','1195eXTdxK','page-get','889254qglPEC','permit','num'];a146_0xaceb=function(){return _0x42ec72;};return a146_0xaceb();}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitPageSet: CommandDefinition;
@@ -1 +1 @@
1
- function a155_0x5c28(_0x145043,_0x49959b){_0x145043=_0x145043-0xcb;const _0x5a3974=a155_0x5a39();let _0x5c2811=_0x5a3974[_0x145043];return _0x5c2811;}const a155_0x4f9c47=a155_0x5c28;(function(_0x1086a6,_0x6a90d2){const _0x9758e9=a155_0x5c28,_0xa6e56f=_0x1086a6();while(!![]){try{const _0x4e92b6=-parseInt(_0x9758e9(0xda))/0x1+-parseInt(_0x9758e9(0xe2))/0x2+parseInt(_0x9758e9(0xcb))/0x3+parseInt(_0x9758e9(0xde))/0x4+-parseInt(_0x9758e9(0xe0))/0x5*(parseInt(_0x9758e9(0xcd))/0x6)+parseInt(_0x9758e9(0xdd))/0x7*(-parseInt(_0x9758e9(0xd2))/0x8)+parseInt(_0x9758e9(0xe8))/0x9;if(_0x4e92b6===_0x6a90d2)break;else _0xa6e56f['push'](_0xa6e56f['shift']());}catch(_0x3a265d){_0xa6e56f['push'](_0xa6e56f['shift']());}}}(a155_0x5a39,0xaffb3));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x5a39(){const _0xaa7539=['push','2680125eowudN','Nothing\x20to\x20set.','12xWHyIz','rolePermit','flag','allowSelf','appCode','16qHKLBh','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','key','menu-id','map','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','join','\x20cannot\x20be\x20empty.','720302OeVyie','Pass\x20at\x20least\x20one\x20of:\x20','validation','4594667OuHLVA','5118744lQqSnP','selector','3465415iafjYw','page-set','660384rHxbZO','label','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','length','POST','num','20674620OCjrtq'];a155_0x5a39=function(){return _0xaa7539;};return a155_0x5a39();}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x215d08){const _0x563dba=a155_0x5c28,_0x4ad442=[];for(const _0x4aea76 of PAGE_SLOT_SPECS){const _0x508612=_0x215d08[_0x563dba(0xcf)](_0x4aea76[_0x563dba(0xcf)]);if(_0x508612===undefined||_0x508612===null)continue;const _0x30005f=splitList(String(_0x508612));if(_0x30005f[_0x563dba(0xe5)]===0x0)throw CliErrors['validation']('--'+_0x4aea76['flag']+_0x563dba(0xd9),_0x563dba(0xd3));_0x4ad442[_0x563dba(0xe9)]({'spec':_0x4aea76,'refs':_0x30005f});}return _0x4ad442;}async function buildPlan(_0x461d90,_0x18a776){const _0x18dd1d=a155_0x5c28,_0x3c05a1=_0x461d90[_0x18dd1d(0xe7)](_0x18dd1d(0xd5)),_0x4b5879=collectRequestedSlots(_0x461d90);if(_0x4b5879['length']===0x0)throw CliErrors[_0x18dd1d(0xdc)](_0x18dd1d(0xcc),_0x18dd1d(0xdb)+PAGE_SLOT_SPECS[_0x18dd1d(0xd6)](_0x537f6b=>'--'+_0x537f6b[_0x18dd1d(0xcf)])[_0x18dd1d(0xd8)](',\x20')+'.');const _0x1a633a=await getPagePermit(_0x3c05a1),_0x48382d={},_0x238a61={},_0x10a74f=[];for(const {spec:_0x229dcf,refs:_0x2b7201}of _0x4b5879){const _0x1cbeed=_0x1a633a[_0x229dcf['key']];if(!_0x1cbeed)throw CliErrors[_0x18dd1d(0xdc)]('This\x20page\x20has\x20no\x20\x22'+_0x229dcf[_0x18dd1d(0xe3)]+'\x22\x20permission\x20slot\x20('+_0x229dcf[_0x18dd1d(0xd4)]+').',_0x18dd1d(0xd7));_0x48382d[_0x229dcf[_0x18dd1d(0xd4)]]=projectPageSlot(_0x1cbeed);const _0x27e177=await resolvePermitRoles(_0x461d90['appCode'],_0x2b7201,{'allowSelf':_0x229dcf[_0x18dd1d(0xd0)],'label':_0x229dcf[_0x18dd1d(0xe3)]});_0x1cbeed[_0x18dd1d(0xce)]=_0x27e177,_0x238a61[_0x229dcf[_0x18dd1d(0xd4)]]=projectPageSlot(_0x1cbeed);}const _0x53b1f3={'operation':_0x18dd1d(0xe1),'selector':{'appCode':_0x461d90[_0x18dd1d(0xd1)],'menuId':_0x3c05a1,'slots':_0x4b5879[_0x18dd1d(0xd6)](_0x58d4f4=>_0x58d4f4['spec']['key'])},'before':_0x48382d,'after':_0x238a61,'dryRun':_0x18a776,'backend':{'method':_0x18dd1d(0xe6),'path':SAVE_PATH},'warnings':_0x10a74f};return{'page':_0x1a633a,'mutation':_0x53b1f3};}export const permitPageSet={'service':'permit','command':a155_0x4f9c47(0xe1),'description':a155_0x4f9c47(0xe4),'risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2361a6){const _0x302a10=a155_0x4f9c47,_0x5b3a28=collectRequestedSlots(_0x2361a6);if(_0x5b3a28[_0x302a10(0xe5)]===0x0)throw CliErrors['validation']('Nothing\x20to\x20set.',_0x302a10(0xdb)+PAGE_SLOT_SPECS[_0x302a10(0xd6)](_0x324c92=>'--'+_0x324c92[_0x302a10(0xcf)])['join'](',\x20')+'.');},async 'dryRun'(_0xe991b7){const _0x28847a=a155_0x4f9c47,{mutation:_0x1abd56}=await buildPlan(_0xe991b7,!![]);return asDryRunResult(_0x1abd56,{'method':_0x28847a(0xe6),'url':SAVE_PATH});},async 'execute'(_0x2e25bb){const _0x6b5a64=a155_0x4f9c47,{page:_0x271cf5,mutation:_0x58ea4b}=await buildPlan(_0x2e25bb,![]);return await savePagePermit(_0x271cf5),{'ok':!![],'data':_0x58ea4b,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x58ea4b[_0x6b5a64(0xdf)]['menuId']};}};
1
+ const a147_0x1451b0=a147_0x41af;(function(_0x5c24e4,_0x2b1d16){const _0x13c898=a147_0x41af,_0x3d527f=_0x5c24e4();while(!![]){try{const _0x215678=parseInt(_0x13c898(0x116))/0x1*(-parseInt(_0x13c898(0x117))/0x2)+-parseInt(_0x13c898(0x10c))/0x3+-parseInt(_0x13c898(0x105))/0x4+-parseInt(_0x13c898(0x10d))/0x5*(-parseInt(_0x13c898(0x119))/0x6)+parseInt(_0x13c898(0x112))/0x7*(-parseInt(_0x13c898(0x109))/0x8)+-parseInt(_0x13c898(0x10b))/0x9+parseInt(_0x13c898(0x10a))/0xa;if(_0x215678===_0x2b1d16)break;else _0x3d527f['push'](_0x3d527f['shift']());}catch(_0x7eb74c){_0x3d527f['push'](_0x3d527f['shift']());}}}(a147_0x2d52,0xdb5cf));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x1451b0(0x11a);function a147_0x2d52(){const _0x3bc40a=['flag','length','key','4648gYgvlC','57815270FJoDmQ','7861986Vulrvs','4585965rRlOYx','181565blJPME','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','\x22\x20permission\x20slot\x20(','Nothing\x20to\x20set.','Updated\x20page\x20permit\x20for\x20menu\x20','18697gSGQnh','rolePermit','POST','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','2vrNZEF','158196ZzmqcX','high-risk-write','36UUWviF','/smartapi/permit/page/save','num','validation','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','allowSelf','permit','menu-id','This\x20page\x20has\x20no\x20\x22','join','menuId','Pass\x20at\x20least\x20one\x20of:\x20','appCode','label','page-set','map','3954552NOgMBD'];a147_0x2d52=function(){return _0x3bc40a;};return a147_0x2d52();}function a147_0x41af(_0x3d445c,_0x59b2c0){_0x3d445c=_0x3d445c-0xfb;const _0x2d5221=a147_0x2d52();let _0x41af4c=_0x2d5221[_0x3d445c];return _0x41af4c;}function collectRequestedSlots(_0x535d3f){const _0x2b94f6=a147_0x1451b0,_0x124b52=[];for(const _0x2880d of PAGE_SLOT_SPECS){const _0x168664=_0x535d3f[_0x2b94f6(0x106)](_0x2880d[_0x2b94f6(0x106)]);if(_0x168664===undefined||_0x168664===null)continue;const _0x5b63ed=splitList(String(_0x168664));if(_0x5b63ed[_0x2b94f6(0x107)]===0x0)throw CliErrors[_0x2b94f6(0x11c)]('--'+_0x2880d[_0x2b94f6(0x106)]+'\x20cannot\x20be\x20empty.',_0x2b94f6(0x11d));_0x124b52['push']({'spec':_0x2880d,'refs':_0x5b63ed});}return _0x124b52;}async function buildPlan(_0x4015b7,_0x304c07){const _0x566fc3=a147_0x1451b0,_0x173cc9=_0x4015b7[_0x566fc3(0x11b)](_0x566fc3(0xfc)),_0x66ce44=collectRequestedSlots(_0x4015b7);if(_0x66ce44[_0x566fc3(0x107)]===0x0)throw CliErrors[_0x566fc3(0x11c)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x566fc3(0x104)](_0x4d6283=>'--'+_0x4d6283[_0x566fc3(0x106)])[_0x566fc3(0xfe)](',\x20')+'.');const _0x36fe9d=await getPagePermit(_0x173cc9),_0x17481f={},_0xa6c695={},_0x50dcfc=[];for(const {spec:_0x1fd9ae,refs:_0x39a70f}of _0x66ce44){const _0x4735b8=_0x36fe9d[_0x1fd9ae[_0x566fc3(0x108)]];if(!_0x4735b8)throw CliErrors[_0x566fc3(0x11c)](_0x566fc3(0xfd)+_0x1fd9ae[_0x566fc3(0x102)]+_0x566fc3(0x10f)+_0x1fd9ae['key']+').',_0x566fc3(0x10e));_0x17481f[_0x1fd9ae[_0x566fc3(0x108)]]=projectPageSlot(_0x4735b8);const _0x3f4324=await resolvePermitRoles(_0x4015b7[_0x566fc3(0x101)],_0x39a70f,{'allowSelf':_0x1fd9ae[_0x566fc3(0x11e)],'label':_0x1fd9ae['label']});_0x4735b8[_0x566fc3(0x113)]=_0x3f4324,_0xa6c695[_0x1fd9ae[_0x566fc3(0x108)]]=projectPageSlot(_0x4735b8);}const _0x170ac9={'operation':'page-set','selector':{'appCode':_0x4015b7[_0x566fc3(0x101)],'menuId':_0x173cc9,'slots':_0x66ce44['map'](_0x25fdc8=>_0x25fdc8['spec'][_0x566fc3(0x108)])},'before':_0x17481f,'after':_0xa6c695,'dryRun':_0x304c07,'backend':{'method':_0x566fc3(0x114),'path':SAVE_PATH},'warnings':_0x50dcfc};return{'page':_0x36fe9d,'mutation':_0x170ac9};}export const permitPageSet={'service':a147_0x1451b0(0xfb),'command':a147_0x1451b0(0x103),'description':a147_0x1451b0(0x115),'risk':a147_0x1451b0(0x118),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b4db8){const _0x3df7fb=a147_0x1451b0,_0x388ca2=collectRequestedSlots(_0x2b4db8);if(_0x388ca2[_0x3df7fb(0x107)]===0x0)throw CliErrors[_0x3df7fb(0x11c)](_0x3df7fb(0x110),_0x3df7fb(0x100)+PAGE_SLOT_SPECS['map'](_0x1ce5e=>'--'+_0x1ce5e[_0x3df7fb(0x106)])[_0x3df7fb(0xfe)](',\x20')+'.');},async 'dryRun'(_0x41bd10){const _0x77a95f=a147_0x1451b0,{mutation:_0x1733d9}=await buildPlan(_0x41bd10,!![]);return asDryRunResult(_0x1733d9,{'method':_0x77a95f(0x114),'url':SAVE_PATH});},async 'execute'(_0x432790){const _0x2cfdc3=a147_0x1451b0,{page:_0x14ede4,mutation:_0x180e91}=await buildPlan(_0x432790,![]);return await savePagePermit(_0x14ede4),{'ok':!![],'data':_0x180e91,'message':_0x2cfdc3(0x111)+_0x180e91['selector'][_0x2cfdc3(0xff)]};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitRoleApisSet: CommandDefinition;
@@ -1 +1 @@
1
- const a156_0x3da09f=a156_0x278a;function a156_0x278a(_0x165db2,_0x264184){_0x165db2=_0x165db2-0xdc;const _0x5ef7b6=a156_0x5ef7();let _0x278adf=_0x5ef7b6[_0x165db2];return _0x278adf;}(function(_0x322226,_0x3b1f20){const _0x5afd82=a156_0x278a,_0x233db0=_0x322226();while(!![]){try{const _0x50f6a4=parseInt(_0x5afd82(0x103))/0x1*(-parseInt(_0x5afd82(0xfb))/0x2)+parseInt(_0x5afd82(0xeb))/0x3*(-parseInt(_0x5afd82(0xff))/0x4)+parseInt(_0x5afd82(0x102))/0x5+-parseInt(_0x5afd82(0xde))/0x6*(-parseInt(_0x5afd82(0xf0))/0x7)+-parseInt(_0x5afd82(0x104))/0x8*(parseInt(_0x5afd82(0xfd))/0x9)+-parseInt(_0x5afd82(0xdd))/0xa+-parseInt(_0x5afd82(0xe7))/0xb*(-parseInt(_0x5afd82(0xf9))/0xc);if(_0x50f6a4===_0x3b1f20)break;else _0x233db0['push'](_0x233db0['shift']());}catch(_0x56fefd){_0x233db0['push'](_0x233db0['shift']());}}}(a156_0x5ef7,0x9e613));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function a156_0x5ef7(){const _0x11a5b5=['length','api-revoke','12193470LiIVTi','1937322GkCCbH','roleName','set','\x20dataset(s)\x20on\x20role\x20','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','high-risk-write','role-apis-set','datasets','26221239QuAaye','Missing\x20--revoke.','push','POST','130146feFlGK','validation','filter','selector','Pass\x20--datasets\x20<datasetCode,...>.','28teWKmr','appCode','str','get','datasetCodes','has','flagMissing','action','bool','12WfFQhK','API','2eeUepT','join','9gRQzNi','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','100wXDDYA','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','revoke','3724465mJiGmc','778942lkkrrN','5509024GxEWCk'];a156_0x5ef7=function(){return _0x11a5b5;};return a156_0x5ef7();}async function buildPlan(_0x33d256,_0x3ca98c){const _0x44ad41=a156_0x278a,_0x24ce37=await resolveRoleRef(_0x33d256['appCode'],readRoleRef(_0x33d256));assertPermConfigurable(_0x24ce37);if(!_0x33d256[_0x44ad41(0xf8)]('revoke'))throw CliErrors[_0x44ad41(0xec)]('Missing\x20--revoke.',_0x44ad41(0xe2));const _0x389cab=splitList(_0x33d256[_0x44ad41(0xf2)](_0x44ad41(0xe6)));if(_0x389cab[_0x44ad41(0x105)]===0x0)throw CliErrors[_0x44ad41(0xf6)](_0x44ad41(0xe6),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x20cbf6=await getRoleApiResources(_0x33d256[_0x44ad41(0xf1)],_0x24ce37['id']),{byCode:_0x26cc44,byDataset:_0x38dfdd}=flattenApiResources(_0x20cbf6),_0x2619a4=_0x389cab[_0x44ad41(0xed)](_0x2e2b72=>!_0x38dfdd[_0x44ad41(0xf5)](_0x2e2b72));if(_0x2619a4[_0x44ad41(0x105)]>0x0)throw CliErrors[_0x44ad41(0xec)](_0x44ad41(0x100)+_0x2619a4[_0x44ad41(0xfc)](',\x20')+'.',_0x44ad41(0xe3));const _0x38caa0=new Map(),_0x2c90bf=[],_0x3f0750=[];for(const _0x3b7e3f of _0x389cab){for(const _0x813c15 of _0x38dfdd[_0x44ad41(0xf3)](_0x3b7e3f)){const _0x159509=_0x26cc44['get'](_0x813c15);_0x38caa0[_0x44ad41(0xe0)](_0x813c15,'0'),_0x2c90bf[_0x44ad41(0xe9)]({'resourceCode':_0x813c15,'datasetCode':_0x3b7e3f,'action':_0x159509[_0x44ad41(0xf7)]}),_0x3f0750[_0x44ad41(0xe9)]({'resourceCode':_0x813c15,'datasetCode':_0x3b7e3f,'action':'0'});}}const _0x37dd3a=buildPermits(_0x26cc44,_0x38caa0),_0x2eb75f={'operation':_0x44ad41(0xdc),'selector':{'appCode':_0x33d256['appCode'],'roleId':_0x24ce37['id'],'roleName':_0x24ce37[_0x44ad41(0xdf)],'datasetCodes':_0x389cab},'before':_0x2c90bf,'after':_0x3f0750,'dryRun':_0x3ca98c,'backend':{'method':_0x44ad41(0xea),'path':UPDATE_PATH,'roleType':_0x44ad41(0xfa)},'warnings':[]};return{'role':_0x24ce37,'permits':_0x37dd3a,'mutation':_0x2eb75f};}export const permitRoleApisSet={'service':'permit','command':a156_0x3da09f(0xe5),'description':a156_0x3da09f(0xfe),'risk':a156_0x3da09f(0xe4),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f5642){const _0x5592bc=a156_0x3da09f;if(!_0x2f5642[_0x5592bc(0xf8)](_0x5592bc(0x101)))throw CliErrors[_0x5592bc(0xec)](_0x5592bc(0xe8),'role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).');if(splitList(_0x2f5642['str']('datasets'))['length']===0x0)throw CliErrors['flagMissing'](_0x5592bc(0xe6),_0x5592bc(0xef));},async 'dryRun'(_0x5bbd60){const {mutation:_0x47240b}=await buildPlan(_0x5bbd60,!![]);return asDryRunResult(_0x47240b,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x586f22){const _0xf66584=a156_0x3da09f,{role:_0x4ec6a4,permits:_0x45672f,mutation:_0x3d1b48}=await buildPlan(_0x586f22,![]);return await updateAppRole({'id':_0x4ec6a4['id'],'appCode':_0x586f22[_0xf66584(0xf1)],'roleType':_0xf66584(0xfa),'permits':_0x45672f}),{'ok':!![],'data':_0x3d1b48,'message':'Revoked\x20API\x20access\x20for\x20'+_0x3d1b48[_0xf66584(0xee)][_0xf66584(0xf4)][_0xf66584(0x105)]+_0xf66584(0xe1)+_0x4ec6a4['roleName']};}};
1
+ const a148_0x53d894=a148_0x2518;(function(_0x5891eb,_0x431020){const _0x38fc8d=a148_0x2518,_0x19a6df=_0x5891eb();while(!![]){try{const _0x226c9d=parseInt(_0x38fc8d(0x1b2))/0x1+-parseInt(_0x38fc8d(0x1a4))/0x2+-parseInt(_0x38fc8d(0x1ba))/0x3+-parseInt(_0x38fc8d(0x1b8))/0x4+-parseInt(_0x38fc8d(0x1be))/0x5*(parseInt(_0x38fc8d(0x1a7))/0x6)+-parseInt(_0x38fc8d(0x1a2))/0x7+parseInt(_0x38fc8d(0x1b0))/0x8;if(_0x226c9d===_0x431020)break;else _0x19a6df['push'](_0x19a6df['shift']());}catch(_0x5de953){_0x19a6df['push'](_0x19a6df['shift']());}}}(a148_0x5ee0,0x2d515));function a148_0x2518(_0x383a99,_0x359fbb){_0x383a99=_0x383a99-0x19e;const _0x5ee06d=a148_0x5ee0();let _0x2518ec=_0x5ee06d[_0x383a99];return _0x2518ec;}import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a148_0x53d894(0x1bc);async function buildPlan(_0x1b5db2,_0x1fd807){const _0x56889b=a148_0x53d894,_0x4527d5=await resolveRoleRef(_0x1b5db2[_0x56889b(0x19f)],readRoleRef(_0x1b5db2));assertPermConfigurable(_0x4527d5);if(!_0x1b5db2[_0x56889b(0x1c0)](_0x56889b(0x1a6)))throw CliErrors[_0x56889b(0x1b5)](_0x56889b(0x1ac),_0x56889b(0x1bb));const _0x2a772b=splitList(_0x1b5db2[_0x56889b(0x1a5)]('datasets'));if(_0x2a772b[_0x56889b(0x1c2)]===0x0)throw CliErrors[_0x56889b(0x1bd)](_0x56889b(0x1ae),_0x56889b(0x1b9));const _0xe3c14=await getRoleApiResources(_0x1b5db2[_0x56889b(0x19f)],_0x4527d5['id']),{byCode:_0x150929,byDataset:_0x3f0e78}=flattenApiResources(_0xe3c14),_0x39a68e=_0x2a772b['filter'](_0x13e120=>!_0x3f0e78[_0x56889b(0x1a3)](_0x13e120));if(_0x39a68e[_0x56889b(0x1c2)]>0x0)throw CliErrors[_0x56889b(0x1b5)](_0x56889b(0x1a1)+_0x39a68e['join'](',\x20')+'.',_0x56889b(0x1b3));const _0x2e5fb9=new Map(),_0x37b0aa=[],_0x25a452=[];for(const _0x55dbcf of _0x2a772b){for(const _0x234f8f of _0x3f0e78[_0x56889b(0x1ad)](_0x55dbcf)){const _0x58d84c=_0x150929[_0x56889b(0x1ad)](_0x234f8f);_0x2e5fb9[_0x56889b(0x1a8)](_0x234f8f,'0'),_0x37b0aa[_0x56889b(0x1bf)]({'resourceCode':_0x234f8f,'datasetCode':_0x55dbcf,'action':_0x58d84c[_0x56889b(0x1ab)]}),_0x25a452[_0x56889b(0x1bf)]({'resourceCode':_0x234f8f,'datasetCode':_0x55dbcf,'action':'0'});}}const _0xba8b3b=buildPermits(_0x150929,_0x2e5fb9),_0x33e398={'operation':_0x56889b(0x1b1),'selector':{'appCode':_0x1b5db2[_0x56889b(0x19f)],'roleId':_0x4527d5['id'],'roleName':_0x4527d5[_0x56889b(0x1aa)],'datasetCodes':_0x2a772b},'before':_0x37b0aa,'after':_0x25a452,'dryRun':_0x1fd807,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x56889b(0x1a9)},'warnings':[]};return{'role':_0x4527d5,'permits':_0xba8b3b,'mutation':_0x33e398};}function a148_0x5ee0(){const _0x32654b=['/smartapi/permit/role/update','flagMissing','15iWLjXL','push','bool','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','length','datasetCodes','appCode','high-risk-write','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','1685565CHwItZ','has','18160EIhrPj','str','revoke','59544NradNI','set','API','roleName','action','Missing\x20--revoke.','get','datasets','role-apis-set','5751104XinzYn','api-revoke','154782CyvGqa','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','\x20dataset(s)\x20on\x20role\x20','validation','Revoked\x20API\x20access\x20for\x20','selector','1404984yqNNBl','Pass\x20--datasets\x20<datasetCode,...>.','171468ysizpA','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).'];a148_0x5ee0=function(){return _0x32654b;};return a148_0x5ee0();}export const permitRoleApisSet={'service':'permit','command':a148_0x53d894(0x1af),'description':a148_0x53d894(0x1c1),'risk':a148_0x53d894(0x1a0),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ff02f){const _0x4fb5f4=a148_0x53d894;if(!_0x3ff02f['bool'](_0x4fb5f4(0x1a6)))throw CliErrors[_0x4fb5f4(0x1b5)](_0x4fb5f4(0x1ac),_0x4fb5f4(0x1bb));if(splitList(_0x3ff02f[_0x4fb5f4(0x1a5)](_0x4fb5f4(0x1ae)))[_0x4fb5f4(0x1c2)]===0x0)throw CliErrors[_0x4fb5f4(0x1bd)](_0x4fb5f4(0x1ae),_0x4fb5f4(0x1b9));},async 'dryRun'(_0x15cd43){const {mutation:_0x383174}=await buildPlan(_0x15cd43,!![]);return asDryRunResult(_0x383174,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x440019){const _0x4f867f=a148_0x53d894,{role:_0xdbcbb9,permits:_0x17c4e4,mutation:_0x3ae9f8}=await buildPlan(_0x440019,![]);return await updateAppRole({'id':_0xdbcbb9['id'],'appCode':_0x440019[_0x4f867f(0x19f)],'roleType':_0x4f867f(0x1a9),'permits':_0x17c4e4}),{'ok':!![],'data':_0x3ae9f8,'message':_0x4f867f(0x1b6)+_0x3ae9f8[_0x4f867f(0x1b7)][_0x4f867f(0x19e)]['length']+_0x4f867f(0x1b4)+_0xdbcbb9[_0x4f867f(0x1aa)]};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitRoleMenusSet: CommandDefinition;
@@ -1 +1 @@
1
- const a157_0x19028a=a157_0xaad4;(function(_0x30ccac,_0x11e60a){const _0x542d71=a157_0xaad4,_0x17dd4d=_0x30ccac();while(!![]){try{const _0xf314cd=parseInt(_0x542d71(0x116))/0x1*(-parseInt(_0x542d71(0x105))/0x2)+-parseInt(_0x542d71(0x128))/0x3+parseInt(_0x542d71(0x12b))/0x4*(parseInt(_0x542d71(0x12a))/0x5)+-parseInt(_0x542d71(0x108))/0x6*(parseInt(_0x542d71(0x113))/0x7)+-parseInt(_0x542d71(0x12e))/0x8*(parseInt(_0x542d71(0x10d))/0x9)+parseInt(_0x542d71(0x112))/0xa+-parseInt(_0x542d71(0x10a))/0xb*(-parseInt(_0x542d71(0x114))/0xc);if(_0xf314cd===_0x11e60a)break;else _0x17dd4d['push'](_0x17dd4d['shift']());}catch(_0x3202b2){_0x17dd4d['push'](_0x17dd4d['shift']());}}}(a157_0x264d,0x80c62));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';function a157_0x264d(){const _0x408a6d=['resourceCodes','7783576JIxBOv','1402RUbaAV','permit','push','6OAcbTr','roleName','4873KCUOHe','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','\x20menu\x20permit(s)\x20for\x20role\x20','9QMnQCy','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-grant','role-menus-set','selector','1528260dwJTAe','6251714bBCWPQ','101316SPXswE','Pass\x20--menus\x20<resourceCode,...>.','1051DIsMIS','flagMissing','PAGE','get','filter','POST','action','has','menu-revoke','appCode','high-risk-write','access','set','length','/smartapi/permit/role/update','str','Updated\x20','join','2290248WbtVzK','validation','2995vyNRJD','4aYqpQK','menus'];a157_0x264d=function(){return _0x408a6d;};return a157_0x264d();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a157_0xaad4(_0x2a4a39,_0xe397b3){_0x2a4a39=_0x2a4a39-0x105;const _0x264dec=a157_0x264d();let _0xaad46f=_0x264dec[_0x2a4a39];return _0xaad46f;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a157_0x19028a(0x124);async function buildPlan(_0x54bb53,_0xcd1cd1){const _0x560c7c=a157_0x19028a,_0x27b15b=await resolveRoleRef(_0x54bb53['appCode'],readRoleRef(_0x54bb53));assertPermConfigurable(_0x27b15b);const _0x4b79a3=readGrantRevoke(_0x54bb53),_0x15cbb1=splitList(_0x54bb53[_0x560c7c(0x125)](_0x560c7c(0x12c)));if(_0x15cbb1[_0x560c7c(0x123)]===0x0)throw CliErrors[_0x560c7c(0x117)](_0x560c7c(0x12c),_0x560c7c(0x115));const _0x31c005=await getRoleMenuResources(_0x54bb53[_0x560c7c(0x11f)],_0x27b15b['id']),_0x30e026=flattenMenuResources(_0x31c005),_0x267116=_0x15cbb1[_0x560c7c(0x11a)](_0x177e1d=>!_0x30e026[_0x560c7c(0x11d)](_0x177e1d));if(_0x267116[_0x560c7c(0x123)]>0x0)throw CliErrors[_0x560c7c(0x129)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x267116[_0x560c7c(0x127)](',\x20')+'.',_0x560c7c(0x10e));const _0x1a6c19=new Map(),_0x362a52=[],_0x218ed3=[];for(const _0x2d42d3 of _0x15cbb1){const _0x1074fc=_0x30e026[_0x560c7c(0x119)](_0x2d42d3);_0x1a6c19[_0x560c7c(0x122)](_0x2d42d3,_0x4b79a3),_0x362a52['push']({'resourceCode':_0x2d42d3,'action':_0x1074fc[_0x560c7c(0x11c)]}),_0x218ed3[_0x560c7c(0x107)]({'resourceCode':_0x2d42d3,'action':_0x4b79a3});}const _0x58c27b=buildPermits(_0x30e026,_0x1a6c19),_0x239ff9={'operation':_0x4b79a3===_0x560c7c(0x121)?_0x560c7c(0x10f):_0x560c7c(0x11e),'selector':{'appCode':_0x54bb53[_0x560c7c(0x11f)],'roleId':_0x27b15b['id'],'roleName':_0x27b15b['roleName'],'resourceCodes':_0x15cbb1},'before':_0x362a52,'after':_0x218ed3,'dryRun':_0xcd1cd1,'backend':{'method':_0x560c7c(0x11b),'path':UPDATE_PATH,'roleType':_0x560c7c(0x118)},'warnings':[]};return{'role':_0x27b15b,'permits':_0x58c27b,'mutation':_0x239ff9};}export const permitRoleMenusSet={'service':a157_0x19028a(0x106),'command':a157_0x19028a(0x110),'description':a157_0x19028a(0x10b),'risk':a157_0x19028a(0x120),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xfa85f5){const _0x402598=a157_0x19028a;readGrantRevoke(_0xfa85f5);if(splitList(_0xfa85f5[_0x402598(0x125)](_0x402598(0x12c)))[_0x402598(0x123)]===0x0)throw CliErrors[_0x402598(0x117)]('menus',_0x402598(0x115));},async 'dryRun'(_0x53158b){const _0x17750d=a157_0x19028a,{mutation:_0x43eca1}=await buildPlan(_0x53158b,!![]);return asDryRunResult(_0x43eca1,{'method':_0x17750d(0x11b),'url':UPDATE_PATH});},async 'execute'(_0x33d01a){const _0x246799=a157_0x19028a,{role:_0x33f62a,permits:_0x146d72,mutation:_0x5dc08a}=await buildPlan(_0x33d01a,![]);return await updateAppRole({'id':_0x33f62a['id'],'appCode':_0x33d01a[_0x246799(0x11f)],'roleType':_0x246799(0x118),'permits':_0x146d72}),{'ok':!![],'data':_0x5dc08a,'message':_0x246799(0x126)+_0x5dc08a[_0x246799(0x111)][_0x246799(0x12d)]['length']+_0x246799(0x10c)+_0x33f62a[_0x246799(0x109)]};}};
1
+ const a149_0x4a8002=a149_0x3543;(function(_0x4af6b6,_0x8d9cc9){const _0x32c0c1=a149_0x3543,_0x4fce39=_0x4af6b6();while(!![]){try{const _0x4a1cf6=-parseInt(_0x32c0c1(0x187))/0x1+parseInt(_0x32c0c1(0x182))/0x2+parseInt(_0x32c0c1(0x17a))/0x3*(-parseInt(_0x32c0c1(0x16d))/0x4)+-parseInt(_0x32c0c1(0x16c))/0x5*(-parseInt(_0x32c0c1(0x18a))/0x6)+-parseInt(_0x32c0c1(0x174))/0x7*(parseInt(_0x32c0c1(0x17b))/0x8)+-parseInt(_0x32c0c1(0x181))/0x9+parseInt(_0x32c0c1(0x170))/0xa;if(_0x4a1cf6===_0x8d9cc9)break;else _0x4fce39['push'](_0x4fce39['shift']());}catch(_0x24e57e){_0x4fce39['push'](_0x4fce39['shift']());}}}(a149_0x4bba,0x31f6b));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a149_0x4bba(){const _0x3ac2e3=['Pass\x20--menus\x20<resourceCode,...>.','action','389490MZAYGF','push','25XsYXtW','16FpQYFz','Updated\x20','str','7435940oLIfbP','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','validation','join','623tLnuzq','get','appCode','menu-grant','PAGE','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','108036jOXcPv','22856fsEJwe','menus','\x20menu\x20permit(s)\x20for\x20role\x20','POST','menu-revoke','length','2546991pZLIMR','111274tfItye','roleName','selector','flagMissing','role-menus-set','237835YRNYWM'];a149_0x4bba=function(){return _0x3ac2e3;};return a149_0x4bba();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x4dff37,_0x36dfd5){const _0x3adc49=a149_0x3543,_0x1b1f10=await resolveRoleRef(_0x4dff37['appCode'],readRoleRef(_0x4dff37));assertPermConfigurable(_0x1b1f10);const _0x4aad59=readGrantRevoke(_0x4dff37),_0x496538=splitList(_0x4dff37[_0x3adc49(0x16f)](_0x3adc49(0x17c)));if(_0x496538[_0x3adc49(0x180)]===0x0)throw CliErrors[_0x3adc49(0x185)](_0x3adc49(0x17c),_0x3adc49(0x188));const _0x461fea=await getRoleMenuResources(_0x4dff37[_0x3adc49(0x176)],_0x1b1f10['id']),_0x2070bf=flattenMenuResources(_0x461fea),_0x10f8e8=_0x496538['filter'](_0x238481=>!_0x2070bf['has'](_0x238481));if(_0x10f8e8[_0x3adc49(0x180)]>0x0)throw CliErrors[_0x3adc49(0x172)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x10f8e8[_0x3adc49(0x173)](',\x20')+'.',_0x3adc49(0x179));const _0x5f109e=new Map(),_0x2f7dea=[],_0x2243ad=[];for(const _0x5b6138 of _0x496538){const _0x42cf75=_0x2070bf[_0x3adc49(0x175)](_0x5b6138);_0x5f109e['set'](_0x5b6138,_0x4aad59),_0x2f7dea[_0x3adc49(0x18b)]({'resourceCode':_0x5b6138,'action':_0x42cf75[_0x3adc49(0x189)]}),_0x2243ad[_0x3adc49(0x18b)]({'resourceCode':_0x5b6138,'action':_0x4aad59});}const _0x5572c0=buildPermits(_0x2070bf,_0x5f109e),_0x598c43={'operation':_0x4aad59==='access'?_0x3adc49(0x177):_0x3adc49(0x17f),'selector':{'appCode':_0x4dff37[_0x3adc49(0x176)],'roleId':_0x1b1f10['id'],'roleName':_0x1b1f10[_0x3adc49(0x183)],'resourceCodes':_0x496538},'before':_0x2f7dea,'after':_0x2243ad,'dryRun':_0x36dfd5,'backend':{'method':_0x3adc49(0x17e),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1b1f10,'permits':_0x5572c0,'mutation':_0x598c43};}function a149_0x3543(_0x25066c,_0x38b89b){_0x25066c=_0x25066c-0x16c;const _0x4bba4b=a149_0x4bba();let _0x354384=_0x4bba4b[_0x25066c];return _0x354384;}export const permitRoleMenusSet={'service':'permit','command':a149_0x4a8002(0x186),'description':a149_0x4a8002(0x171),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3e609a){const _0x466651=a149_0x4a8002;readGrantRevoke(_0x3e609a);if(splitList(_0x3e609a[_0x466651(0x16f)](_0x466651(0x17c)))[_0x466651(0x180)]===0x0)throw CliErrors[_0x466651(0x185)](_0x466651(0x17c),_0x466651(0x188));},async 'dryRun'(_0x384ee2){const _0x5c481d=a149_0x4a8002,{mutation:_0x1163a7}=await buildPlan(_0x384ee2,!![]);return asDryRunResult(_0x1163a7,{'method':_0x5c481d(0x17e),'url':UPDATE_PATH});},async 'execute'(_0x5e631e){const _0x2f4246=a149_0x4a8002,{role:_0x13fdb9,permits:_0x3f1e37,mutation:_0x5b8f60}=await buildPlan(_0x5e631e,![]);return await updateAppRole({'id':_0x13fdb9['id'],'appCode':_0x5e631e[_0x2f4246(0x176)],'roleType':_0x2f4246(0x178),'permits':_0x3f1e37}),{'ok':!![],'data':_0x5b8f60,'message':_0x2f4246(0x16e)+_0x5b8f60[_0x2f4246(0x184)]['resourceCodes'][_0x2f4246(0x180)]+_0x2f4246(0x17d)+_0x13fdb9[_0x2f4246(0x183)]};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const permitRoleMenus: CommandDefinition;
@@ -1 +1 @@
1
- function a158_0x49e8(_0x4c31a6,_0x488fa6){_0x4c31a6=_0x4c31a6-0x13f;const _0x96cb57=a158_0x96cb();let _0x49e83b=_0x96cb57[_0x4c31a6];return _0x49e83b;}const a158_0x2ae983=a158_0x49e8;(function(_0x1479b3,_0x9a949c){const _0x2bbb9b=a158_0x49e8,_0x2db4ce=_0x1479b3();while(!![]){try{const _0x32b748=-parseInt(_0x2bbb9b(0x149))/0x1*(parseInt(_0x2bbb9b(0x145))/0x2)+-parseInt(_0x2bbb9b(0x14b))/0x3*(parseInt(_0x2bbb9b(0x14e))/0x4)+-parseInt(_0x2bbb9b(0x151))/0x5+-parseInt(_0x2bbb9b(0x142))/0x6+-parseInt(_0x2bbb9b(0x158))/0x7*(-parseInt(_0x2bbb9b(0x14c))/0x8)+-parseInt(_0x2bbb9b(0x157))/0x9*(parseInt(_0x2bbb9b(0x156))/0xa)+parseInt(_0x2bbb9b(0x154))/0xb;if(_0x32b748===_0x9a949c)break;else _0x2db4ce['push'](_0x2db4ce['shift']());}catch(_0xfa62d){_0x2db4ce['push'](_0x2db4ce['shift']());}}}(a158_0x96cb,0xdd190));function a158_0x96cb(){const _0x4dff22=['9752256MsRIov','permit','resourceCode','44zuDvVC','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','read','allowed','46607UivLQY','map','5284239ZLecKv','2832HSgmPt','values','4gzFOwt','roleName','action','1669835OgZaSU','\x20menu(s)\x20allowed','appCode','58725799INWYOq','from','10egecBH','5606631iFAzLl','18508lCMxzk','filter','role-menus','length'];a158_0x96cb=function(){return _0x4dff22;};return a158_0x96cb();}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a158_0x2ae983(0x143),'command':a158_0x2ae983(0x140),'description':a158_0x2ae983(0x146),'risk':a158_0x2ae983(0x147),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xadd086){const _0x1352d5=a158_0x2ae983,_0x13112e=await resolveRoleRef(_0xadd086[_0x1352d5(0x153)],readRoleRef(_0xadd086)),_0x3e1e8f=await getRoleMenuResources(_0xadd086[_0x1352d5(0x153)],_0x13112e['id']),_0x18dd21=flattenMenuResources(_0x3e1e8f),_0x410b7c=Array[_0x1352d5(0x155)](_0x18dd21[_0x1352d5(0x14d)]())[_0x1352d5(0x14a)](_0x3ee944=>({'resourceCode':_0x3ee944[_0x1352d5(0x144)],'resourceName':_0x3ee944['resourceName'],'allowed':_0x3ee944[_0x1352d5(0x150)]==='access','action':_0x3ee944[_0x1352d5(0x150)]}));return{'ok':!![],'data':{'selector':{'appCode':_0xadd086['appCode'],'roleId':_0x13112e['id'],'roleName':_0x13112e[_0x1352d5(0x14f)]},'menus':_0x410b7c},'message':'Role\x20'+_0x13112e[_0x1352d5(0x14f)]+'\x20has\x20'+_0x410b7c[_0x1352d5(0x13f)](_0x14b3c3=>_0x14b3c3[_0x1352d5(0x148)])[_0x1352d5(0x141)]+'/'+_0x410b7c[_0x1352d5(0x141)]+_0x1352d5(0x152)};}};
1
+ const a150_0x265ac6=a150_0x1f32;(function(_0x2258f5,_0x342685){const _0x43561b=a150_0x1f32,_0x107919=_0x2258f5();while(!![]){try{const _0x2b8d02=parseInt(_0x43561b(0x15d))/0x1*(-parseInt(_0x43561b(0x162))/0x2)+-parseInt(_0x43561b(0x15c))/0x3*(parseInt(_0x43561b(0x176))/0x4)+parseInt(_0x43561b(0x179))/0x5*(-parseInt(_0x43561b(0x171))/0x6)+-parseInt(_0x43561b(0x165))/0x7*(-parseInt(_0x43561b(0x16d))/0x8)+parseInt(_0x43561b(0x163))/0x9+-parseInt(_0x43561b(0x174))/0xa+-parseInt(_0x43561b(0x161))/0xb*(-parseInt(_0x43561b(0x166))/0xc);if(_0x2b8d02===_0x342685)break;else _0x107919['push'](_0x107919['shift']());}catch(_0x20ddb8){_0x107919['push'](_0x107919['shift']());}}}(a150_0x4f45,0x4fc8b));function a150_0x1f32(_0x5a8666,_0x2c8520){_0x5a8666=_0x5a8666-0x15c;const _0x4f4591=a150_0x4f45();let _0x1f324d=_0x4f4591[_0x5a8666];return _0x1f324d;}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a150_0x4f45(){const _0x50a60f=['644760lzMEzg','roleName','14098fKdLXO','17367540yisIod','length','read','from','permit','Role\x20','resourceCode','800MONIiq','values','allowed','access','54gEhpua','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','action','1487110znpfvu','\x20menu(s)\x20allowed','4uqRZdA','map','role-menus','291955oakoPh','1725267byBRYl','20603qZgPLQ','\x20has\x20','appCode','filter','11jWCats','14OruPFO'];a150_0x4f45=function(){return _0x50a60f;};return a150_0x4f45();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a150_0x265ac6(0x16a),'command':a150_0x265ac6(0x178),'description':a150_0x265ac6(0x172),'risk':a150_0x265ac6(0x168),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x35fd22){const _0x4a6420=a150_0x265ac6,_0x3bef5c=await resolveRoleRef(_0x35fd22[_0x4a6420(0x15f)],readRoleRef(_0x35fd22)),_0x518510=await getRoleMenuResources(_0x35fd22[_0x4a6420(0x15f)],_0x3bef5c['id']),_0x14b1fe=flattenMenuResources(_0x518510),_0x15aada=Array[_0x4a6420(0x169)](_0x14b1fe[_0x4a6420(0x16e)]())[_0x4a6420(0x177)](_0x48acf7=>({'resourceCode':_0x48acf7[_0x4a6420(0x16c)],'resourceName':_0x48acf7['resourceName'],'allowed':_0x48acf7[_0x4a6420(0x173)]===_0x4a6420(0x170),'action':_0x48acf7[_0x4a6420(0x173)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x35fd22[_0x4a6420(0x15f)],'roleId':_0x3bef5c['id'],'roleName':_0x3bef5c[_0x4a6420(0x164)]},'menus':_0x15aada},'message':_0x4a6420(0x16b)+_0x3bef5c[_0x4a6420(0x164)]+_0x4a6420(0x15e)+_0x15aada[_0x4a6420(0x160)](_0x3fe23a=>_0x3fe23a[_0x4a6420(0x16f)])[_0x4a6420(0x167)]+'/'+_0x15aada['length']+_0x4a6420(0x175)};}};
@@ -0,0 +1,74 @@
1
+ /**
2
+ * permit service 共享逻辑(SSOT)
3
+ *
4
+ * 集中:角色字面量(SELF/ALL/id/name)解析、page 权限槽字段映射、
5
+ * menu / api 资源树扁平化与 permits patch 构造。
6
+ * 命令文件只引用这里,不重复解析/合并规则。
7
+ */
8
+ import { type AppRole, type ApiResource, type MenuResource, type PagePermit, type PagePermitResourceSlot, type PermitAction } from "../../core/api-client.js";
9
+ import type { FlagDef, RuntimeContext } from "../../framework/types.js";
10
+ export declare const MENU_ID_FLAG: FlagDef;
11
+ export declare const ROLE_REF_FLAG: FlagDef;
12
+ export declare const GRANT_FLAG: FlagDef;
13
+ export declare const REVOKE_FLAG: FlagDef;
14
+ export declare const MENUS_FLAG: FlagDef;
15
+ export declare const DATASETS_FLAG: FlagDef;
16
+ /** page-set 的角色列表 flags → PagePermit 槽位映射 */
17
+ export interface PageSlotSpec {
18
+ flag: string;
19
+ key: keyof Pick<PagePermit, "menuPermit" | "dataCreate" | "dataUpdate" | "dataDelete" | "dataDetail" | "dataExport" | "dataPermit">;
20
+ /** 是否允许 SELF(仅 row-roles = dataPermit 允许行级 SELF) */
21
+ allowSelf: boolean;
22
+ label: string;
23
+ }
24
+ export declare const PAGE_SLOT_SPECS: PageSlotSpec[];
25
+ export declare const PAGE_SET_ROLE_FLAGS: FlagDef[];
26
+ export declare function splitList(raw: string): string[];
27
+ export interface RoleRefProjection {
28
+ id: number;
29
+ roleName: string;
30
+ roleType: AppRole["roleType"];
31
+ }
32
+ export declare function projectRoleRef(role: AppRole): RoleRefProjection;
33
+ /**
34
+ * 解析角色字面量数组(SELF/ALL/id/name)为 AppRole[]。
35
+ * 所有解析基于一次 get-permit-list(含特殊组 ALL/SELF)。
36
+ * allowSelf=false 时拒绝 SELF(与工作台一致:菜单/操作权限不含行级 SELF)。
37
+ */
38
+ export declare function resolvePermitRoles(appCode: string, refs: string[], opts: {
39
+ allowSelf: boolean;
40
+ label: string;
41
+ }): Promise<AppRole[]>;
42
+ export declare function projectPageSlot(slot: PagePermitResourceSlot | undefined): {
43
+ resourceCode: string;
44
+ roles: RoleRefProjection[];
45
+ } | null;
46
+ export declare function projectPagePermit(page: PagePermit): Record<string, unknown>;
47
+ export interface FlatMenuResource {
48
+ resourceCode: string;
49
+ resourceName: string;
50
+ action: PermitAction;
51
+ }
52
+ /** 递归扁平化菜单资源树(含 pageNodeList),resourceCode → 当前动作 */
53
+ export declare function flattenMenuResources(resources: MenuResource[]): Map<string, FlatMenuResource>;
54
+ export interface FlatApiResource {
55
+ resourceCode: string;
56
+ resourceName: string;
57
+ datasetCode: string;
58
+ action: PermitAction;
59
+ }
60
+ export declare function flattenApiResources(resources: ApiResource[]): {
61
+ byCode: Map<string, FlatApiResource>;
62
+ byDataset: Map<string, string[]>;
63
+ };
64
+ /**
65
+ * 由「当前全量动作 map」+「目标 resourceCode → 新动作」构造完整 permits 回写体。
66
+ * 未在 changes 中的 resourceCode 保持当前动作(与工作台 permissionState 全量回写一致)。
67
+ */
68
+ export declare function buildPermits(current: Map<string, {
69
+ action: PermitAction;
70
+ }>, changes: Map<string, PermitAction>): Record<string, PermitAction[]>;
71
+ /** 读取 --role flag(permit 侧) */
72
+ export declare function readRoleRef(ctx: RuntimeContext): string;
73
+ /** 解析 grant/revoke 互斥标记 */
74
+ export declare function readGrantRevoke(ctx: RuntimeContext): "access" | "0";