@lovrabet/rabetbase-cli 2.5.10-beta.3 → 2.5.10-beta.4
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/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/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/page-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/context.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/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.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.js +1 -1
- 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/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.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/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 +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x17acb3=a191_0x41a0;(function(_0x3b0c82,_0x255b75){const _0x4eae5e=a191_0x41a0,_0x1bdf9f=_0x3b0c82();while(!![]){try{const _0x9ede61=-parseInt(_0x4eae5e(0xd3))/0x1+-parseInt(_0x4eae5e(0xed))/0x2*(parseInt(_0x4eae5e(0xf6))/0x3)+-parseInt(_0x4eae5e(0x11b))/0x4+-parseInt(_0x4eae5e(0xe6))/0x5+-parseInt(_0x4eae5e(0x120))/0x6+parseInt(_0x4eae5e(0x10b))/0x7+-parseInt(_0x4eae5e(0xc1))/0x8*(-parseInt(_0x4eae5e(0x137))/0x9);if(_0x9ede61===_0x255b75)break;else _0x1bdf9f['push'](_0x1bdf9f['shift']());}catch(_0x365c48){_0x1bdf9f['push'](_0x1bdf9f['shift']());}}}(a191_0x3101,0xb4340));function a191_0x3101(){const _0x1d1e6e=['Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','warnings','verification','\x20updated,\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','set','Selected\x20','POST','has','resources','validation','parentId','visibility-update','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','expected-count','datasetCode','menu','3582050PjoYFE','filter','update-recovery','boolean','trim','\x20failed.','rawFlags','28382AZnNkE','url','Would\x20update\x20visibility\x20for\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu_permission_denied','menu_selector_ambiguous','values','get','39cIxJKo','expect-visible','/smartapi/menu/update','string','menus','updated','write','Menu\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s);\x20skipped\x20','message','label','pageType','before','update-menu-visibility','plannedActions','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','failed','modelType','flagMissing','172214ypjAOm','push','paths','\x20unchanged\x20menu(s).','menu_expected_count_mismatch','Menu\x20visibility\x20update\x20completed:\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','expectVisible','isArray','type','plan','Requested\x20menu\x20visibility','sort','1414764tQTMWc','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','targets','datasetId','menu\x20list','4234962ivugNb','code','expectedCount','num','update\x20visibility\x20for','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','visible','join','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_verification_failed','path','body','split','childrenIds','update','map','recovered','Response\x20was\x20lost\x20for\x20menu\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','childrenCount','\x20must\x20be\x20true\x20or\x20false.','hash','rabetbase\x20menu\x20list\x20--format\x20compress','873HnIBxq','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','\x20menu(s);\x20skip\x20','some','resourcesValid','beforeById','update\x20menu\x20visibility','length','232128mETXIH','pageId','\x20changed\x20unexpectedly.','menuIds','requestedVisible','cookie','str','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','menu-ids','false','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','true','appCode','menu_state_drift','isSafeInteger','depth','140631ncFAHl','stringify'];a191_0x3101=function(){return _0x1d1e6e;};return a191_0x3101();}function a191_0x41a0(_0x2ccaef,_0x5c907a){_0x2ccaef=_0x2ccaef-0xc0;const _0x310156=a191_0x3101();let _0x41a052=_0x310156[_0x2ccaef];return _0x41a052;}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':'POST','path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a191_0x17acb3(0xe5),'command':'visibility-update','description':a191_0x17acb3(0x107),'risk':a191_0x17acb3(0xfc),'structuredErrors':!![],'flags':[{'name':a191_0x17acb3(0xcb),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0xc9)},{'name':a191_0x17acb3(0x10d),'type':a191_0x17acb3(0xf9),'description':a191_0x17acb3(0x125)},{'name':a191_0x17acb3(0x126),'type':a191_0x17acb3(0xe9),'required':!![],'description':a191_0x17acb3(0x119)},{'name':a191_0x17acb3(0xf7),'type':a191_0x17acb3(0xe9),'description':a191_0x17acb3(0xca)},{'name':'expected-count','type':'number','description':a191_0x17acb3(0xc8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x29f14f){parseInput(_0x29f14f);},async 'dryRun'(_0x4975f){const _0x33efdb=a191_0x17acb3,_0x5cc447=await buildPlan(_0x4975f,!![]),_0x3a0bba=_0x5cc447[_0x33efdb(0x118)]['plannedActions']?.['length']??0x0,_0x33e107=_0x5cc447['plan'][_0x33efdb(0x11d)][_0x33efdb(0xc0)]-_0x3a0bba;return menuDryRunResult(_0x5cc447[_0x33efdb(0x118)],{'method':_0x33efdb(0xdc),'url':'/smartapi/menu/update','body':{'updates':_0x5cc447[_0x33efdb(0x118)][_0x33efdb(0x106)]?.[_0x33efdb(0x12f)](_0x2fa9e5=>_0x2fa9e5[_0x33efdb(0x12b)])??[]},'description':_0x33efdb(0xef)+_0x3a0bba+_0x33efdb(0x13a)+_0x33e107+_0x33efdb(0x10e)});},async 'execute'(_0x3345e0){const _0x3512e2=a191_0x17acb3,_0x1dfa8f=await buildPlan(_0x3345e0,![]);await recheckMutationSnapshot(_0x3345e0,_0x1dfa8f[_0x3512e2(0x118)],'update\x20menu\x20visibility');const _0x4be46b=[],_0x2c021d=[],_0x15c557=[];for(const _0x314691 of _0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]){if(_0x314691[_0x3512e2(0x104)][_0x3512e2(0x126)]===_0x1dfa8f['plan'][_0x3512e2(0xc5)]){_0x4be46b['push']({'id':_0x314691['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0['cookie'],{'id':_0x314691['id'],'visible':_0x1dfa8f['plan'][_0x3512e2(0xc5)]}),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x314691['id'],'updated':!![],'skipped':![]});}catch(_0x1e9958){const _0x3ca188=mapMenuApiError(_0x1e9958,_0x3512e2(0x124),_0x314691['id']);if(isMenuResponseLoss(_0x1e9958)&&_0x3ca188[_0x3512e2(0x121)]!==_0x3512e2(0xf2)){_0x15c557[_0x3512e2(0x10c)](_0x314691['id']);continue;}_0x2c021d[_0x3512e2(0x10c)]({'id':_0x314691['id'],'stage':_0x3512e2(0x12e),'code':_0x3ca188[_0x3512e2(0x121)],'message':_0x3ca188[_0x3512e2(0x101)]});}}let _0x63b3cf;try{_0x63b3cf=await fetchMenuSnapshot(_0x3345e0[_0x3512e2(0xcf)],_0x3345e0[_0x3512e2(0xc6)]);}catch(_0x10535a){const _0x482585=describeMenuErrorCause(_0x10535a,'verify\x20menu\x20visibility\x20update'),_0xed3081=_0x15c557[_0x3512e2(0x12f)](_0x51dbae=>({'id':_0x51dbae,'stage':_0x3512e2(0xe8),'code':'menu_verification_failed','message':_0x3512e2(0x131)+_0x51dbae+_0x3512e2(0xd9),'requestedStateConfirmed':![],'recovered':![]})),_0x318d04={'stage':_0x3512e2(0xd7),'code':_0x3512e2(0x129),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0x11d)]['map'](_0x4e5d34=>_0x4e5d34['id']),'requestedStateConfirmed':![],..._0x482585};throw menuFailure(asVerificationError(_0x10535a,_0x3512e2(0x11c)),_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0xed3081,_0x318d04],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),'recoveredCount':0x0,'lookupCommand':_0x3512e2(0x136)}});}const _0x4614d9=[];for(const _0x48f559 of _0x4be46b){const _0x18161a=Number(_0x48f559['id']),_0x64c6b9=_0x1dfa8f[_0x3512e2(0x13d)][_0x3512e2(0xf5)](_0x18161a),_0x22242e=_0x63b3cf['byId'][_0x3512e2(0xf5)](_0x18161a);try{verifyVisibilityUpdate(_0x64c6b9,_0x22242e,_0x1dfa8f[_0x3512e2(0x118)][_0x3512e2(0xc5)]);}catch(_0x20e1cd){const _0x6cddd1=asVerificationError(_0x20e1cd,_0x3512e2(0xfd)+_0x18161a+_0x3512e2(0xff));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x18161a,'stage':_0x3512e2(0xd7),'code':_0x6cddd1[_0x3512e2(0x121)],'message':_0x6cddd1[_0x3512e2(0x101)],'requestedStateConfirmed':![]});}}for(const _0x14dff9 of _0x15c557){const _0x1423eb=_0x1dfa8f[_0x3512e2(0x13d)]['get'](_0x14dff9),_0x14ea40=_0x63b3cf['byId']['get'](_0x14dff9);try{verifyVisibilityUpdate(_0x1423eb,_0x14ea40,_0x1dfa8f['plan']['requestedVisible']),_0x4be46b[_0x3512e2(0x10c)]({'id':_0x14dff9,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x44fc3a){const _0x5610ed=asVerificationError(_0x44fc3a,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x14dff9+_0x3512e2(0xfe));_0x4614d9[_0x3512e2(0x10c)]({'id':_0x14dff9,'stage':'update-recovery','code':_0x5610ed[_0x3512e2(0x121)],'message':_0x5610ed[_0x3512e2(0x101)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4614d9[_0x3512e2(0xc0)]>0x0){const _0x2222ca=_0x4614d9[_0x3512e2(0x12f)](_0x5ea7ba=>Number(_0x5ea7ba['id'])),_0x35acc7=_0x4be46b['filter'](_0x2da73c=>_0x2da73c[_0x3512e2(0x130)]===!![])[_0x3512e2(0xc0)],_0x5c491a=menuError(_0x3512e2(0x129),_0x3512e2(0x138)+_0x2222ca[_0x3512e2(0x127)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x5c491a,_0x1dfa8f[_0x3512e2(0x118)],{'stage':_0x3512e2(0xd7),'succeeded':_0x4be46b,'failedRecords':[..._0x2c021d,..._0x4614d9],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3512e2(0x108),..._0x2222ca[_0x3512e2(0xc0)]===0x1?{'targetId':_0x2222ca[0x0]}:{'targetIds':_0x2222ca},'recoveredCount':_0x35acc7,'lookupCommand':_0x3512e2(0x136)}});}const _0x5b9dd7=_0x4be46b[_0x3512e2(0xe7)](_0x2edf80=>_0x2edf80[_0x3512e2(0xfb)]===!![])['length'],_0xa883bc=_0x4be46b[_0x3512e2(0xc0)]-_0x5b9dd7,_0x91ef90={..._0x1dfa8f[_0x3512e2(0x118)],'succeeded':_0x4be46b,'failed':_0x2c021d,'warnings':_0x2c021d[_0x3512e2(0xc0)]>0x0?[..._0x1dfa8f['plan'][_0x3512e2(0xd6)],_0x3512e2(0x111)]:_0x1dfa8f['plan']['warnings'],'verification':{'checkedBy':_0x3512e2(0x11f),'snapshotHash':_0x63b3cf[_0x3512e2(0x135)],'matchesRequestedState':_0x2c021d[_0x3512e2(0xc0)]===0x0,'recoveredCount':_0x15c557[_0x3512e2(0xc0)]}};return{'ok':_0x2c021d[_0x3512e2(0xc0)]===0x0,'data':_0x91ef90,'message':_0x2c021d[_0x3512e2(0xc0)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5b9dd7+_0x3512e2(0x100)+_0xa883bc+_0x3512e2(0x10e):_0x3512e2(0x110)+_0x5b9dd7+_0x3512e2(0xd8)+_0xa883bc+'\x20skipped,\x20'+_0x2c021d[_0x3512e2(0xc0)]+_0x3512e2(0xeb)};}};function parseInput(_0xa9e99f){const _0x3228bf=a191_0x17acb3,_0x3c87ee=parseMenuIds(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0xcb))),_0x530f56=parseCsv(_0xa9e99f[_0x3228bf(0xc7)](_0x3228bf(0x10d)));if(_0x3c87ee[_0x3228bf(0xc0)]===0x0&&_0x530f56[_0x3228bf(0xc0)]===0x0)throw CliErrors['validation'](_0x3228bf(0x128));const _0x28a16b=parseBooleanFlag(_0xa9e99f,_0x3228bf(0x126),!![]),_0x325738=parseBooleanFlag(_0xa9e99f,_0x3228bf(0xf7),![]);let _0x3a4bb9;if(hasFlag(_0xa9e99f,_0x3228bf(0xe3))){_0x3a4bb9=_0xa9e99f[_0x3228bf(0x123)](_0x3228bf(0xe3));if(!Number[_0x3228bf(0xd1)](_0x3a4bb9)||_0x3a4bb9<0x0)throw CliErrors[_0x3228bf(0xdf)](_0x3228bf(0x132));}return{'menuIds':_0x3c87ee,'paths':_0x530f56,'visible':_0x28a16b,'expectVisible':_0x325738,'expectedCount':_0x3a4bb9};}async function buildPlan(_0x4558e1,_0x32f57c){const _0x47b41f=a191_0x17acb3,_0x5d3921=parseInput(_0x4558e1),_0x17c6b2=await fetchMutationSnapshot(_0x4558e1,_0x47b41f(0x13e)),_0x10e1d8=selectTargets(_0x17c6b2[_0x47b41f(0xfa)],_0x5d3921[_0x47b41f(0xc4)],_0x5d3921[_0x47b41f(0x10d)]);if(_0x5d3921[_0x47b41f(0x122)]!==undefined&&_0x10e1d8[_0x47b41f(0xc0)]!==_0x5d3921[_0x47b41f(0x122)])throw menuError(_0x47b41f(0x10f),_0x47b41f(0xdb)+_0x10e1d8['length']+_0x47b41f(0x139)+_0x5d3921[_0x47b41f(0x122)]+'.',_0x47b41f(0xcd));if(_0x5d3921[_0x47b41f(0x115)]!==undefined){const _0x3b61cb=_0x10e1d8[_0x47b41f(0xe7)](_0x80fe42=>_0x80fe42[_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x115)]);if(_0x3b61cb[_0x47b41f(0xc0)]>0x0)throw menuError(_0x47b41f(0xd0),_0x47b41f(0x112)+_0x3b61cb[_0x47b41f(0x12f)](_0x53fa04=>_0x53fa04['id'])[_0x47b41f(0x127)](',\x20')+'.',_0x47b41f(0xf0));}const _0x222b96=_0x10e1d8[_0x47b41f(0x12f)](_0x59cd76=>({'id':_0x59cd76['id'],'label':_0x59cd76[_0x47b41f(0x102)],'path':_0x59cd76['path'],'before':{'visible':_0x59cd76[_0x47b41f(0x126)]},'after':{'visible':_0x5d3921['visible']}})),_0xa7f309=_0x222b96[_0x47b41f(0xe7)](_0x14e3e5=>_0x14e3e5[_0x47b41f(0x104)][_0x47b41f(0x126)]!==_0x5d3921[_0x47b41f(0x126)])[_0x47b41f(0x12f)](_0xc8ce3a=>({'stage':_0x47b41f(0x105),'method':'POST','path':_0x47b41f(0xf8),'body':{'appCode':_0x4558e1[_0x47b41f(0xcf)],'id':_0xc8ce3a['id'],'visible':_0x5d3921['visible']}})),_0x33857b=mutationResult({'operation':_0x47b41f(0xe1),'selector':{'menuIds':_0x5d3921[_0x47b41f(0xc4)],'paths':_0x5d3921[_0x47b41f(0x10d)]},'before':{'menus':_0x10e1d8['map'](_0x5818ef=>({'id':_0x5818ef['id'],'path':_0x5818ef['path'],'visible':_0x5818ef[_0x47b41f(0x126)]}))},'after':{'menus':_0x10e1d8['map'](_0x1a7d04=>({'id':_0x1a7d04['id'],'path':_0x1a7d04[_0x47b41f(0x12a)],'visible':_0x5d3921[_0x47b41f(0x126)]}))},'dryRun':_0x32f57c,'backend':[...BACKEND],'plannedActions':_0xa7f309,'snapshotHash':_0x17c6b2[_0x47b41f(0x135)],'warnings':_0xa7f309[_0x47b41f(0xc0)]===0x0?[_0x47b41f(0xe2)]:[]});return{'plan':{..._0x33857b,'requestedVisible':_0x5d3921[_0x47b41f(0x126)],'targets':_0x222b96},'beforeById':new Map(_0x10e1d8['map'](_0x50146e=>[_0x50146e['id'],_0x50146e]))};}function selectTargets(_0xf8fb3,_0x14cc36,_0x12ebfa){const _0x218f0e=a191_0x17acb3,_0x59c35f=new Map(_0xf8fb3['map'](_0x316a51=>[_0x316a51['id'],_0x316a51])),_0x4ce445=new Map(),_0x3a8cb3=_0x14cc36[_0x218f0e(0xe7)](_0x22fea5=>!_0x59c35f[_0x218f0e(0xdd)](_0x22fea5));if(_0x3a8cb3[_0x218f0e(0xc0)]>0x0)throw menuError('menu_selector_not_found','Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x3a8cb3['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15ab6f of _0x14cc36){_0x4ce445[_0x218f0e(0xda)](_0x15ab6f,_0x59c35f[_0x218f0e(0xf5)](_0x15ab6f));}for(const _0x165997 of _0x12ebfa){const _0x10f49b=_0xf8fb3['filter'](_0xcda646=>_0xcda646[_0x218f0e(0x12a)]===_0x165997);if(_0x10f49b[_0x218f0e(0xc0)]===0x0)throw menuError('menu_selector_not_found',_0x218f0e(0x113)+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0x114));if(_0x10f49b[_0x218f0e(0xc0)]>0x1)throw menuError(_0x218f0e(0xf3),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x218f0e(0xd4)](_0x165997)+'.',_0x218f0e(0xd5)+_0x10f49b['map'](_0x4bd042=>_0x4bd042['id'])[_0x218f0e(0x127)](',\x20')+'.');const _0x526ac0=_0x10f49b[0x0];_0x4ce445['set'](_0x526ac0['id'],_0x526ac0);}return[..._0x4ce445[_0x218f0e(0xf4)]()];}function parseMenuIds(_0x22a159){const _0x10d138=a191_0x17acb3,_0x3968ec=parseCsv(_0x22a159),_0x4d156e=_0x3968ec['map'](Number);if(_0x4d156e[_0x10d138(0x13b)](_0x2ea8d6=>!Number['isSafeInteger'](_0x2ea8d6)||_0x2ea8d6<=0x0))throw CliErrors[_0x10d138(0xdf)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x4d156e)];}function parseCsv(_0xcb8005){const _0x43affe=a191_0x17acb3;return[...new Set(_0xcb8005[_0x43affe(0x12c)](',')[_0x43affe(0x12f)](_0x4de1b3=>_0x4de1b3[_0x43affe(0xea)]())[_0x43affe(0xe7)](Boolean))];}function parseBooleanFlag(_0x8e14e7,_0x4600d2,_0x10158e){const _0x259196=a191_0x17acb3;if(!hasFlag(_0x8e14e7,_0x4600d2)){if(_0x10158e)throw CliErrors[_0x259196(0x10a)](_0x4600d2);return undefined;}const _0xf6f7b0=_0x8e14e7[_0x259196(0xec)][_0x4600d2];if(_0xf6f7b0===!![]||_0xf6f7b0===![])return _0xf6f7b0;if(_0xf6f7b0===_0x259196(0xce))return!![];if(_0xf6f7b0===_0x259196(0xcc))return![];throw CliErrors[_0x259196(0xdf)]('--'+_0x4600d2+_0x259196(0x134));}function verifyVisibilityUpdate(_0x3e024c,_0x363391,_0x51bc34){const _0x23db95=a191_0x17acb3;assertVerified(!!_0x363391,_0x23db95(0xfd)+_0x3e024c['id']+_0x23db95(0xf1)),assertVerified(_0x363391[_0x23db95(0x126)]===_0x51bc34,_0x23db95(0xfd)+_0x3e024c['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0xe5a2af=[['id',_0x363391['id'],_0x3e024c['id']],[_0x23db95(0xe0),_0x363391[_0x23db95(0xe0)],_0x3e024c[_0x23db95(0xe0)]],['depth',_0x363391[_0x23db95(0xd2)],_0x3e024c[_0x23db95(0xd2)]],['label',_0x363391['label'],_0x3e024c[_0x23db95(0x102)]],['path',_0x363391[_0x23db95(0x12a)],_0x3e024c['path']],[_0x23db95(0xee),_0x363391[_0x23db95(0xee)],_0x3e024c[_0x23db95(0xee)]],[_0x23db95(0x117),_0x363391[_0x23db95(0x117)],_0x3e024c[_0x23db95(0x117)]],[_0x23db95(0x11a),_0x363391[_0x23db95(0x11a)],_0x3e024c['sort']],[_0x23db95(0xde),_0x363391[_0x23db95(0xde)],_0x3e024c[_0x23db95(0xde)]],[_0x23db95(0x13c),_0x363391[_0x23db95(0x13c)],_0x3e024c[_0x23db95(0x13c)]],['childrenIds',_0x363391['childrenIds'],_0x3e024c[_0x23db95(0x12d)]],['childrenCount',_0x363391[_0x23db95(0x133)],_0x3e024c[_0x23db95(0x133)]],[_0x23db95(0xc2),_0x363391[_0x23db95(0xc2)],_0x3e024c['pageId']],['pageType',_0x363391[_0x23db95(0x103)],_0x3e024c['pageType']],[_0x23db95(0x109),_0x363391[_0x23db95(0x109)],_0x3e024c[_0x23db95(0x109)]],[_0x23db95(0x11e),_0x363391[_0x23db95(0x11e)],_0x3e024c[_0x23db95(0x11e)]],['datasetCode',_0x363391[_0x23db95(0xe4)],_0x3e024c[_0x23db95(0xe4)]]];for(const [_0x49a27a,_0x4764f0,_0x2b93f0]of _0xe5a2af){assertVerified(sameValue(_0x4764f0,_0x2b93f0),_0x23db95(0xfd)+_0x3e024c['id']+'\x20'+_0x49a27a+_0x23db95(0xc3));}}function sameValue(_0x1afcf2,_0x1a8da6){const _0x14c264=a191_0x17acb3;if(Array['isArray'](_0x1afcf2)||Array[_0x14c264(0x116)](_0x1a8da6))return JSON[_0x14c264(0xd4)](_0x1afcf2)===JSON[_0x14c264(0xd4)](_0x1a8da6);return _0x1afcf2===_0x1a8da6;}
|
|
1
|
+
const a191_0x1f9834=a191_0x277d;(function(_0x1d831b,_0x1bad32){const _0x36de3a=a191_0x277d,_0x3b1088=_0x1d831b();while(!![]){try{const _0xe5614=parseInt(_0x36de3a(0x1f0))/0x1+parseInt(_0x36de3a(0x229))/0x2+-parseInt(_0x36de3a(0x24c))/0x3*(parseInt(_0x36de3a(0x1f5))/0x4)+parseInt(_0x36de3a(0x201))/0x5*(-parseInt(_0x36de3a(0x253))/0x6)+parseInt(_0x36de3a(0x22c))/0x7+-parseInt(_0x36de3a(0x1f3))/0x8+parseInt(_0x36de3a(0x23c))/0x9;if(_0xe5614===_0x1bad32)break;else _0x3b1088['push'](_0x3b1088['shift']());}catch(_0x208cd7){_0x3b1088['push'](_0x3b1088['shift']());}}}(a191_0x9265,0x92a6e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a191_0x9265(){const _0x17111e=['type','isArray','Final\x20menu\x20visibility\x20readback\x20failed.','resourcesValid','values','visible','menuIds','296972izFijQ','map','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','4067832JqUkCV','menu_selector_not_found','4hkVNoY','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','path','plan','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20','before','\x20skipped,\x20','\x20failed.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','70OQGtCG','\x20updated,\x20','code','modelType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','beforeById','Menu\x20visibility\x20update\x20completed:\x20','updated','menu','str','push','targets','num','string','\x20menu(s);\x20skipped\x20','update-menu-visibility','sort','Selected\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','expectVisible','Response\x20was\x20lost\x20and\x20menu\x20','validation','rawFlags','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','get','filter','set','expected-count','join','stringify','plannedActions','pageType','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','/smartapi/menu/update','\x20menu(s),\x20expected\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','url','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','menus','1209814ntkMSL','warnings','failed','7302687PZQBrZ','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','\x20unchanged\x20menu(s).','cookie','label','\x20changed\x20unexpectedly.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','paths','split','resources','menu_verification_failed','depth','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','datasetId','update-recovery','flagMissing','10238517IPqCcF','parentId','isSafeInteger','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','appCode','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedVisible','menu_state_drift','message','boolean','verification','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','pageId','body','has','childrenIds','3259164nSfSkW','childrenCount','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','Requested\x20menu\x20visibility','byId','hash','380220FVkTMk','update','expectedCount','expect-visible','update\x20menu\x20visibility','length','Menu\x20path\x20selector\x20not\x20found:\x20','recovered','menu\x20list','true','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','datasetCode','menu_expected_count_mismatch','number','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'];a191_0x9265=function(){return _0x17111e;};return a191_0x9265();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x1f9834(0x1f7),'path':a191_0x1f9834(0x223)}];export const menuVisibilityUpdate={'service':a191_0x1f9834(0x209),'command':'visibility-update','description':a191_0x1f9834(0x1fa),'risk':'write','structuredErrors':!![],'flags':[{'name':a191_0x1f9834(0x24f),'type':a191_0x1f9834(0x20e),'description':a191_0x1f9834(0x1f2)},{'name':'paths','type':a191_0x1f9834(0x20e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x1f9834(0x1ee),'type':a191_0x1f9834(0x245),'required':!![],'description':a191_0x1f9834(0x250)},{'name':a191_0x1f9834(0x256),'type':a191_0x1f9834(0x245),'description':a191_0x1f9834(0x200)},{'name':a191_0x1f9834(0x21c),'type':a191_0x1f9834(0x260),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xe94008){parseInput(_0xe94008);},async 'dryRun'(_0x4c44e5){const _0x49e60e=a191_0x1f9834,_0x45865e=await buildPlan(_0x4c44e5,!![]),_0x2e3b8a=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x258)]??0x0,_0x187547=_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x20c)]['length']-_0x2e3b8a;return menuDryRunResult(_0x45865e[_0x49e60e(0x1f9)],{'method':_0x49e60e(0x1f7),'url':_0x49e60e(0x223),'body':{'updates':_0x45865e[_0x49e60e(0x1f9)][_0x49e60e(0x21f)]?.[_0x49e60e(0x1f1)](_0x34f710=>_0x34f710[_0x49e60e(0x249)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x2e3b8a+'\x20menu(s);\x20skip\x20'+_0x187547+_0x49e60e(0x22e)});},async 'execute'(_0x5e63df){const _0x24e40b=a191_0x1f9834,_0x3e5981=await buildPlan(_0x5e63df,![]);await recheckMutationSnapshot(_0x5e63df,_0x3e5981[_0x24e40b(0x1f9)],_0x24e40b(0x257));const _0x2cff58=[],_0x259c05=[],_0xb54b65=[];for(const _0x277678 of _0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)]){if(_0x277678[_0x24e40b(0x1fd)][_0x24e40b(0x1ee)]===_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]){_0x2cff58[_0x24e40b(0x20b)]({'id':_0x277678['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e63df[_0x24e40b(0x240)],_0x5e63df[_0x24e40b(0x22f)],{'id':_0x277678['id'],'visible':_0x3e5981[_0x24e40b(0x1f9)]['requestedVisible']}),_0x2cff58['push']({'id':_0x277678['id'],'updated':!![],'skipped':![]});}catch(_0x51a18b){const _0x56b2e7=mapMenuApiError(_0x51a18b,'update\x20visibility\x20for',_0x277678['id']);if(isMenuResponseLoss(_0x51a18b)&&_0x56b2e7[_0x24e40b(0x203)]!=='menu_permission_denied'){_0xb54b65[_0x24e40b(0x20b)](_0x277678['id']);continue;}_0x259c05[_0x24e40b(0x20b)]({'id':_0x277678['id'],'stage':_0x24e40b(0x254),'code':_0x56b2e7[_0x24e40b(0x203)],'message':_0x56b2e7[_0x24e40b(0x244)]});}}let _0x21f812;try{_0x21f812=await fetchMenuSnapshot(_0x5e63df[_0x24e40b(0x240)],_0x5e63df['cookie']);}catch(_0x113eee){const _0xa33811=describeMenuErrorCause(_0x113eee,'verify\x20menu\x20visibility\x20update'),_0x11c02c=_0xb54b65[_0x24e40b(0x1f1)](_0x58b3b8=>({'id':_0x58b3b8,'stage':'update-recovery','code':_0x24e40b(0x236),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x58b3b8+_0x24e40b(0x241),'requestedStateConfirmed':![],'recovered':![]})),_0x2f7964={'stage':_0x24e40b(0x246),'code':_0x24e40b(0x236),'message':_0x24e40b(0x1eb),'targetIds':_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x20c)][_0x24e40b(0x1f1)](_0x571042=>_0x571042['id']),'requestedStateConfirmed':![],..._0xa33811};throw menuFailure(asVerificationError(_0x113eee,_0x24e40b(0x261)),_0x3e5981['plan'],{'stage':_0x24e40b(0x246),'succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x11c02c,_0x2f7964],'warnings':[_0x24e40b(0x221)],'verification':{'status':_0x24e40b(0x22b),'recoveredCount':0x0,'lookupCommand':_0x24e40b(0x24e)}});}const _0x5a14e8=[];for(const _0x3304ac of _0x2cff58){const _0x3bcc9b=Number(_0x3304ac['id']),_0x2625c6=_0x3e5981[_0x24e40b(0x206)]['get'](_0x3bcc9b),_0x1e5a95=_0x21f812[_0x24e40b(0x251)]['get'](_0x3bcc9b);try{verifyVisibilityUpdate(_0x2625c6,_0x1e5a95,_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x242)]);}catch(_0x3ee1b8){const _0x571e28=asVerificationError(_0x3ee1b8,_0x24e40b(0x1fc)+_0x3bcc9b+_0x24e40b(0x232));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x3bcc9b,'stage':_0x24e40b(0x246),'code':_0x571e28[_0x24e40b(0x203)],'message':_0x571e28[_0x24e40b(0x244)],'requestedStateConfirmed':![]});}}for(const _0x53e5dc of _0xb54b65){const _0x2241b4=_0x3e5981[_0x24e40b(0x206)][_0x24e40b(0x219)](_0x53e5dc),_0x44770d=_0x21f812[_0x24e40b(0x251)]['get'](_0x53e5dc);try{verifyVisibilityUpdate(_0x2241b4,_0x44770d,_0x3e5981['plan'][_0x24e40b(0x242)]),_0x2cff58['push']({'id':_0x53e5dc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x284756){const _0x3cd7c6=asVerificationError(_0x284756,_0x24e40b(0x215)+_0x53e5dc+_0x24e40b(0x22d));_0x5a14e8[_0x24e40b(0x20b)]({'id':_0x53e5dc,'stage':_0x24e40b(0x23a),'code':_0x3cd7c6['code'],'message':_0x3cd7c6[_0x24e40b(0x244)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5a14e8[_0x24e40b(0x258)]>0x0){const _0x3418a6=_0x5a14e8[_0x24e40b(0x1f1)](_0x8048fb=>Number(_0x8048fb['id'])),_0x72d303=_0x2cff58[_0x24e40b(0x21a)](_0x56cc5b=>_0x56cc5b[_0x24e40b(0x25a)]===!![])[_0x24e40b(0x258)],_0x2e6ae4=menuError('menu_verification_failed','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3418a6['join'](',\x20')+'.',_0x24e40b(0x1fb));throw menuFailure(_0x2e6ae4,_0x3e5981[_0x24e40b(0x1f9)],{'stage':'verification','succeeded':_0x2cff58,'failedRecords':[..._0x259c05,..._0x5a14e8],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x24e40b(0x22b),..._0x3418a6[_0x24e40b(0x258)]===0x1?{'targetId':_0x3418a6[0x0]}:{'targetIds':_0x3418a6},'recoveredCount':_0x72d303,'lookupCommand':_0x24e40b(0x24e)}});}const _0x2dd25a=_0x2cff58[_0x24e40b(0x21a)](_0x1a4173=>_0x1a4173[_0x24e40b(0x208)]===!![])[_0x24e40b(0x258)],_0x2012b5=_0x2cff58[_0x24e40b(0x258)]-_0x2dd25a,_0x5f011c={..._0x3e5981[_0x24e40b(0x1f9)],'succeeded':_0x2cff58,'failed':_0x259c05,'warnings':_0x259c05[_0x24e40b(0x258)]>0x0?[..._0x3e5981['plan'][_0x24e40b(0x22a)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x3e5981[_0x24e40b(0x1f9)][_0x24e40b(0x22a)],'verification':{'checkedBy':_0x24e40b(0x25b),'snapshotHash':_0x21f812[_0x24e40b(0x252)],'matchesRequestedState':_0x259c05[_0x24e40b(0x258)]===0x0,'recoveredCount':_0xb54b65[_0x24e40b(0x258)]}};return{'ok':_0x259c05[_0x24e40b(0x258)]===0x0,'data':_0x5f011c,'message':_0x259c05['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x2dd25a+_0x24e40b(0x20f)+_0x2012b5+_0x24e40b(0x22e):_0x24e40b(0x207)+_0x2dd25a+_0x24e40b(0x202)+_0x2012b5+_0x24e40b(0x1fe)+_0x259c05['length']+_0x24e40b(0x1ff)};}};function parseInput(_0x58a911){const _0x45d9ce=a191_0x1f9834,_0x19128f=parseMenuIds(_0x58a911[_0x45d9ce(0x20a)]('menu-ids')),_0x507f4a=parseCsv(_0x58a911['str'](_0x45d9ce(0x233)));if(_0x19128f[_0x45d9ce(0x258)]===0x0&&_0x507f4a[_0x45d9ce(0x258)]===0x0)throw CliErrors[_0x45d9ce(0x216)](_0x45d9ce(0x213));const _0x3ed17b=parseBooleanFlag(_0x58a911,'visible',!![]),_0x2d2002=parseBooleanFlag(_0x58a911,_0x45d9ce(0x256),![]);let _0x26a327;if(hasFlag(_0x58a911,_0x45d9ce(0x21c))){_0x26a327=_0x58a911[_0x45d9ce(0x20d)]('expected-count');if(!Number['isSafeInteger'](_0x26a327)||_0x26a327<0x0)throw CliErrors['validation'](_0x45d9ce(0x205));}return{'menuIds':_0x19128f,'paths':_0x507f4a,'visible':_0x3ed17b,'expectVisible':_0x2d2002,'expectedCount':_0x26a327};}async function buildPlan(_0x349fb2,_0x445eb9){const _0x38c231=a191_0x1f9834,_0x3c691c=parseInput(_0x349fb2),_0x3e81ef=await fetchMutationSnapshot(_0x349fb2,_0x38c231(0x257)),_0x4c099b=selectTargets(_0x3e81ef[_0x38c231(0x228)],_0x3c691c['menuIds'],_0x3c691c[_0x38c231(0x233)]);if(_0x3c691c['expectedCount']!==undefined&&_0x4c099b[_0x38c231(0x258)]!==_0x3c691c[_0x38c231(0x255)])throw menuError(_0x38c231(0x25f),_0x38c231(0x212)+_0x4c099b[_0x38c231(0x258)]+_0x38c231(0x224)+_0x3c691c[_0x38c231(0x255)]+'.',_0x38c231(0x227));if(_0x3c691c[_0x38c231(0x214)]!==undefined){const _0x55f1f6=_0x4c099b[_0x38c231(0x21a)](_0x3c9430=>_0x3c9430[_0x38c231(0x1ee)]!==_0x3c691c['expectVisible']);if(_0x55f1f6[_0x38c231(0x258)]>0x0)throw menuError(_0x38c231(0x243),_0x38c231(0x25d)+_0x55f1f6[_0x38c231(0x1f1)](_0x394c6e=>_0x394c6e['id'])[_0x38c231(0x21d)](',\x20')+'.',_0x38c231(0x225));}const _0x80f8e6=_0x4c099b[_0x38c231(0x1f1)](_0xd0f184=>({'id':_0xd0f184['id'],'label':_0xd0f184[_0x38c231(0x230)],'path':_0xd0f184[_0x38c231(0x1f8)],'before':{'visible':_0xd0f184['visible']},'after':{'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x48f7ab=_0x80f8e6[_0x38c231(0x21a)](_0x34fc20=>_0x34fc20['before'][_0x38c231(0x1ee)]!==_0x3c691c[_0x38c231(0x1ee)])['map'](_0x47de4a=>({'stage':_0x38c231(0x210),'method':_0x38c231(0x1f7),'path':_0x38c231(0x223),'body':{'appCode':_0x349fb2[_0x38c231(0x240)],'id':_0x47de4a['id'],'visible':_0x3c691c[_0x38c231(0x1ee)]}})),_0x5c0759=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3c691c[_0x38c231(0x1ef)],'paths':_0x3c691c[_0x38c231(0x233)]},'before':{'menus':_0x4c099b[_0x38c231(0x1f1)](_0x4c2afd=>({'id':_0x4c2afd['id'],'path':_0x4c2afd[_0x38c231(0x1f8)],'visible':_0x4c2afd[_0x38c231(0x1ee)]}))},'after':{'menus':_0x4c099b['map'](_0x5c6354=>({'id':_0x5c6354['id'],'path':_0x5c6354[_0x38c231(0x1f8)],'visible':_0x3c691c[_0x38c231(0x1ee)]}))},'dryRun':_0x445eb9,'backend':[...BACKEND],'plannedActions':_0x48f7ab,'snapshotHash':_0x3e81ef[_0x38c231(0x252)],'warnings':_0x48f7ab[_0x38c231(0x258)]===0x0?[_0x38c231(0x238)]:[]});return{'plan':{..._0x5c0759,'requestedVisible':_0x3c691c[_0x38c231(0x1ee)],'targets':_0x80f8e6},'beforeById':new Map(_0x4c099b[_0x38c231(0x1f1)](_0x13d0ce=>[_0x13d0ce['id'],_0x13d0ce]))};}function a191_0x277d(_0x5a5286,_0x2abb65){_0x5a5286=_0x5a5286-0x1e9;const _0x926569=a191_0x9265();let _0x277d54=_0x926569[_0x5a5286];return _0x277d54;}function selectTargets(_0x12bb9b,_0x158b20,_0x5cebc9){const _0x171ee8=a191_0x1f9834,_0xc795f0=new Map(_0x12bb9b['map'](_0x553ebb=>[_0x553ebb['id'],_0x553ebb])),_0x93ad7d=new Map(),_0x118a06=_0x158b20[_0x171ee8(0x21a)](_0x50d347=>!_0xc795f0[_0x171ee8(0x24a)](_0x50d347));if(_0x118a06[_0x171ee8(0x258)]>0x0)throw menuError(_0x171ee8(0x1f4),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x118a06['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0xd90954 of _0x158b20){_0x93ad7d[_0x171ee8(0x21b)](_0xd90954,_0xc795f0['get'](_0xd90954));}for(const _0x2f5cfd of _0x5cebc9){const _0x4b2472=_0x12bb9b[_0x171ee8(0x21a)](_0x5a30d2=>_0x5a30d2[_0x171ee8(0x1f8)]===_0x2f5cfd);if(_0x4b2472[_0x171ee8(0x258)]===0x0)throw menuError('menu_selector_not_found',_0x171ee8(0x259)+JSON['stringify'](_0x2f5cfd)+'.',_0x171ee8(0x247));if(_0x4b2472['length']>0x1)throw menuError('menu_selector_ambiguous',_0x171ee8(0x218)+JSON[_0x171ee8(0x21e)](_0x2f5cfd)+'.',_0x171ee8(0x222)+_0x4b2472['map'](_0x20aaf9=>_0x20aaf9['id'])[_0x171ee8(0x21d)](',\x20')+'.');const _0x5ae648=_0x4b2472[0x0];_0x93ad7d['set'](_0x5ae648['id'],_0x5ae648);}return[..._0x93ad7d[_0x171ee8(0x1ed)]()];}function parseMenuIds(_0x109c87){const _0x78d233=a191_0x1f9834,_0xa45bf9=parseCsv(_0x109c87),_0x154ad6=_0xa45bf9[_0x78d233(0x1f1)](Number);if(_0x154ad6['some'](_0x199f96=>!Number[_0x78d233(0x23e)](_0x199f96)||_0x199f96<=0x0))throw CliErrors[_0x78d233(0x216)](_0x78d233(0x1f6));return[...new Set(_0x154ad6)];}function parseCsv(_0x15d93e){const _0x2fa172=a191_0x1f9834;return[...new Set(_0x15d93e[_0x2fa172(0x234)](',')['map'](_0x7ce362=>_0x7ce362['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x2a215c,_0x20183e,_0x3f7ca2){const _0x1f03c2=a191_0x1f9834;if(!hasFlag(_0x2a215c,_0x20183e)){if(_0x3f7ca2)throw CliErrors[_0x1f03c2(0x23b)](_0x20183e);return undefined;}const _0x3eace8=_0x2a215c[_0x1f03c2(0x217)][_0x20183e];if(_0x3eace8===!![]||_0x3eace8===![])return _0x3eace8;if(_0x3eace8===_0x1f03c2(0x25c))return!![];if(_0x3eace8==='false')return![];throw CliErrors[_0x1f03c2(0x216)]('--'+_0x20183e+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x51a590,_0xe25d64,_0x4e35fe){const _0x53431f=a191_0x1f9834;assertVerified(!!_0xe25d64,_0x53431f(0x1fc)+_0x51a590['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0xe25d64[_0x53431f(0x1ee)]===_0x4e35fe,'Menu\x20'+_0x51a590['id']+_0x53431f(0x23f));const _0x4392c6=[['id',_0xe25d64['id'],_0x51a590['id']],[_0x53431f(0x23d),_0xe25d64['parentId'],_0x51a590['parentId']],['depth',_0xe25d64[_0x53431f(0x237)],_0x51a590[_0x53431f(0x237)]],[_0x53431f(0x230),_0xe25d64[_0x53431f(0x230)],_0x51a590['label']],[_0x53431f(0x1f8),_0xe25d64[_0x53431f(0x1f8)],_0x51a590[_0x53431f(0x1f8)]],['url',_0xe25d64[_0x53431f(0x226)],_0x51a590[_0x53431f(0x226)]],[_0x53431f(0x1e9),_0xe25d64[_0x53431f(0x1e9)],_0x51a590[_0x53431f(0x1e9)]],['sort',_0xe25d64['sort'],_0x51a590[_0x53431f(0x211)]],['resources',_0xe25d64[_0x53431f(0x235)],_0x51a590[_0x53431f(0x235)]],['resourcesValid',_0xe25d64[_0x53431f(0x1ec)],_0x51a590[_0x53431f(0x1ec)]],[_0x53431f(0x24b),_0xe25d64[_0x53431f(0x24b)],_0x51a590[_0x53431f(0x24b)]],[_0x53431f(0x24d),_0xe25d64[_0x53431f(0x24d)],_0x51a590[_0x53431f(0x24d)]],[_0x53431f(0x248),_0xe25d64[_0x53431f(0x248)],_0x51a590['pageId']],[_0x53431f(0x220),_0xe25d64['pageType'],_0x51a590[_0x53431f(0x220)]],[_0x53431f(0x204),_0xe25d64['modelType'],_0x51a590[_0x53431f(0x204)]],[_0x53431f(0x239),_0xe25d64['datasetId'],_0x51a590[_0x53431f(0x239)]],[_0x53431f(0x25e),_0xe25d64['datasetCode'],_0x51a590[_0x53431f(0x25e)]]];for(const [_0x18e20a,_0x19e288,_0x57820d]of _0x4392c6){assertVerified(sameValue(_0x19e288,_0x57820d),_0x53431f(0x1fc)+_0x51a590['id']+'\x20'+_0x18e20a+_0x53431f(0x231));}}function sameValue(_0x2497d2,_0x271aec){const _0x4ff59c=a191_0x1f9834;if(Array[_0x4ff59c(0x1ea)](_0x2497d2)||Array[_0x4ff59c(0x1ea)](_0x271aec))return JSON[_0x4ff59c(0x21e)](_0x2497d2)===JSON[_0x4ff59c(0x21e)](_0x271aec);return _0x2497d2===_0x271aec;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x4a274a=a192_0x4991;(function(_0x561f4d,_0xf9dd21){const _0x2df071=a192_0x4991,_0x5cf384=_0x561f4d();while(!![]){try{const _0x402329=parseInt(_0x2df071(0x15f))/0x1*(parseInt(_0x2df071(0x14d))/0x2)+-parseInt(_0x2df071(0x147))/0x3+parseInt(_0x2df071(0x158))/0x4*(parseInt(_0x2df071(0x14a))/0x5)+-parseInt(_0x2df071(0x152))/0x6+-parseInt(_0x2df071(0x161))/0x7+parseInt(_0x2df071(0x149))/0x8+-parseInt(_0x2df071(0x14e))/0x9*(-parseInt(_0x2df071(0x15e))/0xa);if(_0x402329===_0xf9dd21)break;else _0x5cf384['push'](_0x5cf384['shift']());}catch(_0x1307fe){_0x5cf384['push'](_0x5cf384['shift']());}}}(a192_0x1e16,0x75a94));function a192_0x1e16(){const _0x5cdccd=['4777434KqToZg','readTimeout','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20','channelConfig','connectTimeout','97408KSTltH','appCode','verification','configName','channelType','planned','30ErBBRT','234659XKbVAc',';\x20do\x20not\x20resubmit\x20automatically.','4734464NXoPHE','endpointUrl','/notification/channel-config/create','configCode','create','POST',';\x20do\x20not\x20resubmit.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','write','2013231vdZvlZ','verified','885744GzJtTG','20MBIZrN','description','Created\x20notification\x20config\x20','4hkkfBy','5844492fXPiYs','notification_config_create_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','document'];a192_0x1e16=function(){return _0x5cdccd;};return a192_0x1e16();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a192_0x4991(_0x5dca52,_0x35d036){_0x5dca52=_0x5dca52-0x144;const _0x1e169a=a192_0x1e16();let _0x49912f=_0x1e169a[_0x5dca52];return _0x49912f;}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x4a274a(0x163);async function prepareCreate(_0x5af498){const _0x19807b=a192_0x4a274a,_0xbf0174=await readNotificationDocument(_0x5af498,_0x19807b(0x165)),_0x579eac=createMutationInput(_0x5af498[_0x19807b(0x159)],_0xbf0174);return{'document':_0xbf0174,'input':_0x579eac,'planned':projectNotificationConfig({'appCode':_0x5af498['appCode'],'configName':_0xbf0174['configName'],'channelType':_0xbf0174[_0x19807b(0x15c)],'endpointUrl':_0xbf0174[_0x19807b(0x162)],'channelConfig':_0xbf0174[_0x19807b(0x156)],'description':_0xbf0174[_0x19807b(0x14b)],'connectTimeout':_0xbf0174[_0x19807b(0x157)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xbf0174[_0x19807b(0x153)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':'config-create','description':a192_0x4a274a(0x145),'risk':a192_0x4a274a(0x146),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x29cc81){assertSingleNotificationSource(_0x29cc81);},async 'dryRun'(_0x462138){const _0x2a33ca=a192_0x4a274a,_0x3837cb=await prepareCreate(_0x462138),_0x361d29=notificationLookupCommand(_0x462138[_0x2a33ca(0x159)],_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15c)]);return asDryRunResult({'operation':_0x2a33ca(0x165),'selector':{'appCode':_0x462138[_0x2a33ca(0x159)],'configName':_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15b)],'channelType':_0x3837cb[_0x2a33ca(0x151)][_0x2a33ca(0x15c)]},'before':null,'after':_0x3837cb[_0x2a33ca(0x15d)],'dryRun':!![],'backend':{'method':_0x2a33ca(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2a33ca(0x15d),'lookupCommand':_0x361d29}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0xa131dd){const _0x36675d=a192_0x4a274a,_0x5e718b=await prepareCreate(_0xa131dd),_0x56a8b0=notificationLookupCommand(_0xa131dd[_0x36675d(0x159)],_0x5e718b[_0x36675d(0x151)][_0x36675d(0x15c)]);let _0x276366;try{_0x276366=await createNotificationChannelConfig(_0x5e718b['input']);}catch(_0x13de42){if(isPlatformTransportFailure(_0x13de42))throw notificationError(_0x36675d(0x14f),_0x36675d(0x154),'Inspect\x20with\x20'+_0x56a8b0+_0x36675d(0x144));throw safeApiFailure('create','mutation','Inspect\x20with\x20'+_0x56a8b0+_0x36675d(0x150));}if(!Number['isSafeInteger'](_0x276366)||_0x276366<=0x0)throw notificationError(_0x36675d(0x14f),'Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',_0x36675d(0x155)+_0x56a8b0+';\x20do\x20not\x20resubmit.');let _0x37604a;try{const _0x5b4061=await getNotificationChannelConfig(_0x276366,_0xa131dd[_0x36675d(0x159)]);_0x37604a=normalizeExactNotificationConfig(_0x5b4061,_0x276366,_0xa131dd[_0x36675d(0x159)]);}catch{throw safeApiFailure('create',_0x36675d(0x15a),_0x36675d(0x155)+_0x56a8b0+_0x36675d(0x160));}return{'ok':!![],'data':{'operation':_0x36675d(0x165),'selector':{'appCode':_0x37604a[_0x36675d(0x159)],'id':_0x37604a['id'],'configCode':_0x37604a[_0x36675d(0x164)],'configName':_0x37604a[_0x36675d(0x15b)],'channelType':_0x37604a[_0x36675d(0x15c)]},'before':null,'after':projectNotificationConfig(_0x37604a),'dryRun':![],'backend':{'method':_0x36675d(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x36675d(0x148),'lookupCommand':_0x56a8b0}},'message':_0x36675d(0x14c)+_0x37604a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a193_0xf4b8(){const _0x9b8779=['1299516WLOJFR','mutation','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','2599544buwpPT','1944258CgTaEB','planned','3030876BykKpE','Inspect\x20with\x20','6421440LHojft','POST','channelType','before',';\x20do\x20not\x20resubmit\x20automatically.','1116311ArBvaF','Notification\x20config\x20','some','notification','/notification/channel-config/delete','high-risk-write','unshift','appCode','delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3939309jhwyVW','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','notification_config_delete_verification_failed','Deleted\x20notification\x20config\x20'];a193_0xf4b8=function(){return _0x9b8779;};return a193_0xf4b8();}const a193_0x1a52e3=a193_0x3d8e;(function(_0x4efb73,_0x498b3b){const _0x28843b=a193_0x3d8e,_0x42cfb5=_0x4efb73();while(!![]){try{const _0xcc4759=parseInt(_0x28843b(0xdd))/0x1+parseInt(_0x28843b(0xe2))/0x2+-parseInt(_0x28843b(0xd9))/0x3+-parseInt(_0x28843b(0xe1))/0x4+parseInt(_0x28843b(0xe6))/0x5+-parseInt(_0x28843b(0xe4))/0x6+-parseInt(_0x28843b(0xce))/0x7;if(_0xcc4759===_0x498b3b)break;else _0x42cfb5['push'](_0x42cfb5['shift']());}catch(_0x122e33){_0x42cfb5['push'](_0x42cfb5['shift']());}}}(a193_0xf4b8,0xe2a45));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a193_0x3d8e(_0x123ac7,_0x40ebe7){_0x123ac7=_0x123ac7-0xca;const _0xf4b864=a193_0xf4b8();let _0x3d8ea6=_0xf4b864[_0x123ac7];return _0x3d8ea6;}const DELETE_PATH=a193_0x1a52e3(0xd2),REFERENCE_WARNING=a193_0x1a52e3(0xda);async function prepareDelete(_0x39eba2){const _0x257976=a193_0x1a52e3,_0x1528b3=readNotificationId(_0x39eba2),_0x136e71=await requireExactNotificationConfig(_0x39eba2[_0x257976(0xd5)],_0x1528b3,'delete');return{'id':_0x1528b3,'before':_0x136e71};}export const notificationConfigDelete={'service':a193_0x1a52e3(0xd1),'command':a193_0x1a52e3(0xe0),'description':a193_0x1a52e3(0xdf),'risk':a193_0x1a52e3(0xd3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x374078){readNotificationId(_0x374078),requireNotificationExplicitYes(_0x374078);},async 'dryRun'(_0x266d1e){const _0x37ee19=a193_0x1a52e3,_0xa9b5e6=await prepareDelete(_0x266d1e),_0x4866d0=notificationLookupCommand(_0x266d1e[_0x37ee19(0xd5)],_0xa9b5e6[_0x37ee19(0xcc)][_0x37ee19(0xcb)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0xa9b5e6[_0x37ee19(0xcc)]),'before':projectNotificationConfig(_0xa9b5e6[_0x37ee19(0xcc)]),'after':null,'dryRun':!![],'backend':{'method':_0x37ee19(0xca),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x37ee19(0xe3),'lookupCommand':_0x4866d0}},{'method':_0x37ee19(0xca),'url':DELETE_PATH});},async 'execute'(_0x36eb35){const _0x364f5d=a193_0x1a52e3;requireNotificationExplicitYes(_0x36eb35);const _0x4e697e=await prepareDelete(_0x36eb35),_0x19f704=notificationLookupCommand(_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)][_0x364f5d(0xcb)]);let _0x2d32f2=![];try{await deleteNotificationChannelConfig(_0x4e697e['id'],_0x36eb35[_0x364f5d(0xd5)]);}catch(_0x12dd65){if(!isPlatformTransportFailure(_0x12dd65))throw safeApiFailure(_0x364f5d(0xd6),_0x364f5d(0xde),_0x364f5d(0xe5)+_0x19f704+_0x364f5d(0xd8));_0x2d32f2=!![];}let _0x2c9a52;try{_0x2c9a52=await listNotificationChannelConfigs(_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)]['channelType']),validateNotificationDeleteReadback(_0x2c9a52,_0x36eb35[_0x364f5d(0xd5)],_0x4e697e[_0x364f5d(0xcc)][_0x364f5d(0xcb)]);}catch{throw notificationError(_0x2d32f2?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x364f5d(0xcf)+_0x4e697e['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x364f5d(0xe5)+_0x19f704+_0x364f5d(0xcd));}if(_0x2c9a52[_0x364f5d(0xd0)](_0x1fe4bf=>_0x1fe4bf['id']===_0x4e697e['id']))throw notificationError(_0x2d32f2?'notification_config_delete_outcome_unknown':_0x364f5d(0xdb),_0x364f5d(0xcf)+_0x4e697e['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x19f704+_0x364f5d(0xcd));const _0x290285=[REFERENCE_WARNING];return _0x2d32f2&&_0x290285[_0x364f5d(0xd4)](_0x364f5d(0xd7)),{'ok':!![],'data':{'operation':_0x364f5d(0xd6),'selector':notificationSelector(_0x4e697e[_0x364f5d(0xcc)]),'before':projectNotificationConfig(_0x4e697e[_0x364f5d(0xcc)]),'after':null,'dryRun':![],'backend':{'method':_0x364f5d(0xca),'path':DELETE_PATH},'warnings':_0x290285,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2d32f2,'lookupCommand':_0x19f704}},'message':_0x364f5d(0xdc)+_0x4e697e['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x319cca=a194_0x509b;(function(_0x508f6e,_0xe4c34a){const _0x3cbabf=a194_0x509b,_0x2375f2=_0x508f6e();while(!![]){try{const _0x56453f=parseInt(_0x3cbabf(0xae))/0x1+parseInt(_0x3cbabf(0xb7))/0x2+parseInt(_0x3cbabf(0xba))/0x3*(parseInt(_0x3cbabf(0xbb))/0x4)+-parseInt(_0x3cbabf(0xc0))/0x5+-parseInt(_0x3cbabf(0xa9))/0x6+-parseInt(_0x3cbabf(0xaf))/0x7+-parseInt(_0x3cbabf(0xbe))/0x8*(-parseInt(_0x3cbabf(0xab))/0x9);if(_0x56453f===_0xe4c34a)break;else _0x2375f2['push'](_0x2375f2['shift']());}catch(_0xe99db6){_0x2375f2['push'](_0x2375f2['shift']());}}}(a194_0x30e8,0xbf6f5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x509b(_0xdfee80,_0x53b3c0){_0xdfee80=_0xdfee80-0xa8;const _0x30e8da=a194_0x30e8();let _0x509bee=_0x30e8da[_0xdfee80];return _0x509bee;}import{CliErrors}from'../../errors.js';function a194_0x30e8(){const _0x10bdd7=['List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','399192ODpRQB','read','9dOMYym','bool','appCode','1338149CYVEtO','9567159TXVRuN','boolean','str','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','length','config-list','Found\x20','1266728BpAoyS','type','notification','387AnTXhV','11376YHNKGk','flat','all','2361928pUIndg','map','2081220LQVRRt','validation'];a194_0x30e8=function(){return _0x10bdd7;};return a194_0x30e8();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x319cca(0xb9),'command':a194_0x319cca(0xb5),'description':a194_0x319cca(0xa8),'risk':a194_0x319cca(0xaa),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x319cca(0xbd),'type':a194_0x319cca(0xb0),'default':![],'description':a194_0x319cca(0xb2)}],async 'validate'(_0xd28ce6){const _0x1b4a41=a194_0x319cca;if(_0xd28ce6[_0x1b4a41(0xac)](_0x1b4a41(0xbd))&&_0xd28ce6[_0x1b4a41(0xb1)](_0x1b4a41(0xb8))['trim']())throw CliErrors[_0x1b4a41(0xc1)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0xd28ce6[_0x1b4a41(0xac)](_0x1b4a41(0xbd)))return;readNotificationChannelType(_0xd28ce6);},async 'execute'(_0x1ff9e2){const _0x2dd974=a194_0x319cca;if(_0x1ff9e2[_0x2dd974(0xac)]('all')){const _0x30e88a=await Promise[_0x2dd974(0xbd)](NOTIFICATION_CHANNEL_TYPES[_0x2dd974(0xbf)](_0x36253b=>listNotificationChannelConfigs(_0x1ff9e2[_0x2dd974(0xad)],_0x36253b))),_0x3fe446=_0x30e88a[_0x2dd974(0xbc)]()[_0x2dd974(0xbf)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1ff9e2['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x3fe446['length'],'configs':_0x3fe446},'message':_0x2dd974(0xb6)+_0x3fe446[_0x2dd974(0xb4)]+_0x2dd974(0xb3)};}const _0x41bca8=readNotificationChannelType(_0x1ff9e2),_0x1cac5b=await listNotificationChannelConfigs(_0x1ff9e2[_0x2dd974(0xad)],_0x41bca8),_0x182ed7=_0x1cac5b['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1ff9e2[_0x2dd974(0xad)],'channelType':_0x41bca8,'count':_0x182ed7[_0x2dd974(0xb4)],'configs':_0x182ed7},'message':_0x2dd974(0xb6)+_0x182ed7[_0x2dd974(0xb4)]+'\x20'+_0x41bca8+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a195_0x42e126=a195_0x1761;function a195_0x34b0(){const _0x3a8889=['112330URmLue','high-risk-write','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','/notification/channel-config/update','336LYsFfM','8108856bvaBqq','notification_config_update_verification_unavailable','\x20with\x20','Inspect\x20with\x20--id\x20',';\x20do\x20not\x20resubmit\x20automatically.','verified','4mpqVsb','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','7603002wMhboL','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','planned','14816856rdbxSK','update','payload','mutation','config-update','allMatch','channelType','appCode','13MsmkXI','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','provesChange','29588RZDIPQ','30543410sOsRJv','Notification\x20config\x20','patch','11AYSFDA','notification_config_update_outcome_unknown','before','4938549WxTaOc','POST','\x20via\x20'];a195_0x34b0=function(){return _0x3a8889;};return a195_0x34b0();}(function(_0x25b6f9,_0x47fc24){const _0x6f740a=a195_0x1761,_0x11f346=_0x25b6f9();while(!![]){try{const _0x3277e7=parseInt(_0x6f740a(0x190))/0x1*(-parseInt(_0x6f740a(0x193))/0x2)+parseInt(_0x6f740a(0x174))/0x3*(-parseInt(_0x6f740a(0x183))/0x4)+parseInt(_0x6f740a(0x177))/0x5*(parseInt(_0x6f740a(0x17c))/0x6)+parseInt(_0x6f740a(0x17d))/0x7+-parseInt(_0x6f740a(0x188))/0x8+-parseInt(_0x6f740a(0x185))/0x9+-parseInt(_0x6f740a(0x194))/0xa*(-parseInt(_0x6f740a(0x197))/0xb);if(_0x3277e7===_0x47fc24)break;else _0x11f346['push'](_0x11f346['shift']());}catch(_0x110672){_0x11f346['push'](_0x11f346['shift']());}}}(a195_0x34b0,0xe461f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a195_0x1761(_0x14e868,_0x5bc139){_0x14e868=_0x14e868-0x173;const _0x34b019=a195_0x34b0();let _0x17617=_0x34b019[_0x14e868];return _0x17617;}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x42e126(0x17b);async function prepareUpdate(_0x2de4ff){const _0x14cf14=a195_0x42e126,_0x414a53=readNotificationId(_0x2de4ff),_0x21d8bc=await readNotificationDocument(_0x2de4ff,_0x14cf14(0x189)),_0x428083=await requireExactNotificationConfig(_0x2de4ff[_0x14cf14(0x18f)],_0x414a53,_0x14cf14(0x189));return{'id':_0x414a53,'patch':_0x21d8bc,'before':_0x428083,'payload':mergeUpdateInput(_0x428083,_0x21d8bc),'planned':plannedUpdateProjection(_0x428083,_0x21d8bc)};}export const notificationConfigUpdate={'service':a195_0x42e126(0x179),'command':a195_0x42e126(0x18c),'description':a195_0x42e126(0x191),'risk':a195_0x42e126(0x178),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3cd46a){readNotificationId(_0x3cd46a),assertSingleNotificationSource(_0x3cd46a),requireNotificationExplicitYes(_0x3cd46a);},async 'dryRun'(_0x548d5b){const _0x43da8c=a195_0x42e126,_0x5746a1=await prepareUpdate(_0x548d5b),_0x4ccab7=notificationLookupCommand(_0x548d5b[_0x43da8c(0x18f)],_0x5746a1[_0x43da8c(0x173)][_0x43da8c(0x18e)]);return asDryRunResult({'operation':_0x43da8c(0x189),'selector':notificationSelector(_0x5746a1[_0x43da8c(0x173)]),'before':projectNotificationConfig(_0x5746a1['before']),'after':_0x5746a1[_0x43da8c(0x187)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x4ccab7}},{'method':_0x43da8c(0x175),'url':UPDATE_PATH});},async 'execute'(_0x2f4507){const _0x229117=a195_0x42e126;requireNotificationExplicitYes(_0x2f4507);const _0x152505=await prepareUpdate(_0x2f4507),_0x19ec00=notificationLookupCommand(_0x2f4507[_0x229117(0x18f)],_0x152505[_0x229117(0x173)][_0x229117(0x18e)]);let _0x5dcbd4=![];try{await updateNotificationChannelConfig(_0x152505[_0x229117(0x18a)]);}catch(_0x5d955){if(!isPlatformTransportFailure(_0x5d955))throw safeApiFailure(_0x229117(0x189),_0x229117(0x18b),'Inspect\x20ID\x20'+_0x152505['id']+_0x229117(0x17f)+_0x19ec00+_0x229117(0x17a));_0x5dcbd4=!![];}let _0x2d902b;try{const _0x4b376a=await getNotificationChannelConfig(_0x152505['id'],_0x2f4507[_0x229117(0x18f)]);_0x2d902b=normalizeExactNotificationConfig(_0x4b376a,_0x152505['id'],_0x2f4507[_0x229117(0x18f)]);}catch{throw notificationError(_0x5dcbd4?_0x229117(0x198):_0x229117(0x17e),_0x229117(0x195)+_0x152505['id']+_0x229117(0x184),_0x229117(0x180)+_0x152505['id']+'\x20via\x20'+_0x19ec00+_0x229117(0x181));}const _0x4e78c1=requestedSafeFieldsMatch(_0x152505[_0x229117(0x173)],_0x2d902b,_0x152505[_0x229117(0x196)]);if(!_0x4e78c1[_0x229117(0x18d)]||_0x5dcbd4&&!_0x4e78c1[_0x229117(0x192)])throw notificationError(_0x5dcbd4?_0x229117(0x198):'notification_config_update_verification_failed',_0x229117(0x195)+_0x152505['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20with\x20--id\x20'+_0x152505['id']+_0x229117(0x176)+_0x19ec00+_0x229117(0x181));const _0x1a216e=_0x5dcbd4?[_0x229117(0x186)]:[];return{'ok':!![],'data':{'operation':_0x229117(0x189),'selector':notificationSelector(_0x2d902b),'before':projectNotificationConfig(_0x152505[_0x229117(0x173)]),'after':projectNotificationConfig(_0x2d902b),'dryRun':![],'backend':{'method':_0x229117(0x175),'path':UPDATE_PATH},'warnings':_0x1a216e,'verification':{'status':_0x229117(0x182),'recoveredAfterUnknownResponse':_0x5dcbd4,'verifiedFields':_0x4e78c1['verifiedFields'],'lookupCommand':_0x19ec00}},'message':'Updated\x20notification\x20config\x20'+_0x2d902b['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d11b4,_0x342b8f){const _0xa98aa3=a196_0x3f3e,_0x22a4f1=_0x3d11b4();while(!![]){try{const _0xf2e47c=-parseInt(_0xa98aa3(0xf3))/0x1+-parseInt(_0xa98aa3(0xf2))/0x2*(parseInt(_0xa98aa3(0xf9))/0x3)+parseInt(_0xa98aa3(0xf0))/0x4+-parseInt(_0xa98aa3(0xf4))/0x5*(parseInt(_0xa98aa3(0xf8))/0x6)+-parseInt(_0xa98aa3(0xfa))/0x7*(parseInt(_0xa98aa3(0xf5))/0x8)+-parseInt(_0xa98aa3(0xf6))/0x9+-parseInt(_0xa98aa3(0xf7))/0xa*(-parseInt(_0xa98aa3(0xf1))/0xb);if(_0xf2e47c===_0x342b8f)break;else _0x22a4f1['push'](_0x22a4f1['shift']());}catch(_0x305208){_0x22a4f1['push'](_0x22a4f1['shift']());}}}(a196_0x4e50,0xbbcd9));function a196_0x3f3e(_0x43d3c3,_0x197c5b){_0x43d3c3=_0x43d3c3-0xf0;const _0x4e505f=a196_0x4e50();let _0x3f3e7a=_0x4e505f[_0x43d3c3];return _0x3f3e7a;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a196_0x4e50(){const _0x38adb9=['66tEJtVd','3BliYuq','47033uobcBm','2418348ToCXtA','22649XrNBex','2255146NjBNMX','876062atGroN','654745VhJKrY','1576ZnMpGO','6179760SjaoiC','27290JizrEk'];a196_0x4e50=function(){return _0x38adb9;};return a196_0x4e50();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x3209b2=a197_0x4922;(function(_0x11cf14,_0x2c8f39){const _0x267c78=a197_0x4922,_0x2af69d=_0x11cf14();while(!![]){try{const _0x4bf867=parseInt(_0x267c78(0xf7))/0x1+-parseInt(_0x267c78(0xc7))/0x2*(-parseInt(_0x267c78(0xfb))/0x3)+parseInt(_0x267c78(0x10b))/0x4+parseInt(_0x267c78(0xf0))/0x5*(-parseInt(_0x267c78(0x10e))/0x6)+parseInt(_0x267c78(0x111))/0x7+parseInt(_0x267c78(0xd0))/0x8*(-parseInt(_0x267c78(0xf8))/0x9)+parseInt(_0x267c78(0xdf))/0xa;if(_0x4bf867===_0x2c8f39)break;else _0x2af69d['push'](_0x2af69d['shift']());}catch(_0x3d7c44){_0x2af69d['push'](_0x2af69d['shift']());}}}(a197_0x357c,0x87ff4));import{readFile}from'node:fs/promises';function a197_0x4922(_0x5637cb,_0xcb3be3){_0x5637cb=_0x5637cb-0xc6;const _0x357c6e=a197_0x357c();let _0x4922ef=_0x357c6e[_0x5637cb];return _0x4922ef;}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=[a197_0x3209b2(0x137),a197_0x3209b2(0x10c),'DINGTALK',a197_0x3209b2(0xe5),a197_0x3209b2(0xf3)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3209b2(0xd8),a197_0x3209b2(0x142),'endpointUrl',a197_0x3209b2(0xf5),a197_0x3209b2(0xd2),a197_0x3209b2(0x103),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x3209b2(0x12a),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3209b2(0xc8),a197_0x3209b2(0xeb),a197_0x3209b2(0x146),'bccList','replyTo',a197_0x3209b2(0xd3),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3209b2(0x135),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0xe3)},{'name':a197_0x3209b2(0x10d),'type':a197_0x3209b2(0x145),'required':![],'default':![],'description':a197_0x3209b2(0xdb)},{'name':a197_0x3209b2(0xd4),'type':a197_0x3209b2(0x11d),'required':![],'description':a197_0x3209b2(0x112)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3209b2(0xcc),'required':!![],'description':a197_0x3209b2(0x116)};function a197_0x357c(){const _0x5f3e05=['utf8','isSafeInteger','notification_config_field_invalid','notification_config_update_empty','yes','997576sKRUyf','FEISHU','stdin','1379688ulplqV','\x20has\x20an\x20invalid\x20appCode.','Unknown\x20notification\x20JSON\x20field\x20\x22','4282957mxWeSn','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','environment\x20variable\x20','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','Notification\x20config\x20list\x20item\x20','\x20has\x20an\x20invalid\x20channelType.','\x20is\x20missing\x20required\x20field\x20\x22','\x20has\x20invalid\x20field\x20\x22','readTimeout','string','\x22\x20must\x20be\x20','str','preflight','\x20characters.','channelConfigRaw','appCode','apiError','dry-run','isArray','Create\x20JSON\x20requires\x20field\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20failed.','configCode','Notification\x20config\x20','keys','a\x20non-empty\x20string','notification_config_confirmation_required','name','includes','endpointUrl','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','setEncoding','file','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','EMAIL','kind','call','notification_config_source_unavailable','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','path','failed','notification_config_field_unknown','channelType','updateTime','file\x20','boolean','ccList','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','trim','4652nJlfSc','emailTargets','notification_config_field_forbidden','\x22\x20is\x20forbidden.','every','number','endpointUrl:null','prototype','object','387848bEVAPy','parse','description','subjectPrefix','from-env','has','length','Notification\x20JSON\x20from\x20','configName','hasOwnProperty','\x20must\x20be\x20an\x20object.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20JSON\x20object','351470sJADcL','a\x20supported\x20string','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22channelType\x22.','WECOM','env','Invalid\x20--','validation','messageTemplate','push','recipients','a\x20JSON\x20object\x20or\x20null','bool','join','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','15QaBmmY','update','Notification\x20JSON\x20channelConfig\x20field\x20\x22','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','channelConfig','stringify','575889iLmTnX','63voRRgr','Item\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','147ObwPtf','\x20--type\x20','notification_config_id_invalid','num','endpointUrlRaw','Allowed\x20values:\x20','create','notification_config_','connectTimeout','a\x20string\x20or\x20null','type'];a197_0x357c=function(){return _0x5f3e05;};return a197_0x357c();}export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x6859df,_0x25db86,_0x4802bd){return new CliError(_0x6859df,0x1,_0x25db86,_0x4802bd);}export function readNotificationId(_0x2ab48f){const _0x33ae6c=a197_0x3209b2,_0x2669e8=_0x2ab48f[_0x33ae6c(0xfe)]('id');if(!Number[_0x33ae6c(0x107)](_0x2669e8)||_0x2669e8<=0x0)throw notificationError(_0x33ae6c(0xfd),_0x33ae6c(0x128));return _0x2669e8;}export function requireNotificationExplicitYes(_0x24f58f){const _0x42e5f8=a197_0x3209b2;if(_0x24f58f['bool'](_0x42e5f8(0x125))||_0x24f58f[_0x42e5f8(0xed)](_0x42e5f8(0x10a)))return;throw notificationError(_0x42e5f8(0x12e),_0x42e5f8(0xdc),_0x42e5f8(0x148));}export function readNotificationChannelType(_0x54c40c,_0x4c1dab=a197_0x3209b2(0x105),_0x54edb3=a197_0x3209b2(0x137)){const _0x17eb0b=a197_0x3209b2,_0x32c39b=_0x54c40c[_0x17eb0b(0x11f)](_0x4c1dab)[_0x17eb0b(0xc6)]()||_0x54edb3;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x32c39b))throw CliErrors['validation'](_0x17eb0b(0xe7)+_0x4c1dab+':\x20'+_0x32c39b,_0x17eb0b(0x100)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x32c39b;}export function assertSingleNotificationSource(_0x3f372d){const _0x24e148=a197_0x3209b2,_0x32135a=[],_0x2ad923=_0x3f372d[_0x24e148(0x11f)]('file')['trim']();if(_0x2ad923)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0x135),'path':_0x2ad923});if(_0x3f372d['bool']('stdin'))_0x32135a['push']({'kind':_0x24e148(0x10d)});const _0x33aa75=_0x3f372d[_0x24e148(0x11f)]('from-env')[_0x24e148(0xc6)]();if(_0x33aa75)_0x32135a[_0x24e148(0xea)]({'kind':_0x24e148(0xe6),'name':_0x33aa75});if(_0x32135a[_0x24e148(0xd6)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x32135a['length']>0x1)throw CliErrors[_0x24e148(0xe8)](_0x24e148(0xfa),_0x24e148(0x13c));return _0x32135a[0x0];}export async function readNotificationDocument(_0x582c59,_0x38aa77){const _0x2029a2=a197_0x3209b2,_0x5c02a5=assertSingleNotificationSource(_0x582c59),_0xa93d18=_0x5c02a5[_0x2029a2(0x138)]==='file'?_0x2029a2(0x144)+_0x5c02a5[_0x2029a2(0x13f)]:_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)?_0x2029a2(0x115)+_0x5c02a5[_0x2029a2(0x12f)]:'stdin';let _0x4d2944;try{if(_0x5c02a5[_0x2029a2(0x138)]==='file')_0x4d2944=await readFile(_0x5c02a5[_0x2029a2(0x13f)],'utf8');else{if(_0x5c02a5[_0x2029a2(0x138)]===_0x2029a2(0xe6)){if(!(_0x5c02a5[_0x2029a2(0x12f)]in process.env))throw notificationError(_0x2029a2(0x13a),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x5c02a5[_0x2029a2(0x12f)]);_0x4d2944=process.env[_0x5c02a5.name]??'';}else _0x4d2944=await readStdin();}}catch(_0x365ebf){if(_0x365ebf instanceof CliError)throw _0x365ebf;throw notificationError(_0x2029a2(0x13a),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xa93d18+'.');}let _0x1ebd47;try{_0x1ebd47=JSON[_0x2029a2(0xd1)](_0x4d2944);}catch{throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1ebd47))throw notificationError(_0x2029a2(0x114),_0x2029a2(0xd7)+_0xa93d18+_0x2029a2(0xda));return validateNotificationDocument(_0x1ebd47,_0x38aa77);}export function projectNotificationListConfig(_0x2fe0fa,_0x393dce){const _0x2052df=a197_0x3209b2;return{'id':typeof _0x2fe0fa['id']===_0x2052df(0xcc)?_0x2fe0fa['id']:null,'configCode':requireResponseString(_0x2fe0fa[_0x2052df(0x12a)],_0x2052df(0x12a),_0x393dce),'configName':requireResponseString(_0x2fe0fa[_0x2052df(0xd8)],_0x2052df(0xd8),_0x393dce),'channelType':requireResponseString(_0x2fe0fa[_0x2052df(0x142)],_0x2052df(0x142),_0x393dce),'description':normalizeNullableString(_0x2fe0fa[_0x2052df(0xd2)]),'createTime':normalizeNullableString(_0x2fe0fa['createTime']),'updateTime':normalizeNullableString(_0x2fe0fa[_0x2052df(0x143)])};}export function normalizeExactNotificationConfig(_0x20b57d,_0x2b5882,_0x10fb4f){const _0x5e6597=a197_0x3209b2;if(!Number[_0x5e6597(0x107)](_0x20b57d['id'])||_0x20b57d['id']!==_0x2b5882)throw notificationError(_0x5e6597(0x117),_0x5e6597(0x133)+_0x2b5882+'.');if(_0x20b57d[_0x5e6597(0x123)]!==_0x10fb4f)throw notificationError('notification_config_response_invalid',_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0x147));const _0x302781=requireExactString(_0x20b57d['configName'],_0x5e6597(0xd8),_0x2b5882),_0xe5177a=requireExactString(_0x20b57d['configCode'],_0x5e6597(0x12a),_0x2b5882),_0x542ca0=requireExactString(_0x20b57d[_0x5e6597(0x142)],_0x5e6597(0x142),_0x2b5882);if(!NOTIFICATION_CHANNEL_TYPES[_0x5e6597(0x130)](_0x542ca0))throw notificationError(_0x5e6597(0x117),_0x5e6597(0x12b)+_0x2b5882+_0x5e6597(0xf4));const _0x27c405=responseNullableString(_0x20b57d[_0x5e6597(0x131)],'endpointUrl',_0x2b5882),_0x33c726=responseNullableString(_0x20b57d[_0x5e6597(0xf5)],_0x5e6597(0xf5),_0x2b5882),_0x2d2e70=responseNullableString(_0x20b57d['description'],'description',_0x2b5882),_0xeaa1bb=responseNullableTimeout(_0x20b57d[_0x5e6597(0x103)],_0x5e6597(0x103),_0x2b5882),_0x2e7a78=responseNullableTimeout(_0x20b57d['readTimeout'],_0x5e6597(0x11c),_0x2b5882);return{'id':_0x2b5882,'appCode':_0x10fb4f,'configCode':_0xe5177a,'configName':_0x302781,'channelType':_0x542ca0,'endpointUrl':redactSensitive(_0x27c405),'channelConfig':redactSensitive(_0x33c726),'description':_0x2d2e70,'connectTimeout':_0xeaa1bb,'readTimeout':_0x2e7a78,'endpointUrlRaw':_0x27c405,'channelConfigRaw':_0x33c726};}export async function requireExactNotificationConfig(_0x202d83,_0x5de416,_0x1e5cdf){const _0x310f5e=a197_0x3209b2;let _0x2ee5ec;try{_0x2ee5ec=await getNotificationChannelConfig(_0x5de416,_0x202d83);}catch{throw safeApiFailure(_0x1e5cdf,_0x310f5e(0x120),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x202d83+_0x310f5e(0xe1));}return normalizeExactNotificationConfig(_0x2ee5ec,_0x5de416,_0x202d83);}export function projectNotificationConfig(_0x14ac34){const _0x5eb727=a197_0x3209b2;return{'id':_0x14ac34['id']??null,'appCode':_0x14ac34[_0x5eb727(0x123)],'configCode':_0x14ac34[_0x5eb727(0x12a)]??null,'configName':_0x14ac34[_0x5eb727(0xd8)],'channelType':_0x14ac34['channelType'],'endpointUrl':redactSensitive(_0x14ac34[_0x5eb727(0x131)]),'channelConfig':redactSensitive(_0x14ac34[_0x5eb727(0xf5)]),'description':_0x14ac34[_0x5eb727(0xd2)]??null,'connectTimeout':_0x14ac34[_0x5eb727(0x103)]??null,'readTimeout':_0x14ac34[_0x5eb727(0x11c)]??null};}export function notificationSelector(_0x2c0df1){const _0x4083ae=a197_0x3209b2;return{'appCode':_0x2c0df1[_0x4083ae(0x123)],'id':_0x2c0df1['id'],'configCode':_0x2c0df1[_0x4083ae(0x12a)],'configName':_0x2c0df1[_0x4083ae(0xd8)],'channelType':_0x2c0df1[_0x4083ae(0x142)]};}export function createMutationInput(_0x361f39,_0x7ae4d2){const _0x371758=a197_0x3209b2;return{'appCode':_0x361f39,'configName':_0x7ae4d2['configName'],'channelType':_0x7ae4d2[_0x371758(0x142)],...hasOwn(_0x7ae4d2,_0x371758(0x131))?{'endpointUrl':_0x7ae4d2[_0x371758(0x131)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0xf5))?{'channelConfig':serializeChannelConfig(_0x7ae4d2[_0x371758(0xf5)])}:{},...hasOwn(_0x7ae4d2,_0x371758(0xd2))?{'description':_0x7ae4d2[_0x371758(0xd2)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x103))?{'connectTimeout':_0x7ae4d2[_0x371758(0x103)]}:{},...hasOwn(_0x7ae4d2,_0x371758(0x11c))?{'readTimeout':_0x7ae4d2['readTimeout']}:{}};}export function mergeUpdateInput(_0xf536d2,_0x44c7d5){const _0x121b06=a197_0x3209b2;return{'id':_0xf536d2['id'],'appCode':_0xf536d2[_0x121b06(0x123)],'configName':_0x44c7d5['configName']??_0xf536d2[_0x121b06(0xd8)],'channelType':_0x44c7d5[_0x121b06(0x142)]??_0xf536d2[_0x121b06(0x142)],'endpointUrl':hasOwn(_0x44c7d5,_0x121b06(0x131))?_0x44c7d5['endpointUrl']:_0xf536d2['endpointUrlRaw'],'channelConfig':hasOwn(_0x44c7d5,'channelConfig')?serializeChannelConfig(_0x44c7d5[_0x121b06(0xf5)]):_0xf536d2[_0x121b06(0x122)],'description':hasOwn(_0x44c7d5,_0x121b06(0xd2))?_0x44c7d5[_0x121b06(0xd2)]:_0xf536d2[_0x121b06(0xd2)],'connectTimeout':hasOwn(_0x44c7d5,_0x121b06(0x103))?_0x44c7d5['connectTimeout']:_0xf536d2[_0x121b06(0x103)],'readTimeout':hasOwn(_0x44c7d5,_0x121b06(0x11c))?_0x44c7d5[_0x121b06(0x11c)]:_0xf536d2[_0x121b06(0x11c)]};}export function plannedUpdateProjection(_0x275523,_0x100705){const _0x12c09a=a197_0x3209b2;return projectNotificationConfig({'id':_0x275523['id'],'appCode':_0x275523[_0x12c09a(0x123)],'configCode':_0x275523['configCode'],'configName':_0x100705[_0x12c09a(0xd8)]??_0x275523['configName'],'channelType':_0x100705[_0x12c09a(0x142)]??_0x275523[_0x12c09a(0x142)],'endpointUrl':hasOwn(_0x100705,_0x12c09a(0x131))?_0x100705[_0x12c09a(0x131)]:_0x275523['endpointUrlRaw'],'channelConfig':hasOwn(_0x100705,_0x12c09a(0xf5))?_0x100705[_0x12c09a(0xf5)]:_0x275523[_0x12c09a(0x122)],'description':hasOwn(_0x100705,_0x12c09a(0xd2))?_0x100705[_0x12c09a(0xd2)]:_0x275523[_0x12c09a(0xd2)],'connectTimeout':hasOwn(_0x100705,_0x12c09a(0x103))?_0x100705['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x275523[_0x12c09a(0x103)],'readTimeout':hasOwn(_0x100705,'readTimeout')?_0x100705[_0x12c09a(0x11c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x275523[_0x12c09a(0x11c)]});}export function requestedSafeFieldsMatch(_0x58bc18,_0x339ba8,_0x3ceaef){const _0x2cd6c0=a197_0x3209b2,_0x21dcb3=[],_0x232aea=[],_0x54d0cc=[];for(const _0x308176 of[_0x2cd6c0(0xd8),_0x2cd6c0(0x142),_0x2cd6c0(0xd2)]){if(!hasOwn(_0x3ceaef,_0x308176))continue;_0x54d0cc[_0x2cd6c0(0xea)](_0x308176),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x308176]!==_0x3ceaef[_0x308176]&&_0x339ba8[_0x308176]===_0x3ceaef[_0x308176]);}for(const _0xf75f of['connectTimeout',_0x2cd6c0(0x11c)]){if(!hasOwn(_0x3ceaef,_0xf75f))continue;const _0x1c7437=_0x3ceaef[_0xf75f]??(_0xf75f===_0x2cd6c0(0x103)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x54d0cc[_0x2cd6c0(0xea)](_0xf75f),_0x21dcb3['push'](_0x339ba8[_0xf75f]===_0x1c7437),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0xf75f]!==_0x1c7437&&_0x339ba8[_0xf75f]===_0x1c7437);}return hasOwn(_0x3ceaef,_0x2cd6c0(0x131))&&_0x3ceaef[_0x2cd6c0(0x131)]===null&&(_0x54d0cc[_0x2cd6c0(0xea)](_0x2cd6c0(0xcd)),_0x21dcb3[_0x2cd6c0(0xea)](_0x339ba8[_0x2cd6c0(0xff)]===null||_0x339ba8[_0x2cd6c0(0xff)]===''),_0x232aea[_0x2cd6c0(0xea)](_0x58bc18[_0x2cd6c0(0xff)]!==null&&_0x58bc18['endpointUrlRaw']!==''&&(_0x339ba8['endpointUrlRaw']===null||_0x339ba8['endpointUrlRaw']===''))),{'allMatch':_0x21dcb3[_0x2cd6c0(0xcb)](Boolean),'provesChange':_0x232aea['some'](Boolean),'verifiedFields':_0x54d0cc};}export function validateNotificationDeleteReadback(_0x278c15,_0x18d618,_0x1bd804){const _0x364fad=a197_0x3209b2;for(const [_0x5dfb3b,_0x4e859d]of _0x278c15['entries']()){if(!Number[_0x364fad(0x107)](_0x4e859d['id'])||_0x4e859d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x13d));if(_0x4e859d[_0x364fad(0x123)]!==_0x18d618)throw notificationError(_0x364fad(0x117),'Notification\x20config\x20list\x20item\x20'+(_0x5dfb3b+0x1)+_0x364fad(0x10f));if(_0x4e859d[_0x364fad(0x142)]!==_0x1bd804)throw notificationError(_0x364fad(0x117),_0x364fad(0x118)+(_0x5dfb3b+0x1)+_0x364fad(0x119));}}export function safeApiFailure(_0x8dde09,_0x10b39b,_0x1f66bd){const _0x52cd0a=a197_0x3209b2;return notificationError(_0x52cd0a(0x102)+_0x8dde09+'_'+(_0x10b39b==='mutation'?_0x52cd0a(0x140):_0x10b39b+'_unavailable'),'Notification\x20config\x20'+_0x8dde09+'\x20'+_0x10b39b+_0x52cd0a(0x129),_0x1f66bd);}export function notificationLookupCommand(_0x4154b2,_0x55c40d){const _0xbbac73=a197_0x3209b2;return _0xbbac73(0xdd)+_0x4154b2+_0xbbac73(0xfc)+_0x55c40d+_0xbbac73(0x13e);}function validateNotificationDocument(_0x188129,_0x348f27){const _0x460018=a197_0x3209b2;for(const _0x571680 of Object[_0x460018(0x12c)](_0x188129)){if(FORBIDDEN_IDENTITY_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0xc9),_0x460018(0x132)+_0x571680+_0x460018(0x136));if(!ALLOWED_INPUT_FIELDS[_0x460018(0xd5)](_0x571680))throw notificationError(_0x460018(0x141),_0x460018(0x110)+_0x571680+'\x22.');}if(_0x348f27===_0x460018(0xf1)&&Object['keys'](_0x188129)['length']===0x0)throw notificationError(_0x460018(0x109),_0x460018(0xef));const _0x45441b={};if(hasOwn(_0x188129,_0x460018(0xd8)))_0x45441b[_0x460018(0xd8)]=validateRequiredString(_0x188129[_0x460018(0xd8)],_0x460018(0xd8),0x80);else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),_0x460018(0x127)+'\x22configName\x22.');}if(hasOwn(_0x188129,'channelType')){if(typeof _0x188129[_0x460018(0x142)]!==_0x460018(0x11d))throw invalidFieldType(_0x460018(0x142),_0x460018(0xe0));const _0x43a60e=_0x188129[_0x460018(0x142)][_0x460018(0xc6)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x460018(0x130)](_0x43a60e))throw notificationError('notification_config_field_invalid',_0x460018(0xe2),_0x460018(0x100)+NOTIFICATION_CHANNEL_TYPES[_0x460018(0xee)](',\x20')+'.');_0x45441b[_0x460018(0x142)]=_0x43a60e;}else{if(_0x348f27===_0x460018(0x101))throw notificationError(_0x460018(0x13b),'Create\x20JSON\x20requires\x20field\x20'+_0x460018(0xe4));}for(const [_0x1a50cc,_0x491096]of[[_0x460018(0x131),0x200],[_0x460018(0xd2),0x100]]){if(!hasOwn(_0x188129,_0x1a50cc))continue;const _0x223f1a=_0x188129[_0x1a50cc];if(_0x223f1a!==null&&typeof _0x223f1a!=='string')throw invalidFieldType(_0x1a50cc,_0x460018(0x104));if(typeof _0x223f1a===_0x460018(0x11d)&&_0x223f1a['length']>_0x491096)throw notificationError(_0x460018(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x1a50cc+_0x460018(0x113)+_0x491096+_0x460018(0x121));_0x45441b[_0x1a50cc]=_0x223f1a;}if(hasOwn(_0x188129,_0x460018(0xf5))){const _0x431459=_0x188129[_0x460018(0xf5)];if(_0x431459===null&&_0x348f27===_0x460018(0x101))throw invalidFieldType(_0x460018(0xf5),_0x460018(0xde));if(_0x431459!==null&&!isJsonObject(_0x431459))throw invalidFieldType(_0x460018(0xf5),_0x348f27==='update'?_0x460018(0xec):_0x460018(0xde));_0x431459!==null&&validateChannelConfigFields(_0x45441b[_0x460018(0x142)],_0x431459),_0x45441b[_0x460018(0xf5)]=_0x431459;}for(const _0xba149d of[_0x460018(0x103),_0x460018(0x11c)]){if(!hasOwn(_0x188129,_0xba149d))continue;const _0x38567b=_0x188129[_0xba149d];if(_0x38567b!==null&&(!Number[_0x460018(0x107)](_0x38567b)||_0x38567b<0x0))throw notificationError(_0x460018(0x108),_0x460018(0x132)+_0xba149d+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x45441b[_0xba149d]=_0x38567b;}return _0x45441b;}function validateRequiredString(_0x4fcfa2,_0x392bba,_0x4a7d26){const _0x2fafa7=a197_0x3209b2;if(typeof _0x4fcfa2!==_0x2fafa7(0x11d))throw invalidFieldType(_0x392bba,_0x2fafa7(0x12d));const _0x1fe1db=_0x4fcfa2[_0x2fafa7(0xc6)]();if(!_0x1fe1db)throw notificationError(_0x2fafa7(0x108),_0x2fafa7(0x132)+_0x392bba+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1fe1db[_0x2fafa7(0xd6)]>_0x4a7d26)throw notificationError(_0x2fafa7(0x108),'Notification\x20JSON\x20field\x20\x22'+_0x392bba+'\x22\x20cannot\x20exceed\x20'+_0x4a7d26+_0x2fafa7(0x121));return _0x1fe1db;}function validateChannelConfigFields(_0x2d5236,_0x118e16){const _0x4a7d71=a197_0x3209b2;if(hasOwn(_0x118e16,'messageTemplate'))throw forbiddenChannelConfigField(_0x4a7d71(0xe9));if(_0x2d5236==='EMAIL')for(const _0x1e3dec of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x118e16,_0x1e3dec))throw forbiddenChannelConfigField(_0x1e3dec);}}function forbiddenChannelConfigField(_0x678632){const _0x10f172=a197_0x3209b2;return notificationError('notification_config_channel_field_forbidden',_0x10f172(0xf2)+_0x678632+_0x10f172(0xca));}function invalidFieldType(_0x47d859,_0x4b2d57){const _0x4adecb=a197_0x3209b2;return notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x47d859+_0x4adecb(0x11e)+_0x4b2d57+'.');}function serializeChannelConfig(_0x2a16c5){const _0x2417b3=a197_0x3209b2;return _0x2a16c5===null||_0x2a16c5===undefined?null:JSON[_0x2417b3(0xf6)](_0x2a16c5);}function redactSensitive(_0x154098){return _0x154098===null||_0x154098===undefined||_0x154098===''?null:'<redacted>';}function requireResponseString(_0x1b4d51,_0x394b99,_0x36af23){const _0x3b0cc5=a197_0x3209b2;if(typeof _0x1b4d51!==_0x3b0cc5(0x11d)||_0x1b4d51[_0x3b0cc5(0xc6)]()==='')throw CliErrors[_0x3b0cc5(0x124)]('Invalid\x20notification\x20config\x20response.',_0x3b0cc5(0xf9)+(_0x36af23+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x394b99+'\x22.');return _0x1b4d51[_0x3b0cc5(0xc6)]();}function requireExactString(_0x2a1d23,_0x28ac4c,_0x1a6a7d){const _0x57d729=a197_0x3209b2;if(typeof _0x2a1d23!==_0x57d729(0x11d)||_0x2a1d23[_0x57d729(0xc6)]()==='')throw notificationError(_0x57d729(0x117),_0x57d729(0x12b)+_0x1a6a7d+_0x57d729(0x11a)+_0x28ac4c+'\x22.');return _0x2a1d23[_0x57d729(0xc6)]();}function responseNullableString(_0x4dd0be,_0x49df5f,_0x135597){const _0x1407e2=a197_0x3209b2;if(_0x4dd0be===undefined||_0x4dd0be===null)return null;if(typeof _0x4dd0be!=='string')throw notificationError(_0x1407e2(0x117),'Notification\x20config\x20'+_0x135597+_0x1407e2(0x11b)+_0x49df5f+'\x22.');return _0x4dd0be;}function responseNullableTimeout(_0x3a8cc8,_0x164802,_0x39da20){const _0x414a78=a197_0x3209b2;if(_0x3a8cc8===undefined||_0x3a8cc8===null)return null;if(!Number[_0x414a78(0x107)](_0x3a8cc8)||_0x3a8cc8<0x0)throw notificationError(_0x414a78(0x117),_0x414a78(0x12b)+_0x39da20+_0x414a78(0x11b)+_0x164802+'\x22.');return _0x3a8cc8;}function normalizeNullableString(_0x3f0698){const _0x45e409=a197_0x3209b2;return typeof _0x3f0698===_0x45e409(0x11d)?_0x3f0698:null;}function isJsonObject(_0x56c353){const _0x35c57f=a197_0x3209b2;return _0x56c353!==null&&typeof _0x56c353===_0x35c57f(0xcf)&&!Array[_0x35c57f(0x126)](_0x56c353);}function hasOwn(_0x27fb40,_0x316d16){const _0xba6762=a197_0x3209b2;return Object[_0xba6762(0xce)][_0xba6762(0xd9)][_0xba6762(0x139)](_0x27fb40,_0x316d16);}async function readStdin(){const _0x4ae6be=a197_0x3209b2;let _0x20e592='';process[_0x4ae6be(0x10d)][_0x4ae6be(0x134)](_0x4ae6be(0x106));for await(const _0x58436a of process['stdin'])_0x20e592+=_0x58436a;return _0x20e592;}
|
|
1
|
+
const a197_0x1e9c36=a197_0x3bdc;function a197_0x3473(){const _0x2574cf=['stringify','Notification\x20JSON\x20field\x20\x22','trim','call','replyTo','channelType','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','isSafeInteger','notification_config_update_empty','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22configName\x22.','29170qOmTJk','stdin','update','configName','a\x20string\x20or\x20null','subjectPrefix','notification_config_field_required','ccList','Notification\x20config\x20list\x20item\x20','prototype','push','isArray','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','every','860kzuKJL','channelConfigRaw','name','Allowed\x20values:\x20','notification_config_field_forbidden','32waqnad','from-env','notification_config_confirmation_required','WECOM','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','apiError','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20from\x20','3355rIwwXi','entries','Item\x20','path','description','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','bccList','WEBHOOK','readTimeout','<redacted>','6Ntgult','notification_config_','\x20has\x20an\x20invalid\x20id.','notification_config_source_unavailable','preflight','DINGTALK','length','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20supported\x20string','FEISHU','\x20is\x20missing\x20required\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','number','channelConfig','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20has\x20an\x20unsupported\x20channelType.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','451535hrQOKP','env','emailTargets','endpointUrl:null','file','notification_config_channel_field_forbidden','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','includes','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Unknown\x20notification\x20JSON\x20field\x20\x22','setEncoding','Missing\x20notification\x20JSON\x20source.','\x20characters.','keys','updateTime','Notification\x20JSON\x20source\x20is\x20ambiguous.','Notification\x20config\x20','channelCode','Application-level\x20notification\x20config\x20ID','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','784728RirHFN','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','Notification\x20JSON\x20channelConfig\x20field\x20\x22','132828HeSSJd','notification_config_field_invalid','endpointUrlRaw','\x22\x20must\x20be\x20','str','Invalid\x20notification\x20config\x20response.','mutation','boolean','_unavailable','notification_config_id_invalid','EMAIL','Invalid\x20--','has','endpointUrl','connectTimeout','environment\x20variable\x20','configCode','a\x20JSON\x20object','\x22\x20is\x20forbidden.','string','115596JTduCx','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20must\x20be\x20an\x20object.','bool','notification_config_response_invalid','create','utf8','dry-run','4dIlDUp','\x22channelType\x22.','failed','notification_config_json_invalid','validation','Create\x20JSON\x20requires\x20field\x20','appCode','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','fromName','kind','4899284NDRngR','num','1544575yMCBxV'];a197_0x3473=function(){return _0x2574cf;};return a197_0x3473();}(function(_0x51b05d,_0x5d493f){const _0x47261f=a197_0x3bdc,_0xac62f0=_0x51b05d();while(!![]){try{const _0x1e3a37=-parseInt(_0x47261f(0x19a))/0x1*(parseInt(_0x47261f(0x1b3))/0x2)+parseInt(_0x47261f(0x17a))/0x3+-parseInt(_0x47261f(0x1a4))/0x4+parseInt(_0x47261f(0x1a6))/0x5*(-parseInt(_0x47261f(0x1db))/0x6)+-parseInt(_0x47261f(0x165))/0x7*(parseInt(_0x47261f(0x1c6))/0x8)+parseInt(_0x47261f(0x192))/0x9*(-parseInt(_0x47261f(0x1c1))/0xa)+parseInt(_0x47261f(0x1d0))/0xb*(parseInt(_0x47261f(0x17e))/0xc);if(_0x1e3a37===_0x5d493f)break;else _0xac62f0['push'](_0xac62f0['shift']());}catch(_0xbf76d7){_0xac62f0['push'](_0xac62f0['shift']());}}}(a197_0x3473,0xa6bbd));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=[a197_0x1e9c36(0x188),a197_0x1e9c36(0x15c),a197_0x1e9c36(0x158),a197_0x1e9c36(0x1c9),a197_0x1e9c36(0x1d8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a197_0x1e9c36(0x18b),a197_0x1e9c36(0x160),a197_0x1e9c36(0x1d4),a197_0x1e9c36(0x18c),a197_0x1e9c36(0x1d9)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x1e9c36(0x1a0),a197_0x1e9c36(0x18e),a197_0x1e9c36(0x177)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x1e9c36(0x167),'recipients',a197_0x1e9c36(0x1ba),a197_0x1e9c36(0x1d7),a197_0x1e9c36(0x1ab),a197_0x1e9c36(0x1b8),a197_0x1e9c36(0x1a2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x1e9c36(0x169),'type':a197_0x1e9c36(0x191),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x1e9c36(0x185),'required':![],'default':![],'description':a197_0x1e9c36(0x1a1)},{'name':a197_0x1e9c36(0x1c7),'type':a197_0x1e9c36(0x191),'required':![],'description':a197_0x1e9c36(0x15a)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x1e9c36(0x15f),'required':!![],'description':a197_0x1e9c36(0x178)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5a63b3,_0x1a5dd9,_0x2c0214){return new CliError(_0x5a63b3,0x1,_0x1a5dd9,_0x2c0214);}export function readNotificationId(_0x58975f){const _0x59eb95=a197_0x1e9c36,_0x14fb36=_0x58975f[_0x59eb95(0x1a5)]('id');if(!Number[_0x59eb95(0x1af)](_0x14fb36)||_0x14fb36<=0x0)throw notificationError(_0x59eb95(0x187),_0x59eb95(0x16b));return _0x14fb36;}export function requireNotificationExplicitYes(_0x13aefe){const _0x5f2d5f=a197_0x1e9c36;if(_0x13aefe[_0x5f2d5f(0x195)](_0x5f2d5f(0x199))||_0x13aefe['bool']('yes'))return;throw notificationError(_0x5f2d5f(0x1c8),_0x5f2d5f(0x1cb),_0x5f2d5f(0x164));}export function readNotificationChannelType(_0x27c422,_0x245650='type',_0x154281=a197_0x1e9c36(0x188)){const _0x4d8d9b=a197_0x1e9c36,_0x42cc1c=_0x27c422[_0x4d8d9b(0x182)](_0x245650)[_0x4d8d9b(0x1a9)]()||_0x154281;if(!NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x16d)](_0x42cc1c))throw CliErrors[_0x4d8d9b(0x19e)](_0x4d8d9b(0x189)+_0x245650+':\x20'+_0x42cc1c,_0x4d8d9b(0x1c4)+NOTIFICATION_CHANNEL_TYPES[_0x4d8d9b(0x1ca)](',\x20')+'.');return _0x42cc1c;}export function assertSingleNotificationSource(_0x3d2774){const _0x58cda9=a197_0x1e9c36,_0x2a5142=[],_0xff3d9b=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x169))['trim']();if(_0xff3d9b)_0x2a5142['push']({'kind':'file','path':_0xff3d9b});if(_0x3d2774[_0x58cda9(0x195)](_0x58cda9(0x1b4)))_0x2a5142[_0x58cda9(0x1bd)]({'kind':_0x58cda9(0x1b4)});const _0x235303=_0x3d2774[_0x58cda9(0x182)](_0x58cda9(0x1c7))[_0x58cda9(0x1a9)]();if(_0x235303)_0x2a5142['push']({'kind':'env','name':_0x235303});if(_0x2a5142['length']===0x0)throw CliErrors['validation'](_0x58cda9(0x171),_0x58cda9(0x17b));if(_0x2a5142[_0x58cda9(0x159)]>0x1)throw CliErrors['validation'](_0x58cda9(0x175),_0x58cda9(0x17b));return _0x2a5142[0x0];}export async function readNotificationDocument(_0x35f880,_0x4a0031){const _0x289d43=a197_0x1e9c36,_0x3a0fbb=assertSingleNotificationSource(_0x35f880),_0x509991=_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169)?'file\x20'+_0x3a0fbb[_0x289d43(0x1d3)]:_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)?_0x289d43(0x18d)+_0x3a0fbb[_0x289d43(0x1c3)]:_0x289d43(0x1b4);let _0x40b947;try{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x169))_0x40b947=await readFile(_0x3a0fbb[_0x289d43(0x1d3)],_0x289d43(0x198));else{if(_0x3a0fbb[_0x289d43(0x1a3)]===_0x289d43(0x166)){if(!(_0x3a0fbb['name']in process.env))throw notificationError(_0x289d43(0x1de),_0x289d43(0x1d5)+_0x3a0fbb['name']);_0x40b947=process.env[_0x3a0fbb.name]??'';}else _0x40b947=await readStdin();}}catch(_0x5b672c){if(_0x5b672c instanceof CliError)throw _0x5b672c;throw notificationError(_0x289d43(0x1de),_0x289d43(0x15e)+_0x509991+'.');}let _0x270284;try{_0x270284=JSON['parse'](_0x40b947);}catch{throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x270284))throw notificationError(_0x289d43(0x19d),_0x289d43(0x1cf)+_0x509991+_0x289d43(0x194));return validateNotificationDocument(_0x270284,_0x4a0031);}export function projectNotificationListConfig(_0x31ba34,_0x15a2a0){const _0x1baa24=a197_0x1e9c36;return{'id':typeof _0x31ba34['id']===_0x1baa24(0x15f)?_0x31ba34['id']:null,'configCode':requireResponseString(_0x31ba34[_0x1baa24(0x18e)],'configCode',_0x15a2a0),'configName':requireResponseString(_0x31ba34['configName'],_0x1baa24(0x1b6),_0x15a2a0),'channelType':requireResponseString(_0x31ba34[_0x1baa24(0x1ac)],_0x1baa24(0x1ac),_0x15a2a0),'description':normalizeNullableString(_0x31ba34[_0x1baa24(0x1d4)]),'createTime':normalizeNullableString(_0x31ba34['createTime']),'updateTime':normalizeNullableString(_0x31ba34[_0x1baa24(0x174)])};}function a197_0x3bdc(_0x49ac77,_0x2ea21a){_0x49ac77=_0x49ac77-0x158;const _0x34730d=a197_0x3473();let _0x3bdcf7=_0x34730d[_0x49ac77];return _0x3bdcf7;}export function normalizeExactNotificationConfig(_0x47c136,_0x3ab9a1,_0x32cc36){const _0x612b13=a197_0x1e9c36;if(!Number[_0x612b13(0x1af)](_0x47c136['id'])||_0x47c136['id']!==_0x3ab9a1)throw notificationError(_0x612b13(0x196),_0x612b13(0x1bf)+_0x3ab9a1+'.');if(_0x47c136['appCode']!==_0x32cc36)throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x1b1));const _0x4f93db=requireExactString(_0x47c136[_0x612b13(0x1b6)],_0x612b13(0x1b6),_0x3ab9a1),_0x3992f2=requireExactString(_0x47c136['configCode'],'configCode',_0x3ab9a1),_0x537ffa=requireExactString(_0x47c136[_0x612b13(0x1ac)],_0x612b13(0x1ac),_0x3ab9a1);if(!NOTIFICATION_CHANNEL_TYPES[_0x612b13(0x16d)](_0x537ffa))throw notificationError(_0x612b13(0x196),_0x612b13(0x176)+_0x3ab9a1+_0x612b13(0x163));const _0x4ca14e=responseNullableString(_0x47c136[_0x612b13(0x18b)],_0x612b13(0x18b),_0x3ab9a1),_0x2535a5=responseNullableString(_0x47c136['channelConfig'],_0x612b13(0x160),_0x3ab9a1),_0xced6ae=responseNullableString(_0x47c136[_0x612b13(0x1d4)],_0x612b13(0x1d4),_0x3ab9a1),_0x5b0e08=responseNullableTimeout(_0x47c136[_0x612b13(0x18c)],_0x612b13(0x18c),_0x3ab9a1),_0x46f7ed=responseNullableTimeout(_0x47c136[_0x612b13(0x1d9)],'readTimeout',_0x3ab9a1);return{'id':_0x3ab9a1,'appCode':_0x32cc36,'configCode':_0x3992f2,'configName':_0x4f93db,'channelType':_0x537ffa,'endpointUrl':redactSensitive(_0x4ca14e),'channelConfig':redactSensitive(_0x2535a5),'description':_0xced6ae,'connectTimeout':_0x5b0e08,'readTimeout':_0x46f7ed,'endpointUrlRaw':_0x4ca14e,'channelConfigRaw':_0x2535a5};}export async function requireExactNotificationConfig(_0x292666,_0x5e90e7,_0x3a4146){const _0x26029b=a197_0x1e9c36;let _0x165b01;try{_0x165b01=await getNotificationChannelConfig(_0x5e90e7,_0x292666);}catch{throw safeApiFailure(_0x3a4146,_0x26029b(0x1df),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x292666+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x165b01,_0x5e90e7,_0x292666);}export function projectNotificationConfig(_0x3ca4dd){const _0x11c188=a197_0x1e9c36;return{'id':_0x3ca4dd['id']??null,'appCode':_0x3ca4dd[_0x11c188(0x1a0)],'configCode':_0x3ca4dd['configCode']??null,'configName':_0x3ca4dd[_0x11c188(0x1b6)],'channelType':_0x3ca4dd['channelType'],'endpointUrl':redactSensitive(_0x3ca4dd['endpointUrl']),'channelConfig':redactSensitive(_0x3ca4dd[_0x11c188(0x160)]),'description':_0x3ca4dd['description']??null,'connectTimeout':_0x3ca4dd[_0x11c188(0x18c)]??null,'readTimeout':_0x3ca4dd[_0x11c188(0x1d9)]??null};}export function notificationSelector(_0x42e44b){const _0x87b05a=a197_0x1e9c36;return{'appCode':_0x42e44b[_0x87b05a(0x1a0)],'id':_0x42e44b['id'],'configCode':_0x42e44b[_0x87b05a(0x18e)],'configName':_0x42e44b[_0x87b05a(0x1b6)],'channelType':_0x42e44b[_0x87b05a(0x1ac)]};}export function createMutationInput(_0x3c66a2,_0xa73468){const _0xd7d1e9=a197_0x1e9c36;return{'appCode':_0x3c66a2,'configName':_0xa73468[_0xd7d1e9(0x1b6)],'channelType':_0xa73468[_0xd7d1e9(0x1ac)],...hasOwn(_0xa73468,'endpointUrl')?{'endpointUrl':_0xa73468[_0xd7d1e9(0x18b)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x160))?{'channelConfig':serializeChannelConfig(_0xa73468[_0xd7d1e9(0x160)])}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d4))?{'description':_0xa73468[_0xd7d1e9(0x1d4)]}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x18c))?{'connectTimeout':_0xa73468['connectTimeout']}:{},...hasOwn(_0xa73468,_0xd7d1e9(0x1d9))?{'readTimeout':_0xa73468[_0xd7d1e9(0x1d9)]}:{}};}export function mergeUpdateInput(_0xf15ec1,_0x380a5b){const _0x243d05=a197_0x1e9c36;return{'id':_0xf15ec1['id'],'appCode':_0xf15ec1[_0x243d05(0x1a0)],'configName':_0x380a5b[_0x243d05(0x1b6)]??_0xf15ec1['configName'],'channelType':_0x380a5b[_0x243d05(0x1ac)]??_0xf15ec1[_0x243d05(0x1ac)],'endpointUrl':hasOwn(_0x380a5b,_0x243d05(0x18b))?_0x380a5b[_0x243d05(0x18b)]:_0xf15ec1['endpointUrlRaw'],'channelConfig':hasOwn(_0x380a5b,_0x243d05(0x160))?serializeChannelConfig(_0x380a5b[_0x243d05(0x160)]):_0xf15ec1[_0x243d05(0x1c2)],'description':hasOwn(_0x380a5b,_0x243d05(0x1d4))?_0x380a5b['description']:_0xf15ec1[_0x243d05(0x1d4)],'connectTimeout':hasOwn(_0x380a5b,_0x243d05(0x18c))?_0x380a5b[_0x243d05(0x18c)]:_0xf15ec1[_0x243d05(0x18c)],'readTimeout':hasOwn(_0x380a5b,_0x243d05(0x1d9))?_0x380a5b['readTimeout']:_0xf15ec1[_0x243d05(0x1d9)]};}export function plannedUpdateProjection(_0x202927,_0x4b96a5){const _0x4ca9b4=a197_0x1e9c36;return projectNotificationConfig({'id':_0x202927['id'],'appCode':_0x202927[_0x4ca9b4(0x1a0)],'configCode':_0x202927[_0x4ca9b4(0x18e)],'configName':_0x4b96a5['configName']??_0x202927['configName'],'channelType':_0x4b96a5['channelType']??_0x202927['channelType'],'endpointUrl':hasOwn(_0x4b96a5,_0x4ca9b4(0x18b))?_0x4b96a5[_0x4ca9b4(0x18b)]:_0x202927[_0x4ca9b4(0x180)],'channelConfig':hasOwn(_0x4b96a5,_0x4ca9b4(0x160))?_0x4b96a5[_0x4ca9b4(0x160)]:_0x202927[_0x4ca9b4(0x1c2)],'description':hasOwn(_0x4b96a5,'description')?_0x4b96a5[_0x4ca9b4(0x1d4)]:_0x202927[_0x4ca9b4(0x1d4)],'connectTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x18c))?_0x4b96a5[_0x4ca9b4(0x18c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x202927[_0x4ca9b4(0x18c)],'readTimeout':hasOwn(_0x4b96a5,_0x4ca9b4(0x1d9))?_0x4b96a5['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x202927['readTimeout']});}export function requestedSafeFieldsMatch(_0x47345b,_0x1c36c5,_0x54145e){const _0x19179e=a197_0x1e9c36,_0x4ca850=[],_0x3ebf1c=[],_0x5f7cd4=[];for(const _0x12276b of[_0x19179e(0x1b6),_0x19179e(0x1ac),'description']){if(!hasOwn(_0x54145e,_0x12276b))continue;_0x5f7cd4[_0x19179e(0x1bd)](_0x12276b),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b[_0x12276b]!==_0x54145e[_0x12276b]&&_0x1c36c5[_0x12276b]===_0x54145e[_0x12276b]);}for(const _0x3e5f85 of[_0x19179e(0x18c),_0x19179e(0x1d9)]){if(!hasOwn(_0x54145e,_0x3e5f85))continue;const _0x447341=_0x54145e[_0x3e5f85]??(_0x3e5f85===_0x19179e(0x18c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5f7cd4[_0x19179e(0x1bd)](_0x3e5f85),_0x4ca850['push'](_0x1c36c5[_0x3e5f85]===_0x447341),_0x3ebf1c['push'](_0x47345b[_0x3e5f85]!==_0x447341&&_0x1c36c5[_0x3e5f85]===_0x447341);}return hasOwn(_0x54145e,_0x19179e(0x18b))&&_0x54145e[_0x19179e(0x18b)]===null&&(_0x5f7cd4[_0x19179e(0x1bd)](_0x19179e(0x168)),_0x4ca850[_0x19179e(0x1bd)](_0x1c36c5[_0x19179e(0x180)]===null||_0x1c36c5[_0x19179e(0x180)]===''),_0x3ebf1c[_0x19179e(0x1bd)](_0x47345b['endpointUrlRaw']!==null&&_0x47345b['endpointUrlRaw']!==''&&(_0x1c36c5['endpointUrlRaw']===null||_0x1c36c5[_0x19179e(0x180)]===''))),{'allMatch':_0x4ca850[_0x19179e(0x1c0)](Boolean),'provesChange':_0x3ebf1c['some'](Boolean),'verifiedFields':_0x5f7cd4};}export function validateNotificationDeleteReadback(_0x3fecd2,_0x3386b6,_0x366f23){const _0x34806e=a197_0x1e9c36;for(const [_0x199df0,_0x2db8e1]of _0x3fecd2[_0x34806e(0x1d1)]()){if(!Number[_0x34806e(0x1af)](_0x2db8e1['id'])||_0x2db8e1['id']<=0x0)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1dd));if(_0x2db8e1[_0x34806e(0x1a0)]!==_0x3386b6)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x2db8e1[_0x34806e(0x1ac)]!==_0x366f23)throw notificationError(_0x34806e(0x196),_0x34806e(0x1bb)+(_0x199df0+0x1)+_0x34806e(0x1ae));}}export function safeApiFailure(_0x791a5e,_0x1d9a64,_0x23faa4){const _0x5ec257=a197_0x1e9c36;return notificationError(_0x5ec257(0x1dc)+_0x791a5e+'_'+(_0x1d9a64===_0x5ec257(0x184)?_0x5ec257(0x19c):_0x1d9a64+_0x5ec257(0x186)),_0x5ec257(0x176)+_0x791a5e+'\x20'+_0x1d9a64+'\x20failed.',_0x23faa4);}export function notificationLookupCommand(_0x33b105,_0x16fce8){const _0x3514be=a197_0x1e9c36;return _0x3514be(0x193)+_0x33b105+_0x3514be(0x161)+_0x16fce8+'\x20--format\x20compress';}function validateNotificationDocument(_0x5bbd30,_0x13a7e8){const _0x8f554d=a197_0x1e9c36;for(const _0x22cdc9 of Object[_0x8f554d(0x173)](_0x5bbd30)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x22cdc9))throw notificationError(_0x8f554d(0x1c5),'Notification\x20JSON\x20field\x20\x22'+_0x22cdc9+_0x8f554d(0x179));if(!ALLOWED_INPUT_FIELDS[_0x8f554d(0x18a)](_0x22cdc9))throw notificationError(_0x8f554d(0x1d6),_0x8f554d(0x16f)+_0x22cdc9+'\x22.');}if(_0x13a7e8===_0x8f554d(0x1b5)&&Object[_0x8f554d(0x173)](_0x5bbd30)['length']===0x0)throw notificationError(_0x8f554d(0x1b0),_0x8f554d(0x16e));const _0x4a888d={};if(hasOwn(_0x5bbd30,_0x8f554d(0x1b6)))_0x4a888d[_0x8f554d(0x1b6)]=validateRequiredString(_0x5bbd30[_0x8f554d(0x1b6)],_0x8f554d(0x1b6),0x80);else{if(_0x13a7e8===_0x8f554d(0x197))throw notificationError(_0x8f554d(0x1b9),_0x8f554d(0x19f)+_0x8f554d(0x1b2));}if(hasOwn(_0x5bbd30,_0x8f554d(0x1ac))){if(typeof _0x5bbd30['channelType']!==_0x8f554d(0x191))throw invalidFieldType(_0x8f554d(0x1ac),_0x8f554d(0x15b));const _0x3b828b=_0x5bbd30[_0x8f554d(0x1ac)][_0x8f554d(0x1a9)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x8f554d(0x16d)](_0x3b828b))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x16c),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x4a888d[_0x8f554d(0x1ac)]=_0x3b828b;}else{if(_0x13a7e8==='create')throw notificationError(_0x8f554d(0x1b9),'Create\x20JSON\x20requires\x20field\x20'+_0x8f554d(0x19b));}for(const [_0x1db835,_0x136ce1]of[[_0x8f554d(0x18b),0x200],[_0x8f554d(0x1d4),0x100]]){if(!hasOwn(_0x5bbd30,_0x1db835))continue;const _0x27a1ea=_0x5bbd30[_0x1db835];if(_0x27a1ea!==null&&typeof _0x27a1ea!==_0x8f554d(0x191))throw invalidFieldType(_0x1db835,_0x8f554d(0x1b7));if(typeof _0x27a1ea===_0x8f554d(0x191)&&_0x27a1ea[_0x8f554d(0x159)]>_0x136ce1)throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x1db835+_0x8f554d(0x1ce)+_0x136ce1+'\x20characters.');_0x4a888d[_0x1db835]=_0x27a1ea;}if(hasOwn(_0x5bbd30,_0x8f554d(0x160))){const _0x5d27d9=_0x5bbd30[_0x8f554d(0x160)];if(_0x5d27d9===null&&_0x13a7e8===_0x8f554d(0x197))throw invalidFieldType(_0x8f554d(0x160),'a\x20JSON\x20object');if(_0x5d27d9!==null&&!isJsonObject(_0x5d27d9))throw invalidFieldType('channelConfig',_0x13a7e8===_0x8f554d(0x1b5)?'a\x20JSON\x20object\x20or\x20null':_0x8f554d(0x18f));_0x5d27d9!==null&&validateChannelConfigFields(_0x4a888d[_0x8f554d(0x1ac)],_0x5d27d9),_0x4a888d['channelConfig']=_0x5d27d9;}for(const _0x3948d2 of['connectTimeout','readTimeout']){if(!hasOwn(_0x5bbd30,_0x3948d2))continue;const _0x17898a=_0x5bbd30[_0x3948d2];if(_0x17898a!==null&&(!Number[_0x8f554d(0x1af)](_0x17898a)||_0x17898a<0x0))throw notificationError(_0x8f554d(0x17f),_0x8f554d(0x1a8)+_0x3948d2+_0x8f554d(0x1cc));_0x4a888d[_0x3948d2]=_0x17898a;}return _0x4a888d;}function validateRequiredString(_0x4bf4fd,_0x54401a,_0x34299c){const _0x24fa61=a197_0x1e9c36;if(typeof _0x4bf4fd!==_0x24fa61(0x191))throw invalidFieldType(_0x54401a,_0x24fa61(0x1ad));const _0x308b04=_0x4bf4fd[_0x24fa61(0x1a9)]();if(!_0x308b04)throw notificationError(_0x24fa61(0x17f),'Notification\x20JSON\x20field\x20\x22'+_0x54401a+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x308b04['length']>_0x34299c)throw notificationError(_0x24fa61(0x17f),_0x24fa61(0x1a8)+_0x54401a+_0x24fa61(0x1ce)+_0x34299c+_0x24fa61(0x172));return _0x308b04;}function validateChannelConfigFields(_0x223b23,_0x1af9b5){const _0x482fe3=a197_0x1e9c36;if(hasOwn(_0x1af9b5,_0x482fe3(0x17c)))throw forbiddenChannelConfigField(_0x482fe3(0x17c));if(_0x223b23==='EMAIL')for(const _0x1195de of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1af9b5,_0x1195de))throw forbiddenChannelConfigField(_0x1195de);}}function forbiddenChannelConfigField(_0x59cf85){const _0x55e0e3=a197_0x1e9c36;return notificationError(_0x55e0e3(0x16a),_0x55e0e3(0x17d)+_0x59cf85+_0x55e0e3(0x190));}function invalidFieldType(_0x4adeb0,_0x405c5b){const _0x395112=a197_0x1e9c36;return notificationError(_0x395112(0x17f),_0x395112(0x1a8)+_0x4adeb0+_0x395112(0x181)+_0x405c5b+'.');}function serializeChannelConfig(_0x2f11a5){const _0x78a205=a197_0x1e9c36;return _0x2f11a5===null||_0x2f11a5===undefined?null:JSON[_0x78a205(0x1a7)](_0x2f11a5);}function redactSensitive(_0x3033fd){const _0x1814f9=a197_0x1e9c36;return _0x3033fd===null||_0x3033fd===undefined||_0x3033fd===''?null:_0x1814f9(0x1da);}function requireResponseString(_0x269978,_0x2d13fc,_0x4fa68b){const _0x4044da=a197_0x1e9c36;if(typeof _0x269978!=='string'||_0x269978[_0x4044da(0x1a9)]()==='')throw CliErrors[_0x4044da(0x1cd)](_0x4044da(0x183),_0x4044da(0x1d2)+(_0x4fa68b+0x1)+_0x4044da(0x15d)+_0x2d13fc+'\x22.');return _0x269978[_0x4044da(0x1a9)]();}function requireExactString(_0x170fdc,_0x22efbe,_0x5eefdc){const _0x14f526=a197_0x1e9c36;if(typeof _0x170fdc!=='string'||_0x170fdc[_0x14f526(0x1a9)]()==='')throw notificationError(_0x14f526(0x196),_0x14f526(0x176)+_0x5eefdc+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x22efbe+'\x22.');return _0x170fdc[_0x14f526(0x1a9)]();}function responseNullableString(_0xff51d2,_0x2ea35,_0x1dc2d8){const _0x3a3c63=a197_0x1e9c36;if(_0xff51d2===undefined||_0xff51d2===null)return null;if(typeof _0xff51d2!==_0x3a3c63(0x191))throw notificationError(_0x3a3c63(0x196),_0x3a3c63(0x176)+_0x1dc2d8+_0x3a3c63(0x162)+_0x2ea35+'\x22.');return _0xff51d2;}function responseNullableTimeout(_0x210b03,_0x2a3ae9,_0x216c8e){const _0x552af7=a197_0x1e9c36;if(_0x210b03===undefined||_0x210b03===null)return null;if(!Number[_0x552af7(0x1af)](_0x210b03)||_0x210b03<0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x216c8e+_0x552af7(0x162)+_0x2a3ae9+'\x22.');return _0x210b03;}function normalizeNullableString(_0x35f11a){const _0x4e3100=a197_0x1e9c36;return typeof _0x35f11a===_0x4e3100(0x191)?_0x35f11a:null;}function isJsonObject(_0x5c98da){const _0x955b81=a197_0x1e9c36;return _0x5c98da!==null&&typeof _0x5c98da==='object'&&!Array[_0x955b81(0x1be)](_0x5c98da);}function hasOwn(_0x3dce21,_0x4bf735){const _0x4820a8=a197_0x1e9c36;return Object[_0x4820a8(0x1bc)]['hasOwnProperty'][_0x4820a8(0x1aa)](_0x3dce21,_0x4bf735);}async function readStdin(){const _0x59c1aa=a197_0x1e9c36;let _0x1f3f6f='';process['stdin'][_0x59c1aa(0x170)](_0x59c1aa(0x198));for await(const _0x3df6eb of process[_0x59c1aa(0x1b4)])_0x1f3f6f+=_0x3df6eb;return _0x1f3f6f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x3d14b9=a198_0xcbda;(function(_0x4d967d,_0xe3d2bf){const _0x3b1580=a198_0xcbda,_0x1775b6=_0x4d967d();while(!![]){try{const _0x3fa78b=-parseInt(_0x3b1580(0xc5))/0x1+-parseInt(_0x3b1580(0xc4))/0x2*(parseInt(_0x3b1580(0xa3))/0x3)+-parseInt(_0x3b1580(0xc8))/0x4+parseInt(_0x3b1580(0xa0))/0x5*(parseInt(_0x3b1580(0xae))/0x6)+-parseInt(_0x3b1580(0xc9))/0x7*(parseInt(_0x3b1580(0x9f))/0x8)+parseInt(_0x3b1580(0xbd))/0x9+-parseInt(_0x3b1580(0xb9))/0xa*(-parseInt(_0x3b1580(0xc7))/0xb);if(_0x3fa78b===_0xe3d2bf)break;else _0x1775b6['push'](_0x1775b6['shift']());}catch(_0xc24f36){_0x1775b6['push'](_0x1775b6['shift']());}}}(a198_0x21c2,0x267a2));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a198_0x3d14b9(0xcb),'form',a198_0x3d14b9(0xa1)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x3d14b9(0xad),'general':a198_0x3d14b9(0xab),'form':'Table','idCard':'IdCard'},SCENE_FLAG={'name':a198_0x3d14b9(0x9d),'type':a198_0x3d14b9(0xb4),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x3d14b9(0xb7)},IMAGE_FILE_FLAG={'name':a198_0x3d14b9(0xb0),'type':a198_0x3d14b9(0xb4),'description':a198_0x3d14b9(0x99)},IMAGE_URL_FLAG={'name':a198_0x3d14b9(0xcf),'type':'string','description':a198_0x3d14b9(0xc3)};function a198_0xcbda(_0xdaa116,_0x163b6f){_0xdaa116=_0xdaa116-0x97;const _0x21c280=a198_0x21c2();let _0xcbdad0=_0x21c280[_0xdaa116];return _0xcbdad0;}function normalizeScene(_0x25c7d2){const _0x2bd7bb=a198_0x3d14b9,_0x24b3c=_0x25c7d2[_0x2bd7bb(0xaf)]()[_0x2bd7bb(0xcd)]();if(_0x24b3c===_0x2bd7bb(0xa5))return _0x2bd7bb(0xa1);if(_0x24b3c===_0x2bd7bb(0xa2)||_0x24b3c==='general'||_0x24b3c===_0x2bd7bb(0xb3))return _0x24b3c;throw CliErrors[_0x2bd7bb(0xb1)]('Unsupported\x20OCR\x20scene:\x20'+_0x25c7d2+_0x2bd7bb(0xb5)+SUPPORTED_SCENES[_0x2bd7bb(0xbe)](',\x20'));}function a198_0x21c2(){const _0x3afbc7=['.\x20Supported\x20scenes:\x20','\x20OCR\x20from\x20URL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','imageFile','30XtSKtz','POST','length','toString','311553zuXEbu','join','/smartapi/common/queryFileUrl','apiError','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','File\x20URL\x20response\x20missing\x20fileUrl.','Publicly\x20accessible\x20image\x20or\x20file\x20URL','2yNFgqX','148061KiQUxt','fileUrl','1270907cUbDUu','144984hrDHOT','63EvMwgq','imageUrl','general','\x20OCR','toLowerCase','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','image-url','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','str','GET','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','filePath','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','scene','recognize','1464JCCTFr','1390AaFJPS','idCard','invoice','297330JmslPA','fileName','idcard','Preview:\x20recognize\x20','/smartapi/ocr/recognize-text','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','/smartapi/common/uploadFile','path','General','appCode','Invoice','1326BUovBZ','trim','image-file','validation','count','form','string'];a198_0x21c2=function(){return _0x3afbc7;};return a198_0x21c2();}function selectedInputs(_0x37ac5e){const _0xc70d78=a198_0x3d14b9,_0x52f478=_0x37ac5e[_0xc70d78(0x97)](_0xc70d78(0xb0))[_0xc70d78(0xaf)](),_0x3f0d5c=_0x37ac5e[_0xc70d78(0x97)](_0xc70d78(0xcf))['trim']();return{'imageFile':_0x52f478,'imageUrl':_0x3f0d5c,'count':[_0x52f478,_0x3f0d5c]['filter'](Boolean)[_0xc70d78(0xbb)]};}function validateInputSelection(_0x38aaf1){const _0x26a428=a198_0x3d14b9,_0x51131b=selectedInputs(_0x38aaf1);if(_0x51131b[_0x26a428(0xb2)]!==0x1)throw CliErrors[_0x26a428(0xb1)](_0x26a428(0xce));return _0x51131b;}function withScene(_0x59ae64,_0x59e36f,_0x4428ef){const _0xcb9447=a198_0x3d14b9;return{..._0x59ae64,'scene':_0x59e36f,..._0x4428ef?{'sourceFile':{'fileName':_0x4428ef[_0xcb9447(0xa4)],'filePath':_0x4428ef['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a198_0x3d14b9(0x9e),'description':a198_0x3d14b9(0x9c),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3ec929){const _0x21ada6=a198_0x3d14b9,_0x1e7190=normalizeScene(_0x3ec929['str'](_0x21ada6(0x9d))),_0x4af3e0=SCENE_TO_LEGACY_TYPE[_0x1e7190],_0x3214e6=validateInputSelection(_0x3ec929);if(_0x3214e6[_0x21ada6(0xca)]){const _0x287dda=new URLSearchParams({'url':_0x3214e6['imageUrl'],'type':_0x4af3e0,'appCode':_0x3ec929[_0x21ada6(0xac)]});return{'method':_0x21ada6(0x98),'url':'/smartapi/ocr/recognize-text?'+_0x287dda[_0x21ada6(0xbc)](),'description':_0x21ada6(0xa6)+_0x1e7190+_0x21ada6(0xb6)};}const _0x310f18=requireDevelopmentUploadFile(_0x3214e6[_0x21ada6(0xb8)],_0x21ada6(0xb0));return{'method':'POST','url':_0x21ada6(0xa9),'body':{'steps':[{'method':_0x21ada6(0xba),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x3ec929[_0x21ada6(0xac)],'multipart':{'file':_0x310f18}}},{'method':'POST','url':_0x21ada6(0xbf),'body':{'filePath':_0x21ada6(0xc1),'downloadFlag':![]}},{'method':'GET','url':_0x21ada6(0xa7),'query':{'appCode':_0x3ec929[_0x21ada6(0xac)],'url':_0x21ada6(0xd0),'type':_0x4af3e0}}]},'description':_0x21ada6(0xa8)+_0x1e7190+_0x21ada6(0xcc)};},async 'execute'(_0x13397a){const _0x53a294=a198_0x3d14b9,_0x2f7ec3=normalizeScene(_0x13397a[_0x53a294(0x97)](_0x53a294(0x9d))),_0x1c9f68=SCENE_TO_LEGACY_TYPE[_0x2f7ec3],_0x1709df=validateInputSelection(_0x13397a);if(_0x1709df[_0x53a294(0xca)]){const _0x4fea02=await recognizeDevelopmentOcr(_0x13397a[_0x53a294(0xac)],{'url':_0x1709df['imageUrl'],'type':_0x1c9f68});return{'ok':!![],'data':withScene(_0x4fea02,_0x2f7ec3)};}const _0x3478d2=requireDevelopmentUploadFile(_0x1709df[_0x53a294(0xb8)],_0x53a294(0xb0)),_0x2afe60=await uploadDevelopmentFile(_0x13397a['appCode'],_0x3478d2[_0x53a294(0xaa)]);if(!_0x2afe60[_0x53a294(0x9b)])throw CliErrors[_0x53a294(0xc0)](_0x53a294(0x9a));const _0x5a4bef=await queryDevelopmentFileUrl(_0x2afe60[_0x53a294(0x9b)],{'download':![]});if(!_0x5a4bef['fileUrl'])throw CliErrors[_0x53a294(0xc0)](_0x53a294(0xc2));const _0x264e77=await recognizeDevelopmentOcr(_0x13397a['appCode'],{'url':_0x5a4bef[_0x53a294(0xc6)],'type':_0x1c9f68});return{'ok':!![],'data':withScene(_0x264e77,_0x2f7ec3,_0x2afe60)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x4fa88c=a199_0x34ce;function a199_0x34ce(_0x62995a,_0x41d0c4){_0x62995a=_0x62995a-0x1ed;const _0x393693=a199_0x3936();let _0x34ce04=_0x393693[_0x62995a];return _0x34ce04;}(function(_0x50aac0,_0x4d52b2){const _0x3959a7=a199_0x34ce,_0x33540d=_0x50aac0();while(!![]){try{const _0x37c44c=-parseInt(_0x3959a7(0x222))/0x1*(parseInt(_0x3959a7(0x213))/0x2)+-parseInt(_0x3959a7(0x21c))/0x3*(parseInt(_0x3959a7(0x206))/0x4)+-parseInt(_0x3959a7(0x1f6))/0x5+-parseInt(_0x3959a7(0x225))/0x6*(parseInt(_0x3959a7(0x215))/0x7)+-parseInt(_0x3959a7(0x221))/0x8+-parseInt(_0x3959a7(0x1ff))/0x9*(-parseInt(_0x3959a7(0x217))/0xa)+-parseInt(_0x3959a7(0x227))/0xb*(-parseInt(_0x3959a7(0x219))/0xc);if(_0x37c44c===_0x4d52b2)break;else _0x33540d['push'](_0x33540d['shift']());}catch(_0x497086){_0x33540d['push'](_0x33540d['shift']());}}}(a199_0x3936,0x927ec));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=[a199_0x4fa88c(0x205),a199_0x4fa88c(0x229),a199_0x4fa88c(0x216)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x4fa88c(0x209));export const pageCreate={'service':a199_0x4fa88c(0x224),'command':a199_0x4fa88c(0x20f),'description':a199_0x4fa88c(0x20b),'risk':a199_0x4fa88c(0x1f3),'defaultOutputFormat':a199_0x4fa88c(0x223),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a199_0x4fa88c(0x1f0),'hint':'This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.'},{'name':a199_0x4fa88c(0x228),'message':a199_0x4fa88c(0x20e),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a199_0x4fa88c(0x212),'description':a199_0x4fa88c(0x208)},{'name':'parent-menu-id','type':a199_0x4fa88c(0x1fa),'description':a199_0x4fa88c(0x1f5)},{'name':'page-pattern','type':a199_0x4fa88c(0x212),'description':a199_0x4fa88c(0x22a),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x4fa88c(0x22d),'type':a199_0x4fa88c(0x212),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0xe9e8bd){await readValidatedPageSource(_0xe9e8bd);},async 'dryRun'(_0x3854fc){const _0x3b237f=a199_0x4fa88c,_0x518bd0=readInput(_0x3854fc,await readValidatedPageSource(_0x3854fc));return{'method':_0x3b237f(0x1ee),'url':_0x3b237f(0x21d),'body':{'appCode':_0x518bd0[_0x3b237f(0x1fe)],'pageName':_0x518bd0[_0x3b237f(0x214)],..._0x518bd0[_0x3b237f(0x202)]!=null?{'parentMenuId':_0x518bd0[_0x3b237f(0x202)]}:{},'createMenu':_0x518bd0[_0x3b237f(0x211)],'codeContent':_0x518bd0[_0x3b237f(0x200)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON['stringify'](_0x518bd0[_0x3b237f(0x214)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x256592){const _0x36ed42=a199_0x4fa88c,_0x943963=readInput(_0x256592,await readValidatedPageSource(_0x256592)),_0x67bfb1=await createCustomPage(_0x943963);if(!Number[_0x36ed42(0x21b)](_0x67bfb1[_0x36ed42(0x20d)])||_0x67bfb1[_0x36ed42(0x20d)]<=0x0)throw CliErrors[_0x36ed42(0x1f7)](_0x36ed42(0x1f8));const _0x5c0c8b=buildCustomPageDevelopmentUrl(_0x943963['appCode'],_0x67bfb1[_0x36ed42(0x1f1)]),_0x3e4cf4=buildCustomPageEditUrl(_0x943963[_0x36ed42(0x1fe)],_0x67bfb1[_0x36ed42(0x20d)]);return{'ok':!![],'data':{'operation':_0x36ed42(0x20c),'pageType':_0x36ed42(0x1fd),'pagePattern':readPagePattern(_0x256592),'selector':{'appCode':_0x943963[_0x36ed42(0x1fe)],'pageName':_0x943963['pageName']},'before':null,'after':{'pageId':_0x67bfb1[_0x36ed42(0x20d)],'pageName':_0x67bfb1['pageName'],'appCode':_0x67bfb1['appCode'],'version':_0x67bfb1[_0x36ed42(0x22b)],'menuId':_0x67bfb1[_0x36ed42(0x22e)],'menuPath':_0x67bfb1['menuPath'],'files':_0x67bfb1[_0x36ed42(0x200)]??Object['keys'](_0x943963['files'])},'dryRun':![],'request':_0x943963,..._0x5c0c8b?{'pageUrl':_0x5c0c8b}:{},..._0x3e4cf4?{'editPageUrl':_0x3e4cf4}:{},'warnings':_0x5c0c8b?[]:[_0x36ed42(0x203)]},'message':_0x36ed42(0x1fb)+_0x67bfb1[_0x36ed42(0x20d)]+'.'};}};function a199_0x3936(){const _0x351a85=['values','parentMenuId','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','isNaN','BLANK','20KjuykM','pageName\x20cannot\x20exceed\x20100\x20characters.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','../../../templates/custom-pages','parent-menu-id','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','page.create','pageId','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','create','trim','createMenu','string','2dmrXkF','pageName','7rmFyVt','DASHBOARD','68230fskePy','Custom_page_','12daatCd','validation','isInteger','361335pQLLyh','/smartapi/webcode/page/create','Invalid\x20Custom\x20Page\x20pattern:\x20','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','length','2120208ZSkhMH','592907UJVAHB','compress','page','1911534adFVaO','str','23664223jmiCZM','page-content','ONEPAGE','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','version','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','page-dir','menuId','parse','POST','name','page\x20create\x20does\x20not\x20accept\x20--page-type.','menuPath','keys','write','Custom\x20Page\x20pattern\x20not\x20found:\x20','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','4423255UGQvSq','apiError','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','number','Created\x20Custom\x20Page\x20','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','CUSTOM','appCode','1467FjIGmk','files'];a199_0x3936=function(){return _0x351a85;};return a199_0x3936();}function readPagePattern(_0x34bad3){const _0x52eba4=a199_0x4fa88c,_0x5ba8b3=_0x34bad3[_0x52eba4(0x226)]('page-pattern')['trim'](),_0x5474ca=_0x34bad3['str'](_0x52eba4(0x22d))['trim']();if(_0x5ba8b3&&_0x5474ca)throw CliErrors[_0x52eba4(0x21a)](_0x52eba4(0x1f9));if(_0x5474ca)return null;if(!_0x5ba8b3)throw CliErrors[_0x52eba4(0x21a)](_0x52eba4(0x22c));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x5ba8b3))throw CliErrors['validation'](_0x52eba4(0x1fc));return _0x5ba8b3;}async function readPageSource(_0x3b6f61){const _0x1b2361=a199_0x4fa88c,_0x14a668=_0x3b6f61[_0x1b2361(0x226)](_0x1b2361(0x22d))['trim'](),_0x2d1bf2=readPagePattern(_0x3b6f61);if(_0x2d1bf2===null){const _0x4efcbe=await readCustomPageDirectory(_0x14a668);if(Object[_0x1b2361(0x1f2)](_0x4efcbe)[_0x1b2361(0x220)]===0x0)throw CliErrors[_0x1b2361(0x21a)](_0x1b2361(0x21f));return _0x4efcbe;}let _0x5459e7;try{_0x5459e7=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2d1bf2['toLowerCase']()+'.json'),'utf8');}catch{throw CliErrors[_0x1b2361(0x21a)](_0x1b2361(0x1f4)+_0x2d1bf2+'.');}let _0x2da6e4;try{_0x2da6e4=JSON[_0x1b2361(0x1ed)](_0x5459e7);}catch{throw CliErrors[_0x1b2361(0x21a)](_0x1b2361(0x21e)+_0x2d1bf2+'.');}if(!_0x2da6e4||typeof _0x2da6e4!=='object'||Array['isArray'](_0x2da6e4)||Object[_0x1b2361(0x201)](_0x2da6e4)['some'](_0x17607b=>typeof _0x17607b!=='string'))throw CliErrors[_0x1b2361(0x21a)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2d1bf2+'.');return _0x2da6e4;}async function readValidatedPageSource(_0x142f54){const _0x3aba6d=await readPageSource(_0x142f54);return await validateCustomPageContent(_0x3aba6d),_0x3aba6d;}function readInput(_0x1e7fbb,_0x3bfb6d){const _0x8560bc=a199_0x4fa88c,_0x5e23f8=_0x1e7fbb['str'](_0x8560bc(0x1ef))[_0x8560bc(0x210)]()||_0x8560bc(0x218)+Date['now']();if(_0x5e23f8[_0x8560bc(0x220)]>0x64)throw CliErrors['validation'](_0x8560bc(0x207));const _0x38963d=_0x1e7fbb['num'](_0x8560bc(0x20a),NaN),_0x3fb59d=!Number[_0x8560bc(0x204)](_0x38963d);if(_0x3fb59d&&(!Number[_0x8560bc(0x21b)](_0x38963d)||_0x38963d<=0x0))throw CliErrors[_0x8560bc(0x21a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x1e7fbb[_0x8560bc(0x1fe)],'pageName':_0x5e23f8,..._0x3fb59d?{'parentMenuId':_0x38963d}:{},'createMenu':!![],'files':_0x3bfb6d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a200_0x29bb(){const _0x38301f=['number','getDate','getHours','padStart','getSeconds','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','795cZamUB','239010kzHiGl','str','appCode','Retrieved\x20Custom\x20Page\x20','custom-detail','appcode','getFullYear','trim','compress','72uOYLak','138446RDtUph','1IfWAZr','14623477JCDTEI','1120406nGSeYJ','30330KunFJb','216wZxZYW','Custom\x20Page\x20ID','getMonth','129132ptSKCf','113103xcGEnn','pageCode','read'];a200_0x29bb=function(){return _0x38301f;};return a200_0x29bb();}const a200_0x2c9dd6=a200_0x4ebe;(function(_0x5364b5,_0x33afbc){const _0x5305c2=a200_0x4ebe,_0x188e87=_0x5364b5();while(!![]){try{const _0x51c106=parseInt(_0x5305c2(0x18c))/0x1*(parseInt(_0x5305c2(0x18e))/0x2)+parseInt(_0x5305c2(0x1a7))/0x3*(parseInt(_0x5305c2(0x193))/0x4)+-parseInt(_0x5305c2(0x19d))/0x5*(-parseInt(_0x5305c2(0x18f))/0x6)+parseInt(_0x5305c2(0x18b))/0x7+parseInt(_0x5305c2(0x190))/0x8*(-parseInt(_0x5305c2(0x194))/0x9)+-parseInt(_0x5305c2(0x19e))/0xa+-parseInt(_0x5305c2(0x18d))/0xb;if(_0x51c106===_0x33afbc)break;else _0x188e87['push'](_0x188e87['shift']());}catch(_0x3aca2a){_0x188e87['push'](_0x188e87['shift']());}}}(a200_0x29bb,0x71bed));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':a200_0x2c9dd6(0x1a2),'description':a200_0x2c9dd6(0x19c),'risk':a200_0x2c9dd6(0x196),'defaultOutputFormat':a200_0x2c9dd6(0x1a6),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x2c9dd6(0x197),'required':!![],'description':a200_0x2c9dd6(0x191)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x313ebb){readCustomPageId(_0x313ebb);},async 'execute'(_0x14828f){const _0x33d330=a200_0x2c9dd6,_0x5aa8db=readCustomPageId(_0x14828f),_0x2fbb74=await getCustomPageSource(_0x5aa8db),{bundle:_0xb99bc8,createTime:_0x3cc6b1,updateTime:_0xcfa753,..._0x48c3a7}=_0x2fbb74,_0x234fe0=_0x2fbb74['id']??_0x5aa8db,_0x50e7bc=_0x2fbb74[_0x33d330(0x1a0)]?.[_0x33d330(0x1a5)]()||_0x14828f[_0x33d330(0x19f)](_0x33d330(0x1a3))[_0x33d330(0x1a5)](),_0x137b91=buildCustomPageRuntimeUrl(_0x50e7bc,_0x2fbb74[_0x33d330(0x195)]),_0x4546c5=buildCustomPageEditUrl(_0x50e7bc,_0x234fe0),_0x4e3e75=await resolveCustomPageDevelopmentUrl(_0x50e7bc,_0x234fe0,_0x14828f['cookie']);return{'ok':!![],'data':{..._0x48c3a7,..._0x137b91?{'runtimePageUrl':_0x137b91}:{},..._0x4e3e75?{'pageUrl':_0x4e3e75}:{},..._0x4546c5?{'editPageUrl':_0x4546c5}:{},..._0x3cc6b1==null?{}:{'createTime':formatTime(_0x3cc6b1)},..._0xcfa753==null?{}:{'updateTime':formatTime(_0xcfa753)}},'message':_0x33d330(0x1a1)+_0x5aa8db+'.'};}};function a200_0x4ebe(_0x1353c2,_0x15d3f9){_0x1353c2=_0x1353c2-0x18b;const _0x29bb2b=a200_0x29bb();let _0x4ebe29=_0x29bb2b[_0x1353c2];return _0x4ebe29;}function formatTime(_0x52383b){const _0x414aba=a200_0x2c9dd6,_0x100b7b=new Date(_0x52383b);if(Number['isNaN'](_0x100b7b['getTime']()))return String(_0x52383b);const _0xa8cdb6=[_0x100b7b[_0x414aba(0x1a4)](),String(_0x100b7b[_0x414aba(0x192)]()+0x1)['padStart'](0x2,'0'),String(_0x100b7b[_0x414aba(0x198)]())[_0x414aba(0x19a)](0x2,'0')]['join']('-'),_0x4fb5f0=[String(_0x100b7b[_0x414aba(0x199)]())[_0x414aba(0x19a)](0x2,'0'),String(_0x100b7b['getMinutes']())[_0x414aba(0x19a)](0x2,'0'),String(_0x100b7b[_0x414aba(0x19b)]())[_0x414aba(0x19a)](0x2,'0')]['join'](':');return _0xa8cdb6+'\x20'+_0x4fb5f0;}
|