@lovrabet/rabetbase-cli 2.5.10-beta.1 → 2.5.10-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- 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.d.ts +2 -2
- 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.d.ts +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.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- 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.d.ts +0 -28
- 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.d.ts +8 -0
- package/lib/core/instant-api-policy/endpoints.js +1 -0
- package/lib/core/kb-management-client.d.ts +3 -9
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +1 -4
- 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 +3 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-issue-report.md +4 -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
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a191_0x288a(){const _0x457847=['1047000AnWitr','parentId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','some','length','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','datasetCode','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','paths','pageType','str','modelType','expected-count','\x20menu(s);\x20skipped\x20','verification','label','\x20updated,\x20','failed','beforeById','POST','update-recovery','Selected\x20','push','num','18PPsTIr','warnings','isArray','childrenCount','depth','Response\x20was\x20lost\x20and\x20menu\x20','number','get','filter','body','\x20menu(s),\x20expected\x20','cookie','\x20must\x20be\x20true\x20or\x20false.','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','resources','Menu\x20','targets','true','\x20menu(s);\x20skip\x20','plan','menu\x20list','join','trim','url','set','expect-visible','menu_selector_not_found','menu_verification_failed','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','boolean','Menu\x20path\x20selector\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','map','15850EWFgGU','visibility-update','48ERJFYK','validation','\x20failed.','visible','expectedCount','1012070oOOouz','childrenIds','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','code','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','resourcesValid','updated','645532mqimCF','string','update\x20visibility\x20for','\x20changed\x20unexpectedly.','hash','587484sTIlYJ','type','path','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','rawFlags','sort','false','requestedVisible','menu_permission_denied','datasetId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','59311iGjBmO','message','stringify','update-menu-visibility','Menu\x20id\x20selector(s)\x20not\x20found:\x20','update\x20menu\x20visibility','Response\x20was\x20lost\x20for\x20menu\x20','verify\x20menu\x20visibility\x20update','menu_selector_ambiguous','pageId','menuIds','byId','Menu\x20visibility\x20update\x20completed:\x20','before','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','158270TPZYzc','\x20skipped,\x20','\x20unchanged\x20menu(s).','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','expectVisible','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','plannedActions'];a191_0x288a=function(){return _0x457847;};return a191_0x288a();}const a191_0x14ee11=a191_0x2fff;(function(_0x4062e5,_0x26db31){const _0x272498=a191_0x2fff,_0x292f7f=_0x4062e5();while(!![]){try{const _0x226b09=parseInt(_0x272498(0x190))/0x1+parseInt(_0x272498(0x15d))/0x2*(-parseInt(_0x272498(0x15f))/0x3)+parseInt(_0x272498(0x16d))/0x4+-parseInt(_0x272498(0x164))/0x5+parseInt(_0x272498(0x13c))/0x6*(-parseInt(_0x272498(0x181))/0x7)+parseInt(_0x272498(0x19a))/0x8+parseInt(_0x272498(0x172))/0x9;if(_0x226b09===_0x26db31)break;else _0x292f7f['push'](_0x292f7f['shift']());}catch(_0x45d3d5){_0x292f7f['push'](_0x292f7f['shift']());}}}(a191_0x288a,0x27593));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';function a191_0x2fff(_0x44ee25,_0x3c48c8){_0x44ee25=_0x44ee25-0x12e;const _0x288a45=a191_0x288a();let _0x2ffff0=_0x288a45[_0x44ee25];return _0x2ffff0;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x14ee11(0x137),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x14ee11(0x15e),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'write','structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x14ee11(0x16e),'description':a191_0x14ee11(0x194)},{'name':a191_0x14ee11(0x1a5),'type':a191_0x14ee11(0x16e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x14ee11(0x162),'type':a191_0x14ee11(0x159),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a191_0x14ee11(0x159),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a191_0x14ee11(0x130),'type':a191_0x14ee11(0x142),'description':a191_0x14ee11(0x195)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17cbb3){parseInput(_0x17cbb3);},async 'dryRun'(_0x4b42b7){const _0x5e14e6=a191_0x14ee11,_0x5743b9=await buildPlan(_0x4b42b7,!![]),_0xc6e693=_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x19f)]??0x0,_0x132ae4=_0x5743b9['plan'][_0x5e14e6(0x14c)][_0x5e14e6(0x19f)]-_0xc6e693;return menuDryRunResult(_0x5743b9[_0x5e14e6(0x14f)],{'method':_0x5e14e6(0x137),'url':'/smartapi/menu/update','body':{'updates':_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x15c)](_0xecfd57=>_0xecfd57[_0x5e14e6(0x145)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0xc6e693+_0x5e14e6(0x14e)+_0x132ae4+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2535e9){const _0x12080c=a191_0x14ee11,_0x29adc5=await buildPlan(_0x2535e9,![]);await recheckMutationSnapshot(_0x2535e9,_0x29adc5[_0x12080c(0x14f)],_0x12080c(0x186));const _0x16415c=[],_0x20e279=[],_0x49a0d8=[];for(const _0x4c1d03 of _0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]){if(_0x4c1d03[_0x12080c(0x18e)][_0x12080c(0x162)]===_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]){_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2535e9[_0x12080c(0x166)],_0x2535e9['cookie'],{'id':_0x4c1d03['id'],'visible':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]}),_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':!![],'skipped':![]});}catch(_0xeefda1){const _0x4758d2=mapMenuApiError(_0xeefda1,_0x12080c(0x16f),_0x4c1d03['id']);if(isMenuResponseLoss(_0xeefda1)&&_0x4758d2[_0x12080c(0x168)]!==_0x12080c(0x17a)){_0x49a0d8[_0x12080c(0x13a)](_0x4c1d03['id']);continue;}_0x20e279[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'stage':'update','code':_0x4758d2[_0x12080c(0x168)],'message':_0x4758d2['message']});}}let _0x3c8d12;try{_0x3c8d12=await fetchMenuSnapshot(_0x2535e9[_0x12080c(0x166)],_0x2535e9[_0x12080c(0x147)]);}catch(_0xf9c251){const _0x389001=describeMenuErrorCause(_0xf9c251,_0x12080c(0x188)),_0x2ccb02=_0x49a0d8['map'](_0x512dc4=>({'id':_0x512dc4,'stage':_0x12080c(0x138),'code':_0x12080c(0x157),'message':_0x12080c(0x187)+_0x512dc4+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x1fc8df={'stage':_0x12080c(0x132),'code':_0x12080c(0x157),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]['map'](_0x398680=>_0x398680['id']),'requestedStateConfirmed':![],..._0x389001};throw menuFailure(asVerificationError(_0xf9c251,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x29adc5[_0x12080c(0x14f)],{'stage':_0x12080c(0x132),'succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x2ccb02,_0x1fc8df],'warnings':[_0x12080c(0x158)],'verification':{'status':_0x12080c(0x135),'recoveredCount':0x0,'lookupCommand':_0x12080c(0x197)}});}const _0x46609c=[];for(const _0x5daef3 of _0x16415c){const _0x43a7b6=Number(_0x5daef3['id']),_0x536906=_0x29adc5['beforeById'][_0x12080c(0x143)](_0x43a7b6),_0x435024=_0x3c8d12[_0x12080c(0x18c)][_0x12080c(0x143)](_0x43a7b6);try{verifyVisibilityUpdate(_0x536906,_0x435024,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]);}catch(_0x1919c0){const _0x4d771a=asVerificationError(_0x1919c0,_0x12080c(0x14b)+_0x43a7b6+_0x12080c(0x17e));_0x46609c['push']({'id':_0x43a7b6,'stage':_0x12080c(0x132),'code':_0x4d771a[_0x12080c(0x168)],'message':_0x4d771a[_0x12080c(0x182)],'requestedStateConfirmed':![]});}}for(const _0x3481b6 of _0x49a0d8){const _0x48e9da=_0x29adc5[_0x12080c(0x136)][_0x12080c(0x143)](_0x3481b6),_0x56271d=_0x3c8d12['byId']['get'](_0x3481b6);try{verifyVisibilityUpdate(_0x48e9da,_0x56271d,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]),_0x16415c[_0x12080c(0x13a)]({'id':_0x3481b6,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x15d4cd){const _0x3ff25c=asVerificationError(_0x15d4cd,_0x12080c(0x141)+_0x3481b6+_0x12080c(0x149));_0x46609c[_0x12080c(0x13a)]({'id':_0x3481b6,'stage':_0x12080c(0x138),'code':_0x3ff25c[_0x12080c(0x168)],'message':_0x3ff25c[_0x12080c(0x182)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46609c[_0x12080c(0x19f)]>0x0){const _0x231140=_0x46609c[_0x12080c(0x15c)](_0x3d844c=>Number(_0x3d844c['id'])),_0x5f3a76=_0x16415c[_0x12080c(0x144)](_0x20472c=>_0x20472c['recovered']===!![])['length'],_0x1348a2=menuError(_0x12080c(0x157),_0x12080c(0x180)+_0x231140[_0x12080c(0x151)](',\x20')+'.',_0x12080c(0x1a3));throw menuFailure(_0x1348a2,_0x29adc5['plan'],{'stage':'verification','succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x46609c],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':'failed',..._0x231140['length']===0x1?{'targetId':_0x231140[0x0]}:{'targetIds':_0x231140},'recoveredCount':_0x5f3a76,'lookupCommand':_0x12080c(0x197)}});}const _0x3c8ecb=_0x16415c[_0x12080c(0x144)](_0x39f8f7=>_0x39f8f7[_0x12080c(0x16c)]===!![])['length'],_0x138c84=_0x16415c[_0x12080c(0x19f)]-_0x3c8ecb,_0x4a1d0b={..._0x29adc5['plan'],'succeeded':_0x16415c,'failed':_0x20e279,'warnings':_0x20e279[_0x12080c(0x19f)]>0x0?[..._0x29adc5['plan'][_0x12080c(0x13d)],_0x12080c(0x17c)]:_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x13d)],'verification':{'checkedBy':_0x12080c(0x150),'snapshotHash':_0x3c8d12[_0x12080c(0x171)],'matchesRequestedState':_0x20e279['length']===0x0,'recoveredCount':_0x49a0d8['length']}};return{'ok':_0x20e279['length']===0x0,'data':_0x4a1d0b,'message':_0x20e279[_0x12080c(0x19f)]===0x0?'Updated\x20visibility\x20for\x20'+_0x3c8ecb+_0x12080c(0x131)+_0x138c84+_0x12080c(0x192):_0x12080c(0x18d)+_0x3c8ecb+_0x12080c(0x134)+_0x138c84+_0x12080c(0x191)+_0x20e279['length']+_0x12080c(0x161)};}};function parseInput(_0x146878){const _0x2af24d=a191_0x14ee11,_0x10c7d8=parseMenuIds(_0x146878[_0x2af24d(0x12e)](_0x2af24d(0x198))),_0x569d3b=parseCsv(_0x146878[_0x2af24d(0x12e)]('paths'));if(_0x10c7d8[_0x2af24d(0x19f)]===0x0&&_0x569d3b[_0x2af24d(0x19f)]===0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x169));const _0x5f4720=parseBooleanFlag(_0x146878,_0x2af24d(0x162),!![]),_0x5b25f8=parseBooleanFlag(_0x146878,_0x2af24d(0x155),![]);let _0x10cb46;if(hasFlag(_0x146878,_0x2af24d(0x130))){_0x10cb46=_0x146878[_0x2af24d(0x13b)](_0x2af24d(0x130));if(!Number[_0x2af24d(0x193)](_0x10cb46)||_0x10cb46<0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x175));}return{'menuIds':_0x10c7d8,'paths':_0x569d3b,'visible':_0x5f4720,'expectVisible':_0x5b25f8,'expectedCount':_0x10cb46};}async function buildPlan(_0x4a2f2d,_0x453861){const _0x5ab096=a191_0x14ee11,_0x376379=parseInput(_0x4a2f2d),_0x32f88f=await fetchMutationSnapshot(_0x4a2f2d,'update\x20menu\x20visibility'),_0x1a7708=selectTargets(_0x32f88f['menus'],_0x376379[_0x5ab096(0x18b)],_0x376379[_0x5ab096(0x1a5)]);if(_0x376379[_0x5ab096(0x163)]!==undefined&&_0x1a7708[_0x5ab096(0x19f)]!==_0x376379[_0x5ab096(0x163)])throw menuError('menu_expected_count_mismatch',_0x5ab096(0x139)+_0x1a7708[_0x5ab096(0x19f)]+_0x5ab096(0x146)+_0x376379[_0x5ab096(0x163)]+'.',_0x5ab096(0x19c));if(_0x376379[_0x5ab096(0x196)]!==undefined){const _0x58e9c0=_0x1a7708[_0x5ab096(0x144)](_0x558aee=>_0x558aee[_0x5ab096(0x162)]!==_0x376379[_0x5ab096(0x196)]);if(_0x58e9c0[_0x5ab096(0x19f)]>0x0)throw menuError('menu_state_drift',_0x5ab096(0x15b)+_0x58e9c0[_0x5ab096(0x15c)](_0x8c8ab6=>_0x8c8ab6['id'])[_0x5ab096(0x151)](',\x20')+'.',_0x5ab096(0x167));}const _0x1784ca=_0x1a7708['map'](_0x2da43d=>({'id':_0x2da43d['id'],'label':_0x2da43d[_0x5ab096(0x133)],'path':_0x2da43d[_0x5ab096(0x174)],'before':{'visible':_0x2da43d[_0x5ab096(0x162)]},'after':{'visible':_0x376379[_0x5ab096(0x162)]}})),_0x12f5e6=_0x1784ca['filter'](_0x4de86a=>_0x4de86a[_0x5ab096(0x18e)][_0x5ab096(0x162)]!==_0x376379['visible'])[_0x5ab096(0x15c)](_0xb0f42f=>({'stage':_0x5ab096(0x184),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x4a2f2d[_0x5ab096(0x166)],'id':_0xb0f42f['id'],'visible':_0x376379[_0x5ab096(0x162)]}})),_0x5b6a93=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x376379[_0x5ab096(0x18b)],'paths':_0x376379[_0x5ab096(0x1a5)]},'before':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x3e3f6a=>({'id':_0x3e3f6a['id'],'path':_0x3e3f6a['path'],'visible':_0x3e3f6a['visible']}))},'after':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x5eb5df=>({'id':_0x5eb5df['id'],'path':_0x5eb5df[_0x5ab096(0x174)],'visible':_0x376379[_0x5ab096(0x162)]}))},'dryRun':_0x453861,'backend':[...BACKEND],'plannedActions':_0x12f5e6,'snapshotHash':_0x32f88f[_0x5ab096(0x171)],'warnings':_0x12f5e6[_0x5ab096(0x19f)]===0x0?[_0x5ab096(0x1a0)]:[]});return{'plan':{..._0x5b6a93,'requestedVisible':_0x376379['visible'],'targets':_0x1784ca},'beforeById':new Map(_0x1a7708[_0x5ab096(0x15c)](_0x2a14b8=>[_0x2a14b8['id'],_0x2a14b8]))};}function selectTargets(_0x3f33fa,_0x16c507,_0x401629){const _0x254fe8=a191_0x14ee11,_0x2a3ad6=new Map(_0x3f33fa[_0x254fe8(0x15c)](_0x43a3d0=>[_0x43a3d0['id'],_0x43a3d0])),_0x114a79=new Map(),_0x2ce1bb=_0x16c507[_0x254fe8(0x144)](_0x355e23=>!_0x2a3ad6['has'](_0x355e23));if(_0x2ce1bb[_0x254fe8(0x19f)]>0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x185)+_0x2ce1bb[_0x254fe8(0x151)](',\x20')+'.',_0x254fe8(0x1a1));for(const _0x100852 of _0x16c507){_0x114a79[_0x254fe8(0x154)](_0x100852,_0x2a3ad6[_0x254fe8(0x143)](_0x100852));}for(const _0x53c52e of _0x401629){const _0x10b1bb=_0x3f33fa[_0x254fe8(0x144)](_0x17c157=>_0x17c157[_0x254fe8(0x174)]===_0x53c52e);if(_0x10b1bb[_0x254fe8(0x19f)]===0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x15a)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x17d));if(_0x10b1bb['length']>0x1)throw menuError(_0x254fe8(0x189),_0x254fe8(0x1a4)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x18f)+_0x10b1bb[_0x254fe8(0x15c)](_0x31dde7=>_0x31dde7['id'])[_0x254fe8(0x151)](',\x20')+'.');const _0x189f5d=_0x10b1bb[0x0];_0x114a79[_0x254fe8(0x154)](_0x189f5d['id'],_0x189f5d);}return[..._0x114a79['values']()];}function parseMenuIds(_0x2cbdb7){const _0x2c90ec=a191_0x14ee11,_0x10bba9=parseCsv(_0x2cbdb7),_0x36d783=_0x10bba9['map'](Number);if(_0x36d783[_0x2c90ec(0x19e)](_0x2e6356=>!Number[_0x2c90ec(0x193)](_0x2e6356)||_0x2e6356<=0x0))throw CliErrors[_0x2c90ec(0x160)](_0x2c90ec(0x17f));return[...new Set(_0x36d783)];}function parseCsv(_0x2b20f7){const _0x14d05c=a191_0x14ee11;return[...new Set(_0x2b20f7['split'](',')[_0x14d05c(0x15c)](_0x560918=>_0x560918[_0x14d05c(0x152)]())['filter'](Boolean))];}function parseBooleanFlag(_0xe5f15b,_0xfe5ba,_0x3eeb84){const _0x25e32e=a191_0x14ee11;if(!hasFlag(_0xe5f15b,_0xfe5ba)){if(_0x3eeb84)throw CliErrors['flagMissing'](_0xfe5ba);return undefined;}const _0x4acabd=_0xe5f15b[_0x25e32e(0x176)][_0xfe5ba];if(_0x4acabd===!![]||_0x4acabd===![])return _0x4acabd;if(_0x4acabd===_0x25e32e(0x14d))return!![];if(_0x4acabd===_0x25e32e(0x178))return![];throw CliErrors[_0x25e32e(0x160)]('--'+_0xfe5ba+_0x25e32e(0x148));}function verifyVisibilityUpdate(_0x1dd8f5,_0x186cda,_0x4870c2){const _0x16cead=a191_0x14ee11;assertVerified(!!_0x186cda,'Menu\x20'+_0x1dd8f5['id']+_0x16cead(0x19d)),assertVerified(_0x186cda[_0x16cead(0x162)]===_0x4870c2,_0x16cead(0x14b)+_0x1dd8f5['id']+_0x16cead(0x16a));const _0x50fee0=[['id',_0x186cda['id'],_0x1dd8f5['id']],[_0x16cead(0x19b),_0x186cda[_0x16cead(0x19b)],_0x1dd8f5[_0x16cead(0x19b)]],['depth',_0x186cda[_0x16cead(0x140)],_0x1dd8f5[_0x16cead(0x140)]],['label',_0x186cda[_0x16cead(0x133)],_0x1dd8f5[_0x16cead(0x133)]],['path',_0x186cda[_0x16cead(0x174)],_0x1dd8f5[_0x16cead(0x174)]],[_0x16cead(0x153),_0x186cda[_0x16cead(0x153)],_0x1dd8f5[_0x16cead(0x153)]],[_0x16cead(0x173),_0x186cda[_0x16cead(0x173)],_0x1dd8f5['type']],[_0x16cead(0x177),_0x186cda[_0x16cead(0x177)],_0x1dd8f5[_0x16cead(0x177)]],[_0x16cead(0x14a),_0x186cda[_0x16cead(0x14a)],_0x1dd8f5[_0x16cead(0x14a)]],[_0x16cead(0x16b),_0x186cda[_0x16cead(0x16b)],_0x1dd8f5[_0x16cead(0x16b)]],[_0x16cead(0x165),_0x186cda[_0x16cead(0x165)],_0x1dd8f5[_0x16cead(0x165)]],['childrenCount',_0x186cda[_0x16cead(0x13f)],_0x1dd8f5[_0x16cead(0x13f)]],[_0x16cead(0x18a),_0x186cda[_0x16cead(0x18a)],_0x1dd8f5['pageId']],[_0x16cead(0x1a6),_0x186cda[_0x16cead(0x1a6)],_0x1dd8f5[_0x16cead(0x1a6)]],[_0x16cead(0x12f),_0x186cda[_0x16cead(0x12f)],_0x1dd8f5['modelType']],[_0x16cead(0x17b),_0x186cda['datasetId'],_0x1dd8f5[_0x16cead(0x17b)]],['datasetCode',_0x186cda[_0x16cead(0x1a2)],_0x1dd8f5[_0x16cead(0x1a2)]]];for(const [_0x181ef1,_0x266e51,_0x1d32e5]of _0x50fee0){assertVerified(sameValue(_0x266e51,_0x1d32e5),_0x16cead(0x14b)+_0x1dd8f5['id']+'\x20'+_0x181ef1+_0x16cead(0x170));}}function sameValue(_0x4a525c,_0x5f110f){const _0x472fde=a191_0x14ee11;if(Array[_0x472fde(0x13e)](_0x4a525c)||Array[_0x472fde(0x13e)](_0x5f110f))return JSON[_0x472fde(0x183)](_0x4a525c)===JSON[_0x472fde(0x183)](_0x5f110f);return _0x4a525c===_0x5f110f;}
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0x40e158=a192_0xfef7;(function(_0x2370f0,_0x3ec76b){const _0x29a1c6=a192_0xfef7,_0x4a71a6=_0x2370f0();while(!![]){try{const _0xc0556f=parseInt(_0x29a1c6(0x19e))/0x1+parseInt(_0x29a1c6(0x1b3))/0x2+-parseInt(_0x29a1c6(0x1a5))/0x3*(parseInt(_0x29a1c6(0x1b5))/0x4)+parseInt(_0x29a1c6(0x1ad))/0x5+parseInt(_0x29a1c6(0x1ae))/0x6+-parseInt(_0x29a1c6(0x1a9))/0x7*(-parseInt(_0x29a1c6(0x198))/0x8)+-parseInt(_0x29a1c6(0x19f))/0x9;if(_0xc0556f===_0x3ec76b)break;else _0x4a71a6['push'](_0x4a71a6['shift']());}catch(_0x3862a5){_0x4a71a6['push'](_0x4a71a6['shift']());}}}(a192_0x4283,0x2950c));function a192_0xfef7(_0x21f3c2,_0x41ecda){_0x21f3c2=_0x21f3c2-0x196;const _0x4283ec=a192_0x4283();let _0xfef70f=_0x4283ec[_0x21f3c2];return _0xfef70f;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x40e158(0x19a);async function prepareCreate(_0x383e66){const _0x1abfc3=a192_0x40e158,_0x27327b=await readNotificationDocument(_0x383e66,_0x1abfc3(0x199)),_0x45bfe7=createMutationInput(_0x383e66[_0x1abfc3(0x1a0)],_0x27327b);return{'document':_0x27327b,'input':_0x45bfe7,'planned':projectNotificationConfig({'appCode':_0x383e66[_0x1abfc3(0x1a0)],'configName':_0x27327b['configName'],'channelType':_0x27327b[_0x1abfc3(0x1ac)],'endpointUrl':_0x27327b['endpointUrl'],'channelConfig':_0x27327b['channelConfig'],'description':_0x27327b['description'],'connectTimeout':_0x27327b[_0x1abfc3(0x1a4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x27327b['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x4283(){const _0x2ad6dc=['notification_config_create_outcome_unknown','config-create',';\x20do\x20not\x20resubmit.','POST','184126qIamzt','Created\x20notification\x20config\x20','5732RqsyQh','notification','input','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','2728HxsCuJ','create','/notification/channel-config/create','verification','document','Inspect\x20with\x20','76010RYByQd','2996847QusJwC','appCode','verified','write','configName','connectTimeout','81OtGdtj','isSafeInteger','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','mutation','917rEtfOp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configCode','channelType','272225bbJjnR','1642278bgbFCm'];a192_0x4283=function(){return _0x2ad6dc;};return a192_0x4283();}export const notificationConfigCreate={'service':a192_0x40e158(0x1b6),'command':a192_0x40e158(0x1b0),'description':a192_0x40e158(0x1a7),'risk':a192_0x40e158(0x1a2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x53fd4e){assertSingleNotificationSource(_0x53fd4e);},async 'dryRun'(_0x563b98){const _0x5448c7=a192_0x40e158,_0x2887a9=await prepareCreate(_0x563b98),_0x3097c3=notificationLookupCommand(_0x563b98[_0x5448c7(0x1a0)],_0x2887a9['document'][_0x5448c7(0x1ac)]);return asDryRunResult({'operation':_0x5448c7(0x199),'selector':{'appCode':_0x563b98[_0x5448c7(0x1a0)],'configName':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1a3)],'channelType':_0x2887a9[_0x5448c7(0x19c)][_0x5448c7(0x1ac)]},'before':null,'after':_0x2887a9[_0x5448c7(0x196)],'dryRun':!![],'backend':{'method':_0x5448c7(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5448c7(0x196),'lookupCommand':_0x3097c3}},{'method':_0x5448c7(0x1b2),'url':CREATE_PATH});},async 'execute'(_0xdf93c){const _0x3f0325=a192_0x40e158,_0x299d8d=await prepareCreate(_0xdf93c),_0x855c5e=notificationLookupCommand(_0xdf93c['appCode'],_0x299d8d[_0x3f0325(0x19c)][_0x3f0325(0x1ac)]);let _0x1e3b2c;try{_0x1e3b2c=await createNotificationChannelConfig(_0x299d8d[_0x3f0325(0x1b7)]);}catch(_0x7ae5){if(isPlatformTransportFailure(_0x7ae5))throw notificationError(_0x3f0325(0x1af),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));throw safeApiFailure('create',_0x3f0325(0x1a8),'Inspect\x20with\x20'+_0x855c5e+_0x3f0325(0x197));}if(!Number[_0x3f0325(0x1a6)](_0x1e3b2c)||_0x1e3b2c<=0x0)throw notificationError(_0x3f0325(0x1af),_0x3f0325(0x1aa),_0x3f0325(0x19d)+_0x855c5e+_0x3f0325(0x1b1));let _0x289d2d;try{const _0x5d1b52=await getNotificationChannelConfig(_0x1e3b2c,_0xdf93c['appCode']);_0x289d2d=normalizeExactNotificationConfig(_0x5d1b52,_0x1e3b2c,_0xdf93c['appCode']);}catch{throw safeApiFailure(_0x3f0325(0x199),_0x3f0325(0x19b),_0x3f0325(0x19d)+_0x855c5e+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x3f0325(0x199),'selector':{'appCode':_0x289d2d[_0x3f0325(0x1a0)],'id':_0x289d2d['id'],'configCode':_0x289d2d[_0x3f0325(0x1ab)],'configName':_0x289d2d['configName'],'channelType':_0x289d2d[_0x3f0325(0x1ac)]},'before':null,'after':projectNotificationConfig(_0x289d2d),'dryRun':![],'backend':{'method':_0x3f0325(0x1b2),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3f0325(0x1a1),'lookupCommand':_0x855c5e}},'message':_0x3f0325(0x1b4)+_0x289d2d['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a193_0x30b77c=a193_0x3c83;(function(_0x33000b,_0x13ad34){const _0x543c65=a193_0x3c83,_0x4119ed=_0x33000b();while(!![]){try{const _0x2bae8b=-parseInt(_0x543c65(0x119))/0x1+parseInt(_0x543c65(0x10b))/0x2*(-parseInt(_0x543c65(0x114))/0x3)+-parseInt(_0x543c65(0x11b))/0x4*(-parseInt(_0x543c65(0x111))/0x5)+-parseInt(_0x543c65(0x10a))/0x6*(-parseInt(_0x543c65(0x10d))/0x7)+-parseInt(_0x543c65(0x107))/0x8*(-parseInt(_0x543c65(0x117))/0x9)+-parseInt(_0x543c65(0x10e))/0xa*(parseInt(_0x543c65(0x11c))/0xb)+parseInt(_0x543c65(0x108))/0xc;if(_0x2bae8b===_0x13ad34)break;else _0x4119ed['push'](_0x4119ed['shift']());}catch(_0x3a437c){_0x4119ed['push'](_0x4119ed['shift']());}}}(a193_0x2147,0x6cb04));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x2147(){const _0xd5f8ff=['Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','35645BZRiaX','Inspect\x20with\x20','POST','890952nfqAid','some','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','9wLaEwy','mutation','412996SuxMqT','appCode','460XIOYGK','44pKVEdO','verified',';\x20do\x20not\x20resubmit\x20automatically.','before','delete','/notification/channel-config/delete','\x20delete\x20could\x20not\x20be\x20verified.','planned','config-delete','Notification\x20config\x20','notification_config_delete_verification_failed','notification','channelType','3862024fTirqg','314940WQaUsw','high-risk-write','18UnDmZr','2LjHDfv','notification_config_delete_outcome_unknown','1378979UoJXjf','1911640tIdzOg'];a193_0x2147=function(){return _0xd5f8ff;};return a193_0x2147();}function a193_0x3c83(_0x5cab02,_0x3138a6){_0x5cab02=_0x5cab02-0x100;const _0x214710=a193_0x2147();let _0x3c8392=_0x214710[_0x5cab02];return _0x3c8392;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x30b77c(0x121),REFERENCE_WARNING=a193_0x30b77c(0x10f);async function prepareDelete(_0x2cd978){const _0x41fb82=a193_0x30b77c,_0x5ede00=readNotificationId(_0x2cd978),_0x2ee5b8=await requireExactNotificationConfig(_0x2cd978['appCode'],_0x5ede00,_0x41fb82(0x120));return{'id':_0x5ede00,'before':_0x2ee5b8};}export const notificationConfigDelete={'service':a193_0x30b77c(0x105),'command':a193_0x30b77c(0x102),'description':a193_0x30b77c(0x110),'risk':a193_0x30b77c(0x109),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5f497e){readNotificationId(_0x5f497e),requireNotificationExplicitYes(_0x5f497e);},async 'dryRun'(_0x2ac991){const _0x50fe80=a193_0x30b77c,_0x194873=await prepareDelete(_0x2ac991),_0x14eae0=notificationLookupCommand(_0x2ac991[_0x50fe80(0x11a)],_0x194873[_0x50fe80(0x11f)][_0x50fe80(0x106)]);return asDryRunResult({'operation':_0x50fe80(0x120),'selector':notificationSelector(_0x194873['before']),'before':projectNotificationConfig(_0x194873['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x50fe80(0x101),'lookupCommand':_0x14eae0}},{'method':_0x50fe80(0x113),'url':DELETE_PATH});},async 'execute'(_0x2d9cf8){const _0x2c121a=a193_0x30b77c;requireNotificationExplicitYes(_0x2d9cf8);const _0x560809=await prepareDelete(_0x2d9cf8),_0x2cd576=notificationLookupCommand(_0x2d9cf8['appCode'],_0x560809['before']['channelType']);let _0x1cf451=![];try{await deleteNotificationChannelConfig(_0x560809['id'],_0x2d9cf8[_0x2c121a(0x11a)]);}catch(_0x171f5f){if(!isPlatformTransportFailure(_0x171f5f))throw safeApiFailure(_0x2c121a(0x120),_0x2c121a(0x118),'Inspect\x20with\x20'+_0x2cd576+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1cf451=!![];}let _0x47c43e;try{_0x47c43e=await listNotificationChannelConfigs(_0x2d9cf8['appCode'],_0x560809['before'][_0x2c121a(0x106)]),validateNotificationDeleteReadback(_0x47c43e,_0x2d9cf8[_0x2c121a(0x11a)],_0x560809[_0x2c121a(0x11f)][_0x2c121a(0x106)]);}catch{throw notificationError(_0x1cf451?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x560809['id']+_0x2c121a(0x100),_0x2c121a(0x112)+_0x2cd576+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x47c43e[_0x2c121a(0x115)](_0x597219=>_0x597219['id']===_0x560809['id']))throw notificationError(_0x1cf451?_0x2c121a(0x10c):_0x2c121a(0x104),_0x2c121a(0x103)+_0x560809['id']+'\x20remains\x20present\x20after\x20delete.',_0x2c121a(0x112)+_0x2cd576+_0x2c121a(0x11e));const _0x31af3c=[REFERENCE_WARNING];return _0x1cf451&&_0x31af3c['unshift'](_0x2c121a(0x116)),{'ok':!![],'data':{'operation':_0x2c121a(0x120),'selector':notificationSelector(_0x560809[_0x2c121a(0x11f)]),'before':projectNotificationConfig(_0x560809[_0x2c121a(0x11f)]),'after':null,'dryRun':![],'backend':{'method':_0x2c121a(0x113),'path':DELETE_PATH},'warnings':_0x31af3c,'verification':{'status':_0x2c121a(0x11d),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1cf451,'lookupCommand':_0x2cd576}},'message':'Deleted\x20notification\x20config\x20'+_0x560809['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x1772bc=a194_0x5d1c;(function(_0x2841ae,_0x33e840){const _0x26dcf5=a194_0x5d1c,_0x358599=_0x2841ae();while(!![]){try{const _0x3bb9d5=parseInt(_0x26dcf5(0xb7))/0x1+-parseInt(_0x26dcf5(0xa3))/0x2+-parseInt(_0x26dcf5(0xa1))/0x3*(-parseInt(_0x26dcf5(0xb8))/0x4)+-parseInt(_0x26dcf5(0x9f))/0x5+parseInt(_0x26dcf5(0xa4))/0x6+-parseInt(_0x26dcf5(0xbb))/0x7+parseInt(_0x26dcf5(0xac))/0x8;if(_0x3bb9d5===_0x33e840)break;else _0x358599['push'](_0x358599['shift']());}catch(_0x116f7e){_0x358599['push'](_0x358599['shift']());}}}(a194_0x36d8,0x9b24f));function a194_0x36d8(){const _0x473f96=['flat','boolean','length','appCode','\x20notification\x20config(s)','read','string','all','1225568qGrUQL','1750628JTRyfA','bool','map','3126039dVVYRs','1291955eqwuVx','notification','3TdXtTb','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','1233058yCOxMi','1757064WhjECT','type','Found\x20','trim','validation','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','7192pFsIFH','Notification\x20channel\x20type','config-list'];a194_0x36d8=function(){return _0x473f96;};return a194_0x36d8();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a194_0x5d1c(_0x3930c6,_0x49ab9c){_0x3930c6=_0x3930c6-0x9f;const _0x36d89d=a194_0x36d8();let _0x5d1c63=_0x36d89d[_0x3930c6];return _0x5d1c63;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x1772bc(0xa0),'command':a194_0x1772bc(0xae),'description':a194_0x1772bc(0xaa),'risk':a194_0x1772bc(0xb4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x1772bc(0xa5),'type':a194_0x1772bc(0xb5),'description':a194_0x1772bc(0xad),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x1772bc(0xb0),'default':![],'description':a194_0x1772bc(0xa9)}],async 'validate'(_0x29cd5d){const _0x25f3a5=a194_0x1772bc;if(_0x29cd5d[_0x25f3a5(0xb9)](_0x25f3a5(0xb6))&&_0x29cd5d['str'](_0x25f3a5(0xa5))[_0x25f3a5(0xa7)]())throw CliErrors[_0x25f3a5(0xa8)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x25f3a5(0xa2));if(_0x29cd5d['bool'](_0x25f3a5(0xb6)))return;readNotificationChannelType(_0x29cd5d);},async 'execute'(_0x1f0033){const _0x472587=a194_0x1772bc;if(_0x1f0033[_0x472587(0xb9)](_0x472587(0xb6))){const _0x535b41=await Promise[_0x472587(0xb6)](NOTIFICATION_CHANNEL_TYPES[_0x472587(0xba)](_0x321aa4=>listNotificationChannelConfigs(_0x1f0033[_0x472587(0xb2)],_0x321aa4))),_0x5dea53=_0x535b41[_0x472587(0xaf)]()[_0x472587(0xba)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x5dea53['length'],'configs':_0x5dea53},'message':'Found\x20'+_0x5dea53[_0x472587(0xb1)]+_0x472587(0xab)};}const _0x35925e=readNotificationChannelType(_0x1f0033),_0x7ac7e1=await listNotificationChannelConfigs(_0x1f0033['appCode'],_0x35925e),_0x557050=_0x7ac7e1['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1f0033[_0x472587(0xb2)],'channelType':_0x35925e,'count':_0x557050[_0x472587(0xb1)],'configs':_0x557050},'message':_0x472587(0xa6)+_0x557050[_0x472587(0xb1)]+'\x20'+_0x35925e+_0x472587(0xb3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a195_0x3d4c(_0x4127f1,_0x36dff6){_0x4127f1=_0x4127f1-0x126;const _0x5514d9=a195_0x5514();let _0x3d4cbf=_0x5514d9[_0x4127f1];return _0x3d4cbf;}const a195_0x4a21e9=a195_0x3d4c;(function(_0x3c4865,_0x1bedeb){const _0x45aac8=a195_0x3d4c,_0x4d54e4=_0x3c4865();while(!![]){try{const _0x1b4235=parseInt(_0x45aac8(0x134))/0x1+parseInt(_0x45aac8(0x144))/0x2*(parseInt(_0x45aac8(0x127))/0x3)+-parseInt(_0x45aac8(0x13b))/0x4+parseInt(_0x45aac8(0x12c))/0x5*(-parseInt(_0x45aac8(0x13e))/0x6)+parseInt(_0x45aac8(0x13d))/0x7+-parseInt(_0x45aac8(0x138))/0x8*(-parseInt(_0x45aac8(0x133))/0x9)+parseInt(_0x45aac8(0x142))/0xa;if(_0x1b4235===_0x1bedeb)break;else _0x4d54e4['push'](_0x4d54e4['shift']());}catch(_0x5bbe0e){_0x4d54e4['push'](_0x4d54e4['shift']());}}}(a195_0x5514,0xbaf04));function a195_0x5514(){const _0x5bbb62=['provesChange','16NIZBMD','Inspect\x20with\x20--id\x20','before','3491680lJQjFf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','4809889UZqfLh','462Dxtuqs','appCode','Updated\x20notification\x20config\x20','notification_config_update_outcome_unknown','3146730ixKTSM','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1094NVErfz','config-update','/notification/channel-config/update','verified',';\x20do\x20not\x20resubmit\x20automatically.','POST','planned','1857cVfynz','channelType','update','notification_config_update_verification_unavailable','payload','51725ZtzGzz','\x20via\x20','high-risk-write','notification','Inspect\x20ID\x20','allMatch','Notification\x20config\x20','4608594bLUWBM','70660VBoMqB','mutation','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.'];a195_0x5514=function(){return _0x5bbb62;};return a195_0x5514();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x4a21e9(0x146);async function prepareUpdate(_0xf6f835){const _0x2ff391=a195_0x4a21e9,_0x5615ff=readNotificationId(_0xf6f835),_0x5a8703=await readNotificationDocument(_0xf6f835,_0x2ff391(0x129)),_0x28344a=await requireExactNotificationConfig(_0xf6f835[_0x2ff391(0x13f)],_0x5615ff,_0x2ff391(0x129));return{'id':_0x5615ff,'patch':_0x5a8703,'before':_0x28344a,'payload':mergeUpdateInput(_0x28344a,_0x5a8703),'planned':plannedUpdateProjection(_0x28344a,_0x5a8703)};}export const notificationConfigUpdate={'service':a195_0x4a21e9(0x12f),'command':a195_0x4a21e9(0x145),'description':a195_0x4a21e9(0x13c),'risk':a195_0x4a21e9(0x12e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4e5809){readNotificationId(_0x4e5809),assertSingleNotificationSource(_0x4e5809),requireNotificationExplicitYes(_0x4e5809);},async 'dryRun'(_0x46d7e7){const _0x5bb89f=a195_0x4a21e9,_0x4587f1=await prepareUpdate(_0x46d7e7),_0x8042c=notificationLookupCommand(_0x46d7e7[_0x5bb89f(0x13f)],_0x4587f1[_0x5bb89f(0x13a)][_0x5bb89f(0x128)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x4587f1[_0x5bb89f(0x13a)]),'before':projectNotificationConfig(_0x4587f1[_0x5bb89f(0x13a)]),'after':_0x4587f1[_0x5bb89f(0x126)],'dryRun':!![],'backend':{'method':_0x5bb89f(0x149),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x5bb89f(0x126),'lookupCommand':_0x8042c}},{'method':_0x5bb89f(0x149),'url':UPDATE_PATH});},async 'execute'(_0xabfb49){const _0x212ad4=a195_0x4a21e9;requireNotificationExplicitYes(_0xabfb49);const _0x3c909f=await prepareUpdate(_0xabfb49),_0x293168=notificationLookupCommand(_0xabfb49[_0x212ad4(0x13f)],_0x3c909f[_0x212ad4(0x13a)][_0x212ad4(0x128)]);let _0x2ea8e0=![];try{await updateNotificationChannelConfig(_0x3c909f[_0x212ad4(0x12b)]);}catch(_0x13cce6){if(!isPlatformTransportFailure(_0x13cce6))throw safeApiFailure(_0x212ad4(0x129),_0x212ad4(0x135),_0x212ad4(0x130)+_0x3c909f['id']+'\x20with\x20'+_0x293168+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x2ea8e0=!![];}let _0x49baf1;try{const _0x4a821e=await getNotificationChannelConfig(_0x3c909f['id'],_0xabfb49[_0x212ad4(0x13f)]);_0x49baf1=normalizeExactNotificationConfig(_0x4a821e,_0x3c909f['id'],_0xabfb49['appCode']);}catch{throw notificationError(_0x2ea8e0?_0x212ad4(0x141):_0x212ad4(0x12a),_0x212ad4(0x132)+_0x3c909f['id']+_0x212ad4(0x136),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));}const _0x3965b7=requestedSafeFieldsMatch(_0x3c909f[_0x212ad4(0x13a)],_0x49baf1,_0x3c909f['patch']);if(!_0x3965b7[_0x212ad4(0x131)]||_0x2ea8e0&&!_0x3965b7[_0x212ad4(0x137)])throw notificationError(_0x2ea8e0?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3c909f['id']+_0x212ad4(0x143),_0x212ad4(0x139)+_0x3c909f['id']+_0x212ad4(0x12d)+_0x293168+_0x212ad4(0x148));const _0x4a84e8=_0x2ea8e0?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x212ad4(0x129),'selector':notificationSelector(_0x49baf1),'before':projectNotificationConfig(_0x3c909f['before']),'after':projectNotificationConfig(_0x49baf1),'dryRun':![],'backend':{'method':_0x212ad4(0x149),'path':UPDATE_PATH},'warnings':_0x4a84e8,'verification':{'status':_0x212ad4(0x147),'recoveredAfterUnknownResponse':_0x2ea8e0,'verifiedFields':_0x3965b7['verifiedFields'],'lookupCommand':_0x293168}},'message':_0x212ad4(0x140)+_0x49baf1['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a196_0x358e(_0x2c9d34,_0x72a0c0){_0x2c9d34=_0x2c9d34-0x111;const _0x33b194=a196_0x33b1();let _0x358ef2=_0x33b194[_0x2c9d34];return _0x358ef2;}(function(_0x565e47,_0x1574ca){const _0x212183=a196_0x358e,_0x21af23=_0x565e47();while(!![]){try{const _0x163e23=parseInt(_0x212183(0x118))/0x1*(parseInt(_0x212183(0x119))/0x2)+-parseInt(_0x212183(0x114))/0x3+-parseInt(_0x212183(0x116))/0x4+-parseInt(_0x212183(0x112))/0x5*(parseInt(_0x212183(0x117))/0x6)+-parseInt(_0x212183(0x11a))/0x7*(-parseInt(_0x212183(0x113))/0x8)+parseInt(_0x212183(0x115))/0x9+-parseInt(_0x212183(0x111))/0xa*(-parseInt(_0x212183(0x11b))/0xb);if(_0x163e23===_0x1574ca)break;else _0x21af23['push'](_0x21af23['shift']());}catch(_0x1f0458){_0x21af23['push'](_0x21af23['shift']());}}}(a196_0x33b1,0x36e36));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0x33b1(){const _0x507c9f=['7tiwwaW','33JmnczD','923090JMPpEn','15cezWzi','920048kwTeLu','259809KvQvtr','1217007fMQEkh','529268sjeZAD','295578tsBYnh','64375jhubPR','2OpqHcp'];a196_0x33b1=function(){return _0x507c9f;};return a196_0x33b1();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x51c5e6=a197_0x1529;function a197_0x1529(_0x4e21fd,_0x58287b){_0x4e21fd=_0x4e21fd-0x13a;const _0x3f4868=a197_0x3f48();let _0x152908=_0x3f4868[_0x4e21fd];return _0x152908;}(function(_0x332541,_0x12073e){const _0x1c55bc=a197_0x1529,_0x1da24a=_0x332541();while(!![]){try{const _0x5e2968=-parseInt(_0x1c55bc(0x172))/0x1*(parseInt(_0x1c55bc(0x15c))/0x2)+-parseInt(_0x1c55bc(0x16c))/0x3+-parseInt(_0x1c55bc(0x1a9))/0x4*(parseInt(_0x1c55bc(0x13b))/0x5)+parseInt(_0x1c55bc(0x140))/0x6+parseInt(_0x1c55bc(0x173))/0x7+-parseInt(_0x1c55bc(0x16b))/0x8*(-parseInt(_0x1c55bc(0x17d))/0x9)+-parseInt(_0x1c55bc(0x163))/0xa*(-parseInt(_0x1c55bc(0x148))/0xb);if(_0x5e2968===_0x12073e)break;else _0x1da24a['push'](_0x1da24a['shift']());}catch(_0x274719){_0x1da24a['push'](_0x1da24a['shift']());}}}(a197_0x3f48,0x9d1e4));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_0x51c5e6(0x193),a197_0x51c5e6(0x164),a197_0x51c5e6(0x174),'WECOM',a197_0x51c5e6(0x185)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x51c5e6(0x1ac),a197_0x51c5e6(0x17f),a197_0x51c5e6(0x16a),a197_0x51c5e6(0x13d),'description',a197_0x51c5e6(0x189),a197_0x51c5e6(0x162)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x51c5e6(0x180),a197_0x51c5e6(0x18d)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x51c5e6(0x199),'recipients',a197_0x51c5e6(0x144),a197_0x51c5e6(0x14f),a197_0x51c5e6(0x170),a197_0x51c5e6(0x15f),a197_0x51c5e6(0x1b2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x165)},{'name':a197_0x51c5e6(0x169),'type':'boolean','required':![],'default':![],'description':a197_0x51c5e6(0x188)},{'name':a197_0x51c5e6(0x150),'type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x1b5)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x51c5e6(0x146),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x58c5c7,_0x76af1e,_0x90d2c2){return new CliError(_0x58c5c7,0x1,_0x76af1e,_0x90d2c2);}export function readNotificationId(_0x8fe525){const _0xcdbe92=a197_0x51c5e6,_0x47e231=_0x8fe525['num']('id');if(!Number[_0xcdbe92(0x192)](_0x47e231)||_0x47e231<=0x0)throw notificationError(_0xcdbe92(0x1af),_0xcdbe92(0x161));return _0x47e231;}export function requireNotificationExplicitYes(_0xf52d77){const _0xfb038=a197_0x51c5e6;if(_0xf52d77[_0xfb038(0x175)](_0xfb038(0x141))||_0xf52d77['bool']('yes'))return;throw notificationError(_0xfb038(0x160),_0xfb038(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x62e34f,_0x44819c=a197_0x51c5e6(0x18c),_0x27fdd0='EMAIL'){const _0x436a30=a197_0x51c5e6,_0x30fd27=_0x62e34f[_0x436a30(0x13f)](_0x44819c)[_0x436a30(0x16d)]()||_0x27fdd0;if(!NOTIFICATION_CHANNEL_TYPES[_0x436a30(0x159)](_0x30fd27))throw CliErrors['validation']('Invalid\x20--'+_0x44819c+':\x20'+_0x30fd27,_0x436a30(0x179)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x30fd27;}export function assertSingleNotificationSource(_0x1c235b){const _0x61d596=a197_0x51c5e6,_0x2f889f=[],_0x2f3d92=_0x1c235b['str']('file')['trim']();if(_0x2f3d92)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x18f),'path':_0x2f3d92});if(_0x1c235b[_0x61d596(0x175)](_0x61d596(0x169)))_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x169)});const _0x2239d4=_0x1c235b[_0x61d596(0x13f)](_0x61d596(0x150))[_0x61d596(0x16d)]();if(_0x2239d4)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x198),'name':_0x2239d4});if(_0x2f889f[_0x61d596(0x157)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x61d596(0x1a7));if(_0x2f889f[_0x61d596(0x157)]>0x1)throw CliErrors['validation'](_0x61d596(0x166),_0x61d596(0x1a7));return _0x2f889f[0x0];}export async function readNotificationDocument(_0x10ad61,_0x247707){const _0x484687=a197_0x51c5e6,_0x2f22ed=assertSingleNotificationSource(_0x10ad61),_0x256d4c=_0x2f22ed[_0x484687(0x186)]==='file'?_0x484687(0x171)+_0x2f22ed[_0x484687(0x147)]:_0x2f22ed['kind']===_0x484687(0x198)?_0x484687(0x17c)+_0x2f22ed[_0x484687(0x152)]:_0x484687(0x169);let _0x315757;try{if(_0x2f22ed['kind']==='file')_0x315757=await readFile(_0x2f22ed[_0x484687(0x147)],_0x484687(0x1a1));else{if(_0x2f22ed[_0x484687(0x186)]===_0x484687(0x198)){if(!(_0x2f22ed[_0x484687(0x152)]in process.env))throw notificationError(_0x484687(0x187),_0x484687(0x1a2)+_0x2f22ed['name']);_0x315757=process.env[_0x2f22ed.name]??'';}else _0x315757=await readStdin();}}catch(_0x733bd){if(_0x733bd instanceof CliError)throw _0x733bd;throw notificationError('notification_config_source_unavailable',_0x484687(0x167)+_0x256d4c+'.');}let _0x52de9f;try{_0x52de9f=JSON[_0x484687(0x176)](_0x315757);}catch{throw notificationError('notification_config_json_invalid',_0x484687(0x15a)+_0x256d4c+_0x484687(0x19b),_0x484687(0x17e));}if(!isJsonObject(_0x52de9f))throw notificationError(_0x484687(0x1a3),'Notification\x20JSON\x20from\x20'+_0x256d4c+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x52de9f,_0x247707);}export function projectNotificationListConfig(_0x221df8,_0x5e578b){const _0xd2948=a197_0x51c5e6;return{'id':typeof _0x221df8['id']===_0xd2948(0x146)?_0x221df8['id']:null,'configCode':requireResponseString(_0x221df8[_0xd2948(0x180)],_0xd2948(0x180),_0x5e578b),'configName':requireResponseString(_0x221df8[_0xd2948(0x1ac)],_0xd2948(0x1ac),_0x5e578b),'channelType':requireResponseString(_0x221df8[_0xd2948(0x17f)],_0xd2948(0x17f),_0x5e578b),'description':normalizeNullableString(_0x221df8[_0xd2948(0x19a)]),'createTime':normalizeNullableString(_0x221df8[_0xd2948(0x177)]),'updateTime':normalizeNullableString(_0x221df8[_0xd2948(0x142)])};}export function normalizeExactNotificationConfig(_0x26fee3,_0x597c15,_0x251c04){const _0x59c617=a197_0x51c5e6;if(!Number[_0x59c617(0x192)](_0x26fee3['id'])||_0x26fee3['id']!==_0x597c15)throw notificationError('notification_config_response_invalid',_0x59c617(0x13e)+_0x597c15+'.');if(_0x26fee3['appCode']!==_0x251c04)throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+_0x59c617(0x1ad));const _0x1c8a3b=requireExactString(_0x26fee3[_0x59c617(0x1ac)],_0x59c617(0x1ac),_0x597c15),_0x4a6484=requireExactString(_0x26fee3[_0x59c617(0x180)],_0x59c617(0x180),_0x597c15),_0x14e422=requireExactString(_0x26fee3[_0x59c617(0x17f)],'channelType',_0x597c15);if(!NOTIFICATION_CHANNEL_TYPES[_0x59c617(0x159)](_0x14e422))throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+'\x20has\x20an\x20unsupported\x20channelType.');const _0x56d655=responseNullableString(_0x26fee3[_0x59c617(0x16a)],_0x59c617(0x16a),_0x597c15),_0x59774e=responseNullableString(_0x26fee3[_0x59c617(0x13d)],'channelConfig',_0x597c15),_0x206c28=responseNullableString(_0x26fee3[_0x59c617(0x19a)],_0x59c617(0x19a),_0x597c15),_0x3c3296=responseNullableTimeout(_0x26fee3[_0x59c617(0x189)],_0x59c617(0x189),_0x597c15),_0x4c24d9=responseNullableTimeout(_0x26fee3[_0x59c617(0x162)],_0x59c617(0x162),_0x597c15);return{'id':_0x597c15,'appCode':_0x251c04,'configCode':_0x4a6484,'configName':_0x1c8a3b,'channelType':_0x14e422,'endpointUrl':redactSensitive(_0x56d655),'channelConfig':redactSensitive(_0x59774e),'description':_0x206c28,'connectTimeout':_0x3c3296,'readTimeout':_0x4c24d9,'endpointUrlRaw':_0x56d655,'channelConfigRaw':_0x59774e};}export async function requireExactNotificationConfig(_0x1f9206,_0x4478c4,_0x28caa2){const _0x3f6161=a197_0x51c5e6;let _0x540574;try{_0x540574=await getNotificationChannelConfig(_0x4478c4,_0x1f9206);}catch{throw safeApiFailure(_0x28caa2,_0x3f6161(0x183),_0x3f6161(0x191)+_0x1f9206+_0x3f6161(0x14e));}return normalizeExactNotificationConfig(_0x540574,_0x4478c4,_0x1f9206);}export function projectNotificationConfig(_0x54b332){const _0x2fbada=a197_0x51c5e6;return{'id':_0x54b332['id']??null,'appCode':_0x54b332[_0x2fbada(0x184)],'configCode':_0x54b332['configCode']??null,'configName':_0x54b332[_0x2fbada(0x1ac)],'channelType':_0x54b332[_0x2fbada(0x17f)],'endpointUrl':redactSensitive(_0x54b332['endpointUrl']),'channelConfig':redactSensitive(_0x54b332[_0x2fbada(0x13d)]),'description':_0x54b332[_0x2fbada(0x19a)]??null,'connectTimeout':_0x54b332['connectTimeout']??null,'readTimeout':_0x54b332['readTimeout']??null};}export function notificationSelector(_0x4b689a){const _0x126a9e=a197_0x51c5e6;return{'appCode':_0x4b689a[_0x126a9e(0x184)],'id':_0x4b689a['id'],'configCode':_0x4b689a[_0x126a9e(0x180)],'configName':_0x4b689a[_0x126a9e(0x1ac)],'channelType':_0x4b689a[_0x126a9e(0x17f)]};}export function createMutationInput(_0xe59177,_0x1be2d1){const _0x3eaf02=a197_0x51c5e6;return{'appCode':_0xe59177,'configName':_0x1be2d1[_0x3eaf02(0x1ac)],'channelType':_0x1be2d1['channelType'],...hasOwn(_0x1be2d1,_0x3eaf02(0x16a))?{'endpointUrl':_0x1be2d1[_0x3eaf02(0x16a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x13d))?{'channelConfig':serializeChannelConfig(_0x1be2d1['channelConfig'])}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x19a))?{'description':_0x1be2d1[_0x3eaf02(0x19a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x189))?{'connectTimeout':_0x1be2d1[_0x3eaf02(0x189)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x162))?{'readTimeout':_0x1be2d1[_0x3eaf02(0x162)]}:{}};}export function mergeUpdateInput(_0x385d00,_0x51deec){const _0x26595e=a197_0x51c5e6;return{'id':_0x385d00['id'],'appCode':_0x385d00['appCode'],'configName':_0x51deec[_0x26595e(0x1ac)]??_0x385d00[_0x26595e(0x1ac)],'channelType':_0x51deec[_0x26595e(0x17f)]??_0x385d00[_0x26595e(0x17f)],'endpointUrl':hasOwn(_0x51deec,_0x26595e(0x16a))?_0x51deec[_0x26595e(0x16a)]:_0x385d00[_0x26595e(0x13a)],'channelConfig':hasOwn(_0x51deec,_0x26595e(0x13d))?serializeChannelConfig(_0x51deec[_0x26595e(0x13d)]):_0x385d00['channelConfigRaw'],'description':hasOwn(_0x51deec,'description')?_0x51deec[_0x26595e(0x19a)]:_0x385d00[_0x26595e(0x19a)],'connectTimeout':hasOwn(_0x51deec,_0x26595e(0x189))?_0x51deec['connectTimeout']:_0x385d00[_0x26595e(0x189)],'readTimeout':hasOwn(_0x51deec,'readTimeout')?_0x51deec[_0x26595e(0x162)]:_0x385d00[_0x26595e(0x162)]};}export function plannedUpdateProjection(_0x249f5a,_0x297f56){const _0x4ae95b=a197_0x51c5e6;return projectNotificationConfig({'id':_0x249f5a['id'],'appCode':_0x249f5a[_0x4ae95b(0x184)],'configCode':_0x249f5a[_0x4ae95b(0x180)],'configName':_0x297f56['configName']??_0x249f5a[_0x4ae95b(0x1ac)],'channelType':_0x297f56[_0x4ae95b(0x17f)]??_0x249f5a[_0x4ae95b(0x17f)],'endpointUrl':hasOwn(_0x297f56,_0x4ae95b(0x16a))?_0x297f56[_0x4ae95b(0x16a)]:_0x249f5a[_0x4ae95b(0x13a)],'channelConfig':hasOwn(_0x297f56,_0x4ae95b(0x13d))?_0x297f56[_0x4ae95b(0x13d)]:_0x249f5a[_0x4ae95b(0x16e)],'description':hasOwn(_0x297f56,_0x4ae95b(0x19a))?_0x297f56['description']:_0x249f5a[_0x4ae95b(0x19a)],'connectTimeout':hasOwn(_0x297f56,_0x4ae95b(0x189))?_0x297f56[_0x4ae95b(0x189)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x249f5a[_0x4ae95b(0x189)],'readTimeout':hasOwn(_0x297f56,_0x4ae95b(0x162))?_0x297f56[_0x4ae95b(0x162)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x249f5a[_0x4ae95b(0x162)]});}export function requestedSafeFieldsMatch(_0x5de184,_0x4bb812,_0x41c5c0){const _0x51bcaf=a197_0x51c5e6,_0x5d9c9f=[],_0x3a4aaa=[],_0x1c0d45=[];for(const _0x1f573b of[_0x51bcaf(0x1ac),'channelType',_0x51bcaf(0x19a)]){if(!hasOwn(_0x41c5c0,_0x1f573b))continue;_0x1c0d45['push'](_0x1f573b),_0x5d9c9f[_0x51bcaf(0x149)](_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]),_0x3a4aaa['push'](_0x5de184[_0x1f573b]!==_0x41c5c0[_0x1f573b]&&_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]);}for(const _0x52dd23 of[_0x51bcaf(0x189),_0x51bcaf(0x162)]){if(!hasOwn(_0x41c5c0,_0x52dd23))continue;const _0x5d5df7=_0x41c5c0[_0x52dd23]??(_0x52dd23===_0x51bcaf(0x189)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1c0d45[_0x51bcaf(0x149)](_0x52dd23),_0x5d9c9f['push'](_0x4bb812[_0x52dd23]===_0x5d5df7),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x52dd23]!==_0x5d5df7&&_0x4bb812[_0x52dd23]===_0x5d5df7);}return hasOwn(_0x41c5c0,_0x51bcaf(0x16a))&&_0x41c5c0[_0x51bcaf(0x16a)]===null&&(_0x1c0d45['push'](_0x51bcaf(0x190)),_0x5d9c9f['push'](_0x4bb812[_0x51bcaf(0x13a)]===null||_0x4bb812['endpointUrlRaw']===''),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x51bcaf(0x13a)]!==null&&_0x5de184['endpointUrlRaw']!==''&&(_0x4bb812['endpointUrlRaw']===null||_0x4bb812[_0x51bcaf(0x13a)]===''))),{'allMatch':_0x5d9c9f[_0x51bcaf(0x14a)](Boolean),'provesChange':_0x3a4aaa['some'](Boolean),'verifiedFields':_0x1c0d45};}export function validateNotificationDeleteReadback(_0x3ce576,_0x5945e9,_0x5275bf){const _0xef321d=a197_0x51c5e6;for(const [_0x444cae,_0x17ae58]of _0x3ce576[_0xef321d(0x19d)]()){if(!Number[_0xef321d(0x192)](_0x17ae58['id'])||_0x17ae58['id']<=0x0)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x17ae58['appCode']!==_0x5945e9)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x17ae58['channelType']!==_0x5275bf)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x57dc4a,_0x5855ca,_0xf5dc64){const _0x207cc5=a197_0x51c5e6;return notificationError(_0x207cc5(0x178)+_0x57dc4a+'_'+(_0x5855ca==='mutation'?_0x207cc5(0x1aa):_0x5855ca+_0x207cc5(0x19e)),_0x207cc5(0x1ab)+_0x57dc4a+'\x20'+_0x5855ca+'\x20failed.',_0xf5dc64);}export function notificationLookupCommand(_0x28dd42,_0x2858e9){const _0x160e3a=a197_0x51c5e6;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x28dd42+_0x160e3a(0x15e)+_0x2858e9+'\x20--format\x20compress';}function validateNotificationDocument(_0x3e73cb,_0x5e28a8){const _0x59b470=a197_0x51c5e6;for(const _0x587759 of Object[_0x59b470(0x18b)](_0x3e73cb)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x587759))throw notificationError(_0x59b470(0x14b),_0x59b470(0x14c)+_0x587759+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x59b470(0x155)](_0x587759))throw notificationError('notification_config_field_unknown',_0x59b470(0x13c)+_0x587759+'\x22.');}if(_0x5e28a8===_0x59b470(0x156)&&Object[_0x59b470(0x18b)](_0x3e73cb)[_0x59b470(0x157)]===0x0)throw notificationError(_0x59b470(0x1a5),_0x59b470(0x153));const _0x3e72c9={};if(hasOwn(_0x3e73cb,_0x59b470(0x1ac)))_0x3e72c9[_0x59b470(0x1ac)]=validateRequiredString(_0x3e73cb['configName'],_0x59b470(0x1ac),0x80);else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError(_0x59b470(0x1a6),_0x59b470(0x197)+'\x22configName\x22.');}if(hasOwn(_0x3e73cb,_0x59b470(0x17f))){if(typeof _0x3e73cb['channelType']!=='string')throw invalidFieldType(_0x59b470(0x17f),_0x59b470(0x196));const _0x6358bf=_0x3e73cb[_0x59b470(0x17f)][_0x59b470(0x16d)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x159)](_0x6358bf))throw notificationError('notification_config_field_invalid',_0x59b470(0x181),_0x59b470(0x179)+NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x195)](',\x20')+'.');_0x3e72c9[_0x59b470(0x17f)]=_0x6358bf;}else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError('notification_config_field_required',_0x59b470(0x197)+_0x59b470(0x182));}for(const [_0x35a93e,_0x2f7386]of[['endpointUrl',0x200],[_0x59b470(0x19a),0x100]]){if(!hasOwn(_0x3e73cb,_0x35a93e))continue;const _0x22cba7=_0x3e73cb[_0x35a93e];if(_0x22cba7!==null&&typeof _0x22cba7!==_0x59b470(0x1b0))throw invalidFieldType(_0x35a93e,'a\x20string\x20or\x20null');if(typeof _0x22cba7===_0x59b470(0x1b0)&&_0x22cba7['length']>_0x2f7386)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x35a93e+_0x59b470(0x19f)+_0x2f7386+'\x20characters.');_0x3e72c9[_0x35a93e]=_0x22cba7;}if(hasOwn(_0x3e73cb,'channelConfig')){const _0x53a4b6=_0x3e73cb['channelConfig'];if(_0x53a4b6===null&&_0x5e28a8===_0x59b470(0x1b4))throw invalidFieldType(_0x59b470(0x13d),_0x59b470(0x17b));if(_0x53a4b6!==null&&!isJsonObject(_0x53a4b6))throw invalidFieldType(_0x59b470(0x13d),_0x5e28a8===_0x59b470(0x156)?_0x59b470(0x18e):_0x59b470(0x17b));_0x53a4b6!==null&&validateChannelConfigFields(_0x3e72c9[_0x59b470(0x17f)],_0x53a4b6),_0x3e72c9[_0x59b470(0x13d)]=_0x53a4b6;}for(const _0x3c8df4 of['connectTimeout',_0x59b470(0x162)]){if(!hasOwn(_0x3e73cb,_0x3c8df4))continue;const _0x575995=_0x3e73cb[_0x3c8df4];if(_0x575995!==null&&(!Number[_0x59b470(0x192)](_0x575995)||_0x575995<0x0))throw notificationError('notification_config_field_invalid',_0x59b470(0x14c)+_0x3c8df4+_0x59b470(0x194));_0x3e72c9[_0x3c8df4]=_0x575995;}return _0x3e72c9;}function validateRequiredString(_0x344ddf,_0xfe505d,_0x1c8bc2){const _0x516a78=a197_0x51c5e6;if(typeof _0x344ddf!==_0x516a78(0x1b0))throw invalidFieldType(_0xfe505d,'a\x20non-empty\x20string');const _0x35200b=_0x344ddf[_0x516a78(0x16d)]();if(!_0x35200b)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x17a));if(_0x35200b[_0x516a78(0x157)]>_0x1c8bc2)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x19f)+_0x1c8bc2+_0x516a78(0x19c));return _0x35200b;}function a197_0x3f48(){const _0x5bfa04=['utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_json_invalid','stringify','notification_config_update_empty','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','296yhcvUk','failed','Notification\x20config\x20','configName','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','apiError','notification_config_id_invalid','string','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','fromName','\x22\x20must\x20be\x20','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','endpointUrlRaw','24425CkSnJW','Unknown\x20notification\x20JSON\x20field\x20\x22','channelConfig','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','str','5219562MqOGAu','dry-run','updateTime','\x20has\x20invalid\x20field\x20\x22','ccList','notification_config_field_invalid','number','path','11ssVwHs','push','every','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22','setEncoding','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','bccList','from-env','call','name','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','has','update','length','prototype','includes','Notification\x20JSON\x20from\x20','Notification\x20config\x20list\x20item\x20','3878PvcTZo','object','\x20--type\x20','subjectPrefix','notification_config_confirmation_required','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','readTimeout','8230780wCGQul','FEISHU','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20is\x20missing\x20required\x20field\x20\x22','stdin','endpointUrl','17104FYAsBh','2584497vEEhoX','trim','channelConfigRaw','notification_config_response_invalid','replyTo','file\x20','1IvtfYO','375291ymCfoy','DINGTALK','bool','parse','createTime','notification_config_','Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20JSON\x20object','environment\x20variable\x20','513vpgLeh','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','channelType','configCode','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22channelType\x22.','preflight','appCode','WEBHOOK','kind','notification_config_source_unavailable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','connectTimeout','\x22\x20is\x20forbidden.','keys','type','channelCode','a\x20JSON\x20object\x20or\x20null','file','endpointUrl:null','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','isSafeInteger','EMAIL','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','join','a\x20supported\x20string','Create\x20JSON\x20requires\x20field\x20','env','emailTargets','description','\x20is\x20invalid.','\x20characters.','entries','_unavailable','\x22\x20cannot\x20exceed\x20','notification_config_channel_field_forbidden'];a197_0x3f48=function(){return _0x5bfa04;};return a197_0x3f48();}function validateChannelConfigFields(_0x1c1bcf,_0x492a7c){const _0x236da0=a197_0x51c5e6;if(hasOwn(_0x492a7c,_0x236da0(0x1a8)))throw forbiddenChannelConfigField('messageTemplate');if(_0x1c1bcf===_0x236da0(0x193))for(const _0x3f155d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x492a7c,_0x3f155d))throw forbiddenChannelConfigField(_0x3f155d);}}function forbiddenChannelConfigField(_0x510932){const _0x48aede=a197_0x51c5e6;return notificationError(_0x48aede(0x1a0),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x510932+_0x48aede(0x18a));}function invalidFieldType(_0x58cc3d,_0x53d824){const _0x217029=a197_0x51c5e6;return notificationError('notification_config_field_invalid',_0x217029(0x14c)+_0x58cc3d+_0x217029(0x1b3)+_0x53d824+'.');}function serializeChannelConfig(_0x160061){const _0x3410de=a197_0x51c5e6;return _0x160061===null||_0x160061===undefined?null:JSON[_0x3410de(0x1a4)](_0x160061);}function redactSensitive(_0x112a9a){const _0x4d7d34=a197_0x51c5e6;return _0x112a9a===null||_0x112a9a===undefined||_0x112a9a===''?null:_0x4d7d34(0x154);}function requireResponseString(_0x2d3692,_0x72604d,_0x5809ee){const _0x44f2fb=a197_0x51c5e6;if(typeof _0x2d3692!==_0x44f2fb(0x1b0)||_0x2d3692[_0x44f2fb(0x16d)]()==='')throw CliErrors[_0x44f2fb(0x1ae)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5809ee+0x1)+_0x44f2fb(0x168)+_0x72604d+'\x22.');return _0x2d3692[_0x44f2fb(0x16d)]();}function requireExactString(_0x37c336,_0x43c090,_0x3d21e3){const _0x31924c=a197_0x51c5e6;if(typeof _0x37c336!==_0x31924c(0x1b0)||_0x37c336[_0x31924c(0x16d)]()==='')throw notificationError(_0x31924c(0x16f),_0x31924c(0x1ab)+_0x3d21e3+_0x31924c(0x168)+_0x43c090+'\x22.');return _0x37c336['trim']();}function responseNullableString(_0x2f7ac1,_0x191b43,_0x587885){const _0x1255a5=a197_0x51c5e6;if(_0x2f7ac1===undefined||_0x2f7ac1===null)return null;if(typeof _0x2f7ac1!==_0x1255a5(0x1b0))throw notificationError('notification_config_response_invalid',_0x1255a5(0x1ab)+_0x587885+'\x20has\x20invalid\x20field\x20\x22'+_0x191b43+'\x22.');return _0x2f7ac1;}function responseNullableTimeout(_0xc820d1,_0x1a7c21,_0x586c72){const _0x179522=a197_0x51c5e6;if(_0xc820d1===undefined||_0xc820d1===null)return null;if(!Number[_0x179522(0x192)](_0xc820d1)||_0xc820d1<0x0)throw notificationError(_0x179522(0x16f),_0x179522(0x1ab)+_0x586c72+_0x179522(0x143)+_0x1a7c21+'\x22.');return _0xc820d1;}function normalizeNullableString(_0x5c3807){return typeof _0x5c3807==='string'?_0x5c3807:null;}function isJsonObject(_0xad4bc5){const _0x596d60=a197_0x51c5e6;return _0xad4bc5!==null&&typeof _0xad4bc5===_0x596d60(0x15d)&&!Array['isArray'](_0xad4bc5);}function hasOwn(_0x26518e,_0x3afee5){const _0x28e76e=a197_0x51c5e6;return Object[_0x28e76e(0x158)]['hasOwnProperty'][_0x28e76e(0x151)](_0x26518e,_0x3afee5);}async function readStdin(){const _0x2f0dd1=a197_0x51c5e6;let _0x3b7afb='';process['stdin'][_0x2f0dd1(0x14d)](_0x2f0dd1(0x1a1));for await(const _0x12875f of process[_0x2f0dd1(0x169)])_0x3b7afb+=_0x12875f;return _0x3b7afb;}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x1ec9d9=a198_0x4480;(function(_0x536008,_0x508a95){const _0x17b0b0=a198_0x4480,_0x176209=_0x536008();while(!![]){try{const _0x187323=-parseInt(_0x17b0b0(0x19b))/0x1+parseInt(_0x17b0b0(0x198))/0x2*(parseInt(_0x17b0b0(0x191))/0x3)+parseInt(_0x17b0b0(0x19d))/0x4+parseInt(_0x17b0b0(0x1a8))/0x5*(-parseInt(_0x17b0b0(0x1ac))/0x6)+parseInt(_0x17b0b0(0x197))/0x7+-parseInt(_0x17b0b0(0x18f))/0x8+parseInt(_0x17b0b0(0x199))/0x9;if(_0x187323===_0x508a95)break;else _0x176209['push'](_0x176209['shift']());}catch(_0x147e67){_0x176209['push'](_0x176209['shift']());}}}(a198_0x3be2,0xd9752));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_0x1ec9d9(0x190),a198_0x1ec9d9(0x1b1),a198_0x1ec9d9(0x18a)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x1ec9d9(0x1bd),'general':a198_0x1ec9d9(0x1ab),'form':a198_0x1ec9d9(0x18d),'idCard':a198_0x1ec9d9(0x1a4)},SCENE_FLAG={'name':a198_0x1ec9d9(0x1b7),'type':a198_0x1ec9d9(0x19f),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x1ec9d9(0x19f),'description':a198_0x1ec9d9(0x1a6)},IMAGE_URL_FLAG={'name':'image-url','type':a198_0x1ec9d9(0x19f),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function a198_0x3be2(){const _0x552ee1=['<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','11306505DQoSkE','495376XQvwpg','12776976qrYFzq','str','742491xzljOW','GET','1924028ynMqFI','image-url','string','validation','image-file','invoice','apiError','IdCard','fileName','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Preview:\x20recognize\x20','41755zSfMAC','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','General','1074ZdIOnb','File\x20upload\x20response\x20missing\x20filePath.','filter','appCode','POST','form','recognize','.\x20Supported\x20scenes:\x20','imageUrl','read','/smartapi/common/queryFileUrl','scene','File\x20URL\x20response\x20missing\x20fileUrl.','/smartapi/common/uploadFile','trim','Unsupported\x20OCR\x20scene:\x20','imageFile','Invoice','fileUrl','idCard','filePath','count','Table','/smartapi/ocr/recognize-text','11028896GBIDKp','general','12VAFrBh','idcard','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','toString'];a198_0x3be2=function(){return _0x552ee1;};return a198_0x3be2();}function normalizeScene(_0x50c9da){const _0x30addd=a198_0x1ec9d9,_0xc85269=_0x50c9da[_0x30addd(0x1ba)]()['toLowerCase']();if(_0xc85269===_0x30addd(0x192))return _0x30addd(0x18a);if(_0xc85269===_0x30addd(0x1a2)||_0xc85269===_0x30addd(0x190)||_0xc85269===_0x30addd(0x1b1))return _0xc85269;throw CliErrors[_0x30addd(0x1a0)](_0x30addd(0x1bb)+_0x50c9da+_0x30addd(0x1b3)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x3daf74){const _0x34e5ac=a198_0x1ec9d9,_0x475d04=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x1a1))[_0x34e5ac(0x1ba)](),_0x562d22=_0x3daf74[_0x34e5ac(0x19a)](_0x34e5ac(0x19e))['trim']();return{'imageFile':_0x475d04,'imageUrl':_0x562d22,'count':[_0x475d04,_0x562d22][_0x34e5ac(0x1ae)](Boolean)['length']};}function validateInputSelection(_0x4cc9ed){const _0x452667=a198_0x1ec9d9,_0x66aba6=selectedInputs(_0x4cc9ed);if(_0x66aba6[_0x452667(0x18c)]!==0x1)throw CliErrors[_0x452667(0x1a0)](_0x452667(0x194));return _0x66aba6;}function withScene(_0xcc5bb4,_0x45cac6,_0x3fa7e6){const _0x28ee6e=a198_0x1ec9d9;return{..._0xcc5bb4,'scene':_0x45cac6,..._0x3fa7e6?{'sourceFile':{'fileName':_0x3fa7e6[_0x28ee6e(0x1a5)],'filePath':_0x3fa7e6[_0x28ee6e(0x18b)]}}:{}};}function a198_0x4480(_0x1884f3,_0x31eecc){_0x1884f3=_0x1884f3-0x18a;const _0x3be29b=a198_0x3be2();let _0x448031=_0x3be29b[_0x1884f3];return _0x448031;}const ocrRecognize={'service':'ocr','command':a198_0x1ec9d9(0x1b2),'description':a198_0x1ec9d9(0x1a9),'risk':a198_0x1ec9d9(0x1b5),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f9e64){const _0x2f520f=a198_0x1ec9d9,_0x4a9636=normalizeScene(_0x3f9e64[_0x2f520f(0x19a)]('scene')),_0xc61171=SCENE_TO_LEGACY_TYPE[_0x4a9636],_0x132922=validateInputSelection(_0x3f9e64);if(_0x132922['imageUrl']){const _0xd09fe2=new URLSearchParams({'url':_0x132922[_0x2f520f(0x1b4)],'type':_0xc61171,'appCode':_0x3f9e64['appCode']});return{'method':_0x2f520f(0x19c),'url':'/smartapi/ocr/recognize-text?'+_0xd09fe2[_0x2f520f(0x195)](),'description':_0x2f520f(0x1a7)+_0x4a9636+'\x20OCR\x20from\x20URL'};}const _0x15bfb7=requireDevelopmentUploadFile(_0x132922[_0x2f520f(0x1bc)],_0x2f520f(0x1a1));return{'method':'POST','url':_0x2f520f(0x1b9),'body':{'steps':[{'method':'POST','url':_0x2f520f(0x1b9),'body':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'multipart':{'file':_0x15bfb7}}},{'method':_0x2f520f(0x1b0),'url':_0x2f520f(0x1b6),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x2f520f(0x19c),'url':_0x2f520f(0x18e),'query':{'appCode':_0x3f9e64[_0x2f520f(0x1af)],'url':_0x2f520f(0x196),'type':_0xc61171}}]},'description':_0x2f520f(0x1aa)+_0x4a9636+'\x20OCR'};},async 'execute'(_0x5c11a7){const _0x35d8da=a198_0x1ec9d9,_0x485fa7=normalizeScene(_0x5c11a7[_0x35d8da(0x19a)](_0x35d8da(0x1b7))),_0x22ece3=SCENE_TO_LEGACY_TYPE[_0x485fa7],_0x57edb0=validateInputSelection(_0x5c11a7);if(_0x57edb0['imageUrl']){const _0x4c6989=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x57edb0[_0x35d8da(0x1b4)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x4c6989,_0x485fa7)};}const _0x357db9=requireDevelopmentUploadFile(_0x57edb0[_0x35d8da(0x1bc)],'image-file'),_0x5a536f=await uploadDevelopmentFile(_0x5c11a7[_0x35d8da(0x1af)],_0x357db9[_0x35d8da(0x193)]);if(!_0x5a536f[_0x35d8da(0x18b)])throw CliErrors['apiError'](_0x35d8da(0x1ad));const _0x257ece=await queryDevelopmentFileUrl(_0x5a536f[_0x35d8da(0x18b)],{'download':![]});if(!_0x257ece[_0x35d8da(0x1be)])throw CliErrors[_0x35d8da(0x1a3)](_0x35d8da(0x1b8));const _0x1b8fa1=await recognizeDevelopmentOcr(_0x5c11a7[_0x35d8da(0x1af)],{'url':_0x257ece[_0x35d8da(0x1be)],'type':_0x22ece3});return{'ok':!![],'data':withScene(_0x1b8fa1,_0x485fa7,_0x5a536f)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x502dee=a199_0x3004;(function(_0x139ab3,_0x25cfdb){const _0x5e5b65=a199_0x3004,_0x3b1966=_0x139ab3();while(!![]){try{const _0x53aba0=parseInt(_0x5e5b65(0x1f6))/0x1+-parseInt(_0x5e5b65(0x21f))/0x2+-parseInt(_0x5e5b65(0x1e5))/0x3+-parseInt(_0x5e5b65(0x1f2))/0x4+parseInt(_0x5e5b65(0x1ec))/0x5*(parseInt(_0x5e5b65(0x20b))/0x6)+-parseInt(_0x5e5b65(0x1e9))/0x7*(-parseInt(_0x5e5b65(0x1fe))/0x8)+-parseInt(_0x5e5b65(0x1eb))/0x9;if(_0x53aba0===_0x25cfdb)break;else _0x3b1966['push'](_0x3b1966['shift']());}catch(_0x3cb3ce){_0x3b1966['push'](_0x3b1966['shift']());}}}(a199_0x5311,0x651a9));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a199_0x5311(){const _0x9a183d=['str','28gilnaP','page-type','5283108cRiCqF','1212385SuyVVw','name','Invalid\x20Custom\x20Page\x20pattern:\x20','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','CUSTOM','1456612mvDyQz','page.create','pageName','page-dir','212455WEWAkV','files','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','string','now','length','isArray','menuId','1655560qfEQsw','stringify','POST','\x20and\x20its\x20menu\x20entry.','page','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','keys','Created\x20Custom\x20Page\x20','pageName\x20cannot\x20exceed\x20100\x20characters.','trim','validation','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','18meEIMM','page-pattern','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parent-menu-id','version','num','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','parse','appCode','../../../templates/custom-pages','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','includes','isInteger','ONEPAGE','pageId','menuPath','some','page\x20create\x20does\x20not\x20accept\x20--page-type.','object','parentMenuId','803110uHPteu','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','Custom_page_','utf8','.json','create','Custom\x20Page\x20pattern\x20not\x20found:\x20','page-content','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','2475OUXyrL','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','DASHBOARD'];a199_0x5311=function(){return _0x9a183d;};return a199_0x5311();}function a199_0x3004(_0x1db273,_0x1de00d){_0x1db273=_0x1db273-0x1dd;const _0x5311b1=a199_0x5311();let _0x300487=_0x5311b1[_0x1db273];return _0x300487;}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a199_0x502dee(0x218),a199_0x502dee(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x502dee(0x214));export const pageCreate={'service':a199_0x502dee(0x202),'command':a199_0x502dee(0x1e1),'description':a199_0x502dee(0x211),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a199_0x502dee(0x1ea),'message':a199_0x502dee(0x21c),'hint':a199_0x502dee(0x203)},{'name':a199_0x502dee(0x1e3),'message':a199_0x502dee(0x209),'hint':a199_0x502dee(0x1e4)}],'flags':[{'name':a199_0x502dee(0x1ed),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x20d)},{'name':a199_0x502dee(0x20e),'type':'number','description':a199_0x502dee(0x1dd)},{'name':a199_0x502dee(0x20c),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x1f8),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x502dee(0x1f5),'type':a199_0x502dee(0x1f9),'description':a199_0x502dee(0x20a)},APPCODE_FLAG],async 'validate'(_0x341637){await readValidatedPageSource(_0x341637);},async 'dryRun'(_0x47dfbe){const _0x45b393=a199_0x502dee,_0x5409ef=readInput(_0x47dfbe,await readValidatedPageSource(_0x47dfbe));return{'method':_0x45b393(0x200),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x5409ef['appCode'],'pageName':_0x5409ef[_0x45b393(0x1f4)],..._0x5409ef[_0x45b393(0x21e)]!=null?{'parentMenuId':_0x5409ef[_0x45b393(0x21e)]}:{},'createMenu':_0x5409ef['createMenu'],'codeContent':_0x5409ef[_0x45b393(0x1f7)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x45b393(0x1ff)](_0x5409ef['pageName'])+_0x45b393(0x201)};},async 'execute'(_0x2c5f0e){const _0x5a89d9=a199_0x502dee,_0x4d5aba=readInput(_0x2c5f0e,await readValidatedPageSource(_0x2c5f0e)),_0x118bf0=await createCustomPage(_0x4d5aba);if(!Number[_0x5a89d9(0x217)](_0x118bf0[_0x5a89d9(0x219)])||_0x118bf0[_0x5a89d9(0x219)]<=0x0)throw CliErrors['apiError'](_0x5a89d9(0x1ef));const _0x4effba=buildCustomPageDevelopmentUrl(_0x4d5aba['appCode'],_0x118bf0[_0x5a89d9(0x21a)]),_0x157999=buildCustomPageEditUrl(_0x4d5aba[_0x5a89d9(0x213)],_0x118bf0[_0x5a89d9(0x219)]);return{'ok':!![],'data':{'operation':_0x5a89d9(0x1f3),'pageType':_0x5a89d9(0x1f1),'pagePattern':readPagePattern(_0x2c5f0e),'selector':{'appCode':_0x4d5aba['appCode'],'pageName':_0x4d5aba[_0x5a89d9(0x1f4)]},'before':null,'after':{'pageId':_0x118bf0[_0x5a89d9(0x219)],'pageName':_0x118bf0['pageName'],'appCode':_0x118bf0[_0x5a89d9(0x213)],'version':_0x118bf0[_0x5a89d9(0x20f)],'menuId':_0x118bf0[_0x5a89d9(0x1fd)],'menuPath':_0x118bf0['menuPath'],'files':_0x118bf0[_0x5a89d9(0x1f7)]??Object[_0x5a89d9(0x204)](_0x4d5aba[_0x5a89d9(0x1f7)])},'dryRun':![],'request':_0x4d5aba,..._0x4effba?{'pageUrl':_0x4effba}:{},..._0x157999?{'editPageUrl':_0x157999}:{},'warnings':_0x4effba?[]:[_0x5a89d9(0x215)]},'message':_0x5a89d9(0x205)+_0x118bf0[_0x5a89d9(0x219)]+'.'};}};function readPagePattern(_0x208b83){const _0x4f3934=a199_0x502dee,_0x34348c=_0x208b83['str'](_0x4f3934(0x20c))['trim'](),_0x65e982=_0x208b83['str'](_0x4f3934(0x1f5))[_0x4f3934(0x207)]();if(_0x34348c&&_0x65e982)throw CliErrors[_0x4f3934(0x208)](_0x4f3934(0x1e6));if(_0x65e982)return null;if(!_0x34348c)throw CliErrors[_0x4f3934(0x208)](_0x4f3934(0x1f0));if(!CUSTOM_PAGE_PATTERNS[_0x4f3934(0x216)](_0x34348c))throw CliErrors[_0x4f3934(0x208)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x34348c;}async function readPageSource(_0x26b147){const _0x55004e=a199_0x502dee,_0x1b402f=_0x26b147[_0x55004e(0x1e8)](_0x55004e(0x1f5))[_0x55004e(0x207)](),_0x5a486c=readPagePattern(_0x26b147);if(_0x5a486c===null){const _0x3b9c28=await readCustomPageDirectory(_0x1b402f);if(Object[_0x55004e(0x204)](_0x3b9c28)[_0x55004e(0x1fb)]===0x0)throw CliErrors[_0x55004e(0x208)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x3b9c28;}let _0x4af731;try{_0x4af731=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x5a486c['toLowerCase']()+_0x55004e(0x1e0)),_0x55004e(0x1df));}catch{throw CliErrors[_0x55004e(0x208)](_0x55004e(0x1e2)+_0x5a486c+'.');}let _0x4b4837;try{_0x4b4837=JSON[_0x55004e(0x212)](_0x4af731);}catch{throw CliErrors[_0x55004e(0x208)](_0x55004e(0x1ee)+_0x5a486c+'.');}if(!_0x4b4837||typeof _0x4b4837!==_0x55004e(0x21d)||Array[_0x55004e(0x1fc)](_0x4b4837)||Object['values'](_0x4b4837)[_0x55004e(0x21b)](_0x26f1a6=>typeof _0x26f1a6!=='string'))throw CliErrors[_0x55004e(0x208)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x5a486c+'.');return _0x4b4837;}async function readValidatedPageSource(_0x4d3746){const _0x3e2fca=await readPageSource(_0x4d3746);return await validateCustomPageContent(_0x3e2fca),_0x3e2fca;}function readInput(_0xa85f67,_0x259865){const _0x4edff8=a199_0x502dee,_0x229cfa=_0xa85f67[_0x4edff8(0x1e8)]('name')['trim']()||_0x4edff8(0x1de)+Date[_0x4edff8(0x1fa)]();if(_0x229cfa[_0x4edff8(0x1fb)]>0x64)throw CliErrors[_0x4edff8(0x208)](_0x4edff8(0x206));const _0x2d3a40=_0xa85f67[_0x4edff8(0x210)]('parent-menu-id',NaN),_0xc8b259=!Number['isNaN'](_0x2d3a40);if(_0xc8b259&&(!Number[_0x4edff8(0x217)](_0x2d3a40)||_0x2d3a40<=0x0))throw CliErrors[_0x4edff8(0x208)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0xa85f67[_0x4edff8(0x213)],'pageName':_0x229cfa,..._0xc8b259?{'parentMenuId':_0x2d3a40}:{},'createMenu':!![],'files':_0x259865};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0xc60ee6=a200_0x408f;function a200_0x287c(){const _0x23bf8a=['getHours','9044VWNPdv','getSeconds','page','appCode','join','pageCode','36ieAkoF','str','getMinutes','getMonth','trim','getDate','Custom\x20Page\x20ID','12392655ULuCFP','getFullYear','getTime','36rRBzwc','read','4747260lAiVpB','number','compress','222236dNUbkT','154408vYGhqw','10399250eOXhSE','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','padStart','isNaN','112wRAZuU','84etHbjB','1776616aSUNSA'];a200_0x287c=function(){return _0x23bf8a;};return a200_0x287c();}function a200_0x408f(_0x27ec92,_0x5b11b2){_0x27ec92=_0x27ec92-0x168;const _0x287cff=a200_0x287c();let _0x408f10=_0x287cff[_0x27ec92];return _0x408f10;}(function(_0x3c6de1,_0x387afa){const _0x5bd502=a200_0x408f,_0x23b617=_0x3c6de1();while(!![]){try{const _0x47c2=-parseInt(_0x5bd502(0x175))/0x1*(-parseInt(_0x5bd502(0x171))/0x2)+parseInt(_0x5bd502(0x185))/0x3*(parseInt(_0x5bd502(0x16c))/0x4)+-parseInt(_0x5bd502(0x168))/0x5+-parseInt(_0x5bd502(0x172))/0x6*(parseInt(_0x5bd502(0x16b))/0x7)+-parseInt(_0x5bd502(0x173))/0x8*(-parseInt(_0x5bd502(0x17b))/0x9)+-parseInt(_0x5bd502(0x16d))/0xa+parseInt(_0x5bd502(0x182))/0xb;if(_0x47c2===_0x387afa)break;else _0x23b617['push'](_0x23b617['shift']());}catch(_0x4146fd){_0x23b617['push'](_0x23b617['shift']());}}}(a200_0x287c,0x86760));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a200_0xc60ee6(0x177),'command':'custom-detail','description':a200_0xc60ee6(0x16e),'risk':a200_0xc60ee6(0x186),'defaultOutputFormat':a200_0xc60ee6(0x16a),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0xc60ee6(0x169),'required':!![],'description':a200_0xc60ee6(0x181)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c6693){readCustomPageId(_0x4c6693);},async 'execute'(_0x483814){const _0x1d736a=a200_0xc60ee6,_0x1188c7=readCustomPageId(_0x483814),_0x2b7150=await getCustomPageSource(_0x1188c7),{bundle:_0x1482cb,createTime:_0x7ca2d,updateTime:_0x9e3969,..._0xed6dbf}=_0x2b7150,_0x8a8233=_0x2b7150['id']??_0x1188c7,_0x43c5b7=_0x2b7150[_0x1d736a(0x178)]?.[_0x1d736a(0x17f)]()||_0x483814[_0x1d736a(0x17c)]('appcode')[_0x1d736a(0x17f)](),_0x2cc567=buildCustomPageRuntimeUrl(_0x43c5b7,_0x2b7150[_0x1d736a(0x17a)]),_0xa9912c=buildCustomPageEditUrl(_0x43c5b7,_0x8a8233),_0x17432e=await resolveCustomPageDevelopmentUrl(_0x43c5b7,_0x8a8233,_0x483814['cookie']);return{'ok':!![],'data':{..._0xed6dbf,..._0x2cc567?{'runtimePageUrl':_0x2cc567}:{},..._0x17432e?{'pageUrl':_0x17432e}:{},..._0xa9912c?{'editPageUrl':_0xa9912c}:{},..._0x7ca2d==null?{}:{'createTime':formatTime(_0x7ca2d)},..._0x9e3969==null?{}:{'updateTime':formatTime(_0x9e3969)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x1188c7+'.'};}};function formatTime(_0x4d3eb8){const _0x4d0263=a200_0xc60ee6,_0x3341de=new Date(_0x4d3eb8);if(Number[_0x4d0263(0x170)](_0x3341de[_0x4d0263(0x184)]()))return String(_0x4d3eb8);const _0x3d4cbf=[_0x3341de[_0x4d0263(0x183)](),String(_0x3341de[_0x4d0263(0x17e)]()+0x1)[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x180)]())[_0x4d0263(0x16f)](0x2,'0')]['join']('-'),_0x53fdbb=[String(_0x3341de[_0x4d0263(0x174)]())[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x17d)]())[_0x4d0263(0x16f)](0x2,'0'),String(_0x3341de[_0x4d0263(0x176)]())[_0x4d0263(0x16f)](0x2,'0')][_0x4d0263(0x179)](':');return _0x3d4cbf+'\x20'+_0x53fdbb;}
|