@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.7-beta.1

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 (408) hide show
  1. package/README.md +15 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.d.ts +1 -0
  78. package/lib/commands/dataset/design-context.js +1 -0
  79. package/lib/commands/dataset/design-start.d.ts +1 -0
  80. package/lib/commands/dataset/design-start.js +1 -0
  81. package/lib/commands/dataset/design-status.d.ts +1 -0
  82. package/lib/commands/dataset/design-status.js +1 -0
  83. package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
  84. package/lib/commands/dataset/design-sync-retry.js +1 -0
  85. package/lib/commands/dataset/design-sync-status.d.ts +1 -0
  86. package/lib/commands/dataset/design-sync-status.js +1 -0
  87. package/lib/commands/dataset/design-validate.d.ts +1 -0
  88. package/lib/commands/dataset/design-validate.js +1 -0
  89. package/lib/commands/dataset/detail.js +1 -1
  90. package/lib/commands/dataset/extend-update.js +1 -1
  91. package/lib/commands/dataset/field-restore.js +1 -1
  92. package/lib/commands/dataset/field-update.js +1 -1
  93. package/lib/commands/dataset/generate.js +1 -1
  94. package/lib/commands/dataset/index.js +1 -1
  95. package/lib/commands/dataset/list.js +1 -1
  96. package/lib/commands/dataset/operations.js +1 -1
  97. package/lib/commands/dataset/relation-audit.js +1 -1
  98. package/lib/commands/dataset/relation-create.js +1 -1
  99. package/lib/commands/dataset/relation-delete.js +1 -1
  100. package/lib/commands/dataset/relation-shared.js +1 -1
  101. package/lib/commands/dataset/relation-update.js +1 -1
  102. package/lib/commands/dataset/relations.js +1 -1
  103. package/lib/commands/dataset/rename.js +1 -1
  104. package/lib/commands/dataset/restore.js +1 -1
  105. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  106. package/lib/commands/db/analysis-batching.js +1 -1
  107. package/lib/commands/db/analyze-batch-plan.js +1 -1
  108. package/lib/commands/db/analyze-cancel.js +1 -1
  109. package/lib/commands/db/analyze-start.js +1 -1
  110. package/lib/commands/db/analyze-status.js +1 -1
  111. package/lib/commands/db/create.js +1 -1
  112. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  113. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  114. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  115. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  116. package/lib/commands/db/delete.js +1 -1
  117. package/lib/commands/db/detail.js +1 -1
  118. package/lib/commands/db/diff-refresh-start.js +1 -1
  119. package/lib/commands/db/diff-refresh-status.js +1 -1
  120. package/lib/commands/db/diff.js +1 -1
  121. package/lib/commands/db/index.js +1 -1
  122. package/lib/commands/db/list.js +1 -1
  123. package/lib/commands/db/shared.js +1 -1
  124. package/lib/commands/db/table-diff-shared.js +1 -1
  125. package/lib/commands/db/tables.js +1 -1
  126. package/lib/commands/db/test.js +1 -1
  127. package/lib/commands/db/update.js +1 -1
  128. package/lib/commands/deployment/index.js +1 -1
  129. package/lib/commands/deployment/sync-all.js +1 -1
  130. package/lib/commands/deployment/sync-jobs.js +1 -1
  131. package/lib/commands/deployment/sync-status.js +1 -1
  132. package/lib/commands/doctor.js +1 -1
  133. package/lib/commands/file/index.js +1 -1
  134. package/lib/commands/flow/create.js +1 -1
  135. package/lib/commands/flow/detail.js +1 -1
  136. package/lib/commands/flow/index.js +1 -1
  137. package/lib/commands/flow/list.js +1 -1
  138. package/lib/commands/flow/page-list.d.ts +2 -0
  139. package/lib/commands/flow/page-list.js +1 -0
  140. package/lib/commands/flow/publish.js +1 -1
  141. package/lib/commands/flow/runtime-resources-shared.d.ts +1 -1
  142. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  143. package/lib/commands/flow/runtime-role-list.js +1 -1
  144. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  145. package/lib/commands/flow/runtime-user-search.js +1 -1
  146. package/lib/commands/flow/shared.d.ts +6 -2
  147. package/lib/commands/flow/shared.js +1 -1
  148. package/lib/commands/flow/update.js +1 -1
  149. package/lib/commands/flow/validate.js +1 -1
  150. package/lib/commands/instant-api-policy/current.js +1 -1
  151. package/lib/commands/instant-api-policy/index.js +1 -1
  152. package/lib/commands/instant-api-policy/init.js +1 -1
  153. package/lib/commands/instant-api-policy/publish.js +1 -1
  154. package/lib/commands/instant-api-policy/pull.js +1 -1
  155. package/lib/commands/instant-api-policy/revision.js +1 -1
  156. package/lib/commands/instant-api-policy/revisions.js +1 -1
  157. package/lib/commands/instant-api-policy/rollback.js +1 -1
  158. package/lib/commands/instant-api-policy/shared.js +1 -1
  159. package/lib/commands/instant-api-policy/validate.js +1 -1
  160. package/lib/commands/issue/index.js +1 -1
  161. package/lib/commands/issue/nudge.js +1 -1
  162. package/lib/commands/issue/report.js +1 -1
  163. package/lib/commands/issue/shared.js +1 -1
  164. package/lib/commands/kb/create.js +1 -1
  165. package/lib/commands/kb/delete.js +1 -1
  166. package/lib/commands/kb/detail.js +1 -1
  167. package/lib/commands/kb/index.js +1 -1
  168. package/lib/commands/kb/list.js +1 -1
  169. package/lib/commands/kb/search.js +1 -1
  170. package/lib/commands/kb/shared.js +1 -1
  171. package/lib/commands/kb/update.js +1 -1
  172. package/lib/commands/logs/index.js +1 -1
  173. package/lib/commands/menu/asset-update.js +1 -1
  174. package/lib/commands/menu/delete.js +1 -1
  175. package/lib/commands/menu/external-link-create.js +1 -1
  176. package/lib/commands/menu/external-link-update.js +1 -1
  177. package/lib/commands/menu/group-create.js +1 -1
  178. package/lib/commands/menu/group-update.js +1 -1
  179. package/lib/commands/menu/index.js +1 -1
  180. package/lib/commands/menu/list.js +1 -1
  181. package/lib/commands/menu/move.js +1 -1
  182. package/lib/commands/menu/regroup-start.js +1 -1
  183. package/lib/commands/menu/rename.js +1 -1
  184. package/lib/commands/menu/shared/compare-table.js +1 -1
  185. package/lib/commands/menu/shared/delete-plan.js +1 -1
  186. package/lib/commands/menu/shared/facts.js +1 -1
  187. package/lib/commands/menu/shared/index.js +1 -1
  188. package/lib/commands/menu/shared/inquirer.js +1 -1
  189. package/lib/commands/menu/shared/local-pages.js +1 -1
  190. package/lib/commands/menu/shared/logic.js +1 -1
  191. package/lib/commands/menu/shared/mutations.js +1 -1
  192. package/lib/commands/menu/shared/path.js +1 -1
  193. package/lib/commands/menu/shared/service.js +1 -1
  194. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  195. package/lib/commands/menu/shared/sync-core.js +1 -1
  196. package/lib/commands/menu/shared/update-core.js +1 -1
  197. package/lib/commands/menu/shared/valid-url.js +1 -1
  198. package/lib/commands/menu/subapp-assets-status.js +1 -1
  199. package/lib/commands/menu/subapp-assets-update.js +1 -1
  200. package/lib/commands/menu/sync.js +1 -1
  201. package/lib/commands/menu/visibility-update.js +1 -1
  202. package/lib/commands/notification/config-create.js +1 -1
  203. package/lib/commands/notification/config-delete.js +1 -1
  204. package/lib/commands/notification/config-list.js +1 -1
  205. package/lib/commands/notification/config-update.js +1 -1
  206. package/lib/commands/notification/index.js +1 -1
  207. package/lib/commands/notification/shared.js +1 -1
  208. package/lib/commands/ocr/index.js +1 -1
  209. package/lib/commands/page/create.js +1 -1
  210. package/lib/commands/page/custom/detail.js +1 -1
  211. package/lib/commands/page/custom/list.js +1 -1
  212. package/lib/commands/page/custom/publish.js +1 -1
  213. package/lib/commands/page/custom/shared.js +1 -1
  214. package/lib/commands/page/custom/syntax.js +1 -1
  215. package/lib/commands/page/custom/update.js +1 -1
  216. package/lib/commands/page/data-list-status.js +1 -1
  217. package/lib/commands/page/generate-start.js +1 -1
  218. package/lib/commands/page/generate-status.js +1 -1
  219. package/lib/commands/page/index.js +1 -1
  220. package/lib/commands/page/pull.js +1 -1
  221. package/lib/commands/page/push.js +1 -1
  222. package/lib/commands/page/relation-audit.js +1 -1
  223. package/lib/commands/page/restore.js +1 -1
  224. package/lib/commands/page/shared.js +1 -1
  225. package/lib/commands/page/sync.js +1 -1
  226. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  227. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  228. package/lib/commands/project/create/format-elapsed.js +1 -1
  229. package/lib/commands/project/create/main.js +1 -1
  230. package/lib/commands/project/create/materialize-project-template.js +1 -1
  231. package/lib/commands/project/create/project-name.js +1 -1
  232. package/lib/commands/project/create/project-template-archive.js +1 -1
  233. package/lib/commands/project/create/project-template-path.js +1 -1
  234. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  235. package/lib/commands/project/create/use-format-code.js +1 -1
  236. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  237. package/lib/commands/project/domain-routing-sync.js +1 -1
  238. package/lib/commands/project/index.js +1 -1
  239. package/lib/commands/project/upgrade.js +1 -1
  240. package/lib/commands/registry.js +1 -1
  241. package/lib/commands/role/delete.js +1 -1
  242. package/lib/commands/role/detail.js +1 -1
  243. package/lib/commands/role/index.js +1 -1
  244. package/lib/commands/role/list.js +1 -1
  245. package/lib/commands/role/shared.js +1 -1
  246. package/lib/commands/role/update.js +1 -1
  247. package/lib/commands/role/user-add.js +1 -1
  248. package/lib/commands/role/user-remove.js +1 -1
  249. package/lib/commands/role/user-resolve.js +1 -1
  250. package/lib/commands/rule/get.js +1 -1
  251. package/lib/commands/rule/index.js +1 -1
  252. package/lib/commands/rule/list.js +1 -1
  253. package/lib/commands/rule/set.js +1 -1
  254. package/lib/commands/rule/shared.js +1 -1
  255. package/lib/commands/run/index.js +1 -1
  256. package/lib/commands/schema.js +1 -1
  257. package/lib/commands/sql/create.js +1 -1
  258. package/lib/commands/sql/delete.js +1 -1
  259. package/lib/commands/sql/detail.js +1 -1
  260. package/lib/commands/sql/exec.js +1 -1
  261. package/lib/commands/sql/index.js +1 -1
  262. package/lib/commands/sql/list.js +1 -1
  263. package/lib/commands/sql/pull.js +1 -1
  264. package/lib/commands/sql/push.js +1 -1
  265. package/lib/commands/sql/shared.js +1 -1
  266. package/lib/commands/sql/status.js +1 -1
  267. package/lib/commands/sql/validate.js +1 -1
  268. package/lib/commands/task/index.js +1 -1
  269. package/lib/commands/task/status.js +1 -1
  270. package/lib/commands/tenant/index.js +1 -1
  271. package/lib/commands/tenant/members-list.js +1 -1
  272. package/lib/commands/tenant/shared.js +1 -1
  273. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  274. package/lib/commands/user-account/feishu-bind.js +1 -1
  275. package/lib/commands/user-account/index.js +1 -1
  276. package/lib/commands/workspace/add.js +1 -1
  277. package/lib/commands/workspace/index.js +1 -1
  278. package/lib/commands/workspace/remove.js +1 -1
  279. package/lib/config/domain-config.js +1 -1
  280. package/lib/config/project-domain-routing.js +1 -1
  281. package/lib/config/region-config.js +1 -1
  282. package/lib/config/schema.js +1 -1
  283. package/lib/constant/cdn.js +1 -1
  284. package/lib/constant/cli.js +1 -1
  285. package/lib/constant/defaults.js +1 -1
  286. package/lib/constant/domain.js +1 -1
  287. package/lib/constant/env.js +1 -1
  288. package/lib/constant/output.js +1 -1
  289. package/lib/constant/paths.js +1 -1
  290. package/lib/constant/region.js +1 -1
  291. package/lib/constant/risk.js +1 -1
  292. package/lib/constant/routing-profile.js +1 -1
  293. package/lib/context/app-resolver.js +1 -1
  294. package/lib/context/auth-resolver.js +1 -1
  295. package/lib/context/config-loader.js +1 -1
  296. package/lib/context.js +1 -1
  297. package/lib/core/alias-resolver.js +1 -1
  298. package/lib/core/api-client.d.ts +37 -6
  299. package/lib/core/api-client.js +1 -1
  300. package/lib/core/bff/config.js +1 -1
  301. package/lib/core/bff/file-system.js +1 -1
  302. package/lib/core/bff/hash.js +1 -1
  303. package/lib/core/bff/hook-directory.js +1 -1
  304. package/lib/core/bff/lock.js +1 -1
  305. package/lib/core/bff/utils.js +1 -1
  306. package/lib/core/cross-db-analysis.js +1 -1
  307. package/lib/core/cross-db-relation.js +1 -1
  308. package/lib/core/db-resolver.js +1 -1
  309. package/lib/core/flow-config.d.ts +12 -0
  310. package/lib/core/flow-config.js +1 -1
  311. package/lib/core/instant-api-policy/config.js +1 -1
  312. package/lib/core/kb-search-client.js +1 -1
  313. package/lib/core/page/file-system.js +1 -1
  314. package/lib/core/page/hash.js +1 -1
  315. package/lib/core/page/lock.js +1 -1
  316. package/lib/core/page/lr-smart-jsx.js +1 -1
  317. package/lib/core/sql-index-auditor.js +1 -1
  318. package/lib/core/sql-sync/config.js +1 -1
  319. package/lib/core/sql-sync/file-system.js +1 -1
  320. package/lib/core/sql-sync/hash.js +1 -1
  321. package/lib/core/sql-sync/lock.js +1 -1
  322. package/lib/core/sql-sync/utils.js +1 -1
  323. package/lib/core/sql-validator.js +1 -1
  324. package/lib/errors.js +1 -1
  325. package/lib/framework/build-all-flags.js +1 -1
  326. package/lib/framework/error-output.js +1 -1
  327. package/lib/framework/explicit-yes.js +1 -1
  328. package/lib/framework/flags.js +1 -1
  329. package/lib/framework/help.js +1 -1
  330. package/lib/framework/index.js +1 -1
  331. package/lib/framework/output.js +1 -1
  332. package/lib/framework/response.js +1 -1
  333. package/lib/framework/runner-alias.js +1 -1
  334. package/lib/framework/runner.js +1 -1
  335. package/lib/framework/schema-export.js +1 -1
  336. package/lib/framework/supported-flags.js +1 -1
  337. package/lib/framework/types.js +1 -1
  338. package/lib/generated/build-info.d.ts +4 -4
  339. package/lib/generated/build-info.js +1 -1
  340. package/lib/generated/official-routing.js +1 -1
  341. package/lib/generated/routing-contract.js +1 -1
  342. package/lib/help.js +1 -1
  343. package/lib/postinstall.js +1 -1
  344. package/lib/runtime/confirmation.js +1 -1
  345. package/lib/runtime/event.js +1 -1
  346. package/lib/runtime/index.js +1 -1
  347. package/lib/runtime/queue.js +1 -1
  348. package/lib/runtime/resolve.js +1 -1
  349. package/lib/services/dataset-design/checkpoint.d.ts +17 -0
  350. package/lib/services/dataset-design/checkpoint.js +1 -0
  351. package/lib/services/dataset-design/commands.d.ts +6 -0
  352. package/lib/services/dataset-design/commands.js +1 -0
  353. package/lib/services/dataset-design/contract.d.ts +7 -0
  354. package/lib/services/dataset-design/contract.js +1 -0
  355. package/lib/skills/builtin-skill.js +1 -1
  356. package/lib/skills/main.js +1 -1
  357. package/lib/skills/npx-skills-add.js +1 -1
  358. package/lib/skills/skill-presence.js +1 -1
  359. package/lib/telemetry/cli-command-trace.js +1 -1
  360. package/lib/telemetry/cli-help-trace.js +1 -1
  361. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  362. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  363. package/lib/telemetry/send-cli-trace-log.js +1 -1
  364. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  365. package/lib/utils/ai_config.js +1 -1
  366. package/lib/utils/apply-jq-filter.js +1 -1
  367. package/lib/utils/cdn-config.js +1 -1
  368. package/lib/utils/check-sdk-version.js +1 -1
  369. package/lib/utils/cli-version-check.js +1 -1
  370. package/lib/utils/cli-version-policy.js +1 -1
  371. package/lib/utils/config.js +1 -1
  372. package/lib/utils/entity-with-id.js +1 -1
  373. package/lib/utils/file-utils.js +1 -1
  374. package/lib/utils/guides-cdn.js +1 -1
  375. package/lib/utils/http-client.js +1 -1
  376. package/lib/utils/is-non-interactive.js +1 -1
  377. package/lib/utils/logger.js +1 -1
  378. package/lib/utils/params.js +1 -1
  379. package/lib/utils/platform.js +1 -1
  380. package/lib/utils/sleep.js +1 -1
  381. package/lib/utils/template-replacer.js +1 -1
  382. package/lib/utils/update-notice.js +1 -1
  383. package/lib/utils/version.js +1 -1
  384. package/lib/utils/with-active-cookie.js +1 -1
  385. package/lib/utils/write-cli-side-channel.js +1 -1
  386. package/package.json +3 -2
  387. package/skills/rabetbase/SKILL.md +11 -7
  388. package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
  389. package/skills/rabetbase/guides/backend-function.md +26 -4
  390. package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
  391. package/skills/rabetbase/guides/cross-database-bff.md +1 -0
  392. package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
  393. package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
  394. package/skills/rabetbase/guides/flow-config-examples.md +75 -0
  395. package/skills/rabetbase/guides/form-flow-start.md +61 -0
  396. package/skills/rabetbase/guides/typescript-sdk.md +1 -1
  397. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
  398. package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
  399. package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
  400. package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
  401. package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
  402. package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
  403. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
  404. package/skills/rabetbase/references/rabetbase-kb.md +4 -1
  405. package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
  406. package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
  407. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  408. package/skills/rabetbase.manifest.json +6 -3
@@ -1 +1 @@
1
- function a184_0x1eb4(){const _0x43cdbd=['Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','visible','update\x20visibility\x20for','Menu\x20visibility\x20update\x20completed:\x20','paths','/smartapi/menu/update','expectVisible','message','modelType','menu_selector_ambiguous','childrenIds','path','string','num','pageType','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20changed\x20unexpectedly.','\x20skipped,\x20','update-recovery','split','Menu\x20','url','trim','verification','some','rawFlags','true','1419929OhykTh','update-menu-visibility','verify\x20menu\x20visibility\x20update','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','updated','expected-count','Updated\x20visibility\x20for\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','str','Selected\x20','10330EpRxbv','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_permission_denied','update','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','resources','menu_verification_failed','\x20menu(s),\x20expected\x20','6bRJuoX','write','type','boolean','menu\x20list','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','isSafeInteger','menu','1081522Teruhx','Menu\x20path\x20selector\x20not\x20found:\x20','sort','visibility-update','label','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','filter','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','byId','update\x20menu\x20visibility','flagMissing','before','beforeById','datasetId','parentId','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','map','set','appCode','number','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','length','targets','join','get','30aCuJlx','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','validation','menu_expected_count_mismatch','expect-visible','false','menu-ids','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','warnings','21410928Tnjznu','3994424DlSMch','code','datasetCode','menu_selector_not_found','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','pageId','\x20visibility\x20update\x20could\x20not\x20be\x20verified','push','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','childrenCount','plannedActions','\x20updated,\x20','POST','rabetbase\x20menu\x20list\x20--format\x20compress','2369884WNNgHL','\x20menu(s);\x20skip\x20','expectedCount','resourcesValid','menu_state_drift','depth','\x20must\x20be\x20true\x20or\x20false.','isArray','stringify','plan','Menu\x20id\x20selector(s)\x20not\x20found:\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','body','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','187445wKBVNu','failed'];a184_0x1eb4=function(){return _0x43cdbd;};return a184_0x1eb4();}const a184_0xe5d20c=a184_0x4117;(function(_0x210354,_0x4c2f49){const _0x4fd91c=a184_0x4117,_0x845f23=_0x210354();while(!![]){try{const _0x4447cc=parseInt(_0x4fd91c(0x186))/0x1+parseInt(_0x4fd91c(0x144))/0x2*(-parseInt(_0x4fd91c(0x13c))/0x3)+-parseInt(_0x4fd91c(0x177))/0x4+-parseInt(_0x4fd91c(0x1ad))/0x5*(parseInt(_0x4fd91c(0x15d))/0x6)+parseInt(_0x4fd91c(0x1a3))/0x7+-parseInt(_0x4fd91c(0x167))/0x8+parseInt(_0x4fd91c(0x166))/0x9;if(_0x4447cc===_0x4c2f49)break;else _0x845f23['push'](_0x845f23['shift']());}catch(_0x1cecae){_0x845f23['push'](_0x845f23['shift']());}}}(a184_0x1eb4,0x8efba));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a184_0xe5d20c(0x175),'path':a184_0xe5d20c(0x18d)}];export const menuVisibilityUpdate={'service':a184_0xe5d20c(0x143),'command':a184_0xe5d20c(0x147),'description':a184_0xe5d20c(0x197),'risk':a184_0xe5d20c(0x13d),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a184_0xe5d20c(0x1ae)},{'name':'paths','type':a184_0xe5d20c(0x194),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a184_0xe5d20c(0x13f),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a184_0xe5d20c(0x161),'type':a184_0xe5d20c(0x13f),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a184_0xe5d20c(0x1a8),'type':a184_0xe5d20c(0x157),'description':a184_0xe5d20c(0x158)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x55d8e2){parseInput(_0x55d8e2);},async 'dryRun'(_0x3e526c){const _0x32c26f=a184_0xe5d20c,_0x51b040=await buildPlan(_0x3e526c,!![]),_0x20b004=_0x51b040[_0x32c26f(0x180)][_0x32c26f(0x173)]?.[_0x32c26f(0x159)]??0x0,_0xfe29f7=_0x51b040['plan'][_0x32c26f(0x15a)][_0x32c26f(0x159)]-_0x20b004;return menuDryRunResult(_0x51b040[_0x32c26f(0x180)],{'method':_0x32c26f(0x175),'url':'/smartapi/menu/update','body':{'updates':_0x51b040[_0x32c26f(0x180)][_0x32c26f(0x173)]?.[_0x32c26f(0x154)](_0x1e20bf=>_0x1e20bf[_0x32c26f(0x184)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x20b004+_0x32c26f(0x178)+_0xfe29f7+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x3c91aa){const _0x460e78=a184_0xe5d20c,_0x4e30d2=await buildPlan(_0x3c91aa,![]);await recheckMutationSnapshot(_0x3c91aa,_0x4e30d2[_0x460e78(0x180)],_0x460e78(0x14d));const _0x34dd05=[],_0x17c7ec=[],_0x20ae7b=[];for(const _0x30b628 of _0x4e30d2[_0x460e78(0x180)][_0x460e78(0x15a)]){if(_0x30b628['before'][_0x460e78(0x189)]===_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x16b)]){_0x34dd05[_0x460e78(0x170)]({'id':_0x30b628['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3c91aa['appCode'],_0x3c91aa['cookie'],{'id':_0x30b628['id'],'visible':_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x16b)]}),_0x34dd05[_0x460e78(0x170)]({'id':_0x30b628['id'],'updated':!![],'skipped':![]});}catch(_0x3912ba){const _0x195eee=mapMenuApiError(_0x3912ba,_0x460e78(0x18a),_0x30b628['id']);if(isMenuResponseLoss(_0x3912ba)&&_0x195eee[_0x460e78(0x168)]!==_0x460e78(0x1b0)){_0x20ae7b[_0x460e78(0x170)](_0x30b628['id']);continue;}_0x17c7ec[_0x460e78(0x170)]({'id':_0x30b628['id'],'stage':_0x460e78(0x1b1),'code':_0x195eee['code'],'message':_0x195eee[_0x460e78(0x18f)]});}}let _0x25eafa;try{_0x25eafa=await fetchMenuSnapshot(_0x3c91aa[_0x460e78(0x156)],_0x3c91aa['cookie']);}catch(_0x4bb060){const _0x48434c=describeMenuErrorCause(_0x4bb060,_0x460e78(0x1a5)),_0x285c44=_0x20ae7b['map'](_0x333589=>({'id':_0x333589,'stage':'update-recovery','code':_0x460e78(0x1b5),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x333589+_0x460e78(0x185),'requestedStateConfirmed':![],'recovered':![]})),_0x175922={'stage':_0x460e78(0x19f),'code':'menu_verification_failed','message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x15a)][_0x460e78(0x154)](_0x448fef=>_0x448fef['id']),'requestedStateConfirmed':![],..._0x48434c};throw menuFailure(asVerificationError(_0x4bb060,_0x460e78(0x1a6)),_0x4e30d2[_0x460e78(0x180)],{'stage':_0x460e78(0x19f),'succeeded':_0x34dd05,'failedRecords':[..._0x17c7ec,..._0x285c44,_0x175922],'warnings':[_0x460e78(0x1b2)],'verification':{'status':_0x460e78(0x187),'recoveredCount':0x0,'lookupCommand':_0x460e78(0x176)}});}const _0x5e0aa0=[];for(const _0x2f5940 of _0x34dd05){const _0x45d0cc=Number(_0x2f5940['id']),_0x1c91fd=_0x4e30d2[_0x460e78(0x150)][_0x460e78(0x15c)](_0x45d0cc),_0x2b2064=_0x25eafa[_0x460e78(0x14c)][_0x460e78(0x15c)](_0x45d0cc);try{verifyVisibilityUpdate(_0x1c91fd,_0x2b2064,_0x4e30d2[_0x460e78(0x180)]['requestedVisible']);}catch(_0xc4fa85){const _0x13e692=asVerificationError(_0xc4fa85,'Menu\x20'+_0x45d0cc+_0x460e78(0x16f));_0x5e0aa0[_0x460e78(0x170)]({'id':_0x45d0cc,'stage':'verification','code':_0x13e692[_0x460e78(0x168)],'message':_0x13e692['message'],'requestedStateConfirmed':![]});}}for(const _0x3d07ba of _0x20ae7b){const _0x23e23e=_0x4e30d2[_0x460e78(0x150)][_0x460e78(0x15c)](_0x3d07ba),_0x947609=_0x25eafa[_0x460e78(0x14c)][_0x460e78(0x15c)](_0x3d07ba);try{verifyVisibilityUpdate(_0x23e23e,_0x947609,_0x4e30d2[_0x460e78(0x180)]['requestedVisible']),_0x34dd05[_0x460e78(0x170)]({'id':_0x3d07ba,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x6d3f28){const _0x48ff56=asVerificationError(_0x6d3f28,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x3d07ba+_0x460e78(0x16c));_0x5e0aa0[_0x460e78(0x170)]({'id':_0x3d07ba,'stage':_0x460e78(0x19a),'code':_0x48ff56[_0x460e78(0x168)],'message':_0x48ff56[_0x460e78(0x18f)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5e0aa0['length']>0x0){const _0x2aabc4=_0x5e0aa0['map'](_0x3b29b2=>Number(_0x3b29b2['id'])),_0x505f1b=_0x34dd05['filter'](_0x37a6f1=>_0x37a6f1['recovered']===!![])[_0x460e78(0x159)],_0xa028db=menuError(_0x460e78(0x1b5),_0x460e78(0x164)+_0x2aabc4['join'](',\x20')+'.',_0x460e78(0x1b3));throw menuFailure(_0xa028db,_0x4e30d2[_0x460e78(0x180)],{'stage':_0x460e78(0x19f),'succeeded':_0x34dd05,'failedRecords':[..._0x17c7ec,..._0x5e0aa0],'warnings':[_0x460e78(0x182)],'verification':{'status':'failed',..._0x2aabc4[_0x460e78(0x159)]===0x1?{'targetId':_0x2aabc4[0x0]}:{'targetIds':_0x2aabc4},'recoveredCount':_0x505f1b,'lookupCommand':_0x460e78(0x176)}});}const _0x4cd6fd=_0x34dd05[_0x460e78(0x14a)](_0x5c5f91=>_0x5c5f91[_0x460e78(0x1a7)]===!![])['length'],_0x1d9575=_0x34dd05['length']-_0x4cd6fd,_0x26823b={..._0x4e30d2[_0x460e78(0x180)],'succeeded':_0x34dd05,'failed':_0x17c7ec,'warnings':_0x17c7ec[_0x460e78(0x159)]>0x0?[..._0x4e30d2[_0x460e78(0x180)]['warnings'],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x4e30d2['plan'][_0x460e78(0x165)],'verification':{'checkedBy':_0x460e78(0x140),'snapshotHash':_0x25eafa['hash'],'matchesRequestedState':_0x17c7ec[_0x460e78(0x159)]===0x0,'recoveredCount':_0x20ae7b[_0x460e78(0x159)]}};return{'ok':_0x17c7ec[_0x460e78(0x159)]===0x0,'data':_0x26823b,'message':_0x17c7ec[_0x460e78(0x159)]===0x0?_0x460e78(0x1a9)+_0x4cd6fd+'\x20menu(s);\x20skipped\x20'+_0x1d9575+'\x20unchanged\x20menu(s).':_0x460e78(0x18b)+_0x4cd6fd+_0x460e78(0x174)+_0x1d9575+_0x460e78(0x199)+_0x17c7ec['length']+'\x20failed.'};}};function parseInput(_0xa85dd9){const _0x588860=a184_0xe5d20c,_0x291fc9=parseMenuIds(_0xa85dd9[_0x588860(0x1ab)](_0x588860(0x163))),_0x3e4560=parseCsv(_0xa85dd9[_0x588860(0x1ab)](_0x588860(0x18c)));if(_0x291fc9[_0x588860(0x159)]===0x0&&_0x3e4560[_0x588860(0x159)]===0x0)throw CliErrors[_0x588860(0x15f)](_0x588860(0x149));const _0x2d9011=parseBooleanFlag(_0xa85dd9,_0x588860(0x189),!![]),_0x1e1ab0=parseBooleanFlag(_0xa85dd9,_0x588860(0x161),![]);let _0x2067dd;if(hasFlag(_0xa85dd9,_0x588860(0x1a8))){_0x2067dd=_0xa85dd9[_0x588860(0x195)]('expected-count');if(!Number[_0x588860(0x142)](_0x2067dd)||_0x2067dd<0x0)throw CliErrors[_0x588860(0x15f)](_0x588860(0x153));}return{'menuIds':_0x291fc9,'paths':_0x3e4560,'visible':_0x2d9011,'expectVisible':_0x1e1ab0,'expectedCount':_0x2067dd};}async function buildPlan(_0x2e8a9f,_0x4df56f){const _0x5f59de=a184_0xe5d20c,_0x210c94=parseInput(_0x2e8a9f),_0x40256f=await fetchMutationSnapshot(_0x2e8a9f,_0x5f59de(0x14d)),_0x5dac36=selectTargets(_0x40256f['menus'],_0x210c94['menuIds'],_0x210c94[_0x5f59de(0x18c)]);if(_0x210c94[_0x5f59de(0x179)]!==undefined&&_0x5dac36['length']!==_0x210c94[_0x5f59de(0x179)])throw menuError(_0x5f59de(0x160),_0x5f59de(0x1ac)+_0x5dac36[_0x5f59de(0x159)]+_0x5f59de(0x13b)+_0x210c94['expectedCount']+'.',_0x5f59de(0x1aa));if(_0x210c94['expectVisible']!==undefined){const _0x1abd82=_0x5dac36[_0x5f59de(0x14a)](_0x3fe206=>_0x3fe206[_0x5f59de(0x189)]!==_0x210c94[_0x5f59de(0x18e)]);if(_0x1abd82['length']>0x0)throw menuError(_0x5f59de(0x17b),_0x5f59de(0x188)+_0x1abd82[_0x5f59de(0x154)](_0x153a39=>_0x153a39['id'])[_0x5f59de(0x15b)](',\x20')+'.',_0x5f59de(0x14b));}const _0x2b1233=_0x5dac36[_0x5f59de(0x154)](_0x40ba06=>({'id':_0x40ba06['id'],'label':_0x40ba06[_0x5f59de(0x148)],'path':_0x40ba06[_0x5f59de(0x193)],'before':{'visible':_0x40ba06[_0x5f59de(0x189)]},'after':{'visible':_0x210c94[_0x5f59de(0x189)]}})),_0x22f172=_0x2b1233['filter'](_0x149cbf=>_0x149cbf[_0x5f59de(0x14f)]['visible']!==_0x210c94[_0x5f59de(0x189)])[_0x5f59de(0x154)](_0x34719b=>({'stage':_0x5f59de(0x1a4),'method':_0x5f59de(0x175),'path':'/smartapi/menu/update','body':{'appCode':_0x2e8a9f[_0x5f59de(0x156)],'id':_0x34719b['id'],'visible':_0x210c94[_0x5f59de(0x189)]}})),_0x2e4e70=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x210c94['menuIds'],'paths':_0x210c94['paths']},'before':{'menus':_0x5dac36['map'](_0x5a43ce=>({'id':_0x5a43ce['id'],'path':_0x5a43ce[_0x5f59de(0x193)],'visible':_0x5a43ce[_0x5f59de(0x189)]}))},'after':{'menus':_0x5dac36[_0x5f59de(0x154)](_0x315ea0=>({'id':_0x315ea0['id'],'path':_0x315ea0[_0x5f59de(0x193)],'visible':_0x210c94['visible']}))},'dryRun':_0x4df56f,'backend':[...BACKEND],'plannedActions':_0x22f172,'snapshotHash':_0x40256f['hash'],'warnings':_0x22f172[_0x5f59de(0x159)]===0x0?[_0x5f59de(0x16d)]:[]});return{'plan':{..._0x2e4e70,'requestedVisible':_0x210c94[_0x5f59de(0x189)],'targets':_0x2b1233},'beforeById':new Map(_0x5dac36['map'](_0xe258e4=>[_0xe258e4['id'],_0xe258e4]))};}function selectTargets(_0x2e1b8a,_0x14f326,_0x4baecd){const _0x30247b=a184_0xe5d20c,_0x461e42=new Map(_0x2e1b8a[_0x30247b(0x154)](_0x3d11d0=>[_0x3d11d0['id'],_0x3d11d0])),_0x15714e=new Map(),_0xd8b951=_0x14f326[_0x30247b(0x14a)](_0x46d28a=>!_0x461e42['has'](_0x46d28a));if(_0xd8b951['length']>0x0)throw menuError(_0x30247b(0x16a),_0x30247b(0x181)+_0xd8b951['join'](',\x20')+'.',_0x30247b(0x183));for(const _0x410e3a of _0x14f326){_0x15714e['set'](_0x410e3a,_0x461e42['get'](_0x410e3a));}for(const _0x21b6d6 of _0x4baecd){const _0x29cd81=_0x2e1b8a['filter'](_0x42f128=>_0x42f128['path']===_0x21b6d6);if(_0x29cd81[_0x30247b(0x159)]===0x0)throw menuError(_0x30247b(0x16a),_0x30247b(0x145)+JSON[_0x30247b(0x17f)](_0x21b6d6)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x29cd81[_0x30247b(0x159)]>0x1)throw menuError(_0x30247b(0x191),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x30247b(0x17f)](_0x21b6d6)+'.',_0x30247b(0x15e)+_0x29cd81[_0x30247b(0x154)](_0x10ece6=>_0x10ece6['id'])[_0x30247b(0x15b)](',\x20')+'.');const _0x2e7c32=_0x29cd81[0x0];_0x15714e[_0x30247b(0x155)](_0x2e7c32['id'],_0x2e7c32);}return[..._0x15714e['values']()];}function parseMenuIds(_0x56f6e9){const _0x58660d=a184_0xe5d20c,_0x16a76a=parseCsv(_0x56f6e9),_0x3adb7f=_0x16a76a[_0x58660d(0x154)](Number);if(_0x3adb7f[_0x58660d(0x1a0)](_0x4cb302=>!Number[_0x58660d(0x142)](_0x4cb302)||_0x4cb302<=0x0))throw CliErrors['validation'](_0x58660d(0x1af));return[...new Set(_0x3adb7f)];}function parseCsv(_0x8fc6f){const _0x5b0aff=a184_0xe5d20c;return[...new Set(_0x8fc6f[_0x5b0aff(0x19b)](',')[_0x5b0aff(0x154)](_0x15bfa5=>_0x15bfa5[_0x5b0aff(0x19e)]())[_0x5b0aff(0x14a)](Boolean))];}function a184_0x4117(_0x102448,_0x2d9847){_0x102448=_0x102448-0x13b;const _0x1eb47c=a184_0x1eb4();let _0x411706=_0x1eb47c[_0x102448];return _0x411706;}function parseBooleanFlag(_0xb1faca,_0x5cec03,_0x137295){const _0x3d987d=a184_0xe5d20c;if(!hasFlag(_0xb1faca,_0x5cec03)){if(_0x137295)throw CliErrors[_0x3d987d(0x14e)](_0x5cec03);return undefined;}const _0xd03101=_0xb1faca[_0x3d987d(0x1a1)][_0x5cec03];if(_0xd03101===!![]||_0xd03101===![])return _0xd03101;if(_0xd03101===_0x3d987d(0x1a2))return!![];if(_0xd03101===_0x3d987d(0x162))return![];throw CliErrors[_0x3d987d(0x15f)]('--'+_0x5cec03+_0x3d987d(0x17d));}function verifyVisibilityUpdate(_0x3aaf12,_0x172a10,_0x4e5cdf){const _0x4f5c85=a184_0xe5d20c;assertVerified(!!_0x172a10,'Menu\x20'+_0x3aaf12['id']+_0x4f5c85(0x171)),assertVerified(_0x172a10[_0x4f5c85(0x189)]===_0x4e5cdf,_0x4f5c85(0x19c)+_0x3aaf12['id']+_0x4f5c85(0x141));const _0x25220c=[['id',_0x172a10['id'],_0x3aaf12['id']],[_0x4f5c85(0x152),_0x172a10[_0x4f5c85(0x152)],_0x3aaf12[_0x4f5c85(0x152)]],[_0x4f5c85(0x17c),_0x172a10[_0x4f5c85(0x17c)],_0x3aaf12[_0x4f5c85(0x17c)]],[_0x4f5c85(0x148),_0x172a10[_0x4f5c85(0x148)],_0x3aaf12['label']],['path',_0x172a10[_0x4f5c85(0x193)],_0x3aaf12[_0x4f5c85(0x193)]],[_0x4f5c85(0x19d),_0x172a10[_0x4f5c85(0x19d)],_0x3aaf12['url']],['type',_0x172a10[_0x4f5c85(0x13e)],_0x3aaf12['type']],[_0x4f5c85(0x146),_0x172a10[_0x4f5c85(0x146)],_0x3aaf12[_0x4f5c85(0x146)]],[_0x4f5c85(0x1b4),_0x172a10['resources'],_0x3aaf12[_0x4f5c85(0x1b4)]],[_0x4f5c85(0x17a),_0x172a10[_0x4f5c85(0x17a)],_0x3aaf12[_0x4f5c85(0x17a)]],[_0x4f5c85(0x192),_0x172a10[_0x4f5c85(0x192)],_0x3aaf12[_0x4f5c85(0x192)]],[_0x4f5c85(0x172),_0x172a10[_0x4f5c85(0x172)],_0x3aaf12['childrenCount']],[_0x4f5c85(0x16e),_0x172a10[_0x4f5c85(0x16e)],_0x3aaf12['pageId']],[_0x4f5c85(0x196),_0x172a10['pageType'],_0x3aaf12['pageType']],[_0x4f5c85(0x190),_0x172a10[_0x4f5c85(0x190)],_0x3aaf12[_0x4f5c85(0x190)]],[_0x4f5c85(0x151),_0x172a10[_0x4f5c85(0x151)],_0x3aaf12[_0x4f5c85(0x151)]],[_0x4f5c85(0x169),_0x172a10[_0x4f5c85(0x169)],_0x3aaf12['datasetCode']]];for(const [_0x38ef23,_0x414c42,_0x4dcb6c]of _0x25220c){assertVerified(sameValue(_0x414c42,_0x4dcb6c),_0x4f5c85(0x19c)+_0x3aaf12['id']+'\x20'+_0x38ef23+_0x4f5c85(0x198));}}function sameValue(_0x27519b,_0x3662f2){const _0x318668=a184_0xe5d20c;if(Array[_0x318668(0x17e)](_0x27519b)||Array[_0x318668(0x17e)](_0x3662f2))return JSON[_0x318668(0x17f)](_0x27519b)===JSON[_0x318668(0x17f)](_0x3662f2);return _0x27519b===_0x3662f2;}
1
+ const a191_0x351d3e=a191_0x5427;(function(_0xb85bbe,_0x53913a){const _0x5a6845=a191_0x5427,_0x31c357=_0xb85bbe();while(!![]){try{const _0x485e29=-parseInt(_0x5a6845(0x228))/0x1+-parseInt(_0x5a6845(0x1cf))/0x2*(-parseInt(_0x5a6845(0x232))/0x3)+parseInt(_0x5a6845(0x21b))/0x4*(parseInt(_0x5a6845(0x22c))/0x5)+parseInt(_0x5a6845(0x217))/0x6*(parseInt(_0x5a6845(0x20e))/0x7)+-parseInt(_0x5a6845(0x1ff))/0x8+parseInt(_0x5a6845(0x1c6))/0x9+-parseInt(_0x5a6845(0x206))/0xa*(parseInt(_0x5a6845(0x233))/0xb);if(_0x485e29===_0x53913a)break;else _0x31c357['push'](_0x31c357['shift']());}catch(_0x402b02){_0x31c357['push'](_0x31c357['shift']());}}}(a191_0x45bb,0xed85a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x351d3e(0x21c),'path':a191_0x351d3e(0x204)}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x351d3e(0x1f2),'description':a191_0x351d3e(0x208),'risk':a191_0x351d3e(0x1e7),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a191_0x351d3e(0x235)},{'name':'paths','type':'string','description':a191_0x351d3e(0x1cd)},{'name':a191_0x351d3e(0x1ec),'type':a191_0x351d3e(0x202),'required':!![],'description':a191_0x351d3e(0x1d6)},{'name':a191_0x351d3e(0x212),'type':a191_0x351d3e(0x202),'description':a191_0x351d3e(0x1c4)},{'name':a191_0x351d3e(0x1e8),'type':'number','description':a191_0x351d3e(0x224)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36dc46){parseInput(_0x36dc46);},async 'dryRun'(_0x3399ec){const _0x2dc83d=a191_0x351d3e,_0x69925c=await buildPlan(_0x3399ec,!![]),_0x40e356=_0x69925c['plan'][_0x2dc83d(0x214)]?.['length']??0x0,_0x59cda7=_0x69925c[_0x2dc83d(0x1ee)]['targets'][_0x2dc83d(0x1bd)]-_0x40e356;return menuDryRunResult(_0x69925c[_0x2dc83d(0x1ee)],{'method':_0x2dc83d(0x21c),'url':'/smartapi/menu/update','body':{'updates':_0x69925c[_0x2dc83d(0x1ee)][_0x2dc83d(0x214)]?.['map'](_0x1d9af5=>_0x1d9af5[_0x2dc83d(0x1d5)])??[]},'description':_0x2dc83d(0x1f3)+_0x40e356+_0x2dc83d(0x22f)+_0x59cda7+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x390ad9){const _0x9b6307=a191_0x351d3e,_0x468250=await buildPlan(_0x390ad9,![]);await recheckMutationSnapshot(_0x390ad9,_0x468250[_0x9b6307(0x1ee)],_0x9b6307(0x22b));const _0x31025e=[],_0x4e0e49=[],_0x3ccf9b=[];for(const _0x2ac94e of _0x468250['plan']['targets']){if(_0x2ac94e[_0x9b6307(0x236)][_0x9b6307(0x1ec)]===_0x468250['plan']['requestedVisible']){_0x31025e[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x390ad9[_0x9b6307(0x1eb)],_0x390ad9[_0x9b6307(0x21a)],{'id':_0x2ac94e['id'],'visible':_0x468250['plan']['requestedVisible']}),_0x31025e[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'updated':!![],'skipped':![]});}catch(_0x592a9e){const _0x4dbed1=mapMenuApiError(_0x592a9e,'update\x20visibility\x20for',_0x2ac94e['id']);if(isMenuResponseLoss(_0x592a9e)&&_0x4dbed1[_0x9b6307(0x1cc)]!=='menu_permission_denied'){_0x3ccf9b[_0x9b6307(0x1c0)](_0x2ac94e['id']);continue;}_0x4e0e49[_0x9b6307(0x1c0)]({'id':_0x2ac94e['id'],'stage':_0x9b6307(0x1d9),'code':_0x4dbed1[_0x9b6307(0x1cc)],'message':_0x4dbed1[_0x9b6307(0x1c5)]});}}let _0x589d2f;try{_0x589d2f=await fetchMenuSnapshot(_0x390ad9[_0x9b6307(0x1eb)],_0x390ad9[_0x9b6307(0x21a)]);}catch(_0x23ee41){const _0x5806e5=describeMenuErrorCause(_0x23ee41,_0x9b6307(0x22d)),_0x201bee=_0x3ccf9b[_0x9b6307(0x20d)](_0x53cbcf=>({'id':_0x53cbcf,'stage':_0x9b6307(0x222),'code':_0x9b6307(0x1f1),'message':_0x9b6307(0x1d8)+_0x53cbcf+_0x9b6307(0x201),'requestedStateConfirmed':![],'recovered':![]})),_0x3f396e={'stage':_0x9b6307(0x1e2),'code':_0x9b6307(0x1f1),'message':_0x9b6307(0x1db),'targetIds':_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x1c8)][_0x9b6307(0x20d)](_0x1621b6=>_0x1621b6['id']),'requestedStateConfirmed':![],..._0x5806e5};throw menuFailure(asVerificationError(_0x23ee41,_0x9b6307(0x1fd)),_0x468250[_0x9b6307(0x1ee)],{'stage':_0x9b6307(0x1e2),'succeeded':_0x31025e,'failedRecords':[..._0x4e0e49,..._0x201bee,_0x3f396e],'warnings':[_0x9b6307(0x1f9)],'verification':{'status':_0x9b6307(0x1e0),'recoveredCount':0x0,'lookupCommand':_0x9b6307(0x1df)}});}const _0x3f8013=[];for(const _0x889857 of _0x31025e){const _0x675fce=Number(_0x889857['id']),_0x2631db=_0x468250[_0x9b6307(0x1e9)][_0x9b6307(0x211)](_0x675fce),_0x3fb3b6=_0x589d2f[_0x9b6307(0x1ce)]['get'](_0x675fce);try{verifyVisibilityUpdate(_0x2631db,_0x3fb3b6,_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x227)]);}catch(_0x1d8789){const _0x366380=asVerificationError(_0x1d8789,'Menu\x20'+_0x675fce+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x3f8013['push']({'id':_0x675fce,'stage':_0x9b6307(0x1e2),'code':_0x366380[_0x9b6307(0x1cc)],'message':_0x366380[_0x9b6307(0x1c5)],'requestedStateConfirmed':![]});}}for(const _0xc5457e of _0x3ccf9b){const _0x56fdb8=_0x468250[_0x9b6307(0x1e9)][_0x9b6307(0x211)](_0xc5457e),_0x483319=_0x589d2f[_0x9b6307(0x1ce)]['get'](_0xc5457e);try{verifyVisibilityUpdate(_0x56fdb8,_0x483319,_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x227)]),_0x31025e[_0x9b6307(0x1c0)]({'id':_0xc5457e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x572e29){const _0x49d2e9=asVerificationError(_0x572e29,'Response\x20was\x20lost\x20and\x20menu\x20'+_0xc5457e+_0x9b6307(0x1ef));_0x3f8013['push']({'id':_0xc5457e,'stage':_0x9b6307(0x222),'code':_0x49d2e9['code'],'message':_0x49d2e9['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3f8013['length']>0x0){const _0x7bce10=_0x3f8013[_0x9b6307(0x20d)](_0x4b29a3=>Number(_0x4b29a3['id'])),_0x1d8088=_0x31025e[_0x9b6307(0x216)](_0x12bdee=>_0x12bdee[_0x9b6307(0x1d0)]===!![])[_0x9b6307(0x1bd)],_0x559927=menuError(_0x9b6307(0x1f1),_0x9b6307(0x229)+_0x7bce10[_0x9b6307(0x1fb)](',\x20')+'.',_0x9b6307(0x20a));throw menuFailure(_0x559927,_0x468250[_0x9b6307(0x1ee)],{'stage':_0x9b6307(0x1e2),'succeeded':_0x31025e,'failedRecords':[..._0x4e0e49,..._0x3f8013],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x9b6307(0x1e0),..._0x7bce10['length']===0x1?{'targetId':_0x7bce10[0x0]}:{'targetIds':_0x7bce10},'recoveredCount':_0x1d8088,'lookupCommand':_0x9b6307(0x1df)}});}const _0x4450af=_0x31025e[_0x9b6307(0x216)](_0x565d19=>_0x565d19['updated']===!![])['length'],_0x50fc99=_0x31025e[_0x9b6307(0x1bd)]-_0x4450af,_0x106cfe={..._0x468250['plan'],'succeeded':_0x31025e,'failed':_0x4e0e49,'warnings':_0x4e0e49['length']>0x0?[..._0x468250[_0x9b6307(0x1ee)]['warnings'],_0x9b6307(0x218)]:_0x468250[_0x9b6307(0x1ee)][_0x9b6307(0x200)],'verification':{'checkedBy':_0x9b6307(0x1ed),'snapshotHash':_0x589d2f[_0x9b6307(0x1dd)],'matchesRequestedState':_0x4e0e49[_0x9b6307(0x1bd)]===0x0,'recoveredCount':_0x3ccf9b['length']}};return{'ok':_0x4e0e49['length']===0x0,'data':_0x106cfe,'message':_0x4e0e49[_0x9b6307(0x1bd)]===0x0?'Updated\x20visibility\x20for\x20'+_0x4450af+_0x9b6307(0x210)+_0x50fc99+_0x9b6307(0x20f):_0x9b6307(0x1d2)+_0x4450af+'\x20updated,\x20'+_0x50fc99+'\x20skipped,\x20'+_0x4e0e49[_0x9b6307(0x1bd)]+_0x9b6307(0x1e1)};}};function parseInput(_0x1d7689){const _0x2fec05=a191_0x351d3e,_0x48ec31=parseMenuIds(_0x1d7689['str']('menu-ids')),_0x1f4269=parseCsv(_0x1d7689[_0x2fec05(0x1da)](_0x2fec05(0x21f)));if(_0x48ec31[_0x2fec05(0x1bd)]===0x0&&_0x1f4269['length']===0x0)throw CliErrors[_0x2fec05(0x209)](_0x2fec05(0x1c2));const _0x21b7d1=parseBooleanFlag(_0x1d7689,_0x2fec05(0x1ec),!![]),_0x1dcbb5=parseBooleanFlag(_0x1d7689,_0x2fec05(0x212),![]);let _0x580e01;if(hasFlag(_0x1d7689,_0x2fec05(0x1e8))){_0x580e01=_0x1d7689['num'](_0x2fec05(0x1e8));if(!Number[_0x2fec05(0x1d3)](_0x580e01)||_0x580e01<0x0)throw CliErrors['validation'](_0x2fec05(0x1c3));}return{'menuIds':_0x48ec31,'paths':_0x1f4269,'visible':_0x21b7d1,'expectVisible':_0x1dcbb5,'expectedCount':_0x580e01};}function a191_0x5427(_0xfa2981,_0x1010f1){_0xfa2981=_0xfa2981-0x1bd;const _0x45bb6f=a191_0x45bb();let _0x5427c0=_0x45bb6f[_0xfa2981];return _0x5427c0;}async function buildPlan(_0x3c7aaf,_0x479a9c){const _0x57137a=a191_0x351d3e,_0x365dac=parseInput(_0x3c7aaf),_0x20bb0e=await fetchMutationSnapshot(_0x3c7aaf,'update\x20menu\x20visibility'),_0x3efb91=selectTargets(_0x20bb0e['menus'],_0x365dac['menuIds'],_0x365dac[_0x57137a(0x21f)]);if(_0x365dac[_0x57137a(0x1e6)]!==undefined&&_0x3efb91[_0x57137a(0x1bd)]!==_0x365dac[_0x57137a(0x1e6)])throw menuError('menu_expected_count_mismatch',_0x57137a(0x1fa)+_0x3efb91['length']+_0x57137a(0x234)+_0x365dac[_0x57137a(0x1e6)]+'.',_0x57137a(0x1e3));if(_0x365dac[_0x57137a(0x1c1)]!==undefined){const _0x551f7f=_0x3efb91[_0x57137a(0x216)](_0x2b5188=>_0x2b5188[_0x57137a(0x1ec)]!==_0x365dac[_0x57137a(0x1c1)]);if(_0x551f7f[_0x57137a(0x1bd)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x551f7f[_0x57137a(0x20d)](_0x1e76b8=>_0x1e76b8['id'])[_0x57137a(0x1fb)](',\x20')+'.',_0x57137a(0x20b));}const _0x105d99=_0x3efb91[_0x57137a(0x20d)](_0x20d134=>({'id':_0x20d134['id'],'label':_0x20d134[_0x57137a(0x1f0)],'path':_0x20d134[_0x57137a(0x1e5)],'before':{'visible':_0x20d134[_0x57137a(0x1ec)]},'after':{'visible':_0x365dac[_0x57137a(0x1ec)]}})),_0x2affa3=_0x105d99[_0x57137a(0x216)](_0x23fb1e=>_0x23fb1e[_0x57137a(0x236)][_0x57137a(0x1ec)]!==_0x365dac[_0x57137a(0x1ec)])['map'](_0x23c3c9=>({'stage':_0x57137a(0x223),'method':_0x57137a(0x21c),'path':_0x57137a(0x204),'body':{'appCode':_0x3c7aaf['appCode'],'id':_0x23c3c9['id'],'visible':_0x365dac['visible']}})),_0x40d82a=mutationResult({'operation':_0x57137a(0x1f2),'selector':{'menuIds':_0x365dac['menuIds'],'paths':_0x365dac[_0x57137a(0x21f)]},'before':{'menus':_0x3efb91[_0x57137a(0x20d)](_0x230b63=>({'id':_0x230b63['id'],'path':_0x230b63[_0x57137a(0x1e5)],'visible':_0x230b63[_0x57137a(0x1ec)]}))},'after':{'menus':_0x3efb91[_0x57137a(0x20d)](_0x3918f8=>({'id':_0x3918f8['id'],'path':_0x3918f8[_0x57137a(0x1e5)],'visible':_0x365dac[_0x57137a(0x1ec)]}))},'dryRun':_0x479a9c,'backend':[...BACKEND],'plannedActions':_0x2affa3,'snapshotHash':_0x20bb0e[_0x57137a(0x1dd)],'warnings':_0x2affa3[_0x57137a(0x1bd)]===0x0?[_0x57137a(0x1cb)]:[]});return{'plan':{..._0x40d82a,'requestedVisible':_0x365dac[_0x57137a(0x1ec)],'targets':_0x105d99},'beforeById':new Map(_0x3efb91[_0x57137a(0x20d)](_0x3d65ad=>[_0x3d65ad['id'],_0x3d65ad]))};}function selectTargets(_0x158a47,_0xb6778c,_0x3ce172){const _0x11ee88=a191_0x351d3e,_0x54b89d=new Map(_0x158a47[_0x11ee88(0x20d)](_0x5b0078=>[_0x5b0078['id'],_0x5b0078])),_0x5a26b4=new Map(),_0x2639f8=_0xb6778c['filter'](_0x3897eb=>!_0x54b89d[_0x11ee88(0x1fe)](_0x3897eb));if(_0x2639f8[_0x11ee88(0x1bd)]>0x0)throw menuError('menu_selector_not_found',_0x11ee88(0x213)+_0x2639f8[_0x11ee88(0x1fb)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x5a1b3c of _0xb6778c){_0x5a26b4['set'](_0x5a1b3c,_0x54b89d['get'](_0x5a1b3c));}for(const _0x33fb25 of _0x3ce172){const _0x4dd501=_0x158a47['filter'](_0x5b4766=>_0x5b4766['path']===_0x33fb25);if(_0x4dd501[_0x11ee88(0x1bd)]===0x0)throw menuError(_0x11ee88(0x231),_0x11ee88(0x1d7)+JSON[_0x11ee88(0x1c9)](_0x33fb25)+'.',_0x11ee88(0x22e));if(_0x4dd501[_0x11ee88(0x1bd)]>0x1)throw menuError(_0x11ee88(0x205),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x11ee88(0x1c9)](_0x33fb25)+'.',_0x11ee88(0x1de)+_0x4dd501['map'](_0x171d3d=>_0x171d3d['id'])[_0x11ee88(0x1fb)](',\x20')+'.');const _0x7eb559=_0x4dd501[0x0];_0x5a26b4[_0x11ee88(0x226)](_0x7eb559['id'],_0x7eb559);}return[..._0x5a26b4[_0x11ee88(0x1ea)]()];}function parseMenuIds(_0x3a7e2b){const _0x4b94ac=a191_0x351d3e,_0xf777b5=parseCsv(_0x3a7e2b),_0x332dfe=_0xf777b5['map'](Number);if(_0x332dfe[_0x4b94ac(0x1c7)](_0x4b57d5=>!Number[_0x4b94ac(0x1d3)](_0x4b57d5)||_0x4b57d5<=0x0))throw CliErrors[_0x4b94ac(0x209)](_0x4b94ac(0x1f8));return[...new Set(_0x332dfe)];}function a191_0x45bb(){const _0x23a20a=['Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','pageId','path','expectedCount','write','expected-count','beforeById','values','appCode','visible','menu\x20list','plan','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','label','menu_verification_failed','visibility-update','Would\x20update\x20visibility\x20for\x20','type','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20changed\x20unexpectedly.','childrenIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Selected\x20','join','true','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','has','9030992NWwxIV','warnings','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','boolean','modelType','/smartapi/menu/update','menu_selector_ambiguous','688400qDqgoD','depth','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','validation','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','resources','map','92834gshFWT','\x20unchanged\x20menu(s).','\x20menu(s);\x20skipped\x20','get','expect-visible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','plannedActions','pageType','filter','666sITjAP','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetCode','cookie','1598924YWuEPZ','POST','sort','Menu\x20','paths','url','trim','update-recovery','update-menu-visibility','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','set','requestedVisible','1677773eLlWFR','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','false','update\x20menu\x20visibility','10bxHdsw','verify\x20menu\x20visibility\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20menu(s);\x20skip\x20','datasetId','menu_selector_not_found','30186tRLMTT','22LkvBHr','\x20menu(s),\x20expected\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','before','length','split','\x20must\x20be\x20true\x20or\x20false.','push','expectVisible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','message','10011483ZVuxbU','some','targets','stringify','isArray','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','code','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','byId','106PRiyqM','recovered','childrenCount','Menu\x20visibility\x20update\x20completed:\x20','isSafeInteger','flagMissing','body','Requested\x20menu\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','Response\x20was\x20lost\x20for\x20menu\x20','update','str','Final\x20menu\x20visibility\x20readback\x20failed.','resourcesValid','hash','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','rabetbase\x20menu\x20list\x20--format\x20compress','failed','\x20failed.','verification'];a191_0x45bb=function(){return _0x23a20a;};return a191_0x45bb();}function parseCsv(_0x2159b5){const _0x2f51b6=a191_0x351d3e;return[...new Set(_0x2159b5[_0x2f51b6(0x1be)](',')[_0x2f51b6(0x20d)](_0x4aa946=>_0x4aa946[_0x2f51b6(0x221)]())[_0x2f51b6(0x216)](Boolean))];}function parseBooleanFlag(_0x4e0c57,_0x34cdd5,_0x466aa6){const _0x37d86c=a191_0x351d3e;if(!hasFlag(_0x4e0c57,_0x34cdd5)){if(_0x466aa6)throw CliErrors[_0x37d86c(0x1d4)](_0x34cdd5);return undefined;}const _0x83acfb=_0x4e0c57['rawFlags'][_0x34cdd5];if(_0x83acfb===!![]||_0x83acfb===![])return _0x83acfb;if(_0x83acfb===_0x37d86c(0x1fc))return!![];if(_0x83acfb===_0x37d86c(0x22a))return![];throw CliErrors[_0x37d86c(0x209)]('--'+_0x34cdd5+_0x37d86c(0x1bf));}function verifyVisibilityUpdate(_0x18fb33,_0x5a3379,_0xd7d44b){const _0x4c40d5=a191_0x351d3e;assertVerified(!!_0x5a3379,'Menu\x20'+_0x18fb33['id']+_0x4c40d5(0x1f5)),assertVerified(_0x5a3379[_0x4c40d5(0x1ec)]===_0xd7d44b,_0x4c40d5(0x21e)+_0x18fb33['id']+_0x4c40d5(0x225));const _0x16c148=[['id',_0x5a3379['id'],_0x18fb33['id']],['parentId',_0x5a3379['parentId'],_0x18fb33['parentId']],[_0x4c40d5(0x207),_0x5a3379[_0x4c40d5(0x207)],_0x18fb33[_0x4c40d5(0x207)]],['label',_0x5a3379[_0x4c40d5(0x1f0)],_0x18fb33[_0x4c40d5(0x1f0)]],[_0x4c40d5(0x1e5),_0x5a3379['path'],_0x18fb33['path']],['url',_0x5a3379['url'],_0x18fb33[_0x4c40d5(0x220)]],[_0x4c40d5(0x1f4),_0x5a3379[_0x4c40d5(0x1f4)],_0x18fb33[_0x4c40d5(0x1f4)]],[_0x4c40d5(0x21d),_0x5a3379[_0x4c40d5(0x21d)],_0x18fb33[_0x4c40d5(0x21d)]],[_0x4c40d5(0x20c),_0x5a3379['resources'],_0x18fb33[_0x4c40d5(0x20c)]],['resourcesValid',_0x5a3379['resourcesValid'],_0x18fb33[_0x4c40d5(0x1dc)]],['childrenIds',_0x5a3379[_0x4c40d5(0x1f7)],_0x18fb33[_0x4c40d5(0x1f7)]],[_0x4c40d5(0x1d1),_0x5a3379[_0x4c40d5(0x1d1)],_0x18fb33[_0x4c40d5(0x1d1)]],[_0x4c40d5(0x1e4),_0x5a3379[_0x4c40d5(0x1e4)],_0x18fb33[_0x4c40d5(0x1e4)]],[_0x4c40d5(0x215),_0x5a3379['pageType'],_0x18fb33[_0x4c40d5(0x215)]],[_0x4c40d5(0x203),_0x5a3379[_0x4c40d5(0x203)],_0x18fb33[_0x4c40d5(0x203)]],[_0x4c40d5(0x230),_0x5a3379[_0x4c40d5(0x230)],_0x18fb33['datasetId']],[_0x4c40d5(0x219),_0x5a3379[_0x4c40d5(0x219)],_0x18fb33['datasetCode']]];for(const [_0x36840e,_0x5e470f,_0x3d1bf3]of _0x16c148){assertVerified(sameValue(_0x5e470f,_0x3d1bf3),_0x4c40d5(0x21e)+_0x18fb33['id']+'\x20'+_0x36840e+_0x4c40d5(0x1f6));}}function sameValue(_0x47d080,_0x38d35a){const _0x1ea65d=a191_0x351d3e;if(Array['isArray'](_0x47d080)||Array[_0x1ea65d(0x1ca)](_0x38d35a))return JSON['stringify'](_0x47d080)===JSON[_0x1ea65d(0x1c9)](_0x38d35a);return _0x47d080===_0x38d35a;}
@@ -1 +1 @@
1
- const a185_0x219d75=a185_0x26e0;(function(_0x28b854,_0x13e967){const _0x16171a=a185_0x26e0,_0x158ef2=_0x28b854();while(!![]){try{const _0x378812=-parseInt(_0x16171a(0x139))/0x1+-parseInt(_0x16171a(0x12f))/0x2+-parseInt(_0x16171a(0x126))/0x3+-parseInt(_0x16171a(0x134))/0x4*(parseInt(_0x16171a(0x129))/0x5)+parseInt(_0x16171a(0x128))/0x6+-parseInt(_0x16171a(0x121))/0x7*(parseInt(_0x16171a(0x136))/0x8)+parseInt(_0x16171a(0x132))/0x9;if(_0x378812===_0x13e967)break;else _0x158ef2['push'](_0x158ef2['shift']());}catch(_0x40229f){_0x158ef2['push'](_0x158ef2['shift']());}}}(a185_0x16c4,0x9e12e));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a185_0x219d75(0x12d);function a185_0x26e0(_0x388c1a,_0x228e46){_0x388c1a=_0x388c1a-0x11b;const _0x16c4c3=a185_0x16c4();let _0x26e08c=_0x16c4c3[_0x388c1a];return _0x26e08c;}function a185_0x16c4(){const _0x4d1e7d=['description','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configCode',';\x20do\x20not\x20resubmit.','993483RsJbwF','Inspect\x20with\x20','1207884fQDKnp','1337695xXxvQD','notification_config_create_outcome_unknown','readTimeout','planned','/notification/channel-config/create','verified','250808VVYgIG','channelType','configName','31872987BjObYr','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','12cFmkTV','document','8jLqjOS',';\x20do\x20not\x20resubmit\x20automatically.','POST','916853XhNEOp','config-create','endpointUrl','Created\x20notification\x20config\x20','appCode','write','create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','connectTimeout','6434764Rnzjgf'];a185_0x16c4=function(){return _0x4d1e7d;};return a185_0x16c4();}async function prepareCreate(_0x4ec8ed){const _0x51cdc7=a185_0x219d75,_0x4bce78=await readNotificationDocument(_0x4ec8ed,_0x51cdc7(0x11e)),_0x2e5736=createMutationInput(_0x4ec8ed['appCode'],_0x4bce78);return{'document':_0x4bce78,'input':_0x2e5736,'planned':projectNotificationConfig({'appCode':_0x4ec8ed[_0x51cdc7(0x11c)],'configName':_0x4bce78[_0x51cdc7(0x131)],'channelType':_0x4bce78[_0x51cdc7(0x130)],'endpointUrl':_0x4bce78[_0x51cdc7(0x13b)],'channelConfig':_0x4bce78['channelConfig'],'description':_0x4bce78[_0x51cdc7(0x122)],'connectTimeout':_0x4bce78[_0x51cdc7(0x120)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x4bce78[_0x51cdc7(0x12b)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a185_0x219d75(0x13a),'description':a185_0x219d75(0x123),'risk':a185_0x219d75(0x11d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x373c93){assertSingleNotificationSource(_0x373c93);},async 'dryRun'(_0x354473){const _0x467ad8=a185_0x219d75,_0xd81c9e=await prepareCreate(_0x354473),_0x459e04=notificationLookupCommand(_0x354473[_0x467ad8(0x11c)],_0xd81c9e['document'][_0x467ad8(0x130)]);return asDryRunResult({'operation':_0x467ad8(0x11e),'selector':{'appCode':_0x354473[_0x467ad8(0x11c)],'configName':_0xd81c9e[_0x467ad8(0x135)][_0x467ad8(0x131)],'channelType':_0xd81c9e[_0x467ad8(0x135)][_0x467ad8(0x130)]},'before':null,'after':_0xd81c9e['planned'],'dryRun':!![],'backend':{'method':_0x467ad8(0x138),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x467ad8(0x12c),'lookupCommand':_0x459e04}},{'method':_0x467ad8(0x138),'url':CREATE_PATH});},async 'execute'(_0x32a154){const _0x4be116=a185_0x219d75,_0x25d7cf=await prepareCreate(_0x32a154),_0x5a3c2c=notificationLookupCommand(_0x32a154[_0x4be116(0x11c)],_0x25d7cf[_0x4be116(0x135)]['channelType']);let _0x4045fb;try{_0x4045fb=await createNotificationChannelConfig(_0x25d7cf['input']);}catch(_0x1f4aff){if(isPlatformTransportFailure(_0x1f4aff))throw notificationError(_0x4be116(0x12a),_0x4be116(0x133),_0x4be116(0x127)+_0x5a3c2c+_0x4be116(0x125));throw safeApiFailure(_0x4be116(0x11e),'mutation','Inspect\x20with\x20'+_0x5a3c2c+_0x4be116(0x11f));}if(!Number['isSafeInteger'](_0x4045fb)||_0x4045fb<=0x0)throw notificationError(_0x4be116(0x12a),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x4be116(0x127)+_0x5a3c2c+_0x4be116(0x125));let _0x290ae6;try{const _0xbe9f44=await getNotificationChannelConfig(_0x4045fb,_0x32a154[_0x4be116(0x11c)]);_0x290ae6=normalizeExactNotificationConfig(_0xbe9f44,_0x4045fb,_0x32a154['appCode']);}catch{throw safeApiFailure(_0x4be116(0x11e),'verification','Inspect\x20with\x20'+_0x5a3c2c+_0x4be116(0x137));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x290ae6[_0x4be116(0x11c)],'id':_0x290ae6['id'],'configCode':_0x290ae6[_0x4be116(0x124)],'configName':_0x290ae6[_0x4be116(0x131)],'channelType':_0x290ae6[_0x4be116(0x130)]},'before':null,'after':projectNotificationConfig(_0x290ae6),'dryRun':![],'backend':{'method':_0x4be116(0x138),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4be116(0x12e),'lookupCommand':_0x5a3c2c}},'message':_0x4be116(0x11b)+_0x290ae6['id']};}};
1
+ function a192_0x1e7e(){const _0x53f229=['4398BIhfdC','730zAUtKY','/notification/channel-config/create','document','channelType','Inspect\x20with\x20','3cYAZOu',';\x20do\x20not\x20resubmit.','56QXnrhB','readTimeout','appCode','create','mutation',';\x20do\x20not\x20resubmit\x20automatically.','channelConfig','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','configName','18941879jfKhMs','2487884aTyMJD','config-create','2cPIZkI','POST','2286370mZnuCN','configCode','1575332wLdHLI','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Created\x20notification\x20config\x20','395865FifPMf','notification_config_create_outcome_unknown','planned','verification','connectTimeout','description','notification','203938ToPjBv','input','write','isSafeInteger'];a192_0x1e7e=function(){return _0x53f229;};return a192_0x1e7e();}const a192_0x3b2978=a192_0x513c;(function(_0x33cbe8,_0x26de1d){const _0x4fd868=a192_0x513c,_0x2211c3=_0x33cbe8();while(!![]){try{const _0x198938=-parseInt(_0x4fd868(0xc5))/0x1*(parseInt(_0x4fd868(0xde))/0x2)+parseInt(_0x4fd868(0xcf))/0x3*(-parseInt(_0x4fd868(0xe2))/0x4)+parseInt(_0x4fd868(0xca))/0x5*(parseInt(_0x4fd868(0xc9))/0x6)+-parseInt(_0x4fd868(0xdc))/0x7+parseInt(_0x4fd868(0xd1))/0x8*(-parseInt(_0x4fd868(0xe5))/0x9)+-parseInt(_0x4fd868(0xe0))/0xa+parseInt(_0x4fd868(0xdb))/0xb;if(_0x198938===_0x26de1d)break;else _0x2211c3['push'](_0x2211c3['shift']());}catch(_0xe83ff8){_0x2211c3['push'](_0x2211c3['shift']());}}}(a192_0x1e7e,0x52d5c));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x3b2978(0xcb);function a192_0x513c(_0x1ac386,_0x3e1b57){_0x1ac386=_0x1ac386-0xc0;const _0x1e7e49=a192_0x1e7e();let _0x513c5b=_0x1e7e49[_0x1ac386];return _0x513c5b;}async function prepareCreate(_0x5e1cbd){const _0x97623c=a192_0x3b2978,_0x43f8a0=await readNotificationDocument(_0x5e1cbd,_0x97623c(0xd4)),_0x560bb2=createMutationInput(_0x5e1cbd[_0x97623c(0xd3)],_0x43f8a0);return{'document':_0x43f8a0,'input':_0x560bb2,'planned':projectNotificationConfig({'appCode':_0x5e1cbd[_0x97623c(0xd3)],'configName':_0x43f8a0[_0x97623c(0xda)],'channelType':_0x43f8a0[_0x97623c(0xcd)],'endpointUrl':_0x43f8a0['endpointUrl'],'channelConfig':_0x43f8a0[_0x97623c(0xd7)],'description':_0x43f8a0[_0x97623c(0xc3)],'connectTimeout':_0x43f8a0[_0x97623c(0xc2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x43f8a0[_0x97623c(0xd2)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x3b2978(0xc4),'command':a192_0x3b2978(0xdd),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a192_0x3b2978(0xc7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x25fa75){assertSingleNotificationSource(_0x25fa75);},async 'dryRun'(_0x56b98e){const _0x40c876=a192_0x3b2978,_0xeee3d3=await prepareCreate(_0x56b98e),_0x2a72b1=notificationLookupCommand(_0x56b98e[_0x40c876(0xd3)],_0xeee3d3['document']['channelType']);return asDryRunResult({'operation':'create','selector':{'appCode':_0x56b98e[_0x40c876(0xd3)],'configName':_0xeee3d3[_0x40c876(0xcc)][_0x40c876(0xda)],'channelType':_0xeee3d3[_0x40c876(0xcc)]['channelType']},'before':null,'after':_0xeee3d3[_0x40c876(0xc0)],'dryRun':!![],'backend':{'method':_0x40c876(0xdf),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x40c876(0xc0),'lookupCommand':_0x2a72b1}},{'method':_0x40c876(0xdf),'url':CREATE_PATH});},async 'execute'(_0x2420ab){const _0x8243f=a192_0x3b2978,_0x3ed9ca=await prepareCreate(_0x2420ab),_0x5f478e=notificationLookupCommand(_0x2420ab[_0x8243f(0xd3)],_0x3ed9ca[_0x8243f(0xcc)][_0x8243f(0xcd)]);let _0x3e40d3;try{_0x3e40d3=await createNotificationChannelConfig(_0x3ed9ca[_0x8243f(0xc6)]);}catch(_0x1f9725){if(isPlatformTransportFailure(_0x1f9725))throw notificationError(_0x8243f(0xe6),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x5f478e+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x8243f(0xd4),_0x8243f(0xd5),_0x8243f(0xce)+_0x5f478e+_0x8243f(0xd9));}if(!Number[_0x8243f(0xc8)](_0x3e40d3)||_0x3e40d3<=0x0)throw notificationError(_0x8243f(0xe6),_0x8243f(0xe3),_0x8243f(0xce)+_0x5f478e+_0x8243f(0xd0));let _0x4c8e8c;try{const _0x5ca2ae=await getNotificationChannelConfig(_0x3e40d3,_0x2420ab['appCode']);_0x4c8e8c=normalizeExactNotificationConfig(_0x5ca2ae,_0x3e40d3,_0x2420ab['appCode']);}catch{throw safeApiFailure(_0x8243f(0xd4),_0x8243f(0xc1),'Inspect\x20with\x20'+_0x5f478e+_0x8243f(0xd6));}return{'ok':!![],'data':{'operation':_0x8243f(0xd4),'selector':{'appCode':_0x4c8e8c[_0x8243f(0xd3)],'id':_0x4c8e8c['id'],'configCode':_0x4c8e8c[_0x8243f(0xe1)],'configName':_0x4c8e8c[_0x8243f(0xda)],'channelType':_0x4c8e8c[_0x8243f(0xcd)]},'before':null,'after':projectNotificationConfig(_0x4c8e8c),'dryRun':![],'backend':{'method':_0x8243f(0xdf),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x8243f(0xd8),'lookupCommand':_0x5f478e}},'message':_0x8243f(0xe4)+_0x4c8e8c['id']};}};
@@ -1 +1 @@
1
- const a186_0x4f9446=a186_0x76a8;(function(_0x283155,_0x59d2e4){const _0x165305=a186_0x76a8,_0x2218f9=_0x283155();while(!![]){try{const _0x161aee=-parseInt(_0x165305(0x1de))/0x1+parseInt(_0x165305(0x1dd))/0x2*(parseInt(_0x165305(0x1cc))/0x3)+-parseInt(_0x165305(0x1cf))/0x4*(-parseInt(_0x165305(0x1ce))/0x5)+parseInt(_0x165305(0x1dc))/0x6*(-parseInt(_0x165305(0x1db))/0x7)+-parseInt(_0x165305(0x1d7))/0x8+parseInt(_0x165305(0x1c9))/0x9+-parseInt(_0x165305(0x1d6))/0xa*(parseInt(_0x165305(0x1d5))/0xb);if(_0x161aee===_0x59d2e4)break;else _0x2218f9['push'](_0x2218f9['shift']());}catch(_0x4bcb07){_0x2218f9['push'](_0x2218f9['shift']());}}}(a186_0x4434,0x35a08));import{asDryRunResult}from'../../commands/common/dry-run.js';function a186_0x76a8(_0x34e119,_0x1f40c1){_0x34e119=_0x34e119-0x1c1;const _0x4434b6=a186_0x4434();let _0x76a82e=_0x4434b6[_0x34e119];return _0x76a82e;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a186_0x4f9446(0x1d9),REFERENCE_WARNING=a186_0x4f9446(0x1da);async function prepareDelete(_0x575d30){const _0x4c088d=a186_0x4f9446,_0x37066c=readNotificationId(_0x575d30),_0xdba802=await requireExactNotificationConfig(_0x575d30['appCode'],_0x37066c,_0x4c088d(0x1d8));return{'id':_0x37066c,'before':_0xdba802};}export const notificationConfigDelete={'service':a186_0x4f9446(0x1c4),'command':a186_0x4f9446(0x1e0),'description':a186_0x4f9446(0x1c7),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5b4b39){readNotificationId(_0x5b4b39),requireNotificationExplicitYes(_0x5b4b39);},async 'dryRun'(_0x686cf9){const _0x53ed1f=a186_0x4f9446,_0x34cce0=await prepareDelete(_0x686cf9),_0x224b0f=notificationLookupCommand(_0x686cf9['appCode'],_0x34cce0['before']['channelType']);return asDryRunResult({'operation':_0x53ed1f(0x1d8),'selector':notificationSelector(_0x34cce0[_0x53ed1f(0x1c8)]),'before':projectNotificationConfig(_0x34cce0[_0x53ed1f(0x1c8)]),'after':null,'dryRun':!![],'backend':{'method':_0x53ed1f(0x1c2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x53ed1f(0x1cd),'lookupCommand':_0x224b0f}},{'method':_0x53ed1f(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x56313f){const _0x560c3d=a186_0x4f9446;requireNotificationExplicitYes(_0x56313f);const _0x568aa1=await prepareDelete(_0x56313f),_0x467e96=notificationLookupCommand(_0x56313f['appCode'],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]);let _0x26fb62=![];try{await deleteNotificationChannelConfig(_0x568aa1['id'],_0x56313f[_0x560c3d(0x1d0)]);}catch(_0x2eb868){if(!isPlatformTransportFailure(_0x2eb868))throw safeApiFailure(_0x560c3d(0x1d8),_0x560c3d(0x1c3),_0x560c3d(0x1d4)+_0x467e96+_0x560c3d(0x1c5));_0x26fb62=!![];}let _0x382240;try{_0x382240=await listNotificationChannelConfigs(_0x56313f['appCode'],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]),validateNotificationDeleteReadback(_0x382240,_0x56313f[_0x560c3d(0x1d0)],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]);}catch{throw notificationError(_0x26fb62?_0x560c3d(0x1d2):_0x560c3d(0x1e1),'Notification\x20config\x20'+_0x568aa1['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x467e96+_0x560c3d(0x1ca));}if(_0x382240[_0x560c3d(0x1c1)](_0x1df169=>_0x1df169['id']===_0x568aa1['id']))throw notificationError(_0x26fb62?_0x560c3d(0x1d2):'notification_config_delete_verification_failed',_0x560c3d(0x1d1)+_0x568aa1['id']+_0x560c3d(0x1cb),_0x560c3d(0x1d4)+_0x467e96+_0x560c3d(0x1ca));const _0x10b3e3=[REFERENCE_WARNING];return _0x26fb62&&_0x10b3e3[_0x560c3d(0x1d3)](_0x560c3d(0x1df)),{'ok':!![],'data':{'operation':_0x560c3d(0x1d8),'selector':notificationSelector(_0x568aa1[_0x560c3d(0x1c8)]),'before':projectNotificationConfig(_0x568aa1['before']),'after':null,'dryRun':![],'backend':{'method':_0x560c3d(0x1c2),'path':DELETE_PATH},'warnings':_0x10b3e3,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x26fb62,'lookupCommand':_0x467e96}},'message':'Deleted\x20notification\x20config\x20'+_0x568aa1['id']};}};function a186_0x4434(){const _0x22ba86=[';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','before','1469115iOYQUN',';\x20do\x20not\x20resubmit\x20automatically.','\x20remains\x20present\x20after\x20delete.','110766pkxSEB','planned','15830GMMPHI','248TcDBkv','appCode','Notification\x20config\x20','notification_config_delete_outcome_unknown','unshift','Inspect\x20with\x20','18117FFbFjW','1110sjIFcT','1956280dplbhT','delete','/notification/channel-config/delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','401681beRTYm','12vKXdEC','22qZktzN','3895ZUUevG','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','config-delete','notification_config_delete_verification_unavailable','some','POST','mutation','notification'];a186_0x4434=function(){return _0x22ba86;};return a186_0x4434();}
1
+ const a193_0x55d209=a193_0xeea7;(function(_0x3746d6,_0x566742){const _0x518174=a193_0xeea7,_0x110f59=_0x3746d6();while(!![]){try{const _0x47849d=-parseInt(_0x518174(0x1d0))/0x1+-parseInt(_0x518174(0x1e1))/0x2+-parseInt(_0x518174(0x1ca))/0x3*(-parseInt(_0x518174(0x1d4))/0x4)+parseInt(_0x518174(0x1cd))/0x5+parseInt(_0x518174(0x1cf))/0x6*(parseInt(_0x518174(0x1c5))/0x7)+parseInt(_0x518174(0x1d1))/0x8*(-parseInt(_0x518174(0x1d9))/0x9)+-parseInt(_0x518174(0x1e0))/0xa*(-parseInt(_0x518174(0x1c9))/0xb);if(_0x47849d===_0x566742)break;else _0x110f59['push'](_0x110f59['shift']());}catch(_0x36c61f){_0x110f59['push'](_0x110f59['shift']());}}}(a193_0x42ef,0xee063));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0xeea7(_0x3d3813,_0x46881e){_0x3d3813=_0x3d3813-0x1c3;const _0x42ef08=a193_0x42ef();let _0xeea7e1=_0x42ef08[_0x3d3813];return _0xeea7e1;}function a193_0x42ef(){const _0x1c799f=['verified','Inspect\x20with\x20','notification_config_delete_verification_unavailable','some','channelType','Deleted\x20notification\x20config\x20','310WTgbQp','2712802RpWEfv','\x20delete\x20could\x20not\x20be\x20verified.','mutation','\x20remains\x20present\x20after\x20delete.','6413666JKBUfk','Notification\x20config\x20','before','notification_config_delete_verification_failed','471823IOMWUU','3sWZEGf','appCode','notification','9355890Xtszdk','/notification/channel-config/delete','6tBsOgt','649259RIupCA','8qgMIbG','notification_config_delete_outcome_unknown','POST','2157468CFKcol','config-delete',';\x20do\x20not\x20resubmit\x20automatically.','delete','high-risk-write','15082731bKbxvN'];a193_0x42ef=function(){return _0x1c799f;};return a193_0x42ef();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x55d209(0x1ce),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x46b631){const _0x3ecda0=a193_0x55d209,_0x2fa06e=readNotificationId(_0x46b631),_0x5d44b6=await requireExactNotificationConfig(_0x46b631['appCode'],_0x2fa06e,_0x3ecda0(0x1d7));return{'id':_0x2fa06e,'before':_0x5d44b6};}export const notificationConfigDelete={'service':a193_0x55d209(0x1cc),'command':a193_0x55d209(0x1d5),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a193_0x55d209(0x1d8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3b7a50){readNotificationId(_0x3b7a50),requireNotificationExplicitYes(_0x3b7a50);},async 'dryRun'(_0x4e631a){const _0x2865db=a193_0x55d209,_0x2634c7=await prepareDelete(_0x4e631a),_0x1e1309=notificationLookupCommand(_0x4e631a[_0x2865db(0x1cb)],_0x2634c7[_0x2865db(0x1c7)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x2634c7['before']),'before':projectNotificationConfig(_0x2634c7['before']),'after':null,'dryRun':!![],'backend':{'method':_0x2865db(0x1d3),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x1e1309}},{'method':_0x2865db(0x1d3),'url':DELETE_PATH});},async 'execute'(_0x247216){const _0x32e236=a193_0x55d209;requireNotificationExplicitYes(_0x247216);const _0x205103=await prepareDelete(_0x247216),_0x450264=notificationLookupCommand(_0x247216[_0x32e236(0x1cb)],_0x205103[_0x32e236(0x1c7)]['channelType']);let _0x5502a1=![];try{await deleteNotificationChannelConfig(_0x205103['id'],_0x247216[_0x32e236(0x1cb)]);}catch(_0x7be67c){if(!isPlatformTransportFailure(_0x7be67c))throw safeApiFailure(_0x32e236(0x1d7),_0x32e236(0x1c3),_0x32e236(0x1db)+_0x450264+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x5502a1=!![];}let _0xfbc3c7;try{_0xfbc3c7=await listNotificationChannelConfigs(_0x247216[_0x32e236(0x1cb)],_0x205103['before'][_0x32e236(0x1de)]),validateNotificationDeleteReadback(_0xfbc3c7,_0x247216['appCode'],_0x205103[_0x32e236(0x1c7)]['channelType']);}catch{throw notificationError(_0x5502a1?_0x32e236(0x1d2):_0x32e236(0x1dc),_0x32e236(0x1c6)+_0x205103['id']+_0x32e236(0x1e2),_0x32e236(0x1db)+_0x450264+_0x32e236(0x1d6));}if(_0xfbc3c7[_0x32e236(0x1dd)](_0x5e8260=>_0x5e8260['id']===_0x205103['id']))throw notificationError(_0x5502a1?_0x32e236(0x1d2):_0x32e236(0x1c8),_0x32e236(0x1c6)+_0x205103['id']+_0x32e236(0x1c4),'Inspect\x20with\x20'+_0x450264+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1261cf=[REFERENCE_WARNING];return _0x5502a1&&_0x1261cf['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x205103[_0x32e236(0x1c7)]),'before':projectNotificationConfig(_0x205103[_0x32e236(0x1c7)]),'after':null,'dryRun':![],'backend':{'method':_0x32e236(0x1d3),'path':DELETE_PATH},'warnings':_0x1261cf,'verification':{'status':_0x32e236(0x1da),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x5502a1,'lookupCommand':_0x450264}},'message':_0x32e236(0x1df)+_0x205103['id']};}};
@@ -1 +1 @@
1
- const a187_0x2a168d=a187_0x5500;(function(_0x2f8b53,_0x1c0e2b){const _0x5de1f2=a187_0x5500,_0x3d5e74=_0x2f8b53();while(!![]){try{const _0x5a0b9d=parseInt(_0x5de1f2(0x140))/0x1+-parseInt(_0x5de1f2(0x148))/0x2+parseInt(_0x5de1f2(0x149))/0x3*(parseInt(_0x5de1f2(0x13b))/0x4)+parseInt(_0x5de1f2(0x143))/0x5+-parseInt(_0x5de1f2(0x137))/0x6+parseInt(_0x5de1f2(0x131))/0x7*(parseInt(_0x5de1f2(0x138))/0x8)+-parseInt(_0x5de1f2(0x144))/0x9;if(_0x5a0b9d===_0x1c0e2b)break;else _0x3d5e74['push'](_0x3d5e74['shift']());}catch(_0x372e98){_0x3d5e74['push'](_0x3d5e74['shift']());}}}(a187_0x37ab,0xdb144));function a187_0x5500(_0xe239f2,_0x303c2d){_0xe239f2=_0xe239f2-0x130;const _0x37abef=a187_0x37ab();let _0x55002f=_0x37abef[_0xe239f2];return _0x55002f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a187_0x37ab(){const _0x24bfbd=['3360951zgSlqH','map','Found\x20','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','1909176iYLLYO','42Fbdcsh','type','config-list','4387558ADMhWn','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','boolean','\x20notification\x20config(s)','trim','5472780hRmEKx','8QPZyFg','all','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','358964naBWRH','appCode','length','notification','validation','1021115pwiMmU','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','bool','1166110umICfS'];a187_0x37ab=function(){return _0x24bfbd;};return a187_0x37ab();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a187_0x2a168d(0x13e),'command':a187_0x2a168d(0x130),'description':a187_0x2a168d(0x13a),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a187_0x2a168d(0x14a),'type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a187_0x2a168d(0x134),'default':![],'description':a187_0x2a168d(0x141)}],async 'validate'(_0x296e10){const _0x4d57be=a187_0x2a168d;if(_0x296e10[_0x4d57be(0x142)](_0x4d57be(0x139))&&_0x296e10['str'](_0x4d57be(0x14a))[_0x4d57be(0x136)]())throw CliErrors[_0x4d57be(0x13f)](_0x4d57be(0x147),_0x4d57be(0x133));if(_0x296e10[_0x4d57be(0x142)]('all'))return;readNotificationChannelType(_0x296e10);},async 'execute'(_0x113a8e){const _0x905680=a187_0x2a168d;if(_0x113a8e['bool'](_0x905680(0x139))){const _0x53bd4a=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x905680(0x145)](_0x223ddb=>listNotificationChannelConfigs(_0x113a8e[_0x905680(0x13c)],_0x223ddb))),_0x232fc1=_0x53bd4a['flat']()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x113a8e[_0x905680(0x13c)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x232fc1[_0x905680(0x13d)],'configs':_0x232fc1},'message':_0x905680(0x146)+_0x232fc1['length']+_0x905680(0x132)};}const _0x23ede1=readNotificationChannelType(_0x113a8e),_0x10e160=await listNotificationChannelConfigs(_0x113a8e['appCode'],_0x23ede1),_0x2523a8=_0x10e160['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x113a8e[_0x905680(0x13c)],'channelType':_0x23ede1,'count':_0x2523a8[_0x905680(0x13d)],'configs':_0x2523a8},'message':_0x905680(0x146)+_0x2523a8[_0x905680(0x13d)]+'\x20'+_0x23ede1+_0x905680(0x135)};}};
1
+ const a194_0x13dffb=a194_0x50c4;(function(_0x1b73f3,_0x146d54){const _0x5b149c=a194_0x50c4,_0x433020=_0x1b73f3();while(!![]){try{const _0x51b42a=-parseInt(_0x5b149c(0x164))/0x1+-parseInt(_0x5b149c(0x153))/0x2+-parseInt(_0x5b149c(0x160))/0x3+parseInt(_0x5b149c(0x15b))/0x4+parseInt(_0x5b149c(0x15c))/0x5*(parseInt(_0x5b149c(0x15f))/0x6)+parseInt(_0x5b149c(0x158))/0x7*(parseInt(_0x5b149c(0x150))/0x8)+parseInt(_0x5b149c(0x159))/0x9*(parseInt(_0x5b149c(0x151))/0xa);if(_0x51b42a===_0x146d54)break;else _0x433020['push'](_0x433020['shift']());}catch(_0x4bcb30){_0x433020['push'](_0x433020['shift']());}}}(a194_0x4d08,0x88010));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x4d08(){const _0x1f7715=['1049740suFkBP','2690IrrkQY','validation','boolean','3060JlJuhg','2480013OOAfAI','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','Notification\x20channel\x20type','28132wBwRQY','read','type','\x20notification\x20config(s)','string','appCode','length','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','7632jOZPzb','10986960WSuHGo','flat','464444iAFejP','bool','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','str','all','63FchCyN','9YAXClC','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.'];a194_0x4d08=function(){return _0x1f7715;};return a194_0x4d08();}import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x50c4(_0x2205a2,_0xd28943){_0x2205a2=_0x2205a2-0x14b;const _0x4d08e5=a194_0x4d08();let _0x50c49b=_0x4d08e5[_0x2205a2];return _0x50c49b;}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':'config-list','description':a194_0x13dffb(0x14f),'risk':a194_0x13dffb(0x165),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x13dffb(0x166),'type':a194_0x13dffb(0x14c),'description':a194_0x13dffb(0x163),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x13dffb(0x157),'type':a194_0x13dffb(0x15e),'default':![],'description':a194_0x13dffb(0x162)}],async 'validate'(_0x34c2cd){const _0x214474=a194_0x13dffb;if(_0x34c2cd[_0x214474(0x154)]('all')&&_0x34c2cd[_0x214474(0x156)]('type')['trim']())throw CliErrors[_0x214474(0x15d)](_0x214474(0x155),_0x214474(0x15a));if(_0x34c2cd[_0x214474(0x154)](_0x214474(0x157)))return;readNotificationChannelType(_0x34c2cd);},async 'execute'(_0x2a3d7f){const _0x405ddf=a194_0x13dffb;if(_0x2a3d7f[_0x405ddf(0x154)]('all')){const _0x3e870b=await Promise[_0x405ddf(0x157)](NOTIFICATION_CHANNEL_TYPES['map'](_0x3f868d=>listNotificationChannelConfigs(_0x2a3d7f[_0x405ddf(0x14d)],_0x3f868d))),_0x567f8b=_0x3e870b[_0x405ddf(0x152)]()[_0x405ddf(0x161)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a3d7f[_0x405ddf(0x14d)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x567f8b[_0x405ddf(0x14e)],'configs':_0x567f8b},'message':'Found\x20'+_0x567f8b[_0x405ddf(0x14e)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x534741=readNotificationChannelType(_0x2a3d7f),_0x10270c=await listNotificationChannelConfigs(_0x2a3d7f[_0x405ddf(0x14d)],_0x534741),_0x42b364=_0x10270c[_0x405ddf(0x161)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a3d7f[_0x405ddf(0x14d)],'channelType':_0x534741,'count':_0x42b364[_0x405ddf(0x14e)],'configs':_0x42b364},'message':'Found\x20'+_0x42b364[_0x405ddf(0x14e)]+'\x20'+_0x534741+_0x405ddf(0x14b)};}};
@@ -1 +1 @@
1
- const a188_0x4bef51=a188_0x4032;function a188_0x35aa(){const _0x483223=[';\x20do\x20not\x20resubmit\x20automatically.','update','high-risk-write','191234iHnUXm','appCode','13321fEppyy','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','4282490fdUGYM','patch','2363895LNIlVQ','before','5dxYoGR','notification_config_update_verification_unavailable','notification_config_update_outcome_unknown','2956316sPCKwX','Inspect\x20with\x20--id\x20','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Inspect\x20ID\x20','allMatch','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Notification\x20config\x20','\x20with\x20','2204592cSBQWp',';\x20no\x20automatic\x20retry\x20was\x20attempted.','provesChange','12yYtcZv','channelType','verified','776dIzqHH','config-update','verifiedFields','payload','Updated\x20notification\x20config\x20','\x20via\x20','planned','POST','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','5368410osHhHj'];a188_0x35aa=function(){return _0x483223;};return a188_0x35aa();}(function(_0x11d956,_0x1d1ded){const _0x42fa6e=a188_0x4032,_0x1de6c0=_0x11d956();while(!![]){try{const _0x1bd9c1=-parseInt(_0x42fa6e(0xd7))/0x1*(parseInt(_0x42fa6e(0xcf))/0x2)+-parseInt(_0x42fa6e(0xe2))/0x3+parseInt(_0x42fa6e(0xda))/0x4+-parseInt(_0x42fa6e(0xd5))/0x5*(-parseInt(_0x42fa6e(0xe5))/0x6)+-parseInt(_0x42fa6e(0xd1))/0x7*(-parseInt(_0x42fa6e(0xe8))/0x8)+-parseInt(_0x42fa6e(0xcb))/0x9+parseInt(_0x42fa6e(0xd3))/0xa;if(_0x1bd9c1===_0x1d1ded)break;else _0x1de6c0['push'](_0x1de6c0['shift']());}catch(_0x15972d){_0x1de6c0['push'](_0x1de6c0['shift']());}}}(a188_0x35aa,0x77266));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x1e9e88){const _0x13cbb1=a188_0x4032,_0x18cc12=readNotificationId(_0x1e9e88),_0x4b00c5=await readNotificationDocument(_0x1e9e88,'update'),_0x124563=await requireExactNotificationConfig(_0x1e9e88['appCode'],_0x18cc12,_0x13cbb1(0xcd));return{'id':_0x18cc12,'patch':_0x4b00c5,'before':_0x124563,'payload':mergeUpdateInput(_0x124563,_0x4b00c5),'planned':plannedUpdateProjection(_0x124563,_0x4b00c5)};}function a188_0x4032(_0x3a8476,_0x57c1b5){_0x3a8476=_0x3a8476-0xc7;const _0x35aa98=a188_0x35aa();let _0x403279=_0x35aa98[_0x3a8476];return _0x403279;}export const notificationConfigUpdate={'service':'notification','command':a188_0x4bef51(0xe9),'description':a188_0x4bef51(0xdc),'risk':a188_0x4bef51(0xce),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x54d0ad){readNotificationId(_0x54d0ad),assertSingleNotificationSource(_0x54d0ad),requireNotificationExplicitYes(_0x54d0ad);},async 'dryRun'(_0x54730d){const _0x16f24f=a188_0x4bef51,_0x3dafb1=await prepareUpdate(_0x54730d),_0x2c9e99=notificationLookupCommand(_0x54730d[_0x16f24f(0xd0)],_0x3dafb1[_0x16f24f(0xd6)][_0x16f24f(0xe6)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x3dafb1[_0x16f24f(0xd6)]),'before':projectNotificationConfig(_0x3dafb1[_0x16f24f(0xd6)]),'after':_0x3dafb1['planned'],'dryRun':!![],'backend':{'method':_0x16f24f(0xc9),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x16f24f(0xc8),'lookupCommand':_0x2c9e99}},{'method':_0x16f24f(0xc9),'url':UPDATE_PATH});},async 'execute'(_0x139b4e){const _0x2338b1=a188_0x4bef51;requireNotificationExplicitYes(_0x139b4e);const _0x1e2941=await prepareUpdate(_0x139b4e),_0x3564b9=notificationLookupCommand(_0x139b4e[_0x2338b1(0xd0)],_0x1e2941[_0x2338b1(0xd6)][_0x2338b1(0xe6)]);let _0x4cdede=![];try{await updateNotificationChannelConfig(_0x1e2941[_0x2338b1(0xeb)]);}catch(_0x3951d5){if(!isPlatformTransportFailure(_0x3951d5))throw safeApiFailure(_0x2338b1(0xcd),'mutation',_0x2338b1(0xdd)+_0x1e2941['id']+_0x2338b1(0xe1)+_0x3564b9+_0x2338b1(0xe3));_0x4cdede=!![];}let _0x98e130;try{const _0x3ac843=await getNotificationChannelConfig(_0x1e2941['id'],_0x139b4e[_0x2338b1(0xd0)]);_0x98e130=normalizeExactNotificationConfig(_0x3ac843,_0x1e2941['id'],_0x139b4e['appCode']);}catch{throw notificationError(_0x4cdede?_0x2338b1(0xd9):_0x2338b1(0xd8),_0x2338b1(0xe0)+_0x1e2941['id']+_0x2338b1(0xd2),'Inspect\x20with\x20--id\x20'+_0x1e2941['id']+'\x20via\x20'+_0x3564b9+_0x2338b1(0xcc));}const _0x9cee31=requestedSafeFieldsMatch(_0x1e2941['before'],_0x98e130,_0x1e2941[_0x2338b1(0xd4)]);if(!_0x9cee31[_0x2338b1(0xde)]||_0x4cdede&&!_0x9cee31[_0x2338b1(0xe4)])throw notificationError(_0x4cdede?_0x2338b1(0xd9):'notification_config_update_verification_failed',_0x2338b1(0xe0)+_0x1e2941['id']+_0x2338b1(0xdf),_0x2338b1(0xdb)+_0x1e2941['id']+_0x2338b1(0xc7)+_0x3564b9+';\x20do\x20not\x20resubmit\x20automatically.');const _0x321591=_0x4cdede?[_0x2338b1(0xca)]:[];return{'ok':!![],'data':{'operation':_0x2338b1(0xcd),'selector':notificationSelector(_0x98e130),'before':projectNotificationConfig(_0x1e2941[_0x2338b1(0xd6)]),'after':projectNotificationConfig(_0x98e130),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x321591,'verification':{'status':_0x2338b1(0xe7),'recoveredAfterUnknownResponse':_0x4cdede,'verifiedFields':_0x9cee31[_0x2338b1(0xea)],'lookupCommand':_0x3564b9}},'message':_0x2338b1(0xec)+_0x98e130['id']};}};
1
+ const a195_0x27855d=a195_0x5c88;(function(_0x42e688,_0xffa44){const _0x41025d=a195_0x5c88,_0x228c8a=_0x42e688();while(!![]){try{const _0x2e2d34=parseInt(_0x41025d(0x19b))/0x1+-parseInt(_0x41025d(0x1a6))/0x2+parseInt(_0x41025d(0x19f))/0x3+-parseInt(_0x41025d(0x1c0))/0x4*(parseInt(_0x41025d(0x1b9))/0x5)+parseInt(_0x41025d(0x1c1))/0x6+parseInt(_0x41025d(0x1b6))/0x7*(parseInt(_0x41025d(0x1a0))/0x8)+-parseInt(_0x41025d(0x1a5))/0x9;if(_0x2e2d34===_0xffa44)break;else _0x228c8a['push'](_0x228c8a['shift']());}catch(_0x24841b){_0x228c8a['push'](_0x228c8a['shift']());}}}(a195_0x1e83,0x1a0bb));function a195_0x5c88(_0x219dba,_0x3eb644){_0x219dba=_0x219dba-0x19a;const _0x1e830f=a195_0x1e83();let _0x5c884b=_0x1e830f[_0x219dba];return _0x5c884b;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x27855d(0x1bb);async function prepareUpdate(_0x2ef104){const _0xaaa532=a195_0x27855d,_0x32f483=readNotificationId(_0x2ef104),_0x567a64=await readNotificationDocument(_0x2ef104,_0xaaa532(0x1b4)),_0x3a14f3=await requireExactNotificationConfig(_0x2ef104[_0xaaa532(0x1b0)],_0x32f483,'update');return{'id':_0x32f483,'patch':_0x567a64,'before':_0x3a14f3,'payload':mergeUpdateInput(_0x3a14f3,_0x567a64),'planned':plannedUpdateProjection(_0x3a14f3,_0x567a64)};}export const notificationConfigUpdate={'service':a195_0x27855d(0x1a9),'command':a195_0x27855d(0x1a7),'description':a195_0x27855d(0x1a2),'risk':a195_0x27855d(0x1ae),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2c413e){readNotificationId(_0x2c413e),assertSingleNotificationSource(_0x2c413e),requireNotificationExplicitYes(_0x2c413e);},async 'dryRun'(_0x265d15){const _0x165a98=a195_0x27855d,_0x4c2e99=await prepareUpdate(_0x265d15),_0x36d937=notificationLookupCommand(_0x265d15[_0x165a98(0x1b0)],_0x4c2e99[_0x165a98(0x1a4)][_0x165a98(0x1aa)]);return asDryRunResult({'operation':_0x165a98(0x1b4),'selector':notificationSelector(_0x4c2e99[_0x165a98(0x1a4)]),'before':projectNotificationConfig(_0x4c2e99[_0x165a98(0x1a4)]),'after':_0x4c2e99[_0x165a98(0x1af)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x165a98(0x1af),'lookupCommand':_0x36d937}},{'method':_0x165a98(0x19a),'url':UPDATE_PATH});},async 'execute'(_0x23ea26){const _0x426b97=a195_0x27855d;requireNotificationExplicitYes(_0x23ea26);const _0xee4600=await prepareUpdate(_0x23ea26),_0x27f095=notificationLookupCommand(_0x23ea26[_0x426b97(0x1b0)],_0xee4600[_0x426b97(0x1a4)]['channelType']);let _0x320b3b=![];try{await updateNotificationChannelConfig(_0xee4600[_0x426b97(0x1a3)]);}catch(_0x4e21c0){if(!isPlatformTransportFailure(_0x4e21c0))throw safeApiFailure(_0x426b97(0x1b4),_0x426b97(0x1b3),_0x426b97(0x1ab)+_0xee4600['id']+_0x426b97(0x1bf)+_0x27f095+_0x426b97(0x1b7));_0x320b3b=!![];}let _0x363b12;try{const _0x238754=await getNotificationChannelConfig(_0xee4600['id'],_0x23ea26[_0x426b97(0x1b0)]);_0x363b12=normalizeExactNotificationConfig(_0x238754,_0xee4600['id'],_0x23ea26['appCode']);}catch{throw notificationError(_0x320b3b?_0x426b97(0x1a1):_0x426b97(0x1a8),_0x426b97(0x19c)+_0xee4600['id']+_0x426b97(0x19d),_0x426b97(0x1b1)+_0xee4600['id']+_0x426b97(0x1ac)+_0x27f095+_0x426b97(0x1be));}const _0x286400=requestedSafeFieldsMatch(_0xee4600[_0x426b97(0x1a4)],_0x363b12,_0xee4600['patch']);if(!_0x286400[_0x426b97(0x19e)]||_0x320b3b&&!_0x286400[_0x426b97(0x1bd)])throw notificationError(_0x320b3b?_0x426b97(0x1a1):_0x426b97(0x1ba),'Notification\x20config\x20'+_0xee4600['id']+_0x426b97(0x1ad),_0x426b97(0x1b1)+_0xee4600['id']+_0x426b97(0x1ac)+_0x27f095+_0x426b97(0x1be));const _0x2a69a5=_0x320b3b?[_0x426b97(0x1b5)]:[];return{'ok':!![],'data':{'operation':_0x426b97(0x1b4),'selector':notificationSelector(_0x363b12),'before':projectNotificationConfig(_0xee4600[_0x426b97(0x1a4)]),'after':projectNotificationConfig(_0x363b12),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x2a69a5,'verification':{'status':_0x426b97(0x1b2),'recoveredAfterUnknownResponse':_0x320b3b,'verifiedFields':_0x286400[_0x426b97(0x1b8)],'lookupCommand':_0x27f095}},'message':_0x426b97(0x1bc)+_0x363b12['id']};}};function a195_0x1e83(){const _0x304cb0=['2066076fYGnqj','2820XHArgd','config-update','notification_config_update_verification_unavailable','notification','channelType','Inspect\x20ID\x20','\x20via\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','high-risk-write','planned','appCode','Inspect\x20with\x20--id\x20','verified','mutation','update','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','138439NRSzdM',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verifiedFields','5XJoUrF','notification_config_update_verification_failed','/notification/channel-config/update','Updated\x20notification\x20config\x20','provesChange',';\x20do\x20not\x20resubmit\x20automatically.','\x20with\x20','125276OvSiRN','734832lVarwB','POST','14480peORnN','Notification\x20config\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','allMatch','280755lZBGhb','56ZvddXb','notification_config_update_outcome_unknown','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','payload','before'];a195_0x1e83=function(){return _0x304cb0;};return a195_0x1e83();}
@@ -1 +1 @@
1
- (function(_0x47e70a,_0x3e03a6){const _0x3d7740=a189_0x16d8,_0x443485=_0x47e70a();while(!![]){try{const _0x36c8f3=parseInt(_0x3d7740(0x1cb))/0x1*(-parseInt(_0x3d7740(0x1ce))/0x2)+parseInt(_0x3d7740(0x1cd))/0x3*(parseInt(_0x3d7740(0x1d6))/0x4)+parseInt(_0x3d7740(0x1cc))/0x5+-parseInt(_0x3d7740(0x1d5))/0x6*(parseInt(_0x3d7740(0x1d0))/0x7)+-parseInt(_0x3d7740(0x1d2))/0x8*(parseInt(_0x3d7740(0x1d4))/0x9)+parseInt(_0x3d7740(0x1cf))/0xa*(parseInt(_0x3d7740(0x1d1))/0xb)+-parseInt(_0x3d7740(0x1d3))/0xc;if(_0x36c8f3===_0x3e03a6)break;else _0x443485['push'](_0x443485['shift']());}catch(_0x1580eb){_0x443485['push'](_0x443485['shift']());}}}(a189_0x5401,0x6422c));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a189_0x5401(){const _0x5670f4=['201733xVDMsA','1753191kvZGnJ','8QGLAoW','871116zyYHmR','5462559jaSVIE','18PnCGwL','12dYuIPa','463479UVlabg','2043140iGJzFC','752865UtntFX','2YEDALC','30ffjxxH'];a189_0x5401=function(){return _0x5670f4;};return a189_0x5401();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a189_0x16d8(_0x39ab9b,_0x14cfbf){_0x39ab9b=_0x39ab9b-0x1cb;const _0x540103=a189_0x5401();let _0x16d8e2=_0x540103[_0x39ab9b];return _0x16d8e2;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x2e35cf,_0x2dad1c){const _0x256a58=a196_0x1791,_0x2fc73f=_0x2e35cf();while(!![]){try{const _0x53725a=-parseInt(_0x256a58(0xd5))/0x1*(-parseInt(_0x256a58(0xd8))/0x2)+-parseInt(_0x256a58(0xd7))/0x3+-parseInt(_0x256a58(0xdb))/0x4*(parseInt(_0x256a58(0xd4))/0x5)+parseInt(_0x256a58(0xd2))/0x6+parseInt(_0x256a58(0xd3))/0x7+-parseInt(_0x256a58(0xda))/0x8+parseInt(_0x256a58(0xd6))/0x9*(parseInt(_0x256a58(0xd9))/0xa);if(_0x53725a===_0x2dad1c)break;else _0x2fc73f['push'](_0x2fc73f['shift']());}catch(_0x4d6fc6){_0x2fc73f['push'](_0x2fc73f['shift']());}}}(a196_0x2c18,0x86701));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x1791(_0x2bc04b,_0x5ebf22){_0x2bc04b=_0x2bc04b-0xd2;const _0x2c188f=a196_0x2c18();let _0x17914d=_0x2c188f[_0x2bc04b];return _0x17914d;}function a196_0x2c18(){const _0x27dab2=['168abinFy','230uKMlOY','3171176BpxWKA','777052xBSojF','4514778YfMaBo','3309677kPEhPn','25wsnZpe','8354xdCBSy','286245oRSZHq','2220468UJknaE'];a196_0x2c18=function(){return _0x27dab2;};return a196_0x2c18();}
@@ -1 +1 @@
1
- const a190_0x2dc258=a190_0x5c12;(function(_0xa41511,_0x1caadb){const _0x43083e=a190_0x5c12,_0x18b47a=_0xa41511();while(!![]){try{const _0x3ffdb0=parseInt(_0x43083e(0x187))/0x1+parseInt(_0x43083e(0x14d))/0x2+parseInt(_0x43083e(0x191))/0x3+-parseInt(_0x43083e(0x12f))/0x4+parseInt(_0x43083e(0x1a5))/0x5*(parseInt(_0x43083e(0x15a))/0x6)+parseInt(_0x43083e(0x19c))/0x7+-parseInt(_0x43083e(0x150))/0x8;if(_0x3ffdb0===_0x1caadb)break;else _0x18b47a['push'](_0x18b47a['shift']());}catch(_0x261163){_0x18b47a['push'](_0x18b47a['shift']());}}}(a190_0x3ec6,0x2de49));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a190_0x2dc258(0x1a6),a190_0x2dc258(0x149),a190_0x2dc258(0x164),'WECOM',a190_0x2dc258(0x18a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a190_0x2dc258(0x1a4),a190_0x2dc258(0x15f),a190_0x2dc258(0x195),a190_0x2dc258(0x133),a190_0x2dc258(0x188),a190_0x2dc258(0x18c),a190_0x2dc258(0x18f)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a190_0x2dc258(0x190),a190_0x2dc258(0x12a),a190_0x2dc258(0x192)]),EMAIL_RECIPIENT_FIELDS=new Set([a190_0x2dc258(0x155),a190_0x2dc258(0x134),a190_0x2dc258(0x16a),a190_0x2dc258(0x141),a190_0x2dc258(0x143),a190_0x2dc258(0x13e),a190_0x2dc258(0x12d),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a190_0x2dc258(0x18e)},{'name':a190_0x2dc258(0x19b),'type':a190_0x2dc258(0x176),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a190_0x2dc258(0x140),'type':a190_0x2dc258(0x197),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a190_0x2dc258(0x15c)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x4678b7,_0xaa9785,_0x39e5c2){return new CliError(_0x4678b7,0x1,_0xaa9785,_0x39e5c2);}export function readNotificationId(_0x371a53){const _0x25a0bb=a190_0x2dc258,_0x291adb=_0x371a53[_0x25a0bb(0x13d)]('id');if(!Number[_0x25a0bb(0x193)](_0x291adb)||_0x291adb<=0x0)throw notificationError(_0x25a0bb(0x174),_0x25a0bb(0x16d));return _0x291adb;}export function requireNotificationExplicitYes(_0x467e64){const _0x4610db=a190_0x2dc258;if(_0x467e64[_0x4610db(0x173)](_0x4610db(0x171))||_0x467e64[_0x4610db(0x173)](_0x4610db(0x156)))return;throw notificationError(_0x4610db(0x138),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3c5a8e,_0x1de191=a190_0x2dc258(0x161),_0x29d7ac=a190_0x2dc258(0x1a6)){const _0x3fdb05=a190_0x2dc258,_0x483dfe=_0x3c5a8e[_0x3fdb05(0x179)](_0x1de191)['trim']()||_0x29d7ac;if(!NOTIFICATION_CHANNEL_TYPES[_0x3fdb05(0x127)](_0x483dfe))throw CliErrors['validation'](_0x3fdb05(0x166)+_0x1de191+':\x20'+_0x483dfe,_0x3fdb05(0x158)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x483dfe;}export function assertSingleNotificationSource(_0x21182e){const _0x3253be=a190_0x2dc258,_0x4384cb=[],_0x572059=_0x21182e[_0x3253be(0x179)]('file')['trim']();if(_0x572059)_0x4384cb[_0x3253be(0x198)]({'kind':'file','path':_0x572059});if(_0x21182e[_0x3253be(0x173)](_0x3253be(0x19b)))_0x4384cb[_0x3253be(0x198)]({'kind':_0x3253be(0x19b)});const _0x443e1f=_0x21182e[_0x3253be(0x179)](_0x3253be(0x140))['trim']();if(_0x443e1f)_0x4384cb[_0x3253be(0x198)]({'kind':_0x3253be(0x12e),'name':_0x443e1f});if(_0x4384cb[_0x3253be(0x139)]===0x0)throw CliErrors[_0x3253be(0x1a3)](_0x3253be(0x181),_0x3253be(0x169));if(_0x4384cb[_0x3253be(0x139)]>0x1)throw CliErrors[_0x3253be(0x1a3)](_0x3253be(0x163),_0x3253be(0x169));return _0x4384cb[0x0];}export async function readNotificationDocument(_0x36d430,_0x54c0b5){const _0x884d6c=a190_0x2dc258,_0x243357=assertSingleNotificationSource(_0x36d430),_0x548ff2=_0x243357['kind']===_0x884d6c(0x16b)?'file\x20'+_0x243357[_0x884d6c(0x12c)]:_0x243357[_0x884d6c(0x17c)]===_0x884d6c(0x12e)?_0x884d6c(0x160)+_0x243357[_0x884d6c(0x14b)]:_0x884d6c(0x19b);let _0x2db666;try{if(_0x243357[_0x884d6c(0x17c)]===_0x884d6c(0x16b))_0x2db666=await readFile(_0x243357['path'],_0x884d6c(0x183));else{if(_0x243357['kind']===_0x884d6c(0x12e)){if(!(_0x243357[_0x884d6c(0x14b)]in process.env))throw notificationError(_0x884d6c(0x19e),_0x884d6c(0x13a)+_0x243357['name']);_0x2db666=process.env[_0x243357.name]??'';}else _0x2db666=await readStdin();}}catch(_0x192cad){if(_0x192cad instanceof CliError)throw _0x192cad;throw notificationError('notification_config_source_unavailable',_0x884d6c(0x1a1)+_0x548ff2+'.');}let _0x25aab9;try{_0x25aab9=JSON['parse'](_0x2db666);}catch{throw notificationError(_0x884d6c(0x194),_0x884d6c(0x144)+_0x548ff2+_0x884d6c(0x147),_0x884d6c(0x168));}if(!isJsonObject(_0x25aab9))throw notificationError(_0x884d6c(0x194),_0x884d6c(0x144)+_0x548ff2+_0x884d6c(0x153));return validateNotificationDocument(_0x25aab9,_0x54c0b5);}export function projectNotificationListConfig(_0x1d7103,_0xa8f5c3){const _0x17d5b3=a190_0x2dc258;return{'id':typeof _0x1d7103['id']===_0x17d5b3(0x136)?_0x1d7103['id']:null,'configCode':requireResponseString(_0x1d7103[_0x17d5b3(0x12a)],'configCode',_0xa8f5c3),'configName':requireResponseString(_0x1d7103[_0x17d5b3(0x1a4)],_0x17d5b3(0x1a4),_0xa8f5c3),'channelType':requireResponseString(_0x1d7103[_0x17d5b3(0x15f)],_0x17d5b3(0x15f),_0xa8f5c3),'description':normalizeNullableString(_0x1d7103[_0x17d5b3(0x188)]),'createTime':normalizeNullableString(_0x1d7103['createTime']),'updateTime':normalizeNullableString(_0x1d7103[_0x17d5b3(0x137)])};}export function normalizeExactNotificationConfig(_0x2f3de7,_0x4da75f,_0x231b79){const _0x467d59=a190_0x2dc258;if(!Number[_0x467d59(0x193)](_0x2f3de7['id'])||_0x2f3de7['id']!==_0x4da75f)throw notificationError(_0x467d59(0x14a),_0x467d59(0x19f)+_0x4da75f+'.');if(_0x2f3de7[_0x467d59(0x190)]!==_0x231b79)throw notificationError(_0x467d59(0x14a),_0x467d59(0x131)+_0x4da75f+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x289f44=requireExactString(_0x2f3de7[_0x467d59(0x1a4)],_0x467d59(0x1a4),_0x4da75f),_0x37670c=requireExactString(_0x2f3de7[_0x467d59(0x12a)],'configCode',_0x4da75f),_0x3c29bd=requireExactString(_0x2f3de7[_0x467d59(0x15f)],'channelType',_0x4da75f);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3c29bd))throw notificationError(_0x467d59(0x14a),_0x467d59(0x131)+_0x4da75f+_0x467d59(0x151));const _0x2143a7=responseNullableString(_0x2f3de7['endpointUrl'],_0x467d59(0x195),_0x4da75f),_0x524a27=responseNullableString(_0x2f3de7['channelConfig'],'channelConfig',_0x4da75f),_0xefdf2e=responseNullableString(_0x2f3de7[_0x467d59(0x188)],'description',_0x4da75f),_0x5871d3=responseNullableTimeout(_0x2f3de7[_0x467d59(0x18c)],_0x467d59(0x18c),_0x4da75f),_0x20c146=responseNullableTimeout(_0x2f3de7[_0x467d59(0x18f)],_0x467d59(0x18f),_0x4da75f);return{'id':_0x4da75f,'appCode':_0x231b79,'configCode':_0x37670c,'configName':_0x289f44,'channelType':_0x3c29bd,'endpointUrl':redactSensitive(_0x2143a7),'channelConfig':redactSensitive(_0x524a27),'description':_0xefdf2e,'connectTimeout':_0x5871d3,'readTimeout':_0x20c146,'endpointUrlRaw':_0x2143a7,'channelConfigRaw':_0x524a27};}export async function requireExactNotificationConfig(_0x5433c2,_0x1d26ef,_0x13d878){const _0x5ae96f=a190_0x2dc258;let _0x1985cb;try{_0x1985cb=await getNotificationChannelConfig(_0x1d26ef,_0x5433c2);}catch{throw safeApiFailure(_0x13d878,_0x5ae96f(0x165),_0x5ae96f(0x199)+_0x5433c2+_0x5ae96f(0x19d));}return normalizeExactNotificationConfig(_0x1985cb,_0x1d26ef,_0x5433c2);}export function projectNotificationConfig(_0x52787c){const _0x3ad761=a190_0x2dc258;return{'id':_0x52787c['id']??null,'appCode':_0x52787c[_0x3ad761(0x190)],'configCode':_0x52787c['configCode']??null,'configName':_0x52787c['configName'],'channelType':_0x52787c['channelType'],'endpointUrl':redactSensitive(_0x52787c[_0x3ad761(0x195)]),'channelConfig':redactSensitive(_0x52787c[_0x3ad761(0x133)]),'description':_0x52787c['description']??null,'connectTimeout':_0x52787c[_0x3ad761(0x18c)]??null,'readTimeout':_0x52787c[_0x3ad761(0x18f)]??null};}export function notificationSelector(_0x4c5bae){const _0x379dea=a190_0x2dc258;return{'appCode':_0x4c5bae[_0x379dea(0x190)],'id':_0x4c5bae['id'],'configCode':_0x4c5bae[_0x379dea(0x12a)],'configName':_0x4c5bae['configName'],'channelType':_0x4c5bae[_0x379dea(0x15f)]};}export function createMutationInput(_0x3f5f73,_0x5d4dfe){const _0x4458f2=a190_0x2dc258;return{'appCode':_0x3f5f73,'configName':_0x5d4dfe['configName'],'channelType':_0x5d4dfe[_0x4458f2(0x15f)],...hasOwn(_0x5d4dfe,_0x4458f2(0x195))?{'endpointUrl':_0x5d4dfe[_0x4458f2(0x195)]}:{},...hasOwn(_0x5d4dfe,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x5d4dfe[_0x4458f2(0x133)])}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x188))?{'description':_0x5d4dfe[_0x4458f2(0x188)]}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x18c))?{'connectTimeout':_0x5d4dfe[_0x4458f2(0x18c)]}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x18f))?{'readTimeout':_0x5d4dfe['readTimeout']}:{}};}export function mergeUpdateInput(_0x45cbed,_0x22a696){const _0x295325=a190_0x2dc258;return{'id':_0x45cbed['id'],'appCode':_0x45cbed[_0x295325(0x190)],'configName':_0x22a696['configName']??_0x45cbed[_0x295325(0x1a4)],'channelType':_0x22a696[_0x295325(0x15f)]??_0x45cbed['channelType'],'endpointUrl':hasOwn(_0x22a696,'endpointUrl')?_0x22a696[_0x295325(0x195)]:_0x45cbed['endpointUrlRaw'],'channelConfig':hasOwn(_0x22a696,'channelConfig')?serializeChannelConfig(_0x22a696[_0x295325(0x133)]):_0x45cbed[_0x295325(0x167)],'description':hasOwn(_0x22a696,'description')?_0x22a696[_0x295325(0x188)]:_0x45cbed[_0x295325(0x188)],'connectTimeout':hasOwn(_0x22a696,_0x295325(0x18c))?_0x22a696[_0x295325(0x18c)]:_0x45cbed[_0x295325(0x18c)],'readTimeout':hasOwn(_0x22a696,_0x295325(0x18f))?_0x22a696[_0x295325(0x18f)]:_0x45cbed[_0x295325(0x18f)]};}export function plannedUpdateProjection(_0x4df693,_0x22b659){const _0x1c2191=a190_0x2dc258;return projectNotificationConfig({'id':_0x4df693['id'],'appCode':_0x4df693[_0x1c2191(0x190)],'configCode':_0x4df693[_0x1c2191(0x12a)],'configName':_0x22b659['configName']??_0x4df693['configName'],'channelType':_0x22b659['channelType']??_0x4df693[_0x1c2191(0x15f)],'endpointUrl':hasOwn(_0x22b659,_0x1c2191(0x195))?_0x22b659[_0x1c2191(0x195)]:_0x4df693['endpointUrlRaw'],'channelConfig':hasOwn(_0x22b659,_0x1c2191(0x133))?_0x22b659['channelConfig']:_0x4df693[_0x1c2191(0x167)],'description':hasOwn(_0x22b659,_0x1c2191(0x188))?_0x22b659[_0x1c2191(0x188)]:_0x4df693['description'],'connectTimeout':hasOwn(_0x22b659,_0x1c2191(0x18c))?_0x22b659['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4df693[_0x1c2191(0x18c)],'readTimeout':hasOwn(_0x22b659,_0x1c2191(0x18f))?_0x22b659[_0x1c2191(0x18f)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4df693[_0x1c2191(0x18f)]});}export function requestedSafeFieldsMatch(_0x46f502,_0x31f68c,_0x4368b5){const _0x23c7ea=a190_0x2dc258,_0x12d5c8=[],_0x4b511b=[],_0x5d366d=[];for(const _0x102223 of[_0x23c7ea(0x1a4),_0x23c7ea(0x15f),_0x23c7ea(0x188)]){if(!hasOwn(_0x4368b5,_0x102223))continue;_0x5d366d['push'](_0x102223),_0x12d5c8['push'](_0x31f68c[_0x102223]===_0x4368b5[_0x102223]),_0x4b511b[_0x23c7ea(0x198)](_0x46f502[_0x102223]!==_0x4368b5[_0x102223]&&_0x31f68c[_0x102223]===_0x4368b5[_0x102223]);}for(const _0x266f05 of[_0x23c7ea(0x18c),_0x23c7ea(0x18f)]){if(!hasOwn(_0x4368b5,_0x266f05))continue;const _0x43804a=_0x4368b5[_0x266f05]??(_0x266f05===_0x23c7ea(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5d366d['push'](_0x266f05),_0x12d5c8['push'](_0x31f68c[_0x266f05]===_0x43804a),_0x4b511b[_0x23c7ea(0x198)](_0x46f502[_0x266f05]!==_0x43804a&&_0x31f68c[_0x266f05]===_0x43804a);}return hasOwn(_0x4368b5,_0x23c7ea(0x195))&&_0x4368b5[_0x23c7ea(0x195)]===null&&(_0x5d366d[_0x23c7ea(0x198)](_0x23c7ea(0x13c)),_0x12d5c8[_0x23c7ea(0x198)](_0x31f68c[_0x23c7ea(0x17b)]===null||_0x31f68c[_0x23c7ea(0x17b)]===''),_0x4b511b[_0x23c7ea(0x198)](_0x46f502['endpointUrlRaw']!==null&&_0x46f502[_0x23c7ea(0x17b)]!==''&&(_0x31f68c[_0x23c7ea(0x17b)]===null||_0x31f68c[_0x23c7ea(0x17b)]===''))),{'allMatch':_0x12d5c8['every'](Boolean),'provesChange':_0x4b511b[_0x23c7ea(0x186)](Boolean),'verifiedFields':_0x5d366d};}export function validateNotificationDeleteReadback(_0x1a320f,_0x44d0d0,_0x4a2f21){const _0x1ed7a9=a190_0x2dc258;for(const [_0xc101e1,_0x476c85]of _0x1a320f[_0x1ed7a9(0x19a)]()){if(!Number['isSafeInteger'](_0x476c85['id'])||_0x476c85['id']<=0x0)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x476c85[_0x1ed7a9(0x190)]!==_0x44d0d0)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+_0x1ed7a9(0x17f));if(_0x476c85[_0x1ed7a9(0x15f)]!==_0x4a2f21)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+_0x1ed7a9(0x16e));}}export function safeApiFailure(_0x5115b7,_0x2b46e5,_0x11b3e4){const _0x460d22=a190_0x2dc258;return notificationError('notification_config_'+_0x5115b7+'_'+(_0x2b46e5===_0x460d22(0x17a)?'failed':_0x2b46e5+_0x460d22(0x185)),'Notification\x20config\x20'+_0x5115b7+'\x20'+_0x2b46e5+_0x460d22(0x146),_0x11b3e4);}export function notificationLookupCommand(_0x35d149,_0x2536da){const _0xcc8256=a190_0x2dc258;return _0xcc8256(0x13f)+_0x35d149+_0xcc8256(0x16f)+_0x2536da+_0xcc8256(0x172);}function validateNotificationDocument(_0x839ad1,_0x9e87d2){const _0x5b12c5=a190_0x2dc258;for(const _0x5af212 of Object[_0x5b12c5(0x12b)](_0x839ad1)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5b12c5(0x15b)](_0x5af212))throw notificationError(_0x5b12c5(0x178),'Notification\x20JSON\x20field\x20\x22'+_0x5af212+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x5b12c5(0x15b)](_0x5af212))throw notificationError(_0x5b12c5(0x15d),_0x5b12c5(0x16c)+_0x5af212+'\x22.');}if(_0x9e87d2===_0x5b12c5(0x1a0)&&Object[_0x5b12c5(0x12b)](_0x839ad1)[_0x5b12c5(0x139)]===0x0)throw notificationError(_0x5b12c5(0x128),_0x5b12c5(0x18d));const _0x5b16f0={};if(hasOwn(_0x839ad1,_0x5b12c5(0x1a4)))_0x5b16f0[_0x5b12c5(0x1a4)]=validateRequiredString(_0x839ad1['configName'],_0x5b12c5(0x1a4),0x80);else{if(_0x9e87d2==='create')throw notificationError(_0x5b12c5(0x17d),'Create\x20JSON\x20requires\x20field\x20'+_0x5b12c5(0x14e));}if(hasOwn(_0x839ad1,_0x5b12c5(0x15f))){if(typeof _0x839ad1[_0x5b12c5(0x15f)]!==_0x5b12c5(0x197))throw invalidFieldType(_0x5b12c5(0x15f),_0x5b12c5(0x180));const _0x18afdf=_0x839ad1[_0x5b12c5(0x15f)][_0x5b12c5(0x13b)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x18afdf))throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x162),_0x5b12c5(0x158)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5b16f0['channelType']=_0x18afdf;}else{if(_0x9e87d2===_0x5b12c5(0x1a2))throw notificationError('notification_config_field_required','Create\x20JSON\x20requires\x20field\x20'+_0x5b12c5(0x14c));}for(const [_0x3b104e,_0x469c57]of[[_0x5b12c5(0x195),0x200],[_0x5b12c5(0x188),0x100]]){if(!hasOwn(_0x839ad1,_0x3b104e))continue;const _0x206bc0=_0x839ad1[_0x3b104e];if(_0x206bc0!==null&&typeof _0x206bc0!==_0x5b12c5(0x197))throw invalidFieldType(_0x3b104e,_0x5b12c5(0x14f));if(typeof _0x206bc0===_0x5b12c5(0x197)&&_0x206bc0['length']>_0x469c57)throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x184)+_0x3b104e+_0x5b12c5(0x132)+_0x469c57+_0x5b12c5(0x175));_0x5b16f0[_0x3b104e]=_0x206bc0;}if(hasOwn(_0x839ad1,_0x5b12c5(0x133))){const _0x2921a0=_0x839ad1[_0x5b12c5(0x133)];if(_0x2921a0===null&&_0x9e87d2===_0x5b12c5(0x1a2))throw invalidFieldType(_0x5b12c5(0x133),_0x5b12c5(0x135));if(_0x2921a0!==null&&!isJsonObject(_0x2921a0))throw invalidFieldType(_0x5b12c5(0x133),_0x9e87d2===_0x5b12c5(0x1a0)?'a\x20JSON\x20object\x20or\x20null':'a\x20JSON\x20object');_0x2921a0!==null&&validateChannelConfigFields(_0x5b16f0[_0x5b12c5(0x15f)],_0x2921a0),_0x5b16f0[_0x5b12c5(0x133)]=_0x2921a0;}for(const _0x3a756b of[_0x5b12c5(0x18c),_0x5b12c5(0x18f)]){if(!hasOwn(_0x839ad1,_0x3a756b))continue;const _0x103706=_0x839ad1[_0x3a756b];if(_0x103706!==null&&(!Number['isSafeInteger'](_0x103706)||_0x103706<0x0))throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x184)+_0x3a756b+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x5b16f0[_0x3a756b]=_0x103706;}return _0x5b16f0;}function validateRequiredString(_0x31d798,_0x2ff72e,_0x2b2c34){const _0x295c77=a190_0x2dc258;if(typeof _0x31d798!==_0x295c77(0x197))throw invalidFieldType(_0x2ff72e,_0x295c77(0x189));const _0x369e0f=_0x31d798[_0x295c77(0x13b)]();if(!_0x369e0f)throw notificationError(_0x295c77(0x18b),'Notification\x20JSON\x20field\x20\x22'+_0x2ff72e+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x369e0f[_0x295c77(0x139)]>_0x2b2c34)throw notificationError('notification_config_field_invalid',_0x295c77(0x184)+_0x2ff72e+_0x295c77(0x132)+_0x2b2c34+_0x295c77(0x175));return _0x369e0f;}function validateChannelConfigFields(_0x3e3808,_0xf6194a){const _0x4b4e49=a190_0x2dc258;if(hasOwn(_0xf6194a,_0x4b4e49(0x148)))throw forbiddenChannelConfigField(_0x4b4e49(0x148));if(_0x3e3808==='EMAIL')for(const _0x4078d7 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xf6194a,_0x4078d7))throw forbiddenChannelConfigField(_0x4078d7);}}function a190_0x5c12(_0x4ad55d,_0x3a5bc2){_0x4ad55d=_0x4ad55d-0x127;const _0x3ec6b6=a190_0x3ec6();let _0x5c1213=_0x3ec6b6[_0x4ad55d];return _0x5c1213;}function forbiddenChannelConfigField(_0x9af693){const _0x3cf83b=a190_0x2dc258;return notificationError(_0x3cf83b(0x15e),_0x3cf83b(0x170)+_0x9af693+_0x3cf83b(0x159));}function a190_0x3ec6(){const _0x2883f8=['_unavailable','some','212883yYIgsd','description','a\x20non-empty\x20string','WEBHOOK','notification_config_field_invalid','connectTimeout','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','readTimeout','appCode','1119309FeiRvD','channelCode','isSafeInteger','notification_config_json_invalid','endpointUrl','<redacted>','string','push','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','entries','stdin','2204104IAnbrN','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','notification_config_source_unavailable','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','update','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','create','validation','configName','445ExyGxX','EMAIL','includes','notification_config_update_empty','\x22\x20must\x20be\x20','configCode','keys','path','fromName','env','499828LQDhyX','object','Notification\x20config\x20','\x22\x20cannot\x20exceed\x20','channelConfig','recipients','a\x20JSON\x20object','number','updateTime','notification_config_confirmation_required','length','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','trim','endpointUrl:null','num','subjectPrefix','rabetbase\x20notification\x20config-list\x20--appcode\x20','from-env','bccList','Notification\x20config\x20list\x20item\x20','replyTo','Notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','\x20failed.','\x20is\x20invalid.','messageTemplate','FEISHU','notification_config_response_invalid','name','\x22channelType\x22.','506586TIQFpz','\x22configName\x22.','a\x20string\x20or\x20null','8998880kBMcaf','\x20has\x20an\x20unsupported\x20channelType.','hasOwnProperty','\x20must\x20be\x20an\x20object.','call','emailTargets','yes','apiError','Allowed\x20values:\x20','\x22\x20is\x20forbidden.','19122OJpwmA','has','Application-level\x20notification\x20config\x20ID','notification_config_field_unknown','notification_config_channel_field_forbidden','channelType','environment\x20variable\x20','type','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Notification\x20JSON\x20source\x20is\x20ambiguous.','DINGTALK','preflight','Invalid\x20--','channelConfigRaw','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','ccList','file','Unknown\x20notification\x20JSON\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20channelType.','\x20--type\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','dry-run','\x20--format\x20compress','bool','notification_config_id_invalid','\x20characters.','boolean','setEncoding','notification_config_field_forbidden','str','mutation','endpointUrlRaw','kind','notification_config_field_required','Invalid\x20notification\x20config\x20response.','\x20has\x20an\x20invalid\x20appCode.','a\x20supported\x20string','Missing\x20notification\x20JSON\x20source.','isArray','utf8','Notification\x20JSON\x20field\x20\x22'];a190_0x3ec6=function(){return _0x2883f8;};return a190_0x3ec6();}function invalidFieldType(_0x186b37,_0x7484da){const _0x5a08ec=a190_0x2dc258;return notificationError(_0x5a08ec(0x18b),_0x5a08ec(0x184)+_0x186b37+_0x5a08ec(0x129)+_0x7484da+'.');}function serializeChannelConfig(_0x4a0f7c){return _0x4a0f7c===null||_0x4a0f7c===undefined?null:JSON['stringify'](_0x4a0f7c);}function redactSensitive(_0xebf278){const _0x5a4c65=a190_0x2dc258;return _0xebf278===null||_0xebf278===undefined||_0xebf278===''?null:_0x5a4c65(0x196);}function requireResponseString(_0x16ff20,_0x1e7607,_0x1d5bdf){const _0xe87f34=a190_0x2dc258;if(typeof _0x16ff20!==_0xe87f34(0x197)||_0x16ff20[_0xe87f34(0x13b)]()==='')throw CliErrors[_0xe87f34(0x157)](_0xe87f34(0x17e),'Item\x20'+(_0x1d5bdf+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x1e7607+'\x22.');return _0x16ff20[_0xe87f34(0x13b)]();}function requireExactString(_0x3fabfb,_0x59b274,_0x510080){const _0x38ff8a=a190_0x2dc258;if(typeof _0x3fabfb!==_0x38ff8a(0x197)||_0x3fabfb['trim']()==='')throw notificationError(_0x38ff8a(0x14a),_0x38ff8a(0x131)+_0x510080+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x59b274+'\x22.');return _0x3fabfb[_0x38ff8a(0x13b)]();}function responseNullableString(_0xbb3794,_0x47a695,_0x1040c5){const _0x553884=a190_0x2dc258;if(_0xbb3794===undefined||_0xbb3794===null)return null;if(typeof _0xbb3794!==_0x553884(0x197))throw notificationError(_0x553884(0x14a),'Notification\x20config\x20'+_0x1040c5+_0x553884(0x145)+_0x47a695+'\x22.');return _0xbb3794;}function responseNullableTimeout(_0x3c8fa,_0x3597f7,_0x310a49){const _0x4eeed2=a190_0x2dc258;if(_0x3c8fa===undefined||_0x3c8fa===null)return null;if(!Number[_0x4eeed2(0x193)](_0x3c8fa)||_0x3c8fa<0x0)throw notificationError(_0x4eeed2(0x14a),_0x4eeed2(0x131)+_0x310a49+_0x4eeed2(0x145)+_0x3597f7+'\x22.');return _0x3c8fa;}function normalizeNullableString(_0x4d5284){const _0x22569b=a190_0x2dc258;return typeof _0x4d5284===_0x22569b(0x197)?_0x4d5284:null;}function isJsonObject(_0x28fc55){const _0x1dc917=a190_0x2dc258;return _0x28fc55!==null&&typeof _0x28fc55===_0x1dc917(0x130)&&!Array[_0x1dc917(0x182)](_0x28fc55);}function hasOwn(_0x619976,_0x1e1dcc){const _0x47b454=a190_0x2dc258;return Object['prototype'][_0x47b454(0x152)][_0x47b454(0x154)](_0x619976,_0x1e1dcc);}async function readStdin(){const _0x27cc38=a190_0x2dc258;let _0x2c2185='';process[_0x27cc38(0x19b)][_0x27cc38(0x177)]('utf8');for await(const _0x5e2a61 of process[_0x27cc38(0x19b)])_0x2c2185+=_0x5e2a61;return _0x2c2185;}
1
+ const a197_0x9e85a2=a197_0x479c;(function(_0x2a068a,_0x567b42){const _0x4f91f0=a197_0x479c,_0x36884e=_0x2a068a();while(!![]){try{const _0x1a525c=parseInt(_0x4f91f0(0xe8))/0x1+parseInt(_0x4f91f0(0x123))/0x2*(-parseInt(_0x4f91f0(0x15c))/0x3)+-parseInt(_0x4f91f0(0xf9))/0x4+parseInt(_0x4f91f0(0xe6))/0x5+parseInt(_0x4f91f0(0xdd))/0x6+parseInt(_0x4f91f0(0x147))/0x7*(parseInt(_0x4f91f0(0xef))/0x8)+parseInt(_0x4f91f0(0x12d))/0x9*(parseInt(_0x4f91f0(0xf0))/0xa);if(_0x1a525c===_0x567b42)break;else _0x36884e['push'](_0x36884e['shift']());}catch(_0xf07a71){_0x36884e['push'](_0x36884e['shift']());}}}(a197_0x2930,0xdfcb4));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a197_0x9e85a2(0x103),'DINGTALK',a197_0x9e85a2(0x104),a197_0x9e85a2(0x11a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x9e85a2(0x146),'channelType',a197_0x9e85a2(0x114),a197_0x9e85a2(0x12f),a197_0x9e85a2(0xf4),a197_0x9e85a2(0x158),a197_0x9e85a2(0x116)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x9e85a2(0x13d),a197_0x9e85a2(0x15f),a197_0x9e85a2(0x111)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x9e85a2(0xea),a197_0x9e85a2(0xf2),'ccList',a197_0x9e85a2(0x106),a197_0x9e85a2(0xf7),a197_0x9e85a2(0x145),a197_0x9e85a2(0x102),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x9e85a2(0x141),'type':a197_0x9e85a2(0x13a),'required':![],'description':a197_0x9e85a2(0x11b)},{'name':'stdin','type':a197_0x9e85a2(0x133),'required':![],'default':![],'description':a197_0x9e85a2(0x12b)},{'name':a197_0x9e85a2(0x13f),'type':a197_0x9e85a2(0x13a),'required':![],'description':a197_0x9e85a2(0x13e)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x9e85a2(0x152),'required':!![],'description':a197_0x9e85a2(0x155)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x53d31a,_0x42be99,_0x8111fe){return new CliError(_0x53d31a,0x1,_0x42be99,_0x8111fe);}export function readNotificationId(_0x9ed7a1){const _0x1afc63=a197_0x9e85a2,_0x1c2d1e=_0x9ed7a1[_0x1afc63(0x139)]('id');if(!Number['isSafeInteger'](_0x1c2d1e)||_0x1c2d1e<=0x0)throw notificationError(_0x1afc63(0xdb),_0x1afc63(0x10e));return _0x1c2d1e;}export function requireNotificationExplicitYes(_0x323ca5){const _0x1c7ea5=a197_0x9e85a2;if(_0x323ca5[_0x1c7ea5(0xf3)](_0x1c7ea5(0x149))||_0x323ca5['bool'](_0x1c7ea5(0x128)))return;throw notificationError(_0x1c7ea5(0x10c),_0x1c7ea5(0xf1),_0x1c7ea5(0x124));}export function readNotificationChannelType(_0x9574b4,_0x2cab09='type',_0x4291ac='EMAIL'){const _0x5be0b5=a197_0x9e85a2,_0x554105=_0x9574b4[_0x5be0b5(0x15d)](_0x2cab09)[_0x5be0b5(0xde)]()||_0x4291ac;if(!NOTIFICATION_CHANNEL_TYPES[_0x5be0b5(0x13c)](_0x554105))throw CliErrors[_0x5be0b5(0xe0)]('Invalid\x20--'+_0x2cab09+':\x20'+_0x554105,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x5be0b5(0x156)](',\x20')+'.');return _0x554105;}export function assertSingleNotificationSource(_0x4ce423){const _0xbca546=a197_0x9e85a2,_0x5a7d24=[],_0x556a91=_0x4ce423['str']('file')[_0xbca546(0xde)]();if(_0x556a91)_0x5a7d24['push']({'kind':_0xbca546(0x141),'path':_0x556a91});if(_0x4ce423[_0xbca546(0xf3)](_0xbca546(0x125)))_0x5a7d24[_0xbca546(0xe5)]({'kind':_0xbca546(0x125)});const _0x103d68=_0x4ce423[_0xbca546(0x15d)](_0xbca546(0x13f))['trim']();if(_0x103d68)_0x5a7d24[_0xbca546(0xe5)]({'kind':_0xbca546(0xfc),'name':_0x103d68});if(_0x5a7d24[_0xbca546(0x10d)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xbca546(0xe1));if(_0x5a7d24['length']>0x1)throw CliErrors[_0xbca546(0xe0)](_0xbca546(0x108),_0xbca546(0xe1));return _0x5a7d24[0x0];}export async function readNotificationDocument(_0x4e8cde,_0x5cb85c){const _0x4589a2=a197_0x9e85a2,_0x23e152=assertSingleNotificationSource(_0x4e8cde),_0x2f5797=_0x23e152[_0x4589a2(0x130)]===_0x4589a2(0x141)?_0x4589a2(0x121)+_0x23e152[_0x4589a2(0x100)]:_0x23e152['kind']==='env'?_0x4589a2(0x132)+_0x23e152[_0x4589a2(0x11f)]:_0x4589a2(0x125);let _0x165a0c;try{if(_0x23e152['kind']===_0x4589a2(0x141))_0x165a0c=await readFile(_0x23e152[_0x4589a2(0x100)],'utf8');else{if(_0x23e152[_0x4589a2(0x130)]===_0x4589a2(0xfc)){if(!(_0x23e152[_0x4589a2(0x11f)]in process.env))throw notificationError(_0x4589a2(0x138),_0x4589a2(0xfa)+_0x23e152[_0x4589a2(0x11f)]);_0x165a0c=process.env[_0x23e152.name]??'';}else _0x165a0c=await readStdin();}}catch(_0xb8576a){if(_0xb8576a instanceof CliError)throw _0xb8576a;throw notificationError('notification_config_source_unavailable',_0x4589a2(0x136)+_0x2f5797+'.');}let _0x3e2d74;try{_0x3e2d74=JSON[_0x4589a2(0x14a)](_0x165a0c);}catch{throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x2f5797+_0x4589a2(0x151),_0x4589a2(0x14c));}if(!isJsonObject(_0x3e2d74))throw notificationError(_0x4589a2(0x13b),'Notification\x20JSON\x20from\x20'+_0x2f5797+_0x4589a2(0x142));return validateNotificationDocument(_0x3e2d74,_0x5cb85c);}export function projectNotificationListConfig(_0x2af762,_0x1e4b42){const _0x1fad12=a197_0x9e85a2;return{'id':typeof _0x2af762['id']===_0x1fad12(0x152)?_0x2af762['id']:null,'configCode':requireResponseString(_0x2af762[_0x1fad12(0x15f)],'configCode',_0x1e4b42),'configName':requireResponseString(_0x2af762['configName'],_0x1fad12(0x146),_0x1e4b42),'channelType':requireResponseString(_0x2af762['channelType'],'channelType',_0x1e4b42),'description':normalizeNullableString(_0x2af762[_0x1fad12(0xf4)]),'createTime':normalizeNullableString(_0x2af762[_0x1fad12(0xf6)]),'updateTime':normalizeNullableString(_0x2af762[_0x1fad12(0xdf)])};}export function normalizeExactNotificationConfig(_0x19a8b8,_0x33fa2e,_0x5ddac5){const _0x4d40c7=a197_0x9e85a2;if(!Number['isSafeInteger'](_0x19a8b8['id'])||_0x19a8b8['id']!==_0x33fa2e)throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0xda)+_0x33fa2e+'.');if(_0x19a8b8[_0x4d40c7(0x13d)]!==_0x5ddac5)throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0x154)+_0x33fa2e+_0x4d40c7(0xfb));const _0x55f96a=requireExactString(_0x19a8b8[_0x4d40c7(0x146)],_0x4d40c7(0x146),_0x33fa2e),_0x407b1a=requireExactString(_0x19a8b8[_0x4d40c7(0x15f)],_0x4d40c7(0x15f),_0x33fa2e),_0x5e8b3a=requireExactString(_0x19a8b8[_0x4d40c7(0x157)],_0x4d40c7(0x157),_0x33fa2e);if(!NOTIFICATION_CHANNEL_TYPES[_0x4d40c7(0x13c)](_0x5e8b3a))throw notificationError(_0x4d40c7(0xff),_0x4d40c7(0x154)+_0x33fa2e+'\x20has\x20an\x20unsupported\x20channelType.');const _0x4884d0=responseNullableString(_0x19a8b8['endpointUrl'],_0x4d40c7(0x114),_0x33fa2e),_0x464960=responseNullableString(_0x19a8b8[_0x4d40c7(0x12f)],_0x4d40c7(0x12f),_0x33fa2e),_0x2d4b03=responseNullableString(_0x19a8b8[_0x4d40c7(0xf4)],_0x4d40c7(0xf4),_0x33fa2e),_0x441a54=responseNullableTimeout(_0x19a8b8['connectTimeout'],_0x4d40c7(0x158),_0x33fa2e),_0x34a6df=responseNullableTimeout(_0x19a8b8[_0x4d40c7(0x116)],_0x4d40c7(0x116),_0x33fa2e);return{'id':_0x33fa2e,'appCode':_0x5ddac5,'configCode':_0x407b1a,'configName':_0x55f96a,'channelType':_0x5e8b3a,'endpointUrl':redactSensitive(_0x4884d0),'channelConfig':redactSensitive(_0x464960),'description':_0x2d4b03,'connectTimeout':_0x441a54,'readTimeout':_0x34a6df,'endpointUrlRaw':_0x4884d0,'channelConfigRaw':_0x464960};}export async function requireExactNotificationConfig(_0xd2a8db,_0x9a2e88,_0x2258ef){const _0x345bb4=a197_0x9e85a2;let _0x12d1ea;try{_0x12d1ea=await getNotificationChannelConfig(_0x9a2e88,_0xd2a8db);}catch{throw safeApiFailure(_0x2258ef,'preflight','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0xd2a8db+_0x345bb4(0x10f));}return normalizeExactNotificationConfig(_0x12d1ea,_0x9a2e88,_0xd2a8db);}export function projectNotificationConfig(_0x539da3){const _0x188b9c=a197_0x9e85a2;return{'id':_0x539da3['id']??null,'appCode':_0x539da3[_0x188b9c(0x13d)],'configCode':_0x539da3['configCode']??null,'configName':_0x539da3['configName'],'channelType':_0x539da3[_0x188b9c(0x157)],'endpointUrl':redactSensitive(_0x539da3[_0x188b9c(0x114)]),'channelConfig':redactSensitive(_0x539da3[_0x188b9c(0x12f)]),'description':_0x539da3[_0x188b9c(0xf4)]??null,'connectTimeout':_0x539da3[_0x188b9c(0x158)]??null,'readTimeout':_0x539da3[_0x188b9c(0x116)]??null};}export function notificationSelector(_0x1bca7c){const _0x1f4ce4=a197_0x9e85a2;return{'appCode':_0x1bca7c[_0x1f4ce4(0x13d)],'id':_0x1bca7c['id'],'configCode':_0x1bca7c['configCode'],'configName':_0x1bca7c[_0x1f4ce4(0x146)],'channelType':_0x1bca7c['channelType']};}export function createMutationInput(_0x3cf9ea,_0x4518d6){const _0x2dca69=a197_0x9e85a2;return{'appCode':_0x3cf9ea,'configName':_0x4518d6[_0x2dca69(0x146)],'channelType':_0x4518d6[_0x2dca69(0x157)],...hasOwn(_0x4518d6,'endpointUrl')?{'endpointUrl':_0x4518d6[_0x2dca69(0x114)]}:{},...hasOwn(_0x4518d6,_0x2dca69(0x12f))?{'channelConfig':serializeChannelConfig(_0x4518d6[_0x2dca69(0x12f)])}:{},...hasOwn(_0x4518d6,_0x2dca69(0xf4))?{'description':_0x4518d6[_0x2dca69(0xf4)]}:{},...hasOwn(_0x4518d6,'connectTimeout')?{'connectTimeout':_0x4518d6[_0x2dca69(0x158)]}:{},...hasOwn(_0x4518d6,'readTimeout')?{'readTimeout':_0x4518d6['readTimeout']}:{}};}export function mergeUpdateInput(_0x5c4365,_0x2401df){const _0x1e5cd8=a197_0x9e85a2;return{'id':_0x5c4365['id'],'appCode':_0x5c4365['appCode'],'configName':_0x2401df[_0x1e5cd8(0x146)]??_0x5c4365[_0x1e5cd8(0x146)],'channelType':_0x2401df[_0x1e5cd8(0x157)]??_0x5c4365[_0x1e5cd8(0x157)],'endpointUrl':hasOwn(_0x2401df,_0x1e5cd8(0x114))?_0x2401df[_0x1e5cd8(0x114)]:_0x5c4365[_0x1e5cd8(0x113)],'channelConfig':hasOwn(_0x2401df,_0x1e5cd8(0x12f))?serializeChannelConfig(_0x2401df['channelConfig']):_0x5c4365[_0x1e5cd8(0x140)],'description':hasOwn(_0x2401df,_0x1e5cd8(0xf4))?_0x2401df[_0x1e5cd8(0xf4)]:_0x5c4365[_0x1e5cd8(0xf4)],'connectTimeout':hasOwn(_0x2401df,_0x1e5cd8(0x158))?_0x2401df['connectTimeout']:_0x5c4365['connectTimeout'],'readTimeout':hasOwn(_0x2401df,_0x1e5cd8(0x116))?_0x2401df['readTimeout']:_0x5c4365[_0x1e5cd8(0x116)]};}export function plannedUpdateProjection(_0x319333,_0xc35160){const _0x17d4e5=a197_0x9e85a2;return projectNotificationConfig({'id':_0x319333['id'],'appCode':_0x319333['appCode'],'configCode':_0x319333[_0x17d4e5(0x15f)],'configName':_0xc35160[_0x17d4e5(0x146)]??_0x319333[_0x17d4e5(0x146)],'channelType':_0xc35160[_0x17d4e5(0x157)]??_0x319333[_0x17d4e5(0x157)],'endpointUrl':hasOwn(_0xc35160,_0x17d4e5(0x114))?_0xc35160[_0x17d4e5(0x114)]:_0x319333['endpointUrlRaw'],'channelConfig':hasOwn(_0xc35160,_0x17d4e5(0x12f))?_0xc35160[_0x17d4e5(0x12f)]:_0x319333[_0x17d4e5(0x140)],'description':hasOwn(_0xc35160,_0x17d4e5(0xf4))?_0xc35160[_0x17d4e5(0xf4)]:_0x319333[_0x17d4e5(0xf4)],'connectTimeout':hasOwn(_0xc35160,_0x17d4e5(0x158))?_0xc35160[_0x17d4e5(0x158)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x319333['connectTimeout'],'readTimeout':hasOwn(_0xc35160,_0x17d4e5(0x116))?_0xc35160[_0x17d4e5(0x116)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x319333['readTimeout']});}export function requestedSafeFieldsMatch(_0x499db9,_0xe282ac,_0x4941eb){const _0x334a12=a197_0x9e85a2,_0x354b41=[],_0x2a7706=[],_0x276199=[];for(const _0x2c0616 of[_0x334a12(0x146),_0x334a12(0x157),_0x334a12(0xf4)]){if(!hasOwn(_0x4941eb,_0x2c0616))continue;_0x276199[_0x334a12(0xe5)](_0x2c0616),_0x354b41['push'](_0xe282ac[_0x2c0616]===_0x4941eb[_0x2c0616]),_0x2a7706['push'](_0x499db9[_0x2c0616]!==_0x4941eb[_0x2c0616]&&_0xe282ac[_0x2c0616]===_0x4941eb[_0x2c0616]);}for(const _0xf6b079 of[_0x334a12(0x158),_0x334a12(0x116)]){if(!hasOwn(_0x4941eb,_0xf6b079))continue;const _0x16fa62=_0x4941eb[_0xf6b079]??(_0xf6b079===_0x334a12(0x158)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x276199[_0x334a12(0xe5)](_0xf6b079),_0x354b41[_0x334a12(0xe5)](_0xe282ac[_0xf6b079]===_0x16fa62),_0x2a7706[_0x334a12(0xe5)](_0x499db9[_0xf6b079]!==_0x16fa62&&_0xe282ac[_0xf6b079]===_0x16fa62);}return hasOwn(_0x4941eb,_0x334a12(0x114))&&_0x4941eb['endpointUrl']===null&&(_0x276199[_0x334a12(0xe5)]('endpointUrl:null'),_0x354b41[_0x334a12(0xe5)](_0xe282ac[_0x334a12(0x113)]===null||_0xe282ac[_0x334a12(0x113)]===''),_0x2a7706['push'](_0x499db9['endpointUrlRaw']!==null&&_0x499db9[_0x334a12(0x113)]!==''&&(_0xe282ac[_0x334a12(0x113)]===null||_0xe282ac[_0x334a12(0x113)]===''))),{'allMatch':_0x354b41['every'](Boolean),'provesChange':_0x2a7706[_0x334a12(0x11d)](Boolean),'verifiedFields':_0x276199};}export function validateNotificationDeleteReadback(_0x25a2c8,_0xe06e59,_0x230664){const _0x346b61=a197_0x9e85a2;for(const [_0x3a8fc4,_0x1a6bd8]of _0x25a2c8[_0x346b61(0x11c)]()){if(!Number[_0x346b61(0x131)](_0x1a6bd8['id'])||_0x1a6bd8['id']<=0x0)throw notificationError(_0x346b61(0xff),'Notification\x20config\x20list\x20item\x20'+(_0x3a8fc4+0x1)+_0x346b61(0x118));if(_0x1a6bd8[_0x346b61(0x13d)]!==_0xe06e59)throw notificationError('notification_config_response_invalid',_0x346b61(0xfe)+(_0x3a8fc4+0x1)+_0x346b61(0xec));if(_0x1a6bd8[_0x346b61(0x157)]!==_0x230664)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3a8fc4+0x1)+_0x346b61(0xf8));}}export function safeApiFailure(_0x2dfb63,_0x43e338,_0x502fbd){const _0x305b59=a197_0x9e85a2;return notificationError(_0x305b59(0x15e)+_0x2dfb63+'_'+(_0x43e338===_0x305b59(0x119)?_0x305b59(0x129):_0x43e338+_0x305b59(0xe2)),_0x305b59(0x154)+_0x2dfb63+'\x20'+_0x43e338+_0x305b59(0x14b),_0x502fbd);}export function notificationLookupCommand(_0x44162c,_0x36c807){const _0x548566=a197_0x9e85a2;return _0x548566(0x137)+_0x44162c+_0x548566(0x112)+_0x36c807+_0x548566(0xee);}function validateNotificationDocument(_0x41fba6,_0x5bdb26){const _0x1d8384=a197_0x9e85a2;for(const _0x2e07c0 of Object[_0x1d8384(0x14e)](_0x41fba6)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1d8384(0xe3)](_0x2e07c0))throw notificationError(_0x1d8384(0xdc),'Notification\x20JSON\x20field\x20\x22'+_0x2e07c0+_0x1d8384(0xe7));if(!ALLOWED_INPUT_FIELDS[_0x1d8384(0xe3)](_0x2e07c0))throw notificationError(_0x1d8384(0x150),_0x1d8384(0x15b)+_0x2e07c0+'\x22.');}if(_0x5bdb26==='update'&&Object[_0x1d8384(0x14e)](_0x41fba6)['length']===0x0)throw notificationError(_0x1d8384(0x109),_0x1d8384(0x127));const _0x568a86={};if(hasOwn(_0x41fba6,_0x1d8384(0x146)))_0x568a86[_0x1d8384(0x146)]=validateRequiredString(_0x41fba6[_0x1d8384(0x146)],_0x1d8384(0x146),0x80);else{if(_0x5bdb26===_0x1d8384(0xe4))throw notificationError(_0x1d8384(0x135),_0x1d8384(0x11e)+_0x1d8384(0x105));}if(hasOwn(_0x41fba6,_0x1d8384(0x157))){if(typeof _0x41fba6[_0x1d8384(0x157)]!==_0x1d8384(0x13a))throw invalidFieldType(_0x1d8384(0x157),_0x1d8384(0x12c));const _0x568cef=_0x41fba6[_0x1d8384(0x157)][_0x1d8384(0xde)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1d8384(0x13c)](_0x568cef))throw notificationError(_0x1d8384(0x115),_0x1d8384(0x14f),_0x1d8384(0x143)+NOTIFICATION_CHANNEL_TYPES[_0x1d8384(0x156)](',\x20')+'.');_0x568a86[_0x1d8384(0x157)]=_0x568cef;}else{if(_0x5bdb26==='create')throw notificationError(_0x1d8384(0x135),_0x1d8384(0x11e)+_0x1d8384(0x101));}for(const [_0x87db04,_0x14f56f]of[[_0x1d8384(0x114),0x200],[_0x1d8384(0xf4),0x100]]){if(!hasOwn(_0x41fba6,_0x87db04))continue;const _0x393212=_0x41fba6[_0x87db04];if(_0x393212!==null&&typeof _0x393212!==_0x1d8384(0x13a))throw invalidFieldType(_0x87db04,_0x1d8384(0x120));if(typeof _0x393212===_0x1d8384(0x13a)&&_0x393212[_0x1d8384(0x10d)]>_0x14f56f)throw notificationError(_0x1d8384(0x115),_0x1d8384(0x14d)+_0x87db04+'\x22\x20cannot\x20exceed\x20'+_0x14f56f+'\x20characters.');_0x568a86[_0x87db04]=_0x393212;}if(hasOwn(_0x41fba6,'channelConfig')){const _0x2c38c6=_0x41fba6[_0x1d8384(0x12f)];if(_0x2c38c6===null&&_0x5bdb26===_0x1d8384(0xe4))throw invalidFieldType(_0x1d8384(0x12f),_0x1d8384(0x153));if(_0x2c38c6!==null&&!isJsonObject(_0x2c38c6))throw invalidFieldType(_0x1d8384(0x12f),_0x5bdb26==='update'?_0x1d8384(0x122):_0x1d8384(0x153));_0x2c38c6!==null&&validateChannelConfigFields(_0x568a86[_0x1d8384(0x157)],_0x2c38c6),_0x568a86[_0x1d8384(0x12f)]=_0x2c38c6;}for(const _0x2c8779 of[_0x1d8384(0x158),'readTimeout']){if(!hasOwn(_0x41fba6,_0x2c8779))continue;const _0x44ecb2=_0x41fba6[_0x2c8779];if(_0x44ecb2!==null&&(!Number['isSafeInteger'](_0x44ecb2)||_0x44ecb2<0x0))throw notificationError(_0x1d8384(0x115),'Notification\x20JSON\x20field\x20\x22'+_0x2c8779+_0x1d8384(0x110));_0x568a86[_0x2c8779]=_0x44ecb2;}return _0x568a86;}function validateRequiredString(_0x301d02,_0x3ef287,_0x21f4aa){const _0x25346a=a197_0x9e85a2;if(typeof _0x301d02!==_0x25346a(0x13a))throw invalidFieldType(_0x3ef287,_0x25346a(0x117));const _0x3285ad=_0x301d02[_0x25346a(0xde)]();if(!_0x3285ad)throw notificationError(_0x25346a(0x115),_0x25346a(0x14d)+_0x3ef287+_0x25346a(0xfd));if(_0x3285ad[_0x25346a(0x10d)]>_0x21f4aa)throw notificationError(_0x25346a(0x115),_0x25346a(0x14d)+_0x3ef287+'\x22\x20cannot\x20exceed\x20'+_0x21f4aa+'\x20characters.');return _0x3285ad;}function validateChannelConfigFields(_0xf9f69,_0x29eea2){const _0x2d6073=a197_0x9e85a2;if(hasOwn(_0x29eea2,_0x2d6073(0x12e)))throw forbiddenChannelConfigField(_0x2d6073(0x12e));if(_0xf9f69===_0x2d6073(0x12a))for(const _0xc8ac6c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x29eea2,_0xc8ac6c))throw forbiddenChannelConfigField(_0xc8ac6c);}}function forbiddenChannelConfigField(_0x3f2f95){const _0x33fbff=a197_0x9e85a2;return notificationError(_0x33fbff(0x159),_0x33fbff(0x15a)+_0x3f2f95+_0x33fbff(0x134));}function invalidFieldType(_0x1cc9b3,_0x2c1e35){const _0x328564=a197_0x9e85a2;return notificationError(_0x328564(0x115),_0x328564(0x14d)+_0x1cc9b3+_0x328564(0xf5)+_0x2c1e35+'.');}function serializeChannelConfig(_0x18958f){const _0x1932dc=a197_0x9e85a2;return _0x18958f===null||_0x18958f===undefined?null:JSON[_0x1932dc(0x148)](_0x18958f);}function redactSensitive(_0x2ee812){return _0x2ee812===null||_0x2ee812===undefined||_0x2ee812===''?null:'<redacted>';}function a197_0x2930(){const _0x5d80af=['WEBHOOK','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','entries','some','Create\x20JSON\x20requires\x20field\x20','name','a\x20string\x20or\x20null','file\x20','a\x20JSON\x20object\x20or\x20null','43260PjfOuL','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stdin','object','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','yes','failed','EMAIL','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','a\x20supported\x20string','502047rxtHzU','messageTemplate','channelConfig','kind','isSafeInteger','environment\x20variable\x20','boolean','\x22\x20is\x20forbidden.','notification_config_field_required','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_source_unavailable','num','string','notification_config_json_invalid','includes','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','from-env','channelConfigRaw','file','\x20must\x20be\x20an\x20object.','Allowed\x20values:\x20','Item\x20','subjectPrefix','configName','3693858SLvOMC','stringify','dry-run','parse','\x20failed.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Notification\x20JSON\x20field\x20\x22','keys','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','notification_config_field_unknown','\x20is\x20invalid.','number','a\x20JSON\x20object','Notification\x20config\x20','Application-level\x20notification\x20config\x20ID','join','channelType','connectTimeout','notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Unknown\x20notification\x20JSON\x20field\x20\x22','222ONHBkW','str','notification_config_','configCode','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','notification_config_id_invalid','notification_config_field_forbidden','1902258XTAJkM','trim','updateTime','validation','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','_unavailable','has','create','push','5450950DfLQvS','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','280123DWWrXI','\x20has\x20invalid\x20field\x20\x22','emailTargets','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isArray','\x20--format\x20compress','16XpXBCJ','240pNiwga','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','recipients','bool','description','\x22\x20must\x20be\x20','createTime','replyTo','\x20has\x20an\x20invalid\x20channelType.','6257024xEeMBM','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','env','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','notification_config_response_invalid','path','\x22channelType\x22.','fromName','FEISHU','WECOM','\x22configName\x22.','bccList','setEncoding','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_update_empty','hasOwnProperty','apiError','notification_config_confirmation_required','length','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','channelCode','\x20--type\x20','endpointUrlRaw','endpointUrl','notification_config_field_invalid','readTimeout','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20id.','mutation'];a197_0x2930=function(){return _0x5d80af;};return a197_0x2930();}function requireResponseString(_0x34885c,_0x378576,_0x115a56){const _0x5722a5=a197_0x9e85a2;if(typeof _0x34885c!=='string'||_0x34885c[_0x5722a5(0xde)]()==='')throw CliErrors[_0x5722a5(0x10b)]('Invalid\x20notification\x20config\x20response.',_0x5722a5(0x144)+(_0x115a56+0x1)+_0x5722a5(0xeb)+_0x378576+'\x22.');return _0x34885c['trim']();}function a197_0x479c(_0x89e3c2,_0x430cc6){_0x89e3c2=_0x89e3c2-0xda;const _0x293054=a197_0x2930();let _0x479c48=_0x293054[_0x89e3c2];return _0x479c48;}function requireExactString(_0x4d37e5,_0x9518bf,_0x9dbd3a){const _0xb20fe6=a197_0x9e85a2;if(typeof _0x4d37e5!==_0xb20fe6(0x13a)||_0x4d37e5[_0xb20fe6(0xde)]()==='')throw notificationError(_0xb20fe6(0xff),_0xb20fe6(0x154)+_0x9dbd3a+_0xb20fe6(0xeb)+_0x9518bf+'\x22.');return _0x4d37e5['trim']();}function responseNullableString(_0x1e19c3,_0x5bec99,_0x187640){const _0x24ead8=a197_0x9e85a2;if(_0x1e19c3===undefined||_0x1e19c3===null)return null;if(typeof _0x1e19c3!==_0x24ead8(0x13a))throw notificationError(_0x24ead8(0xff),'Notification\x20config\x20'+_0x187640+_0x24ead8(0xe9)+_0x5bec99+'\x22.');return _0x1e19c3;}function responseNullableTimeout(_0x8eedd4,_0x51078e,_0xbfbe44){const _0x4f299b=a197_0x9e85a2;if(_0x8eedd4===undefined||_0x8eedd4===null)return null;if(!Number[_0x4f299b(0x131)](_0x8eedd4)||_0x8eedd4<0x0)throw notificationError(_0x4f299b(0xff),_0x4f299b(0x154)+_0xbfbe44+_0x4f299b(0xe9)+_0x51078e+'\x22.');return _0x8eedd4;}function normalizeNullableString(_0x5e829f){return typeof _0x5e829f==='string'?_0x5e829f:null;}function isJsonObject(_0x56819b){const _0x501811=a197_0x9e85a2;return _0x56819b!==null&&typeof _0x56819b===_0x501811(0x126)&&!Array[_0x501811(0xed)](_0x56819b);}function hasOwn(_0x10da83,_0xfd3c95){const _0x5c5c35=a197_0x9e85a2;return Object['prototype'][_0x5c5c35(0x10a)]['call'](_0x10da83,_0xfd3c95);}async function readStdin(){const _0x555f44=a197_0x9e85a2;let _0x132c51='';process[_0x555f44(0x125)][_0x555f44(0x107)]('utf8');for await(const _0x1519d0 of process['stdin'])_0x132c51+=_0x1519d0;return _0x132c51;}
@@ -1 +1 @@
1
- const a191_0x57bb85=a191_0x3f1a;(function(_0x51d456,_0x1db632){const _0xc4618d=a191_0x3f1a,_0x278f12=_0x51d456();while(!![]){try{const _0xdce9d5=parseInt(_0xc4618d(0x13a))/0x1+-parseInt(_0xc4618d(0x14a))/0x2+parseInt(_0xc4618d(0x12d))/0x3+parseInt(_0xc4618d(0x139))/0x4+-parseInt(_0xc4618d(0x11c))/0x5*(-parseInt(_0xc4618d(0x12b))/0x6)+parseInt(_0xc4618d(0x148))/0x7*(parseInt(_0xc4618d(0x135))/0x8)+-parseInt(_0xc4618d(0x126))/0x9;if(_0xdce9d5===_0x1db632)break;else _0x278f12['push'](_0x278f12['shift']());}catch(_0x59ab5c){_0x278f12['push'](_0x278f12['shift']());}}}(a191_0x1fb0,0xb4fa0));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a191_0x3f1a(_0x214859,_0x52315a){_0x214859=_0x214859-0x118;const _0x1fb079=a191_0x1fb0();let _0x3f1a56=_0x1fb079[_0x214859];return _0x3f1a56;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a191_0x57bb85(0x14e),a191_0x57bb85(0x12c),a191_0x57bb85(0x123)],SCENE_TO_LEGACY_TYPE={'invoice':a191_0x57bb85(0x149),'general':a191_0x57bb85(0x127),'form':'Table','idCard':a191_0x57bb85(0x14c)},SCENE_FLAG={'name':a191_0x57bb85(0x13b),'type':a191_0x57bb85(0x133),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a191_0x57bb85(0x129)},IMAGE_FILE_FLAG={'name':a191_0x57bb85(0x120),'type':a191_0x57bb85(0x133),'description':a191_0x57bb85(0x14f)},IMAGE_URL_FLAG={'name':a191_0x57bb85(0x125),'type':a191_0x57bb85(0x133),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x3fbf01){const _0x372aa9=a191_0x57bb85,_0xf687f3=_0x3fbf01['trim']()[_0x372aa9(0x11a)]();if(_0xf687f3===_0x372aa9(0x145))return'idCard';if(_0xf687f3===_0x372aa9(0x138)||_0xf687f3===_0x372aa9(0x14e)||_0xf687f3===_0x372aa9(0x12c))return _0xf687f3;throw CliErrors['validation'](_0x372aa9(0x147)+_0x3fbf01+_0x372aa9(0x132)+SUPPORTED_SCENES[_0x372aa9(0x121)](',\x20'));}function selectedInputs(_0x9c7d6d){const _0xdd1fc7=a191_0x57bb85,_0x3d8f85=_0x9c7d6d[_0xdd1fc7(0x140)](_0xdd1fc7(0x120))[_0xdd1fc7(0x11f)](),_0x400b38=_0x9c7d6d[_0xdd1fc7(0x140)](_0xdd1fc7(0x125))[_0xdd1fc7(0x11f)]();return{'imageFile':_0x3d8f85,'imageUrl':_0x400b38,'count':[_0x3d8f85,_0x400b38][_0xdd1fc7(0x143)](Boolean)[_0xdd1fc7(0x118)]};}function validateInputSelection(_0xa3840a){const _0x4544f7=a191_0x57bb85,_0x45bb09=selectedInputs(_0xa3840a);if(_0x45bb09[_0x4544f7(0x136)]!==0x1)throw CliErrors[_0x4544f7(0x13d)](_0x4544f7(0x12a));return _0x45bb09;}function withScene(_0x504228,_0x1b889d,_0x343cd7){return{..._0x504228,'scene':_0x1b889d,..._0x343cd7?{'sourceFile':{'fileName':_0x343cd7['fileName'],'filePath':_0x343cd7['filePath']}}:{}};}const ocrRecognize={'service':a191_0x57bb85(0x13c),'command':a191_0x57bb85(0x144),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a191_0x57bb85(0x142),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xa559e){const _0x1c2465=a191_0x57bb85,_0x3f376c=normalizeScene(_0xa559e[_0x1c2465(0x140)]('scene')),_0x2b55cd=SCENE_TO_LEGACY_TYPE[_0x3f376c],_0x15def5=validateInputSelection(_0xa559e);if(_0x15def5['imageUrl']){const _0x34ed58=new URLSearchParams({'url':_0x15def5[_0x1c2465(0x14d)],'type':_0x2b55cd,'appCode':_0xa559e[_0x1c2465(0x13e)]});return{'method':_0x1c2465(0x128),'url':'/smartapi/ocr/recognize-text?'+_0x34ed58[_0x1c2465(0x124)](),'description':_0x1c2465(0x12e)+_0x3f376c+_0x1c2465(0x14b)};}const _0x4f0ec4=requireDevelopmentUploadFile(_0x15def5[_0x1c2465(0x137)],_0x1c2465(0x120));return{'method':_0x1c2465(0x12f),'url':_0x1c2465(0x131),'body':{'steps':[{'method':_0x1c2465(0x12f),'url':'/smartapi/common/uploadFile','body':{'appCode':_0xa559e[_0x1c2465(0x13e)],'multipart':{'file':_0x4f0ec4}}},{'method':'POST','url':_0x1c2465(0x134),'body':{'filePath':_0x1c2465(0x11d),'downloadFlag':![]}},{'method':_0x1c2465(0x128),'url':_0x1c2465(0x146),'query':{'appCode':_0xa559e[_0x1c2465(0x13e)],'url':_0x1c2465(0x11e),'type':_0x2b55cd}}]},'description':_0x1c2465(0x122)+_0x3f376c+'\x20OCR'};},async 'execute'(_0x25bac6){const _0x31c68f=a191_0x57bb85,_0x43d1f3=normalizeScene(_0x25bac6[_0x31c68f(0x140)](_0x31c68f(0x13b))),_0x1762fc=SCENE_TO_LEGACY_TYPE[_0x43d1f3],_0x2974ab=validateInputSelection(_0x25bac6);if(_0x2974ab[_0x31c68f(0x14d)]){const _0x2cbd9f=await recognizeDevelopmentOcr(_0x25bac6[_0x31c68f(0x13e)],{'url':_0x2974ab[_0x31c68f(0x14d)],'type':_0x1762fc});return{'ok':!![],'data':withScene(_0x2cbd9f,_0x43d1f3)};}const _0x3ec0a3=requireDevelopmentUploadFile(_0x2974ab[_0x31c68f(0x137)],_0x31c68f(0x120)),_0x565d92=await uploadDevelopmentFile(_0x25bac6[_0x31c68f(0x13e)],_0x3ec0a3[_0x31c68f(0x130)]);if(!_0x565d92[_0x31c68f(0x141)])throw CliErrors[_0x31c68f(0x119)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5d098f=await queryDevelopmentFileUrl(_0x565d92[_0x31c68f(0x141)],{'download':![]});if(!_0x5d098f[_0x31c68f(0x13f)])throw CliErrors['apiError'](_0x31c68f(0x11b));const _0x10ba45=await recognizeDevelopmentOcr(_0x25bac6['appCode'],{'url':_0x5d098f['fileUrl'],'type':_0x1762fc});return{'ok':!![],'data':withScene(_0x10ba45,_0x43d1f3,_0x565d92)};}};function a191_0x1fb0(){const _0x493d14=['join','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','idCard','toString','image-url','8728983XzYdiB','General','GET','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','756474dOcoIl','form','908760FIreMa','Preview:\x20recognize\x20','POST','path','/smartapi/common/uploadFile','.\x20Supported\x20scenes:\x20','string','/smartapi/common/queryFileUrl','1713424UsZnlw','count','imageFile','invoice','1280584OKZhoq','533101NzXdDl','scene','ocr','validation','appCode','fileUrl','str','filePath','read','filter','recognize','idcard','/smartapi/ocr/recognize-text','Unsupported\x20OCR\x20scene:\x20','14vmmCiC','Invoice','2016134UeXkgz','\x20OCR\x20from\x20URL','IdCard','imageUrl','general','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','length','apiError','toLowerCase','File\x20URL\x20response\x20missing\x20fileUrl.','45vbkJlM','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','trim','image-file'];a191_0x1fb0=function(){return _0x493d14;};return a191_0x1fb0();}export const ocrDefinitions=[ocrRecognize];
1
+ const a198_0x46fc51=a198_0x3c77;(function(_0x2457b1,_0x5e1580){const _0x248b06=a198_0x3c77,_0x2ad040=_0x2457b1();while(!![]){try{const _0x9480c=-parseInt(_0x248b06(0x1c2))/0x1*(parseInt(_0x248b06(0x1ea))/0x2)+-parseInt(_0x248b06(0x1d3))/0x3*(-parseInt(_0x248b06(0x1c5))/0x4)+-parseInt(_0x248b06(0x1f2))/0x5+-parseInt(_0x248b06(0x1df))/0x6+-parseInt(_0x248b06(0x1d6))/0x7*(parseInt(_0x248b06(0x1cc))/0x8)+-parseInt(_0x248b06(0x1ca))/0x9+-parseInt(_0x248b06(0x1d1))/0xa*(-parseInt(_0x248b06(0x1e0))/0xb);if(_0x9480c===_0x5e1580)break;else _0x2ad040['push'](_0x2ad040['shift']());}catch(_0x1abdde){_0x2ad040['push'](_0x2ad040['shift']());}}}(a198_0x182f,0xbe8b0));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x46fc51(0x1d4),a198_0x46fc51(0x1c6),'form',a198_0x46fc51(0x1d9)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a198_0x46fc51(0x1dd),'form':a198_0x46fc51(0x1da),'idCard':a198_0x46fc51(0x1ce)},SCENE_FLAG={'name':a198_0x46fc51(0x1ec),'type':a198_0x46fc51(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x46fc51(0x1e7)},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x46fc51(0x1d0),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x46fc51(0x1bd),'type':a198_0x46fc51(0x1d0),'description':a198_0x46fc51(0x1ed)};function normalizeScene(_0x34ce56){const _0x3f8b8c=a198_0x46fc51,_0x373241=_0x34ce56[_0x3f8b8c(0x1de)]()['toLowerCase']();if(_0x373241===_0x3f8b8c(0x1bc))return _0x3f8b8c(0x1d9);if(_0x373241===_0x3f8b8c(0x1d4)||_0x373241===_0x3f8b8c(0x1c6)||_0x373241===_0x3f8b8c(0x1d8))return _0x373241;throw CliErrors[_0x3f8b8c(0x1c4)]('Unsupported\x20OCR\x20scene:\x20'+_0x34ce56+_0x3f8b8c(0x1e9)+SUPPORTED_SCENES[_0x3f8b8c(0x1db)](',\x20'));}function selectedInputs(_0x3a896f){const _0x2ccf72=a198_0x46fc51,_0x1415b1=_0x3a896f['str']('image-file')[_0x2ccf72(0x1de)](),_0x1af0d9=_0x3a896f[_0x2ccf72(0x1c1)](_0x2ccf72(0x1bd))[_0x2ccf72(0x1de)]();return{'imageFile':_0x1415b1,'imageUrl':_0x1af0d9,'count':[_0x1415b1,_0x1af0d9][_0x2ccf72(0x1cd)](Boolean)[_0x2ccf72(0x1c9)]};}function a198_0x3c77(_0x852e42,_0x5dd48e){_0x852e42=_0x852e42-0x1bb;const _0x182f92=a198_0x182f();let _0x3c77fb=_0x182f92[_0x852e42];return _0x3c77fb;}function validateInputSelection(_0x11e668){const _0x4eb6e2=a198_0x46fc51,_0x521d8c=selectedInputs(_0x11e668);if(_0x521d8c[_0x4eb6e2(0x1e2)]!==0x1)throw CliErrors[_0x4eb6e2(0x1c4)](_0x4eb6e2(0x1e5));return _0x521d8c;}function withScene(_0x417fbf,_0x3763e1,_0x57c5b1){const _0xdb59d8=a198_0x46fc51;return{..._0x417fbf,'scene':_0x3763e1,..._0x57c5b1?{'sourceFile':{'fileName':_0x57c5b1[_0xdb59d8(0x1f3)],'filePath':_0x57c5b1[_0xdb59d8(0x1e6)]}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x46fc51(0x1c3),'description':a198_0x46fc51(0x1d5),'risk':a198_0x46fc51(0x1e8),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23cb3b){const _0x50bb23=a198_0x46fc51,_0x2a0093=normalizeScene(_0x23cb3b[_0x50bb23(0x1c1)](_0x50bb23(0x1ec))),_0x51b407=SCENE_TO_LEGACY_TYPE[_0x2a0093],_0x17f7c2=validateInputSelection(_0x23cb3b);if(_0x17f7c2[_0x50bb23(0x1bb)]){const _0x62386c=new URLSearchParams({'url':_0x17f7c2[_0x50bb23(0x1bb)],'type':_0x51b407,'appCode':_0x23cb3b[_0x50bb23(0x1c0)]});return{'method':_0x50bb23(0x1eb),'url':_0x50bb23(0x1d2)+_0x62386c[_0x50bb23(0x1ee)](),'description':'Preview:\x20recognize\x20'+_0x2a0093+_0x50bb23(0x1c7)};}const _0x52d98c=requireDevelopmentUploadFile(_0x17f7c2[_0x50bb23(0x1be)],_0x50bb23(0x1e1));return{'method':'POST','url':_0x50bb23(0x1d7),'body':{'steps':[{'method':_0x50bb23(0x1ef),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x23cb3b['appCode'],'multipart':{'file':_0x52d98c}}},{'method':'POST','url':_0x50bb23(0x1cf),'body':{'filePath':_0x50bb23(0x1f0),'downloadFlag':![]}},{'method':_0x50bb23(0x1eb),'url':_0x50bb23(0x1c8),'query':{'appCode':_0x23cb3b['appCode'],'url':_0x50bb23(0x1dc),'type':_0x51b407}}]},'description':_0x50bb23(0x1bf)+_0x2a0093+_0x50bb23(0x1e3)};},async 'execute'(_0x207d56){const _0x35414c=a198_0x46fc51,_0x366f8e=normalizeScene(_0x207d56[_0x35414c(0x1c1)](_0x35414c(0x1ec))),_0x3b25a6=SCENE_TO_LEGACY_TYPE[_0x366f8e],_0x55af90=validateInputSelection(_0x207d56);if(_0x55af90['imageUrl']){const _0x2bb652=await recognizeDevelopmentOcr(_0x207d56[_0x35414c(0x1c0)],{'url':_0x55af90[_0x35414c(0x1bb)],'type':_0x3b25a6});return{'ok':!![],'data':withScene(_0x2bb652,_0x366f8e)};}const _0x3af7f8=requireDevelopmentUploadFile(_0x55af90['imageFile'],_0x35414c(0x1e1)),_0x263639=await uploadDevelopmentFile(_0x207d56[_0x35414c(0x1c0)],_0x3af7f8[_0x35414c(0x1f1)]);if(!_0x263639['filePath'])throw CliErrors[_0x35414c(0x1cb)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x587435=await queryDevelopmentFileUrl(_0x263639[_0x35414c(0x1e6)],{'download':![]});if(!_0x587435[_0x35414c(0x1e4)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x192038=await recognizeDevelopmentOcr(_0x207d56['appCode'],{'url':_0x587435[_0x35414c(0x1e4)],'type':_0x3b25a6});return{'ok':!![],'data':withScene(_0x192038,_0x366f8e,_0x263639)};}};export const ocrDefinitions=[ocrRecognize];function a198_0x182f(){const _0x3294b9=['General','trim','1304448SXBgMr','11JEglhB','image-file','count','\x20OCR','fileUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','filePath','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','read','.\x20Supported\x20scenes:\x20','2765918xJGpGi','GET','scene','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toString','POST','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','path','6723090VwBTtQ','fileName','imageUrl','idcard','image-url','imageFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','appCode','str','1jqvfla','recognize','validation','2764072sdzNdF','general','\x20OCR\x20from\x20URL','/smartapi/ocr/recognize-text','length','8073567yXWNgL','apiError','5853896UhbmiU','filter','IdCard','/smartapi/common/queryFileUrl','string','46632310TIOSTm','/smartapi/ocr/recognize-text?','3NRsWir','invoice','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','7HrvMBi','/smartapi/common/uploadFile','form','idCard','Table','join','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>'];a198_0x182f=function(){return _0x3294b9;};return a198_0x182f();}
@@ -1 +1 @@
1
- function a192_0x1f0f(){const _0x5b7e8b=['pageName\x20cannot\x20exceed\x20100\x20characters.','some','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','7946172RUPonX','version','page.create','Custom\x20Page\x20pattern\x20not\x20found:\x20','name','DASHBOARD','validation','isNaN','apiError','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','number','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','parse','utf8','object','stringify','1911764LvXINh','7856653UALnDL','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','appCode','3985528ZgDqre','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','page-pattern','Invalid\x20Custom\x20Page\x20pattern:\x20','ONEPAGE','3vXoSNK','string','values','isArray','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','write','1128185KhhWPx','.json','CUSTOM','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','files','includes','isInteger','compress','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page','\x20and\x20its\x20menu\x20entry.','length','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','keys','Would\x20create\x20Custom\x20Page\x20','page-content','pageId','page-dir','pageName','menuPath','str','../../../templates/custom-pages','now','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','POST','/smartapi/webcode/page/create','trim','6XXHXbO','createMenu','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','702426vCirrk','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','764335ZZztdC','menuId'];a192_0x1f0f=function(){return _0x5b7e8b;};return a192_0x1f0f();}const a192_0x340014=a192_0x25bf;(function(_0x569721,_0x56183f){const _0x28bcdb=a192_0x25bf,_0x5e985c=_0x569721();while(!![]){try{const _0x2ba95b=parseInt(_0x28bcdb(0xa8))/0x1+parseInt(_0x28bcdb(0xa6))/0x2*(-parseInt(_0x28bcdb(0xc8))/0x3)+-parseInt(_0x28bcdb(0xbd))/0x4+parseInt(_0x28bcdb(0x88))/0x5*(parseInt(_0x28bcdb(0xa3))/0x6)+parseInt(_0x28bcdb(0xbe))/0x7+parseInt(_0x28bcdb(0xc2))/0x8+-parseInt(_0x28bcdb(0xad))/0x9;if(_0x2ba95b===_0x56183f)break;else _0x5e985c['push'](_0x5e985c['shift']());}catch(_0x5aa004){_0x5e985c['push'](_0x5e985c['shift']());}}}(a192_0x1f0f,0xdb5b0));function a192_0x25bf(_0x15a7fb,_0x37714a){_0x15a7fb=_0x15a7fb-0x85;const _0x1f0f07=a192_0x1f0f();let _0x25bf73=_0x1f0f07[_0x15a7fb];return _0x25bf73;}import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a192_0x340014(0xc7),a192_0x340014(0xb2)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a192_0x340014(0x9d));export const pageCreate={'service':a192_0x340014(0x91),'command':'create','description':a192_0x340014(0xc4),'risk':a192_0x340014(0x87),'defaultOutputFormat':a192_0x340014(0x8f),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a192_0x340014(0x9f)},{'name':a192_0x340014(0x97),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a192_0x340014(0x94)}],'flags':[{'name':'name','type':'string','description':a192_0x340014(0xbf)},{'name':'parent-menu-id','type':a192_0x340014(0xb7),'description':a192_0x340014(0xa5)},{'name':a192_0x340014(0xc5),'type':'string','description':a192_0x340014(0x8b),'enum':CUSTOM_PAGE_PATTERNS},{'name':a192_0x340014(0x99),'type':a192_0x340014(0xc9),'description':a192_0x340014(0xb6)},APPCODE_FLAG],async 'validate'(_0x27ad1a){await readValidatedPageSource(_0x27ad1a);},async 'dryRun'(_0x5ce7a3){const _0x41fa1e=a192_0x340014,_0x4c2156=readInput(_0x5ce7a3,await readValidatedPageSource(_0x5ce7a3));return{'method':_0x41fa1e(0xa0),'url':_0x41fa1e(0xa1),'body':{'appCode':_0x4c2156[_0x41fa1e(0xc1)],'pageName':_0x4c2156['pageName'],..._0x4c2156['parentMenuId']!=null?{'parentMenuId':_0x4c2156['parentMenuId']}:{},'createMenu':_0x4c2156[_0x41fa1e(0xa4)],'codeContent':_0x4c2156[_0x41fa1e(0x8c)]},'description':_0x41fa1e(0x96)+JSON[_0x41fa1e(0xbc)](_0x4c2156[_0x41fa1e(0x9a)])+_0x41fa1e(0x92)};},async 'execute'(_0x3f9ef2){const _0x5b2df9=a192_0x340014,_0x4bbe10=readInput(_0x3f9ef2,await readValidatedPageSource(_0x3f9ef2)),_0x3d1b45=await createCustomPage(_0x4bbe10);if(!Number[_0x5b2df9(0x8e)](_0x3d1b45['pageId'])||_0x3d1b45[_0x5b2df9(0x98)]<=0x0)throw CliErrors[_0x5b2df9(0xb5)](_0x5b2df9(0x90));const _0x477705=buildCustomPageDevelopmentUrl(_0x4bbe10[_0x5b2df9(0xc1)],_0x3d1b45[_0x5b2df9(0x9b)]),_0x406ead=buildCustomPageEditUrl(_0x4bbe10[_0x5b2df9(0xc1)],_0x3d1b45['pageId']);return{'ok':!![],'data':{'operation':_0x5b2df9(0xaf),'pageType':_0x5b2df9(0x8a),'pagePattern':readPagePattern(_0x3f9ef2),'selector':{'appCode':_0x4bbe10[_0x5b2df9(0xc1)],'pageName':_0x4bbe10[_0x5b2df9(0x9a)]},'before':null,'after':{'pageId':_0x3d1b45[_0x5b2df9(0x98)],'pageName':_0x3d1b45[_0x5b2df9(0x9a)],'appCode':_0x3d1b45[_0x5b2df9(0xc1)],'version':_0x3d1b45[_0x5b2df9(0xae)],'menuId':_0x3d1b45[_0x5b2df9(0xa9)],'menuPath':_0x3d1b45['menuPath'],'files':_0x3d1b45[_0x5b2df9(0x8c)]??Object['keys'](_0x4bbe10[_0x5b2df9(0x8c)])},'dryRun':![],'request':_0x4bbe10,..._0x477705?{'pageUrl':_0x477705}:{},..._0x406ead?{'editPageUrl':_0x406ead}:{},'warnings':_0x477705?[]:[_0x5b2df9(0xac)]},'message':'Created\x20Custom\x20Page\x20'+_0x3d1b45[_0x5b2df9(0x98)]+'.'};}};function readPagePattern(_0x130121){const _0x18b298=a192_0x340014,_0x3cbca8=_0x130121[_0x18b298(0x9c)](_0x18b298(0xc5))['trim'](),_0x52869e=_0x130121[_0x18b298(0x9c)](_0x18b298(0x99))[_0x18b298(0xa2)]();if(_0x3cbca8&&_0x52869e)throw CliErrors['validation'](_0x18b298(0xc0));if(_0x52869e)return null;if(!_0x3cbca8)throw CliErrors[_0x18b298(0xb3)](_0x18b298(0xc3));if(!CUSTOM_PAGE_PATTERNS[_0x18b298(0x8d)](_0x3cbca8))throw CliErrors['validation'](_0x18b298(0xb8));return _0x3cbca8;}async function readPageSource(_0x984f40){const _0x422fa8=a192_0x340014,_0x45b033=_0x984f40[_0x422fa8(0x9c)]('page-dir')[_0x422fa8(0xa2)](),_0x2d28e6=readPagePattern(_0x984f40);if(_0x2d28e6===null){const _0x311be5=await readCustomPageDirectory(_0x45b033);if(Object[_0x422fa8(0x95)](_0x311be5)['length']===0x0)throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xa7));return _0x311be5;}let _0x21fe70;try{_0x21fe70=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2d28e6['toLowerCase']()+_0x422fa8(0x89)),_0x422fa8(0xba));}catch{throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xb0)+_0x2d28e6+'.');}let _0x1fcf15;try{_0x1fcf15=JSON[_0x422fa8(0xb9)](_0x21fe70);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2d28e6+'.');}if(!_0x1fcf15||typeof _0x1fcf15!==_0x422fa8(0xbb)||Array[_0x422fa8(0x85)](_0x1fcf15)||Object[_0x422fa8(0xca)](_0x1fcf15)[_0x422fa8(0xab)](_0x5b749c=>typeof _0x5b749c!==_0x422fa8(0xc9)))throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xc6)+_0x2d28e6+'.');return _0x1fcf15;}async function readValidatedPageSource(_0x5857b1){const _0x3b73df=await readPageSource(_0x5857b1);return await validateCustomPageContent(_0x3b73df),_0x3b73df;}function readInput(_0x29a0f2,_0x59f057){const _0x3280b0=a192_0x340014,_0x241dbd=_0x29a0f2[_0x3280b0(0x9c)](_0x3280b0(0xb1))[_0x3280b0(0xa2)]()||'Custom_page_'+Date[_0x3280b0(0x9e)]();if(_0x241dbd[_0x3280b0(0x93)]>0x64)throw CliErrors[_0x3280b0(0xb3)](_0x3280b0(0xaa));const _0x2544ca=_0x29a0f2['num']('parent-menu-id',NaN),_0x194af2=!Number[_0x3280b0(0xb4)](_0x2544ca);if(_0x194af2&&(!Number[_0x3280b0(0x8e)](_0x2544ca)||_0x2544ca<=0x0))throw CliErrors[_0x3280b0(0xb3)](_0x3280b0(0x86));return{'appCode':_0x29a0f2['appCode'],'pageName':_0x241dbd,..._0x194af2?{'parentMenuId':_0x2544ca}:{},'createMenu':!![],'files':_0x59f057};}
1
+ const a199_0x2f5e6f=a199_0xd336;(function(_0x2c5003,_0x114855){const _0x3b1deb=a199_0xd336,_0x2faa47=_0x2c5003();while(!![]){try{const _0x491551=parseInt(_0x3b1deb(0x90))/0x1+parseInt(_0x3b1deb(0x79))/0x2+-parseInt(_0x3b1deb(0xad))/0x3*(parseInt(_0x3b1deb(0xae))/0x4)+-parseInt(_0x3b1deb(0x85))/0x5+-parseInt(_0x3b1deb(0xa7))/0x6+-parseInt(_0x3b1deb(0xb3))/0x7*(parseInt(_0x3b1deb(0xa0))/0x8)+parseInt(_0x3b1deb(0xa6))/0x9;if(_0x491551===_0x114855)break;else _0x2faa47['push'](_0x2faa47['shift']());}catch(_0x17b7c5){_0x2faa47['push'](_0x2faa47['shift']());}}}(a199_0x526d,0x623a8));import{readFile}from'node:fs/promises';function a199_0x526d(){const _0x476428=['4zowztE','menuId','Created\x20Custom\x20Page\x20','files','isNaN','119JPscMV','compress','isArray','trim','toLowerCase','parentMenuId','validation','591922aJJSoA','pageId','now','page','str','keys','page-dir','menuPath','page\x20create\x20does\x20not\x20accept\x20--page-type.','Would\x20create\x20Custom\x20Page\x20','string','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','596505YVGeFJ','parse','page-type','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','appCode','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','../../../templates/custom-pages','create','pageName','361540oSiQyj','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','includes','write','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','page-pattern','number','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','Custom\x20Page\x20pattern\x20not\x20found:\x20','.json','/smartapi/webcode/page/create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parent-menu-id','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','some','320384aLcuWk','Invalid\x20Custom\x20Page\x20pattern:\x20','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','utf8','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','12501063KudOJa','4257552IrxQio','name','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','createMenu','BLANK','403365VxHUMw'];a199_0x526d=function(){return _0x476428;};return a199_0x526d();}function a199_0xd336(_0x526002,_0x21ae1d){_0x526002=_0x526002-0x76;const _0x526df9=a199_0x526d();let _0xd3369=_0x526df9[_0x526002];return _0xd3369;}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a199_0x2f5e6f(0xac),'ONEPAGE','DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x2f5e6f(0x8d));export const pageCreate={'service':a199_0x2f5e6f(0x7c),'command':a199_0x2f5e6f(0x8e),'description':a199_0x2f5e6f(0xa2),'risk':a199_0x2f5e6f(0x93),'defaultOutputFormat':a199_0x2f5e6f(0xb4),'structuredErrors':!![],'rejectedFlags':[{'name':a199_0x2f5e6f(0x87),'message':a199_0x2f5e6f(0x81),'hint':a199_0x2f5e6f(0xa9)},{'name':'page-content','message':a199_0x2f5e6f(0x91),'hint':a199_0x2f5e6f(0xa5)}],'flags':[{'name':a199_0x2f5e6f(0xa8),'type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x9c)},{'name':a199_0x2f5e6f(0x9d),'type':a199_0x2f5e6f(0x97),'description':a199_0x2f5e6f(0x9e)},{'name':'page-pattern','type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x88),'enum':CUSTOM_PAGE_PATTERNS},{'name':'page-dir','type':a199_0x2f5e6f(0x83),'description':a199_0x2f5e6f(0x95)},APPCODE_FLAG],async 'validate'(_0x3cd9b7){await readValidatedPageSource(_0x3cd9b7);},async 'dryRun'(_0x28e82f){const _0x4b1da9=a199_0x2f5e6f,_0x529c57=readInput(_0x28e82f,await readValidatedPageSource(_0x28e82f));return{'method':'POST','url':_0x4b1da9(0x9b),'body':{'appCode':_0x529c57['appCode'],'pageName':_0x529c57[_0x4b1da9(0x8f)],..._0x529c57[_0x4b1da9(0x77)]!=null?{'parentMenuId':_0x529c57[_0x4b1da9(0x77)]}:{},'createMenu':_0x529c57[_0x4b1da9(0xab)],'codeContent':_0x529c57['files']},'description':_0x4b1da9(0x82)+JSON['stringify'](_0x529c57[_0x4b1da9(0x8f)])+_0x4b1da9(0x94)};},async 'execute'(_0x1e7a3e){const _0x21dc3d=a199_0x2f5e6f,_0x1d1575=readInput(_0x1e7a3e,await readValidatedPageSource(_0x1e7a3e)),_0x3a1ee0=await createCustomPage(_0x1d1575);if(!Number['isInteger'](_0x3a1ee0[_0x21dc3d(0x7a)])||_0x3a1ee0[_0x21dc3d(0x7a)]<=0x0)throw CliErrors['apiError'](_0x21dc3d(0xa3));const _0x5d0e0b=buildCustomPageDevelopmentUrl(_0x1d1575[_0x21dc3d(0x8b)],_0x3a1ee0[_0x21dc3d(0x80)]),_0x4d47d1=buildCustomPageEditUrl(_0x1d1575['appCode'],_0x3a1ee0[_0x21dc3d(0x7a)]);return{'ok':!![],'data':{'operation':'page.create','pageType':'CUSTOM','pagePattern':readPagePattern(_0x1e7a3e),'selector':{'appCode':_0x1d1575[_0x21dc3d(0x8b)],'pageName':_0x1d1575[_0x21dc3d(0x8f)]},'before':null,'after':{'pageId':_0x3a1ee0[_0x21dc3d(0x7a)],'pageName':_0x3a1ee0[_0x21dc3d(0x8f)],'appCode':_0x3a1ee0['appCode'],'version':_0x3a1ee0['version'],'menuId':_0x3a1ee0[_0x21dc3d(0xaf)],'menuPath':_0x3a1ee0[_0x21dc3d(0x80)],'files':_0x3a1ee0[_0x21dc3d(0xb1)]??Object[_0x21dc3d(0x7e)](_0x1d1575['files'])},'dryRun':![],'request':_0x1d1575,..._0x5d0e0b?{'pageUrl':_0x5d0e0b}:{},..._0x4d47d1?{'editPageUrl':_0x4d47d1}:{},'warnings':_0x5d0e0b?[]:[_0x21dc3d(0x8c)]},'message':_0x21dc3d(0xb0)+_0x3a1ee0['pageId']+'.'};}};function readPagePattern(_0x4ae082){const _0x20c99c=a199_0x2f5e6f,_0x54f36c=_0x4ae082[_0x20c99c(0x7d)](_0x20c99c(0x96))[_0x20c99c(0xb6)](),_0x29dafb=_0x4ae082[_0x20c99c(0x7d)](_0x20c99c(0x7f))['trim']();if(_0x54f36c&&_0x29dafb)throw CliErrors[_0x20c99c(0x78)](_0x20c99c(0xaa));if(_0x29dafb)return null;if(!_0x54f36c)throw CliErrors[_0x20c99c(0x78)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x20c99c(0x92)](_0x54f36c))throw CliErrors[_0x20c99c(0x78)](_0x20c99c(0x98));return _0x54f36c;}async function readPageSource(_0x477241){const _0x19bd78=a199_0x2f5e6f,_0xde411=_0x477241[_0x19bd78(0x7d)]('page-dir')['trim'](),_0x178eac=readPagePattern(_0x477241);if(_0x178eac===null){const _0x217db2=await readCustomPageDirectory(_0xde411);if(Object[_0x19bd78(0x7e)](_0x217db2)[_0x19bd78(0x8a)]===0x0)throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0x84));return _0x217db2;}let _0x153929;try{_0x153929=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x178eac[_0x19bd78(0x76)]()+_0x19bd78(0x9a)),_0x19bd78(0xa4));}catch{throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0x99)+_0x178eac+'.');}let _0x529010;try{_0x529010=JSON[_0x19bd78(0x86)](_0x153929);}catch{throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0xa1)+_0x178eac+'.');}if(!_0x529010||typeof _0x529010!=='object'||Array[_0x19bd78(0xb5)](_0x529010)||Object['values'](_0x529010)[_0x19bd78(0x9f)](_0x455e14=>typeof _0x455e14!==_0x19bd78(0x83)))throw CliErrors[_0x19bd78(0x78)](_0x19bd78(0xa1)+_0x178eac+'.');return _0x529010;}async function readValidatedPageSource(_0x259106){const _0x5cb2c7=await readPageSource(_0x259106);return await validateCustomPageContent(_0x5cb2c7),_0x5cb2c7;}function readInput(_0x3b42a0,_0x327859){const _0x1fde62=a199_0x2f5e6f,_0x5c9b85=_0x3b42a0[_0x1fde62(0x7d)]('name')[_0x1fde62(0xb6)]()||'Custom_page_'+Date[_0x1fde62(0x7b)]();if(_0x5c9b85['length']>0x64)throw CliErrors['validation']('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x59cf59=_0x3b42a0['num'](_0x1fde62(0x9d),NaN),_0x1f62cb=!Number[_0x1fde62(0xb2)](_0x59cf59);if(_0x1f62cb&&(!Number['isInteger'](_0x59cf59)||_0x59cf59<=0x0))throw CliErrors['validation'](_0x1fde62(0x89));return{'appCode':_0x3b42a0[_0x1fde62(0x8b)],'pageName':_0x5c9b85,..._0x1f62cb?{'parentMenuId':_0x59cf59}:{},'createMenu':!![],'files':_0x327859};}
@@ -1 +1 @@
1
- const a193_0x2babf5=a193_0x405a;function a193_0x405a(_0x5876f8,_0x42ba27){_0x5876f8=_0x5876f8-0xea;const _0xc3abac=a193_0xc3ab();let _0x405a30=_0xc3abac[_0x5876f8];return _0x405a30;}(function(_0x5756bb,_0x4b9205){const _0xe420ad=a193_0x405a,_0x417a73=_0x5756bb();while(!![]){try{const _0x39a4e4=parseInt(_0xe420ad(0xef))/0x1+parseInt(_0xe420ad(0xf1))/0x2*(parseInt(_0xe420ad(0xea))/0x3)+-parseInt(_0xe420ad(0xec))/0x4*(-parseInt(_0xe420ad(0xfa))/0x5)+parseInt(_0xe420ad(0xf5))/0x6+parseInt(_0xe420ad(0xf2))/0x7*(parseInt(_0xe420ad(0x101))/0x8)+-parseInt(_0xe420ad(0xff))/0x9*(parseInt(_0xe420ad(0x102))/0xa)+parseInt(_0xe420ad(0xf9))/0xb*(-parseInt(_0xe420ad(0x100))/0xc);if(_0x39a4e4===_0x4b9205)break;else _0x417a73['push'](_0x417a73['shift']());}catch(_0x57ab29){_0x417a73['push'](_0x417a73['shift']());}}}(a193_0xc3ab,0xb5264));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a193_0x2babf5(0xf3),'description':a193_0x2babf5(0xf4),'risk':a193_0x2babf5(0xf6),'defaultOutputFormat':a193_0x2babf5(0xf8),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a193_0x2babf5(0xfb)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd4e0f7){readCustomPageId(_0xd4e0f7);},async 'execute'(_0x1c21b3){const _0x5c712a=a193_0x2babf5,_0x57695d=readCustomPageId(_0x1c21b3),_0x2986e2=await getCustomPageSource(_0x57695d),{bundle:_0x585b8c,createTime:_0xd6cf88,updateTime:_0x92fc2f,..._0x547d03}=_0x2986e2,_0x2ec029=_0x2986e2['id']??_0x57695d,_0x13ac8b=_0x2986e2[_0x5c712a(0xfc)]?.[_0x5c712a(0x103)]()||_0x1c21b3['str']('appcode')[_0x5c712a(0x103)](),_0xfb3e26=buildCustomPageRuntimeUrl(_0x13ac8b,_0x2986e2[_0x5c712a(0xfd)]),_0x4f2960=buildCustomPageEditUrl(_0x13ac8b,_0x2ec029),_0x1e6ad5=await resolveCustomPageDevelopmentUrl(_0x13ac8b,_0x2ec029,_0x1c21b3[_0x5c712a(0x104)]);return{'ok':!![],'data':{..._0x547d03,..._0xfb3e26?{'runtimePageUrl':_0xfb3e26}:{},..._0x1e6ad5?{'pageUrl':_0x1e6ad5}:{},..._0x4f2960?{'editPageUrl':_0x4f2960}:{},..._0xd6cf88==null?{}:{'createTime':formatTime(_0xd6cf88)},..._0x92fc2f==null?{}:{'updateTime':formatTime(_0x92fc2f)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x57695d+'.'};}};function a193_0xc3ab(){const _0x46ba08=['209783xKOhQU','custom-detail','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','8715096ZcyLPE','read','join','compress','108493FaLwxh','50555PpMhfj','Custom\x20Page\x20ID','appCode','pageCode','padStart','3274074WHZkgl','1644wgIKyQ','136wBGdIu','40kFbTXg','trim','cookie','getTime','getFullYear','1149PMntue','isNaN','396ufioYQ','getMonth','getDate','46121PRNPjn','getSeconds','2816UerQwt'];a193_0xc3ab=function(){return _0x46ba08;};return a193_0xc3ab();}function formatTime(_0x5483c6){const _0x31f208=a193_0x2babf5,_0x2ce5e2=new Date(_0x5483c6);if(Number[_0x31f208(0xeb)](_0x2ce5e2[_0x31f208(0x105)]()))return String(_0x5483c6);const _0x1cfb03=[_0x2ce5e2[_0x31f208(0x106)](),String(_0x2ce5e2[_0x31f208(0xed)]()+0x1)['padStart'](0x2,'0'),String(_0x2ce5e2[_0x31f208(0xee)]())[_0x31f208(0xfe)](0x2,'0')][_0x31f208(0xf7)]('-'),_0x36ad28=[String(_0x2ce5e2['getHours']())[_0x31f208(0xfe)](0x2,'0'),String(_0x2ce5e2['getMinutes']())[_0x31f208(0xfe)](0x2,'0'),String(_0x2ce5e2[_0x31f208(0xf0)]())['padStart'](0x2,'0')][_0x31f208(0xf7)](':');return _0x1cfb03+'\x20'+_0x36ad28;}
1
+ const a200_0x4fa991=a200_0x2b16;(function(_0x31bec3,_0x3ab540){const _0x130505=a200_0x2b16,_0x1bee56=_0x31bec3();while(!![]){try{const _0xb25960=parseInt(_0x130505(0x82))/0x1+parseInt(_0x130505(0x84))/0x2*(parseInt(_0x130505(0x8a))/0x3)+-parseInt(_0x130505(0x85))/0x4+-parseInt(_0x130505(0x94))/0x5*(-parseInt(_0x130505(0x9a))/0x6)+-parseInt(_0x130505(0x8c))/0x7+-parseInt(_0x130505(0x99))/0x8*(-parseInt(_0x130505(0x86))/0x9)+-parseInt(_0x130505(0x98))/0xa;if(_0xb25960===_0x3ab540)break;else _0x1bee56['push'](_0x1bee56['shift']());}catch(_0x3a8c33){_0x1bee56['push'](_0x1bee56['shift']());}}}(a200_0x92d2,0xbec41));function a200_0x2b16(_0x24904f,_0x575d2d){_0x24904f=_0x24904f-0x82;const _0x92d2a3=a200_0x92d2();let _0x2b1627=_0x92d2a3[_0x24904f];return _0x2b1627;}import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a200_0x4fa991(0x95),'defaultOutputFormat':a200_0x4fa991(0x9b),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x4fa991(0x96),'required':!![],'description':a200_0x4fa991(0x90)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x42a6ec){readCustomPageId(_0x42a6ec);},async 'execute'(_0xa90c97){const _0x1cb738=a200_0x4fa991,_0x481cbc=readCustomPageId(_0xa90c97),_0x576719=await getCustomPageSource(_0x481cbc),{bundle:_0x2e176d,createTime:_0x485b57,updateTime:_0x1c5166,..._0x299edc}=_0x576719,_0x52f925=_0x576719['id']??_0x481cbc,_0x2e96ac=_0x576719[_0x1cb738(0x8e)]?.[_0x1cb738(0x97)]()||_0xa90c97[_0x1cb738(0x8d)]('appcode')['trim'](),_0x4130d7=buildCustomPageRuntimeUrl(_0x2e96ac,_0x576719[_0x1cb738(0x8f)]),_0x2b973d=buildCustomPageEditUrl(_0x2e96ac,_0x52f925),_0x3f25fb=await resolveCustomPageDevelopmentUrl(_0x2e96ac,_0x52f925,_0xa90c97[_0x1cb738(0x8b)]);return{'ok':!![],'data':{..._0x299edc,..._0x4130d7?{'runtimePageUrl':_0x4130d7}:{},..._0x3f25fb?{'pageUrl':_0x3f25fb}:{},..._0x2b973d?{'editPageUrl':_0x2b973d}:{},..._0x485b57==null?{}:{'createTime':formatTime(_0x485b57)},..._0x1c5166==null?{}:{'updateTime':formatTime(_0x1c5166)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x481cbc+'.'};}};function a200_0x92d2(){const _0x3bdf34=['getMonth','42kDlrxJ','cookie','10436090Tlloav','str','appCode','pageCode','Custom\x20Page\x20ID','getHours','padStart','getSeconds','90UZnLtG','read','number','trim','11449860WbJqcN','1573136fIeWEx','2598ZohEcT','compress','getMinutes','865950HdhGJy','getFullYear','193266qImhfs','743468xbekLP','63EDjrUK','getTime','isNaN'];a200_0x92d2=function(){return _0x3bdf34;};return a200_0x92d2();}function formatTime(_0x8ed64c){const _0x43ba7e=a200_0x4fa991,_0x18a551=new Date(_0x8ed64c);if(Number[_0x43ba7e(0x88)](_0x18a551[_0x43ba7e(0x87)]()))return String(_0x8ed64c);const _0x5ac0b3=[_0x18a551[_0x43ba7e(0x83)](),String(_0x18a551[_0x43ba7e(0x89)]()+0x1)[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551['getDate']())[_0x43ba7e(0x92)](0x2,'0')]['join']('-'),_0xcf7297=[String(_0x18a551[_0x43ba7e(0x91)]())[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551[_0x43ba7e(0x9c)]())[_0x43ba7e(0x92)](0x2,'0'),String(_0x18a551[_0x43ba7e(0x93)]())[_0x43ba7e(0x92)](0x2,'0')]['join'](':');return _0x5ac0b3+'\x20'+_0xcf7297;}