@lovrabet/rabetbase-cli 2.5.5-beta.3 → 2.5.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.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.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.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/logs.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.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.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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/cross-db-analysis-shared.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- 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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/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/api-architecture-upgrade.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.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.js +1 -1
- 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.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- 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/feishu-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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +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.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.js +1 -1
- package/lib/constant/risk.js +1 -1
- 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.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +7 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.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/page/lr-smart-jsx.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/supported-flags.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.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- 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/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 +1 -1
- package/skills/rabetbase/SKILL.md +6 -4
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x5141ef=a180_0x42a8;(function(_0x275d3b,_0x2cb11f){const _0x551889=a180_0x42a8,_0x4043a9=_0x275d3b();while(!![]){try{const _0x400865=parseInt(_0x551889(0x1b3))/0x1+-parseInt(_0x551889(0x1d0))/0x2*(-parseInt(_0x551889(0x1ac))/0x3)+parseInt(_0x551889(0x1f3))/0x4+-parseInt(_0x551889(0x1f9))/0x5+parseInt(_0x551889(0x1b2))/0x6*(parseInt(_0x551889(0x1ee))/0x7)+parseInt(_0x551889(0x1ba))/0x8*(-parseInt(_0x551889(0x1a2))/0x9)+-parseInt(_0x551889(0x1a8))/0xa;if(_0x400865===_0x2cb11f)break;else _0x4043a9['push'](_0x4043a9['shift']());}catch(_0x59458c){_0x4043a9['push'](_0x4043a9['shift']());}}}(a180_0x4c97,0x4d612));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a180_0x4c97(){const _0x7a2df4=['push','split','cookie','menu-ids','visibility-update','depth','set','string','verification','stringify','validation','\x20must\x20be\x20true\x20or\x20false.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','childrenCount','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','num','verify\x20menu\x20visibility\x20update','sort','expected-count','menu_state_drift','isArray','boolean','parentId','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','join','\x20visibility\x20update\x20could\x20not\x20be\x20verified','1372epBEtx','Selected\x20','paths','\x20menu(s),\x20expected\x20','update','1737380XdtpCS','datasetId','pageType','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','modelType','397195SvpjNK','plannedActions','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','hash','trim','failed','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','Menu\x20path\x20selector\x20not\x20found:\x20','filter','menu','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s);\x20skip\x20','beforeById','/smartapi/menu/update','menu_selector_ambiguous','menu_selector_not_found','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','url','update\x20menu\x20visibility','appCode','Response\x20was\x20lost\x20and\x20menu\x20','expectVisible','pageId','before','plan','expectedCount','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','message','warnings','number','label','body','byId','datasetCode','rabetbase\x20menu\x20list\x20--format\x20compress','menu_permission_denied','3195GeRmHY','resources','Menu\x20visibility\x20update\x20completed:\x20','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menuIds','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','6395530gKxOzb','resourcesValid','requestedVisible','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','84666BwreoI','visible','\x20unchanged\x20menu(s).','has','path','update-recovery','13206QHzqYP','310423FnLvoS','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expect-visible','\x20skipped,\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','targets','Updated\x20visibility\x20for\x20','4432oPWdnB','true','Would\x20update\x20visibility\x20for\x20','\x20updated,\x20','update-menu-visibility','write','recovered','map','update\x20visibility\x20for','POST','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','type','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','some','updated','length','\x20menu(s);\x20skipped\x20','flagMissing','code','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','4lIbzjj','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','get','false'];a180_0x4c97=function(){return _0x7a2df4;};return a180_0x4c97();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a180_0x5141ef(0x207)}];export const menuVisibilityUpdate={'service':a180_0x5141ef(0x203),'command':a180_0x5141ef(0x1d8),'description':a180_0x5141ef(0x198),'risk':a180_0x5141ef(0x1bf),'structuredErrors':!![],'flags':[{'name':a180_0x5141ef(0x1d7),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1e0)},{'name':a180_0x5141ef(0x1f0),'type':a180_0x5141ef(0x1db),'description':a180_0x5141ef(0x1eb)},{'name':a180_0x5141ef(0x1ad),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a180_0x5141ef(0x1b5),'type':a180_0x5141ef(0x1e9),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a180_0x5141ef(0x1e6),'type':a180_0x5141ef(0x19b),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5155f9){parseInput(_0x5155f9);},async 'dryRun'(_0x403514){const _0x8c50ac=a180_0x5141ef,_0x343811=await buildPlan(_0x403514,!![]),_0x2f880d=_0x343811['plan'][_0x8c50ac(0x1fa)]?.[_0x8c50ac(0x1ca)]??0x0,_0x1c42eb=_0x343811[_0x8c50ac(0x195)][_0x8c50ac(0x1b8)][_0x8c50ac(0x1ca)]-_0x2f880d;return menuDryRunResult(_0x343811[_0x8c50ac(0x195)],{'method':_0x8c50ac(0x1c3),'url':_0x8c50ac(0x207),'body':{'updates':_0x343811[_0x8c50ac(0x195)]['plannedActions']?.[_0x8c50ac(0x1c1)](_0x5907f1=>_0x5907f1[_0x8c50ac(0x19d)])??[]},'description':_0x8c50ac(0x1bc)+_0x2f880d+_0x8c50ac(0x205)+_0x1c42eb+_0x8c50ac(0x1ae)});},async 'execute'(_0x25781a){const _0x59fe3f=a180_0x5141ef,_0x2b7497=await buildPlan(_0x25781a,![]);await recheckMutationSnapshot(_0x25781a,_0x2b7497[_0x59fe3f(0x195)],'update\x20menu\x20visibility');const _0x7d88ac=[],_0x2fe931=[],_0x29e3c9=[];for(const _0x1aa992 of _0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]){if(_0x1aa992[_0x59fe3f(0x194)][_0x59fe3f(0x1ad)]===_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]){_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x25781a[_0x59fe3f(0x190)],_0x25781a['cookie'],{'id':_0x1aa992['id'],'visible':_0x2b7497['plan'][_0x59fe3f(0x1aa)]}),_0x7d88ac['push']({'id':_0x1aa992['id'],'updated':!![],'skipped':![]});}catch(_0xda28cc){const _0x26eb8a=mapMenuApiError(_0xda28cc,_0x59fe3f(0x1c2),_0x1aa992['id']);if(isMenuResponseLoss(_0xda28cc)&&_0x26eb8a[_0x59fe3f(0x1cd)]!==_0x59fe3f(0x1a1)){_0x29e3c9[_0x59fe3f(0x1d4)](_0x1aa992['id']);continue;}_0x2fe931[_0x59fe3f(0x1d4)]({'id':_0x1aa992['id'],'stage':_0x59fe3f(0x1f2),'code':_0x26eb8a[_0x59fe3f(0x1cd)],'message':_0x26eb8a[_0x59fe3f(0x199)]});}}let _0x454662;try{_0x454662=await fetchMenuSnapshot(_0x25781a[_0x59fe3f(0x190)],_0x25781a[_0x59fe3f(0x1d6)]);}catch(_0x4ab7aa){const _0x4ea226=describeMenuErrorCause(_0x4ab7aa,_0x59fe3f(0x1e4)),_0x35347a=_0x29e3c9[_0x59fe3f(0x1c1)](_0x4835d9=>({'id':_0x4835d9,'stage':'update-recovery','code':_0x59fe3f(0x1fb),'message':_0x59fe3f(0x1fc)+_0x4835d9+_0x59fe3f(0x1ab),'requestedStateConfirmed':![],'recovered':![]})),_0x5f4fe1={'stage':_0x59fe3f(0x1dc),'code':_0x59fe3f(0x1fb),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1b8)]['map'](_0x100abe=>_0x100abe['id']),'requestedStateConfirmed':![],..._0x4ea226};throw menuFailure(asVerificationError(_0x4ab7aa,_0x59fe3f(0x1d1)),_0x2b7497['plan'],{'stage':'verification','succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x35347a,_0x5f4fe1],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),'recoveredCount':0x0,'lookupCommand':_0x59fe3f(0x1a0)}});}const _0x16c227=[];for(const _0x3c5a72 of _0x7d88ac){const _0x150af5=Number(_0x3c5a72['id']),_0x8b3a12=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x150af5),_0x5b9d72=_0x454662['byId']['get'](_0x150af5);try{verifyVisibilityUpdate(_0x8b3a12,_0x5b9d72,_0x2b7497[_0x59fe3f(0x195)]['requestedVisible']);}catch(_0x3a960b){const _0x1f4fa0=asVerificationError(_0x3a960b,'Menu\x20'+_0x150af5+_0x59fe3f(0x1ed));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x150af5,'stage':_0x59fe3f(0x1dc),'code':_0x1f4fa0[_0x59fe3f(0x1cd)],'message':_0x1f4fa0[_0x59fe3f(0x199)],'requestedStateConfirmed':![]});}}for(const _0x154bc1 of _0x29e3c9){const _0x2405c8=_0x2b7497[_0x59fe3f(0x206)][_0x59fe3f(0x1d2)](_0x154bc1),_0x1a5280=_0x454662[_0x59fe3f(0x19e)][_0x59fe3f(0x1d2)](_0x154bc1);try{verifyVisibilityUpdate(_0x2405c8,_0x1a5280,_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x1aa)]),_0x7d88ac[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x626d00){const _0x35a323=asVerificationError(_0x626d00,_0x59fe3f(0x191)+_0x154bc1+_0x59fe3f(0x1cf));_0x16c227[_0x59fe3f(0x1d4)]({'id':_0x154bc1,'stage':_0x59fe3f(0x1b1),'code':_0x35a323['code'],'message':_0x35a323[_0x59fe3f(0x199)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x16c227[_0x59fe3f(0x1ca)]>0x0){const _0x1bf808=_0x16c227['map'](_0x1f4905=>Number(_0x1f4905['id'])),_0x8ad6a3=_0x7d88ac[_0x59fe3f(0x202)](_0x15d32c=>_0x15d32c[_0x59fe3f(0x1c0)]===!![])[_0x59fe3f(0x1ca)],_0x35edc2=menuError('menu_verification_failed',_0x59fe3f(0x1b7)+_0x1bf808[_0x59fe3f(0x1ec)](',\x20')+'.',_0x59fe3f(0x1a7));throw menuFailure(_0x35edc2,_0x2b7497[_0x59fe3f(0x195)],{'stage':_0x59fe3f(0x1dc),'succeeded':_0x7d88ac,'failedRecords':[..._0x2fe931,..._0x16c227],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x59fe3f(0x1ff),..._0x1bf808[_0x59fe3f(0x1ca)]===0x1?{'targetId':_0x1bf808[0x0]}:{'targetIds':_0x1bf808},'recoveredCount':_0x8ad6a3,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x37962e=_0x7d88ac['filter'](_0x1798cc=>_0x1798cc[_0x59fe3f(0x1c9)]===!![])[_0x59fe3f(0x1ca)],_0x3ad338=_0x7d88ac[_0x59fe3f(0x1ca)]-_0x37962e,_0x39e583={..._0x2b7497[_0x59fe3f(0x195)],'succeeded':_0x7d88ac,'failed':_0x2fe931,'warnings':_0x2fe931['length']>0x0?[..._0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],_0x59fe3f(0x1e2)]:_0x2b7497[_0x59fe3f(0x195)][_0x59fe3f(0x19a)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x454662[_0x59fe3f(0x1fd)],'matchesRequestedState':_0x2fe931[_0x59fe3f(0x1ca)]===0x0,'recoveredCount':_0x29e3c9[_0x59fe3f(0x1ca)]}};return{'ok':_0x2fe931['length']===0x0,'data':_0x39e583,'message':_0x2fe931[_0x59fe3f(0x1ca)]===0x0?_0x59fe3f(0x1b9)+_0x37962e+_0x59fe3f(0x1cb)+_0x3ad338+_0x59fe3f(0x1ae):_0x59fe3f(0x1a4)+_0x37962e+_0x59fe3f(0x1bd)+_0x3ad338+_0x59fe3f(0x1b6)+_0x2fe931[_0x59fe3f(0x1ca)]+'\x20failed.'};}};function parseInput(_0x1bb83e){const _0x36bfdd=a180_0x5141ef,_0x4377fa=parseMenuIds(_0x1bb83e['str'](_0x36bfdd(0x1d7))),_0x515967=parseCsv(_0x1bb83e['str'](_0x36bfdd(0x1f0)));if(_0x4377fa['length']===0x0&&_0x515967[_0x36bfdd(0x1ca)]===0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x1c5));const _0x5dda9d=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1ad),!![]),_0x39a030=parseBooleanFlag(_0x1bb83e,_0x36bfdd(0x1b5),![]);let _0x12a269;if(hasFlag(_0x1bb83e,_0x36bfdd(0x1e6))){_0x12a269=_0x1bb83e[_0x36bfdd(0x1e3)](_0x36bfdd(0x1e6));if(!Number['isSafeInteger'](_0x12a269)||_0x12a269<0x0)throw CliErrors[_0x36bfdd(0x1de)](_0x36bfdd(0x20a));}return{'menuIds':_0x4377fa,'paths':_0x515967,'visible':_0x5dda9d,'expectVisible':_0x39a030,'expectedCount':_0x12a269};}async function buildPlan(_0x764ff1,_0x443d4a){const _0x5e0747=a180_0x5141ef,_0xa9e419=parseInput(_0x764ff1),_0x567304=await fetchMutationSnapshot(_0x764ff1,_0x5e0747(0x18f)),_0x54b2ce=selectTargets(_0x567304['menus'],_0xa9e419[_0x5e0747(0x1a6)],_0xa9e419[_0x5e0747(0x1f0)]);if(_0xa9e419[_0x5e0747(0x196)]!==undefined&&_0x54b2ce[_0x5e0747(0x1ca)]!==_0xa9e419[_0x5e0747(0x196)])throw menuError('menu_expected_count_mismatch',_0x5e0747(0x1ef)+_0x54b2ce[_0x5e0747(0x1ca)]+_0x5e0747(0x1f1)+_0xa9e419[_0x5e0747(0x196)]+'.',_0x5e0747(0x1c7));if(_0xa9e419[_0x5e0747(0x192)]!==undefined){const _0x3cee15=_0x54b2ce['filter'](_0x4ddd10=>_0x4ddd10[_0x5e0747(0x1ad)]!==_0xa9e419['expectVisible']);if(_0x3cee15['length']>0x0)throw menuError(_0x5e0747(0x1e7),_0x5e0747(0x204)+_0x3cee15[_0x5e0747(0x1c1)](_0xc5e4b0=>_0xc5e4b0['id'])[_0x5e0747(0x1ec)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x462ebb=_0x54b2ce[_0x5e0747(0x1c1)](_0x3bc959=>({'id':_0x3bc959['id'],'label':_0x3bc959['label'],'path':_0x3bc959[_0x5e0747(0x1b0)],'before':{'visible':_0x3bc959[_0x5e0747(0x1ad)]},'after':{'visible':_0xa9e419[_0x5e0747(0x1ad)]}})),_0x1b45c7=_0x462ebb[_0x5e0747(0x202)](_0x22db4f=>_0x22db4f[_0x5e0747(0x194)][_0x5e0747(0x1ad)]!==_0xa9e419[_0x5e0747(0x1ad)])['map'](_0xcfcdb7=>({'stage':_0x5e0747(0x1be),'method':_0x5e0747(0x1c3),'path':_0x5e0747(0x207),'body':{'appCode':_0x764ff1['appCode'],'id':_0xcfcdb7['id'],'visible':_0xa9e419['visible']}})),_0x1694e9=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0xa9e419[_0x5e0747(0x1a6)],'paths':_0xa9e419[_0x5e0747(0x1f0)]},'before':{'menus':_0x54b2ce['map'](_0xfa71ad=>({'id':_0xfa71ad['id'],'path':_0xfa71ad['path'],'visible':_0xfa71ad[_0x5e0747(0x1ad)]}))},'after':{'menus':_0x54b2ce['map'](_0x2e0781=>({'id':_0x2e0781['id'],'path':_0x2e0781[_0x5e0747(0x1b0)],'visible':_0xa9e419[_0x5e0747(0x1ad)]}))},'dryRun':_0x443d4a,'backend':[...BACKEND],'plannedActions':_0x1b45c7,'snapshotHash':_0x567304[_0x5e0747(0x1fd)],'warnings':_0x1b45c7[_0x5e0747(0x1ca)]===0x0?[_0x5e0747(0x1f7)]:[]});return{'plan':{..._0x1694e9,'requestedVisible':_0xa9e419[_0x5e0747(0x1ad)],'targets':_0x462ebb},'beforeById':new Map(_0x54b2ce['map'](_0x313b0d=>[_0x313b0d['id'],_0x313b0d]))};}function selectTargets(_0xecb66,_0x2df2c6,_0x360765){const _0x14d363=a180_0x5141ef,_0x53a6b2=new Map(_0xecb66[_0x14d363(0x1c1)](_0x354373=>[_0x354373['id'],_0x354373])),_0x277ef8=new Map(),_0xaf1dbf=_0x2df2c6[_0x14d363(0x202)](_0x102870=>!_0x53a6b2[_0x14d363(0x1af)](_0x102870));if(_0xaf1dbf[_0x14d363(0x1ca)]>0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x197)+_0xaf1dbf['join'](',\x20')+'.',_0x14d363(0x1f6));for(const _0x4f5bc5 of _0x2df2c6){_0x277ef8[_0x14d363(0x1da)](_0x4f5bc5,_0x53a6b2[_0x14d363(0x1d2)](_0x4f5bc5));}for(const _0x3704dc of _0x360765){const _0x1c80fb=_0xecb66['filter'](_0x1955c5=>_0x1955c5[_0x14d363(0x1b0)]===_0x3704dc);if(_0x1c80fb[_0x14d363(0x1ca)]===0x0)throw menuError(_0x14d363(0x209),_0x14d363(0x201)+JSON[_0x14d363(0x1dd)](_0x3704dc)+'.',_0x14d363(0x200));if(_0x1c80fb[_0x14d363(0x1ca)]>0x1)throw menuError(_0x14d363(0x208),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x3704dc)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x1c80fb[_0x14d363(0x1c1)](_0x30cc7d=>_0x30cc7d['id'])[_0x14d363(0x1ec)](',\x20')+'.');const _0x3235b0=_0x1c80fb[0x0];_0x277ef8[_0x14d363(0x1da)](_0x3235b0['id'],_0x3235b0);}return[..._0x277ef8['values']()];}function a180_0x42a8(_0x1c6195,_0x357eae){_0x1c6195=_0x1c6195-0x18e;const _0x4c976d=a180_0x4c97();let _0x42a8a2=_0x4c976d[_0x1c6195];return _0x42a8a2;}function parseMenuIds(_0x2c302f){const _0x4f71fc=a180_0x5141ef,_0x1b7034=parseCsv(_0x2c302f),_0x2869ab=_0x1b7034[_0x4f71fc(0x1c1)](Number);if(_0x2869ab[_0x4f71fc(0x1c8)](_0x1c590e=>!Number['isSafeInteger'](_0x1c590e)||_0x1c590e<=0x0))throw CliErrors[_0x4f71fc(0x1de)](_0x4f71fc(0x1b4));return[...new Set(_0x2869ab)];}function parseCsv(_0x45519b){const _0x228420=a180_0x5141ef;return[...new Set(_0x45519b[_0x228420(0x1d5)](',')[_0x228420(0x1c1)](_0x1efaea=>_0x1efaea[_0x228420(0x1fe)]())['filter'](Boolean))];}function parseBooleanFlag(_0x5d988d,_0xcbee2f,_0xbfd04b){const _0x1cf75c=a180_0x5141ef;if(!hasFlag(_0x5d988d,_0xcbee2f)){if(_0xbfd04b)throw CliErrors[_0x1cf75c(0x1cc)](_0xcbee2f);return undefined;}const _0x1db3bf=_0x5d988d['rawFlags'][_0xcbee2f];if(_0x1db3bf===!![]||_0x1db3bf===![])return _0x1db3bf;if(_0x1db3bf===_0x1cf75c(0x1bb))return!![];if(_0x1db3bf===_0x1cf75c(0x1d3))return![];throw CliErrors['validation']('--'+_0xcbee2f+_0x1cf75c(0x1df));}function verifyVisibilityUpdate(_0x4c5717,_0x476882,_0x410b8a){const _0x44dbc9=a180_0x5141ef;assertVerified(!!_0x476882,_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x476882[_0x44dbc9(0x1ad)]===_0x410b8a,_0x44dbc9(0x1ce)+_0x4c5717['id']+_0x44dbc9(0x1a5));const _0x1eb256=[['id',_0x476882['id'],_0x4c5717['id']],[_0x44dbc9(0x1ea),_0x476882[_0x44dbc9(0x1ea)],_0x4c5717[_0x44dbc9(0x1ea)]],[_0x44dbc9(0x1d9),_0x476882[_0x44dbc9(0x1d9)],_0x4c5717[_0x44dbc9(0x1d9)]],[_0x44dbc9(0x19c),_0x476882[_0x44dbc9(0x19c)],_0x4c5717[_0x44dbc9(0x19c)]],[_0x44dbc9(0x1b0),_0x476882[_0x44dbc9(0x1b0)],_0x4c5717['path']],[_0x44dbc9(0x18e),_0x476882[_0x44dbc9(0x18e)],_0x4c5717[_0x44dbc9(0x18e)]],[_0x44dbc9(0x1c6),_0x476882[_0x44dbc9(0x1c6)],_0x4c5717[_0x44dbc9(0x1c6)]],[_0x44dbc9(0x1e5),_0x476882[_0x44dbc9(0x1e5)],_0x4c5717['sort']],[_0x44dbc9(0x1a3),_0x476882['resources'],_0x4c5717[_0x44dbc9(0x1a3)]],[_0x44dbc9(0x1a9),_0x476882['resourcesValid'],_0x4c5717[_0x44dbc9(0x1a9)]],[_0x44dbc9(0x1c4),_0x476882['childrenIds'],_0x4c5717[_0x44dbc9(0x1c4)]],['childrenCount',_0x476882[_0x44dbc9(0x1e1)],_0x4c5717[_0x44dbc9(0x1e1)]],[_0x44dbc9(0x193),_0x476882['pageId'],_0x4c5717[_0x44dbc9(0x193)]],[_0x44dbc9(0x1f5),_0x476882[_0x44dbc9(0x1f5)],_0x4c5717[_0x44dbc9(0x1f5)]],[_0x44dbc9(0x1f8),_0x476882[_0x44dbc9(0x1f8)],_0x4c5717[_0x44dbc9(0x1f8)]],[_0x44dbc9(0x1f4),_0x476882[_0x44dbc9(0x1f4)],_0x4c5717['datasetId']],['datasetCode',_0x476882[_0x44dbc9(0x19f)],_0x4c5717['datasetCode']]];for(const [_0x44b92c,_0x4c0352,_0x32b763]of _0x1eb256){assertVerified(sameValue(_0x4c0352,_0x32b763),_0x44dbc9(0x1ce)+_0x4c5717['id']+'\x20'+_0x44b92c+'\x20changed\x20unexpectedly.');}}function sameValue(_0x60ee85,_0x2ad9b9){const _0xa6f36a=a180_0x5141ef;if(Array[_0xa6f36a(0x1e8)](_0x60ee85)||Array[_0xa6f36a(0x1e8)](_0x2ad9b9))return JSON[_0xa6f36a(0x1dd)](_0x60ee85)===JSON[_0xa6f36a(0x1dd)](_0x2ad9b9);return _0x60ee85===_0x2ad9b9;}
|
|
1
|
+
function a184_0x1eb4(){const _0x43cdbd=['Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','visible','update\x20visibility\x20for','Menu\x20visibility\x20update\x20completed:\x20','paths','/smartapi/menu/update','expectVisible','message','modelType','menu_selector_ambiguous','childrenIds','path','string','num','pageType','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20changed\x20unexpectedly.','\x20skipped,\x20','update-recovery','split','Menu\x20','url','trim','verification','some','rawFlags','true','1419929OhykTh','update-menu-visibility','verify\x20menu\x20visibility\x20update','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','updated','expected-count','Updated\x20visibility\x20for\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','str','Selected\x20','10330EpRxbv','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu_permission_denied','update','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','resources','menu_verification_failed','\x20menu(s),\x20expected\x20','6bRJuoX','write','type','boolean','menu\x20list','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','isSafeInteger','menu','1081522Teruhx','Menu\x20path\x20selector\x20not\x20found:\x20','sort','visibility-update','label','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','filter','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','byId','update\x20menu\x20visibility','flagMissing','before','beforeById','datasetId','parentId','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','map','set','appCode','number','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','length','targets','join','get','30aCuJlx','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','validation','menu_expected_count_mismatch','expect-visible','false','menu-ids','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','warnings','21410928Tnjznu','3994424DlSMch','code','datasetCode','menu_selector_not_found','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','pageId','\x20visibility\x20update\x20could\x20not\x20be\x20verified','push','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','childrenCount','plannedActions','\x20updated,\x20','POST','rabetbase\x20menu\x20list\x20--format\x20compress','2369884WNNgHL','\x20menu(s);\x20skip\x20','expectedCount','resourcesValid','menu_state_drift','depth','\x20must\x20be\x20true\x20or\x20false.','isArray','stringify','plan','Menu\x20id\x20selector(s)\x20not\x20found:\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','body','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','187445wKBVNu','failed'];a184_0x1eb4=function(){return _0x43cdbd;};return a184_0x1eb4();}const a184_0xe5d20c=a184_0x4117;(function(_0x210354,_0x4c2f49){const _0x4fd91c=a184_0x4117,_0x845f23=_0x210354();while(!![]){try{const _0x4447cc=parseInt(_0x4fd91c(0x186))/0x1+parseInt(_0x4fd91c(0x144))/0x2*(-parseInt(_0x4fd91c(0x13c))/0x3)+-parseInt(_0x4fd91c(0x177))/0x4+-parseInt(_0x4fd91c(0x1ad))/0x5*(parseInt(_0x4fd91c(0x15d))/0x6)+parseInt(_0x4fd91c(0x1a3))/0x7+-parseInt(_0x4fd91c(0x167))/0x8+parseInt(_0x4fd91c(0x166))/0x9;if(_0x4447cc===_0x4c2f49)break;else _0x845f23['push'](_0x845f23['shift']());}catch(_0x1cecae){_0x845f23['push'](_0x845f23['shift']());}}}(a184_0x1eb4,0x8efba));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a184_0xe5d20c(0x175),'path':a184_0xe5d20c(0x18d)}];export const menuVisibilityUpdate={'service':a184_0xe5d20c(0x143),'command':a184_0xe5d20c(0x147),'description':a184_0xe5d20c(0x197),'risk':a184_0xe5d20c(0x13d),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a184_0xe5d20c(0x1ae)},{'name':'paths','type':a184_0xe5d20c(0x194),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a184_0xe5d20c(0x13f),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a184_0xe5d20c(0x161),'type':a184_0xe5d20c(0x13f),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a184_0xe5d20c(0x1a8),'type':a184_0xe5d20c(0x157),'description':a184_0xe5d20c(0x158)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x55d8e2){parseInput(_0x55d8e2);},async 'dryRun'(_0x3e526c){const _0x32c26f=a184_0xe5d20c,_0x51b040=await buildPlan(_0x3e526c,!![]),_0x20b004=_0x51b040[_0x32c26f(0x180)][_0x32c26f(0x173)]?.[_0x32c26f(0x159)]??0x0,_0xfe29f7=_0x51b040['plan'][_0x32c26f(0x15a)][_0x32c26f(0x159)]-_0x20b004;return menuDryRunResult(_0x51b040[_0x32c26f(0x180)],{'method':_0x32c26f(0x175),'url':'/smartapi/menu/update','body':{'updates':_0x51b040[_0x32c26f(0x180)][_0x32c26f(0x173)]?.[_0x32c26f(0x154)](_0x1e20bf=>_0x1e20bf[_0x32c26f(0x184)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x20b004+_0x32c26f(0x178)+_0xfe29f7+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x3c91aa){const _0x460e78=a184_0xe5d20c,_0x4e30d2=await buildPlan(_0x3c91aa,![]);await recheckMutationSnapshot(_0x3c91aa,_0x4e30d2[_0x460e78(0x180)],_0x460e78(0x14d));const _0x34dd05=[],_0x17c7ec=[],_0x20ae7b=[];for(const _0x30b628 of _0x4e30d2[_0x460e78(0x180)][_0x460e78(0x15a)]){if(_0x30b628['before'][_0x460e78(0x189)]===_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x16b)]){_0x34dd05[_0x460e78(0x170)]({'id':_0x30b628['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3c91aa['appCode'],_0x3c91aa['cookie'],{'id':_0x30b628['id'],'visible':_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x16b)]}),_0x34dd05[_0x460e78(0x170)]({'id':_0x30b628['id'],'updated':!![],'skipped':![]});}catch(_0x3912ba){const _0x195eee=mapMenuApiError(_0x3912ba,_0x460e78(0x18a),_0x30b628['id']);if(isMenuResponseLoss(_0x3912ba)&&_0x195eee[_0x460e78(0x168)]!==_0x460e78(0x1b0)){_0x20ae7b[_0x460e78(0x170)](_0x30b628['id']);continue;}_0x17c7ec[_0x460e78(0x170)]({'id':_0x30b628['id'],'stage':_0x460e78(0x1b1),'code':_0x195eee['code'],'message':_0x195eee[_0x460e78(0x18f)]});}}let _0x25eafa;try{_0x25eafa=await fetchMenuSnapshot(_0x3c91aa[_0x460e78(0x156)],_0x3c91aa['cookie']);}catch(_0x4bb060){const _0x48434c=describeMenuErrorCause(_0x4bb060,_0x460e78(0x1a5)),_0x285c44=_0x20ae7b['map'](_0x333589=>({'id':_0x333589,'stage':'update-recovery','code':_0x460e78(0x1b5),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x333589+_0x460e78(0x185),'requestedStateConfirmed':![],'recovered':![]})),_0x175922={'stage':_0x460e78(0x19f),'code':'menu_verification_failed','message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x4e30d2[_0x460e78(0x180)][_0x460e78(0x15a)][_0x460e78(0x154)](_0x448fef=>_0x448fef['id']),'requestedStateConfirmed':![],..._0x48434c};throw menuFailure(asVerificationError(_0x4bb060,_0x460e78(0x1a6)),_0x4e30d2[_0x460e78(0x180)],{'stage':_0x460e78(0x19f),'succeeded':_0x34dd05,'failedRecords':[..._0x17c7ec,..._0x285c44,_0x175922],'warnings':[_0x460e78(0x1b2)],'verification':{'status':_0x460e78(0x187),'recoveredCount':0x0,'lookupCommand':_0x460e78(0x176)}});}const _0x5e0aa0=[];for(const _0x2f5940 of _0x34dd05){const _0x45d0cc=Number(_0x2f5940['id']),_0x1c91fd=_0x4e30d2[_0x460e78(0x150)][_0x460e78(0x15c)](_0x45d0cc),_0x2b2064=_0x25eafa[_0x460e78(0x14c)][_0x460e78(0x15c)](_0x45d0cc);try{verifyVisibilityUpdate(_0x1c91fd,_0x2b2064,_0x4e30d2[_0x460e78(0x180)]['requestedVisible']);}catch(_0xc4fa85){const _0x13e692=asVerificationError(_0xc4fa85,'Menu\x20'+_0x45d0cc+_0x460e78(0x16f));_0x5e0aa0[_0x460e78(0x170)]({'id':_0x45d0cc,'stage':'verification','code':_0x13e692[_0x460e78(0x168)],'message':_0x13e692['message'],'requestedStateConfirmed':![]});}}for(const _0x3d07ba of _0x20ae7b){const _0x23e23e=_0x4e30d2[_0x460e78(0x150)][_0x460e78(0x15c)](_0x3d07ba),_0x947609=_0x25eafa[_0x460e78(0x14c)][_0x460e78(0x15c)](_0x3d07ba);try{verifyVisibilityUpdate(_0x23e23e,_0x947609,_0x4e30d2[_0x460e78(0x180)]['requestedVisible']),_0x34dd05[_0x460e78(0x170)]({'id':_0x3d07ba,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x6d3f28){const _0x48ff56=asVerificationError(_0x6d3f28,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x3d07ba+_0x460e78(0x16c));_0x5e0aa0[_0x460e78(0x170)]({'id':_0x3d07ba,'stage':_0x460e78(0x19a),'code':_0x48ff56[_0x460e78(0x168)],'message':_0x48ff56[_0x460e78(0x18f)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5e0aa0['length']>0x0){const _0x2aabc4=_0x5e0aa0['map'](_0x3b29b2=>Number(_0x3b29b2['id'])),_0x505f1b=_0x34dd05['filter'](_0x37a6f1=>_0x37a6f1['recovered']===!![])[_0x460e78(0x159)],_0xa028db=menuError(_0x460e78(0x1b5),_0x460e78(0x164)+_0x2aabc4['join'](',\x20')+'.',_0x460e78(0x1b3));throw menuFailure(_0xa028db,_0x4e30d2[_0x460e78(0x180)],{'stage':_0x460e78(0x19f),'succeeded':_0x34dd05,'failedRecords':[..._0x17c7ec,..._0x5e0aa0],'warnings':[_0x460e78(0x182)],'verification':{'status':'failed',..._0x2aabc4[_0x460e78(0x159)]===0x1?{'targetId':_0x2aabc4[0x0]}:{'targetIds':_0x2aabc4},'recoveredCount':_0x505f1b,'lookupCommand':_0x460e78(0x176)}});}const _0x4cd6fd=_0x34dd05[_0x460e78(0x14a)](_0x5c5f91=>_0x5c5f91[_0x460e78(0x1a7)]===!![])['length'],_0x1d9575=_0x34dd05['length']-_0x4cd6fd,_0x26823b={..._0x4e30d2[_0x460e78(0x180)],'succeeded':_0x34dd05,'failed':_0x17c7ec,'warnings':_0x17c7ec[_0x460e78(0x159)]>0x0?[..._0x4e30d2[_0x460e78(0x180)]['warnings'],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x4e30d2['plan'][_0x460e78(0x165)],'verification':{'checkedBy':_0x460e78(0x140),'snapshotHash':_0x25eafa['hash'],'matchesRequestedState':_0x17c7ec[_0x460e78(0x159)]===0x0,'recoveredCount':_0x20ae7b[_0x460e78(0x159)]}};return{'ok':_0x17c7ec[_0x460e78(0x159)]===0x0,'data':_0x26823b,'message':_0x17c7ec[_0x460e78(0x159)]===0x0?_0x460e78(0x1a9)+_0x4cd6fd+'\x20menu(s);\x20skipped\x20'+_0x1d9575+'\x20unchanged\x20menu(s).':_0x460e78(0x18b)+_0x4cd6fd+_0x460e78(0x174)+_0x1d9575+_0x460e78(0x199)+_0x17c7ec['length']+'\x20failed.'};}};function parseInput(_0xa85dd9){const _0x588860=a184_0xe5d20c,_0x291fc9=parseMenuIds(_0xa85dd9[_0x588860(0x1ab)](_0x588860(0x163))),_0x3e4560=parseCsv(_0xa85dd9[_0x588860(0x1ab)](_0x588860(0x18c)));if(_0x291fc9[_0x588860(0x159)]===0x0&&_0x3e4560[_0x588860(0x159)]===0x0)throw CliErrors[_0x588860(0x15f)](_0x588860(0x149));const _0x2d9011=parseBooleanFlag(_0xa85dd9,_0x588860(0x189),!![]),_0x1e1ab0=parseBooleanFlag(_0xa85dd9,_0x588860(0x161),![]);let _0x2067dd;if(hasFlag(_0xa85dd9,_0x588860(0x1a8))){_0x2067dd=_0xa85dd9[_0x588860(0x195)]('expected-count');if(!Number[_0x588860(0x142)](_0x2067dd)||_0x2067dd<0x0)throw CliErrors[_0x588860(0x15f)](_0x588860(0x153));}return{'menuIds':_0x291fc9,'paths':_0x3e4560,'visible':_0x2d9011,'expectVisible':_0x1e1ab0,'expectedCount':_0x2067dd};}async function buildPlan(_0x2e8a9f,_0x4df56f){const _0x5f59de=a184_0xe5d20c,_0x210c94=parseInput(_0x2e8a9f),_0x40256f=await fetchMutationSnapshot(_0x2e8a9f,_0x5f59de(0x14d)),_0x5dac36=selectTargets(_0x40256f['menus'],_0x210c94['menuIds'],_0x210c94[_0x5f59de(0x18c)]);if(_0x210c94[_0x5f59de(0x179)]!==undefined&&_0x5dac36['length']!==_0x210c94[_0x5f59de(0x179)])throw menuError(_0x5f59de(0x160),_0x5f59de(0x1ac)+_0x5dac36[_0x5f59de(0x159)]+_0x5f59de(0x13b)+_0x210c94['expectedCount']+'.',_0x5f59de(0x1aa));if(_0x210c94['expectVisible']!==undefined){const _0x1abd82=_0x5dac36[_0x5f59de(0x14a)](_0x3fe206=>_0x3fe206[_0x5f59de(0x189)]!==_0x210c94[_0x5f59de(0x18e)]);if(_0x1abd82['length']>0x0)throw menuError(_0x5f59de(0x17b),_0x5f59de(0x188)+_0x1abd82[_0x5f59de(0x154)](_0x153a39=>_0x153a39['id'])[_0x5f59de(0x15b)](',\x20')+'.',_0x5f59de(0x14b));}const _0x2b1233=_0x5dac36[_0x5f59de(0x154)](_0x40ba06=>({'id':_0x40ba06['id'],'label':_0x40ba06[_0x5f59de(0x148)],'path':_0x40ba06[_0x5f59de(0x193)],'before':{'visible':_0x40ba06[_0x5f59de(0x189)]},'after':{'visible':_0x210c94[_0x5f59de(0x189)]}})),_0x22f172=_0x2b1233['filter'](_0x149cbf=>_0x149cbf[_0x5f59de(0x14f)]['visible']!==_0x210c94[_0x5f59de(0x189)])[_0x5f59de(0x154)](_0x34719b=>({'stage':_0x5f59de(0x1a4),'method':_0x5f59de(0x175),'path':'/smartapi/menu/update','body':{'appCode':_0x2e8a9f[_0x5f59de(0x156)],'id':_0x34719b['id'],'visible':_0x210c94[_0x5f59de(0x189)]}})),_0x2e4e70=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x210c94['menuIds'],'paths':_0x210c94['paths']},'before':{'menus':_0x5dac36['map'](_0x5a43ce=>({'id':_0x5a43ce['id'],'path':_0x5a43ce[_0x5f59de(0x193)],'visible':_0x5a43ce[_0x5f59de(0x189)]}))},'after':{'menus':_0x5dac36[_0x5f59de(0x154)](_0x315ea0=>({'id':_0x315ea0['id'],'path':_0x315ea0[_0x5f59de(0x193)],'visible':_0x210c94['visible']}))},'dryRun':_0x4df56f,'backend':[...BACKEND],'plannedActions':_0x22f172,'snapshotHash':_0x40256f['hash'],'warnings':_0x22f172[_0x5f59de(0x159)]===0x0?[_0x5f59de(0x16d)]:[]});return{'plan':{..._0x2e4e70,'requestedVisible':_0x210c94[_0x5f59de(0x189)],'targets':_0x2b1233},'beforeById':new Map(_0x5dac36['map'](_0xe258e4=>[_0xe258e4['id'],_0xe258e4]))};}function selectTargets(_0x2e1b8a,_0x14f326,_0x4baecd){const _0x30247b=a184_0xe5d20c,_0x461e42=new Map(_0x2e1b8a[_0x30247b(0x154)](_0x3d11d0=>[_0x3d11d0['id'],_0x3d11d0])),_0x15714e=new Map(),_0xd8b951=_0x14f326[_0x30247b(0x14a)](_0x46d28a=>!_0x461e42['has'](_0x46d28a));if(_0xd8b951['length']>0x0)throw menuError(_0x30247b(0x16a),_0x30247b(0x181)+_0xd8b951['join'](',\x20')+'.',_0x30247b(0x183));for(const _0x410e3a of _0x14f326){_0x15714e['set'](_0x410e3a,_0x461e42['get'](_0x410e3a));}for(const _0x21b6d6 of _0x4baecd){const _0x29cd81=_0x2e1b8a['filter'](_0x42f128=>_0x42f128['path']===_0x21b6d6);if(_0x29cd81[_0x30247b(0x159)]===0x0)throw menuError(_0x30247b(0x16a),_0x30247b(0x145)+JSON[_0x30247b(0x17f)](_0x21b6d6)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x29cd81[_0x30247b(0x159)]>0x1)throw menuError(_0x30247b(0x191),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x30247b(0x17f)](_0x21b6d6)+'.',_0x30247b(0x15e)+_0x29cd81[_0x30247b(0x154)](_0x10ece6=>_0x10ece6['id'])[_0x30247b(0x15b)](',\x20')+'.');const _0x2e7c32=_0x29cd81[0x0];_0x15714e[_0x30247b(0x155)](_0x2e7c32['id'],_0x2e7c32);}return[..._0x15714e['values']()];}function parseMenuIds(_0x56f6e9){const _0x58660d=a184_0xe5d20c,_0x16a76a=parseCsv(_0x56f6e9),_0x3adb7f=_0x16a76a[_0x58660d(0x154)](Number);if(_0x3adb7f[_0x58660d(0x1a0)](_0x4cb302=>!Number[_0x58660d(0x142)](_0x4cb302)||_0x4cb302<=0x0))throw CliErrors['validation'](_0x58660d(0x1af));return[...new Set(_0x3adb7f)];}function parseCsv(_0x8fc6f){const _0x5b0aff=a184_0xe5d20c;return[...new Set(_0x8fc6f[_0x5b0aff(0x19b)](',')[_0x5b0aff(0x154)](_0x15bfa5=>_0x15bfa5[_0x5b0aff(0x19e)]())[_0x5b0aff(0x14a)](Boolean))];}function a184_0x4117(_0x102448,_0x2d9847){_0x102448=_0x102448-0x13b;const _0x1eb47c=a184_0x1eb4();let _0x411706=_0x1eb47c[_0x102448];return _0x411706;}function parseBooleanFlag(_0xb1faca,_0x5cec03,_0x137295){const _0x3d987d=a184_0xe5d20c;if(!hasFlag(_0xb1faca,_0x5cec03)){if(_0x137295)throw CliErrors[_0x3d987d(0x14e)](_0x5cec03);return undefined;}const _0xd03101=_0xb1faca[_0x3d987d(0x1a1)][_0x5cec03];if(_0xd03101===!![]||_0xd03101===![])return _0xd03101;if(_0xd03101===_0x3d987d(0x1a2))return!![];if(_0xd03101===_0x3d987d(0x162))return![];throw CliErrors[_0x3d987d(0x15f)]('--'+_0x5cec03+_0x3d987d(0x17d));}function verifyVisibilityUpdate(_0x3aaf12,_0x172a10,_0x4e5cdf){const _0x4f5c85=a184_0xe5d20c;assertVerified(!!_0x172a10,'Menu\x20'+_0x3aaf12['id']+_0x4f5c85(0x171)),assertVerified(_0x172a10[_0x4f5c85(0x189)]===_0x4e5cdf,_0x4f5c85(0x19c)+_0x3aaf12['id']+_0x4f5c85(0x141));const _0x25220c=[['id',_0x172a10['id'],_0x3aaf12['id']],[_0x4f5c85(0x152),_0x172a10[_0x4f5c85(0x152)],_0x3aaf12[_0x4f5c85(0x152)]],[_0x4f5c85(0x17c),_0x172a10[_0x4f5c85(0x17c)],_0x3aaf12[_0x4f5c85(0x17c)]],[_0x4f5c85(0x148),_0x172a10[_0x4f5c85(0x148)],_0x3aaf12['label']],['path',_0x172a10[_0x4f5c85(0x193)],_0x3aaf12[_0x4f5c85(0x193)]],[_0x4f5c85(0x19d),_0x172a10[_0x4f5c85(0x19d)],_0x3aaf12['url']],['type',_0x172a10[_0x4f5c85(0x13e)],_0x3aaf12['type']],[_0x4f5c85(0x146),_0x172a10[_0x4f5c85(0x146)],_0x3aaf12[_0x4f5c85(0x146)]],[_0x4f5c85(0x1b4),_0x172a10['resources'],_0x3aaf12[_0x4f5c85(0x1b4)]],[_0x4f5c85(0x17a),_0x172a10[_0x4f5c85(0x17a)],_0x3aaf12[_0x4f5c85(0x17a)]],[_0x4f5c85(0x192),_0x172a10[_0x4f5c85(0x192)],_0x3aaf12[_0x4f5c85(0x192)]],[_0x4f5c85(0x172),_0x172a10[_0x4f5c85(0x172)],_0x3aaf12['childrenCount']],[_0x4f5c85(0x16e),_0x172a10[_0x4f5c85(0x16e)],_0x3aaf12['pageId']],[_0x4f5c85(0x196),_0x172a10['pageType'],_0x3aaf12['pageType']],[_0x4f5c85(0x190),_0x172a10[_0x4f5c85(0x190)],_0x3aaf12[_0x4f5c85(0x190)]],[_0x4f5c85(0x151),_0x172a10[_0x4f5c85(0x151)],_0x3aaf12[_0x4f5c85(0x151)]],[_0x4f5c85(0x169),_0x172a10[_0x4f5c85(0x169)],_0x3aaf12['datasetCode']]];for(const [_0x38ef23,_0x414c42,_0x4dcb6c]of _0x25220c){assertVerified(sameValue(_0x414c42,_0x4dcb6c),_0x4f5c85(0x19c)+_0x3aaf12['id']+'\x20'+_0x38ef23+_0x4f5c85(0x198));}}function sameValue(_0x27519b,_0x3662f2){const _0x318668=a184_0xe5d20c;if(Array[_0x318668(0x17e)](_0x27519b)||Array[_0x318668(0x17e)](_0x3662f2))return JSON[_0x318668(0x17f)](_0x27519b)===JSON[_0x318668(0x17f)](_0x3662f2);return _0x27519b===_0x3662f2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x219d75=a185_0x26e0;(function(_0x28b854,_0x13e967){const _0x16171a=a185_0x26e0,_0x158ef2=_0x28b854();while(!![]){try{const _0x378812=-parseInt(_0x16171a(0x139))/0x1+-parseInt(_0x16171a(0x12f))/0x2+-parseInt(_0x16171a(0x126))/0x3+-parseInt(_0x16171a(0x134))/0x4*(parseInt(_0x16171a(0x129))/0x5)+parseInt(_0x16171a(0x128))/0x6+-parseInt(_0x16171a(0x121))/0x7*(parseInt(_0x16171a(0x136))/0x8)+parseInt(_0x16171a(0x132))/0x9;if(_0x378812===_0x13e967)break;else _0x158ef2['push'](_0x158ef2['shift']());}catch(_0x40229f){_0x158ef2['push'](_0x158ef2['shift']());}}}(a185_0x16c4,0x9e12e));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a185_0x219d75(0x12d);function a185_0x26e0(_0x388c1a,_0x228e46){_0x388c1a=_0x388c1a-0x11b;const _0x16c4c3=a185_0x16c4();let _0x26e08c=_0x16c4c3[_0x388c1a];return _0x26e08c;}function a185_0x16c4(){const _0x4d1e7d=['description','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configCode',';\x20do\x20not\x20resubmit.','993483RsJbwF','Inspect\x20with\x20','1207884fQDKnp','1337695xXxvQD','notification_config_create_outcome_unknown','readTimeout','planned','/notification/channel-config/create','verified','250808VVYgIG','channelType','configName','31872987BjObYr','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','12cFmkTV','document','8jLqjOS',';\x20do\x20not\x20resubmit\x20automatically.','POST','916853XhNEOp','config-create','endpointUrl','Created\x20notification\x20config\x20','appCode','write','create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','connectTimeout','6434764Rnzjgf'];a185_0x16c4=function(){return _0x4d1e7d;};return a185_0x16c4();}async function prepareCreate(_0x4ec8ed){const _0x51cdc7=a185_0x219d75,_0x4bce78=await readNotificationDocument(_0x4ec8ed,_0x51cdc7(0x11e)),_0x2e5736=createMutationInput(_0x4ec8ed['appCode'],_0x4bce78);return{'document':_0x4bce78,'input':_0x2e5736,'planned':projectNotificationConfig({'appCode':_0x4ec8ed[_0x51cdc7(0x11c)],'configName':_0x4bce78[_0x51cdc7(0x131)],'channelType':_0x4bce78[_0x51cdc7(0x130)],'endpointUrl':_0x4bce78[_0x51cdc7(0x13b)],'channelConfig':_0x4bce78['channelConfig'],'description':_0x4bce78[_0x51cdc7(0x122)],'connectTimeout':_0x4bce78[_0x51cdc7(0x120)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x4bce78[_0x51cdc7(0x12b)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a185_0x219d75(0x13a),'description':a185_0x219d75(0x123),'risk':a185_0x219d75(0x11d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x373c93){assertSingleNotificationSource(_0x373c93);},async 'dryRun'(_0x354473){const _0x467ad8=a185_0x219d75,_0xd81c9e=await prepareCreate(_0x354473),_0x459e04=notificationLookupCommand(_0x354473[_0x467ad8(0x11c)],_0xd81c9e['document'][_0x467ad8(0x130)]);return asDryRunResult({'operation':_0x467ad8(0x11e),'selector':{'appCode':_0x354473[_0x467ad8(0x11c)],'configName':_0xd81c9e[_0x467ad8(0x135)][_0x467ad8(0x131)],'channelType':_0xd81c9e[_0x467ad8(0x135)][_0x467ad8(0x130)]},'before':null,'after':_0xd81c9e['planned'],'dryRun':!![],'backend':{'method':_0x467ad8(0x138),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x467ad8(0x12c),'lookupCommand':_0x459e04}},{'method':_0x467ad8(0x138),'url':CREATE_PATH});},async 'execute'(_0x32a154){const _0x4be116=a185_0x219d75,_0x25d7cf=await prepareCreate(_0x32a154),_0x5a3c2c=notificationLookupCommand(_0x32a154[_0x4be116(0x11c)],_0x25d7cf[_0x4be116(0x135)]['channelType']);let _0x4045fb;try{_0x4045fb=await createNotificationChannelConfig(_0x25d7cf['input']);}catch(_0x1f4aff){if(isPlatformTransportFailure(_0x1f4aff))throw notificationError(_0x4be116(0x12a),_0x4be116(0x133),_0x4be116(0x127)+_0x5a3c2c+_0x4be116(0x125));throw safeApiFailure(_0x4be116(0x11e),'mutation','Inspect\x20with\x20'+_0x5a3c2c+_0x4be116(0x11f));}if(!Number['isSafeInteger'](_0x4045fb)||_0x4045fb<=0x0)throw notificationError(_0x4be116(0x12a),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x4be116(0x127)+_0x5a3c2c+_0x4be116(0x125));let _0x290ae6;try{const _0xbe9f44=await getNotificationChannelConfig(_0x4045fb,_0x32a154[_0x4be116(0x11c)]);_0x290ae6=normalizeExactNotificationConfig(_0xbe9f44,_0x4045fb,_0x32a154['appCode']);}catch{throw safeApiFailure(_0x4be116(0x11e),'verification','Inspect\x20with\x20'+_0x5a3c2c+_0x4be116(0x137));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x290ae6[_0x4be116(0x11c)],'id':_0x290ae6['id'],'configCode':_0x290ae6[_0x4be116(0x124)],'configName':_0x290ae6[_0x4be116(0x131)],'channelType':_0x290ae6[_0x4be116(0x130)]},'before':null,'after':projectNotificationConfig(_0x290ae6),'dryRun':![],'backend':{'method':_0x4be116(0x138),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4be116(0x12e),'lookupCommand':_0x5a3c2c}},'message':_0x4be116(0x11b)+_0x290ae6['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a186_0x4f9446=a186_0x76a8;(function(_0x283155,_0x59d2e4){const _0x165305=a186_0x76a8,_0x2218f9=_0x283155();while(!![]){try{const _0x161aee=-parseInt(_0x165305(0x1de))/0x1+parseInt(_0x165305(0x1dd))/0x2*(parseInt(_0x165305(0x1cc))/0x3)+-parseInt(_0x165305(0x1cf))/0x4*(-parseInt(_0x165305(0x1ce))/0x5)+parseInt(_0x165305(0x1dc))/0x6*(-parseInt(_0x165305(0x1db))/0x7)+-parseInt(_0x165305(0x1d7))/0x8+parseInt(_0x165305(0x1c9))/0x9+-parseInt(_0x165305(0x1d6))/0xa*(parseInt(_0x165305(0x1d5))/0xb);if(_0x161aee===_0x59d2e4)break;else _0x2218f9['push'](_0x2218f9['shift']());}catch(_0x4bcb07){_0x2218f9['push'](_0x2218f9['shift']());}}}(a186_0x4434,0x35a08));import{asDryRunResult}from'../../commands/common/dry-run.js';function a186_0x76a8(_0x34e119,_0x1f40c1){_0x34e119=_0x34e119-0x1c1;const _0x4434b6=a186_0x4434();let _0x76a82e=_0x4434b6[_0x34e119];return _0x76a82e;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a186_0x4f9446(0x1d9),REFERENCE_WARNING=a186_0x4f9446(0x1da);async function prepareDelete(_0x575d30){const _0x4c088d=a186_0x4f9446,_0x37066c=readNotificationId(_0x575d30),_0xdba802=await requireExactNotificationConfig(_0x575d30['appCode'],_0x37066c,_0x4c088d(0x1d8));return{'id':_0x37066c,'before':_0xdba802};}export const notificationConfigDelete={'service':a186_0x4f9446(0x1c4),'command':a186_0x4f9446(0x1e0),'description':a186_0x4f9446(0x1c7),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5b4b39){readNotificationId(_0x5b4b39),requireNotificationExplicitYes(_0x5b4b39);},async 'dryRun'(_0x686cf9){const _0x53ed1f=a186_0x4f9446,_0x34cce0=await prepareDelete(_0x686cf9),_0x224b0f=notificationLookupCommand(_0x686cf9['appCode'],_0x34cce0['before']['channelType']);return asDryRunResult({'operation':_0x53ed1f(0x1d8),'selector':notificationSelector(_0x34cce0[_0x53ed1f(0x1c8)]),'before':projectNotificationConfig(_0x34cce0[_0x53ed1f(0x1c8)]),'after':null,'dryRun':!![],'backend':{'method':_0x53ed1f(0x1c2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x53ed1f(0x1cd),'lookupCommand':_0x224b0f}},{'method':_0x53ed1f(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x56313f){const _0x560c3d=a186_0x4f9446;requireNotificationExplicitYes(_0x56313f);const _0x568aa1=await prepareDelete(_0x56313f),_0x467e96=notificationLookupCommand(_0x56313f['appCode'],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]);let _0x26fb62=![];try{await deleteNotificationChannelConfig(_0x568aa1['id'],_0x56313f[_0x560c3d(0x1d0)]);}catch(_0x2eb868){if(!isPlatformTransportFailure(_0x2eb868))throw safeApiFailure(_0x560c3d(0x1d8),_0x560c3d(0x1c3),_0x560c3d(0x1d4)+_0x467e96+_0x560c3d(0x1c5));_0x26fb62=!![];}let _0x382240;try{_0x382240=await listNotificationChannelConfigs(_0x56313f['appCode'],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]),validateNotificationDeleteReadback(_0x382240,_0x56313f[_0x560c3d(0x1d0)],_0x568aa1[_0x560c3d(0x1c8)][_0x560c3d(0x1c6)]);}catch{throw notificationError(_0x26fb62?_0x560c3d(0x1d2):_0x560c3d(0x1e1),'Notification\x20config\x20'+_0x568aa1['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x467e96+_0x560c3d(0x1ca));}if(_0x382240[_0x560c3d(0x1c1)](_0x1df169=>_0x1df169['id']===_0x568aa1['id']))throw notificationError(_0x26fb62?_0x560c3d(0x1d2):'notification_config_delete_verification_failed',_0x560c3d(0x1d1)+_0x568aa1['id']+_0x560c3d(0x1cb),_0x560c3d(0x1d4)+_0x467e96+_0x560c3d(0x1ca));const _0x10b3e3=[REFERENCE_WARNING];return _0x26fb62&&_0x10b3e3[_0x560c3d(0x1d3)](_0x560c3d(0x1df)),{'ok':!![],'data':{'operation':_0x560c3d(0x1d8),'selector':notificationSelector(_0x568aa1[_0x560c3d(0x1c8)]),'before':projectNotificationConfig(_0x568aa1['before']),'after':null,'dryRun':![],'backend':{'method':_0x560c3d(0x1c2),'path':DELETE_PATH},'warnings':_0x10b3e3,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x26fb62,'lookupCommand':_0x467e96}},'message':'Deleted\x20notification\x20config\x20'+_0x568aa1['id']};}};function a186_0x4434(){const _0x22ba86=[';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','before','1469115iOYQUN',';\x20do\x20not\x20resubmit\x20automatically.','\x20remains\x20present\x20after\x20delete.','110766pkxSEB','planned','15830GMMPHI','248TcDBkv','appCode','Notification\x20config\x20','notification_config_delete_outcome_unknown','unshift','Inspect\x20with\x20','18117FFbFjW','1110sjIFcT','1956280dplbhT','delete','/notification/channel-config/delete','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','401681beRTYm','12vKXdEC','22qZktzN','3895ZUUevG','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','config-delete','notification_config_delete_verification_unavailable','some','POST','mutation','notification'];a186_0x4434=function(){return _0x22ba86;};return a186_0x4434();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a187_0x2a168d=a187_0x5500;(function(_0x2f8b53,_0x1c0e2b){const _0x5de1f2=a187_0x5500,_0x3d5e74=_0x2f8b53();while(!![]){try{const _0x5a0b9d=parseInt(_0x5de1f2(0x140))/0x1+-parseInt(_0x5de1f2(0x148))/0x2+parseInt(_0x5de1f2(0x149))/0x3*(parseInt(_0x5de1f2(0x13b))/0x4)+parseInt(_0x5de1f2(0x143))/0x5+-parseInt(_0x5de1f2(0x137))/0x6+parseInt(_0x5de1f2(0x131))/0x7*(parseInt(_0x5de1f2(0x138))/0x8)+-parseInt(_0x5de1f2(0x144))/0x9;if(_0x5a0b9d===_0x1c0e2b)break;else _0x3d5e74['push'](_0x3d5e74['shift']());}catch(_0x372e98){_0x3d5e74['push'](_0x3d5e74['shift']());}}}(a187_0x37ab,0xdb144));function a187_0x5500(_0xe239f2,_0x303c2d){_0xe239f2=_0xe239f2-0x130;const _0x37abef=a187_0x37ab();let _0x55002f=_0x37abef[_0xe239f2];return _0x55002f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a187_0x37ab(){const _0x24bfbd=['3360951zgSlqH','map','Found\x20','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','1909176iYLLYO','42Fbdcsh','type','config-list','4387558ADMhWn','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','boolean','\x20notification\x20config(s)','trim','5472780hRmEKx','8QPZyFg','all','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','358964naBWRH','appCode','length','notification','validation','1021115pwiMmU','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','bool','1166110umICfS'];a187_0x37ab=function(){return _0x24bfbd;};return a187_0x37ab();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a187_0x2a168d(0x13e),'command':a187_0x2a168d(0x130),'description':a187_0x2a168d(0x13a),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a187_0x2a168d(0x14a),'type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a187_0x2a168d(0x134),'default':![],'description':a187_0x2a168d(0x141)}],async 'validate'(_0x296e10){const _0x4d57be=a187_0x2a168d;if(_0x296e10[_0x4d57be(0x142)](_0x4d57be(0x139))&&_0x296e10['str'](_0x4d57be(0x14a))[_0x4d57be(0x136)]())throw CliErrors[_0x4d57be(0x13f)](_0x4d57be(0x147),_0x4d57be(0x133));if(_0x296e10[_0x4d57be(0x142)]('all'))return;readNotificationChannelType(_0x296e10);},async 'execute'(_0x113a8e){const _0x905680=a187_0x2a168d;if(_0x113a8e['bool'](_0x905680(0x139))){const _0x53bd4a=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x905680(0x145)](_0x223ddb=>listNotificationChannelConfigs(_0x113a8e[_0x905680(0x13c)],_0x223ddb))),_0x232fc1=_0x53bd4a['flat']()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x113a8e[_0x905680(0x13c)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x232fc1[_0x905680(0x13d)],'configs':_0x232fc1},'message':_0x905680(0x146)+_0x232fc1['length']+_0x905680(0x132)};}const _0x23ede1=readNotificationChannelType(_0x113a8e),_0x10e160=await listNotificationChannelConfigs(_0x113a8e['appCode'],_0x23ede1),_0x2523a8=_0x10e160['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x113a8e[_0x905680(0x13c)],'channelType':_0x23ede1,'count':_0x2523a8[_0x905680(0x13d)],'configs':_0x2523a8},'message':_0x905680(0x146)+_0x2523a8[_0x905680(0x13d)]+'\x20'+_0x23ede1+_0x905680(0x135)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x4bef51=a188_0x4032;function a188_0x35aa(){const _0x483223=[';\x20do\x20not\x20resubmit\x20automatically.','update','high-risk-write','191234iHnUXm','appCode','13321fEppyy','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','4282490fdUGYM','patch','2363895LNIlVQ','before','5dxYoGR','notification_config_update_verification_unavailable','notification_config_update_outcome_unknown','2956316sPCKwX','Inspect\x20with\x20--id\x20','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Inspect\x20ID\x20','allMatch','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Notification\x20config\x20','\x20with\x20','2204592cSBQWp',';\x20no\x20automatic\x20retry\x20was\x20attempted.','provesChange','12yYtcZv','channelType','verified','776dIzqHH','config-update','verifiedFields','payload','Updated\x20notification\x20config\x20','\x20via\x20','planned','POST','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','5368410osHhHj'];a188_0x35aa=function(){return _0x483223;};return a188_0x35aa();}(function(_0x11d956,_0x1d1ded){const _0x42fa6e=a188_0x4032,_0x1de6c0=_0x11d956();while(!![]){try{const _0x1bd9c1=-parseInt(_0x42fa6e(0xd7))/0x1*(parseInt(_0x42fa6e(0xcf))/0x2)+-parseInt(_0x42fa6e(0xe2))/0x3+parseInt(_0x42fa6e(0xda))/0x4+-parseInt(_0x42fa6e(0xd5))/0x5*(-parseInt(_0x42fa6e(0xe5))/0x6)+-parseInt(_0x42fa6e(0xd1))/0x7*(-parseInt(_0x42fa6e(0xe8))/0x8)+-parseInt(_0x42fa6e(0xcb))/0x9+parseInt(_0x42fa6e(0xd3))/0xa;if(_0x1bd9c1===_0x1d1ded)break;else _0x1de6c0['push'](_0x1de6c0['shift']());}catch(_0x15972d){_0x1de6c0['push'](_0x1de6c0['shift']());}}}(a188_0x35aa,0x77266));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x1e9e88){const _0x13cbb1=a188_0x4032,_0x18cc12=readNotificationId(_0x1e9e88),_0x4b00c5=await readNotificationDocument(_0x1e9e88,'update'),_0x124563=await requireExactNotificationConfig(_0x1e9e88['appCode'],_0x18cc12,_0x13cbb1(0xcd));return{'id':_0x18cc12,'patch':_0x4b00c5,'before':_0x124563,'payload':mergeUpdateInput(_0x124563,_0x4b00c5),'planned':plannedUpdateProjection(_0x124563,_0x4b00c5)};}function a188_0x4032(_0x3a8476,_0x57c1b5){_0x3a8476=_0x3a8476-0xc7;const _0x35aa98=a188_0x35aa();let _0x403279=_0x35aa98[_0x3a8476];return _0x403279;}export const notificationConfigUpdate={'service':'notification','command':a188_0x4bef51(0xe9),'description':a188_0x4bef51(0xdc),'risk':a188_0x4bef51(0xce),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x54d0ad){readNotificationId(_0x54d0ad),assertSingleNotificationSource(_0x54d0ad),requireNotificationExplicitYes(_0x54d0ad);},async 'dryRun'(_0x54730d){const _0x16f24f=a188_0x4bef51,_0x3dafb1=await prepareUpdate(_0x54730d),_0x2c9e99=notificationLookupCommand(_0x54730d[_0x16f24f(0xd0)],_0x3dafb1[_0x16f24f(0xd6)][_0x16f24f(0xe6)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x3dafb1[_0x16f24f(0xd6)]),'before':projectNotificationConfig(_0x3dafb1[_0x16f24f(0xd6)]),'after':_0x3dafb1['planned'],'dryRun':!![],'backend':{'method':_0x16f24f(0xc9),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x16f24f(0xc8),'lookupCommand':_0x2c9e99}},{'method':_0x16f24f(0xc9),'url':UPDATE_PATH});},async 'execute'(_0x139b4e){const _0x2338b1=a188_0x4bef51;requireNotificationExplicitYes(_0x139b4e);const _0x1e2941=await prepareUpdate(_0x139b4e),_0x3564b9=notificationLookupCommand(_0x139b4e[_0x2338b1(0xd0)],_0x1e2941[_0x2338b1(0xd6)][_0x2338b1(0xe6)]);let _0x4cdede=![];try{await updateNotificationChannelConfig(_0x1e2941[_0x2338b1(0xeb)]);}catch(_0x3951d5){if(!isPlatformTransportFailure(_0x3951d5))throw safeApiFailure(_0x2338b1(0xcd),'mutation',_0x2338b1(0xdd)+_0x1e2941['id']+_0x2338b1(0xe1)+_0x3564b9+_0x2338b1(0xe3));_0x4cdede=!![];}let _0x98e130;try{const _0x3ac843=await getNotificationChannelConfig(_0x1e2941['id'],_0x139b4e[_0x2338b1(0xd0)]);_0x98e130=normalizeExactNotificationConfig(_0x3ac843,_0x1e2941['id'],_0x139b4e['appCode']);}catch{throw notificationError(_0x4cdede?_0x2338b1(0xd9):_0x2338b1(0xd8),_0x2338b1(0xe0)+_0x1e2941['id']+_0x2338b1(0xd2),'Inspect\x20with\x20--id\x20'+_0x1e2941['id']+'\x20via\x20'+_0x3564b9+_0x2338b1(0xcc));}const _0x9cee31=requestedSafeFieldsMatch(_0x1e2941['before'],_0x98e130,_0x1e2941[_0x2338b1(0xd4)]);if(!_0x9cee31[_0x2338b1(0xde)]||_0x4cdede&&!_0x9cee31[_0x2338b1(0xe4)])throw notificationError(_0x4cdede?_0x2338b1(0xd9):'notification_config_update_verification_failed',_0x2338b1(0xe0)+_0x1e2941['id']+_0x2338b1(0xdf),_0x2338b1(0xdb)+_0x1e2941['id']+_0x2338b1(0xc7)+_0x3564b9+';\x20do\x20not\x20resubmit\x20automatically.');const _0x321591=_0x4cdede?[_0x2338b1(0xca)]:[];return{'ok':!![],'data':{'operation':_0x2338b1(0xcd),'selector':notificationSelector(_0x98e130),'before':projectNotificationConfig(_0x1e2941[_0x2338b1(0xd6)]),'after':projectNotificationConfig(_0x98e130),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x321591,'verification':{'status':_0x2338b1(0xe7),'recoveredAfterUnknownResponse':_0x4cdede,'verifiedFields':_0x9cee31[_0x2338b1(0xea)],'lookupCommand':_0x3564b9}},'message':_0x2338b1(0xec)+_0x98e130['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47e70a,_0x3e03a6){const _0x3d7740=a189_0x16d8,_0x443485=_0x47e70a();while(!![]){try{const _0x36c8f3=parseInt(_0x3d7740(0x1cb))/0x1*(-parseInt(_0x3d7740(0x1ce))/0x2)+parseInt(_0x3d7740(0x1cd))/0x3*(parseInt(_0x3d7740(0x1d6))/0x4)+parseInt(_0x3d7740(0x1cc))/0x5+-parseInt(_0x3d7740(0x1d5))/0x6*(parseInt(_0x3d7740(0x1d0))/0x7)+-parseInt(_0x3d7740(0x1d2))/0x8*(parseInt(_0x3d7740(0x1d4))/0x9)+parseInt(_0x3d7740(0x1cf))/0xa*(parseInt(_0x3d7740(0x1d1))/0xb)+-parseInt(_0x3d7740(0x1d3))/0xc;if(_0x36c8f3===_0x3e03a6)break;else _0x443485['push'](_0x443485['shift']());}catch(_0x1580eb){_0x443485['push'](_0x443485['shift']());}}}(a189_0x5401,0x6422c));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a189_0x5401(){const _0x5670f4=['201733xVDMsA','1753191kvZGnJ','8QGLAoW','871116zyYHmR','5462559jaSVIE','18PnCGwL','12dYuIPa','463479UVlabg','2043140iGJzFC','752865UtntFX','2YEDALC','30ffjxxH'];a189_0x5401=function(){return _0x5670f4;};return a189_0x5401();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a189_0x16d8(_0x39ab9b,_0x14cfbf){_0x39ab9b=_0x39ab9b-0x1cb;const _0x540103=a189_0x5401();let _0x16d8e2=_0x540103[_0x39ab9b];return _0x16d8e2;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a186_0x53fb76=a186_0xbdc1;(function(_0x1c76c9,_0x3c4cc4){const _0x5b4aa7=a186_0xbdc1,_0x418207=_0x1c76c9();while(!![]){try{const _0x20c644=-parseInt(_0x5b4aa7(0x9e))/0x1+-parseInt(_0x5b4aa7(0xba))/0x2+parseInt(_0x5b4aa7(0xa0))/0x3*(-parseInt(_0x5b4aa7(0x8d))/0x4)+parseInt(_0x5b4aa7(0x7b))/0x5*(parseInt(_0x5b4aa7(0xbc))/0x6)+-parseInt(_0x5b4aa7(0x86))/0x7*(parseInt(_0x5b4aa7(0x9f))/0x8)+-parseInt(_0x5b4aa7(0xdc))/0x9*(-parseInt(_0x5b4aa7(0x91))/0xa)+-parseInt(_0x5b4aa7(0xa7))/0xb*(-parseInt(_0x5b4aa7(0xbb))/0xc);if(_0x20c644===_0x3c4cc4)break;else _0x418207['push'](_0x418207['shift']());}catch(_0x371a73){_0x418207['push'](_0x418207['shift']());}}}(a186_0x59c7,0xcd6f2));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a186_0x53fb76(0x9d),a186_0x53fb76(0xc4),a186_0x53fb76(0x9a),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a186_0x53fb76(0x79),'channelType',a186_0x53fb76(0xad),a186_0x53fb76(0xd7),'description',a186_0x53fb76(0x6f),a186_0x53fb76(0x81)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a186_0x53fb76(0xc6),a186_0x53fb76(0x67)]),EMAIL_RECIPIENT_FIELDS=new Set([a186_0x53fb76(0xb9),'recipients',a186_0x53fb76(0x98),a186_0x53fb76(0x71),a186_0x53fb76(0xd4),a186_0x53fb76(0x93),a186_0x53fb76(0xd9),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a186_0x53fb76(0x76),'type':a186_0x53fb76(0x8a),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a186_0x53fb76(0xa3),'type':a186_0x53fb76(0x6a),'required':![],'default':![],'description':a186_0x53fb76(0xcf)},{'name':a186_0x53fb76(0x92),'type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x13df8c,_0x2b4290,_0x354e77){return new CliError(_0x13df8c,0x1,_0x2b4290,_0x354e77);}export function readNotificationId(_0x5b17d5){const _0x4dffbe=a186_0x53fb76,_0x182232=_0x5b17d5[_0x4dffbe(0x6e)]('id');if(!Number[_0x4dffbe(0xd5)](_0x182232)||_0x182232<=0x0)throw notificationError(_0x4dffbe(0xbf),_0x4dffbe(0xb1));return _0x182232;}export function requireNotificationExplicitYes(_0x3d6ce6){const _0x3c3d83=a186_0x53fb76;if(_0x3d6ce6['bool'](_0x3c3d83(0x78))||_0x3d6ce6['bool'](_0x3c3d83(0x69)))return;throw notificationError(_0x3c3d83(0xaf),_0x3c3d83(0x89),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x44dce7,_0x37e2e1='type',_0x56060f='EMAIL'){const _0x9410a7=a186_0x53fb76,_0x586f49=_0x44dce7[_0x9410a7(0xe1)](_0x37e2e1)[_0x9410a7(0x7d)]()||_0x56060f;if(!NOTIFICATION_CHANNEL_TYPES[_0x9410a7(0x70)](_0x586f49))throw CliErrors[_0x9410a7(0xe0)](_0x9410a7(0xae)+_0x37e2e1+':\x20'+_0x586f49,_0x9410a7(0x8b)+NOTIFICATION_CHANNEL_TYPES[_0x9410a7(0xd6)](',\x20')+'.');return _0x586f49;}export function assertSingleNotificationSource(_0x1dc891){const _0x2ab560=a186_0x53fb76,_0x2db75e=[],_0x5d2f93=_0x1dc891[_0x2ab560(0xe1)]('file')['trim']();if(_0x5d2f93)_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0x76),'path':_0x5d2f93});if(_0x1dc891[_0x2ab560(0xc7)](_0x2ab560(0xa3)))_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0xa3)});const _0x4bcece=_0x1dc891[_0x2ab560(0xe1)]('from-env')[_0x2ab560(0x7d)]();if(_0x4bcece)_0x2db75e[_0x2ab560(0xa9)]({'kind':_0x2ab560(0x84),'name':_0x4bcece});if(_0x2db75e['length']===0x0)throw CliErrors[_0x2ab560(0xe0)]('Missing\x20notification\x20JSON\x20source.',_0x2ab560(0x77));if(_0x2db75e['length']>0x1)throw CliErrors[_0x2ab560(0xe0)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x2ab560(0x77));return _0x2db75e[0x0];}function a186_0xbdc1(_0x495e20,_0x2f0663){_0x495e20=_0x495e20-0x67;const _0x59c79e=a186_0x59c7();let _0xbdc1b1=_0x59c79e[_0x495e20];return _0xbdc1b1;}export async function readNotificationDocument(_0x3ebe97,_0x2331d8){const _0x29e78d=a186_0x53fb76,_0x446ab8=assertSingleNotificationSource(_0x3ebe97),_0x385e49=_0x446ab8[_0x29e78d(0xc8)]===_0x29e78d(0x76)?_0x29e78d(0xb6)+_0x446ab8[_0x29e78d(0xb0)]:_0x446ab8[_0x29e78d(0xc8)]===_0x29e78d(0x84)?_0x29e78d(0x73)+_0x446ab8[_0x29e78d(0x72)]:_0x29e78d(0xa3);let _0x38e85c;try{if(_0x446ab8['kind']===_0x29e78d(0x76))_0x38e85c=await readFile(_0x446ab8[_0x29e78d(0xb0)],'utf8');else{if(_0x446ab8[_0x29e78d(0xc8)]==='env'){if(!(_0x446ab8[_0x29e78d(0x72)]in process.env))throw notificationError(_0x29e78d(0xd8),_0x29e78d(0xd0)+_0x446ab8['name']);_0x38e85c=process.env[_0x446ab8.name]??'';}else _0x38e85c=await readStdin();}}catch(_0x2b8ccf){if(_0x2b8ccf instanceof CliError)throw _0x2b8ccf;throw notificationError(_0x29e78d(0xd8),_0x29e78d(0xd1)+_0x385e49+'.');}let _0x3d2468;try{_0x3d2468=JSON[_0x29e78d(0xdf)](_0x38e85c);}catch{throw notificationError(_0x29e78d(0x6b),_0x29e78d(0xcd)+_0x385e49+'\x20is\x20invalid.',_0x29e78d(0xb7));}if(!isJsonObject(_0x3d2468))throw notificationError('notification_config_json_invalid',_0x29e78d(0xcd)+_0x385e49+_0x29e78d(0x94));return validateNotificationDocument(_0x3d2468,_0x2331d8);}export function projectNotificationListConfig(_0xec63a7,_0x2b64f0){const _0xc3f7b1=a186_0x53fb76;return{'id':typeof _0xec63a7['id']==='number'?_0xec63a7['id']:null,'configCode':requireResponseString(_0xec63a7[_0xc3f7b1(0xc6)],_0xc3f7b1(0xc6),_0x2b64f0),'configName':requireResponseString(_0xec63a7[_0xc3f7b1(0x79)],_0xc3f7b1(0x79),_0x2b64f0),'channelType':requireResponseString(_0xec63a7['channelType'],_0xc3f7b1(0x68),_0x2b64f0),'description':normalizeNullableString(_0xec63a7[_0xc3f7b1(0xc3)]),'createTime':normalizeNullableString(_0xec63a7['createTime']),'updateTime':normalizeNullableString(_0xec63a7[_0xc3f7b1(0xce)])};}export function normalizeExactNotificationConfig(_0x3a20d6,_0x1dc613,_0x5eb45b){const _0x57c48d=a186_0x53fb76;if(!Number[_0x57c48d(0xd5)](_0x3a20d6['id'])||_0x3a20d6['id']!==_0x1dc613)throw notificationError(_0x57c48d(0xdb),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x1dc613+'.');if(_0x3a20d6['appCode']!==_0x5eb45b)throw notificationError(_0x57c48d(0xdb),_0x57c48d(0x95)+_0x1dc613+_0x57c48d(0xcc));const _0x4c47c6=requireExactString(_0x3a20d6[_0x57c48d(0x79)],_0x57c48d(0x79),_0x1dc613),_0x60b955=requireExactString(_0x3a20d6['configCode'],_0x57c48d(0xc6),_0x1dc613),_0x262cf2=requireExactString(_0x3a20d6['channelType'],_0x57c48d(0x68),_0x1dc613);if(!NOTIFICATION_CHANNEL_TYPES[_0x57c48d(0x70)](_0x262cf2))throw notificationError('notification_config_response_invalid',_0x57c48d(0x95)+_0x1dc613+'\x20has\x20an\x20unsupported\x20channelType.');const _0x1338ce=responseNullableString(_0x3a20d6[_0x57c48d(0xad)],'endpointUrl',_0x1dc613),_0x383463=responseNullableString(_0x3a20d6[_0x57c48d(0xd7)],_0x57c48d(0xd7),_0x1dc613),_0x1c6101=responseNullableString(_0x3a20d6[_0x57c48d(0xc3)],_0x57c48d(0xc3),_0x1dc613),_0x5e62d6=responseNullableTimeout(_0x3a20d6[_0x57c48d(0x6f)],_0x57c48d(0x6f),_0x1dc613),_0x5ec81f=responseNullableTimeout(_0x3a20d6[_0x57c48d(0x81)],_0x57c48d(0x81),_0x1dc613);return{'id':_0x1dc613,'appCode':_0x5eb45b,'configCode':_0x60b955,'configName':_0x4c47c6,'channelType':_0x262cf2,'endpointUrl':redactSensitive(_0x1338ce),'channelConfig':redactSensitive(_0x383463),'description':_0x1c6101,'connectTimeout':_0x5e62d6,'readTimeout':_0x5ec81f,'endpointUrlRaw':_0x1338ce,'channelConfigRaw':_0x383463};}export async function requireExactNotificationConfig(_0x510889,_0x876409,_0x148f98){const _0x2512e4=a186_0x53fb76;let _0x16697d;try{_0x16697d=await getNotificationChannelConfig(_0x876409,_0x510889);}catch{throw safeApiFailure(_0x148f98,_0x2512e4(0x8f),_0x2512e4(0x75)+_0x510889+_0x2512e4(0xd3));}return normalizeExactNotificationConfig(_0x16697d,_0x876409,_0x510889);}export function projectNotificationConfig(_0x1eb447){const _0x7539ff=a186_0x53fb76;return{'id':_0x1eb447['id']??null,'appCode':_0x1eb447[_0x7539ff(0xc1)],'configCode':_0x1eb447['configCode']??null,'configName':_0x1eb447['configName'],'channelType':_0x1eb447['channelType'],'endpointUrl':redactSensitive(_0x1eb447[_0x7539ff(0xad)]),'channelConfig':redactSensitive(_0x1eb447[_0x7539ff(0xd7)]),'description':_0x1eb447[_0x7539ff(0xc3)]??null,'connectTimeout':_0x1eb447[_0x7539ff(0x6f)]??null,'readTimeout':_0x1eb447[_0x7539ff(0x81)]??null};}export function notificationSelector(_0x28b3f8){const _0x221894=a186_0x53fb76;return{'appCode':_0x28b3f8[_0x221894(0xc1)],'id':_0x28b3f8['id'],'configCode':_0x28b3f8[_0x221894(0xc6)],'configName':_0x28b3f8[_0x221894(0x79)],'channelType':_0x28b3f8[_0x221894(0x68)]};}export function createMutationInput(_0x5e26ac,_0x26c15a){const _0x40ab90=a186_0x53fb76;return{'appCode':_0x5e26ac,'configName':_0x26c15a[_0x40ab90(0x79)],'channelType':_0x26c15a[_0x40ab90(0x68)],...hasOwn(_0x26c15a,_0x40ab90(0xad))?{'endpointUrl':_0x26c15a[_0x40ab90(0xad)]}:{},...hasOwn(_0x26c15a,_0x40ab90(0xd7))?{'channelConfig':serializeChannelConfig(_0x26c15a['channelConfig'])}:{},...hasOwn(_0x26c15a,_0x40ab90(0xc3))?{'description':_0x26c15a['description']}:{},...hasOwn(_0x26c15a,_0x40ab90(0x6f))?{'connectTimeout':_0x26c15a[_0x40ab90(0x6f)]}:{},...hasOwn(_0x26c15a,_0x40ab90(0x81))?{'readTimeout':_0x26c15a[_0x40ab90(0x81)]}:{}};}export function mergeUpdateInput(_0x56008a,_0x2a1c14){const _0x4ccb85=a186_0x53fb76;return{'id':_0x56008a['id'],'appCode':_0x56008a['appCode'],'configName':_0x2a1c14[_0x4ccb85(0x79)]??_0x56008a['configName'],'channelType':_0x2a1c14['channelType']??_0x56008a['channelType'],'endpointUrl':hasOwn(_0x2a1c14,_0x4ccb85(0xad))?_0x2a1c14[_0x4ccb85(0xad)]:_0x56008a['endpointUrlRaw'],'channelConfig':hasOwn(_0x2a1c14,'channelConfig')?serializeChannelConfig(_0x2a1c14['channelConfig']):_0x56008a[_0x4ccb85(0x74)],'description':hasOwn(_0x2a1c14,_0x4ccb85(0xc3))?_0x2a1c14[_0x4ccb85(0xc3)]:_0x56008a['description'],'connectTimeout':hasOwn(_0x2a1c14,_0x4ccb85(0x6f))?_0x2a1c14[_0x4ccb85(0x6f)]:_0x56008a[_0x4ccb85(0x6f)],'readTimeout':hasOwn(_0x2a1c14,_0x4ccb85(0x81))?_0x2a1c14[_0x4ccb85(0x81)]:_0x56008a['readTimeout']};}export function plannedUpdateProjection(_0x2d8e92,_0xc13ffb){const _0x4024cc=a186_0x53fb76;return projectNotificationConfig({'id':_0x2d8e92['id'],'appCode':_0x2d8e92[_0x4024cc(0xc1)],'configCode':_0x2d8e92[_0x4024cc(0xc6)],'configName':_0xc13ffb['configName']??_0x2d8e92[_0x4024cc(0x79)],'channelType':_0xc13ffb['channelType']??_0x2d8e92[_0x4024cc(0x68)],'endpointUrl':hasOwn(_0xc13ffb,_0x4024cc(0xad))?_0xc13ffb[_0x4024cc(0xad)]:_0x2d8e92[_0x4024cc(0xb3)],'channelConfig':hasOwn(_0xc13ffb,_0x4024cc(0xd7))?_0xc13ffb[_0x4024cc(0xd7)]:_0x2d8e92['channelConfigRaw'],'description':hasOwn(_0xc13ffb,_0x4024cc(0xc3))?_0xc13ffb[_0x4024cc(0xc3)]:_0x2d8e92[_0x4024cc(0xc3)],'connectTimeout':hasOwn(_0xc13ffb,'connectTimeout')?_0xc13ffb[_0x4024cc(0x6f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x2d8e92[_0x4024cc(0x6f)],'readTimeout':hasOwn(_0xc13ffb,_0x4024cc(0x81))?_0xc13ffb[_0x4024cc(0x81)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x2d8e92[_0x4024cc(0x81)]});}export function requestedSafeFieldsMatch(_0x58160b,_0x238e22,_0x1f03d2){const _0x1ca954=a186_0x53fb76,_0x56d56f=[],_0x5280e5=[],_0x11bde7=[];for(const _0x570c6c of['configName',_0x1ca954(0x68),_0x1ca954(0xc3)]){if(!hasOwn(_0x1f03d2,_0x570c6c))continue;_0x11bde7[_0x1ca954(0xa9)](_0x570c6c),_0x56d56f['push'](_0x238e22[_0x570c6c]===_0x1f03d2[_0x570c6c]),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x570c6c]!==_0x1f03d2[_0x570c6c]&&_0x238e22[_0x570c6c]===_0x1f03d2[_0x570c6c]);}for(const _0x277b72 of[_0x1ca954(0x6f),_0x1ca954(0x81)]){if(!hasOwn(_0x1f03d2,_0x277b72))continue;const _0x4bd67e=_0x1f03d2[_0x277b72]??(_0x277b72==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x11bde7[_0x1ca954(0xa9)](_0x277b72),_0x56d56f[_0x1ca954(0xa9)](_0x238e22[_0x277b72]===_0x4bd67e),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x277b72]!==_0x4bd67e&&_0x238e22[_0x277b72]===_0x4bd67e);}return hasOwn(_0x1f03d2,'endpointUrl')&&_0x1f03d2['endpointUrl']===null&&(_0x11bde7['push']('endpointUrl:null'),_0x56d56f[_0x1ca954(0xa9)](_0x238e22[_0x1ca954(0xb3)]===null||_0x238e22[_0x1ca954(0xb3)]===''),_0x5280e5[_0x1ca954(0xa9)](_0x58160b[_0x1ca954(0xb3)]!==null&&_0x58160b[_0x1ca954(0xb3)]!==''&&(_0x238e22[_0x1ca954(0xb3)]===null||_0x238e22[_0x1ca954(0xb3)]===''))),{'allMatch':_0x56d56f['every'](Boolean),'provesChange':_0x5280e5['some'](Boolean),'verifiedFields':_0x11bde7};}export function validateNotificationDeleteReadback(_0x4baa00,_0x3f18ba,_0x536378){const _0x22af30=a186_0x53fb76;for(const [_0xa121a5,_0x347a6a]of _0x4baa00['entries']()){if(!Number[_0x22af30(0xd5)](_0x347a6a['id'])||_0x347a6a['id']<=0x0)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+_0x22af30(0x7a));if(_0x347a6a[_0x22af30(0xc1)]!==_0x3f18ba)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x347a6a['channelType']!==_0x536378)throw notificationError(_0x22af30(0xdb),_0x22af30(0x7f)+(_0xa121a5+0x1)+_0x22af30(0xc5));}}export function safeApiFailure(_0x4924ca,_0x5348f0,_0x33c8be){const _0x2ee9f8=a186_0x53fb76;return notificationError(_0x2ee9f8(0xb4)+_0x4924ca+'_'+(_0x5348f0===_0x2ee9f8(0xcb)?_0x2ee9f8(0xc9):_0x5348f0+_0x2ee9f8(0x90)),_0x2ee9f8(0x95)+_0x4924ca+'\x20'+_0x5348f0+'\x20failed.',_0x33c8be);}function a186_0x59c7(){const _0x5502c2=['validation','str','a\x20string\x20or\x20null','channelCode','channelType','yes','boolean','notification_config_json_invalid','\x20characters.','\x22channelType\x22.','num','connectTimeout','includes','bccList','name','environment\x20variable\x20','channelConfigRaw','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','dry-run','configName','\x20has\x20an\x20invalid\x20id.','5634770FTKaQl','Create\x20JSON\x20requires\x20field\x20','trim','<redacted>','Notification\x20config\x20list\x20item\x20','a\x20supported\x20string','readTimeout','Item\x20','utf8','env','notification_config_channel_field_forbidden','1764xlnlNC','create','rabetbase\x20notification\x20config-list\x20--appcode\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','string','Allowed\x20values:\x20','\x22configName\x22.','2433804nXzNJH','messageTemplate','preflight','_unavailable','5893270LSwbvy','from-env','subjectPrefix','\x20must\x20be\x20an\x20object.','Notification\x20config\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','\x22\x20is\x20forbidden.','ccList','a\x20non-empty\x20string','WECOM','notification_config_update_empty','notification_config_field_invalid','FEISHU','686150LRgchk','52784mbNGXX','6yVIEzb','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','update','stdin','notification_config_field_forbidden','setEncoding','length','9482TvvByh','stringify','push','notification_config_field_unknown','Notification\x20JSON\x20field\x20\x22','a\x20JSON\x20object','endpointUrl','Invalid\x20--','notification_config_confirmation_required','path','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20channelConfig\x20field\x20\x22','endpointUrlRaw','notification_config_','keys','file\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','prototype','emailTargets','1531390nlmKnG','48120VEuyjS','6MALldW','notification_config_field_required','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','\x22\x20must\x20be\x20','appCode','a\x20JSON\x20object\x20or\x20null','description','DINGTALK','\x20has\x20an\x20invalid\x20channelType.','configCode','bool','kind','failed','\x20has\x20invalid\x20field\x20\x22','mutation','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Notification\x20JSON\x20from\x20','updateTime','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','apiError','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','replyTo','isSafeInteger','join','channelConfig','notification_config_source_unavailable','fromName','has','notification_config_response_invalid','9lWkIAV','\x20--type\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','parse'];a186_0x59c7=function(){return _0x5502c2;};return a186_0x59c7();}export function notificationLookupCommand(_0x13b976,_0x3c8ad0){const _0x30dc7d=a186_0x53fb76;return _0x30dc7d(0x88)+_0x13b976+_0x30dc7d(0xdd)+_0x3c8ad0+'\x20--format\x20compress';}function validateNotificationDocument(_0x2ff96d,_0x911e37){const _0x28ba68=a186_0x53fb76;for(const _0x47016e of Object[_0x28ba68(0xb5)](_0x2ff96d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x28ba68(0xda)](_0x47016e))throw notificationError(_0x28ba68(0xa4),_0x28ba68(0xab)+_0x47016e+_0x28ba68(0xa1));if(!ALLOWED_INPUT_FIELDS[_0x28ba68(0xda)](_0x47016e))throw notificationError(_0x28ba68(0xaa),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x47016e+'\x22.');}if(_0x911e37===_0x28ba68(0xa2)&&Object[_0x28ba68(0xb5)](_0x2ff96d)[_0x28ba68(0xa6)]===0x0)throw notificationError(_0x28ba68(0x9b),_0x28ba68(0xde));const _0x5d68af={};if(hasOwn(_0x2ff96d,_0x28ba68(0x79)))_0x5d68af[_0x28ba68(0x79)]=validateRequiredString(_0x2ff96d[_0x28ba68(0x79)],_0x28ba68(0x79),0x80);else{if(_0x911e37===_0x28ba68(0x87))throw notificationError(_0x28ba68(0xbd),_0x28ba68(0x7c)+_0x28ba68(0x8c));}if(hasOwn(_0x2ff96d,_0x28ba68(0x68))){if(typeof _0x2ff96d[_0x28ba68(0x68)]!==_0x28ba68(0x8a))throw invalidFieldType('channelType',_0x28ba68(0x80));const _0x9f6e11=_0x2ff96d[_0x28ba68(0x68)][_0x28ba68(0x7d)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x9f6e11))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x28ba68(0x8b)+NOTIFICATION_CHANNEL_TYPES[_0x28ba68(0xd6)](',\x20')+'.');_0x5d68af[_0x28ba68(0x68)]=_0x9f6e11;}else{if(_0x911e37===_0x28ba68(0x87))throw notificationError(_0x28ba68(0xbd),_0x28ba68(0x7c)+_0x28ba68(0x6d));}for(const [_0x280091,_0x3b91e6]of[[_0x28ba68(0xad),0x200],[_0x28ba68(0xc3),0x100]]){if(!hasOwn(_0x2ff96d,_0x280091))continue;const _0x2bceaf=_0x2ff96d[_0x280091];if(_0x2bceaf!==null&&typeof _0x2bceaf!==_0x28ba68(0x8a))throw invalidFieldType(_0x280091,_0x28ba68(0xe2));if(typeof _0x2bceaf==='string'&&_0x2bceaf['length']>_0x3b91e6)throw notificationError(_0x28ba68(0x9c),_0x28ba68(0xab)+_0x280091+'\x22\x20cannot\x20exceed\x20'+_0x3b91e6+_0x28ba68(0x6c));_0x5d68af[_0x280091]=_0x2bceaf;}if(hasOwn(_0x2ff96d,_0x28ba68(0xd7))){const _0x15b497=_0x2ff96d['channelConfig'];if(_0x15b497===null&&_0x911e37===_0x28ba68(0x87))throw invalidFieldType('channelConfig',_0x28ba68(0xac));if(_0x15b497!==null&&!isJsonObject(_0x15b497))throw invalidFieldType(_0x28ba68(0xd7),_0x911e37===_0x28ba68(0xa2)?_0x28ba68(0xc2):_0x28ba68(0xac));_0x15b497!==null&&validateChannelConfigFields(_0x5d68af[_0x28ba68(0x68)],_0x15b497),_0x5d68af[_0x28ba68(0xd7)]=_0x15b497;}for(const _0x12f058 of['connectTimeout',_0x28ba68(0x81)]){if(!hasOwn(_0x2ff96d,_0x12f058))continue;const _0x341d22=_0x2ff96d[_0x12f058];if(_0x341d22!==null&&(!Number['isSafeInteger'](_0x341d22)||_0x341d22<0x0))throw notificationError('notification_config_field_invalid',_0x28ba68(0xab)+_0x12f058+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x5d68af[_0x12f058]=_0x341d22;}return _0x5d68af;}function validateRequiredString(_0x5e0319,_0x33b16a,_0x2a7376){const _0x350f14=a186_0x53fb76;if(typeof _0x5e0319!=='string')throw invalidFieldType(_0x33b16a,_0x350f14(0x99));const _0x419e3c=_0x5e0319[_0x350f14(0x7d)]();if(!_0x419e3c)throw notificationError('notification_config_field_invalid',_0x350f14(0xab)+_0x33b16a+_0x350f14(0x96));if(_0x419e3c['length']>_0x2a7376)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x33b16a+'\x22\x20cannot\x20exceed\x20'+_0x2a7376+_0x350f14(0x6c));return _0x419e3c;}function validateChannelConfigFields(_0x4bc99,_0x48ffc1){const _0x599cea=a186_0x53fb76;if(hasOwn(_0x48ffc1,_0x599cea(0x8e)))throw forbiddenChannelConfigField(_0x599cea(0x8e));if(_0x4bc99==='EMAIL')for(const _0xe90c6e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x48ffc1,_0xe90c6e))throw forbiddenChannelConfigField(_0xe90c6e);}}function forbiddenChannelConfigField(_0x4d15df){const _0x4b45d3=a186_0x53fb76;return notificationError(_0x4b45d3(0x85),_0x4b45d3(0xb2)+_0x4d15df+_0x4b45d3(0x97));}function invalidFieldType(_0x1ea3e5,_0x5eb1b0){const _0x3f93f2=a186_0x53fb76;return notificationError(_0x3f93f2(0x9c),'Notification\x20JSON\x20field\x20\x22'+_0x1ea3e5+_0x3f93f2(0xc0)+_0x5eb1b0+'.');}function serializeChannelConfig(_0xd77b93){const _0x4e7e00=a186_0x53fb76;return _0xd77b93===null||_0xd77b93===undefined?null:JSON[_0x4e7e00(0xa8)](_0xd77b93);}function redactSensitive(_0x442924){const _0x49a8db=a186_0x53fb76;return _0x442924===null||_0x442924===undefined||_0x442924===''?null:_0x49a8db(0x7e);}function requireResponseString(_0x30f9c2,_0x139c5e,_0x302c1a){const _0x1e5a8f=a186_0x53fb76;if(typeof _0x30f9c2!==_0x1e5a8f(0x8a)||_0x30f9c2[_0x1e5a8f(0x7d)]()==='')throw CliErrors[_0x1e5a8f(0xd2)]('Invalid\x20notification\x20config\x20response.',_0x1e5a8f(0x82)+(_0x302c1a+0x1)+_0x1e5a8f(0xbe)+_0x139c5e+'\x22.');return _0x30f9c2[_0x1e5a8f(0x7d)]();}function requireExactString(_0x2a8ebf,_0x594116,_0x5cd783){const _0x1afefe=a186_0x53fb76;if(typeof _0x2a8ebf!==_0x1afefe(0x8a)||_0x2a8ebf[_0x1afefe(0x7d)]()==='')throw notificationError(_0x1afefe(0xdb),_0x1afefe(0x95)+_0x5cd783+_0x1afefe(0xbe)+_0x594116+'\x22.');return _0x2a8ebf[_0x1afefe(0x7d)]();}function responseNullableString(_0x554eb7,_0xd7459,_0x4608be){const _0x19b8bf=a186_0x53fb76;if(_0x554eb7===undefined||_0x554eb7===null)return null;if(typeof _0x554eb7!==_0x19b8bf(0x8a))throw notificationError(_0x19b8bf(0xdb),_0x19b8bf(0x95)+_0x4608be+_0x19b8bf(0xca)+_0xd7459+'\x22.');return _0x554eb7;}function responseNullableTimeout(_0x23350a,_0x9fec1f,_0x2a313e){const _0x430a16=a186_0x53fb76;if(_0x23350a===undefined||_0x23350a===null)return null;if(!Number[_0x430a16(0xd5)](_0x23350a)||_0x23350a<0x0)throw notificationError(_0x430a16(0xdb),_0x430a16(0x95)+_0x2a313e+'\x20has\x20invalid\x20field\x20\x22'+_0x9fec1f+'\x22.');return _0x23350a;}function normalizeNullableString(_0x409047){const _0x1ddf07=a186_0x53fb76;return typeof _0x409047===_0x1ddf07(0x8a)?_0x409047:null;}function isJsonObject(_0x284e30){return _0x284e30!==null&&typeof _0x284e30==='object'&&!Array['isArray'](_0x284e30);}function hasOwn(_0x1dcb1b,_0x3eafda){const _0x1dcf88=a186_0x53fb76;return Object[_0x1dcf88(0xb8)]['hasOwnProperty']['call'](_0x1dcb1b,_0x3eafda);}async function readStdin(){const _0x91ae62=a186_0x53fb76;let _0x1285ea='';process[_0x91ae62(0xa3)][_0x91ae62(0xa5)](_0x91ae62(0x83));for await(const _0x4f53e6 of process[_0x91ae62(0xa3)])_0x1285ea+=_0x4f53e6;return _0x1285ea;}
|
|
1
|
+
const a190_0x2dc258=a190_0x5c12;(function(_0xa41511,_0x1caadb){const _0x43083e=a190_0x5c12,_0x18b47a=_0xa41511();while(!![]){try{const _0x3ffdb0=parseInt(_0x43083e(0x187))/0x1+parseInt(_0x43083e(0x14d))/0x2+parseInt(_0x43083e(0x191))/0x3+-parseInt(_0x43083e(0x12f))/0x4+parseInt(_0x43083e(0x1a5))/0x5*(parseInt(_0x43083e(0x15a))/0x6)+parseInt(_0x43083e(0x19c))/0x7+-parseInt(_0x43083e(0x150))/0x8;if(_0x3ffdb0===_0x1caadb)break;else _0x18b47a['push'](_0x18b47a['shift']());}catch(_0x261163){_0x18b47a['push'](_0x18b47a['shift']());}}}(a190_0x3ec6,0x2de49));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a190_0x2dc258(0x1a6),a190_0x2dc258(0x149),a190_0x2dc258(0x164),'WECOM',a190_0x2dc258(0x18a)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a190_0x2dc258(0x1a4),a190_0x2dc258(0x15f),a190_0x2dc258(0x195),a190_0x2dc258(0x133),a190_0x2dc258(0x188),a190_0x2dc258(0x18c),a190_0x2dc258(0x18f)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a190_0x2dc258(0x190),a190_0x2dc258(0x12a),a190_0x2dc258(0x192)]),EMAIL_RECIPIENT_FIELDS=new Set([a190_0x2dc258(0x155),a190_0x2dc258(0x134),a190_0x2dc258(0x16a),a190_0x2dc258(0x141),a190_0x2dc258(0x143),a190_0x2dc258(0x13e),a190_0x2dc258(0x12d),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':a190_0x2dc258(0x18e)},{'name':a190_0x2dc258(0x19b),'type':a190_0x2dc258(0x176),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a190_0x2dc258(0x140),'type':a190_0x2dc258(0x197),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a190_0x2dc258(0x15c)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x4678b7,_0xaa9785,_0x39e5c2){return new CliError(_0x4678b7,0x1,_0xaa9785,_0x39e5c2);}export function readNotificationId(_0x371a53){const _0x25a0bb=a190_0x2dc258,_0x291adb=_0x371a53[_0x25a0bb(0x13d)]('id');if(!Number[_0x25a0bb(0x193)](_0x291adb)||_0x291adb<=0x0)throw notificationError(_0x25a0bb(0x174),_0x25a0bb(0x16d));return _0x291adb;}export function requireNotificationExplicitYes(_0x467e64){const _0x4610db=a190_0x2dc258;if(_0x467e64[_0x4610db(0x173)](_0x4610db(0x171))||_0x467e64[_0x4610db(0x173)](_0x4610db(0x156)))return;throw notificationError(_0x4610db(0x138),'This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x3c5a8e,_0x1de191=a190_0x2dc258(0x161),_0x29d7ac=a190_0x2dc258(0x1a6)){const _0x3fdb05=a190_0x2dc258,_0x483dfe=_0x3c5a8e[_0x3fdb05(0x179)](_0x1de191)['trim']()||_0x29d7ac;if(!NOTIFICATION_CHANNEL_TYPES[_0x3fdb05(0x127)](_0x483dfe))throw CliErrors['validation'](_0x3fdb05(0x166)+_0x1de191+':\x20'+_0x483dfe,_0x3fdb05(0x158)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x483dfe;}export function assertSingleNotificationSource(_0x21182e){const _0x3253be=a190_0x2dc258,_0x4384cb=[],_0x572059=_0x21182e[_0x3253be(0x179)]('file')['trim']();if(_0x572059)_0x4384cb[_0x3253be(0x198)]({'kind':'file','path':_0x572059});if(_0x21182e[_0x3253be(0x173)](_0x3253be(0x19b)))_0x4384cb[_0x3253be(0x198)]({'kind':_0x3253be(0x19b)});const _0x443e1f=_0x21182e[_0x3253be(0x179)](_0x3253be(0x140))['trim']();if(_0x443e1f)_0x4384cb[_0x3253be(0x198)]({'kind':_0x3253be(0x12e),'name':_0x443e1f});if(_0x4384cb[_0x3253be(0x139)]===0x0)throw CliErrors[_0x3253be(0x1a3)](_0x3253be(0x181),_0x3253be(0x169));if(_0x4384cb[_0x3253be(0x139)]>0x1)throw CliErrors[_0x3253be(0x1a3)](_0x3253be(0x163),_0x3253be(0x169));return _0x4384cb[0x0];}export async function readNotificationDocument(_0x36d430,_0x54c0b5){const _0x884d6c=a190_0x2dc258,_0x243357=assertSingleNotificationSource(_0x36d430),_0x548ff2=_0x243357['kind']===_0x884d6c(0x16b)?'file\x20'+_0x243357[_0x884d6c(0x12c)]:_0x243357[_0x884d6c(0x17c)]===_0x884d6c(0x12e)?_0x884d6c(0x160)+_0x243357[_0x884d6c(0x14b)]:_0x884d6c(0x19b);let _0x2db666;try{if(_0x243357[_0x884d6c(0x17c)]===_0x884d6c(0x16b))_0x2db666=await readFile(_0x243357['path'],_0x884d6c(0x183));else{if(_0x243357['kind']===_0x884d6c(0x12e)){if(!(_0x243357[_0x884d6c(0x14b)]in process.env))throw notificationError(_0x884d6c(0x19e),_0x884d6c(0x13a)+_0x243357['name']);_0x2db666=process.env[_0x243357.name]??'';}else _0x2db666=await readStdin();}}catch(_0x192cad){if(_0x192cad instanceof CliError)throw _0x192cad;throw notificationError('notification_config_source_unavailable',_0x884d6c(0x1a1)+_0x548ff2+'.');}let _0x25aab9;try{_0x25aab9=JSON['parse'](_0x2db666);}catch{throw notificationError(_0x884d6c(0x194),_0x884d6c(0x144)+_0x548ff2+_0x884d6c(0x147),_0x884d6c(0x168));}if(!isJsonObject(_0x25aab9))throw notificationError(_0x884d6c(0x194),_0x884d6c(0x144)+_0x548ff2+_0x884d6c(0x153));return validateNotificationDocument(_0x25aab9,_0x54c0b5);}export function projectNotificationListConfig(_0x1d7103,_0xa8f5c3){const _0x17d5b3=a190_0x2dc258;return{'id':typeof _0x1d7103['id']===_0x17d5b3(0x136)?_0x1d7103['id']:null,'configCode':requireResponseString(_0x1d7103[_0x17d5b3(0x12a)],'configCode',_0xa8f5c3),'configName':requireResponseString(_0x1d7103[_0x17d5b3(0x1a4)],_0x17d5b3(0x1a4),_0xa8f5c3),'channelType':requireResponseString(_0x1d7103[_0x17d5b3(0x15f)],_0x17d5b3(0x15f),_0xa8f5c3),'description':normalizeNullableString(_0x1d7103[_0x17d5b3(0x188)]),'createTime':normalizeNullableString(_0x1d7103['createTime']),'updateTime':normalizeNullableString(_0x1d7103[_0x17d5b3(0x137)])};}export function normalizeExactNotificationConfig(_0x2f3de7,_0x4da75f,_0x231b79){const _0x467d59=a190_0x2dc258;if(!Number[_0x467d59(0x193)](_0x2f3de7['id'])||_0x2f3de7['id']!==_0x4da75f)throw notificationError(_0x467d59(0x14a),_0x467d59(0x19f)+_0x4da75f+'.');if(_0x2f3de7[_0x467d59(0x190)]!==_0x231b79)throw notificationError(_0x467d59(0x14a),_0x467d59(0x131)+_0x4da75f+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x289f44=requireExactString(_0x2f3de7[_0x467d59(0x1a4)],_0x467d59(0x1a4),_0x4da75f),_0x37670c=requireExactString(_0x2f3de7[_0x467d59(0x12a)],'configCode',_0x4da75f),_0x3c29bd=requireExactString(_0x2f3de7[_0x467d59(0x15f)],'channelType',_0x4da75f);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3c29bd))throw notificationError(_0x467d59(0x14a),_0x467d59(0x131)+_0x4da75f+_0x467d59(0x151));const _0x2143a7=responseNullableString(_0x2f3de7['endpointUrl'],_0x467d59(0x195),_0x4da75f),_0x524a27=responseNullableString(_0x2f3de7['channelConfig'],'channelConfig',_0x4da75f),_0xefdf2e=responseNullableString(_0x2f3de7[_0x467d59(0x188)],'description',_0x4da75f),_0x5871d3=responseNullableTimeout(_0x2f3de7[_0x467d59(0x18c)],_0x467d59(0x18c),_0x4da75f),_0x20c146=responseNullableTimeout(_0x2f3de7[_0x467d59(0x18f)],_0x467d59(0x18f),_0x4da75f);return{'id':_0x4da75f,'appCode':_0x231b79,'configCode':_0x37670c,'configName':_0x289f44,'channelType':_0x3c29bd,'endpointUrl':redactSensitive(_0x2143a7),'channelConfig':redactSensitive(_0x524a27),'description':_0xefdf2e,'connectTimeout':_0x5871d3,'readTimeout':_0x20c146,'endpointUrlRaw':_0x2143a7,'channelConfigRaw':_0x524a27};}export async function requireExactNotificationConfig(_0x5433c2,_0x1d26ef,_0x13d878){const _0x5ae96f=a190_0x2dc258;let _0x1985cb;try{_0x1985cb=await getNotificationChannelConfig(_0x1d26ef,_0x5433c2);}catch{throw safeApiFailure(_0x13d878,_0x5ae96f(0x165),_0x5ae96f(0x199)+_0x5433c2+_0x5ae96f(0x19d));}return normalizeExactNotificationConfig(_0x1985cb,_0x1d26ef,_0x5433c2);}export function projectNotificationConfig(_0x52787c){const _0x3ad761=a190_0x2dc258;return{'id':_0x52787c['id']??null,'appCode':_0x52787c[_0x3ad761(0x190)],'configCode':_0x52787c['configCode']??null,'configName':_0x52787c['configName'],'channelType':_0x52787c['channelType'],'endpointUrl':redactSensitive(_0x52787c[_0x3ad761(0x195)]),'channelConfig':redactSensitive(_0x52787c[_0x3ad761(0x133)]),'description':_0x52787c['description']??null,'connectTimeout':_0x52787c[_0x3ad761(0x18c)]??null,'readTimeout':_0x52787c[_0x3ad761(0x18f)]??null};}export function notificationSelector(_0x4c5bae){const _0x379dea=a190_0x2dc258;return{'appCode':_0x4c5bae[_0x379dea(0x190)],'id':_0x4c5bae['id'],'configCode':_0x4c5bae[_0x379dea(0x12a)],'configName':_0x4c5bae['configName'],'channelType':_0x4c5bae[_0x379dea(0x15f)]};}export function createMutationInput(_0x3f5f73,_0x5d4dfe){const _0x4458f2=a190_0x2dc258;return{'appCode':_0x3f5f73,'configName':_0x5d4dfe['configName'],'channelType':_0x5d4dfe[_0x4458f2(0x15f)],...hasOwn(_0x5d4dfe,_0x4458f2(0x195))?{'endpointUrl':_0x5d4dfe[_0x4458f2(0x195)]}:{},...hasOwn(_0x5d4dfe,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x5d4dfe[_0x4458f2(0x133)])}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x188))?{'description':_0x5d4dfe[_0x4458f2(0x188)]}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x18c))?{'connectTimeout':_0x5d4dfe[_0x4458f2(0x18c)]}:{},...hasOwn(_0x5d4dfe,_0x4458f2(0x18f))?{'readTimeout':_0x5d4dfe['readTimeout']}:{}};}export function mergeUpdateInput(_0x45cbed,_0x22a696){const _0x295325=a190_0x2dc258;return{'id':_0x45cbed['id'],'appCode':_0x45cbed[_0x295325(0x190)],'configName':_0x22a696['configName']??_0x45cbed[_0x295325(0x1a4)],'channelType':_0x22a696[_0x295325(0x15f)]??_0x45cbed['channelType'],'endpointUrl':hasOwn(_0x22a696,'endpointUrl')?_0x22a696[_0x295325(0x195)]:_0x45cbed['endpointUrlRaw'],'channelConfig':hasOwn(_0x22a696,'channelConfig')?serializeChannelConfig(_0x22a696[_0x295325(0x133)]):_0x45cbed[_0x295325(0x167)],'description':hasOwn(_0x22a696,'description')?_0x22a696[_0x295325(0x188)]:_0x45cbed[_0x295325(0x188)],'connectTimeout':hasOwn(_0x22a696,_0x295325(0x18c))?_0x22a696[_0x295325(0x18c)]:_0x45cbed[_0x295325(0x18c)],'readTimeout':hasOwn(_0x22a696,_0x295325(0x18f))?_0x22a696[_0x295325(0x18f)]:_0x45cbed[_0x295325(0x18f)]};}export function plannedUpdateProjection(_0x4df693,_0x22b659){const _0x1c2191=a190_0x2dc258;return projectNotificationConfig({'id':_0x4df693['id'],'appCode':_0x4df693[_0x1c2191(0x190)],'configCode':_0x4df693[_0x1c2191(0x12a)],'configName':_0x22b659['configName']??_0x4df693['configName'],'channelType':_0x22b659['channelType']??_0x4df693[_0x1c2191(0x15f)],'endpointUrl':hasOwn(_0x22b659,_0x1c2191(0x195))?_0x22b659[_0x1c2191(0x195)]:_0x4df693['endpointUrlRaw'],'channelConfig':hasOwn(_0x22b659,_0x1c2191(0x133))?_0x22b659['channelConfig']:_0x4df693[_0x1c2191(0x167)],'description':hasOwn(_0x22b659,_0x1c2191(0x188))?_0x22b659[_0x1c2191(0x188)]:_0x4df693['description'],'connectTimeout':hasOwn(_0x22b659,_0x1c2191(0x18c))?_0x22b659['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4df693[_0x1c2191(0x18c)],'readTimeout':hasOwn(_0x22b659,_0x1c2191(0x18f))?_0x22b659[_0x1c2191(0x18f)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4df693[_0x1c2191(0x18f)]});}export function requestedSafeFieldsMatch(_0x46f502,_0x31f68c,_0x4368b5){const _0x23c7ea=a190_0x2dc258,_0x12d5c8=[],_0x4b511b=[],_0x5d366d=[];for(const _0x102223 of[_0x23c7ea(0x1a4),_0x23c7ea(0x15f),_0x23c7ea(0x188)]){if(!hasOwn(_0x4368b5,_0x102223))continue;_0x5d366d['push'](_0x102223),_0x12d5c8['push'](_0x31f68c[_0x102223]===_0x4368b5[_0x102223]),_0x4b511b[_0x23c7ea(0x198)](_0x46f502[_0x102223]!==_0x4368b5[_0x102223]&&_0x31f68c[_0x102223]===_0x4368b5[_0x102223]);}for(const _0x266f05 of[_0x23c7ea(0x18c),_0x23c7ea(0x18f)]){if(!hasOwn(_0x4368b5,_0x266f05))continue;const _0x43804a=_0x4368b5[_0x266f05]??(_0x266f05===_0x23c7ea(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5d366d['push'](_0x266f05),_0x12d5c8['push'](_0x31f68c[_0x266f05]===_0x43804a),_0x4b511b[_0x23c7ea(0x198)](_0x46f502[_0x266f05]!==_0x43804a&&_0x31f68c[_0x266f05]===_0x43804a);}return hasOwn(_0x4368b5,_0x23c7ea(0x195))&&_0x4368b5[_0x23c7ea(0x195)]===null&&(_0x5d366d[_0x23c7ea(0x198)](_0x23c7ea(0x13c)),_0x12d5c8[_0x23c7ea(0x198)](_0x31f68c[_0x23c7ea(0x17b)]===null||_0x31f68c[_0x23c7ea(0x17b)]===''),_0x4b511b[_0x23c7ea(0x198)](_0x46f502['endpointUrlRaw']!==null&&_0x46f502[_0x23c7ea(0x17b)]!==''&&(_0x31f68c[_0x23c7ea(0x17b)]===null||_0x31f68c[_0x23c7ea(0x17b)]===''))),{'allMatch':_0x12d5c8['every'](Boolean),'provesChange':_0x4b511b[_0x23c7ea(0x186)](Boolean),'verifiedFields':_0x5d366d};}export function validateNotificationDeleteReadback(_0x1a320f,_0x44d0d0,_0x4a2f21){const _0x1ed7a9=a190_0x2dc258;for(const [_0xc101e1,_0x476c85]of _0x1a320f[_0x1ed7a9(0x19a)]()){if(!Number['isSafeInteger'](_0x476c85['id'])||_0x476c85['id']<=0x0)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x476c85[_0x1ed7a9(0x190)]!==_0x44d0d0)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+_0x1ed7a9(0x17f));if(_0x476c85[_0x1ed7a9(0x15f)]!==_0x4a2f21)throw notificationError(_0x1ed7a9(0x14a),_0x1ed7a9(0x142)+(_0xc101e1+0x1)+_0x1ed7a9(0x16e));}}export function safeApiFailure(_0x5115b7,_0x2b46e5,_0x11b3e4){const _0x460d22=a190_0x2dc258;return notificationError('notification_config_'+_0x5115b7+'_'+(_0x2b46e5===_0x460d22(0x17a)?'failed':_0x2b46e5+_0x460d22(0x185)),'Notification\x20config\x20'+_0x5115b7+'\x20'+_0x2b46e5+_0x460d22(0x146),_0x11b3e4);}export function notificationLookupCommand(_0x35d149,_0x2536da){const _0xcc8256=a190_0x2dc258;return _0xcc8256(0x13f)+_0x35d149+_0xcc8256(0x16f)+_0x2536da+_0xcc8256(0x172);}function validateNotificationDocument(_0x839ad1,_0x9e87d2){const _0x5b12c5=a190_0x2dc258;for(const _0x5af212 of Object[_0x5b12c5(0x12b)](_0x839ad1)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5b12c5(0x15b)](_0x5af212))throw notificationError(_0x5b12c5(0x178),'Notification\x20JSON\x20field\x20\x22'+_0x5af212+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x5b12c5(0x15b)](_0x5af212))throw notificationError(_0x5b12c5(0x15d),_0x5b12c5(0x16c)+_0x5af212+'\x22.');}if(_0x9e87d2===_0x5b12c5(0x1a0)&&Object[_0x5b12c5(0x12b)](_0x839ad1)[_0x5b12c5(0x139)]===0x0)throw notificationError(_0x5b12c5(0x128),_0x5b12c5(0x18d));const _0x5b16f0={};if(hasOwn(_0x839ad1,_0x5b12c5(0x1a4)))_0x5b16f0[_0x5b12c5(0x1a4)]=validateRequiredString(_0x839ad1['configName'],_0x5b12c5(0x1a4),0x80);else{if(_0x9e87d2==='create')throw notificationError(_0x5b12c5(0x17d),'Create\x20JSON\x20requires\x20field\x20'+_0x5b12c5(0x14e));}if(hasOwn(_0x839ad1,_0x5b12c5(0x15f))){if(typeof _0x839ad1[_0x5b12c5(0x15f)]!==_0x5b12c5(0x197))throw invalidFieldType(_0x5b12c5(0x15f),_0x5b12c5(0x180));const _0x18afdf=_0x839ad1[_0x5b12c5(0x15f)][_0x5b12c5(0x13b)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x18afdf))throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x162),_0x5b12c5(0x158)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x5b16f0['channelType']=_0x18afdf;}else{if(_0x9e87d2===_0x5b12c5(0x1a2))throw notificationError('notification_config_field_required','Create\x20JSON\x20requires\x20field\x20'+_0x5b12c5(0x14c));}for(const [_0x3b104e,_0x469c57]of[[_0x5b12c5(0x195),0x200],[_0x5b12c5(0x188),0x100]]){if(!hasOwn(_0x839ad1,_0x3b104e))continue;const _0x206bc0=_0x839ad1[_0x3b104e];if(_0x206bc0!==null&&typeof _0x206bc0!==_0x5b12c5(0x197))throw invalidFieldType(_0x3b104e,_0x5b12c5(0x14f));if(typeof _0x206bc0===_0x5b12c5(0x197)&&_0x206bc0['length']>_0x469c57)throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x184)+_0x3b104e+_0x5b12c5(0x132)+_0x469c57+_0x5b12c5(0x175));_0x5b16f0[_0x3b104e]=_0x206bc0;}if(hasOwn(_0x839ad1,_0x5b12c5(0x133))){const _0x2921a0=_0x839ad1[_0x5b12c5(0x133)];if(_0x2921a0===null&&_0x9e87d2===_0x5b12c5(0x1a2))throw invalidFieldType(_0x5b12c5(0x133),_0x5b12c5(0x135));if(_0x2921a0!==null&&!isJsonObject(_0x2921a0))throw invalidFieldType(_0x5b12c5(0x133),_0x9e87d2===_0x5b12c5(0x1a0)?'a\x20JSON\x20object\x20or\x20null':'a\x20JSON\x20object');_0x2921a0!==null&&validateChannelConfigFields(_0x5b16f0[_0x5b12c5(0x15f)],_0x2921a0),_0x5b16f0[_0x5b12c5(0x133)]=_0x2921a0;}for(const _0x3a756b of[_0x5b12c5(0x18c),_0x5b12c5(0x18f)]){if(!hasOwn(_0x839ad1,_0x3a756b))continue;const _0x103706=_0x839ad1[_0x3a756b];if(_0x103706!==null&&(!Number['isSafeInteger'](_0x103706)||_0x103706<0x0))throw notificationError(_0x5b12c5(0x18b),_0x5b12c5(0x184)+_0x3a756b+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x5b16f0[_0x3a756b]=_0x103706;}return _0x5b16f0;}function validateRequiredString(_0x31d798,_0x2ff72e,_0x2b2c34){const _0x295c77=a190_0x2dc258;if(typeof _0x31d798!==_0x295c77(0x197))throw invalidFieldType(_0x2ff72e,_0x295c77(0x189));const _0x369e0f=_0x31d798[_0x295c77(0x13b)]();if(!_0x369e0f)throw notificationError(_0x295c77(0x18b),'Notification\x20JSON\x20field\x20\x22'+_0x2ff72e+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x369e0f[_0x295c77(0x139)]>_0x2b2c34)throw notificationError('notification_config_field_invalid',_0x295c77(0x184)+_0x2ff72e+_0x295c77(0x132)+_0x2b2c34+_0x295c77(0x175));return _0x369e0f;}function validateChannelConfigFields(_0x3e3808,_0xf6194a){const _0x4b4e49=a190_0x2dc258;if(hasOwn(_0xf6194a,_0x4b4e49(0x148)))throw forbiddenChannelConfigField(_0x4b4e49(0x148));if(_0x3e3808==='EMAIL')for(const _0x4078d7 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xf6194a,_0x4078d7))throw forbiddenChannelConfigField(_0x4078d7);}}function a190_0x5c12(_0x4ad55d,_0x3a5bc2){_0x4ad55d=_0x4ad55d-0x127;const _0x3ec6b6=a190_0x3ec6();let _0x5c1213=_0x3ec6b6[_0x4ad55d];return _0x5c1213;}function forbiddenChannelConfigField(_0x9af693){const _0x3cf83b=a190_0x2dc258;return notificationError(_0x3cf83b(0x15e),_0x3cf83b(0x170)+_0x9af693+_0x3cf83b(0x159));}function a190_0x3ec6(){const _0x2883f8=['_unavailable','some','212883yYIgsd','description','a\x20non-empty\x20string','WEBHOOK','notification_config_field_invalid','connectTimeout','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','readTimeout','appCode','1119309FeiRvD','channelCode','isSafeInteger','notification_config_json_invalid','endpointUrl','<redacted>','string','push','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','entries','stdin','2204104IAnbrN','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','notification_config_source_unavailable','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','update','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','create','validation','configName','445ExyGxX','EMAIL','includes','notification_config_update_empty','\x22\x20must\x20be\x20','configCode','keys','path','fromName','env','499828LQDhyX','object','Notification\x20config\x20','\x22\x20cannot\x20exceed\x20','channelConfig','recipients','a\x20JSON\x20object','number','updateTime','notification_config_confirmation_required','length','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','trim','endpointUrl:null','num','subjectPrefix','rabetbase\x20notification\x20config-list\x20--appcode\x20','from-env','bccList','Notification\x20config\x20list\x20item\x20','replyTo','Notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','\x20failed.','\x20is\x20invalid.','messageTemplate','FEISHU','notification_config_response_invalid','name','\x22channelType\x22.','506586TIQFpz','\x22configName\x22.','a\x20string\x20or\x20null','8998880kBMcaf','\x20has\x20an\x20unsupported\x20channelType.','hasOwnProperty','\x20must\x20be\x20an\x20object.','call','emailTargets','yes','apiError','Allowed\x20values:\x20','\x22\x20is\x20forbidden.','19122OJpwmA','has','Application-level\x20notification\x20config\x20ID','notification_config_field_unknown','notification_config_channel_field_forbidden','channelType','environment\x20variable\x20','type','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Notification\x20JSON\x20source\x20is\x20ambiguous.','DINGTALK','preflight','Invalid\x20--','channelConfigRaw','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','ccList','file','Unknown\x20notification\x20JSON\x20field\x20\x22','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20channelType.','\x20--type\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','dry-run','\x20--format\x20compress','bool','notification_config_id_invalid','\x20characters.','boolean','setEncoding','notification_config_field_forbidden','str','mutation','endpointUrlRaw','kind','notification_config_field_required','Invalid\x20notification\x20config\x20response.','\x20has\x20an\x20invalid\x20appCode.','a\x20supported\x20string','Missing\x20notification\x20JSON\x20source.','isArray','utf8','Notification\x20JSON\x20field\x20\x22'];a190_0x3ec6=function(){return _0x2883f8;};return a190_0x3ec6();}function invalidFieldType(_0x186b37,_0x7484da){const _0x5a08ec=a190_0x2dc258;return notificationError(_0x5a08ec(0x18b),_0x5a08ec(0x184)+_0x186b37+_0x5a08ec(0x129)+_0x7484da+'.');}function serializeChannelConfig(_0x4a0f7c){return _0x4a0f7c===null||_0x4a0f7c===undefined?null:JSON['stringify'](_0x4a0f7c);}function redactSensitive(_0xebf278){const _0x5a4c65=a190_0x2dc258;return _0xebf278===null||_0xebf278===undefined||_0xebf278===''?null:_0x5a4c65(0x196);}function requireResponseString(_0x16ff20,_0x1e7607,_0x1d5bdf){const _0xe87f34=a190_0x2dc258;if(typeof _0x16ff20!==_0xe87f34(0x197)||_0x16ff20[_0xe87f34(0x13b)]()==='')throw CliErrors[_0xe87f34(0x157)](_0xe87f34(0x17e),'Item\x20'+(_0x1d5bdf+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x1e7607+'\x22.');return _0x16ff20[_0xe87f34(0x13b)]();}function requireExactString(_0x3fabfb,_0x59b274,_0x510080){const _0x38ff8a=a190_0x2dc258;if(typeof _0x3fabfb!==_0x38ff8a(0x197)||_0x3fabfb['trim']()==='')throw notificationError(_0x38ff8a(0x14a),_0x38ff8a(0x131)+_0x510080+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x59b274+'\x22.');return _0x3fabfb[_0x38ff8a(0x13b)]();}function responseNullableString(_0xbb3794,_0x47a695,_0x1040c5){const _0x553884=a190_0x2dc258;if(_0xbb3794===undefined||_0xbb3794===null)return null;if(typeof _0xbb3794!==_0x553884(0x197))throw notificationError(_0x553884(0x14a),'Notification\x20config\x20'+_0x1040c5+_0x553884(0x145)+_0x47a695+'\x22.');return _0xbb3794;}function responseNullableTimeout(_0x3c8fa,_0x3597f7,_0x310a49){const _0x4eeed2=a190_0x2dc258;if(_0x3c8fa===undefined||_0x3c8fa===null)return null;if(!Number[_0x4eeed2(0x193)](_0x3c8fa)||_0x3c8fa<0x0)throw notificationError(_0x4eeed2(0x14a),_0x4eeed2(0x131)+_0x310a49+_0x4eeed2(0x145)+_0x3597f7+'\x22.');return _0x3c8fa;}function normalizeNullableString(_0x4d5284){const _0x22569b=a190_0x2dc258;return typeof _0x4d5284===_0x22569b(0x197)?_0x4d5284:null;}function isJsonObject(_0x28fc55){const _0x1dc917=a190_0x2dc258;return _0x28fc55!==null&&typeof _0x28fc55===_0x1dc917(0x130)&&!Array[_0x1dc917(0x182)](_0x28fc55);}function hasOwn(_0x619976,_0x1e1dcc){const _0x47b454=a190_0x2dc258;return Object['prototype'][_0x47b454(0x152)][_0x47b454(0x154)](_0x619976,_0x1e1dcc);}async function readStdin(){const _0x27cc38=a190_0x2dc258;let _0x2c2185='';process[_0x27cc38(0x19b)][_0x27cc38(0x177)]('utf8');for await(const _0x5e2a61 of process[_0x27cc38(0x19b)])_0x2c2185+=_0x5e2a61;return _0x2c2185;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x57bb85=a191_0x3f1a;(function(_0x51d456,_0x1db632){const _0xc4618d=a191_0x3f1a,_0x278f12=_0x51d456();while(!![]){try{const _0xdce9d5=parseInt(_0xc4618d(0x13a))/0x1+-parseInt(_0xc4618d(0x14a))/0x2+parseInt(_0xc4618d(0x12d))/0x3+parseInt(_0xc4618d(0x139))/0x4+-parseInt(_0xc4618d(0x11c))/0x5*(-parseInt(_0xc4618d(0x12b))/0x6)+parseInt(_0xc4618d(0x148))/0x7*(parseInt(_0xc4618d(0x135))/0x8)+-parseInt(_0xc4618d(0x126))/0x9;if(_0xdce9d5===_0x1db632)break;else _0x278f12['push'](_0x278f12['shift']());}catch(_0x59ab5c){_0x278f12['push'](_0x278f12['shift']());}}}(a191_0x1fb0,0xb4fa0));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a191_0x3f1a(_0x214859,_0x52315a){_0x214859=_0x214859-0x118;const _0x1fb079=a191_0x1fb0();let _0x3f1a56=_0x1fb079[_0x214859];return _0x3f1a56;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a191_0x57bb85(0x14e),a191_0x57bb85(0x12c),a191_0x57bb85(0x123)],SCENE_TO_LEGACY_TYPE={'invoice':a191_0x57bb85(0x149),'general':a191_0x57bb85(0x127),'form':'Table','idCard':a191_0x57bb85(0x14c)},SCENE_FLAG={'name':a191_0x57bb85(0x13b),'type':a191_0x57bb85(0x133),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a191_0x57bb85(0x129)},IMAGE_FILE_FLAG={'name':a191_0x57bb85(0x120),'type':a191_0x57bb85(0x133),'description':a191_0x57bb85(0x14f)},IMAGE_URL_FLAG={'name':a191_0x57bb85(0x125),'type':a191_0x57bb85(0x133),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x3fbf01){const _0x372aa9=a191_0x57bb85,_0xf687f3=_0x3fbf01['trim']()[_0x372aa9(0x11a)]();if(_0xf687f3===_0x372aa9(0x145))return'idCard';if(_0xf687f3===_0x372aa9(0x138)||_0xf687f3===_0x372aa9(0x14e)||_0xf687f3===_0x372aa9(0x12c))return _0xf687f3;throw CliErrors['validation'](_0x372aa9(0x147)+_0x3fbf01+_0x372aa9(0x132)+SUPPORTED_SCENES[_0x372aa9(0x121)](',\x20'));}function selectedInputs(_0x9c7d6d){const _0xdd1fc7=a191_0x57bb85,_0x3d8f85=_0x9c7d6d[_0xdd1fc7(0x140)](_0xdd1fc7(0x120))[_0xdd1fc7(0x11f)](),_0x400b38=_0x9c7d6d[_0xdd1fc7(0x140)](_0xdd1fc7(0x125))[_0xdd1fc7(0x11f)]();return{'imageFile':_0x3d8f85,'imageUrl':_0x400b38,'count':[_0x3d8f85,_0x400b38][_0xdd1fc7(0x143)](Boolean)[_0xdd1fc7(0x118)]};}function validateInputSelection(_0xa3840a){const _0x4544f7=a191_0x57bb85,_0x45bb09=selectedInputs(_0xa3840a);if(_0x45bb09[_0x4544f7(0x136)]!==0x1)throw CliErrors[_0x4544f7(0x13d)](_0x4544f7(0x12a));return _0x45bb09;}function withScene(_0x504228,_0x1b889d,_0x343cd7){return{..._0x504228,'scene':_0x1b889d,..._0x343cd7?{'sourceFile':{'fileName':_0x343cd7['fileName'],'filePath':_0x343cd7['filePath']}}:{}};}const ocrRecognize={'service':a191_0x57bb85(0x13c),'command':a191_0x57bb85(0x144),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a191_0x57bb85(0x142),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xa559e){const _0x1c2465=a191_0x57bb85,_0x3f376c=normalizeScene(_0xa559e[_0x1c2465(0x140)]('scene')),_0x2b55cd=SCENE_TO_LEGACY_TYPE[_0x3f376c],_0x15def5=validateInputSelection(_0xa559e);if(_0x15def5['imageUrl']){const _0x34ed58=new URLSearchParams({'url':_0x15def5[_0x1c2465(0x14d)],'type':_0x2b55cd,'appCode':_0xa559e[_0x1c2465(0x13e)]});return{'method':_0x1c2465(0x128),'url':'/smartapi/ocr/recognize-text?'+_0x34ed58[_0x1c2465(0x124)](),'description':_0x1c2465(0x12e)+_0x3f376c+_0x1c2465(0x14b)};}const _0x4f0ec4=requireDevelopmentUploadFile(_0x15def5[_0x1c2465(0x137)],_0x1c2465(0x120));return{'method':_0x1c2465(0x12f),'url':_0x1c2465(0x131),'body':{'steps':[{'method':_0x1c2465(0x12f),'url':'/smartapi/common/uploadFile','body':{'appCode':_0xa559e[_0x1c2465(0x13e)],'multipart':{'file':_0x4f0ec4}}},{'method':'POST','url':_0x1c2465(0x134),'body':{'filePath':_0x1c2465(0x11d),'downloadFlag':![]}},{'method':_0x1c2465(0x128),'url':_0x1c2465(0x146),'query':{'appCode':_0xa559e[_0x1c2465(0x13e)],'url':_0x1c2465(0x11e),'type':_0x2b55cd}}]},'description':_0x1c2465(0x122)+_0x3f376c+'\x20OCR'};},async 'execute'(_0x25bac6){const _0x31c68f=a191_0x57bb85,_0x43d1f3=normalizeScene(_0x25bac6[_0x31c68f(0x140)](_0x31c68f(0x13b))),_0x1762fc=SCENE_TO_LEGACY_TYPE[_0x43d1f3],_0x2974ab=validateInputSelection(_0x25bac6);if(_0x2974ab[_0x31c68f(0x14d)]){const _0x2cbd9f=await recognizeDevelopmentOcr(_0x25bac6[_0x31c68f(0x13e)],{'url':_0x2974ab[_0x31c68f(0x14d)],'type':_0x1762fc});return{'ok':!![],'data':withScene(_0x2cbd9f,_0x43d1f3)};}const _0x3ec0a3=requireDevelopmentUploadFile(_0x2974ab[_0x31c68f(0x137)],_0x31c68f(0x120)),_0x565d92=await uploadDevelopmentFile(_0x25bac6[_0x31c68f(0x13e)],_0x3ec0a3[_0x31c68f(0x130)]);if(!_0x565d92[_0x31c68f(0x141)])throw CliErrors[_0x31c68f(0x119)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5d098f=await queryDevelopmentFileUrl(_0x565d92[_0x31c68f(0x141)],{'download':![]});if(!_0x5d098f[_0x31c68f(0x13f)])throw CliErrors['apiError'](_0x31c68f(0x11b));const _0x10ba45=await recognizeDevelopmentOcr(_0x25bac6['appCode'],{'url':_0x5d098f['fileUrl'],'type':_0x1762fc});return{'ok':!![],'data':withScene(_0x10ba45,_0x43d1f3,_0x565d92)};}};function a191_0x1fb0(){const _0x493d14=['join','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','idCard','toString','image-url','8728983XzYdiB','General','GET','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','756474dOcoIl','form','908760FIreMa','Preview:\x20recognize\x20','POST','path','/smartapi/common/uploadFile','.\x20Supported\x20scenes:\x20','string','/smartapi/common/queryFileUrl','1713424UsZnlw','count','imageFile','invoice','1280584OKZhoq','533101NzXdDl','scene','ocr','validation','appCode','fileUrl','str','filePath','read','filter','recognize','idcard','/smartapi/ocr/recognize-text','Unsupported\x20OCR\x20scene:\x20','14vmmCiC','Invoice','2016134UeXkgz','\x20OCR\x20from\x20URL','IdCard','imageUrl','general','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','length','apiError','toLowerCase','File\x20URL\x20response\x20missing\x20fileUrl.','45vbkJlM','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','trim','image-file'];a191_0x1fb0=function(){return _0x493d14;};return a191_0x1fb0();}export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a192_0x1f0f(){const _0x5b7e8b=['pageName\x20cannot\x20exceed\x20100\x20characters.','some','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','7946172RUPonX','version','page.create','Custom\x20Page\x20pattern\x20not\x20found:\x20','name','DASHBOARD','validation','isNaN','apiError','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','number','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','parse','utf8','object','stringify','1911764LvXINh','7856653UALnDL','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','appCode','3985528ZgDqre','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','page-pattern','Invalid\x20Custom\x20Page\x20pattern:\x20','ONEPAGE','3vXoSNK','string','values','isArray','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','write','1128185KhhWPx','.json','CUSTOM','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','files','includes','isInteger','compress','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','page','\x20and\x20its\x20menu\x20entry.','length','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','keys','Would\x20create\x20Custom\x20Page\x20','page-content','pageId','page-dir','pageName','menuPath','str','../../../templates/custom-pages','now','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','POST','/smartapi/webcode/page/create','trim','6XXHXbO','createMenu','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','702426vCirrk','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','764335ZZztdC','menuId'];a192_0x1f0f=function(){return _0x5b7e8b;};return a192_0x1f0f();}const a192_0x340014=a192_0x25bf;(function(_0x569721,_0x56183f){const _0x28bcdb=a192_0x25bf,_0x5e985c=_0x569721();while(!![]){try{const _0x2ba95b=parseInt(_0x28bcdb(0xa8))/0x1+parseInt(_0x28bcdb(0xa6))/0x2*(-parseInt(_0x28bcdb(0xc8))/0x3)+-parseInt(_0x28bcdb(0xbd))/0x4+parseInt(_0x28bcdb(0x88))/0x5*(parseInt(_0x28bcdb(0xa3))/0x6)+parseInt(_0x28bcdb(0xbe))/0x7+parseInt(_0x28bcdb(0xc2))/0x8+-parseInt(_0x28bcdb(0xad))/0x9;if(_0x2ba95b===_0x56183f)break;else _0x5e985c['push'](_0x5e985c['shift']());}catch(_0x5aa004){_0x5e985c['push'](_0x5e985c['shift']());}}}(a192_0x1f0f,0xdb5b0));function a192_0x25bf(_0x15a7fb,_0x37714a){_0x15a7fb=_0x15a7fb-0x85;const _0x1f0f07=a192_0x1f0f();let _0x25bf73=_0x1f0f07[_0x15a7fb];return _0x25bf73;}import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a192_0x340014(0xc7),a192_0x340014(0xb2)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a192_0x340014(0x9d));export const pageCreate={'service':a192_0x340014(0x91),'command':'create','description':a192_0x340014(0xc4),'risk':a192_0x340014(0x87),'defaultOutputFormat':a192_0x340014(0x8f),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a192_0x340014(0x9f)},{'name':a192_0x340014(0x97),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a192_0x340014(0x94)}],'flags':[{'name':'name','type':'string','description':a192_0x340014(0xbf)},{'name':'parent-menu-id','type':a192_0x340014(0xb7),'description':a192_0x340014(0xa5)},{'name':a192_0x340014(0xc5),'type':'string','description':a192_0x340014(0x8b),'enum':CUSTOM_PAGE_PATTERNS},{'name':a192_0x340014(0x99),'type':a192_0x340014(0xc9),'description':a192_0x340014(0xb6)},APPCODE_FLAG],async 'validate'(_0x27ad1a){await readValidatedPageSource(_0x27ad1a);},async 'dryRun'(_0x5ce7a3){const _0x41fa1e=a192_0x340014,_0x4c2156=readInput(_0x5ce7a3,await readValidatedPageSource(_0x5ce7a3));return{'method':_0x41fa1e(0xa0),'url':_0x41fa1e(0xa1),'body':{'appCode':_0x4c2156[_0x41fa1e(0xc1)],'pageName':_0x4c2156['pageName'],..._0x4c2156['parentMenuId']!=null?{'parentMenuId':_0x4c2156['parentMenuId']}:{},'createMenu':_0x4c2156[_0x41fa1e(0xa4)],'codeContent':_0x4c2156[_0x41fa1e(0x8c)]},'description':_0x41fa1e(0x96)+JSON[_0x41fa1e(0xbc)](_0x4c2156[_0x41fa1e(0x9a)])+_0x41fa1e(0x92)};},async 'execute'(_0x3f9ef2){const _0x5b2df9=a192_0x340014,_0x4bbe10=readInput(_0x3f9ef2,await readValidatedPageSource(_0x3f9ef2)),_0x3d1b45=await createCustomPage(_0x4bbe10);if(!Number[_0x5b2df9(0x8e)](_0x3d1b45['pageId'])||_0x3d1b45[_0x5b2df9(0x98)]<=0x0)throw CliErrors[_0x5b2df9(0xb5)](_0x5b2df9(0x90));const _0x477705=buildCustomPageDevelopmentUrl(_0x4bbe10[_0x5b2df9(0xc1)],_0x3d1b45[_0x5b2df9(0x9b)]),_0x406ead=buildCustomPageEditUrl(_0x4bbe10[_0x5b2df9(0xc1)],_0x3d1b45['pageId']);return{'ok':!![],'data':{'operation':_0x5b2df9(0xaf),'pageType':_0x5b2df9(0x8a),'pagePattern':readPagePattern(_0x3f9ef2),'selector':{'appCode':_0x4bbe10[_0x5b2df9(0xc1)],'pageName':_0x4bbe10[_0x5b2df9(0x9a)]},'before':null,'after':{'pageId':_0x3d1b45[_0x5b2df9(0x98)],'pageName':_0x3d1b45[_0x5b2df9(0x9a)],'appCode':_0x3d1b45[_0x5b2df9(0xc1)],'version':_0x3d1b45[_0x5b2df9(0xae)],'menuId':_0x3d1b45[_0x5b2df9(0xa9)],'menuPath':_0x3d1b45['menuPath'],'files':_0x3d1b45[_0x5b2df9(0x8c)]??Object['keys'](_0x4bbe10[_0x5b2df9(0x8c)])},'dryRun':![],'request':_0x4bbe10,..._0x477705?{'pageUrl':_0x477705}:{},..._0x406ead?{'editPageUrl':_0x406ead}:{},'warnings':_0x477705?[]:[_0x5b2df9(0xac)]},'message':'Created\x20Custom\x20Page\x20'+_0x3d1b45[_0x5b2df9(0x98)]+'.'};}};function readPagePattern(_0x130121){const _0x18b298=a192_0x340014,_0x3cbca8=_0x130121[_0x18b298(0x9c)](_0x18b298(0xc5))['trim'](),_0x52869e=_0x130121[_0x18b298(0x9c)](_0x18b298(0x99))[_0x18b298(0xa2)]();if(_0x3cbca8&&_0x52869e)throw CliErrors['validation'](_0x18b298(0xc0));if(_0x52869e)return null;if(!_0x3cbca8)throw CliErrors[_0x18b298(0xb3)](_0x18b298(0xc3));if(!CUSTOM_PAGE_PATTERNS[_0x18b298(0x8d)](_0x3cbca8))throw CliErrors['validation'](_0x18b298(0xb8));return _0x3cbca8;}async function readPageSource(_0x984f40){const _0x422fa8=a192_0x340014,_0x45b033=_0x984f40[_0x422fa8(0x9c)]('page-dir')[_0x422fa8(0xa2)](),_0x2d28e6=readPagePattern(_0x984f40);if(_0x2d28e6===null){const _0x311be5=await readCustomPageDirectory(_0x45b033);if(Object[_0x422fa8(0x95)](_0x311be5)['length']===0x0)throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xa7));return _0x311be5;}let _0x21fe70;try{_0x21fe70=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2d28e6['toLowerCase']()+_0x422fa8(0x89)),_0x422fa8(0xba));}catch{throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xb0)+_0x2d28e6+'.');}let _0x1fcf15;try{_0x1fcf15=JSON[_0x422fa8(0xb9)](_0x21fe70);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2d28e6+'.');}if(!_0x1fcf15||typeof _0x1fcf15!==_0x422fa8(0xbb)||Array[_0x422fa8(0x85)](_0x1fcf15)||Object[_0x422fa8(0xca)](_0x1fcf15)[_0x422fa8(0xab)](_0x5b749c=>typeof _0x5b749c!==_0x422fa8(0xc9)))throw CliErrors[_0x422fa8(0xb3)](_0x422fa8(0xc6)+_0x2d28e6+'.');return _0x1fcf15;}async function readValidatedPageSource(_0x5857b1){const _0x3b73df=await readPageSource(_0x5857b1);return await validateCustomPageContent(_0x3b73df),_0x3b73df;}function readInput(_0x29a0f2,_0x59f057){const _0x3280b0=a192_0x340014,_0x241dbd=_0x29a0f2[_0x3280b0(0x9c)](_0x3280b0(0xb1))[_0x3280b0(0xa2)]()||'Custom_page_'+Date[_0x3280b0(0x9e)]();if(_0x241dbd[_0x3280b0(0x93)]>0x64)throw CliErrors[_0x3280b0(0xb3)](_0x3280b0(0xaa));const _0x2544ca=_0x29a0f2['num']('parent-menu-id',NaN),_0x194af2=!Number[_0x3280b0(0xb4)](_0x2544ca);if(_0x194af2&&(!Number[_0x3280b0(0x8e)](_0x2544ca)||_0x2544ca<=0x0))throw CliErrors[_0x3280b0(0xb3)](_0x3280b0(0x86));return{'appCode':_0x29a0f2['appCode'],'pageName':_0x241dbd,..._0x194af2?{'parentMenuId':_0x2544ca}:{},'createMenu':!![],'files':_0x59f057};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a193_0x2babf5=a193_0x405a;function a193_0x405a(_0x5876f8,_0x42ba27){_0x5876f8=_0x5876f8-0xea;const _0xc3abac=a193_0xc3ab();let _0x405a30=_0xc3abac[_0x5876f8];return _0x405a30;}(function(_0x5756bb,_0x4b9205){const _0xe420ad=a193_0x405a,_0x417a73=_0x5756bb();while(!![]){try{const _0x39a4e4=parseInt(_0xe420ad(0xef))/0x1+parseInt(_0xe420ad(0xf1))/0x2*(parseInt(_0xe420ad(0xea))/0x3)+-parseInt(_0xe420ad(0xec))/0x4*(-parseInt(_0xe420ad(0xfa))/0x5)+parseInt(_0xe420ad(0xf5))/0x6+parseInt(_0xe420ad(0xf2))/0x7*(parseInt(_0xe420ad(0x101))/0x8)+-parseInt(_0xe420ad(0xff))/0x9*(parseInt(_0xe420ad(0x102))/0xa)+parseInt(_0xe420ad(0xf9))/0xb*(-parseInt(_0xe420ad(0x100))/0xc);if(_0x39a4e4===_0x4b9205)break;else _0x417a73['push'](_0x417a73['shift']());}catch(_0x57ab29){_0x417a73['push'](_0x417a73['shift']());}}}(a193_0xc3ab,0xb5264));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a193_0x2babf5(0xf3),'description':a193_0x2babf5(0xf4),'risk':a193_0x2babf5(0xf6),'defaultOutputFormat':a193_0x2babf5(0xf8),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a193_0x2babf5(0xfb)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0xd4e0f7){readCustomPageId(_0xd4e0f7);},async 'execute'(_0x1c21b3){const _0x5c712a=a193_0x2babf5,_0x57695d=readCustomPageId(_0x1c21b3),_0x2986e2=await getCustomPageSource(_0x57695d),{bundle:_0x585b8c,createTime:_0xd6cf88,updateTime:_0x92fc2f,..._0x547d03}=_0x2986e2,_0x2ec029=_0x2986e2['id']??_0x57695d,_0x13ac8b=_0x2986e2[_0x5c712a(0xfc)]?.[_0x5c712a(0x103)]()||_0x1c21b3['str']('appcode')[_0x5c712a(0x103)](),_0xfb3e26=buildCustomPageRuntimeUrl(_0x13ac8b,_0x2986e2[_0x5c712a(0xfd)]),_0x4f2960=buildCustomPageEditUrl(_0x13ac8b,_0x2ec029),_0x1e6ad5=await resolveCustomPageDevelopmentUrl(_0x13ac8b,_0x2ec029,_0x1c21b3[_0x5c712a(0x104)]);return{'ok':!![],'data':{..._0x547d03,..._0xfb3e26?{'runtimePageUrl':_0xfb3e26}:{},..._0x1e6ad5?{'pageUrl':_0x1e6ad5}:{},..._0x4f2960?{'editPageUrl':_0x4f2960}:{},..._0xd6cf88==null?{}:{'createTime':formatTime(_0xd6cf88)},..._0x92fc2f==null?{}:{'updateTime':formatTime(_0x92fc2f)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x57695d+'.'};}};function a193_0xc3ab(){const _0x46ba08=['209783xKOhQU','custom-detail','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','8715096ZcyLPE','read','join','compress','108493FaLwxh','50555PpMhfj','Custom\x20Page\x20ID','appCode','pageCode','padStart','3274074WHZkgl','1644wgIKyQ','136wBGdIu','40kFbTXg','trim','cookie','getTime','getFullYear','1149PMntue','isNaN','396ufioYQ','getMonth','getDate','46121PRNPjn','getSeconds','2816UerQwt'];a193_0xc3ab=function(){return _0x46ba08;};return a193_0xc3ab();}function formatTime(_0x5483c6){const _0x31f208=a193_0x2babf5,_0x2ce5e2=new Date(_0x5483c6);if(Number[_0x31f208(0xeb)](_0x2ce5e2[_0x31f208(0x105)]()))return String(_0x5483c6);const _0x1cfb03=[_0x2ce5e2[_0x31f208(0x106)](),String(_0x2ce5e2[_0x31f208(0xed)]()+0x1)['padStart'](0x2,'0'),String(_0x2ce5e2[_0x31f208(0xee)]())[_0x31f208(0xfe)](0x2,'0')][_0x31f208(0xf7)]('-'),_0x36ad28=[String(_0x2ce5e2['getHours']())[_0x31f208(0xfe)](0x2,'0'),String(_0x2ce5e2['getMinutes']())[_0x31f208(0xfe)](0x2,'0'),String(_0x2ce5e2[_0x31f208(0xf0)]())['padStart'](0x2,'0')][_0x31f208(0xf7)](':');return _0x1cfb03+'\x20'+_0x36ad28;}
|