@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +0 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +2 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +2 -0
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +10 -4
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +21 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +15 -12
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +3 -3
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +64 -0
- package/skills/rabetbase.manifest.json +6 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x2c08d4=a140_0x5cdb;(function(_0xf5457d,_0x5a0d72){const _0x54a10c=a140_0x5cdb,_0x3fd88f=_0xf5457d();while(!![]){try{const _0x469e59=parseInt(_0x54a10c(0x109))/0x1*(-parseInt(_0x54a10c(0x138))/0x2)+-parseInt(_0x54a10c(0x145))/0x3+-parseInt(_0x54a10c(0xfb))/0x4*(-parseInt(_0x54a10c(0xdd))/0x5)+parseInt(_0x54a10c(0x10b))/0x6+parseInt(_0x54a10c(0xee))/0x7*(-parseInt(_0x54a10c(0x144))/0x8)+-parseInt(_0x54a10c(0x13d))/0x9*(parseInt(_0x54a10c(0x153))/0xa)+parseInt(_0x54a10c(0x106))/0xb;if(_0x469e59===_0x5a0d72)break;else _0x3fd88f['push'](_0x3fd88f['shift']());}catch(_0x289f80){_0x3fd88f['push'](_0x3fd88f['shift']());}}}(a140_0x4b45,0x4f4d4));function a140_0x5cdb(_0x42b3f3,_0x55f6d8){_0x42b3f3=_0x42b3f3-0xd8;const _0x4b45ce=a140_0x4b45();let _0x5cdbbc=_0x4b45ce[_0x42b3f3];return _0x5cdbbc;}function a140_0x4b45(){const _0x17ffd4=['message','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','menu_expected_count_mismatch','Would\x20update\x20visibility\x20for\x20','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','appCode','Menu\x20id\x20selector(s)\x20not\x20found:\x20','requestedVisible','resources','update\x20visibility\x20for','Response\x20was\x20lost\x20and\x20menu\x20','childrenIds','update-recovery','\x20updated,\x20','menus','paths','targets','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','38bjqJFg','byId','visibility-update','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20unchanged\x20menu(s).','4761324KbhrGl','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','map','pageType','recovered','get','expectedCount','16wZFVnD','1294383dTAPfm','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20','updated','update','beforeById','filter','sort','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Selected\x20','datasetCode','validation','\x20menu(s);\x20skipped\x20','pageId','10VXmUWD','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','path','trim','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','menu','menu_state_drift','type','130ivQeRY','high-risk-write','Menu\x20visibility\x20update\x20completed:\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','resourcesValid','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu_permission_denied','Requested\x20menu\x20visibility','verification','plan','expectVisible','code','modelType','rabetbase\x20menu\x20list\x20--format\x20compress','false','\x20failed.','22519JqmncG','push','str','datasetId','some','\x20changed\x20unexpectedly.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','stringify','POST','boolean','flagMissing','verify\x20menu\x20visibility\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','43716BruWpI','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','cookie','expected-count','num','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','depth','\x20skipped,\x20','hash','menu-ids','/smartapi/menu/update','13617098PLaGkK','length','menu_selector_not_found','18719jdDktV','expect-visible','752040TZtDgW','update-menu-visibility','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','rawFlags','plannedActions','body','url','isArray','Updated\x20visibility\x20for\x20','set','join','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','failed','before','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','update\x20menu\x20visibility','parentId','visible','values','\x20must\x20be\x20true\x20or\x20false.','string','menuIds','label','menu_verification_failed','\x20visibility\x20update\x20could\x20not\x20be\x20verified','split'];a140_0x4b45=function(){return _0x17ffd4;};return a140_0x4b45();}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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a140_0x2c08d4(0xda),'command':a140_0x2c08d4(0x13a),'description':a140_0x2c08d4(0x146),'risk':a140_0x2c08d4(0xde),'structuredErrors':!![],'flags':[{'name':a140_0x2c08d4(0x104),'type':a140_0x2c08d4(0x11f),'description':a140_0x2c08d4(0x127)},{'name':a140_0x2c08d4(0x135),'type':a140_0x2c08d4(0x11f),'description':a140_0x2c08d4(0x154)},{'name':a140_0x2c08d4(0x11c),'type':a140_0x2c08d4(0xf7),'required':!![],'description':a140_0x2c08d4(0xe5)},{'name':a140_0x2c08d4(0x10a),'type':'boolean','description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a140_0x2c08d4(0xfe),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b7abc){parseInput(_0x2b7abc),requireExplicitYes(_0x2b7abc);},async 'dryRun'(_0x1e52fb){const _0x15816a=a140_0x2c08d4,_0x518162=await buildPlan(_0x1e52fb,!![]),_0x53c6c5=_0x518162[_0x15816a(0xe7)][_0x15816a(0x10f)]?.['length']??0x0,_0x5863e9=_0x518162[_0x15816a(0xe7)][_0x15816a(0x136)][_0x15816a(0x107)]-_0x53c6c5;return menuDryRunResult(_0x518162[_0x15816a(0xe7)],{'method':_0x15816a(0xf6),'url':_0x15816a(0x105),'body':{'updates':_0x518162[_0x15816a(0xe7)][_0x15816a(0x10f)]?.[_0x15816a(0x13f)](_0x168883=>_0x168883[_0x15816a(0x110)])??[]},'description':_0x15816a(0x129)+_0x53c6c5+'\x20menu(s);\x20skip\x20'+_0x5863e9+_0x15816a(0x13c)});},async 'execute'(_0x3dc7f9){const _0xaf808f=a140_0x2c08d4;requireExplicitYes(_0x3dc7f9);const _0x348f24=await buildPlan(_0x3dc7f9,![]);await recheckMutationSnapshot(_0x3dc7f9,_0x348f24[_0xaf808f(0xe7)],_0xaf808f(0x11a));const _0x11d109=[],_0x5d51ba=[],_0x3a4bc1=[];for(const _0x469cb9 of _0x348f24['plan'][_0xaf808f(0x136)]){if(_0x469cb9[_0xaf808f(0x118)][_0xaf808f(0x11c)]===_0x348f24[_0xaf808f(0xe7)][_0xaf808f(0x12d)]){_0x11d109[_0xaf808f(0xef)]({'id':_0x469cb9['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3dc7f9[_0xaf808f(0x12b)],_0x3dc7f9['cookie'],{'id':_0x469cb9['id'],'visible':_0x348f24[_0xaf808f(0xe7)][_0xaf808f(0x12d)]}),_0x11d109[_0xaf808f(0xef)]({'id':_0x469cb9['id'],'updated':!![],'skipped':![]});}catch(_0x313084){const _0x1cbd4c=mapMenuApiError(_0x313084,_0xaf808f(0x12f),_0x469cb9['id']);if(isMenuResponseLoss(_0x313084)&&_0x1cbd4c[_0xaf808f(0xe9)]!==_0xaf808f(0xe4)){_0x3a4bc1['push'](_0x469cb9['id']);continue;}_0x5d51ba[_0xaf808f(0xef)]({'id':_0x469cb9['id'],'stage':_0xaf808f(0x149),'code':_0x1cbd4c['code'],'message':_0x1cbd4c[_0xaf808f(0x125)]});}}let _0x365f9b;try{_0x365f9b=await fetchMenuSnapshot(_0x3dc7f9[_0xaf808f(0x12b)],_0x3dc7f9[_0xaf808f(0xfd)]);}catch(_0x441bf6){const _0x319e4a=describeMenuErrorCause(_0x441bf6,_0xaf808f(0xf9)),_0x237446=_0x3a4bc1[_0xaf808f(0x13f)](_0x5333ed=>({'id':_0x5333ed,'stage':'update-recovery','code':_0xaf808f(0x122),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x5333ed+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x1cce2e={'stage':_0xaf808f(0xe6),'code':_0xaf808f(0x122),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x348f24[_0xaf808f(0xe7)][_0xaf808f(0x136)][_0xaf808f(0x13f)](_0x51e4fd=>_0x51e4fd['id']),'requestedStateConfirmed':![],..._0x319e4a};throw menuFailure(asVerificationError(_0x441bf6,_0xaf808f(0x12a)),_0x348f24[_0xaf808f(0xe7)],{'stage':_0xaf808f(0xe6),'succeeded':_0x11d109,'failedRecords':[..._0x5d51ba,..._0x237446,_0x1cce2e],'warnings':[_0xaf808f(0x14d)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0xaf808f(0xeb)}});}const _0x18db2d=[];for(const _0x510d62 of _0x11d109){const _0x25e1b7=Number(_0x510d62['id']),_0x308a21=_0x348f24['beforeById']['get'](_0x25e1b7),_0x4e3888=_0x365f9b[_0xaf808f(0x139)][_0xaf808f(0x142)](_0x25e1b7);try{verifyVisibilityUpdate(_0x308a21,_0x4e3888,_0x348f24[_0xaf808f(0xe7)][_0xaf808f(0x12d)]);}catch(_0x4db6fd){const _0x1b65ed=asVerificationError(_0x4db6fd,_0xaf808f(0x147)+_0x25e1b7+_0xaf808f(0x123));_0x18db2d[_0xaf808f(0xef)]({'id':_0x25e1b7,'stage':'verification','code':_0x1b65ed['code'],'message':_0x1b65ed[_0xaf808f(0x125)],'requestedStateConfirmed':![]});}}for(const _0x3d0f2d of _0x3a4bc1){const _0x3f9b4e=_0x348f24[_0xaf808f(0x14a)][_0xaf808f(0x142)](_0x3d0f2d),_0x5dded0=_0x365f9b[_0xaf808f(0x139)][_0xaf808f(0x142)](_0x3d0f2d);try{verifyVisibilityUpdate(_0x3f9b4e,_0x5dded0,_0x348f24[_0xaf808f(0xe7)][_0xaf808f(0x12d)]),_0x11d109['push']({'id':_0x3d0f2d,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x16a67d){const _0x4fe2aa=asVerificationError(_0x16a67d,_0xaf808f(0x130)+_0x3d0f2d+_0xaf808f(0x13e));_0x18db2d[_0xaf808f(0xef)]({'id':_0x3d0f2d,'stage':_0xaf808f(0x132),'code':_0x4fe2aa['code'],'message':_0x4fe2aa[_0xaf808f(0x125)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x18db2d[_0xaf808f(0x107)]>0x0){const _0x2d85df=_0x18db2d[_0xaf808f(0x13f)](_0x256e19=>Number(_0x256e19['id'])),_0x5d1715=_0x11d109[_0xaf808f(0x14b)](_0x442e3e=>_0x442e3e[_0xaf808f(0x141)]===!![])['length'],_0x39aab7=menuError('menu_verification_failed',_0xaf808f(0xf4)+_0x2d85df[_0xaf808f(0x115)](',\x20')+'.',_0xaf808f(0x126));throw menuFailure(_0x39aab7,_0x348f24['plan'],{'stage':_0xaf808f(0xe6),'succeeded':_0x11d109,'failedRecords':[..._0x5d51ba,..._0x18db2d],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xaf808f(0x117),..._0x2d85df[_0xaf808f(0x107)]===0x1?{'targetId':_0x2d85df[0x0]}:{'targetIds':_0x2d85df},'recoveredCount':_0x5d1715,'lookupCommand':_0xaf808f(0xeb)}});}const _0x5efbdc=_0x11d109['filter'](_0x195685=>_0x195685[_0xaf808f(0x148)]===!![])[_0xaf808f(0x107)],_0x3bff6=_0x11d109[_0xaf808f(0x107)]-_0x5efbdc,_0x220dd3={..._0x348f24['plan'],'succeeded':_0x11d109,'failed':_0x5d51ba,'warnings':_0x5d51ba[_0xaf808f(0x107)]>0x0?[..._0x348f24[_0xaf808f(0xe7)]['warnings'],_0xaf808f(0x10d)]:_0x348f24[_0xaf808f(0xe7)]['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x365f9b[_0xaf808f(0x103)],'matchesRequestedState':_0x5d51ba[_0xaf808f(0x107)]===0x0,'recoveredCount':_0x3a4bc1[_0xaf808f(0x107)]}};return{'ok':_0x5d51ba[_0xaf808f(0x107)]===0x0,'data':_0x220dd3,'message':_0x5d51ba[_0xaf808f(0x107)]===0x0?_0xaf808f(0x113)+_0x5efbdc+_0xaf808f(0x151)+_0x3bff6+_0xaf808f(0x13c):_0xaf808f(0xdf)+_0x5efbdc+_0xaf808f(0x133)+_0x3bff6+_0xaf808f(0x102)+_0x5d51ba[_0xaf808f(0x107)]+_0xaf808f(0xed)};}};function parseInput(_0x57c136){const _0x26e069=a140_0x2c08d4,_0x15a572=parseMenuIds(_0x57c136[_0x26e069(0xf0)](_0x26e069(0x104))),_0x1dabe5=parseCsv(_0x57c136[_0x26e069(0xf0)](_0x26e069(0x135)));if(_0x15a572[_0x26e069(0x107)]===0x0&&_0x1dabe5[_0x26e069(0x107)]===0x0)throw CliErrors[_0x26e069(0x150)](_0x26e069(0x119));const _0x537f1b=parseBooleanFlag(_0x57c136,_0x26e069(0x11c),!![]),_0x16bbe2=parseBooleanFlag(_0x57c136,_0x26e069(0x10a),![]);let _0x5d2be7;if(hasFlag(_0x57c136,_0x26e069(0xfe))){_0x5d2be7=_0x57c136[_0x26e069(0xff)](_0x26e069(0xfe));if(!Number['isSafeInteger'](_0x5d2be7)||_0x5d2be7<0x0)throw CliErrors[_0x26e069(0x150)](_0x26e069(0x100));}return{'menuIds':_0x15a572,'paths':_0x1dabe5,'visible':_0x537f1b,'expectVisible':_0x16bbe2,'expectedCount':_0x5d2be7};}async function buildPlan(_0x49d0fb,_0x5cb687){const _0x37bd1b=a140_0x2c08d4,_0x34e467=parseInput(_0x49d0fb),_0x5e8b50=await fetchMutationSnapshot(_0x49d0fb,_0x37bd1b(0x11a)),_0x11c15f=selectTargets(_0x5e8b50[_0x37bd1b(0x134)],_0x34e467[_0x37bd1b(0x120)],_0x34e467[_0x37bd1b(0x135)]);if(_0x34e467['expectedCount']!==undefined&&_0x11c15f['length']!==_0x34e467[_0x37bd1b(0x143)])throw menuError(_0x37bd1b(0x128),_0x37bd1b(0x14e)+_0x11c15f[_0x37bd1b(0x107)]+'\x20menu(s),\x20expected\x20'+_0x34e467['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x34e467[_0x37bd1b(0xe8)]!==undefined){const _0x42cb6f=_0x11c15f[_0x37bd1b(0x14b)](_0x3ddc40=>_0x3ddc40[_0x37bd1b(0x11c)]!==_0x34e467[_0x37bd1b(0xe8)]);if(_0x42cb6f[_0x37bd1b(0x107)]>0x0)throw menuError(_0x37bd1b(0xdb),_0x37bd1b(0xe1)+_0x42cb6f[_0x37bd1b(0x13f)](_0x1ab066=>_0x1ab066['id'])[_0x37bd1b(0x115)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x5ee14b=_0x11c15f[_0x37bd1b(0x13f)](_0x26cf07=>({'id':_0x26cf07['id'],'label':_0x26cf07[_0x37bd1b(0x121)],'path':_0x26cf07[_0x37bd1b(0x155)],'before':{'visible':_0x26cf07['visible']},'after':{'visible':_0x34e467['visible']}})),_0x43af67=_0x5ee14b[_0x37bd1b(0x14b)](_0x30a73a=>_0x30a73a[_0x37bd1b(0x118)][_0x37bd1b(0x11c)]!==_0x34e467[_0x37bd1b(0x11c)])[_0x37bd1b(0x13f)](_0x1bd832=>({'stage':_0x37bd1b(0x10c),'method':_0x37bd1b(0xf6),'path':_0x37bd1b(0x105),'body':{'appCode':_0x49d0fb[_0x37bd1b(0x12b)],'id':_0x1bd832['id'],'visible':_0x34e467[_0x37bd1b(0x11c)]}})),_0x1fccc9=mutationResult({'operation':_0x37bd1b(0x13a),'selector':{'menuIds':_0x34e467[_0x37bd1b(0x120)],'paths':_0x34e467[_0x37bd1b(0x135)]},'before':{'menus':_0x11c15f[_0x37bd1b(0x13f)](_0x39d0a9=>({'id':_0x39d0a9['id'],'path':_0x39d0a9['path'],'visible':_0x39d0a9['visible']}))},'after':{'menus':_0x11c15f[_0x37bd1b(0x13f)](_0x31139d=>({'id':_0x31139d['id'],'path':_0x31139d[_0x37bd1b(0x155)],'visible':_0x34e467['visible']}))},'dryRun':_0x5cb687,'backend':[...BACKEND],'plannedActions':_0x43af67,'snapshotHash':_0x5e8b50['hash'],'warnings':_0x43af67[_0x37bd1b(0x107)]===0x0?[_0x37bd1b(0x13b)]:[]});return{'plan':{..._0x1fccc9,'requestedVisible':_0x34e467[_0x37bd1b(0x11c)],'targets':_0x5ee14b},'beforeById':new Map(_0x11c15f[_0x37bd1b(0x13f)](_0x5ef04f=>[_0x5ef04f['id'],_0x5ef04f]))};}function selectTargets(_0x399c3c,_0x7fab55,_0x5b6964){const _0x28417f=a140_0x2c08d4,_0x296ed0=new Map(_0x399c3c[_0x28417f(0x13f)](_0x455e4d=>[_0x455e4d['id'],_0x455e4d])),_0x5b95e2=new Map(),_0x4c2318=_0x7fab55[_0x28417f(0x14b)](_0x38c53a=>!_0x296ed0['has'](_0x38c53a));if(_0x4c2318[_0x28417f(0x107)]>0x0)throw menuError(_0x28417f(0x108),_0x28417f(0x12c)+_0x4c2318[_0x28417f(0x115)](',\x20')+'.',_0x28417f(0x137));for(const _0x53119b of _0x7fab55){_0x5b95e2[_0x28417f(0x114)](_0x53119b,_0x296ed0[_0x28417f(0x142)](_0x53119b));}for(const _0x578f5c of _0x5b6964){const _0x230698=_0x399c3c[_0x28417f(0x14b)](_0x15b567=>_0x15b567[_0x28417f(0x155)]===_0x578f5c);if(_0x230698[_0x28417f(0x107)]===0x0)throw menuError('menu_selector_not_found',_0x28417f(0xe0)+JSON[_0x28417f(0xf5)](_0x578f5c)+'.',_0x28417f(0xfa));if(_0x230698[_0x28417f(0x107)]>0x1)throw menuError('menu_selector_ambiguous',_0x28417f(0xd9)+JSON[_0x28417f(0xf5)](_0x578f5c)+'.',_0x28417f(0x116)+_0x230698[_0x28417f(0x13f)](_0x200a5d=>_0x200a5d['id'])[_0x28417f(0x115)](',\x20')+'.');const _0x32de89=_0x230698[0x0];_0x5b95e2[_0x28417f(0x114)](_0x32de89['id'],_0x32de89);}return[..._0x5b95e2[_0x28417f(0x11d)]()];}function parseMenuIds(_0x7b92b6){const _0xa3c9b=a140_0x2c08d4,_0x52b452=parseCsv(_0x7b92b6),_0x33be5b=_0x52b452['map'](Number);if(_0x33be5b[_0xa3c9b(0xf2)](_0x49f6d5=>!Number['isSafeInteger'](_0x49f6d5)||_0x49f6d5<=0x0))throw CliErrors[_0xa3c9b(0x150)](_0xa3c9b(0xfc));return[...new Set(_0x33be5b)];}function parseCsv(_0x376a9e){const _0x5dabe5=a140_0x2c08d4;return[...new Set(_0x376a9e[_0x5dabe5(0x124)](',')[_0x5dabe5(0x13f)](_0x437643=>_0x437643[_0x5dabe5(0xd8)]())['filter'](Boolean))];}function parseBooleanFlag(_0x437601,_0x5dfb80,_0x54bfd6){const _0xd6c787=a140_0x2c08d4;if(!hasFlag(_0x437601,_0x5dfb80)){if(_0x54bfd6)throw CliErrors[_0xd6c787(0xf8)](_0x5dfb80);return undefined;}const _0x5dcb29=_0x437601[_0xd6c787(0x10e)][_0x5dfb80];if(_0x5dcb29===!![]||_0x5dcb29===![])return _0x5dcb29;if(_0x5dcb29==='true')return!![];if(_0x5dcb29===_0xd6c787(0xec))return![];throw CliErrors[_0xd6c787(0x150)]('--'+_0x5dfb80+_0xd6c787(0x11e));}function verifyVisibilityUpdate(_0x4ae871,_0x255fe2,_0x12d33f){const _0xf3450f=a140_0x2c08d4;assertVerified(!!_0x255fe2,_0xf3450f(0x147)+_0x4ae871['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x255fe2[_0xf3450f(0x11c)]===_0x12d33f,_0xf3450f(0x147)+_0x4ae871['id']+_0xf3450f(0xe3));const _0xb5f290=[['id',_0x255fe2['id'],_0x4ae871['id']],[_0xf3450f(0x11b),_0x255fe2[_0xf3450f(0x11b)],_0x4ae871[_0xf3450f(0x11b)]],[_0xf3450f(0x101),_0x255fe2[_0xf3450f(0x101)],_0x4ae871[_0xf3450f(0x101)]],[_0xf3450f(0x121),_0x255fe2[_0xf3450f(0x121)],_0x4ae871['label']],[_0xf3450f(0x155),_0x255fe2['path'],_0x4ae871[_0xf3450f(0x155)]],[_0xf3450f(0x111),_0x255fe2[_0xf3450f(0x111)],_0x4ae871[_0xf3450f(0x111)]],[_0xf3450f(0xdc),_0x255fe2['type'],_0x4ae871[_0xf3450f(0xdc)]],['sort',_0x255fe2[_0xf3450f(0x14c)],_0x4ae871[_0xf3450f(0x14c)]],[_0xf3450f(0x12e),_0x255fe2['resources'],_0x4ae871[_0xf3450f(0x12e)]],[_0xf3450f(0xe2),_0x255fe2[_0xf3450f(0xe2)],_0x4ae871['resourcesValid']],['childrenIds',_0x255fe2[_0xf3450f(0x131)],_0x4ae871['childrenIds']],['childrenCount',_0x255fe2['childrenCount'],_0x4ae871['childrenCount']],[_0xf3450f(0x152),_0x255fe2[_0xf3450f(0x152)],_0x4ae871[_0xf3450f(0x152)]],[_0xf3450f(0x140),_0x255fe2[_0xf3450f(0x140)],_0x4ae871[_0xf3450f(0x140)]],[_0xf3450f(0xea),_0x255fe2['modelType'],_0x4ae871[_0xf3450f(0xea)]],['datasetId',_0x255fe2[_0xf3450f(0xf1)],_0x4ae871[_0xf3450f(0xf1)]],['datasetCode',_0x255fe2[_0xf3450f(0x14f)],_0x4ae871[_0xf3450f(0x14f)]]];for(const [_0x2f48a8,_0x1a5c57,_0x34f82b]of _0xb5f290){assertVerified(sameValue(_0x1a5c57,_0x34f82b),_0xf3450f(0x147)+_0x4ae871['id']+'\x20'+_0x2f48a8+_0xf3450f(0xf3));}}function sameValue(_0x1550f0,_0x19eaff){const _0x4df342=a140_0x2c08d4;if(Array[_0x4df342(0x112)](_0x1550f0)||Array[_0x4df342(0x112)](_0x19eaff))return JSON[_0x4df342(0xf5)](_0x1550f0)===JSON['stringify'](_0x19eaff);return _0x1550f0===_0x19eaff;}
|
|
1
|
+
const a140_0x5d1117=a140_0x44a9;(function(_0x1de7af,_0xf1e56f){const _0x13ae7f=a140_0x44a9,_0x3c575e=_0x1de7af();while(!![]){try{const _0x1dba2d=parseInt(_0x13ae7f(0x1cf))/0x1*(-parseInt(_0x13ae7f(0x1f7))/0x2)+-parseInt(_0x13ae7f(0x1b7))/0x3+-parseInt(_0x13ae7f(0x1b9))/0x4*(parseInt(_0x13ae7f(0x1c9))/0x5)+parseInt(_0x13ae7f(0x19f))/0x6+parseInt(_0x13ae7f(0x1ae))/0x7*(parseInt(_0x13ae7f(0x1b4))/0x8)+-parseInt(_0x13ae7f(0x1f0))/0x9+-parseInt(_0x13ae7f(0x1e9))/0xa;if(_0x1dba2d===_0xf1e56f)break;else _0x3c575e['push'](_0x3c575e['shift']());}catch(_0x28d451){_0x3c575e['push'](_0x3c575e['shift']());}}}(a140_0x13a2,0xedb84));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a140_0x5d1117(0x1d2),'path':a140_0x5d1117(0x1b0)}];export const menuVisibilityUpdate={'service':a140_0x5d1117(0x1c2),'command':a140_0x5d1117(0x1cc),'description':a140_0x5d1117(0x1ab),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a140_0x5d1117(0x208),'type':a140_0x5d1117(0x209),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a140_0x5d1117(0x1ce),'type':a140_0x5d1117(0x209),'description':a140_0x5d1117(0x205)},{'name':a140_0x5d1117(0x1c3),'type':a140_0x5d1117(0x206),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a140_0x5d1117(0x1d6),'type':a140_0x5d1117(0x206),'description':a140_0x5d1117(0x1e3)},{'name':'expected-count','type':a140_0x5d1117(0x1d7),'description':a140_0x5d1117(0x1f9)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d9379){parseInput(_0x3d9379),requireExplicitYes(_0x3d9379);},async 'dryRun'(_0x4f8af6){const _0x582556=a140_0x5d1117,_0x423f02=await buildPlan(_0x4f8af6,!![]),_0x3a0a26=_0x423f02[_0x582556(0x202)][_0x582556(0x1a6)]?.[_0x582556(0x1b5)]??0x0,_0x52c7ab=_0x423f02[_0x582556(0x202)][_0x582556(0x1a9)][_0x582556(0x1b5)]-_0x3a0a26;return menuDryRunResult(_0x423f02[_0x582556(0x202)],{'method':_0x582556(0x1d2),'url':_0x582556(0x1b0),'body':{'updates':_0x423f02[_0x582556(0x202)][_0x582556(0x1a6)]?.[_0x582556(0x1ea)](_0xb0a928=>_0xb0a928[_0x582556(0x1da)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x3a0a26+'\x20menu(s);\x20skip\x20'+_0x52c7ab+_0x582556(0x1e7)});},async 'execute'(_0x246122){const _0x1c6d50=a140_0x5d1117;requireExplicitYes(_0x246122);const _0x5a5f53=await buildPlan(_0x246122,![]);await recheckMutationSnapshot(_0x246122,_0x5a5f53['plan'],'update\x20menu\x20visibility');const _0x5ced5d=[],_0x79045f=[],_0x40d90f=[];for(const _0x9dc4eb of _0x5a5f53[_0x1c6d50(0x202)][_0x1c6d50(0x1a9)]){if(_0x9dc4eb[_0x1c6d50(0x1e1)][_0x1c6d50(0x1c3)]===_0x5a5f53[_0x1c6d50(0x202)]['requestedVisible']){_0x5ced5d['push']({'id':_0x9dc4eb['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x246122[_0x1c6d50(0x1f4)],_0x246122[_0x1c6d50(0x198)],{'id':_0x9dc4eb['id'],'visible':_0x5a5f53[_0x1c6d50(0x202)][_0x1c6d50(0x1f8)]}),_0x5ced5d[_0x1c6d50(0x20b)]({'id':_0x9dc4eb['id'],'updated':!![],'skipped':![]});}catch(_0x16f95e){const _0x2eeb1a=mapMenuApiError(_0x16f95e,_0x1c6d50(0x1f5),_0x9dc4eb['id']);if(isMenuResponseLoss(_0x16f95e)&&_0x2eeb1a['code']!==_0x1c6d50(0x1df)){_0x40d90f[_0x1c6d50(0x20b)](_0x9dc4eb['id']);continue;}_0x79045f[_0x1c6d50(0x20b)]({'id':_0x9dc4eb['id'],'stage':_0x1c6d50(0x195),'code':_0x2eeb1a[_0x1c6d50(0x1c8)],'message':_0x2eeb1a[_0x1c6d50(0x19a)]});}}let _0x46d3f0;try{_0x46d3f0=await fetchMenuSnapshot(_0x246122['appCode'],_0x246122[_0x1c6d50(0x198)]);}catch(_0x3eccd4){const _0x4702b9=describeMenuErrorCause(_0x3eccd4,_0x1c6d50(0x1ee)),_0x2a0777=_0x40d90f[_0x1c6d50(0x1ea)](_0x57f09c=>({'id':_0x57f09c,'stage':_0x1c6d50(0x197),'code':_0x1c6d50(0x1a0),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x57f09c+_0x1c6d50(0x1d3),'requestedStateConfirmed':![],'recovered':![]})),_0x21fd86={'stage':'verification','code':_0x1c6d50(0x1a0),'message':_0x1c6d50(0x1aa),'targetIds':_0x5a5f53[_0x1c6d50(0x202)][_0x1c6d50(0x1a9)][_0x1c6d50(0x1ea)](_0xe897aa=>_0xe897aa['id']),'requestedStateConfirmed':![],..._0x4702b9};throw menuFailure(asVerificationError(_0x3eccd4,_0x1c6d50(0x19e)),_0x5a5f53['plan'],{'stage':'verification','succeeded':_0x5ced5d,'failedRecords':[..._0x79045f,..._0x2a0777,_0x21fd86],'warnings':[_0x1c6d50(0x1d4)],'verification':{'status':_0x1c6d50(0x1ed),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x452dc9=[];for(const _0x2aaa07 of _0x5ced5d){const _0x50d44d=Number(_0x2aaa07['id']),_0x3693f8=_0x5a5f53[_0x1c6d50(0x1f2)]['get'](_0x50d44d),_0x233344=_0x46d3f0[_0x1c6d50(0x1fa)][_0x1c6d50(0x1ca)](_0x50d44d);try{verifyVisibilityUpdate(_0x3693f8,_0x233344,_0x5a5f53['plan'][_0x1c6d50(0x1f8)]);}catch(_0x1b457e){const _0x16fbc8=asVerificationError(_0x1b457e,_0x1c6d50(0x1e8)+_0x50d44d+_0x1c6d50(0x212));_0x452dc9['push']({'id':_0x50d44d,'stage':_0x1c6d50(0x1c0),'code':_0x16fbc8[_0x1c6d50(0x1c8)],'message':_0x16fbc8[_0x1c6d50(0x19a)],'requestedStateConfirmed':![]});}}for(const _0x5a19a1 of _0x40d90f){const _0x25e56d=_0x5a5f53[_0x1c6d50(0x1f2)][_0x1c6d50(0x1ca)](_0x5a19a1),_0x3740df=_0x46d3f0['byId'][_0x1c6d50(0x1ca)](_0x5a19a1);try{verifyVisibilityUpdate(_0x25e56d,_0x3740df,_0x5a5f53['plan'][_0x1c6d50(0x1f8)]),_0x5ced5d['push']({'id':_0x5a19a1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4ded5d){const _0x3af5b0=asVerificationError(_0x4ded5d,_0x1c6d50(0x210)+_0x5a19a1+_0x1c6d50(0x1bd));_0x452dc9[_0x1c6d50(0x20b)]({'id':_0x5a19a1,'stage':_0x1c6d50(0x197),'code':_0x3af5b0['code'],'message':_0x3af5b0[_0x1c6d50(0x19a)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x452dc9['length']>0x0){const _0x4321d9=_0x452dc9[_0x1c6d50(0x1ea)](_0x5e4a24=>Number(_0x5e4a24['id'])),_0x5e654b=_0x5ced5d[_0x1c6d50(0x1fe)](_0x40b4d6=>_0x40b4d6['recovered']===!![])[_0x1c6d50(0x1b5)],_0x278385=menuError('menu_verification_failed',_0x1c6d50(0x1a1)+_0x4321d9[_0x1c6d50(0x19c)](',\x20')+'.',_0x1c6d50(0x1af));throw menuFailure(_0x278385,_0x5a5f53['plan'],{'stage':_0x1c6d50(0x1c0),'succeeded':_0x5ced5d,'failedRecords':[..._0x79045f,..._0x452dc9],'warnings':[_0x1c6d50(0x1c7)],'verification':{'status':_0x1c6d50(0x1ed),..._0x4321d9[_0x1c6d50(0x1b5)]===0x1?{'targetId':_0x4321d9[0x0]}:{'targetIds':_0x4321d9},'recoveredCount':_0x5e654b,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0xd88611=_0x5ced5d[_0x1c6d50(0x1fe)](_0x3ae585=>_0x3ae585[_0x1c6d50(0x20e)]===!![])[_0x1c6d50(0x1b5)],_0x3db7a7=_0x5ced5d[_0x1c6d50(0x1b5)]-_0xd88611,_0x2a3eda={..._0x5a5f53[_0x1c6d50(0x202)],'succeeded':_0x5ced5d,'failed':_0x79045f,'warnings':_0x79045f[_0x1c6d50(0x1b5)]>0x0?[..._0x5a5f53[_0x1c6d50(0x202)][_0x1c6d50(0x1ff)],_0x1c6d50(0x1db)]:_0x5a5f53[_0x1c6d50(0x202)][_0x1c6d50(0x1ff)],'verification':{'checkedBy':_0x1c6d50(0x1bc),'snapshotHash':_0x46d3f0['hash'],'matchesRequestedState':_0x79045f[_0x1c6d50(0x1b5)]===0x0,'recoveredCount':_0x40d90f[_0x1c6d50(0x1b5)]}};return{'ok':_0x79045f[_0x1c6d50(0x1b5)]===0x0,'data':_0x2a3eda,'message':_0x79045f[_0x1c6d50(0x1b5)]===0x0?_0x1c6d50(0x20c)+_0xd88611+_0x1c6d50(0x1d0)+_0x3db7a7+_0x1c6d50(0x1e7):_0x1c6d50(0x1ac)+_0xd88611+_0x1c6d50(0x1ef)+_0x3db7a7+_0x1c6d50(0x1d1)+_0x79045f['length']+_0x1c6d50(0x1a4)};}};function a140_0x13a2(){const _0x4316be=['\x20menu(s);\x20skipped\x20','\x20skipped,\x20','POST','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','expect-visible','number','childrenIds','has','body','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','update-menu-visibility','url','str','menu_permission_denied','Menu\x20path\x20selector\x20not\x20found:\x20','before','modelType','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_expected_count_mismatch','childrenCount','\x20unchanged\x20menu(s).','Menu\x20','4204340vGYSMX','map','split','validation','failed','verify\x20menu\x20visibility\x20update','\x20updated,\x20','557883ZJznyv','resources','beforeById','type','appCode','update\x20visibility\x20for','expected-count','6hDmHkk','requestedVisible','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','byId','stringify','trim','Menu\x20id\x20selector(s)\x20not\x20found:\x20','filter','warnings','pageId','parentId','plan','values','datasetCode','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','boolean','true','menu-ids','string','expectVisible','push','Updated\x20visibility\x20for\x20','menu_state_drift','updated','flagMissing','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified','set','false','path','update','resourcesValid','update-recovery','cookie','menu_selector_ambiguous','message','update\x20menu\x20visibility','join','num','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','8544456WCaEIb','menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','depth','pageType','\x20failed.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','plannedActions','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','isArray','targets','Final\x20menu\x20visibility\x20readback\x20failed.','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20visibility\x20update\x20completed:\x20','label','346073bDalmf','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','/smartapi/menu/update','sort','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','expectedCount','80ZAoExS','length','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','842721wOjtRb','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','15356kbHmqh','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menu_selector_not_found','menu\x20list','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','datasetId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','verification','some','menu','visible','\x20must\x20be\x20true\x20or\x20false.','hash','menuIds','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','code','40GFIJPj','get','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','visibility-update','\x20menu(s),\x20expected\x20','paths','50242yOhrYh'];a140_0x13a2=function(){return _0x4316be;};return a140_0x13a2();}function parseInput(_0x4ec343){const _0x2ec8da=a140_0x5d1117,_0x114fa9=parseMenuIds(_0x4ec343[_0x2ec8da(0x1de)](_0x2ec8da(0x208))),_0x4f1236=parseCsv(_0x4ec343[_0x2ec8da(0x1de)](_0x2ec8da(0x1ce)));if(_0x114fa9[_0x2ec8da(0x1b5)]===0x0&&_0x4f1236['length']===0x0)throw CliErrors[_0x2ec8da(0x1ec)](_0x2ec8da(0x1d5));const _0x1b0cc6=parseBooleanFlag(_0x4ec343,_0x2ec8da(0x1c3),!![]),_0x1f4e09=parseBooleanFlag(_0x4ec343,_0x2ec8da(0x1d6),![]);let _0x2addc1;if(hasFlag(_0x4ec343,_0x2ec8da(0x1f6))){_0x2addc1=_0x4ec343[_0x2ec8da(0x19d)](_0x2ec8da(0x1f6));if(!Number['isSafeInteger'](_0x2addc1)||_0x2addc1<0x0)throw CliErrors[_0x2ec8da(0x1ec)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x114fa9,'paths':_0x4f1236,'visible':_0x1b0cc6,'expectVisible':_0x1f4e09,'expectedCount':_0x2addc1};}async function buildPlan(_0x21793b,_0x5748d2){const _0x412e12=a140_0x5d1117,_0x17fdac=parseInput(_0x21793b),_0x228408=await fetchMutationSnapshot(_0x21793b,_0x412e12(0x19b)),_0x4734f5=selectTargets(_0x228408['menus'],_0x17fdac[_0x412e12(0x1c6)],_0x17fdac[_0x412e12(0x1ce)]);if(_0x17fdac[_0x412e12(0x1b3)]!==undefined&&_0x4734f5[_0x412e12(0x1b5)]!==_0x17fdac[_0x412e12(0x1b3)])throw menuError(_0x412e12(0x1e5),_0x412e12(0x211)+_0x4734f5[_0x412e12(0x1b5)]+_0x412e12(0x1cd)+_0x17fdac['expectedCount']+'.',_0x412e12(0x1bf));if(_0x17fdac[_0x412e12(0x20a)]!==undefined){const _0x415db9=_0x4734f5[_0x412e12(0x1fe)](_0x3d9066=>_0x3d9066[_0x412e12(0x1c3)]!==_0x17fdac['expectVisible']);if(_0x415db9['length']>0x0)throw menuError(_0x412e12(0x20d),_0x412e12(0x1b2)+_0x415db9[_0x412e12(0x1ea)](_0x4ce78c=>_0x4ce78c['id'])[_0x412e12(0x19c)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x377e76=_0x4734f5[_0x412e12(0x1ea)](_0x4e0870=>({'id':_0x4e0870['id'],'label':_0x4e0870[_0x412e12(0x1ad)],'path':_0x4e0870[_0x412e12(0x194)],'before':{'visible':_0x4e0870[_0x412e12(0x1c3)]},'after':{'visible':_0x17fdac[_0x412e12(0x1c3)]}})),_0x3c1846=_0x377e76[_0x412e12(0x1fe)](_0xa85402=>_0xa85402[_0x412e12(0x1e1)][_0x412e12(0x1c3)]!==_0x17fdac[_0x412e12(0x1c3)])[_0x412e12(0x1ea)](_0x1492c3=>({'stage':_0x412e12(0x1dc),'method':_0x412e12(0x1d2),'path':_0x412e12(0x1b0),'body':{'appCode':_0x21793b[_0x412e12(0x1f4)],'id':_0x1492c3['id'],'visible':_0x17fdac[_0x412e12(0x1c3)]}})),_0x24614b=mutationResult({'operation':_0x412e12(0x1cc),'selector':{'menuIds':_0x17fdac[_0x412e12(0x1c6)],'paths':_0x17fdac[_0x412e12(0x1ce)]},'before':{'menus':_0x4734f5['map'](_0x57385f=>({'id':_0x57385f['id'],'path':_0x57385f[_0x412e12(0x194)],'visible':_0x57385f[_0x412e12(0x1c3)]}))},'after':{'menus':_0x4734f5['map'](_0x279768=>({'id':_0x279768['id'],'path':_0x279768[_0x412e12(0x194)],'visible':_0x17fdac[_0x412e12(0x1c3)]}))},'dryRun':_0x5748d2,'backend':[...BACKEND],'plannedActions':_0x3c1846,'snapshotHash':_0x228408[_0x412e12(0x1c5)],'warnings':_0x3c1846[_0x412e12(0x1b5)]===0x0?[_0x412e12(0x1a5)]:[]});return{'plan':{..._0x24614b,'requestedVisible':_0x17fdac['visible'],'targets':_0x377e76},'beforeById':new Map(_0x4734f5[_0x412e12(0x1ea)](_0x97ec1e=>[_0x97ec1e['id'],_0x97ec1e]))};}function selectTargets(_0x5a61a6,_0x323cb2,_0x60df6d){const _0x48c4f5=a140_0x5d1117,_0x337880=new Map(_0x5a61a6[_0x48c4f5(0x1ea)](_0x5e3e8a=>[_0x5e3e8a['id'],_0x5e3e8a])),_0x185e26=new Map(),_0x377046=_0x323cb2['filter'](_0x1a1d89=>!_0x337880[_0x48c4f5(0x1d9)](_0x1a1d89));if(_0x377046['length']>0x0)throw menuError(_0x48c4f5(0x1bb),_0x48c4f5(0x1fd)+_0x377046['join'](',\x20')+'.',_0x48c4f5(0x1ba));for(const _0x284210 of _0x323cb2){_0x185e26[_0x48c4f5(0x192)](_0x284210,_0x337880[_0x48c4f5(0x1ca)](_0x284210));}for(const _0x35ab95 of _0x60df6d){const _0x17ad38=_0x5a61a6[_0x48c4f5(0x1fe)](_0x4865f2=>_0x4865f2[_0x48c4f5(0x194)]===_0x35ab95);if(_0x17ad38['length']===0x0)throw menuError('menu_selector_not_found',_0x48c4f5(0x1e0)+JSON['stringify'](_0x35ab95)+'.',_0x48c4f5(0x1b8));if(_0x17ad38['length']>0x1)throw menuError(_0x48c4f5(0x199),_0x48c4f5(0x1cb)+JSON['stringify'](_0x35ab95)+'.',_0x48c4f5(0x1a7)+_0x17ad38['map'](_0x141a8e=>_0x141a8e['id'])[_0x48c4f5(0x19c)](',\x20')+'.');const _0x5566e0=_0x17ad38[0x0];_0x185e26[_0x48c4f5(0x192)](_0x5566e0['id'],_0x5566e0);}return[..._0x185e26[_0x48c4f5(0x203)]()];}function a140_0x44a9(_0x4cec2e,_0x1f0f93){_0x4cec2e=_0x4cec2e-0x192;const _0x13a280=a140_0x13a2();let _0x44a92a=_0x13a280[_0x4cec2e];return _0x44a92a;}function parseMenuIds(_0xdd5064){const _0x3071f9=a140_0x5d1117,_0x65b629=parseCsv(_0xdd5064),_0x210e60=_0x65b629['map'](Number);if(_0x210e60[_0x3071f9(0x1c1)](_0x2b69c3=>!Number['isSafeInteger'](_0x2b69c3)||_0x2b69c3<=0x0))throw CliErrors[_0x3071f9(0x1ec)](_0x3071f9(0x1e4));return[...new Set(_0x210e60)];}function parseCsv(_0x35e414){const _0x1fcebb=a140_0x5d1117;return[...new Set(_0x35e414[_0x1fcebb(0x1eb)](',')['map'](_0x23a1aa=>_0x23a1aa[_0x1fcebb(0x1fc)]())[_0x1fcebb(0x1fe)](Boolean))];}function parseBooleanFlag(_0x2b07c9,_0x3ca27b,_0x46a676){const _0x33b7f0=a140_0x5d1117;if(!hasFlag(_0x2b07c9,_0x3ca27b)){if(_0x46a676)throw CliErrors[_0x33b7f0(0x20f)](_0x3ca27b);return undefined;}const _0x4a2b9c=_0x2b07c9['rawFlags'][_0x3ca27b];if(_0x4a2b9c===!![]||_0x4a2b9c===![])return _0x4a2b9c;if(_0x4a2b9c===_0x33b7f0(0x207))return!![];if(_0x4a2b9c===_0x33b7f0(0x193))return![];throw CliErrors[_0x33b7f0(0x1ec)]('--'+_0x3ca27b+_0x33b7f0(0x1c4));}function verifyVisibilityUpdate(_0x4edee8,_0x36247d,_0x33d41e){const _0x21d2c3=a140_0x5d1117;assertVerified(!!_0x36247d,_0x21d2c3(0x1e8)+_0x4edee8['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x36247d[_0x21d2c3(0x1c3)]===_0x33d41e,_0x21d2c3(0x1e8)+_0x4edee8['id']+_0x21d2c3(0x1b6));const _0x29a2b4=[['id',_0x36247d['id'],_0x4edee8['id']],[_0x21d2c3(0x201),_0x36247d['parentId'],_0x4edee8[_0x21d2c3(0x201)]],[_0x21d2c3(0x1a2),_0x36247d[_0x21d2c3(0x1a2)],_0x4edee8[_0x21d2c3(0x1a2)]],[_0x21d2c3(0x1ad),_0x36247d[_0x21d2c3(0x1ad)],_0x4edee8[_0x21d2c3(0x1ad)]],[_0x21d2c3(0x194),_0x36247d[_0x21d2c3(0x194)],_0x4edee8[_0x21d2c3(0x194)]],['url',_0x36247d[_0x21d2c3(0x1dd)],_0x4edee8[_0x21d2c3(0x1dd)]],[_0x21d2c3(0x1f3),_0x36247d[_0x21d2c3(0x1f3)],_0x4edee8[_0x21d2c3(0x1f3)]],['sort',_0x36247d[_0x21d2c3(0x1b1)],_0x4edee8[_0x21d2c3(0x1b1)]],['resources',_0x36247d[_0x21d2c3(0x1f1)],_0x4edee8[_0x21d2c3(0x1f1)]],[_0x21d2c3(0x196),_0x36247d['resourcesValid'],_0x4edee8['resourcesValid']],[_0x21d2c3(0x1d8),_0x36247d[_0x21d2c3(0x1d8)],_0x4edee8[_0x21d2c3(0x1d8)]],[_0x21d2c3(0x1e6),_0x36247d['childrenCount'],_0x4edee8[_0x21d2c3(0x1e6)]],[_0x21d2c3(0x200),_0x36247d['pageId'],_0x4edee8[_0x21d2c3(0x200)]],[_0x21d2c3(0x1a3),_0x36247d[_0x21d2c3(0x1a3)],_0x4edee8['pageType']],[_0x21d2c3(0x1e2),_0x36247d[_0x21d2c3(0x1e2)],_0x4edee8[_0x21d2c3(0x1e2)]],[_0x21d2c3(0x1be),_0x36247d[_0x21d2c3(0x1be)],_0x4edee8[_0x21d2c3(0x1be)]],['datasetCode',_0x36247d[_0x21d2c3(0x204)],_0x4edee8[_0x21d2c3(0x204)]]];for(const [_0x3e716d,_0x23327f,_0xf5b816]of _0x29a2b4){assertVerified(sameValue(_0x23327f,_0xf5b816),_0x21d2c3(0x1e8)+_0x4edee8['id']+'\x20'+_0x3e716d+'\x20changed\x20unexpectedly.');}}function sameValue(_0x1af3a0,_0x1ad27b){const _0x20aa4d=a140_0x5d1117;if(Array[_0x20aa4d(0x1a8)](_0x1af3a0)||Array[_0x20aa4d(0x1a8)](_0x1ad27b))return JSON[_0x20aa4d(0x1fb)](_0x1af3a0)===JSON[_0x20aa4d(0x1fb)](_0x1ad27b);return _0x1af3a0===_0x1ad27b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a141_0x277ff9=a141_0x2629;(function(_0x5c30aa,_0x533ac1){const _0x864a39=a141_0x2629,_0x1b6ea9=_0x5c30aa();while(!![]){try{const _0x233b05=-parseInt(_0x864a39(0x1bc))/0x1*(-parseInt(_0x864a39(0x1a6))/0x2)+parseInt(_0x864a39(0x19f))/0x3+-parseInt(_0x864a39(0x1bf))/0x4+-parseInt(_0x864a39(0x1ad))/0x5+parseInt(_0x864a39(0x1a7))/0x6*(parseInt(_0x864a39(0x1a4))/0x7)+-parseInt(_0x864a39(0x1b6))/0x8*(parseInt(_0x864a39(0x1af))/0x9)+parseInt(_0x864a39(0x1b7))/0xa;if(_0x233b05===_0x533ac1)break;else _0x1b6ea9['push'](_0x1b6ea9['shift']());}catch(_0x2a10f0){_0x1b6ea9['push'](_0x1b6ea9['shift']());}}}(a141_0x8e97,0x80c9e));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a141_0x2629(_0x2b3352,_0x5799e3){_0x2b3352=_0x2b3352-0x19e;const _0x8e978b=a141_0x8e97();let _0x262944=_0x8e978b[_0x2b3352];return _0x262944;}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=a141_0x277ff9(0x1ab);async function prepareCreate(_0x4a44ac){const _0x4eaad8=a141_0x277ff9,_0x280212=await readNotificationDocument(_0x4a44ac,_0x4eaad8(0x1b4)),_0x138af0=createMutationInput(_0x4a44ac[_0x4eaad8(0x1b5)],_0x280212);return{'document':_0x280212,'input':_0x138af0,'planned':projectNotificationConfig({'appCode':_0x4a44ac[_0x4eaad8(0x1b5)],'configName':_0x280212[_0x4eaad8(0x1c0)],'channelType':_0x280212[_0x4eaad8(0x1b2)],'endpointUrl':_0x280212[_0x4eaad8(0x1a8)],'channelConfig':_0x280212[_0x4eaad8(0x1a2)],'description':_0x280212[_0x4eaad8(0x19e)],'connectTimeout':_0x280212[_0x4eaad8(0x1a5)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x280212[_0x4eaad8(0x1a1)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a141_0x277ff9(0x1b1),'command':a141_0x277ff9(0x1b9),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':a141_0x277ff9(0x1b0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x58e22a){assertSingleNotificationSource(_0x58e22a);},async 'dryRun'(_0x55d989){const _0x4067f0=a141_0x277ff9,_0x1c04e7=await prepareCreate(_0x55d989),_0x4c7341=notificationLookupCommand(_0x55d989[_0x4067f0(0x1b5)],_0x1c04e7[_0x4067f0(0x1ba)][_0x4067f0(0x1b2)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x55d989['appCode'],'configName':_0x1c04e7[_0x4067f0(0x1ba)][_0x4067f0(0x1c0)],'channelType':_0x1c04e7[_0x4067f0(0x1ba)][_0x4067f0(0x1b2)]},'before':null,'after':_0x1c04e7[_0x4067f0(0x1a0)],'dryRun':!![],'backend':{'method':_0x4067f0(0x1a3),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x4c7341}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x1e6cf){const _0x3d6e2a=a141_0x277ff9,_0x40e809=await prepareCreate(_0x1e6cf),_0x4f11c6=notificationLookupCommand(_0x1e6cf[_0x3d6e2a(0x1b5)],_0x40e809[_0x3d6e2a(0x1ba)]['channelType']);let _0x122108;try{_0x122108=await createNotificationChannelConfig(_0x40e809[_0x3d6e2a(0x1a9)]);}catch(_0x151145){if(isPlatformTransportFailure(_0x151145))throw notificationError(_0x3d6e2a(0x1ae),_0x3d6e2a(0x1b3),_0x3d6e2a(0x1b8)+_0x4f11c6+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x3d6e2a(0x1b4),'mutation',_0x3d6e2a(0x1b8)+_0x4f11c6+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x3d6e2a(0x1bd)](_0x122108)||_0x122108<=0x0)throw notificationError(_0x3d6e2a(0x1ae),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x3d6e2a(0x1b8)+_0x4f11c6+';\x20do\x20not\x20resubmit.');let _0x4274f4;try{const _0x78463d=await getNotificationChannelConfig(_0x122108,_0x1e6cf[_0x3d6e2a(0x1b5)]);_0x4274f4=normalizeExactNotificationConfig(_0x78463d,_0x122108,_0x1e6cf[_0x3d6e2a(0x1b5)]);}catch{throw safeApiFailure(_0x3d6e2a(0x1b4),_0x3d6e2a(0x1be),'Inspect\x20with\x20'+_0x4f11c6+_0x3d6e2a(0x1aa));}return{'ok':!![],'data':{'operation':_0x3d6e2a(0x1b4),'selector':{'appCode':_0x4274f4[_0x3d6e2a(0x1b5)],'id':_0x4274f4['id'],'configCode':_0x4274f4[_0x3d6e2a(0x1ac)],'configName':_0x4274f4['configName'],'channelType':_0x4274f4[_0x3d6e2a(0x1b2)]},'before':null,'after':projectNotificationConfig(_0x4274f4),'dryRun':![],'backend':{'method':_0x3d6e2a(0x1a3),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3d6e2a(0x1bb),'lookupCommand':_0x4f11c6}},'message':'Created\x20notification\x20config\x20'+_0x4274f4['id']};}};function a141_0x8e97(){const _0x113006=['write','notification','channelType','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','create','appCode','16belbFV','6065840KupfIW','Inspect\x20with\x20','config-create','document','verified','1866EnNMYh','isSafeInteger','verification','1231072vVYHFM','configName','description','1077006RpVcNe','planned','readTimeout','channelConfig','POST','7jKfNaJ','connectTimeout','298Ltgroo','585030grPimS','endpointUrl','input',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/create','configCode','371385dZnBMi','notification_config_create_outcome_unknown','1942029wuZdif'];a141_0x8e97=function(){return _0x113006;};return a141_0x8e97();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x20f33b=a142_0x493b;(function(_0x55c354,_0x57c580){const _0x5ecd53=a142_0x493b,_0x45735e=_0x55c354();while(!![]){try{const _0x5391d9=-parseInt(_0x5ecd53(0x16c))/0x1+parseInt(_0x5ecd53(0x16e))/0x2+-parseInt(_0x5ecd53(0x16f))/0x3+-parseInt(_0x5ecd53(0x168))/0x4+parseInt(_0x5ecd53(0x16d))/0x5*(-parseInt(_0x5ecd53(0x174))/0x6)+parseInt(_0x5ecd53(0x179))/0x7+parseInt(_0x5ecd53(0x162))/0x8;if(_0x5391d9===_0x57c580)break;else _0x45735e['push'](_0x45735e['shift']());}catch(_0x3ed773){_0x45735e['push'](_0x45735e['shift']());}}}(a142_0x3fa8,0x712a0));import{asDryRunResult}from'../../commands/common/dry-run.js';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';function a142_0x493b(_0x1bf6f4,_0xf34bfe){_0x1bf6f4=_0x1bf6f4-0x161;const _0x3fa819=a142_0x3fa8();let _0x493b0f=_0x3fa819[_0x1bf6f4];return _0x493b0f;}const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a142_0x20f33b(0x171);function a142_0x3fa8(){const _0x34c7b4=['channelType','11002952yYgmEK','Deleted\x20notification\x20config\x20','POST',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Notification\x20config\x20','1134608akTyej','mutation','high-risk-write','verified','587931ibGthf','25HRuKTk','696490UyxkIw','310122wkdhAz','\x20remains\x20present\x20after\x20delete.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','before','appCode','680934lyIQWu','some','config-delete','notification_config_delete_verification_failed','Inspect\x20with\x20','1976156TsCzTV','delete','notification'];a142_0x3fa8=function(){return _0x34c7b4;};return a142_0x3fa8();}async function prepareDelete(_0x5b7611){const _0x5befc2=a142_0x20f33b,_0x38fa47=readNotificationId(_0x5b7611),_0x2f0bfc=await requireExactNotificationConfig(_0x5b7611[_0x5befc2(0x173)],_0x38fa47,'delete');return{'id':_0x38fa47,'before':_0x2f0bfc};}export const notificationConfigDelete={'service':a142_0x20f33b(0x17b),'command':a142_0x20f33b(0x176),'description':a142_0x20f33b(0x166),'risk':a142_0x20f33b(0x16a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x56caab){readNotificationId(_0x56caab),requireNotificationExplicitYes(_0x56caab);},async 'dryRun'(_0x3e7a24){const _0x5ec578=a142_0x20f33b,_0x5c40de=await prepareDelete(_0x3e7a24),_0x382977=notificationLookupCommand(_0x3e7a24[_0x5ec578(0x173)],_0x5c40de[_0x5ec578(0x172)][_0x5ec578(0x161)]);return asDryRunResult({'operation':_0x5ec578(0x17a),'selector':notificationSelector(_0x5c40de[_0x5ec578(0x172)]),'before':projectNotificationConfig(_0x5c40de[_0x5ec578(0x172)]),'after':null,'dryRun':!![],'backend':{'method':_0x5ec578(0x164),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x382977}},{'method':_0x5ec578(0x164),'url':DELETE_PATH});},async 'execute'(_0x2fc10f){const _0x1364e2=a142_0x20f33b;requireNotificationExplicitYes(_0x2fc10f);const _0x21615f=await prepareDelete(_0x2fc10f),_0x27e17a=notificationLookupCommand(_0x2fc10f[_0x1364e2(0x173)],_0x21615f['before']['channelType']);let _0x3a1989=![];try{await deleteNotificationChannelConfig(_0x21615f['id'],_0x2fc10f[_0x1364e2(0x173)]);}catch(_0x508808){if(!isPlatformTransportFailure(_0x508808))throw safeApiFailure('delete',_0x1364e2(0x169),_0x1364e2(0x178)+_0x27e17a+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3a1989=!![];}let _0x1effb0;try{_0x1effb0=await listNotificationChannelConfigs(_0x2fc10f[_0x1364e2(0x173)],_0x21615f[_0x1364e2(0x172)][_0x1364e2(0x161)]),validateNotificationDeleteReadback(_0x1effb0,_0x2fc10f[_0x1364e2(0x173)],_0x21615f[_0x1364e2(0x172)]['channelType']);}catch{throw notificationError(_0x3a1989?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x1364e2(0x167)+_0x21615f['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x27e17a+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x1effb0[_0x1364e2(0x175)](_0x5bd600=>_0x5bd600['id']===_0x21615f['id']))throw notificationError(_0x3a1989?'notification_config_delete_outcome_unknown':_0x1364e2(0x177),_0x1364e2(0x167)+_0x21615f['id']+_0x1364e2(0x170),_0x1364e2(0x178)+_0x27e17a+_0x1364e2(0x165));const _0x7ba80d=[REFERENCE_WARNING];return _0x3a1989&&_0x7ba80d['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x1364e2(0x17a),'selector':notificationSelector(_0x21615f['before']),'before':projectNotificationConfig(_0x21615f[_0x1364e2(0x172)]),'after':null,'dryRun':![],'backend':{'method':_0x1364e2(0x164),'path':DELETE_PATH},'warnings':_0x7ba80d,'verification':{'status':_0x1364e2(0x16b),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3a1989,'lookupCommand':_0x27e17a}},'message':_0x1364e2(0x163)+_0x21615f['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x2acb3d=a143_0x7e12;function a143_0x30f8(){const _0x28a0dc=['3gkTUXD','3374vTPNSL','10648854xSsyQp','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','11wEIIyk','\x20notification\x20config(s)','18761090eNZEcu','985XncUXT','50239HeRRHq','6410358WPcUqp','571ixgcQM','notification','config-list','896ALfQZe','map','2457772UxcFcX','Notification\x20channel\x20type','appCode','type'];a143_0x30f8=function(){return _0x28a0dc;};return a143_0x30f8();}(function(_0x32d32d,_0x3fb047){const _0x5a1289=a143_0x7e12,_0x54057a=_0x32d32d();while(!![]){try{const _0x4fa1cb=-parseInt(_0x5a1289(0x8e))/0x1*(parseInt(_0x5a1289(0x85))/0x2)+parseInt(_0x5a1289(0x84))/0x3*(parseInt(_0x5a1289(0x93))/0x4)+parseInt(_0x5a1289(0x8b))/0x5+parseInt(_0x5a1289(0x8d))/0x6+parseInt(_0x5a1289(0x8c))/0x7*(parseInt(_0x5a1289(0x91))/0x8)+parseInt(_0x5a1289(0x86))/0x9+parseInt(_0x5a1289(0x8a))/0xa*(-parseInt(_0x5a1289(0x88))/0xb);if(_0x4fa1cb===_0x3fb047)break;else _0x54057a['push'](_0x54057a['shift']());}catch(_0x6f4661){_0x54057a['push'](_0x54057a['shift']());}}}(a143_0x30f8,0xcacd5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a143_0x7e12(_0x2f2b1c,_0x14bf24){_0x2f2b1c=_0x2f2b1c-0x81;const _0x30f8a9=a143_0x30f8();let _0x7e128=_0x30f8a9[_0x2f2b1c];return _0x7e128;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a143_0x2acb3d(0x8f),'command':a143_0x2acb3d(0x90),'description':a143_0x2acb3d(0x87),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a143_0x2acb3d(0x83),'type':'string','description':a143_0x2acb3d(0x81),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x582145){readNotificationChannelType(_0x582145);},async 'execute'(_0xc8e69a){const _0x177df3=a143_0x2acb3d,_0x4f33d5=readNotificationChannelType(_0xc8e69a),_0x229f89=await listNotificationChannelConfigs(_0xc8e69a[_0x177df3(0x82)],_0x4f33d5),_0x5aa4a3=_0x229f89[_0x177df3(0x92)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xc8e69a[_0x177df3(0x82)],'channelType':_0x4f33d5,'count':_0x5aa4a3['length'],'configs':_0x5aa4a3},'message':'Found\x20'+_0x5aa4a3['length']+'\x20'+_0x4f33d5+_0x177df3(0x89)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x228206=a144_0x1130;(function(_0x1b95b4,_0x3f6e93){const _0x11af45=a144_0x1130,_0x3dffd3=_0x1b95b4();while(!![]){try{const _0xa6bc80=-parseInt(_0x11af45(0x76))/0x1+parseInt(_0x11af45(0x95))/0x2*(-parseInt(_0x11af45(0x96))/0x3)+parseInt(_0x11af45(0x7b))/0x4*(parseInt(_0x11af45(0x88))/0x5)+-parseInt(_0x11af45(0x8c))/0x6*(parseInt(_0x11af45(0x8e))/0x7)+-parseInt(_0x11af45(0x8f))/0x8+parseInt(_0x11af45(0x7f))/0x9*(parseInt(_0x11af45(0x73))/0xa)+-parseInt(_0x11af45(0x6f))/0xb*(-parseInt(_0x11af45(0x74))/0xc);if(_0xa6bc80===_0x3f6e93)break;else _0x3dffd3['push'](_0x3dffd3['shift']());}catch(_0x538f1f){_0x3dffd3['push'](_0x3dffd3['shift']());}}}(a144_0x4520,0x97678));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a144_0x4520(){const _0x10a6dc=['update','config-update','Inspect\x20with\x20--id\x20','6DMkHbI','\x20with\x20','3119606fQZtgf','971920jRFoNl','verifiedFields','channelType','/notification/channel-config/update','high-risk-write','appCode','6OgWTVH','762417BIOjYo','4886321kThvQa','notification_config_update_outcome_unknown','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','notification','471430OcyVTc','48tzTzrG','verified','212213VGEcmg','POST','allMatch','before','notification_config_update_verification_failed','220340prPQgr','provesChange','planned','mutation','63Algzpv','Updated\x20notification\x20config\x20','Notification\x20config\x20','Inspect\x20ID\x20',';\x20do\x20not\x20resubmit\x20automatically.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','\x20via\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','5BNasfn'];a144_0x4520=function(){return _0x10a6dc;};return a144_0x4520();}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=a144_0x228206(0x92);async function prepareUpdate(_0x195cf2){const _0xa9240=a144_0x228206,_0x49e4d3=readNotificationId(_0x195cf2),_0x4bc4fb=await readNotificationDocument(_0x195cf2,_0xa9240(0x89)),_0x1de596=await requireExactNotificationConfig(_0x195cf2['appCode'],_0x49e4d3,_0xa9240(0x89));return{'id':_0x49e4d3,'patch':_0x4bc4fb,'before':_0x1de596,'payload':mergeUpdateInput(_0x1de596,_0x4bc4fb),'planned':plannedUpdateProjection(_0x1de596,_0x4bc4fb)};}function a144_0x1130(_0x3bb410,_0x293353){_0x3bb410=_0x3bb410-0x6f;const _0x45202f=a144_0x4520();let _0x1130cf=_0x45202f[_0x3bb410];return _0x1130cf;}export const notificationConfigUpdate={'service':a144_0x228206(0x72),'command':a144_0x228206(0x8a),'description':a144_0x228206(0x71),'risk':a144_0x228206(0x93),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x38adf6){readNotificationId(_0x38adf6),assertSingleNotificationSource(_0x38adf6),requireNotificationExplicitYes(_0x38adf6);},async 'dryRun'(_0x40f60d){const _0x43eaa3=a144_0x228206,_0x22facc=await prepareUpdate(_0x40f60d),_0xd2b8aa=notificationLookupCommand(_0x40f60d[_0x43eaa3(0x94)],_0x22facc[_0x43eaa3(0x79)][_0x43eaa3(0x91)]);return asDryRunResult({'operation':_0x43eaa3(0x89),'selector':notificationSelector(_0x22facc[_0x43eaa3(0x79)]),'before':projectNotificationConfig(_0x22facc['before']),'after':_0x22facc['planned'],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x43eaa3(0x7d),'lookupCommand':_0xd2b8aa}},{'method':_0x43eaa3(0x77),'url':UPDATE_PATH});},async 'execute'(_0x1e65b3){const _0x21f8f7=a144_0x228206;requireNotificationExplicitYes(_0x1e65b3);const _0x704222=await prepareUpdate(_0x1e65b3),_0x3f1413=notificationLookupCommand(_0x1e65b3[_0x21f8f7(0x94)],_0x704222[_0x21f8f7(0x79)][_0x21f8f7(0x91)]);let _0x599a02=![];try{await updateNotificationChannelConfig(_0x704222['payload']);}catch(_0x5368e9){if(!isPlatformTransportFailure(_0x5368e9))throw safeApiFailure('update',_0x21f8f7(0x7e),_0x21f8f7(0x82)+_0x704222['id']+_0x21f8f7(0x8d)+_0x3f1413+_0x21f8f7(0x84));_0x599a02=!![];}let _0x549950;try{const _0x3c09c2=await getNotificationChannelConfig(_0x704222['id'],_0x1e65b3[_0x21f8f7(0x94)]);_0x549950=normalizeExactNotificationConfig(_0x3c09c2,_0x704222['id'],_0x1e65b3[_0x21f8f7(0x94)]);}catch{throw notificationError(_0x599a02?'notification_config_update_outcome_unknown':'notification_config_update_verification_unavailable',_0x21f8f7(0x81)+_0x704222['id']+_0x21f8f7(0x87),_0x21f8f7(0x8b)+_0x704222['id']+_0x21f8f7(0x86)+_0x3f1413+_0x21f8f7(0x83));}const _0x16ce88=requestedSafeFieldsMatch(_0x704222['before'],_0x549950,_0x704222['patch']);if(!_0x16ce88[_0x21f8f7(0x78)]||_0x599a02&&!_0x16ce88[_0x21f8f7(0x7c)])throw notificationError(_0x599a02?_0x21f8f7(0x70):_0x21f8f7(0x7a),'Notification\x20config\x20'+_0x704222['id']+_0x21f8f7(0x85),'Inspect\x20with\x20--id\x20'+_0x704222['id']+'\x20via\x20'+_0x3f1413+_0x21f8f7(0x83));const _0x40a1a1=_0x599a02?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x21f8f7(0x89),'selector':notificationSelector(_0x549950),'before':projectNotificationConfig(_0x704222[_0x21f8f7(0x79)]),'after':projectNotificationConfig(_0x549950),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x40a1a1,'verification':{'status':_0x21f8f7(0x75),'recoveredAfterUnknownResponse':_0x599a02,'verifiedFields':_0x16ce88[_0x21f8f7(0x90)],'lookupCommand':_0x3f1413}},'message':_0x21f8f7(0x80)+_0x549950['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a145_0x2c97(){const _0x121da9=['7oKUCuX','1722743UyxWHW','4831450qYaLOj','9llZyvw','128AgRSaK','5759862ZjSYQX','2556584YLLOmB','23396TDIESU','7325336NsonfF','20elXCvz','681144gGsbyX'];a145_0x2c97=function(){return _0x121da9;};return a145_0x2c97();}(function(_0x117370,_0x2dcb41){const _0x2b2f0f=a145_0x31b6,_0x151433=_0x117370();while(!![]){try{const _0x32aa12=parseInt(_0x2b2f0f(0x13b))/0x1*(-parseInt(_0x2b2f0f(0x13e))/0x2)+-parseInt(_0x2b2f0f(0x136))/0x3+-parseInt(_0x2b2f0f(0x13d))/0x4+parseInt(_0x2b2f0f(0x139))/0x5+-parseInt(_0x2b2f0f(0x13c))/0x6*(-parseInt(_0x2b2f0f(0x137))/0x7)+parseInt(_0x2b2f0f(0x13f))/0x8*(parseInt(_0x2b2f0f(0x13a))/0x9)+parseInt(_0x2b2f0f(0x140))/0xa*(parseInt(_0x2b2f0f(0x138))/0xb);if(_0x32aa12===_0x2dcb41)break;else _0x151433['push'](_0x151433['shift']());}catch(_0x39bd10){_0x151433['push'](_0x151433['shift']());}}}(a145_0x2c97,0xc1446));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a145_0x31b6(_0x12df74,_0x4692b8){_0x12df74=_0x12df74-0x136;const _0x2c973d=a145_0x2c97();let _0x31b683=_0x2c973d[_0x12df74];return _0x31b683;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a146_0x505f1e=a146_0x30ef;(function(_0x16ac7a,_0x139b54){const _0x5c2016=a146_0x30ef,_0x583ed1=_0x16ac7a();while(!![]){try{const _0x20860f=-parseInt(_0x5c2016(0x85))/0x1+parseInt(_0x5c2016(0xef))/0x2+-parseInt(_0x5c2016(0xc3))/0x3*(-parseInt(_0x5c2016(0x97))/0x4)+-parseInt(_0x5c2016(0xe9))/0x5+parseInt(_0x5c2016(0xcb))/0x6+parseInt(_0x5c2016(0xd9))/0x7+parseInt(_0x5c2016(0xa1))/0x8*(parseInt(_0x5c2016(0xb8))/0x9);if(_0x20860f===_0x139b54)break;else _0x583ed1['push'](_0x583ed1['shift']());}catch(_0xb3da37){_0x583ed1['push'](_0x583ed1['shift']());}}}(a146_0x48b2,0xed779));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x30ef(_0x552d33,_0x4fd7e7){_0x552d33=_0x552d33-0x7e;const _0x48b280=a146_0x48b2();let _0x30ef44=_0x48b280[_0x552d33];return _0x30ef44;}import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a146_0x505f1e(0xe8),'FEISHU','DINGTALK','WECOM',a146_0x505f1e(0x86)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a146_0x505f1e(0xd7),a146_0x505f1e(0x95),'endpointUrl',a146_0x505f1e(0xdd),a146_0x505f1e(0xf1),'connectTimeout',a146_0x505f1e(0x91)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a146_0x505f1e(0xc5),a146_0x505f1e(0xb3)]),EMAIL_RECIPIENT_FIELDS=new Set([a146_0x505f1e(0xda),'recipients',a146_0x505f1e(0x9d),'bccList',a146_0x505f1e(0x8b),a146_0x505f1e(0xb4),a146_0x505f1e(0xb7),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a146_0x505f1e(0xc7),'type':a146_0x505f1e(0xe4),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a146_0x505f1e(0xae),'required':![],'default':![],'description':a146_0x505f1e(0x9c)},{'name':a146_0x505f1e(0xb5),'type':a146_0x505f1e(0xe4),'required':![],'description':a146_0x505f1e(0x99)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a146_0x505f1e(0xde)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x540b3a,_0x30f11f,_0x541a42){return new CliError(_0x540b3a,0x1,_0x30f11f,_0x541a42);}export function readNotificationId(_0x196f22){const _0x316a0c=a146_0x505f1e,_0x5394df=_0x196f22[_0x316a0c(0xe5)]('id');if(!Number[_0x316a0c(0xcf)](_0x5394df)||_0x5394df<=0x0)throw notificationError(_0x316a0c(0xa2),_0x316a0c(0x94));return _0x5394df;}export function requireNotificationExplicitYes(_0x1e537f){const _0x1d60fb=a146_0x505f1e;if(_0x1e537f['bool']('dry-run')||_0x1e537f[_0x1d60fb(0xe3)]('yes'))return;throw notificationError(_0x1d60fb(0x9b),_0x1d60fb(0x81),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x1d5d34,_0x49bf3f=a146_0x505f1e(0x90),_0x2d1992='EMAIL'){const _0x5a88e6=a146_0x505f1e,_0x46ac9b=_0x1d5d34[_0x5a88e6(0xa3)](_0x49bf3f)['trim']()||_0x2d1992;if(!NOTIFICATION_CHANNEL_TYPES[_0x5a88e6(0xdb)](_0x46ac9b))throw CliErrors[_0x5a88e6(0x7f)](_0x5a88e6(0xd3)+_0x49bf3f+':\x20'+_0x46ac9b,_0x5a88e6(0xd6)+NOTIFICATION_CHANNEL_TYPES[_0x5a88e6(0xdc)](',\x20')+'.');return _0x46ac9b;}export function assertSingleNotificationSource(_0x10ee32){const _0xa02b5f=a146_0x505f1e,_0x499e44=[],_0x2dfba4=_0x10ee32[_0xa02b5f(0xa3)](_0xa02b5f(0xc7))[_0xa02b5f(0xc9)]();if(_0x2dfba4)_0x499e44[_0xa02b5f(0x89)]({'kind':'file','path':_0x2dfba4});if(_0x10ee32[_0xa02b5f(0xe3)](_0xa02b5f(0xc6)))_0x499e44[_0xa02b5f(0x89)]({'kind':_0xa02b5f(0xc6)});const _0x13808a=_0x10ee32[_0xa02b5f(0xa3)](_0xa02b5f(0xb5))[_0xa02b5f(0xc9)]();if(_0x13808a)_0x499e44[_0xa02b5f(0x89)]({'kind':_0xa02b5f(0xd8),'name':_0x13808a});if(_0x499e44['length']===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xa02b5f(0xcc));if(_0x499e44['length']>0x1)throw CliErrors[_0xa02b5f(0x7f)](_0xa02b5f(0x96),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x499e44[0x0];}export async function readNotificationDocument(_0x5181ab,_0x2fb30c){const _0x34f7ef=a146_0x505f1e,_0x3bb5e2=assertSingleNotificationSource(_0x5181ab),_0x5870ec=_0x3bb5e2[_0x34f7ef(0xd4)]==='file'?_0x34f7ef(0x82)+_0x3bb5e2[_0x34f7ef(0xc0)]:_0x3bb5e2[_0x34f7ef(0xd4)]===_0x34f7ef(0xd8)?'environment\x20variable\x20'+_0x3bb5e2[_0x34f7ef(0x84)]:_0x34f7ef(0xc6);let _0x1f1814;try{if(_0x3bb5e2[_0x34f7ef(0xd4)]==='file')_0x1f1814=await readFile(_0x3bb5e2[_0x34f7ef(0xc0)],'utf8');else{if(_0x3bb5e2[_0x34f7ef(0xd4)]==='env'){if(!(_0x3bb5e2[_0x34f7ef(0x84)]in process.env))throw notificationError(_0x34f7ef(0x9f),_0x34f7ef(0xa6)+_0x3bb5e2['name']);_0x1f1814=process.env[_0x3bb5e2.name]??'';}else _0x1f1814=await readStdin();}}catch(_0x1aad77){if(_0x1aad77 instanceof CliError)throw _0x1aad77;throw notificationError(_0x34f7ef(0x9f),_0x34f7ef(0xf3)+_0x5870ec+'.');}let _0x40855a;try{_0x40855a=JSON['parse'](_0x1f1814);}catch{throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x5870ec+_0x34f7ef(0xa4),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x40855a))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x5870ec+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x40855a,_0x2fb30c);}export function projectNotificationListConfig(_0x2b9bd0,_0xc858e4){const _0x1e9504=a146_0x505f1e;return{'id':typeof _0x2b9bd0['id']==='number'?_0x2b9bd0['id']:null,'configCode':requireResponseString(_0x2b9bd0[_0x1e9504(0xc5)],'configCode',_0xc858e4),'configName':requireResponseString(_0x2b9bd0[_0x1e9504(0xd7)],_0x1e9504(0xd7),_0xc858e4),'channelType':requireResponseString(_0x2b9bd0[_0x1e9504(0x95)],'channelType',_0xc858e4),'description':normalizeNullableString(_0x2b9bd0[_0x1e9504(0xf1)]),'createTime':normalizeNullableString(_0x2b9bd0[_0x1e9504(0xed)]),'updateTime':normalizeNullableString(_0x2b9bd0[_0x1e9504(0x9a)])};}function a146_0x48b2(){const _0x583fea=['notification_config_response_invalid','description','endpointUrlRaw','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','notification_config_field_forbidden','appCode','Notification\x20JSON\x20field\x20\x22','has','validation','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','file\x20','\x20characters.','name','1935335Ocsahw','WEBHOOK','apiError','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','push','messageTemplate','replyTo','connectTimeout','\x22channelType\x22.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20JSON\x20object\x20or\x20null','type','readTimeout','a\x20supported\x20string','\x20has\x20invalid\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','channelType','Notification\x20JSON\x20source\x20is\x20ambiguous.','329348qOQCqa','keys','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','updateTime','notification_config_confirmation_required','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','ccList','prototype','notification_config_source_unavailable','failed','12310720HzlRGM','notification_config_id_invalid','str','\x20is\x20invalid.','_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','channelConfigRaw','Notification\x20config\x20list\x20item\x20','a\x20JSON\x20object','entries','a\x20string\x20or\x20null','some','\x20--format\x20compress','boolean','object','\x20has\x20an\x20invalid\x20appCode.','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_field_required','channelCode','subjectPrefix','from-env','Item\x20','fromName','9QRFUNA','\x22\x20is\x20forbidden.','notification_config_channel_field_forbidden','notification_config_field_unknown','Invalid\x20notification\x20config\x20response.','Create\x20JSON\x20requires\x20field\x20','\x20failed.','call','path','update','\x22\x20must\x20be\x20','9SSTwkw','Notification\x20config\x20','configCode','stdin','file','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','trim','\x20has\x20an\x20unsupported\x20channelType.','1829472RlZmvl','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','<redacted>','isArray','isSafeInteger','\x22configName\x22.','endpointUrl','notification_config_field_invalid','Invalid\x20--','kind','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Allowed\x20values:\x20','configName','env','3892413oXBnKm','emailTargets','includes','join','channelConfig','Application-level\x20notification\x20config\x20ID','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','preflight','length','notification_config_update_empty','bool','string','num','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20has\x20an\x20invalid\x20id.','EMAIL','5230710QwFWqD','endpointUrl:null','create','a\x20non-empty\x20string','createTime','\x22\x20cannot\x20exceed\x20','2614640ccXtyC'];a146_0x48b2=function(){return _0x583fea;};return a146_0x48b2();}export function normalizeExactNotificationConfig(_0x1854db,_0x4ebeaf,_0x366806){const _0x185c35=a146_0x505f1e;if(!Number[_0x185c35(0xcf)](_0x1854db['id'])||_0x1854db['id']!==_0x4ebeaf)throw notificationError(_0x185c35(0xf0),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x4ebeaf+'.');if(_0x1854db['appCode']!==_0x366806)throw notificationError(_0x185c35(0xf0),'Notification\x20config\x20'+_0x4ebeaf+_0x185c35(0xdf));const _0x2f3a73=requireExactString(_0x1854db[_0x185c35(0xd7)],_0x185c35(0xd7),_0x4ebeaf),_0x281eb6=requireExactString(_0x1854db['configCode'],'configCode',_0x4ebeaf),_0x3bc2a5=requireExactString(_0x1854db[_0x185c35(0x95)],_0x185c35(0x95),_0x4ebeaf);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3bc2a5))throw notificationError(_0x185c35(0xf0),'Notification\x20config\x20'+_0x4ebeaf+_0x185c35(0xca));const _0x2445a3=responseNullableString(_0x1854db[_0x185c35(0xd1)],_0x185c35(0xd1),_0x4ebeaf),_0x36fbf9=responseNullableString(_0x1854db[_0x185c35(0xdd)],_0x185c35(0xdd),_0x4ebeaf),_0x2ecb21=responseNullableString(_0x1854db['description'],_0x185c35(0xf1),_0x4ebeaf),_0x4cc95f=responseNullableTimeout(_0x1854db[_0x185c35(0x8c)],_0x185c35(0x8c),_0x4ebeaf),_0x499348=responseNullableTimeout(_0x1854db[_0x185c35(0x91)],'readTimeout',_0x4ebeaf);return{'id':_0x4ebeaf,'appCode':_0x366806,'configCode':_0x281eb6,'configName':_0x2f3a73,'channelType':_0x3bc2a5,'endpointUrl':redactSensitive(_0x2445a3),'channelConfig':redactSensitive(_0x36fbf9),'description':_0x2ecb21,'connectTimeout':_0x4cc95f,'readTimeout':_0x499348,'endpointUrlRaw':_0x2445a3,'channelConfigRaw':_0x36fbf9};}export async function requireExactNotificationConfig(_0x5d14e1,_0x58c69e,_0x3018a4){const _0xb7c6f=a146_0x505f1e;let _0x28c130;try{_0x28c130=await getNotificationChannelConfig(_0x58c69e,_0x5d14e1);}catch{throw safeApiFailure(_0x3018a4,_0xb7c6f(0xe0),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x5d14e1+_0xb7c6f(0x88));}return normalizeExactNotificationConfig(_0x28c130,_0x58c69e,_0x5d14e1);}export function projectNotificationConfig(_0x3b98ab){const _0x111aa8=a146_0x505f1e;return{'id':_0x3b98ab['id']??null,'appCode':_0x3b98ab[_0x111aa8(0xf6)],'configCode':_0x3b98ab[_0x111aa8(0xc5)]??null,'configName':_0x3b98ab[_0x111aa8(0xd7)],'channelType':_0x3b98ab['channelType'],'endpointUrl':redactSensitive(_0x3b98ab[_0x111aa8(0xd1)]),'channelConfig':redactSensitive(_0x3b98ab['channelConfig']),'description':_0x3b98ab[_0x111aa8(0xf1)]??null,'connectTimeout':_0x3b98ab[_0x111aa8(0x8c)]??null,'readTimeout':_0x3b98ab[_0x111aa8(0x91)]??null};}export function notificationSelector(_0x4a77d4){return{'appCode':_0x4a77d4['appCode'],'id':_0x4a77d4['id'],'configCode':_0x4a77d4['configCode'],'configName':_0x4a77d4['configName'],'channelType':_0x4a77d4['channelType']};}export function createMutationInput(_0xc13d28,_0x1b4c08){const _0x23659b=a146_0x505f1e;return{'appCode':_0xc13d28,'configName':_0x1b4c08[_0x23659b(0xd7)],'channelType':_0x1b4c08['channelType'],...hasOwn(_0x1b4c08,_0x23659b(0xd1))?{'endpointUrl':_0x1b4c08[_0x23659b(0xd1)]}:{},...hasOwn(_0x1b4c08,_0x23659b(0xdd))?{'channelConfig':serializeChannelConfig(_0x1b4c08[_0x23659b(0xdd)])}:{},...hasOwn(_0x1b4c08,'description')?{'description':_0x1b4c08[_0x23659b(0xf1)]}:{},...hasOwn(_0x1b4c08,'connectTimeout')?{'connectTimeout':_0x1b4c08['connectTimeout']}:{},...hasOwn(_0x1b4c08,_0x23659b(0x91))?{'readTimeout':_0x1b4c08[_0x23659b(0x91)]}:{}};}export function mergeUpdateInput(_0x217d5e,_0x2e71a9){const _0x409284=a146_0x505f1e;return{'id':_0x217d5e['id'],'appCode':_0x217d5e[_0x409284(0xf6)],'configName':_0x2e71a9['configName']??_0x217d5e[_0x409284(0xd7)],'channelType':_0x2e71a9[_0x409284(0x95)]??_0x217d5e['channelType'],'endpointUrl':hasOwn(_0x2e71a9,_0x409284(0xd1))?_0x2e71a9[_0x409284(0xd1)]:_0x217d5e['endpointUrlRaw'],'channelConfig':hasOwn(_0x2e71a9,_0x409284(0xdd))?serializeChannelConfig(_0x2e71a9[_0x409284(0xdd)]):_0x217d5e[_0x409284(0xa7)],'description':hasOwn(_0x2e71a9,'description')?_0x2e71a9[_0x409284(0xf1)]:_0x217d5e[_0x409284(0xf1)],'connectTimeout':hasOwn(_0x2e71a9,_0x409284(0x8c))?_0x2e71a9[_0x409284(0x8c)]:_0x217d5e[_0x409284(0x8c)],'readTimeout':hasOwn(_0x2e71a9,_0x409284(0x91))?_0x2e71a9[_0x409284(0x91)]:_0x217d5e[_0x409284(0x91)]};}export function plannedUpdateProjection(_0x3a4229,_0x21754e){const _0xdb884a=a146_0x505f1e;return projectNotificationConfig({'id':_0x3a4229['id'],'appCode':_0x3a4229[_0xdb884a(0xf6)],'configCode':_0x3a4229[_0xdb884a(0xc5)],'configName':_0x21754e[_0xdb884a(0xd7)]??_0x3a4229[_0xdb884a(0xd7)],'channelType':_0x21754e[_0xdb884a(0x95)]??_0x3a4229[_0xdb884a(0x95)],'endpointUrl':hasOwn(_0x21754e,'endpointUrl')?_0x21754e[_0xdb884a(0xd1)]:_0x3a4229[_0xdb884a(0xf2)],'channelConfig':hasOwn(_0x21754e,_0xdb884a(0xdd))?_0x21754e['channelConfig']:_0x3a4229[_0xdb884a(0xa7)],'description':hasOwn(_0x21754e,_0xdb884a(0xf1))?_0x21754e[_0xdb884a(0xf1)]:_0x3a4229[_0xdb884a(0xf1)],'connectTimeout':hasOwn(_0x21754e,_0xdb884a(0x8c))?_0x21754e[_0xdb884a(0x8c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3a4229[_0xdb884a(0x8c)],'readTimeout':hasOwn(_0x21754e,'readTimeout')?_0x21754e[_0xdb884a(0x91)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3a4229[_0xdb884a(0x91)]});}export function requestedSafeFieldsMatch(_0x15b9a5,_0x71209f,_0x3b9519){const _0x8dff69=a146_0x505f1e,_0x5c25f2=[],_0x1d0bf6=[],_0x422392=[];for(const _0x208117 of[_0x8dff69(0xd7),_0x8dff69(0x95),_0x8dff69(0xf1)]){if(!hasOwn(_0x3b9519,_0x208117))continue;_0x422392[_0x8dff69(0x89)](_0x208117),_0x5c25f2[_0x8dff69(0x89)](_0x71209f[_0x208117]===_0x3b9519[_0x208117]),_0x1d0bf6['push'](_0x15b9a5[_0x208117]!==_0x3b9519[_0x208117]&&_0x71209f[_0x208117]===_0x3b9519[_0x208117]);}for(const _0x5527f4 of[_0x8dff69(0x8c),_0x8dff69(0x91)]){if(!hasOwn(_0x3b9519,_0x5527f4))continue;const _0x4688cb=_0x3b9519[_0x5527f4]??(_0x5527f4===_0x8dff69(0x8c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x422392[_0x8dff69(0x89)](_0x5527f4),_0x5c25f2[_0x8dff69(0x89)](_0x71209f[_0x5527f4]===_0x4688cb),_0x1d0bf6[_0x8dff69(0x89)](_0x15b9a5[_0x5527f4]!==_0x4688cb&&_0x71209f[_0x5527f4]===_0x4688cb);}return hasOwn(_0x3b9519,_0x8dff69(0xd1))&&_0x3b9519[_0x8dff69(0xd1)]===null&&(_0x422392[_0x8dff69(0x89)](_0x8dff69(0xea)),_0x5c25f2[_0x8dff69(0x89)](_0x71209f[_0x8dff69(0xf2)]===null||_0x71209f[_0x8dff69(0xf2)]===''),_0x1d0bf6[_0x8dff69(0x89)](_0x15b9a5[_0x8dff69(0xf2)]!==null&&_0x15b9a5[_0x8dff69(0xf2)]!==''&&(_0x71209f[_0x8dff69(0xf2)]===null||_0x71209f[_0x8dff69(0xf2)]===''))),{'allMatch':_0x5c25f2['every'](Boolean),'provesChange':_0x1d0bf6[_0x8dff69(0xac)](Boolean),'verifiedFields':_0x422392};}export function validateNotificationDeleteReadback(_0x461e46,_0x397331,_0x547e8c){const _0x346b3f=a146_0x505f1e;for(const [_0x55a2ab,_0x1de6aa]of _0x461e46[_0x346b3f(0xaa)]()){if(!Number[_0x346b3f(0xcf)](_0x1de6aa['id'])||_0x1de6aa['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x346b3f(0xa8)+(_0x55a2ab+0x1)+_0x346b3f(0xe7));if(_0x1de6aa[_0x346b3f(0xf6)]!==_0x397331)throw notificationError('notification_config_response_invalid',_0x346b3f(0xa8)+(_0x55a2ab+0x1)+_0x346b3f(0xb0));if(_0x1de6aa[_0x346b3f(0x95)]!==_0x547e8c)throw notificationError(_0x346b3f(0xf0),_0x346b3f(0xa8)+(_0x55a2ab+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0xc64740,_0x1b8644,_0x5e01aa){const _0x12f60c=a146_0x505f1e;return notificationError('notification_config_'+_0xc64740+'_'+(_0x1b8644==='mutation'?_0x12f60c(0xa0):_0x1b8644+_0x12f60c(0xa5)),_0x12f60c(0xc4)+_0xc64740+'\x20'+_0x1b8644+_0x12f60c(0xbe),_0x5e01aa);}export function notificationLookupCommand(_0x31d8d4,_0x57ceed){const _0x532930=a146_0x505f1e;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x31d8d4+'\x20--type\x20'+_0x57ceed+_0x532930(0xad);}function validateNotificationDocument(_0x20d7cf,_0x22c8a0){const _0x350a2d=a146_0x505f1e;for(const _0x580b21 of Object[_0x350a2d(0x98)](_0x20d7cf)){if(FORBIDDEN_IDENTITY_FIELDS[_0x350a2d(0x7e)](_0x580b21))throw notificationError(_0x350a2d(0xf5),'Notification\x20JSON\x20field\x20\x22'+_0x580b21+_0x350a2d(0xe6));if(!ALLOWED_INPUT_FIELDS[_0x350a2d(0x7e)](_0x580b21))throw notificationError(_0x350a2d(0xbb),_0x350a2d(0xf4)+_0x580b21+'\x22.');}if(_0x22c8a0===_0x350a2d(0xc1)&&Object[_0x350a2d(0x98)](_0x20d7cf)[_0x350a2d(0xe1)]===0x0)throw notificationError(_0x350a2d(0xe2),_0x350a2d(0xc8));const _0x3e5212={};if(hasOwn(_0x20d7cf,'configName'))_0x3e5212[_0x350a2d(0xd7)]=validateRequiredString(_0x20d7cf[_0x350a2d(0xd7)],_0x350a2d(0xd7),0x80);else{if(_0x22c8a0===_0x350a2d(0xeb))throw notificationError(_0x350a2d(0xb2),_0x350a2d(0xbd)+_0x350a2d(0xd0));}if(hasOwn(_0x20d7cf,_0x350a2d(0x95))){if(typeof _0x20d7cf['channelType']!==_0x350a2d(0xe4))throw invalidFieldType(_0x350a2d(0x95),_0x350a2d(0x92));const _0x48d301=_0x20d7cf['channelType'][_0x350a2d(0xc9)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x48d301))throw notificationError(_0x350a2d(0xd2),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x350a2d(0xd6)+NOTIFICATION_CHANNEL_TYPES[_0x350a2d(0xdc)](',\x20')+'.');_0x3e5212[_0x350a2d(0x95)]=_0x48d301;}else{if(_0x22c8a0===_0x350a2d(0xeb))throw notificationError(_0x350a2d(0xb2),_0x350a2d(0xbd)+_0x350a2d(0x8d));}for(const [_0x136d6b,_0x320a7a]of[[_0x350a2d(0xd1),0x200],[_0x350a2d(0xf1),0x100]]){if(!hasOwn(_0x20d7cf,_0x136d6b))continue;const _0x219da8=_0x20d7cf[_0x136d6b];if(_0x219da8!==null&&typeof _0x219da8!=='string')throw invalidFieldType(_0x136d6b,_0x350a2d(0xab));if(typeof _0x219da8===_0x350a2d(0xe4)&&_0x219da8[_0x350a2d(0xe1)]>_0x320a7a)throw notificationError(_0x350a2d(0xd2),'Notification\x20JSON\x20field\x20\x22'+_0x136d6b+_0x350a2d(0xee)+_0x320a7a+_0x350a2d(0x83));_0x3e5212[_0x136d6b]=_0x219da8;}if(hasOwn(_0x20d7cf,'channelConfig')){const _0xedf49=_0x20d7cf[_0x350a2d(0xdd)];if(_0xedf49===null&&_0x22c8a0==='create')throw invalidFieldType(_0x350a2d(0xdd),'a\x20JSON\x20object');if(_0xedf49!==null&&!isJsonObject(_0xedf49))throw invalidFieldType('channelConfig',_0x22c8a0===_0x350a2d(0xc1)?_0x350a2d(0x8f):_0x350a2d(0xa9));_0xedf49!==null&&validateChannelConfigFields(_0x3e5212['channelType'],_0xedf49),_0x3e5212[_0x350a2d(0xdd)]=_0xedf49;}for(const _0x470cf0 of[_0x350a2d(0x8c),_0x350a2d(0x91)]){if(!hasOwn(_0x20d7cf,_0x470cf0))continue;const _0x371ebe=_0x20d7cf[_0x470cf0];if(_0x371ebe!==null&&(!Number[_0x350a2d(0xcf)](_0x371ebe)||_0x371ebe<0x0))throw notificationError(_0x350a2d(0xd2),_0x350a2d(0xf7)+_0x470cf0+_0x350a2d(0x80));_0x3e5212[_0x470cf0]=_0x371ebe;}return _0x3e5212;}function validateRequiredString(_0x3b9e77,_0x38446d,_0x140aac){const _0x2df356=a146_0x505f1e;if(typeof _0x3b9e77!==_0x2df356(0xe4))throw invalidFieldType(_0x38446d,_0x2df356(0xec));const _0x3cbe51=_0x3b9e77['trim']();if(!_0x3cbe51)throw notificationError(_0x2df356(0xd2),'Notification\x20JSON\x20field\x20\x22'+_0x38446d+_0x2df356(0x8e));if(_0x3cbe51['length']>_0x140aac)throw notificationError('notification_config_field_invalid',_0x2df356(0xf7)+_0x38446d+_0x2df356(0xee)+_0x140aac+_0x2df356(0x83));return _0x3cbe51;}function validateChannelConfigFields(_0x897d41,_0x286d84){const _0x535b9d=a146_0x505f1e;if(hasOwn(_0x286d84,_0x535b9d(0x8a)))throw forbiddenChannelConfigField(_0x535b9d(0x8a));if(_0x897d41==='EMAIL')for(const _0x172c32 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x286d84,_0x172c32))throw forbiddenChannelConfigField(_0x172c32);}}function forbiddenChannelConfigField(_0xc47e2d){const _0x45b3d0=a146_0x505f1e;return notificationError(_0x45b3d0(0xba),_0x45b3d0(0xd5)+_0xc47e2d+_0x45b3d0(0xb9));}function invalidFieldType(_0x3cb69e,_0x4f13ab){const _0xff6e94=a146_0x505f1e;return notificationError(_0xff6e94(0xd2),_0xff6e94(0xf7)+_0x3cb69e+_0xff6e94(0xc2)+_0x4f13ab+'.');}function serializeChannelConfig(_0x40a4ed){return _0x40a4ed===null||_0x40a4ed===undefined?null:JSON['stringify'](_0x40a4ed);}function redactSensitive(_0x5cee5c){const _0x1c0528=a146_0x505f1e;return _0x5cee5c===null||_0x5cee5c===undefined||_0x5cee5c===''?null:_0x1c0528(0xcd);}function requireResponseString(_0x48bc68,_0x4ed8f0,_0x29ae15){const _0x540980=a146_0x505f1e;if(typeof _0x48bc68!=='string'||_0x48bc68[_0x540980(0xc9)]()==='')throw CliErrors[_0x540980(0x87)](_0x540980(0xbc),_0x540980(0xb6)+(_0x29ae15+0x1)+_0x540980(0xb1)+_0x4ed8f0+'\x22.');return _0x48bc68[_0x540980(0xc9)]();}function requireExactString(_0x11b508,_0xd63570,_0x2324b7){const _0xd1122a=a146_0x505f1e;if(typeof _0x11b508!==_0xd1122a(0xe4)||_0x11b508[_0xd1122a(0xc9)]()==='')throw notificationError(_0xd1122a(0xf0),_0xd1122a(0xc4)+_0x2324b7+_0xd1122a(0xb1)+_0xd63570+'\x22.');return _0x11b508[_0xd1122a(0xc9)]();}function responseNullableString(_0x569108,_0x1b6a79,_0x5ed03f){const _0x42b29b=a146_0x505f1e;if(_0x569108===undefined||_0x569108===null)return null;if(typeof _0x569108!==_0x42b29b(0xe4))throw notificationError(_0x42b29b(0xf0),_0x42b29b(0xc4)+_0x5ed03f+'\x20has\x20invalid\x20field\x20\x22'+_0x1b6a79+'\x22.');return _0x569108;}function responseNullableTimeout(_0x150f2d,_0x29a515,_0x4c903c){const _0x45adc7=a146_0x505f1e;if(_0x150f2d===undefined||_0x150f2d===null)return null;if(!Number[_0x45adc7(0xcf)](_0x150f2d)||_0x150f2d<0x0)throw notificationError(_0x45adc7(0xf0),'Notification\x20config\x20'+_0x4c903c+_0x45adc7(0x93)+_0x29a515+'\x22.');return _0x150f2d;}function normalizeNullableString(_0x4b65dc){const _0x271e02=a146_0x505f1e;return typeof _0x4b65dc===_0x271e02(0xe4)?_0x4b65dc:null;}function isJsonObject(_0x317647){const _0x5079f2=a146_0x505f1e;return _0x317647!==null&&typeof _0x317647===_0x5079f2(0xaf)&&!Array[_0x5079f2(0xce)](_0x317647);}function hasOwn(_0x2f389d,_0x2f3f7c){const _0x2b72db=a146_0x505f1e;return Object[_0x2b72db(0x9e)]['hasOwnProperty'][_0x2b72db(0xbf)](_0x2f389d,_0x2f3f7c);}async function readStdin(){const _0x2f7cc0=a146_0x505f1e;let _0x36d914='';process[_0x2f7cc0(0xc6)]['setEncoding']('utf8');for await(const _0x2695b3 of process['stdin'])_0x36d914+=_0x2695b3;return _0x36d914;}
|
|
1
|
+
const a146_0xff8015=a146_0x4049;(function(_0x35bb52,_0xebc772){const _0x248931=a146_0x4049,_0x93dee4=_0x35bb52();while(!![]){try{const _0x1bc83d=-parseInt(_0x248931(0x173))/0x1*(-parseInt(_0x248931(0x152))/0x2)+-parseInt(_0x248931(0x185))/0x3*(parseInt(_0x248931(0x17a))/0x4)+-parseInt(_0x248931(0x17b))/0x5*(parseInt(_0x248931(0x166))/0x6)+parseInt(_0x248931(0x183))/0x7*(parseInt(_0x248931(0x174))/0x8)+-parseInt(_0x248931(0x194))/0x9*(parseInt(_0x248931(0x17c))/0xa)+-parseInt(_0x248931(0x15f))/0xb*(parseInt(_0x248931(0x134))/0xc)+parseInt(_0x248931(0x14b))/0xd*(parseInt(_0x248931(0x130))/0xe);if(_0x1bc83d===_0xebc772)break;else _0x93dee4['push'](_0x93dee4['shift']());}catch(_0x21e7a9){_0x93dee4['push'](_0x93dee4['shift']());}}}(a146_0x36c1,0x3e0fa));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=[a146_0xff8015(0x188),'FEISHU','DINGTALK',a146_0xff8015(0x150),a146_0xff8015(0x167)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a146_0xff8015(0x165),'channelType',a146_0xff8015(0x148),a146_0xff8015(0x161),a146_0xff8015(0x184),a146_0xff8015(0x15c),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a146_0xff8015(0x12a),a146_0xff8015(0x182),a146_0xff8015(0x15a)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a146_0xff8015(0x19e),'ccList',a146_0xff8015(0x18d),'replyTo','subjectPrefix',a146_0xff8015(0x16a),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a146_0xff8015(0x18f),'type':a146_0xff8015(0x13f),'required':![],'description':a146_0xff8015(0x151)},{'name':'stdin','type':a146_0xff8015(0x125),'required':![],'default':![],'description':a146_0xff8015(0x120)},{'name':'from-env','type':a146_0xff8015(0x13f),'required':![],'description':a146_0xff8015(0x129)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a146_0xff8015(0x195),'required':!![],'description':a146_0xff8015(0x18a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3b37b9,_0xa441fe,_0x23c4c8){return new CliError(_0x3b37b9,0x1,_0xa441fe,_0x23c4c8);}export function readNotificationId(_0x3680ad){const _0x24c0c0=a146_0xff8015,_0x4c452c=_0x3680ad[_0x24c0c0(0x180)]('id');if(!Number['isSafeInteger'](_0x4c452c)||_0x4c452c<=0x0)throw notificationError(_0x24c0c0(0x131),_0x24c0c0(0x11e));return _0x4c452c;}export function requireNotificationExplicitYes(_0x1928e5){const _0x5c6492=a146_0xff8015;if(_0x1928e5['bool'](_0x5c6492(0x11f))||_0x1928e5[_0x5c6492(0x191)](_0x5c6492(0x17d)))return;throw notificationError(_0x5c6492(0x177),'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(_0x37c25d,_0x513997=a146_0xff8015(0x16f),_0x251c6f=a146_0xff8015(0x188)){const _0x22355b=a146_0xff8015,_0x558fa7=_0x37c25d['str'](_0x513997)['trim']()||_0x251c6f;if(!NOTIFICATION_CHANNEL_TYPES[_0x22355b(0x171)](_0x558fa7))throw CliErrors[_0x22355b(0x189)](_0x22355b(0x132)+_0x513997+':\x20'+_0x558fa7,_0x22355b(0x179)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x558fa7;}export function assertSingleNotificationSource(_0x2fd9ee){const _0x4cf4e1=a146_0xff8015,_0x2b1de1=[],_0x4ceac2=_0x2fd9ee[_0x4cf4e1(0x157)](_0x4cf4e1(0x18f))[_0x4cf4e1(0x123)]();if(_0x4ceac2)_0x2b1de1[_0x4cf4e1(0x156)]({'kind':_0x4cf4e1(0x18f),'path':_0x4ceac2});if(_0x2fd9ee[_0x4cf4e1(0x191)](_0x4cf4e1(0x122)))_0x2b1de1['push']({'kind':'stdin'});const _0x4af7c0=_0x2fd9ee[_0x4cf4e1(0x157)](_0x4cf4e1(0x14c))[_0x4cf4e1(0x123)]();if(_0x4af7c0)_0x2b1de1[_0x4cf4e1(0x156)]({'kind':'env','name':_0x4af7c0});if(_0x2b1de1[_0x4cf4e1(0x199)]===0x0)throw CliErrors['validation'](_0x4cf4e1(0x121),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x2b1de1[_0x4cf4e1(0x199)]>0x1)throw CliErrors[_0x4cf4e1(0x189)]('Notification\x20JSON\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x2b1de1[0x0];}export async function readNotificationDocument(_0x49f958,_0x2e8f95){const _0x1b489b=a146_0xff8015,_0x33697d=assertSingleNotificationSource(_0x49f958),_0x959fb2=_0x33697d['kind']===_0x1b489b(0x18f)?_0x1b489b(0x140)+_0x33697d[_0x1b489b(0x17f)]:_0x33697d[_0x1b489b(0x136)]===_0x1b489b(0x14a)?_0x1b489b(0x187)+_0x33697d[_0x1b489b(0x13a)]:_0x1b489b(0x122);let _0x2fb1b1;try{if(_0x33697d['kind']==='file')_0x2fb1b1=await readFile(_0x33697d[_0x1b489b(0x17f)],_0x1b489b(0x137));else{if(_0x33697d['kind']==='env'){if(!(_0x33697d[_0x1b489b(0x13a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x1b489b(0x149)+_0x33697d[_0x1b489b(0x13a)]);_0x2fb1b1=process.env[_0x33697d.name]??'';}else _0x2fb1b1=await readStdin();}}catch(_0x515fd0){if(_0x515fd0 instanceof CliError)throw _0x515fd0;throw notificationError(_0x1b489b(0x146),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x959fb2+'.');}let _0x14ae77;try{_0x14ae77=JSON['parse'](_0x2fb1b1);}catch{throw notificationError(_0x1b489b(0x176),_0x1b489b(0x126)+_0x959fb2+_0x1b489b(0x162),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x14ae77))throw notificationError(_0x1b489b(0x176),_0x1b489b(0x126)+_0x959fb2+_0x1b489b(0x16b));return validateNotificationDocument(_0x14ae77,_0x2e8f95);}export function projectNotificationListConfig(_0xdc5262,_0x2bee26){const _0x12ff3b=a146_0xff8015;return{'id':typeof _0xdc5262['id']===_0x12ff3b(0x195)?_0xdc5262['id']:null,'configCode':requireResponseString(_0xdc5262[_0x12ff3b(0x182)],_0x12ff3b(0x182),_0x2bee26),'configName':requireResponseString(_0xdc5262[_0x12ff3b(0x165)],_0x12ff3b(0x165),_0x2bee26),'channelType':requireResponseString(_0xdc5262[_0x12ff3b(0x13b)],_0x12ff3b(0x13b),_0x2bee26),'description':normalizeNullableString(_0xdc5262['description']),'createTime':normalizeNullableString(_0xdc5262[_0x12ff3b(0x193)]),'updateTime':normalizeNullableString(_0xdc5262['updateTime'])};}export function normalizeExactNotificationConfig(_0x4ebe85,_0x3ade1c,_0x147283){const _0x1daebe=a146_0xff8015;if(!Number['isSafeInteger'](_0x4ebe85['id'])||_0x4ebe85['id']!==_0x3ade1c)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x3ade1c+'.');if(_0x4ebe85[_0x1daebe(0x12a)]!==_0x147283)throw notificationError(_0x1daebe(0x154),_0x1daebe(0x19b)+_0x3ade1c+_0x1daebe(0x128));const _0xf213a9=requireExactString(_0x4ebe85[_0x1daebe(0x165)],_0x1daebe(0x165),_0x3ade1c),_0x5a4db3=requireExactString(_0x4ebe85[_0x1daebe(0x182)],_0x1daebe(0x182),_0x3ade1c),_0x151840=requireExactString(_0x4ebe85[_0x1daebe(0x13b)],_0x1daebe(0x13b),_0x3ade1c);if(!NOTIFICATION_CHANNEL_TYPES[_0x1daebe(0x171)](_0x151840))throw notificationError(_0x1daebe(0x154),_0x1daebe(0x19b)+_0x3ade1c+_0x1daebe(0x141));const _0x4e6fe5=responseNullableString(_0x4ebe85['endpointUrl'],'endpointUrl',_0x3ade1c),_0x3179b6=responseNullableString(_0x4ebe85[_0x1daebe(0x161)],'channelConfig',_0x3ade1c),_0x1afc95=responseNullableString(_0x4ebe85[_0x1daebe(0x184)],_0x1daebe(0x184),_0x3ade1c),_0x1d5bed=responseNullableTimeout(_0x4ebe85[_0x1daebe(0x15c)],'connectTimeout',_0x3ade1c),_0x50870c=responseNullableTimeout(_0x4ebe85['readTimeout'],'readTimeout',_0x3ade1c);return{'id':_0x3ade1c,'appCode':_0x147283,'configCode':_0x5a4db3,'configName':_0xf213a9,'channelType':_0x151840,'endpointUrl':redactSensitive(_0x4e6fe5),'channelConfig':redactSensitive(_0x3179b6),'description':_0x1afc95,'connectTimeout':_0x1d5bed,'readTimeout':_0x50870c,'endpointUrlRaw':_0x4e6fe5,'channelConfigRaw':_0x3179b6};}export async function requireExactNotificationConfig(_0x18233b,_0x4d8a82,_0x465775){const _0x313b55=a146_0xff8015;let _0x51ed58;try{_0x51ed58=await getNotificationChannelConfig(_0x4d8a82,_0x18233b);}catch{throw safeApiFailure(_0x465775,'preflight','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x18233b+_0x313b55(0x186));}return normalizeExactNotificationConfig(_0x51ed58,_0x4d8a82,_0x18233b);}export function projectNotificationConfig(_0x374e03){const _0x3bcb08=a146_0xff8015;return{'id':_0x374e03['id']??null,'appCode':_0x374e03[_0x3bcb08(0x12a)],'configCode':_0x374e03['configCode']??null,'configName':_0x374e03[_0x3bcb08(0x165)],'channelType':_0x374e03[_0x3bcb08(0x13b)],'endpointUrl':redactSensitive(_0x374e03[_0x3bcb08(0x148)]),'channelConfig':redactSensitive(_0x374e03[_0x3bcb08(0x161)]),'description':_0x374e03[_0x3bcb08(0x184)]??null,'connectTimeout':_0x374e03[_0x3bcb08(0x15c)]??null,'readTimeout':_0x374e03[_0x3bcb08(0x16c)]??null};}export function notificationSelector(_0x37e08f){const _0x3a9a8a=a146_0xff8015;return{'appCode':_0x37e08f[_0x3a9a8a(0x12a)],'id':_0x37e08f['id'],'configCode':_0x37e08f['configCode'],'configName':_0x37e08f[_0x3a9a8a(0x165)],'channelType':_0x37e08f[_0x3a9a8a(0x13b)]};}export function createMutationInput(_0x74b72a,_0x3c40e9){const _0x270204=a146_0xff8015;return{'appCode':_0x74b72a,'configName':_0x3c40e9[_0x270204(0x165)],'channelType':_0x3c40e9['channelType'],...hasOwn(_0x3c40e9,_0x270204(0x148))?{'endpointUrl':_0x3c40e9[_0x270204(0x148)]}:{},...hasOwn(_0x3c40e9,_0x270204(0x161))?{'channelConfig':serializeChannelConfig(_0x3c40e9[_0x270204(0x161)])}:{},...hasOwn(_0x3c40e9,'description')?{'description':_0x3c40e9[_0x270204(0x184)]}:{},...hasOwn(_0x3c40e9,_0x270204(0x15c))?{'connectTimeout':_0x3c40e9['connectTimeout']}:{},...hasOwn(_0x3c40e9,_0x270204(0x16c))?{'readTimeout':_0x3c40e9[_0x270204(0x16c)]}:{}};}export function mergeUpdateInput(_0x59eddd,_0x58648a){const _0x116365=a146_0xff8015;return{'id':_0x59eddd['id'],'appCode':_0x59eddd[_0x116365(0x12a)],'configName':_0x58648a[_0x116365(0x165)]??_0x59eddd['configName'],'channelType':_0x58648a['channelType']??_0x59eddd[_0x116365(0x13b)],'endpointUrl':hasOwn(_0x58648a,_0x116365(0x148))?_0x58648a['endpointUrl']:_0x59eddd[_0x116365(0x196)],'channelConfig':hasOwn(_0x58648a,_0x116365(0x161))?serializeChannelConfig(_0x58648a['channelConfig']):_0x59eddd[_0x116365(0x175)],'description':hasOwn(_0x58648a,'description')?_0x58648a[_0x116365(0x184)]:_0x59eddd[_0x116365(0x184)],'connectTimeout':hasOwn(_0x58648a,_0x116365(0x15c))?_0x58648a[_0x116365(0x15c)]:_0x59eddd[_0x116365(0x15c)],'readTimeout':hasOwn(_0x58648a,_0x116365(0x16c))?_0x58648a[_0x116365(0x16c)]:_0x59eddd[_0x116365(0x16c)]};}export function plannedUpdateProjection(_0x3250f2,_0x29a47d){const _0x595f67=a146_0xff8015;return projectNotificationConfig({'id':_0x3250f2['id'],'appCode':_0x3250f2[_0x595f67(0x12a)],'configCode':_0x3250f2[_0x595f67(0x182)],'configName':_0x29a47d[_0x595f67(0x165)]??_0x3250f2['configName'],'channelType':_0x29a47d[_0x595f67(0x13b)]??_0x3250f2[_0x595f67(0x13b)],'endpointUrl':hasOwn(_0x29a47d,_0x595f67(0x148))?_0x29a47d[_0x595f67(0x148)]:_0x3250f2[_0x595f67(0x196)],'channelConfig':hasOwn(_0x29a47d,_0x595f67(0x161))?_0x29a47d[_0x595f67(0x161)]:_0x3250f2[_0x595f67(0x175)],'description':hasOwn(_0x29a47d,'description')?_0x29a47d[_0x595f67(0x184)]:_0x3250f2['description'],'connectTimeout':hasOwn(_0x29a47d,_0x595f67(0x15c))?_0x29a47d[_0x595f67(0x15c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3250f2[_0x595f67(0x15c)],'readTimeout':hasOwn(_0x29a47d,_0x595f67(0x16c))?_0x29a47d[_0x595f67(0x16c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3250f2['readTimeout']});}export function requestedSafeFieldsMatch(_0x80f8ef,_0x143af1,_0x2da8e9){const _0x219c7a=a146_0xff8015,_0x1208f2=[],_0x32fc40=[],_0x207bb5=[];for(const _0x1c48c2 of[_0x219c7a(0x165),_0x219c7a(0x13b),_0x219c7a(0x184)]){if(!hasOwn(_0x2da8e9,_0x1c48c2))continue;_0x207bb5[_0x219c7a(0x156)](_0x1c48c2),_0x1208f2[_0x219c7a(0x156)](_0x143af1[_0x1c48c2]===_0x2da8e9[_0x1c48c2]),_0x32fc40[_0x219c7a(0x156)](_0x80f8ef[_0x1c48c2]!==_0x2da8e9[_0x1c48c2]&&_0x143af1[_0x1c48c2]===_0x2da8e9[_0x1c48c2]);}for(const _0x2d0e25 of[_0x219c7a(0x15c),_0x219c7a(0x16c)]){if(!hasOwn(_0x2da8e9,_0x2d0e25))continue;const _0x2a7fd6=_0x2da8e9[_0x2d0e25]??(_0x2d0e25===_0x219c7a(0x15c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x207bb5[_0x219c7a(0x156)](_0x2d0e25),_0x1208f2['push'](_0x143af1[_0x2d0e25]===_0x2a7fd6),_0x32fc40['push'](_0x80f8ef[_0x2d0e25]!==_0x2a7fd6&&_0x143af1[_0x2d0e25]===_0x2a7fd6);}return hasOwn(_0x2da8e9,_0x219c7a(0x148))&&_0x2da8e9[_0x219c7a(0x148)]===null&&(_0x207bb5[_0x219c7a(0x156)](_0x219c7a(0x11d)),_0x1208f2[_0x219c7a(0x156)](_0x143af1[_0x219c7a(0x196)]===null||_0x143af1['endpointUrlRaw']===''),_0x32fc40['push'](_0x80f8ef[_0x219c7a(0x196)]!==null&&_0x80f8ef[_0x219c7a(0x196)]!==''&&(_0x143af1[_0x219c7a(0x196)]===null||_0x143af1[_0x219c7a(0x196)]===''))),{'allMatch':_0x1208f2[_0x219c7a(0x14f)](Boolean),'provesChange':_0x32fc40['some'](Boolean),'verifiedFields':_0x207bb5};}function a146_0x4049(_0x41ff87,_0x446c97){_0x41ff87=_0x41ff87-0x11c;const _0x36c149=a146_0x36c1();let _0x404924=_0x36c149[_0x41ff87];return _0x404924;}export function validateNotificationDeleteReadback(_0x176c00,_0x33c1a2,_0x1dec1e){const _0x2c30aa=a146_0xff8015;for(const [_0x19de13,_0x593e1f]of _0x176c00[_0x2c30aa(0x19a)]()){if(!Number[_0x2c30aa(0x14d)](_0x593e1f['id'])||_0x593e1f['id']<=0x0)throw notificationError(_0x2c30aa(0x154),_0x2c30aa(0x135)+(_0x19de13+0x1)+_0x2c30aa(0x1a0));if(_0x593e1f[_0x2c30aa(0x12a)]!==_0x33c1a2)throw notificationError(_0x2c30aa(0x154),_0x2c30aa(0x135)+(_0x19de13+0x1)+_0x2c30aa(0x164));if(_0x593e1f[_0x2c30aa(0x13b)]!==_0x1dec1e)throw notificationError('notification_config_response_invalid',_0x2c30aa(0x135)+(_0x19de13+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x535810,_0x16bc25,_0x4e66c8){const _0x10c12c=a146_0xff8015;return notificationError(_0x10c12c(0x12d)+_0x535810+'_'+(_0x16bc25===_0x10c12c(0x145)?_0x10c12c(0x138):_0x16bc25+_0x10c12c(0x139)),_0x10c12c(0x19b)+_0x535810+'\x20'+_0x16bc25+_0x10c12c(0x15d),_0x4e66c8);}export function notificationLookupCommand(_0x4b6b9a,_0x2f1499){const _0x1632e1=a146_0xff8015;return _0x1632e1(0x127)+_0x4b6b9a+_0x1632e1(0x178)+_0x2f1499+_0x1632e1(0x19d);}function validateNotificationDocument(_0x437acd,_0x569a02){const _0x15857d=a146_0xff8015;for(const _0x35e912 of Object[_0x15857d(0x11c)](_0x437acd)){if(FORBIDDEN_IDENTITY_FIELDS[_0x15857d(0x168)](_0x35e912))throw notificationError(_0x15857d(0x15b),'Notification\x20JSON\x20field\x20\x22'+_0x35e912+_0x15857d(0x147));if(!ALLOWED_INPUT_FIELDS[_0x15857d(0x168)](_0x35e912))throw notificationError(_0x15857d(0x192),_0x15857d(0x19f)+_0x35e912+'\x22.');}if(_0x569a02===_0x15857d(0x190)&&Object['keys'](_0x437acd)[_0x15857d(0x199)]===0x0)throw notificationError('notification_config_update_empty',_0x15857d(0x12e));const _0x53e9cc={};if(hasOwn(_0x437acd,_0x15857d(0x165)))_0x53e9cc[_0x15857d(0x165)]=validateRequiredString(_0x437acd[_0x15857d(0x165)],_0x15857d(0x165),0x80);else{if(_0x569a02==='create')throw notificationError(_0x15857d(0x14e),_0x15857d(0x163)+_0x15857d(0x133));}if(hasOwn(_0x437acd,'channelType')){if(typeof _0x437acd['channelType']!==_0x15857d(0x13f))throw invalidFieldType(_0x15857d(0x13b),_0x15857d(0x13c));const _0x3c00f3=_0x437acd[_0x15857d(0x13b)][_0x15857d(0x123)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x15857d(0x171)](_0x3c00f3))throw notificationError(_0x15857d(0x18c),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x15857d(0x169)](',\x20')+'.');_0x53e9cc[_0x15857d(0x13b)]=_0x3c00f3;}else{if(_0x569a02===_0x15857d(0x170))throw notificationError(_0x15857d(0x14e),_0x15857d(0x163)+_0x15857d(0x13e));}for(const [_0x22a075,_0x6e1cca]of[['endpointUrl',0x200],[_0x15857d(0x184),0x100]]){if(!hasOwn(_0x437acd,_0x22a075))continue;const _0x19e029=_0x437acd[_0x22a075];if(_0x19e029!==null&&typeof _0x19e029!==_0x15857d(0x13f))throw invalidFieldType(_0x22a075,_0x15857d(0x142));if(typeof _0x19e029==='string'&&_0x19e029[_0x15857d(0x199)]>_0x6e1cca)throw notificationError(_0x15857d(0x18c),_0x15857d(0x12c)+_0x22a075+_0x15857d(0x124)+_0x6e1cca+_0x15857d(0x172));_0x53e9cc[_0x22a075]=_0x19e029;}if(hasOwn(_0x437acd,'channelConfig')){const _0x53fe48=_0x437acd[_0x15857d(0x161)];if(_0x53fe48===null&&_0x569a02===_0x15857d(0x170))throw invalidFieldType(_0x15857d(0x161),'a\x20JSON\x20object');if(_0x53fe48!==null&&!isJsonObject(_0x53fe48))throw invalidFieldType(_0x15857d(0x161),_0x569a02===_0x15857d(0x190)?_0x15857d(0x17e):_0x15857d(0x13d));_0x53fe48!==null&&validateChannelConfigFields(_0x53e9cc[_0x15857d(0x13b)],_0x53fe48),_0x53e9cc[_0x15857d(0x161)]=_0x53fe48;}for(const _0x264000 of[_0x15857d(0x15c),'readTimeout']){if(!hasOwn(_0x437acd,_0x264000))continue;const _0x1f7d88=_0x437acd[_0x264000];if(_0x1f7d88!==null&&(!Number[_0x15857d(0x14d)](_0x1f7d88)||_0x1f7d88<0x0))throw notificationError('notification_config_field_invalid',_0x15857d(0x12c)+_0x264000+_0x15857d(0x153));_0x53e9cc[_0x264000]=_0x1f7d88;}return _0x53e9cc;}function validateRequiredString(_0x3268bd,_0x2985de,_0x25d941){const _0x547add=a146_0xff8015;if(typeof _0x3268bd!==_0x547add(0x13f))throw invalidFieldType(_0x2985de,_0x547add(0x19c));const _0xf64dda=_0x3268bd[_0x547add(0x123)]();if(!_0xf64dda)throw notificationError(_0x547add(0x18c),'Notification\x20JSON\x20field\x20\x22'+_0x2985de+_0x547add(0x197));if(_0xf64dda['length']>_0x25d941)throw notificationError('notification_config_field_invalid',_0x547add(0x12c)+_0x2985de+_0x547add(0x124)+_0x25d941+_0x547add(0x172));return _0xf64dda;}function a146_0x36c1(){const _0x4b0742=['\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','notification_config_response_invalid','hasOwnProperty','push','str','stringify','messageTemplate','channelCode','notification_config_field_forbidden','connectTimeout','\x20failed.','apiError','2687729BdFtmx','\x20has\x20invalid\x20field\x20\x22','channelConfig','\x20is\x20invalid.','Create\x20JSON\x20requires\x20field\x20','\x20has\x20an\x20invalid\x20appCode.','configName','6IcpTGh','WEBHOOK','has','join','fromName','\x20must\x20be\x20an\x20object.','readTimeout','object','notification_config_channel_field_forbidden','type','create','includes','\x20characters.','2272ipZnzZ','1294152Fjprsd','channelConfigRaw','notification_config_json_invalid','notification_config_confirmation_required','\x20--type\x20','Allowed\x20values:\x20','1938688eroDFj','2200235hGtYiT','129830XgFuyt','yes','a\x20JSON\x20object\x20or\x20null','path','num','setEncoding','configCode','14JVsbgT','description','3lspwQa','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','environment\x20variable\x20','EMAIL','validation','Application-level\x20notification\x20config\x20ID','call','notification_config_field_invalid','bccList','\x20is\x20missing\x20required\x20field\x20\x22','file','update','bool','notification_config_field_unknown','createTime','153wWbYeK','number','endpointUrlRaw','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Item\x20','length','entries','Notification\x20config\x20','a\x20non-empty\x20string','\x20--format\x20compress','recipients','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20id.','keys','endpointUrl:null','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','dry-run','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Missing\x20notification\x20JSON\x20source.','stdin','trim','\x22\x20cannot\x20exceed\x20','boolean','Notification\x20JSON\x20from\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','appCode','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22','notification_config_','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x22\x20must\x20be\x20','322dIUxOB','notification_config_id_invalid','Invalid\x20--','\x22configName\x22.','12kxpnOq','Notification\x20config\x20list\x20item\x20','kind','utf8','failed','_unavailable','name','channelType','a\x20supported\x20string','a\x20JSON\x20object','\x22channelType\x22.','string','file\x20','\x20has\x20an\x20unsupported\x20channelType.','a\x20string\x20or\x20null','\x22\x20is\x20forbidden.','<redacted>','mutation','notification_config_source_unavailable','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','endpointUrl','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','env','563979Fbqmvj','from-env','isSafeInteger','notification_config_field_required','every','WECOM','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','284gPpKZb'];a146_0x36c1=function(){return _0x4b0742;};return a146_0x36c1();}function validateChannelConfigFields(_0x59ab90,_0x566c51){const _0x4a62e1=a146_0xff8015;if(hasOwn(_0x566c51,_0x4a62e1(0x159)))throw forbiddenChannelConfigField('messageTemplate');if(_0x59ab90===_0x4a62e1(0x188))for(const _0x386b3f of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x566c51,_0x386b3f))throw forbiddenChannelConfigField(_0x386b3f);}}function forbiddenChannelConfigField(_0x4607ba){const _0x28ae20=a146_0xff8015;return notificationError(_0x28ae20(0x16e),_0x28ae20(0x12b)+_0x4607ba+_0x28ae20(0x143));}function invalidFieldType(_0x49d718,_0x31acc9){const _0xae7fae=a146_0xff8015;return notificationError(_0xae7fae(0x18c),'Notification\x20JSON\x20field\x20\x22'+_0x49d718+_0xae7fae(0x12f)+_0x31acc9+'.');}function serializeChannelConfig(_0x36a005){const _0x1bb80f=a146_0xff8015;return _0x36a005===null||_0x36a005===undefined?null:JSON[_0x1bb80f(0x158)](_0x36a005);}function redactSensitive(_0x1fc64c){const _0x325839=a146_0xff8015;return _0x1fc64c===null||_0x1fc64c===undefined||_0x1fc64c===''?null:_0x325839(0x144);}function requireResponseString(_0x2df60b,_0x4a8005,_0x798535){const _0x5d9755=a146_0xff8015;if(typeof _0x2df60b!=='string'||_0x2df60b[_0x5d9755(0x123)]()==='')throw CliErrors[_0x5d9755(0x15e)]('Invalid\x20notification\x20config\x20response.',_0x5d9755(0x198)+(_0x798535+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4a8005+'\x22.');return _0x2df60b[_0x5d9755(0x123)]();}function requireExactString(_0x35e7fb,_0x1f86f6,_0x271420){const _0x23eb7a=a146_0xff8015;if(typeof _0x35e7fb!==_0x23eb7a(0x13f)||_0x35e7fb['trim']()==='')throw notificationError(_0x23eb7a(0x154),'Notification\x20config\x20'+_0x271420+_0x23eb7a(0x18e)+_0x1f86f6+'\x22.');return _0x35e7fb[_0x23eb7a(0x123)]();}function responseNullableString(_0x4c1f6b,_0x3034b1,_0x38de6a){const _0x1667a6=a146_0xff8015;if(_0x4c1f6b===undefined||_0x4c1f6b===null)return null;if(typeof _0x4c1f6b!==_0x1667a6(0x13f))throw notificationError(_0x1667a6(0x154),_0x1667a6(0x19b)+_0x38de6a+_0x1667a6(0x160)+_0x3034b1+'\x22.');return _0x4c1f6b;}function responseNullableTimeout(_0x3d8900,_0x1b7741,_0x309596){const _0x132dbf=a146_0xff8015;if(_0x3d8900===undefined||_0x3d8900===null)return null;if(!Number[_0x132dbf(0x14d)](_0x3d8900)||_0x3d8900<0x0)throw notificationError(_0x132dbf(0x154),'Notification\x20config\x20'+_0x309596+_0x132dbf(0x160)+_0x1b7741+'\x22.');return _0x3d8900;}function normalizeNullableString(_0x97ab0){const _0x386e20=a146_0xff8015;return typeof _0x97ab0===_0x386e20(0x13f)?_0x97ab0:null;}function isJsonObject(_0x14d53d){const _0x2fe518=a146_0xff8015;return _0x14d53d!==null&&typeof _0x14d53d===_0x2fe518(0x16d)&&!Array['isArray'](_0x14d53d);}function hasOwn(_0x2b39f8,_0x3955f1){const _0x5cd38d=a146_0xff8015;return Object['prototype'][_0x5cd38d(0x155)][_0x5cd38d(0x18b)](_0x2b39f8,_0x3955f1);}async function readStdin(){const _0x28daf5=a146_0xff8015;let _0x7b8d2c='';process[_0x28daf5(0x122)][_0x28daf5(0x181)]('utf8');for await(const _0x3cf4e2 of process[_0x28daf5(0x122)])_0x7b8d2c+=_0x3cf4e2;return _0x7b8d2c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x4886ce=a147_0xfc4a;function a147_0xfc4a(_0x3394c9,_0x140d4e){_0x3394c9=_0x3394c9-0x86;const _0x5d66f9=a147_0x5d66();let _0xfc4aee=_0x5d66f9[_0x3394c9];return _0xfc4aee;}(function(_0x1e676b,_0x46bf10){const _0x3e252b=a147_0xfc4a,_0x222ccf=_0x1e676b();while(!![]){try{const _0xb5a2be=parseInt(_0x3e252b(0xa3))/0x1*(parseInt(_0x3e252b(0xbd))/0x2)+-parseInt(_0x3e252b(0x8d))/0x3*(parseInt(_0x3e252b(0x8e))/0x4)+parseInt(_0x3e252b(0x95))/0x5*(-parseInt(_0x3e252b(0x86))/0x6)+parseInt(_0x3e252b(0xb5))/0x7+parseInt(_0x3e252b(0xa2))/0x8+-parseInt(_0x3e252b(0xb8))/0x9+parseInt(_0x3e252b(0xb6))/0xa;if(_0xb5a2be===_0x46bf10)break;else _0x222ccf['push'](_0x222ccf['shift']());}catch(_0x22db16){_0x222ccf['push'](_0x222ccf['shift']());}}}(a147_0x5d66,0x5618e));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=['invoice',a147_0x4886ce(0xbb),a147_0x4886ce(0xae),a147_0x4886ce(0xa9)],SCENE_TO_LEGACY_TYPE={'invoice':a147_0x4886ce(0x9e),'general':'General','form':a147_0x4886ce(0xb1),'idCard':'IdCard'},SCENE_FLAG={'name':a147_0x4886ce(0x8c),'type':a147_0x4886ce(0xbc),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a147_0x4886ce(0xa4)},IMAGE_FILE_FLAG={'name':a147_0x4886ce(0xad),'type':a147_0x4886ce(0xbc),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a147_0x4886ce(0x98),'type':a147_0x4886ce(0xbc),'description':a147_0x4886ce(0x88)};function normalizeScene(_0x2f5d3){const _0xe482c3=a147_0x4886ce,_0x5dbc05=_0x2f5d3[_0xe482c3(0xb0)]()[_0xe482c3(0x8a)]();if(_0x5dbc05===_0xe482c3(0x8f))return _0xe482c3(0xa9);if(_0x5dbc05===_0xe482c3(0x89)||_0x5dbc05===_0xe482c3(0xbb)||_0x5dbc05===_0xe482c3(0xae))return _0x5dbc05;throw CliErrors['validation'](_0xe482c3(0x91)+_0x2f5d3+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0xe482c3(0x9d)](',\x20'));}function selectedInputs(_0x548cab){const _0x4c6152=a147_0x4886ce,_0x319856=_0x548cab[_0x4c6152(0x8b)]('image-file')['trim'](),_0x5ae06a=_0x548cab[_0x4c6152(0x8b)](_0x4c6152(0x98))[_0x4c6152(0xb0)]();return{'imageFile':_0x319856,'imageUrl':_0x5ae06a,'count':[_0x319856,_0x5ae06a][_0x4c6152(0xab)](Boolean)[_0x4c6152(0x9f)]};}function a147_0x5d66(){const _0x2f2363=['45gtEfRn','88052FmOYdc','idcard','\x20OCR','Unsupported\x20OCR\x20scene:\x20','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','File\x20upload\x20response\x20missing\x20filePath.','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','215uTWhmd','GET','fileName','image-url','fileUrl','/smartapi/ocr/recognize-text?','/smartapi/common/uploadFile','toString','join','Invoice','length','imageFile','imageUrl','1791944JcYZBh','240575UnBefE','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','filePath','appCode','path','idCard','validation','filter','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','image-file','form','\x20OCR\x20from\x20URL','trim','Table','apiError','recognize','POST','2389107kXQQFi','5102230dESrQz','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','4204980yVbzIJ','/smartapi/ocr/recognize-text','Preview:\x20recognize\x20','general','string','2MsEerD','23166eaAatL','read','Publicly\x20accessible\x20image\x20or\x20file\x20URL','invoice','toLowerCase','str','scene'];a147_0x5d66=function(){return _0x2f2363;};return a147_0x5d66();}function validateInputSelection(_0x317980){const _0x5a1ba3=a147_0x4886ce,_0x32b1c6=selectedInputs(_0x317980);if(_0x32b1c6['count']!==0x1)throw CliErrors[_0x5a1ba3(0xaa)](_0x5a1ba3(0x92));return _0x32b1c6;}function withScene(_0x31b1c6,_0x1b3142,_0x2358f4){const _0x2c4b58=a147_0x4886ce;return{..._0x31b1c6,'scene':_0x1b3142,..._0x2358f4?{'sourceFile':{'fileName':_0x2358f4[_0x2c4b58(0x97)],'filePath':_0x2358f4[_0x2c4b58(0xa6)]}}:{}};}const ocrRecognize={'service':'ocr','command':a147_0x4886ce(0xb3),'description':a147_0x4886ce(0x94),'risk':a147_0x4886ce(0x87),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x56ed17){const _0x5447f5=a147_0x4886ce,_0x49fcf4=normalizeScene(_0x56ed17[_0x5447f5(0x8b)](_0x5447f5(0x8c))),_0x3d028e=SCENE_TO_LEGACY_TYPE[_0x49fcf4],_0x24a4c3=validateInputSelection(_0x56ed17);if(_0x24a4c3[_0x5447f5(0xa1)]){const _0x2b74ff=new URLSearchParams({'url':_0x24a4c3[_0x5447f5(0xa1)],'type':_0x3d028e,'appCode':_0x56ed17['appCode']});return{'method':_0x5447f5(0x96),'url':_0x5447f5(0x9a)+_0x2b74ff[_0x5447f5(0x9c)](),'description':_0x5447f5(0xba)+_0x49fcf4+_0x5447f5(0xaf)};}const _0x471210=requireDevelopmentUploadFile(_0x24a4c3[_0x5447f5(0xa0)],_0x5447f5(0xad));return{'method':_0x5447f5(0xb4),'url':_0x5447f5(0x9b),'body':{'steps':[{'method':'POST','url':_0x5447f5(0x9b),'body':{'appCode':_0x56ed17[_0x5447f5(0xa7)],'multipart':{'file':_0x471210}}},{'method':'POST','url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x5447f5(0xa5),'downloadFlag':![]}},{'method':_0x5447f5(0x96),'url':_0x5447f5(0xb9),'query':{'appCode':_0x56ed17['appCode'],'url':_0x5447f5(0xac),'type':_0x3d028e}}]},'description':_0x5447f5(0xb7)+_0x49fcf4+_0x5447f5(0x90)};},async 'execute'(_0x5cfa5c){const _0x3fe296=a147_0x4886ce,_0x57b100=normalizeScene(_0x5cfa5c[_0x3fe296(0x8b)](_0x3fe296(0x8c))),_0x46ca41=SCENE_TO_LEGACY_TYPE[_0x57b100],_0x4b7a45=validateInputSelection(_0x5cfa5c);if(_0x4b7a45[_0x3fe296(0xa1)]){const _0x1bdeef=await recognizeDevelopmentOcr(_0x5cfa5c[_0x3fe296(0xa7)],{'url':_0x4b7a45['imageUrl'],'type':_0x46ca41});return{'ok':!![],'data':withScene(_0x1bdeef,_0x57b100)};}const _0x54e497=requireDevelopmentUploadFile(_0x4b7a45[_0x3fe296(0xa0)],_0x3fe296(0xad)),_0x507247=await uploadDevelopmentFile(_0x5cfa5c[_0x3fe296(0xa7)],_0x54e497[_0x3fe296(0xa8)]);if(!_0x507247[_0x3fe296(0xa6)])throw CliErrors[_0x3fe296(0xb2)](_0x3fe296(0x93));const _0x6afdc0=await queryDevelopmentFileUrl(_0x507247[_0x3fe296(0xa6)],{'download':![]});if(!_0x6afdc0[_0x3fe296(0x99)])throw CliErrors[_0x3fe296(0xb2)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x47e789=await recognizeDevelopmentOcr(_0x5cfa5c[_0x3fe296(0xa7)],{'url':_0x6afdc0['fileUrl'],'type':_0x46ca41});return{'ok':!![],'data':withScene(_0x47e789,_0x57b100,_0x507247)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x1b77(){const _0x47e2b8=['page-pattern','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','createMenu','1911552NhwLRY','version','warnings','790951FTvBRF','11118PiTuRe','langs','1850ORNBPD','compress','string','page-content','appCode','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','isInteger','menuPath','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','number','Custom_page_','Would\x20create\x20Custom\x20Page\x20','/smartapi/webcode/page/create','3715390sOiNFe','page','1995064NXCcNT','pageName\x20cannot\x20exceed\x20100\x20characters.','write','page.create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parent-menu-id','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','193yYSeOJ','Created\x20Custom\x20Page\x20','create','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','isNaN','\x20and\x20its\x20menu\x20entry.','num','page\x20create\x20does\x20not\x20accept\x20--page-type.','now','POST','apiError','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','files','stringify','length','BLANK','input','en-US','name','52LrjePG','9vRpRag','menuId','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','pageId','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','pageName','validation','page-type','1702590DQEELp','trim','str','parentMenuId','enableI18n'];a148_0x1b77=function(){return _0x47e2b8;};return a148_0x1b77();}const a148_0x158077=a148_0x2b4b;(function(_0x253d6c,_0x46e46c){const _0x4406cc=a148_0x2b4b,_0x3b6648=_0x253d6c();while(!![]){try{const _0x1dff4e=-parseInt(_0x4406cc(0x100))/0x1*(-parseInt(_0x4406cc(0xea))/0x2)+-parseInt(_0x4406cc(0xe8))/0x3*(-parseInt(_0x4406cc(0xd3))/0x4)+-parseInt(_0x4406cc(0xdc))/0x5+parseInt(_0x4406cc(0xe4))/0x6+parseInt(_0x4406cc(0xe7))/0x7+-parseInt(_0x4406cc(0xf9))/0x8*(-parseInt(_0x4406cc(0xd4))/0x9)+-parseInt(_0x4406cc(0xf7))/0xa;if(_0x1dff4e===_0x46e46c)break;else _0x3b6648['push'](_0x3b6648['shift']());}catch(_0x5e8233){_0x3b6648['push'](_0x3b6648['shift']());}}}(a148_0x1b77,0x2fc1e));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';function a148_0x2b4b(_0x3f2b53,_0x52ea68){_0x3f2b53=_0x3f2b53-0xd3;const _0x1b7726=a148_0x1b77();let _0x2b4bb4=_0x1b7726[_0x3f2b53];return _0x2b4bb4;}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=['zh-CN',a148_0x158077(0x111)];export const pageCreate={'service':a148_0x158077(0xf8),'command':a148_0x158077(0x102),'description':a148_0x158077(0xd8),'risk':a148_0x158077(0xfb),'defaultOutputFormat':a148_0x158077(0xeb),'structuredErrors':!![],'rejectedFlags':[{'name':a148_0x158077(0xdb),'message':a148_0x158077(0x107),'hint':a148_0x158077(0xf2)}],'flags':[{'name':a148_0x158077(0x112),'type':a148_0x158077(0xec),'description':a148_0x158077(0xfd)},{'name':a148_0x158077(0xfe),'type':a148_0x158077(0xf3),'description':a148_0x158077(0xff)},{'name':a148_0x158077(0xe1),'type':a148_0x158077(0xec),'description':'Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','enum':[a148_0x158077(0x10f)]},{'name':a148_0x158077(0xed),'type':a148_0x158077(0xec),'description':'Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x58fdfb){const _0x487856=a148_0x158077,_0x11f181=readPagePattern(_0x58fdfb);await validateCustomPageContent(readInput(_0x58fdfb,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x11f181)[_0x487856(0x10c)]);},async 'dryRun'(_0x2415cf){const _0x5b036f=a148_0x158077,{input:_0x131181}=await prepare(_0x2415cf);return{'method':_0x5b036f(0x109),'url':_0x5b036f(0xf6),'body':{'appCode':_0x131181[_0x5b036f(0xee)],'pageName':_0x131181[_0x5b036f(0xd9)],..._0x131181[_0x5b036f(0xdf)]!=null?{'parentMenuId':_0x131181[_0x5b036f(0xdf)]}:{},'createMenu':_0x131181[_0x5b036f(0xe3)],'codeContent':_0x131181[_0x5b036f(0x10c)]},'description':_0x5b036f(0xf5)+JSON[_0x5b036f(0x10d)](_0x131181[_0x5b036f(0xd9)])+_0x5b036f(0x105)};},async 'execute'(_0x1942a3){const _0x45f7aa=a148_0x158077,_0x4f5c79=await prepare(_0x1942a3),_0x13dbb3=await createCustomPage(_0x4f5c79[_0x45f7aa(0x110)]);if(!Number[_0x45f7aa(0xf0)](_0x13dbb3[_0x45f7aa(0xd7)])||_0x13dbb3['pageId']<=0x0)throw CliErrors[_0x45f7aa(0x10a)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');return{'ok':!![],'data':buildMutationData(_0x4f5c79,_0x13dbb3),'message':_0x45f7aa(0x101)+_0x13dbb3['pageId']+'.'};}};async function prepare(_0x453a58){const _0x2431df=a148_0x158077,_0x5de267=readPagePattern(_0x453a58);if(_0x5de267===null)return{'input':readInput(_0x453a58,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5de267),'warnings':[],'pagePattern':_0x5de267};let _0x5f5168=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x3ebc91=[];try{const _0x5c1824=await getI18nInfo(_0x453a58[_0x2431df(0xee)]);_0x5c1824[_0x2431df(0xe0)]&&_0x5c1824[_0x2431df(0xe9)]?.['length']&&(_0x5f5168=_0x5c1824[_0x2431df(0xe9)]);}catch{_0x3ebc91=['Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.'];}return{'input':readInput(_0x453a58,_0x5f5168,_0x5de267),'warnings':_0x3ebc91,'pagePattern':_0x5de267};}function readPagePattern(_0x16075a){const _0x375786=a148_0x158077,_0x3b6e87=_0x16075a[_0x375786(0xde)](_0x375786(0xe1))[_0x375786(0xdd)](),_0x210d11=_0x16075a['str'](_0x375786(0xed))[_0x375786(0xdd)]()['length']>0x0;if(_0x3b6e87&&_0x210d11)throw CliErrors[_0x375786(0xda)](_0x375786(0xd6));if(_0x210d11)return null;if(!_0x3b6e87)throw CliErrors[_0x375786(0xda)](_0x375786(0x103));if(_0x3b6e87!==_0x375786(0x10f))throw CliErrors[_0x375786(0xda)](_0x375786(0x10b));return _0x3b6e87;}function readInput(_0xb2837e,_0x21373b=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x25768a=readPagePattern(_0xb2837e)){const _0x268800=a148_0x158077,_0x491f03=_0xb2837e['str'](_0x268800(0x112))['trim']()||_0x268800(0xf4)+Date[_0x268800(0x108)]();if(_0x491f03[_0x268800(0x10e)]>0x64)throw CliErrors[_0x268800(0xda)](_0x268800(0xfa));const _0x992bd7=_0xb2837e[_0x268800(0x106)](_0x268800(0xfe),NaN),_0x76f5c8=!Number[_0x268800(0x104)](_0x992bd7);if(_0x76f5c8&&(!Number[_0x268800(0xf0)](_0x992bd7)||_0x992bd7<=0x0))throw CliErrors[_0x268800(0xda)](_0x268800(0xef));return{'appCode':_0xb2837e[_0x268800(0xee)],'pageName':_0x491f03,..._0x76f5c8?{'parentMenuId':_0x992bd7}:{},'createMenu':!![],'files':_0x25768a===null?parseCustomPageContent(_0xb2837e['str']('page-content')):buildInitialFiles(_0x491f03,_0x21373b)};}function buildMutationData(_0x146835,_0x31ef28){const _0x46c6af=a148_0x158077,{input:_0x2c7658}=_0x146835,_0x15c3bc=_0x31ef28&&buildCustomPageDevelopmentUrl(_0x2c7658[_0x46c6af(0xee)],_0x31ef28[_0x46c6af(0xf1)]),_0x528150=_0x31ef28&&buildCustomPageEditUrl(_0x2c7658['appCode'],_0x31ef28[_0x46c6af(0xd7)]);return{'operation':_0x46c6af(0xfc),'pageType':'CUSTOM','pagePattern':_0x146835['pagePattern'],'selector':{'appCode':_0x2c7658['appCode'],'pageName':_0x2c7658[_0x46c6af(0xd9)]},'before':null,'after':{'pageId':_0x31ef28?.['pageId']??null,'pageName':_0x31ef28?.['pageName']??_0x2c7658[_0x46c6af(0xd9)],'appCode':_0x31ef28?.[_0x46c6af(0xee)]??_0x2c7658['appCode'],'version':_0x31ef28?.[_0x46c6af(0xe5)]??null,'menuId':_0x31ef28?.[_0x46c6af(0xd5)]??null,'menuPath':_0x31ef28?.['menuPath']??null,'files':_0x31ef28?.[_0x46c6af(0x10c)]??Object['keys'](_0x2c7658['files'])},'dryRun':_0x31ef28===undefined,'request':_0x2c7658,..._0x15c3bc?{'pageUrl':_0x15c3bc}:{},..._0x528150?{'editPageUrl':_0x528150}:{},'warnings':[..._0x146835[_0x46c6af(0xe6)],..._0x31ef28&&!_0x15c3bc?[_0x46c6af(0xe2)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a149_0x4a22(_0x1d22bf,_0x21799e){_0x1d22bf=_0x1d22bf-0x14b;const _0x4d2f2c=a149_0x4d2f();let _0x4a2255=_0x4d2f2c[_0x1d22bf];return _0x4a2255;}const a149_0x129cdb=a149_0x4a22;function a149_0x4d2f(){const _0x4793f5=['trim','isNaN','getTime','336279SRtiBn','getFullYear','str','appCode','Custom\x20Page\x20ID','352296cOeSMA','compress','number','Retrieved\x20Custom\x20Page\x20','getSeconds','custom-detail','getHours','716fglKQb','cookie','878166mghpAI','1112SPsPRZ','994165KRrNLx','21035lpsrKX','page','pageCode','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMinutes','getDate','read','538236aEuKPs','padStart','5490SAEeFf','join'];a149_0x4d2f=function(){return _0x4793f5;};return a149_0x4d2f();}(function(_0x43b22a,_0x434d92){const _0x5c3506=a149_0x4a22,_0x163f26=_0x43b22a();while(!![]){try{const _0x2c9587=-parseInt(_0x5c3506(0x165))/0x1+parseInt(_0x5c3506(0x15e))/0x2+-parseInt(_0x5c3506(0x160))/0x3*(-parseInt(_0x5c3506(0x152))/0x4)+parseInt(_0x5c3506(0x156))/0x5+parseInt(_0x5c3506(0x154))/0x6+parseInt(_0x5c3506(0x157))/0x7*(-parseInt(_0x5c3506(0x155))/0x8)+parseInt(_0x5c3506(0x14b))/0x9;if(_0x2c9587===_0x434d92)break;else _0x163f26['push'](_0x163f26['shift']());}catch(_0x410f58){_0x163f26['push'](_0x163f26['shift']());}}}(a149_0x4d2f,0x376ec));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a149_0x129cdb(0x158),'command':a149_0x129cdb(0x150),'description':a149_0x129cdb(0x15a),'risk':a149_0x129cdb(0x15d),'defaultOutputFormat':a149_0x129cdb(0x14c),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x129cdb(0x14d),'required':!![],'description':a149_0x129cdb(0x169)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x45fb21){readCustomPageId(_0x45fb21);},async 'execute'(_0x16608d){const _0x28d804=a149_0x129cdb,_0x5a200b=readCustomPageId(_0x16608d),_0x510b3e=await getCustomPageSource(_0x5a200b),{bundle:_0x1a6b05,createTime:_0x424ca3,updateTime:_0x5951d5,..._0x9e00e}=_0x510b3e,_0x492c94=_0x510b3e['id']??_0x5a200b,_0xb54f69=_0x510b3e[_0x28d804(0x168)]?.[_0x28d804(0x162)]()||_0x16608d[_0x28d804(0x167)]('appcode')[_0x28d804(0x162)](),_0x130e6f=buildCustomPageRuntimeUrl(_0xb54f69,_0x510b3e[_0x28d804(0x159)]),_0x1d8015=buildCustomPageEditUrl(_0xb54f69,_0x492c94),_0x2237a2=await resolveCustomPageDevelopmentUrl(_0xb54f69,_0x492c94,_0x16608d[_0x28d804(0x153)]);return{'ok':!![],'data':{..._0x9e00e,..._0x130e6f?{'runtimePageUrl':_0x130e6f}:{},..._0x2237a2?{'pageUrl':_0x2237a2}:{},..._0x1d8015?{'editPageUrl':_0x1d8015}:{},..._0x424ca3==null?{}:{'createTime':formatTime(_0x424ca3)},..._0x5951d5==null?{}:{'updateTime':formatTime(_0x5951d5)}},'message':_0x28d804(0x14e)+_0x5a200b+'.'};}};function formatTime(_0x34d7ac){const _0x4dd70c=a149_0x129cdb,_0x4d0c1e=new Date(_0x34d7ac);if(Number[_0x4dd70c(0x163)](_0x4d0c1e[_0x4dd70c(0x164)]()))return String(_0x34d7ac);const _0x436e58=[_0x4d0c1e[_0x4dd70c(0x166)](),String(_0x4d0c1e['getMonth']()+0x1)[_0x4dd70c(0x15f)](0x2,'0'),String(_0x4d0c1e[_0x4dd70c(0x15c)]())['padStart'](0x2,'0')][_0x4dd70c(0x161)]('-'),_0x32f7f0=[String(_0x4d0c1e[_0x4dd70c(0x151)]())[_0x4dd70c(0x15f)](0x2,'0'),String(_0x4d0c1e[_0x4dd70c(0x15b)]())[_0x4dd70c(0x15f)](0x2,'0'),String(_0x4d0c1e[_0x4dd70c(0x14f)]())['padStart'](0x2,'0')][_0x4dd70c(0x161)](':');return _0x436e58+'\x20'+_0x32f7f0;}
|