@lovrabet/rabetbase-cli 2.5.6 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +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.d.ts +6 -2
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +26 -6
- 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.d.ts +12 -0
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +8 -4
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.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 +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a190_0x4bca3d=a190_0x564b;(function(_0x304ac1,_0x1cb23b){const _0x5e54c9=a190_0x564b,_0x3cc19e=_0x304ac1();while(!![]){try{const _0x27326c=-parseInt(_0x5e54c9(0x17b))/0x1*(-parseInt(_0x5e54c9(0x132))/0x2)+parseInt(_0x5e54c9(0x18f))/0x3*(parseInt(_0x5e54c9(0x126))/0x4)+parseInt(_0x5e54c9(0x121))/0x5*(parseInt(_0x5e54c9(0x135))/0x6)+-parseInt(_0x5e54c9(0x158))/0x7+parseInt(_0x5e54c9(0x167))/0x8+parseInt(_0x5e54c9(0x189))/0x9*(parseInt(_0x5e54c9(0x117))/0xa)+-parseInt(_0x5e54c9(0x13d))/0xb;if(_0x27326c===_0x1cb23b)break;else _0x3cc19e['push'](_0x3cc19e['shift']());}catch(_0x5f372e){_0x3cc19e['push'](_0x3cc19e['shift']());}}}(a190_0x1f81,0x30a7f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a190_0x1f81(){const _0x117268=['Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','2332880UsVJys','trim','Selected\x20','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','depth','flagMissing','Menu\x20path\x20selector\x20not\x20found:\x20','childrenCount','menu-ids','str','sort','length','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','resourcesValid','\x20visibility\x20update\x20could\x20not\x20be\x20verified','visibility-update','menu_verification_failed','string','\x20menu(s);\x20skip\x20','843gKKztn','number','expectedCount','before','byId','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','join','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','get','\x20updated,\x20','validation','expect-visible','body','9lsbBzd','targets','resources','menus','menu_selector_not_found','Updated\x20visibility\x20for\x20','417YnVvcl','menu_selector_ambiguous','menu\x20list','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','label','2014130FjkKLJ','update-menu-visibility','childrenIds','hash','push','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','\x20changed\x20unexpectedly.','\x20failed.','appCode','Menu\x20','5kTTVGp','boolean','verify\x20menu\x20visibility\x20update','message','visible','2788DmesUe','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu','set','\x20skipped,\x20','pageId','url','Response\x20was\x20lost\x20for\x20menu\x20','/smartapi/menu/update','beforeById','62GUtOmw','menu_expected_count_mismatch','update','360978rRVehS','cookie','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','isArray','false','plan','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','POST','4123383TqnOkp','filter','rabetbase\x20menu\x20list\x20--format\x20compress','update\x20visibility\x20for','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','path','expected-count','split','menuIds','menu_permission_denied','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetId','pageType','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update\x20menu\x20visibility','plannedActions','parentId','\x20menu(s);\x20skipped\x20','modelType','Requested\x20menu\x20visibility','\x20unchanged\x20menu(s).','write','expectVisible','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','rawFlags','type','map','714378OPwQcO','Response\x20was\x20lost\x20and\x20menu\x20','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','verification','failed','Final\x20menu\x20visibility\x20readback\x20failed.','paths','stringify','isSafeInteger','datasetCode','recovered','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','code'];a190_0x1f81=function(){return _0x117268;};return a190_0x1f81();}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':a190_0x4bca3d(0x13c),'path':a190_0x4bca3d(0x130)}];export const menuVisibilityUpdate={'service':a190_0x4bca3d(0x12a),'command':a190_0x4bca3d(0x177),'description':a190_0x4bca3d(0x166),'risk':a190_0x4bca3d(0x152),'structuredErrors':!![],'flags':[{'name':a190_0x4bca3d(0x170),'type':a190_0x4bca3d(0x179),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a190_0x4bca3d(0x15e),'type':'string','description':a190_0x4bca3d(0x164)},{'name':a190_0x4bca3d(0x125),'type':a190_0x4bca3d(0x122),'required':!![],'description':a190_0x4bca3d(0x150)},{'name':a190_0x4bca3d(0x187),'type':a190_0x4bca3d(0x122),'description':a190_0x4bca3d(0x180)},{'name':a190_0x4bca3d(0x143),'type':a190_0x4bca3d(0x17c),'description':a190_0x4bca3d(0x183)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a22aa){parseInput(_0x3a22aa);},async 'dryRun'(_0x55213d){const _0x299631=a190_0x4bca3d,_0x20bf28=await buildPlan(_0x55213d,!![]),_0x464a4f=_0x20bf28['plan']['plannedActions']?.[_0x299631(0x173)]??0x0,_0x785365=_0x20bf28[_0x299631(0x13a)][_0x299631(0x18a)][_0x299631(0x173)]-_0x464a4f;return menuDryRunResult(_0x20bf28[_0x299631(0x13a)],{'method':_0x299631(0x13c),'url':_0x299631(0x130),'body':{'updates':_0x20bf28[_0x299631(0x13a)][_0x299631(0x14c)]?.[_0x299631(0x157)](_0xdb5c1b=>_0xdb5c1b[_0x299631(0x188)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x464a4f+_0x299631(0x17a)+_0x785365+_0x299631(0x151)});},async 'execute'(_0xce423e){const _0x511e18=a190_0x4bca3d,_0x419e00=await buildPlan(_0xce423e,![]);await recheckMutationSnapshot(_0xce423e,_0x419e00['plan'],_0x511e18(0x14b));const _0x2d3b20=[],_0x598a2f=[],_0x31bc39=[];for(const _0xa0346f of _0x419e00['plan']['targets']){if(_0xa0346f['before'][_0x511e18(0x125)]===_0x419e00['plan'][_0x511e18(0x115)]){_0x2d3b20[_0x511e18(0x11b)]({'id':_0xa0346f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xce423e['appCode'],_0xce423e['cookie'],{'id':_0xa0346f['id'],'visible':_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]}),_0x2d3b20['push']({'id':_0xa0346f['id'],'updated':!![],'skipped':![]});}catch(_0x5c81c9){const _0x475a79=mapMenuApiError(_0x5c81c9,_0x511e18(0x140),_0xa0346f['id']);if(isMenuResponseLoss(_0x5c81c9)&&_0x475a79[_0x511e18(0x165)]!==_0x511e18(0x146)){_0x31bc39[_0x511e18(0x11b)](_0xa0346f['id']);continue;}_0x598a2f['push']({'id':_0xa0346f['id'],'stage':_0x511e18(0x134),'code':_0x475a79[_0x511e18(0x165)],'message':_0x475a79[_0x511e18(0x124)]});}}let _0x526763;try{_0x526763=await fetchMenuSnapshot(_0xce423e[_0x511e18(0x11f)],_0xce423e[_0x511e18(0x136)]);}catch(_0x1aa550){const _0x29304e=describeMenuErrorCause(_0x1aa550,_0x511e18(0x123)),_0x22d254=_0x31bc39['map'](_0x1ab88a=>({'id':_0x1ab88a,'stage':'update-recovery','code':_0x511e18(0x178),'message':_0x511e18(0x12f)+_0x1ab88a+_0x511e18(0x15a),'requestedStateConfirmed':![],'recovered':![]})),_0x561538={'stage':_0x511e18(0x15b),'code':_0x511e18(0x178),'message':_0x511e18(0x15d),'targetIds':_0x419e00['plan']['targets'][_0x511e18(0x157)](_0x1bd6f1=>_0x1bd6f1['id']),'requestedStateConfirmed':![],..._0x29304e};throw menuFailure(asVerificationError(_0x1aa550,_0x511e18(0x141)),_0x419e00['plan'],{'stage':_0x511e18(0x15b),'succeeded':_0x2d3b20,'failedRecords':[..._0x598a2f,..._0x22d254,_0x561538],'warnings':[_0x511e18(0x174)],'verification':{'status':_0x511e18(0x15c),'recoveredCount':0x0,'lookupCommand':_0x511e18(0x13f)}});}const _0x58a11d=[];for(const _0x4bf6f4 of _0x2d3b20){const _0x38c398=Number(_0x4bf6f4['id']),_0x54214a=_0x419e00['beforeById'][_0x511e18(0x184)](_0x38c398),_0xb5cefe=_0x526763[_0x511e18(0x17f)]['get'](_0x38c398);try{verifyVisibilityUpdate(_0x54214a,_0xb5cefe,_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]);}catch(_0x3f1aac){const _0x1cba37=asVerificationError(_0x3f1aac,_0x511e18(0x120)+_0x38c398+_0x511e18(0x176));_0x58a11d['push']({'id':_0x38c398,'stage':_0x511e18(0x15b),'code':_0x1cba37['code'],'message':_0x1cba37[_0x511e18(0x124)],'requestedStateConfirmed':![]});}}for(const _0x1b49dc of _0x31bc39){const _0x1fd787=_0x419e00[_0x511e18(0x131)][_0x511e18(0x184)](_0x1b49dc),_0x2dd5f2=_0x526763['byId'][_0x511e18(0x184)](_0x1b49dc);try{verifyVisibilityUpdate(_0x1fd787,_0x2dd5f2,_0x419e00[_0x511e18(0x13a)][_0x511e18(0x115)]),_0x2d3b20[_0x511e18(0x11b)]({'id':_0x1b49dc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x8de821){const _0x365520=asVerificationError(_0x8de821,_0x511e18(0x159)+_0x1b49dc+_0x511e18(0x114));_0x58a11d['push']({'id':_0x1b49dc,'stage':'update-recovery','code':_0x365520['code'],'message':_0x365520[_0x511e18(0x124)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x58a11d[_0x511e18(0x173)]>0x0){const _0x2bb592=_0x58a11d[_0x511e18(0x157)](_0x3d7802=>Number(_0x3d7802['id'])),_0x217d36=_0x2d3b20['filter'](_0x1c1725=>_0x1c1725[_0x511e18(0x162)]===!![])[_0x511e18(0x173)],_0x18079e=menuError(_0x511e18(0x178),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2bb592[_0x511e18(0x181)](',\x20')+'.',_0x511e18(0x11c));throw menuFailure(_0x18079e,_0x419e00[_0x511e18(0x13a)],{'stage':_0x511e18(0x15b),'succeeded':_0x2d3b20,'failedRecords':[..._0x598a2f,..._0x58a11d],'warnings':[_0x511e18(0x147)],'verification':{'status':_0x511e18(0x15c),..._0x2bb592['length']===0x1?{'targetId':_0x2bb592[0x0]}:{'targetIds':_0x2bb592},'recoveredCount':_0x217d36,'lookupCommand':_0x511e18(0x13f)}});}const _0x3893ed=_0x2d3b20['filter'](_0x13ec77=>_0x13ec77['updated']===!![])[_0x511e18(0x173)],_0x102f2e=_0x2d3b20[_0x511e18(0x173)]-_0x3893ed,_0x1e0beb={..._0x419e00[_0x511e18(0x13a)],'succeeded':_0x2d3b20,'failed':_0x598a2f,'warnings':_0x598a2f[_0x511e18(0x173)]>0x0?[..._0x419e00[_0x511e18(0x13a)]['warnings'],_0x511e18(0x13b)]:_0x419e00['plan']['warnings'],'verification':{'checkedBy':_0x511e18(0x191),'snapshotHash':_0x526763[_0x511e18(0x11a)],'matchesRequestedState':_0x598a2f[_0x511e18(0x173)]===0x0,'recoveredCount':_0x31bc39[_0x511e18(0x173)]}};return{'ok':_0x598a2f['length']===0x0,'data':_0x1e0beb,'message':_0x598a2f['length']===0x0?_0x511e18(0x18e)+_0x3893ed+_0x511e18(0x14e)+_0x102f2e+_0x511e18(0x151):'Menu\x20visibility\x20update\x20completed:\x20'+_0x3893ed+_0x511e18(0x185)+_0x102f2e+_0x511e18(0x12c)+_0x598a2f[_0x511e18(0x173)]+_0x511e18(0x11e)};}};function parseInput(_0x2e917d){const _0x6fa657=a190_0x4bca3d,_0x541f70=parseMenuIds(_0x2e917d[_0x6fa657(0x171)](_0x6fa657(0x170))),_0x1ac05d=parseCsv(_0x2e917d[_0x6fa657(0x171)]('paths'));if(_0x541f70['length']===0x0&&_0x1ac05d['length']===0x0)throw CliErrors[_0x6fa657(0x186)](_0x6fa657(0x16b));const _0x1fea37=parseBooleanFlag(_0x2e917d,_0x6fa657(0x125),!![]),_0x3f0ba9=parseBooleanFlag(_0x2e917d,_0x6fa657(0x187),![]);let _0x3a1a92;if(hasFlag(_0x2e917d,'expected-count')){_0x3a1a92=_0x2e917d['num'](_0x6fa657(0x143));if(!Number[_0x6fa657(0x160)](_0x3a1a92)||_0x3a1a92<0x0)throw CliErrors[_0x6fa657(0x186)](_0x6fa657(0x14a));}return{'menuIds':_0x541f70,'paths':_0x1ac05d,'visible':_0x1fea37,'expectVisible':_0x3f0ba9,'expectedCount':_0x3a1a92};}async function buildPlan(_0x1b0ab1,_0x24b7a5){const _0x5bc3f6=a190_0x4bca3d,_0x5d324a=parseInput(_0x1b0ab1),_0x49cb53=await fetchMutationSnapshot(_0x1b0ab1,_0x5bc3f6(0x14b)),_0x2a46db=selectTargets(_0x49cb53[_0x5bc3f6(0x18c)],_0x5d324a['menuIds'],_0x5d324a[_0x5bc3f6(0x15e)]);if(_0x5d324a[_0x5bc3f6(0x17d)]!==undefined&&_0x2a46db[_0x5bc3f6(0x173)]!==_0x5d324a[_0x5bc3f6(0x17d)])throw menuError(_0x5bc3f6(0x133),_0x5bc3f6(0x169)+_0x2a46db[_0x5bc3f6(0x173)]+'\x20menu(s),\x20expected\x20'+_0x5d324a[_0x5bc3f6(0x17d)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x5d324a[_0x5bc3f6(0x153)]!==undefined){const _0x2021a8=_0x2a46db[_0x5bc3f6(0x13e)](_0x5a0aac=>_0x5a0aac[_0x5bc3f6(0x125)]!==_0x5d324a[_0x5bc3f6(0x153)]);if(_0x2021a8[_0x5bc3f6(0x173)]>0x0)throw menuError('menu_state_drift',_0x5bc3f6(0x182)+_0x2021a8['map'](_0xbe439=>_0xbe439['id'])[_0x5bc3f6(0x181)](',\x20')+'.',_0x5bc3f6(0x129));}const _0x34527f=_0x2a46db[_0x5bc3f6(0x157)](_0xca9e2=>({'id':_0xca9e2['id'],'label':_0xca9e2[_0x5bc3f6(0x116)],'path':_0xca9e2[_0x5bc3f6(0x142)],'before':{'visible':_0xca9e2[_0x5bc3f6(0x125)]},'after':{'visible':_0x5d324a[_0x5bc3f6(0x125)]}})),_0x47501d=_0x34527f[_0x5bc3f6(0x13e)](_0x2246cd=>_0x2246cd[_0x5bc3f6(0x17e)][_0x5bc3f6(0x125)]!==_0x5d324a[_0x5bc3f6(0x125)])[_0x5bc3f6(0x157)](_0x1bec0b=>({'stage':_0x5bc3f6(0x118),'method':_0x5bc3f6(0x13c),'path':_0x5bc3f6(0x130),'body':{'appCode':_0x1b0ab1['appCode'],'id':_0x1bec0b['id'],'visible':_0x5d324a[_0x5bc3f6(0x125)]}})),_0x4e4a2e=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x5d324a[_0x5bc3f6(0x145)],'paths':_0x5d324a[_0x5bc3f6(0x15e)]},'before':{'menus':_0x2a46db[_0x5bc3f6(0x157)](_0x36028c=>({'id':_0x36028c['id'],'path':_0x36028c[_0x5bc3f6(0x142)],'visible':_0x36028c['visible']}))},'after':{'menus':_0x2a46db[_0x5bc3f6(0x157)](_0x522d02=>({'id':_0x522d02['id'],'path':_0x522d02[_0x5bc3f6(0x142)],'visible':_0x5d324a[_0x5bc3f6(0x125)]}))},'dryRun':_0x24b7a5,'backend':[...BACKEND],'plannedActions':_0x47501d,'snapshotHash':_0x49cb53[_0x5bc3f6(0x11a)],'warnings':_0x47501d['length']===0x0?[_0x5bc3f6(0x127)]:[]});return{'plan':{..._0x4e4a2e,'requestedVisible':_0x5d324a[_0x5bc3f6(0x125)],'targets':_0x34527f},'beforeById':new Map(_0x2a46db['map'](_0x123768=>[_0x123768['id'],_0x123768]))};}function a190_0x564b(_0x1276f5,_0x5eb0bb){_0x1276f5=_0x1276f5-0x114;const _0x1f81f6=a190_0x1f81();let _0x564bdc=_0x1f81f6[_0x1276f5];return _0x564bdc;}function selectTargets(_0x516b33,_0x5da022,_0x47dca4){const _0x48f05c=a190_0x4bca3d,_0xfeba1e=new Map(_0x516b33[_0x48f05c(0x157)](_0x2e37ff=>[_0x2e37ff['id'],_0x2e37ff])),_0x2a3d63=new Map(),_0x2293c9=_0x5da022[_0x48f05c(0x13e)](_0x182061=>!_0xfeba1e['has'](_0x182061));if(_0x2293c9[_0x48f05c(0x173)]>0x0)throw menuError(_0x48f05c(0x18d),_0x48f05c(0x16a)+_0x2293c9[_0x48f05c(0x181)](',\x20')+'.',_0x48f05c(0x163));for(const _0x4582ee of _0x5da022){_0x2a3d63[_0x48f05c(0x12b)](_0x4582ee,_0xfeba1e[_0x48f05c(0x184)](_0x4582ee));}for(const _0x134828 of _0x47dca4){const _0xc06eb9=_0x516b33[_0x48f05c(0x13e)](_0xd20697=>_0xd20697['path']===_0x134828);if(_0xc06eb9[_0x48f05c(0x173)]===0x0)throw menuError(_0x48f05c(0x18d),_0x48f05c(0x16e)+JSON[_0x48f05c(0x15f)](_0x134828)+'.',_0x48f05c(0x137));if(_0xc06eb9[_0x48f05c(0x173)]>0x1)throw menuError(_0x48f05c(0x190),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x48f05c(0x15f)](_0x134828)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0xc06eb9[_0x48f05c(0x157)](_0x59c6fe=>_0x59c6fe['id'])[_0x48f05c(0x181)](',\x20')+'.');const _0x10fa8f=_0xc06eb9[0x0];_0x2a3d63[_0x48f05c(0x12b)](_0x10fa8f['id'],_0x10fa8f);}return[..._0x2a3d63['values']()];}function parseMenuIds(_0x3094ab){const _0x9d3a8b=a190_0x4bca3d,_0x1bfdc8=parseCsv(_0x3094ab),_0x30f9bf=_0x1bfdc8[_0x9d3a8b(0x157)](Number);if(_0x30f9bf['some'](_0x49a52b=>!Number[_0x9d3a8b(0x160)](_0x49a52b)||_0x49a52b<=0x0))throw CliErrors[_0x9d3a8b(0x186)](_0x9d3a8b(0x128));return[...new Set(_0x30f9bf)];}function parseCsv(_0x5e2b37){const _0x552183=a190_0x4bca3d;return[...new Set(_0x5e2b37[_0x552183(0x144)](',')[_0x552183(0x157)](_0x15918e=>_0x15918e[_0x552183(0x168)]())['filter'](Boolean))];}function parseBooleanFlag(_0x381d89,_0x2d4cd5,_0x4942b2){const _0x188364=a190_0x4bca3d;if(!hasFlag(_0x381d89,_0x2d4cd5)){if(_0x4942b2)throw CliErrors[_0x188364(0x16d)](_0x2d4cd5);return undefined;}const _0x3aa8c9=_0x381d89[_0x188364(0x155)][_0x2d4cd5];if(_0x3aa8c9===!![]||_0x3aa8c9===![])return _0x3aa8c9;if(_0x3aa8c9==='true')return!![];if(_0x3aa8c9===_0x188364(0x139))return![];throw CliErrors[_0x188364(0x186)]('--'+_0x2d4cd5+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x235cf9,_0x257050,_0x3eaf94){const _0x1eeefb=a190_0x4bca3d;assertVerified(!!_0x257050,_0x1eeefb(0x120)+_0x235cf9['id']+_0x1eeefb(0x154)),assertVerified(_0x257050[_0x1eeefb(0x125)]===_0x3eaf94,_0x1eeefb(0x120)+_0x235cf9['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x54314a=[['id',_0x257050['id'],_0x235cf9['id']],[_0x1eeefb(0x14d),_0x257050[_0x1eeefb(0x14d)],_0x235cf9[_0x1eeefb(0x14d)]],[_0x1eeefb(0x16c),_0x257050[_0x1eeefb(0x16c)],_0x235cf9[_0x1eeefb(0x16c)]],[_0x1eeefb(0x116),_0x257050[_0x1eeefb(0x116)],_0x235cf9[_0x1eeefb(0x116)]],[_0x1eeefb(0x142),_0x257050[_0x1eeefb(0x142)],_0x235cf9[_0x1eeefb(0x142)]],['url',_0x257050[_0x1eeefb(0x12e)],_0x235cf9[_0x1eeefb(0x12e)]],[_0x1eeefb(0x156),_0x257050[_0x1eeefb(0x156)],_0x235cf9[_0x1eeefb(0x156)]],[_0x1eeefb(0x172),_0x257050[_0x1eeefb(0x172)],_0x235cf9[_0x1eeefb(0x172)]],[_0x1eeefb(0x18b),_0x257050[_0x1eeefb(0x18b)],_0x235cf9[_0x1eeefb(0x18b)]],[_0x1eeefb(0x175),_0x257050[_0x1eeefb(0x175)],_0x235cf9[_0x1eeefb(0x175)]],[_0x1eeefb(0x119),_0x257050['childrenIds'],_0x235cf9['childrenIds']],[_0x1eeefb(0x16f),_0x257050[_0x1eeefb(0x16f)],_0x235cf9[_0x1eeefb(0x16f)]],[_0x1eeefb(0x12d),_0x257050[_0x1eeefb(0x12d)],_0x235cf9['pageId']],[_0x1eeefb(0x149),_0x257050[_0x1eeefb(0x149)],_0x235cf9[_0x1eeefb(0x149)]],[_0x1eeefb(0x14f),_0x257050[_0x1eeefb(0x14f)],_0x235cf9[_0x1eeefb(0x14f)]],[_0x1eeefb(0x148),_0x257050[_0x1eeefb(0x148)],_0x235cf9[_0x1eeefb(0x148)]],[_0x1eeefb(0x161),_0x257050[_0x1eeefb(0x161)],_0x235cf9[_0x1eeefb(0x161)]]];for(const [_0x3d21b6,_0x5aa4d3,_0x1132f7]of _0x54314a){assertVerified(sameValue(_0x5aa4d3,_0x1132f7),_0x1eeefb(0x120)+_0x235cf9['id']+'\x20'+_0x3d21b6+_0x1eeefb(0x11d));}}function sameValue(_0x329518,_0x1db97){const _0x476799=a190_0x4bca3d;if(Array['isArray'](_0x329518)||Array[_0x476799(0x138)](_0x1db97))return JSON[_0x476799(0x15f)](_0x329518)===JSON[_0x476799(0x15f)](_0x1db97);return _0x329518===_0x1db97;}
|
|
1
|
+
const a191_0x13cfa8=a191_0x44a5;(function(_0x48a82b,_0x4b6dbc){const _0xb8a722=a191_0x44a5,_0x47eb3b=_0x48a82b();while(!![]){try{const _0x1cb526=parseInt(_0xb8a722(0x23d))/0x1*(parseInt(_0xb8a722(0x221))/0x2)+-parseInt(_0xb8a722(0x247))/0x3*(-parseInt(_0xb8a722(0x23e))/0x4)+parseInt(_0xb8a722(0x245))/0x5*(parseInt(_0xb8a722(0x20c))/0x6)+parseInt(_0xb8a722(0x24d))/0x7+-parseInt(_0xb8a722(0x1fd))/0x8+parseInt(_0xb8a722(0x235))/0x9+-parseInt(_0xb8a722(0x1f6))/0xa*(parseInt(_0xb8a722(0x208))/0xb);if(_0x1cb526===_0x4b6dbc)break;else _0x47eb3b['push'](_0x47eb3b['shift']());}catch(_0x415a02){_0x47eb3b['push'](_0x47eb3b['shift']());}}}(a191_0x4433,0x2b5cc));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x13cfa8(0x217),'path':a191_0x13cfa8(0x210)}];export const menuVisibilityUpdate={'service':a191_0x13cfa8(0x252),'command':a191_0x13cfa8(0x26d),'description':a191_0x13cfa8(0x263),'risk':a191_0x13cfa8(0x232),'structuredErrors':!![],'flags':[{'name':a191_0x13cfa8(0x21d),'type':a191_0x13cfa8(0x265),'description':a191_0x13cfa8(0x20f)},{'name':a191_0x13cfa8(0x1f5),'type':'string','description':a191_0x13cfa8(0x22e)},{'name':a191_0x13cfa8(0x25e),'type':a191_0x13cfa8(0x267),'required':!![],'description':a191_0x13cfa8(0x224)},{'name':a191_0x13cfa8(0x231),'type':'boolean','description':a191_0x13cfa8(0x22f)},{'name':a191_0x13cfa8(0x253),'type':a191_0x13cfa8(0x259),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x37bcb4){parseInput(_0x37bcb4);},async 'dryRun'(_0x2ae65d){const _0x3a90fa=a191_0x13cfa8,_0x51b4e1=await buildPlan(_0x2ae65d,!![]),_0x3b746d=_0x51b4e1[_0x3a90fa(0x226)][_0x3a90fa(0x262)]?.['length']??0x0,_0x412217=_0x51b4e1['plan'][_0x3a90fa(0x220)][_0x3a90fa(0x22d)]-_0x3b746d;return menuDryRunResult(_0x51b4e1['plan'],{'method':'POST','url':_0x3a90fa(0x210),'body':{'updates':_0x51b4e1[_0x3a90fa(0x226)][_0x3a90fa(0x262)]?.[_0x3a90fa(0x238)](_0x198ee7=>_0x198ee7['body'])??[]},'description':_0x3a90fa(0x260)+_0x3b746d+_0x3a90fa(0x1f7)+_0x412217+_0x3a90fa(0x26f)});},async 'execute'(_0xb79562){const _0x124176=a191_0x13cfa8,_0x1db06f=await buildPlan(_0xb79562,![]);await recheckMutationSnapshot(_0xb79562,_0x1db06f[_0x124176(0x226)],_0x124176(0x254));const _0x3312f5=[],_0x28a02c=[],_0x215c23=[];for(const _0x306231 of _0x1db06f[_0x124176(0x226)][_0x124176(0x220)]){if(_0x306231[_0x124176(0x216)][_0x124176(0x25e)]===_0x1db06f['plan'][_0x124176(0x1f4)]){_0x3312f5[_0x124176(0x206)]({'id':_0x306231['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xb79562[_0x124176(0x23f)],_0xb79562[_0x124176(0x203)],{'id':_0x306231['id'],'visible':_0x1db06f[_0x124176(0x226)]['requestedVisible']}),_0x3312f5[_0x124176(0x206)]({'id':_0x306231['id'],'updated':!![],'skipped':![]});}catch(_0x3cadfe){const _0x4d50d5=mapMenuApiError(_0x3cadfe,_0x124176(0x26e),_0x306231['id']);if(isMenuResponseLoss(_0x3cadfe)&&_0x4d50d5[_0x124176(0x21e)]!==_0x124176(0x1fc)){_0x215c23['push'](_0x306231['id']);continue;}_0x28a02c[_0x124176(0x206)]({'id':_0x306231['id'],'stage':_0x124176(0x24e),'code':_0x4d50d5[_0x124176(0x21e)],'message':_0x4d50d5[_0x124176(0x234)]});}}let _0x65a74c;try{_0x65a74c=await fetchMenuSnapshot(_0xb79562[_0x124176(0x23f)],_0xb79562['cookie']);}catch(_0x17872e){const _0xb89c1=describeMenuErrorCause(_0x17872e,_0x124176(0x230)),_0x426143=_0x215c23[_0x124176(0x238)](_0x18193e=>({'id':_0x18193e,'stage':_0x124176(0x270),'code':_0x124176(0x242),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x18193e+_0x124176(0x20a),'requestedStateConfirmed':![],'recovered':![]})),_0x1e983b={'stage':_0x124176(0x205),'code':_0x124176(0x242),'message':_0x124176(0x1f9),'targetIds':_0x1db06f[_0x124176(0x226)]['targets'][_0x124176(0x238)](_0x35758f=>_0x35758f['id']),'requestedStateConfirmed':![],..._0xb89c1};throw menuFailure(asVerificationError(_0x17872e,_0x124176(0x241)),_0x1db06f[_0x124176(0x226)],{'stage':'verification','succeeded':_0x3312f5,'failedRecords':[..._0x28a02c,..._0x426143,_0x1e983b],'warnings':[_0x124176(0x24a)],'verification':{'status':_0x124176(0x213),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x6ccebe=[];for(const _0x397509 of _0x3312f5){const _0x2ce952=Number(_0x397509['id']),_0x489884=_0x1db06f[_0x124176(0x223)][_0x124176(0x24f)](_0x2ce952),_0x4a5620=_0x65a74c[_0x124176(0x21f)][_0x124176(0x24f)](_0x2ce952);try{verifyVisibilityUpdate(_0x489884,_0x4a5620,_0x1db06f[_0x124176(0x226)][_0x124176(0x1f4)]);}catch(_0x3a0d48){const _0x5e31ec=asVerificationError(_0x3a0d48,_0x124176(0x239)+_0x2ce952+_0x124176(0x23b));_0x6ccebe['push']({'id':_0x2ce952,'stage':_0x124176(0x205),'code':_0x5e31ec['code'],'message':_0x5e31ec[_0x124176(0x234)],'requestedStateConfirmed':![]});}}for(const _0x3d9a3e of _0x215c23){const _0x40a46f=_0x1db06f[_0x124176(0x223)][_0x124176(0x24f)](_0x3d9a3e),_0x4b88a8=_0x65a74c[_0x124176(0x21f)][_0x124176(0x24f)](_0x3d9a3e);try{verifyVisibilityUpdate(_0x40a46f,_0x4b88a8,_0x1db06f[_0x124176(0x226)][_0x124176(0x1f4)]),_0x3312f5[_0x124176(0x206)]({'id':_0x3d9a3e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x1bc705){const _0x4171e6=asVerificationError(_0x1bc705,_0x124176(0x222)+_0x3d9a3e+_0x124176(0x1fb));_0x6ccebe[_0x124176(0x206)]({'id':_0x3d9a3e,'stage':'update-recovery','code':_0x4171e6[_0x124176(0x21e)],'message':_0x4171e6[_0x124176(0x234)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x6ccebe[_0x124176(0x22d)]>0x0){const _0x2017e3=_0x6ccebe['map'](_0x560dec=>Number(_0x560dec['id'])),_0x1210ee=_0x3312f5['filter'](_0x7cd8fb=>_0x7cd8fb[_0x124176(0x244)]===!![])[_0x124176(0x22d)],_0x55ee6f=menuError(_0x124176(0x242),_0x124176(0x269)+_0x2017e3[_0x124176(0x215)](',\x20')+'.',_0x124176(0x209));throw menuFailure(_0x55ee6f,_0x1db06f[_0x124176(0x226)],{'stage':'verification','succeeded':_0x3312f5,'failedRecords':[..._0x28a02c,..._0x6ccebe],'warnings':[_0x124176(0x21b)],'verification':{'status':_0x124176(0x213),..._0x2017e3[_0x124176(0x22d)]===0x1?{'targetId':_0x2017e3[0x0]}:{'targetIds':_0x2017e3},'recoveredCount':_0x1210ee,'lookupCommand':_0x124176(0x264)}});}const _0x4ee310=_0x3312f5['filter'](_0x47c9e9=>_0x47c9e9[_0x124176(0x225)]===!![])[_0x124176(0x22d)],_0x289692=_0x3312f5[_0x124176(0x22d)]-_0x4ee310,_0x370865={..._0x1db06f[_0x124176(0x226)],'succeeded':_0x3312f5,'failed':_0x28a02c,'warnings':_0x28a02c[_0x124176(0x22d)]>0x0?[..._0x1db06f['plan'][_0x124176(0x26a)],_0x124176(0x255)]:_0x1db06f['plan']['warnings'],'verification':{'checkedBy':_0x124176(0x1f3),'snapshotHash':_0x65a74c[_0x124176(0x204)],'matchesRequestedState':_0x28a02c[_0x124176(0x22d)]===0x0,'recoveredCount':_0x215c23[_0x124176(0x22d)]}};return{'ok':_0x28a02c[_0x124176(0x22d)]===0x0,'data':_0x370865,'message':_0x28a02c[_0x124176(0x22d)]===0x0?_0x124176(0x21c)+_0x4ee310+_0x124176(0x26c)+_0x289692+_0x124176(0x26f):'Menu\x20visibility\x20update\x20completed:\x20'+_0x4ee310+'\x20updated,\x20'+_0x289692+_0x124176(0x257)+_0x28a02c[_0x124176(0x22d)]+'\x20failed.'};}};function parseInput(_0x36a106){const _0x5a55c3=a191_0x13cfa8,_0x5cb88f=parseMenuIds(_0x36a106['str'](_0x5a55c3(0x21d))),_0x4bb10c=parseCsv(_0x36a106[_0x5a55c3(0x1fa)](_0x5a55c3(0x1f5)));if(_0x5cb88f[_0x5a55c3(0x22d)]===0x0&&_0x4bb10c[_0x5a55c3(0x22d)]===0x0)throw CliErrors[_0x5a55c3(0x25b)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x1fd9ab=parseBooleanFlag(_0x36a106,'visible',!![]),_0xd48b1a=parseBooleanFlag(_0x36a106,_0x5a55c3(0x231),![]);let _0x475e3c;if(hasFlag(_0x36a106,_0x5a55c3(0x253))){_0x475e3c=_0x36a106['num'](_0x5a55c3(0x253));if(!Number[_0x5a55c3(0x23a)](_0x475e3c)||_0x475e3c<0x0)throw CliErrors[_0x5a55c3(0x25b)](_0x5a55c3(0x251));}return{'menuIds':_0x5cb88f,'paths':_0x4bb10c,'visible':_0x1fd9ab,'expectVisible':_0xd48b1a,'expectedCount':_0x475e3c};}function a191_0x44a5(_0x86e888,_0x102a09){_0x86e888=_0x86e888-0x1f1;const _0x443313=a191_0x4433();let _0x44a51d=_0x443313[_0x86e888];return _0x44a51d;}async function buildPlan(_0x2dc208,_0x364616){const _0x4dd5bd=a191_0x13cfa8,_0x91826b=parseInput(_0x2dc208),_0x17a6b4=await fetchMutationSnapshot(_0x2dc208,'update\x20menu\x20visibility'),_0x2ff7c8=selectTargets(_0x17a6b4[_0x4dd5bd(0x250)],_0x91826b[_0x4dd5bd(0x24c)],_0x91826b['paths']);if(_0x91826b[_0x4dd5bd(0x1fe)]!==undefined&&_0x2ff7c8[_0x4dd5bd(0x22d)]!==_0x91826b[_0x4dd5bd(0x1fe)])throw menuError('menu_expected_count_mismatch',_0x4dd5bd(0x1f1)+_0x2ff7c8[_0x4dd5bd(0x22d)]+_0x4dd5bd(0x25a)+_0x91826b[_0x4dd5bd(0x1fe)]+'.',_0x4dd5bd(0x248));if(_0x91826b['expectVisible']!==undefined){const _0x4a9b83=_0x2ff7c8['filter'](_0x41a7e0=>_0x41a7e0['visible']!==_0x91826b[_0x4dd5bd(0x268)]);if(_0x4a9b83[_0x4dd5bd(0x22d)]>0x0)throw menuError('menu_state_drift',_0x4dd5bd(0x219)+_0x4a9b83[_0x4dd5bd(0x238)](_0x332917=>_0x332917['id'])[_0x4dd5bd(0x215)](',\x20')+'.',_0x4dd5bd(0x25f));}const _0x2626a8=_0x2ff7c8[_0x4dd5bd(0x238)](_0x3c4530=>({'id':_0x3c4530['id'],'label':_0x3c4530[_0x4dd5bd(0x1ff)],'path':_0x3c4530[_0x4dd5bd(0x22a)],'before':{'visible':_0x3c4530[_0x4dd5bd(0x25e)]},'after':{'visible':_0x91826b[_0x4dd5bd(0x25e)]}})),_0x3fcaa7=_0x2626a8[_0x4dd5bd(0x20e)](_0x2e4ae9=>_0x2e4ae9[_0x4dd5bd(0x216)][_0x4dd5bd(0x25e)]!==_0x91826b['visible'])[_0x4dd5bd(0x238)](_0x4dad56=>({'stage':'update-menu-visibility','method':'POST','path':_0x4dd5bd(0x210),'body':{'appCode':_0x2dc208['appCode'],'id':_0x4dad56['id'],'visible':_0x91826b['visible']}})),_0x520e15=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x91826b[_0x4dd5bd(0x24c)],'paths':_0x91826b[_0x4dd5bd(0x1f5)]},'before':{'menus':_0x2ff7c8[_0x4dd5bd(0x238)](_0x53dd49=>({'id':_0x53dd49['id'],'path':_0x53dd49[_0x4dd5bd(0x22a)],'visible':_0x53dd49[_0x4dd5bd(0x25e)]}))},'after':{'menus':_0x2ff7c8[_0x4dd5bd(0x238)](_0x142b1b=>({'id':_0x142b1b['id'],'path':_0x142b1b[_0x4dd5bd(0x22a)],'visible':_0x91826b['visible']}))},'dryRun':_0x364616,'backend':[...BACKEND],'plannedActions':_0x3fcaa7,'snapshotHash':_0x17a6b4['hash'],'warnings':_0x3fcaa7[_0x4dd5bd(0x22d)]===0x0?[_0x4dd5bd(0x202)]:[]});return{'plan':{..._0x520e15,'requestedVisible':_0x91826b['visible'],'targets':_0x2626a8},'beforeById':new Map(_0x2ff7c8['map'](_0x189d5b=>[_0x189d5b['id'],_0x189d5b]))};}function selectTargets(_0x222758,_0x591eaf,_0x427f89){const _0x4807c5=a191_0x13cfa8,_0x1cce5f=new Map(_0x222758[_0x4807c5(0x238)](_0x12064b=>[_0x12064b['id'],_0x12064b])),_0x56b8e7=new Map(),_0x1c0791=_0x591eaf[_0x4807c5(0x20e)](_0x230429=>!_0x1cce5f[_0x4807c5(0x1f2)](_0x230429));if(_0x1c0791[_0x4807c5(0x22d)]>0x0)throw menuError(_0x4807c5(0x26b),_0x4807c5(0x233)+_0x1c0791['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x15fdcd of _0x591eaf){_0x56b8e7[_0x4807c5(0x214)](_0x15fdcd,_0x1cce5f[_0x4807c5(0x24f)](_0x15fdcd));}for(const _0x3c9478 of _0x427f89){const _0x30834c=_0x222758['filter'](_0x863ea8=>_0x863ea8['path']===_0x3c9478);if(_0x30834c['length']===0x0)throw menuError(_0x4807c5(0x26b),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x4807c5(0x22c)](_0x3c9478)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x30834c['length']>0x1)throw menuError(_0x4807c5(0x207),_0x4807c5(0x212)+JSON[_0x4807c5(0x22c)](_0x3c9478)+'.',_0x4807c5(0x201)+_0x30834c[_0x4807c5(0x238)](_0x337ce2=>_0x337ce2['id'])[_0x4807c5(0x215)](',\x20')+'.');const _0x123644=_0x30834c[0x0];_0x56b8e7[_0x4807c5(0x214)](_0x123644['id'],_0x123644);}return[..._0x56b8e7['values']()];}function parseMenuIds(_0x5eaa20){const _0x51591b=a191_0x13cfa8,_0x33c6b2=parseCsv(_0x5eaa20),_0x8e87fd=_0x33c6b2[_0x51591b(0x238)](Number);if(_0x8e87fd[_0x51591b(0x258)](_0x44df11=>!Number[_0x51591b(0x23a)](_0x44df11)||_0x44df11<=0x0))throw CliErrors[_0x51591b(0x25b)](_0x51591b(0x249));return[...new Set(_0x8e87fd)];}function parseCsv(_0x5504ec){const _0x5e6140=a191_0x13cfa8;return[...new Set(_0x5504ec[_0x5e6140(0x227)](',')['map'](_0x3179f8=>_0x3179f8[_0x5e6140(0x243)]())[_0x5e6140(0x20e)](Boolean))];}function a191_0x4433(){const _0x395ade=['Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','pageType','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Updated\x20visibility\x20for\x20','menu-ids','code','byId','targets','34LMwkly','Response\x20was\x20lost\x20and\x20menu\x20','beforeById','Requested\x20menu\x20visibility','updated','plan','split','resourcesValid','sort','path','flagMissing','stringify','length','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','verify\x20menu\x20visibility\x20update','expect-visible','write','Menu\x20id\x20selector(s)\x20not\x20found:\x20','message','2611917LfndfR','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','true','map','Menu\x20','isSafeInteger','\x20visibility\x20update\x20could\x20not\x20be\x20verified','pageId','16883NXEeuI','4556MFhfZY','appCode','parentId','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menu_verification_failed','trim','recovered','1551460vysJvW','rawFlags','219gAmUJC','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','type','menuIds','47467djihlj','update','get','menus','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu','expected-count','update\x20menu\x20visibility','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetId','\x20skipped,\x20','some','number','\x20menu(s),\x20expected\x20','validation','url','\x20must\x20be\x20true\x20or\x20false.','visible','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Would\x20update\x20visibility\x20for\x20','childrenIds','plannedActions','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','rabetbase\x20menu\x20list\x20--format\x20compress','string','modelType','boolean','expectVisible','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','warnings','menu_selector_not_found','\x20menu(s);\x20skipped\x20','visibility-update','update\x20visibility\x20for','\x20unchanged\x20menu(s).','update-recovery','Selected\x20','has','menu\x20list','requestedVisible','paths','245960eWHZLr','\x20menu(s);\x20skip\x20','datasetCode','Final\x20menu\x20visibility\x20readback\x20failed.','str','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_permission_denied','1872992iSRppj','expectedCount','label','isArray','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','cookie','hash','verification','push','menu_selector_ambiguous','253VULCEe','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','depth','6hpvVOe','childrenCount','filter','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','/smartapi/menu/update','\x20changed\x20unexpectedly.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','failed','set','join','before','POST','resources'];a191_0x4433=function(){return _0x395ade;};return a191_0x4433();}function parseBooleanFlag(_0x313c98,_0x439b71,_0x576ab7){const _0xdd5be1=a191_0x13cfa8;if(!hasFlag(_0x313c98,_0x439b71)){if(_0x576ab7)throw CliErrors[_0xdd5be1(0x22b)](_0x439b71);return undefined;}const _0x1ebe57=_0x313c98[_0xdd5be1(0x246)][_0x439b71];if(_0x1ebe57===!![]||_0x1ebe57===![])return _0x1ebe57;if(_0x1ebe57===_0xdd5be1(0x237))return!![];if(_0x1ebe57==='false')return![];throw CliErrors[_0xdd5be1(0x25b)]('--'+_0x439b71+_0xdd5be1(0x25d));}function verifyVisibilityUpdate(_0x4ccaa4,_0x236941,_0xe6ec16){const _0x234314=a191_0x13cfa8;assertVerified(!!_0x236941,_0x234314(0x239)+_0x4ccaa4['id']+_0x234314(0x236)),assertVerified(_0x236941[_0x234314(0x25e)]===_0xe6ec16,_0x234314(0x239)+_0x4ccaa4['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x24eba1=[['id',_0x236941['id'],_0x4ccaa4['id']],[_0x234314(0x240),_0x236941[_0x234314(0x240)],_0x4ccaa4['parentId']],[_0x234314(0x20b),_0x236941['depth'],_0x4ccaa4[_0x234314(0x20b)]],[_0x234314(0x1ff),_0x236941['label'],_0x4ccaa4[_0x234314(0x1ff)]],[_0x234314(0x22a),_0x236941[_0x234314(0x22a)],_0x4ccaa4[_0x234314(0x22a)]],[_0x234314(0x25c),_0x236941[_0x234314(0x25c)],_0x4ccaa4[_0x234314(0x25c)]],[_0x234314(0x24b),_0x236941[_0x234314(0x24b)],_0x4ccaa4[_0x234314(0x24b)]],[_0x234314(0x229),_0x236941[_0x234314(0x229)],_0x4ccaa4[_0x234314(0x229)]],['resources',_0x236941[_0x234314(0x218)],_0x4ccaa4[_0x234314(0x218)]],[_0x234314(0x228),_0x236941[_0x234314(0x228)],_0x4ccaa4['resourcesValid']],[_0x234314(0x261),_0x236941[_0x234314(0x261)],_0x4ccaa4[_0x234314(0x261)]],[_0x234314(0x20d),_0x236941['childrenCount'],_0x4ccaa4['childrenCount']],[_0x234314(0x23c),_0x236941['pageId'],_0x4ccaa4['pageId']],[_0x234314(0x21a),_0x236941[_0x234314(0x21a)],_0x4ccaa4['pageType']],['modelType',_0x236941[_0x234314(0x266)],_0x4ccaa4[_0x234314(0x266)]],[_0x234314(0x256),_0x236941[_0x234314(0x256)],_0x4ccaa4[_0x234314(0x256)]],['datasetCode',_0x236941[_0x234314(0x1f8)],_0x4ccaa4['datasetCode']]];for(const [_0x1e3efb,_0x51ffa5,_0x5aa8ba]of _0x24eba1){assertVerified(sameValue(_0x51ffa5,_0x5aa8ba),_0x234314(0x239)+_0x4ccaa4['id']+'\x20'+_0x1e3efb+_0x234314(0x211));}}function sameValue(_0x4506f1,_0x3f486e){const _0x112328=a191_0x13cfa8;if(Array[_0x112328(0x200)](_0x4506f1)||Array[_0x112328(0x200)](_0x3f486e))return JSON['stringify'](_0x4506f1)===JSON[_0x112328(0x22c)](_0x3f486e);return _0x4506f1===_0x3f486e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a192_0xde3faa=a192_0x3496;(function(_0x3ece6e,_0x513e79){const _0x5fe01e=a192_0x3496,_0x469d2a=_0x3ece6e();while(!![]){try{const _0x58212e=parseInt(_0x5fe01e(0x16d))/0x1*(parseInt(_0x5fe01e(0x17e))/0x2)+parseInt(_0x5fe01e(0x184))/0x3*(-parseInt(_0x5fe01e(0x18b))/0x4)+parseInt(_0x5fe01e(0x188))/0x5*(parseInt(_0x5fe01e(0x194))/0x6)+-parseInt(_0x5fe01e(0x174))/0x7*(-parseInt(_0x5fe01e(0x171))/0x8)+-parseInt(_0x5fe01e(0x176))/0x9+-parseInt(_0x5fe01e(0x172))/0xa+-parseInt(_0x5fe01e(0x17b))/0xb*(-parseInt(_0x5fe01e(0x17f))/0xc);if(_0x58212e===_0x513e79)break;else _0x469d2a['push'](_0x469d2a['shift']());}catch(_0x30c650){_0x469d2a['push'](_0x469d2a['shift']());}}}(a192_0x134d,0xd02d6));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';function a192_0x3496(_0x48e0e8,_0x399f43){_0x48e0e8=_0x48e0e8-0x16c;const _0x134dbb=a192_0x134d();let _0x34965a=_0x134dbb[_0x48e0e8];return _0x34965a;}const CREATE_PATH=a192_0xde3faa(0x16c);function a192_0x134d(){const _0x42fbfd=['appCode','document','verified','12FIbVqb','/notification/channel-config/create','31SxZnLr','Inspect\x20with\x20','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','mutation','8vhdlMY','14773360sQySMj','connectTimeout','3559619lsjgMw','isSafeInteger','12317733FnlBTy','write','notification_config_create_outcome_unknown','readTimeout','notification','180983UopCAv','create','input','52994jcKIiU','1668EDYOnG',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','endpointUrl','configName','6141PViEsK','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configCode','config-create','2056975LFmbrR',';\x20do\x20not\x20resubmit\x20automatically.','channelConfig','1448LDbYiD','channelType','description','verification','POST','planned'];a192_0x134d=function(){return _0x42fbfd;};return a192_0x134d();}async function prepareCreate(_0x334723){const _0x290c94=a192_0xde3faa,_0x802c48=await readNotificationDocument(_0x334723,_0x290c94(0x17c)),_0x4faae2=createMutationInput(_0x334723['appCode'],_0x802c48);return{'document':_0x802c48,'input':_0x4faae2,'planned':projectNotificationConfig({'appCode':_0x334723[_0x290c94(0x191)],'configName':_0x802c48[_0x290c94(0x183)],'channelType':_0x802c48[_0x290c94(0x18c)],'endpointUrl':_0x802c48[_0x290c94(0x182)],'channelConfig':_0x802c48[_0x290c94(0x18a)],'description':_0x802c48[_0x290c94(0x18d)],'connectTimeout':_0x802c48[_0x290c94(0x173)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x802c48[_0x290c94(0x179)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0xde3faa(0x17a),'command':a192_0xde3faa(0x187),'description':a192_0xde3faa(0x185),'risk':a192_0xde3faa(0x177),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3a3f13){assertSingleNotificationSource(_0x3a3f13);},async 'dryRun'(_0x50f765){const _0x1c5e19=a192_0xde3faa,_0x25ca48=await prepareCreate(_0x50f765),_0x3e06d5=notificationLookupCommand(_0x50f765['appCode'],_0x25ca48[_0x1c5e19(0x192)][_0x1c5e19(0x18c)]);return asDryRunResult({'operation':_0x1c5e19(0x17c),'selector':{'appCode':_0x50f765[_0x1c5e19(0x191)],'configName':_0x25ca48['document'][_0x1c5e19(0x183)],'channelType':_0x25ca48[_0x1c5e19(0x192)][_0x1c5e19(0x18c)]},'before':null,'after':_0x25ca48[_0x1c5e19(0x190)],'dryRun':!![],'backend':{'method':_0x1c5e19(0x18f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1c5e19(0x190),'lookupCommand':_0x3e06d5}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x1de750){const _0x5542a2=a192_0xde3faa,_0x46574d=await prepareCreate(_0x1de750),_0x339826=notificationLookupCommand(_0x1de750[_0x5542a2(0x191)],_0x46574d[_0x5542a2(0x192)]['channelType']);let _0x504b63;try{_0x504b63=await createNotificationChannelConfig(_0x46574d[_0x5542a2(0x17d)]);}catch(_0xf01efc){if(isPlatformTransportFailure(_0xf01efc))throw notificationError('notification_config_create_outcome_unknown',_0x5542a2(0x16f),_0x5542a2(0x16e)+_0x339826+';\x20do\x20not\x20resubmit.');throw safeApiFailure('create',_0x5542a2(0x170),'Inspect\x20with\x20'+_0x339826+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x5542a2(0x175)](_0x504b63)||_0x504b63<=0x0)throw notificationError(_0x5542a2(0x178),_0x5542a2(0x181),_0x5542a2(0x16e)+_0x339826+_0x5542a2(0x180));let _0xf26db1;try{const _0x2613f6=await getNotificationChannelConfig(_0x504b63,_0x1de750[_0x5542a2(0x191)]);_0xf26db1=normalizeExactNotificationConfig(_0x2613f6,_0x504b63,_0x1de750[_0x5542a2(0x191)]);}catch{throw safeApiFailure(_0x5542a2(0x17c),_0x5542a2(0x18e),_0x5542a2(0x16e)+_0x339826+_0x5542a2(0x189));}return{'ok':!![],'data':{'operation':_0x5542a2(0x17c),'selector':{'appCode':_0xf26db1[_0x5542a2(0x191)],'id':_0xf26db1['id'],'configCode':_0xf26db1[_0x5542a2(0x186)],'configName':_0xf26db1[_0x5542a2(0x183)],'channelType':_0xf26db1[_0x5542a2(0x18c)]},'before':null,'after':projectNotificationConfig(_0xf26db1),'dryRun':![],'backend':{'method':_0x5542a2(0x18f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x5542a2(0x193),'lookupCommand':_0x339826}},'message':'Created\x20notification\x20config\x20'+_0xf26db1['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x3bb4d4=a193_0x3368;(function(_0x36a0f2,_0x573d8b){const _0x36d700=a193_0x3368,_0x35e128=_0x36a0f2();while(!![]){try{const _0x3daed0=parseInt(_0x36d700(0x188))/0x1*(-parseInt(_0x36d700(0x172))/0x2)+-parseInt(_0x36d700(0x184))/0x3*(-parseInt(_0x36d700(0x16c))/0x4)+-parseInt(_0x36d700(0x174))/0x5*(-parseInt(_0x36d700(0x16e))/0x6)+parseInt(_0x36d700(0x16a))/0x7+-parseInt(_0x36d700(0x186))/0x8*(-parseInt(_0x36d700(0x18a))/0x9)+-parseInt(_0x36d700(0x17c))/0xa*(parseInt(_0x36d700(0x182))/0xb)+-parseInt(_0x36d700(0x180))/0xc;if(_0x3daed0===_0x573d8b)break;else _0x35e128['push'](_0x35e128['shift']());}catch(_0x4917ed){_0x35e128['push'](_0x35e128['shift']());}}}(a193_0x448e,0x74db8));function a193_0x3368(_0x36e98c,_0x340225){_0x36e98c=_0x36e98c-0x168;const _0x448e9f=a193_0x448e();let _0x33684b=_0x448e9f[_0x36e98c];return _0x33684b;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x3bb4d4(0x17a),REFERENCE_WARNING=a193_0x3bb4d4(0x181);async function prepareDelete(_0x144141){const _0x20b802=a193_0x3bb4d4,_0x5992a2=readNotificationId(_0x144141),_0x2a7284=await requireExactNotificationConfig(_0x144141[_0x20b802(0x16d)],_0x5992a2,'delete');return{'id':_0x5992a2,'before':_0x2a7284};}export const notificationConfigDelete={'service':a193_0x3bb4d4(0x185),'command':'config-delete','description':a193_0x3bb4d4(0x168),'risk':a193_0x3bb4d4(0x16b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x383275){readNotificationId(_0x383275),requireNotificationExplicitYes(_0x383275);},async 'dryRun'(_0x52f8c2){const _0x2fae44=a193_0x3bb4d4,_0x3f2875=await prepareDelete(_0x52f8c2),_0x26c1ee=notificationLookupCommand(_0x52f8c2['appCode'],_0x3f2875[_0x2fae44(0x173)][_0x2fae44(0x16f)]);return asDryRunResult({'operation':_0x2fae44(0x175),'selector':notificationSelector(_0x3f2875['before']),'before':projectNotificationConfig(_0x3f2875[_0x2fae44(0x173)]),'after':null,'dryRun':!![],'backend':{'method':_0x2fae44(0x17d),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x2fae44(0x171),'lookupCommand':_0x26c1ee}},{'method':_0x2fae44(0x17d),'url':DELETE_PATH});},async 'execute'(_0x5c3503){const _0x5a57a9=a193_0x3bb4d4;requireNotificationExplicitYes(_0x5c3503);const _0x3fa30e=await prepareDelete(_0x5c3503),_0x13f6be=notificationLookupCommand(_0x5c3503[_0x5a57a9(0x16d)],_0x3fa30e[_0x5a57a9(0x173)][_0x5a57a9(0x16f)]);let _0x42300c=![];try{await deleteNotificationChannelConfig(_0x3fa30e['id'],_0x5c3503[_0x5a57a9(0x16d)]);}catch(_0x31a649){if(!isPlatformTransportFailure(_0x31a649))throw safeApiFailure(_0x5a57a9(0x175),_0x5a57a9(0x170),_0x5a57a9(0x169)+_0x13f6be+_0x5a57a9(0x17b));_0x42300c=!![];}let _0x1c4ec7;try{_0x1c4ec7=await listNotificationChannelConfigs(_0x5c3503[_0x5a57a9(0x16d)],_0x3fa30e[_0x5a57a9(0x173)]['channelType']),validateNotificationDeleteReadback(_0x1c4ec7,_0x5c3503['appCode'],_0x3fa30e[_0x5a57a9(0x173)]['channelType']);}catch{throw notificationError(_0x42300c?_0x5a57a9(0x177):_0x5a57a9(0x187),_0x5a57a9(0x183)+_0x3fa30e['id']+_0x5a57a9(0x17e),_0x5a57a9(0x169)+_0x13f6be+_0x5a57a9(0x179));}if(_0x1c4ec7[_0x5a57a9(0x178)](_0x493607=>_0x493607['id']===_0x3fa30e['id']))throw notificationError(_0x42300c?_0x5a57a9(0x177):_0x5a57a9(0x17f),'Notification\x20config\x20'+_0x3fa30e['id']+'\x20remains\x20present\x20after\x20delete.',_0x5a57a9(0x169)+_0x13f6be+_0x5a57a9(0x179));const _0x8314c6=[REFERENCE_WARNING];return _0x42300c&&_0x8314c6[_0x5a57a9(0x189)](_0x5a57a9(0x176)),{'ok':!![],'data':{'operation':_0x5a57a9(0x175),'selector':notificationSelector(_0x3fa30e[_0x5a57a9(0x173)]),'before':projectNotificationConfig(_0x3fa30e['before']),'after':null,'dryRun':![],'backend':{'method':_0x5a57a9(0x17d),'path':DELETE_PATH},'warnings':_0x8314c6,'verification':{'status':_0x5a57a9(0x18b),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x42300c,'lookupCommand':_0x13f6be}},'message':'Deleted\x20notification\x20config\x20'+_0x3fa30e['id']};}};function a193_0x448e(){const _0x262477=['3LIGhTA','notification','48kdiuuV','notification_config_delete_verification_unavailable','563VUuLfT','unshift','72279ONjlRF','verified','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','Inspect\x20with\x20','6605445DucHMk','high-risk-write','2119300aQmZFy','appCode','6ATVHOE','channelType','mutation','planned','932akWvQK','before','2717035ReYuIA','delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_outcome_unknown','some',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/delete',';\x20no\x20automatic\x20retry\x20was\x20attempted.','40cPvFMh','POST','\x20delete\x20could\x20not\x20be\x20verified.','notification_config_delete_verification_failed','5808132SofUfL','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','2310099tKtBGw','Notification\x20config\x20'];a193_0x448e=function(){return _0x262477;};return a193_0x448e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x36eb11=a194_0x21d5;function a194_0x5124(){const _0x28d3f1=['Notification\x20channel\x20type','6126690GXpzab','validation','read','Found\x20','boolean','trim','\x20notification\x20config(s)','bool','9615460xvgRgY','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','all','str','341110LosbEC','type','9QHgLvp','notification','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode','5GpclFX','183642Xkqfsa','config-list','flat','24YVXgHU','string','length','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','map','7322718ghaLNj','4699336DDsjlv','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','1377481fLlDKC'];a194_0x5124=function(){return _0x28d3f1;};return a194_0x5124();}(function(_0x26423b,_0x59ab9b){const _0x3a9f71=a194_0x21d5,_0x263fe6=_0x26423b();while(!![]){try{const _0x1bebc6=parseInt(_0x3a9f71(0x1a1))/0x1*(parseInt(_0x3a9f71(0x19b))/0x2)+-parseInt(_0x3a9f71(0x1a2))/0x3*(-parseInt(_0x3a9f71(0x1a5))/0x4)+-parseInt(_0x3a9f71(0x18f))/0x5+parseInt(_0x3a9f71(0x1aa))/0x6+-parseInt(_0x3a9f71(0x1ad))/0x7+-parseInt(_0x3a9f71(0x1ab))/0x8*(-parseInt(_0x3a9f71(0x19d))/0x9)+-parseInt(_0x3a9f71(0x197))/0xa;if(_0x1bebc6===_0x59ab9b)break;else _0x263fe6['push'](_0x263fe6['shift']());}catch(_0x5c3169){_0x263fe6['push'](_0x263fe6['shift']());}}}(a194_0x5124,0x9d4a6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a194_0x21d5(_0x4589e5,_0x3f00b9){_0x4589e5=_0x4589e5-0x18e;const _0x512475=a194_0x5124();let _0x21d5f2=_0x512475[_0x4589e5];return _0x21d5f2;}export const notificationConfigList={'service':a194_0x36eb11(0x19e),'command':a194_0x36eb11(0x1a3),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x36eb11(0x191),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x36eb11(0x19c),'type':a194_0x36eb11(0x1a6),'description':a194_0x36eb11(0x18e),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x36eb11(0x199),'type':a194_0x36eb11(0x193),'default':![],'description':a194_0x36eb11(0x198)}],async 'validate'(_0x57b4b9){const _0x1b6a55=a194_0x36eb11;if(_0x57b4b9[_0x1b6a55(0x196)]('all')&&_0x57b4b9[_0x1b6a55(0x19a)](_0x1b6a55(0x19c))[_0x1b6a55(0x194)]())throw CliErrors[_0x1b6a55(0x190)](_0x1b6a55(0x1ac),_0x1b6a55(0x19f));if(_0x57b4b9['bool'](_0x1b6a55(0x199)))return;readNotificationChannelType(_0x57b4b9);},async 'execute'(_0x17ef7f){const _0xe39e87=a194_0x36eb11;if(_0x17ef7f[_0xe39e87(0x196)](_0xe39e87(0x199))){const _0x17664f=await Promise[_0xe39e87(0x199)](NOTIFICATION_CHANNEL_TYPES[_0xe39e87(0x1a9)](_0x27142b=>listNotificationChannelConfigs(_0x17ef7f[_0xe39e87(0x1a0)],_0x27142b))),_0x388a47=_0x17664f[_0xe39e87(0x1a4)]()[_0xe39e87(0x1a9)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x17ef7f['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x388a47[_0xe39e87(0x1a7)],'configs':_0x388a47},'message':_0xe39e87(0x192)+_0x388a47['length']+_0xe39e87(0x1a8)};}const _0x15c58f=readNotificationChannelType(_0x17ef7f),_0x40bdad=await listNotificationChannelConfigs(_0x17ef7f['appCode'],_0x15c58f),_0x381ce4=_0x40bdad[_0xe39e87(0x1a9)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x17ef7f['appCode'],'channelType':_0x15c58f,'count':_0x381ce4[_0xe39e87(0x1a7)],'configs':_0x381ce4},'message':_0xe39e87(0x192)+_0x381ce4[_0xe39e87(0x1a7)]+'\x20'+_0x15c58f+_0xe39e87(0x195)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x384afa=a195_0x2468;function a195_0x2468(_0x2ebfa6,_0x323d22){_0x2ebfa6=_0x2ebfa6-0x121;const _0x55fb97=a195_0x55fb();let _0x246859=_0x55fb97[_0x2ebfa6];return _0x246859;}(function(_0x5cbe5d,_0x800bd7){const _0xfb53=a195_0x2468,_0x4d4384=_0x5cbe5d();while(!![]){try{const _0x15aa2c=-parseInt(_0xfb53(0x13d))/0x1*(-parseInt(_0xfb53(0x12d))/0x2)+parseInt(_0xfb53(0x12f))/0x3*(-parseInt(_0xfb53(0x147))/0x4)+-parseInt(_0xfb53(0x132))/0x5*(parseInt(_0xfb53(0x125))/0x6)+-parseInt(_0xfb53(0x139))/0x7*(parseInt(_0xfb53(0x127))/0x8)+parseInt(_0xfb53(0x12a))/0x9*(-parseInt(_0xfb53(0x123))/0xa)+parseInt(_0xfb53(0x135))/0xb+parseInt(_0xfb53(0x136))/0xc;if(_0x15aa2c===_0x800bd7)break;else _0x4d4384['push'](_0x4d4384['shift']());}catch(_0x9d3e0f){_0x4d4384['push'](_0x4d4384['shift']());}}}(a195_0x55fb,0xbe493));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';function a195_0x55fb(){const _0x8b9bc6=['110GkSNJl','payload','644172euhcfi','allMatch','1762392GpiQvv','mutation','Inspect\x20with\x20--id\x20','743355WBVQId','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','notification_config_update_verification_failed','16UniGnY','Inspect\x20ID\x20','2127AzyjSr','verifiedFields','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','5BeRrlA','notification_config_update_verification_unavailable','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','11782199PlhWMB','32844552eeIDlz',';\x20do\x20not\x20resubmit\x20automatically.','config-update','35nYHPcH','Notification\x20config\x20','notification_config_update_outcome_unknown','provesChange','68827epoXRy','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','\x20with\x20','Updated\x20notification\x20config\x20','planned','\x20via\x20','verified','appCode','POST','8248ENKtJU','channelType','/notification/channel-config/update','update','before'];a195_0x55fb=function(){return _0x8b9bc6;};return a195_0x55fb();}const UPDATE_PATH=a195_0x384afa(0x149);async function prepareUpdate(_0x3e48b4){const _0x30055d=a195_0x384afa,_0x488b88=readNotificationId(_0x3e48b4),_0x4f7f52=await readNotificationDocument(_0x3e48b4,_0x30055d(0x121)),_0x5240b8=await requireExactNotificationConfig(_0x3e48b4[_0x30055d(0x145)],_0x488b88,'update');return{'id':_0x488b88,'patch':_0x4f7f52,'before':_0x5240b8,'payload':mergeUpdateInput(_0x5240b8,_0x4f7f52),'planned':plannedUpdateProjection(_0x5240b8,_0x4f7f52)};}export const notificationConfigUpdate={'service':'notification','command':a195_0x384afa(0x138),'description':a195_0x384afa(0x131),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x38bce6){readNotificationId(_0x38bce6),assertSingleNotificationSource(_0x38bce6),requireNotificationExplicitYes(_0x38bce6);},async 'dryRun'(_0x49fa06){const _0x2277a8=a195_0x384afa,_0x4bbd03=await prepareUpdate(_0x49fa06),_0x21948e=notificationLookupCommand(_0x49fa06[_0x2277a8(0x145)],_0x4bbd03[_0x2277a8(0x122)][_0x2277a8(0x148)]);return asDryRunResult({'operation':_0x2277a8(0x121),'selector':notificationSelector(_0x4bbd03[_0x2277a8(0x122)]),'before':projectNotificationConfig(_0x4bbd03[_0x2277a8(0x122)]),'after':_0x4bbd03[_0x2277a8(0x142)],'dryRun':!![],'backend':{'method':_0x2277a8(0x146),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2277a8(0x142),'lookupCommand':_0x21948e}},{'method':_0x2277a8(0x146),'url':UPDATE_PATH});},async 'execute'(_0x39612f){const _0xa1afea=a195_0x384afa;requireNotificationExplicitYes(_0x39612f);const _0x4dcaca=await prepareUpdate(_0x39612f),_0x1ec0da=notificationLookupCommand(_0x39612f[_0xa1afea(0x145)],_0x4dcaca[_0xa1afea(0x122)][_0xa1afea(0x148)]);let _0x55bd1e=![];try{await updateNotificationChannelConfig(_0x4dcaca[_0xa1afea(0x124)]);}catch(_0xb3374){if(!isPlatformTransportFailure(_0xb3374))throw safeApiFailure(_0xa1afea(0x121),_0xa1afea(0x128),_0xa1afea(0x12e)+_0x4dcaca['id']+_0xa1afea(0x140)+_0x1ec0da+_0xa1afea(0x13f));_0x55bd1e=!![];}let _0x4c25dc;try{const _0x5e2795=await getNotificationChannelConfig(_0x4dcaca['id'],_0x39612f[_0xa1afea(0x145)]);_0x4c25dc=normalizeExactNotificationConfig(_0x5e2795,_0x4dcaca['id'],_0x39612f[_0xa1afea(0x145)]);}catch{throw notificationError(_0x55bd1e?_0xa1afea(0x13b):_0xa1afea(0x133),_0xa1afea(0x13a)+_0x4dcaca['id']+_0xa1afea(0x12b),_0xa1afea(0x129)+_0x4dcaca['id']+_0xa1afea(0x143)+_0x1ec0da+_0xa1afea(0x137));}const _0x4711e0=requestedSafeFieldsMatch(_0x4dcaca['before'],_0x4c25dc,_0x4dcaca['patch']);if(!_0x4711e0[_0xa1afea(0x126)]||_0x55bd1e&&!_0x4711e0[_0xa1afea(0x13c)])throw notificationError(_0x55bd1e?_0xa1afea(0x13b):_0xa1afea(0x12c),_0xa1afea(0x13a)+_0x4dcaca['id']+_0xa1afea(0x134),_0xa1afea(0x129)+_0x4dcaca['id']+_0xa1afea(0x143)+_0x1ec0da+_0xa1afea(0x137));const _0x2ec658=_0x55bd1e?[_0xa1afea(0x13e)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4c25dc),'before':projectNotificationConfig(_0x4dcaca[_0xa1afea(0x122)]),'after':projectNotificationConfig(_0x4c25dc),'dryRun':![],'backend':{'method':_0xa1afea(0x146),'path':UPDATE_PATH},'warnings':_0x2ec658,'verification':{'status':_0xa1afea(0x144),'recoveredAfterUnknownResponse':_0x55bd1e,'verifiedFields':_0x4711e0[_0xa1afea(0x130)],'lookupCommand':_0x1ec0da}},'message':_0xa1afea(0x141)+_0x4c25dc['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x550c06,_0x29043f){const _0x3eef78=a196_0x1e56,_0xa74713=_0x550c06();while(!![]){try{const _0x41ab70=parseInt(_0x3eef78(0x1b8))/0x1+-parseInt(_0x3eef78(0x1b2))/0x2*(parseInt(_0x3eef78(0x1b4))/0x3)+parseInt(_0x3eef78(0x1b0))/0x4*(-parseInt(_0x3eef78(0x1b1))/0x5)+parseInt(_0x3eef78(0x1af))/0x6*(parseInt(_0x3eef78(0x1b6))/0x7)+parseInt(_0x3eef78(0x1b7))/0x8*(parseInt(_0x3eef78(0x1b3))/0x9)+-parseInt(_0x3eef78(0x1ba))/0xa*(-parseInt(_0x3eef78(0x1b5))/0xb)+-parseInt(_0x3eef78(0x1b9))/0xc;if(_0x41ab70===_0x29043f)break;else _0xa74713['push'](_0xa74713['shift']());}catch(_0x37eb4d){_0xa74713['push'](_0xa74713['shift']());}}}(a196_0x4a1b,0xaaec3));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a196_0x1e56(_0x3409ca,_0x4cad60){_0x3409ca=_0x3409ca-0x1af;const _0x4a1b90=a196_0x4a1b();let _0x1e5646=_0x4a1b90[_0x3409ca];return _0x1e5646;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x4a1b(){const _0x297e3d=['262682LMeNtA','8HPORxk','387561uSZhxY','4592496AOpzTZ','10qrBExG','210VOwowf','2605924xYCDMb','5rUzvRx','12582DlyLMM','1648926lFsVoX','342oqcXbT','6240047cfZYrh'];a196_0x4a1b=function(){return _0x297e3d;};return a196_0x4a1b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a196_0x31ae33=a196_0xcda8;(function(_0x23c5a1,_0x2fba0a){const _0x5491db=a196_0xcda8,_0x554a30=_0x23c5a1();while(!![]){try{const _0x192422=-parseInt(_0x5491db(0x1bc))/0x1*(-parseInt(_0x5491db(0x1ae))/0x2)+parseInt(_0x5491db(0x179))/0x3*(-parseInt(_0x5491db(0x16c))/0x4)+parseInt(_0x5491db(0x18d))/0x5+parseInt(_0x5491db(0x19e))/0x6*(parseInt(_0x5491db(0x1b0))/0x7)+-parseInt(_0x5491db(0x1ad))/0x8*(parseInt(_0x5491db(0x1a1))/0x9)+-parseInt(_0x5491db(0x1c7))/0xa+parseInt(_0x5491db(0x198))/0xb;if(_0x192422===_0x2fba0a)break;else _0x554a30['push'](_0x554a30['shift']());}catch(_0x2043f1){_0x554a30['push'](_0x554a30['shift']());}}}(a196_0x3640,0x71930));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=[a196_0x31ae33(0x1a3),'FEISHU',a196_0x31ae33(0x14b),'WECOM',a196_0x31ae33(0x161)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a196_0x31ae33(0x163),a196_0x31ae33(0x14c),a196_0x31ae33(0x15b),a196_0x31ae33(0x1c2),a196_0x31ae33(0x1a8),a196_0x31ae33(0x1cb),a196_0x31ae33(0x185)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a196_0x31ae33(0x194),a196_0x31ae33(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a196_0x31ae33(0x18c),'recipients','ccList',a196_0x31ae33(0x169),a196_0x31ae33(0x165),'subjectPrefix',a196_0x31ae33(0x17b),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a196_0x31ae33(0x19a),'required':![],'description':a196_0x31ae33(0x1c9)},{'name':a196_0x31ae33(0x1c3),'type':a196_0x31ae33(0x1b5),'required':![],'default':![],'description':a196_0x31ae33(0x158)},{'name':'from-env','type':a196_0x31ae33(0x19a),'required':![],'description':a196_0x31ae33(0x1cd)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a196_0x31ae33(0x1a4)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5408c6,_0x34708b,_0xef5547){return new CliError(_0x5408c6,0x1,_0x34708b,_0xef5547);}export function readNotificationId(_0x14dfac){const _0x4bc5a4=a196_0x31ae33,_0x40ad55=_0x14dfac[_0x4bc5a4(0x14a)]('id');if(!Number[_0x4bc5a4(0x167)](_0x40ad55)||_0x40ad55<=0x0)throw notificationError(_0x4bc5a4(0x196),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x40ad55;}export function requireNotificationExplicitYes(_0xe9012a){const _0x526fc8=a196_0x31ae33;if(_0xe9012a[_0x526fc8(0x1c8)](_0x526fc8(0x19d))||_0xe9012a['bool']('yes'))return;throw notificationError('notification_config_confirmation_required',_0x526fc8(0x1bb),_0x526fc8(0x153));}export function readNotificationChannelType(_0x541495,_0x4d6609=a196_0x31ae33(0x17e),_0x26bc54=a196_0x31ae33(0x1a3)){const _0x5c145d=a196_0x31ae33,_0x5d5d66=_0x541495[_0x5c145d(0x1b8)](_0x4d6609)[_0x5c145d(0x190)]()||_0x26bc54;if(!NOTIFICATION_CHANNEL_TYPES[_0x5c145d(0x1bf)](_0x5d5d66))throw CliErrors['validation'](_0x5c145d(0x1c0)+_0x4d6609+':\x20'+_0x5d5d66,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x5d5d66;}export function assertSingleNotificationSource(_0x1db64f){const _0x227947=a196_0x31ae33,_0x4920e4=[],_0x36ad00=_0x1db64f[_0x227947(0x1b8)]('file')['trim']();if(_0x36ad00)_0x4920e4[_0x227947(0x178)]({'kind':_0x227947(0x16d),'path':_0x36ad00});if(_0x1db64f[_0x227947(0x1c8)](_0x227947(0x1c3)))_0x4920e4['push']({'kind':_0x227947(0x1c3)});const _0x3061b=_0x1db64f[_0x227947(0x1b8)](_0x227947(0x160))[_0x227947(0x190)]();if(_0x3061b)_0x4920e4[_0x227947(0x178)]({'kind':_0x227947(0x1c6),'name':_0x3061b});if(_0x4920e4[_0x227947(0x17a)]===0x0)throw CliErrors[_0x227947(0x186)](_0x227947(0x199),_0x227947(0x171));if(_0x4920e4[_0x227947(0x17a)]>0x1)throw CliErrors[_0x227947(0x186)](_0x227947(0x1ba),_0x227947(0x171));return _0x4920e4[0x0];}export async function readNotificationDocument(_0x5a463d,_0x5daeb5){const _0x2ab5a0=a196_0x31ae33,_0x2652d6=assertSingleNotificationSource(_0x5a463d),_0x5e18f0=_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x16d)?_0x2ab5a0(0x1ca)+_0x2652d6[_0x2ab5a0(0x18a)]:_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x1c6)?_0x2ab5a0(0x1b6)+_0x2652d6[_0x2ab5a0(0x18e)]:_0x2ab5a0(0x1c3);let _0x1a8116;try{if(_0x2652d6[_0x2ab5a0(0x1a5)]===_0x2ab5a0(0x16d))_0x1a8116=await readFile(_0x2652d6[_0x2ab5a0(0x18a)],_0x2ab5a0(0x17c));else{if(_0x2652d6['kind']===_0x2ab5a0(0x1c6)){if(!(_0x2652d6[_0x2ab5a0(0x18e)]in process.env))throw notificationError(_0x2ab5a0(0x149),_0x2ab5a0(0x18f)+_0x2652d6[_0x2ab5a0(0x18e)]);_0x1a8116=process.env[_0x2652d6.name]??'';}else _0x1a8116=await readStdin();}}catch(_0x1cdb15){if(_0x1cdb15 instanceof CliError)throw _0x1cdb15;throw notificationError(_0x2ab5a0(0x149),_0x2ab5a0(0x182)+_0x5e18f0+'.');}let _0xe469d7;try{_0xe469d7=JSON['parse'](_0x1a8116);}catch{throw notificationError('notification_config_json_invalid',_0x2ab5a0(0x1a0)+_0x5e18f0+_0x2ab5a0(0x197),_0x2ab5a0(0x184));}if(!isJsonObject(_0xe469d7))throw notificationError(_0x2ab5a0(0x181),'Notification\x20JSON\x20from\x20'+_0x5e18f0+_0x2ab5a0(0x174));return validateNotificationDocument(_0xe469d7,_0x5daeb5);}export function projectNotificationListConfig(_0x67aa08,_0x5c5a19){const _0x333da7=a196_0x31ae33;return{'id':typeof _0x67aa08['id']===_0x333da7(0x191)?_0x67aa08['id']:null,'configCode':requireResponseString(_0x67aa08[_0x333da7(0x15d)],'configCode',_0x5c5a19),'configName':requireResponseString(_0x67aa08['configName'],_0x333da7(0x163),_0x5c5a19),'channelType':requireResponseString(_0x67aa08['channelType'],_0x333da7(0x14c),_0x5c5a19),'description':normalizeNullableString(_0x67aa08[_0x333da7(0x1a8)]),'createTime':normalizeNullableString(_0x67aa08[_0x333da7(0x1b3)]),'updateTime':normalizeNullableString(_0x67aa08[_0x333da7(0x156)])};}export function normalizeExactNotificationConfig(_0x31d767,_0xca975d,_0x455e82){const _0x30612c=a196_0x31ae33;if(!Number[_0x30612c(0x167)](_0x31d767['id'])||_0x31d767['id']!==_0xca975d)throw notificationError(_0x30612c(0x14f),_0x30612c(0x157)+_0xca975d+'.');if(_0x31d767[_0x30612c(0x194)]!==_0x455e82)throw notificationError('notification_config_response_invalid',_0x30612c(0x18b)+_0xca975d+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x19b8dd=requireExactString(_0x31d767[_0x30612c(0x163)],'configName',_0xca975d),_0x4516f9=requireExactString(_0x31d767[_0x30612c(0x15d)],_0x30612c(0x15d),_0xca975d),_0x57a2f0=requireExactString(_0x31d767['channelType'],'channelType',_0xca975d);if(!NOTIFICATION_CHANNEL_TYPES[_0x30612c(0x1bf)](_0x57a2f0))throw notificationError(_0x30612c(0x14f),_0x30612c(0x18b)+_0xca975d+_0x30612c(0x14e));const _0x2a4e80=responseNullableString(_0x31d767['endpointUrl'],_0x30612c(0x15b),_0xca975d),_0xdd5145=responseNullableString(_0x31d767[_0x30612c(0x1c2)],_0x30612c(0x1c2),_0xca975d),_0x217ad3=responseNullableString(_0x31d767[_0x30612c(0x1a8)],'description',_0xca975d),_0x1c8e5c=responseNullableTimeout(_0x31d767['connectTimeout'],'connectTimeout',_0xca975d),_0x213d32=responseNullableTimeout(_0x31d767[_0x30612c(0x185)],_0x30612c(0x185),_0xca975d);return{'id':_0xca975d,'appCode':_0x455e82,'configCode':_0x4516f9,'configName':_0x19b8dd,'channelType':_0x57a2f0,'endpointUrl':redactSensitive(_0x2a4e80),'channelConfig':redactSensitive(_0xdd5145),'description':_0x217ad3,'connectTimeout':_0x1c8e5c,'readTimeout':_0x213d32,'endpointUrlRaw':_0x2a4e80,'channelConfigRaw':_0xdd5145};}export async function requireExactNotificationConfig(_0x580f65,_0x247609,_0x26a7ef){const _0x32f06d=a196_0x31ae33;let _0xff1627;try{_0xff1627=await getNotificationChannelConfig(_0x247609,_0x580f65);}catch{throw safeApiFailure(_0x26a7ef,_0x32f06d(0x1a2),'Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x580f65+_0x32f06d(0x151));}return normalizeExactNotificationConfig(_0xff1627,_0x247609,_0x580f65);}export function projectNotificationConfig(_0x1e9ef5){const _0x25a916=a196_0x31ae33;return{'id':_0x1e9ef5['id']??null,'appCode':_0x1e9ef5['appCode'],'configCode':_0x1e9ef5[_0x25a916(0x15d)]??null,'configName':_0x1e9ef5['configName'],'channelType':_0x1e9ef5[_0x25a916(0x14c)],'endpointUrl':redactSensitive(_0x1e9ef5[_0x25a916(0x15b)]),'channelConfig':redactSensitive(_0x1e9ef5[_0x25a916(0x1c2)]),'description':_0x1e9ef5[_0x25a916(0x1a8)]??null,'connectTimeout':_0x1e9ef5['connectTimeout']??null,'readTimeout':_0x1e9ef5[_0x25a916(0x185)]??null};}export function notificationSelector(_0x5f13d2){const _0x1f7cca=a196_0x31ae33;return{'appCode':_0x5f13d2[_0x1f7cca(0x194)],'id':_0x5f13d2['id'],'configCode':_0x5f13d2[_0x1f7cca(0x15d)],'configName':_0x5f13d2[_0x1f7cca(0x163)],'channelType':_0x5f13d2[_0x1f7cca(0x14c)]};}export function createMutationInput(_0x2c2dd5,_0x4c42fd){const _0x5aee6b=a196_0x31ae33;return{'appCode':_0x2c2dd5,'configName':_0x4c42fd[_0x5aee6b(0x163)],'channelType':_0x4c42fd['channelType'],...hasOwn(_0x4c42fd,_0x5aee6b(0x15b))?{'endpointUrl':_0x4c42fd[_0x5aee6b(0x15b)]}:{},...hasOwn(_0x4c42fd,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x4c42fd[_0x5aee6b(0x1c2)])}:{},...hasOwn(_0x4c42fd,_0x5aee6b(0x1a8))?{'description':_0x4c42fd[_0x5aee6b(0x1a8)]}:{},...hasOwn(_0x4c42fd,'connectTimeout')?{'connectTimeout':_0x4c42fd[_0x5aee6b(0x1cb)]}:{},...hasOwn(_0x4c42fd,_0x5aee6b(0x185))?{'readTimeout':_0x4c42fd[_0x5aee6b(0x185)]}:{}};}export function mergeUpdateInput(_0xe5833a,_0x55ac4f){const _0x48b229=a196_0x31ae33;return{'id':_0xe5833a['id'],'appCode':_0xe5833a['appCode'],'configName':_0x55ac4f[_0x48b229(0x163)]??_0xe5833a[_0x48b229(0x163)],'channelType':_0x55ac4f[_0x48b229(0x14c)]??_0xe5833a[_0x48b229(0x14c)],'endpointUrl':hasOwn(_0x55ac4f,_0x48b229(0x15b))?_0x55ac4f[_0x48b229(0x15b)]:_0xe5833a[_0x48b229(0x159)],'channelConfig':hasOwn(_0x55ac4f,_0x48b229(0x1c2))?serializeChannelConfig(_0x55ac4f[_0x48b229(0x1c2)]):_0xe5833a[_0x48b229(0x189)],'description':hasOwn(_0x55ac4f,_0x48b229(0x1a8))?_0x55ac4f[_0x48b229(0x1a8)]:_0xe5833a['description'],'connectTimeout':hasOwn(_0x55ac4f,_0x48b229(0x1cb))?_0x55ac4f[_0x48b229(0x1cb)]:_0xe5833a[_0x48b229(0x1cb)],'readTimeout':hasOwn(_0x55ac4f,_0x48b229(0x185))?_0x55ac4f[_0x48b229(0x185)]:_0xe5833a[_0x48b229(0x185)]};}export function plannedUpdateProjection(_0x5b9818,_0x24fb33){const _0x2628e8=a196_0x31ae33;return projectNotificationConfig({'id':_0x5b9818['id'],'appCode':_0x5b9818[_0x2628e8(0x194)],'configCode':_0x5b9818[_0x2628e8(0x15d)],'configName':_0x24fb33[_0x2628e8(0x163)]??_0x5b9818['configName'],'channelType':_0x24fb33['channelType']??_0x5b9818['channelType'],'endpointUrl':hasOwn(_0x24fb33,_0x2628e8(0x15b))?_0x24fb33[_0x2628e8(0x15b)]:_0x5b9818[_0x2628e8(0x159)],'channelConfig':hasOwn(_0x24fb33,_0x2628e8(0x1c2))?_0x24fb33[_0x2628e8(0x1c2)]:_0x5b9818[_0x2628e8(0x189)],'description':hasOwn(_0x24fb33,_0x2628e8(0x1a8))?_0x24fb33[_0x2628e8(0x1a8)]:_0x5b9818[_0x2628e8(0x1a8)],'connectTimeout':hasOwn(_0x24fb33,'connectTimeout')?_0x24fb33['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x5b9818[_0x2628e8(0x1cb)],'readTimeout':hasOwn(_0x24fb33,_0x2628e8(0x185))?_0x24fb33[_0x2628e8(0x185)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x5b9818[_0x2628e8(0x185)]});}function a196_0xcda8(_0x5a454e,_0x335f31){_0x5a454e=_0x5a454e-0x149;const _0x36407b=a196_0x3640();let _0xcda806=_0x36407b[_0x5a454e];return _0xcda806;}export function requestedSafeFieldsMatch(_0xe391dc,_0x41b3f7,_0x473c12){const _0x2eaf4f=a196_0x31ae33,_0x155637=[],_0x2483f9=[],_0x4bfbf9=[];for(const _0x2b2716 of['configName',_0x2eaf4f(0x14c),_0x2eaf4f(0x1a8)]){if(!hasOwn(_0x473c12,_0x2b2716))continue;_0x4bfbf9[_0x2eaf4f(0x178)](_0x2b2716),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x2b2716]===_0x473c12[_0x2b2716]),_0x2483f9[_0x2eaf4f(0x178)](_0xe391dc[_0x2b2716]!==_0x473c12[_0x2b2716]&&_0x41b3f7[_0x2b2716]===_0x473c12[_0x2b2716]);}for(const _0x3ffa7b of[_0x2eaf4f(0x1cb),_0x2eaf4f(0x185)]){if(!hasOwn(_0x473c12,_0x3ffa7b))continue;const _0x1ea7f9=_0x473c12[_0x3ffa7b]??(_0x3ffa7b==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4bfbf9[_0x2eaf4f(0x178)](_0x3ffa7b),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x3ffa7b]===_0x1ea7f9),_0x2483f9['push'](_0xe391dc[_0x3ffa7b]!==_0x1ea7f9&&_0x41b3f7[_0x3ffa7b]===_0x1ea7f9);}return hasOwn(_0x473c12,_0x2eaf4f(0x15b))&&_0x473c12['endpointUrl']===null&&(_0x4bfbf9['push']('endpointUrl:null'),_0x155637[_0x2eaf4f(0x178)](_0x41b3f7[_0x2eaf4f(0x159)]===null||_0x41b3f7[_0x2eaf4f(0x159)]===''),_0x2483f9[_0x2eaf4f(0x178)](_0xe391dc['endpointUrlRaw']!==null&&_0xe391dc[_0x2eaf4f(0x159)]!==''&&(_0x41b3f7['endpointUrlRaw']===null||_0x41b3f7['endpointUrlRaw']===''))),{'allMatch':_0x155637[_0x2eaf4f(0x1be)](Boolean),'provesChange':_0x2483f9[_0x2eaf4f(0x1b7)](Boolean),'verifiedFields':_0x4bfbf9};}export function validateNotificationDeleteReadback(_0x38c507,_0x55e06f,_0x29781b){const _0x2de69a=a196_0x31ae33;for(const [_0x188687,_0x2a2ea6]of _0x38c507[_0x2de69a(0x1ab)]()){if(!Number[_0x2de69a(0x167)](_0x2a2ea6['id'])||_0x2a2ea6['id']<=0x0)throw notificationError(_0x2de69a(0x14f),'Notification\x20config\x20list\x20item\x20'+(_0x188687+0x1)+_0x2de69a(0x15a));if(_0x2a2ea6[_0x2de69a(0x194)]!==_0x55e06f)throw notificationError(_0x2de69a(0x14f),'Notification\x20config\x20list\x20item\x20'+(_0x188687+0x1)+_0x2de69a(0x173));if(_0x2a2ea6[_0x2de69a(0x14c)]!==_0x29781b)throw notificationError(_0x2de69a(0x14f),_0x2de69a(0x19f)+(_0x188687+0x1)+_0x2de69a(0x192));}}export function safeApiFailure(_0x588bc6,_0x5a9f38,_0x31a075){const _0x58444c=a196_0x31ae33;return notificationError(_0x58444c(0x168)+_0x588bc6+'_'+(_0x5a9f38===_0x58444c(0x195)?'failed':_0x5a9f38+_0x58444c(0x15e)),_0x58444c(0x18b)+_0x588bc6+'\x20'+_0x5a9f38+_0x58444c(0x193),_0x31a075);}export function notificationLookupCommand(_0x338a3e,_0x28cf31){const _0x243a65=a196_0x31ae33;return _0x243a65(0x187)+_0x338a3e+_0x243a65(0x1af)+_0x28cf31+_0x243a65(0x155);}function validateNotificationDocument(_0x2e1c00,_0x2ed014){const _0x199260=a196_0x31ae33;for(const _0xd69e73 of Object[_0x199260(0x170)](_0x2e1c00)){if(FORBIDDEN_IDENTITY_FIELDS[_0x199260(0x150)](_0xd69e73))throw notificationError(_0x199260(0x1ac),_0x199260(0x1b2)+_0xd69e73+_0x199260(0x152));if(!ALLOWED_INPUT_FIELDS['has'](_0xd69e73))throw notificationError(_0x199260(0x15f),_0x199260(0x176)+_0xd69e73+'\x22.');}if(_0x2ed014===_0x199260(0x1a9)&&Object[_0x199260(0x170)](_0x2e1c00)['length']===0x0)throw notificationError(_0x199260(0x177),_0x199260(0x183));const _0x1b28a0={};if(hasOwn(_0x2e1c00,_0x199260(0x163)))_0x1b28a0[_0x199260(0x163)]=validateRequiredString(_0x2e1c00[_0x199260(0x163)],_0x199260(0x163),0x80);else{if(_0x2ed014==='create')throw notificationError(_0x199260(0x16e),_0x199260(0x1bd)+_0x199260(0x175));}if(hasOwn(_0x2e1c00,_0x199260(0x14c))){if(typeof _0x2e1c00[_0x199260(0x14c)]!==_0x199260(0x19a))throw invalidFieldType('channelType',_0x199260(0x162));const _0x23bf4d=_0x2e1c00[_0x199260(0x14c)][_0x199260(0x190)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x23bf4d))throw notificationError(_0x199260(0x1b9),_0x199260(0x16b),_0x199260(0x1a7)+NOTIFICATION_CHANNEL_TYPES[_0x199260(0x172)](',\x20')+'.');_0x1b28a0[_0x199260(0x14c)]=_0x23bf4d;}else{if(_0x2ed014===_0x199260(0x188))throw notificationError(_0x199260(0x16e),_0x199260(0x1bd)+'\x22channelType\x22.');}for(const [_0x19fe0c,_0x22eb11]of[[_0x199260(0x15b),0x200],[_0x199260(0x1a8),0x100]]){if(!hasOwn(_0x2e1c00,_0x19fe0c))continue;const _0x38f83c=_0x2e1c00[_0x19fe0c];if(_0x38f83c!==null&&typeof _0x38f83c!==_0x199260(0x19a))throw invalidFieldType(_0x19fe0c,_0x199260(0x17f));if(typeof _0x38f83c===_0x199260(0x19a)&&_0x38f83c['length']>_0x22eb11)throw notificationError(_0x199260(0x1b9),'Notification\x20JSON\x20field\x20\x22'+_0x19fe0c+_0x199260(0x16f)+_0x22eb11+_0x199260(0x164));_0x1b28a0[_0x19fe0c]=_0x38f83c;}if(hasOwn(_0x2e1c00,_0x199260(0x1c2))){const _0x17d93e=_0x2e1c00[_0x199260(0x1c2)];if(_0x17d93e===null&&_0x2ed014==='create')throw invalidFieldType(_0x199260(0x1c2),'a\x20JSON\x20object');if(_0x17d93e!==null&&!isJsonObject(_0x17d93e))throw invalidFieldType(_0x199260(0x1c2),_0x2ed014===_0x199260(0x1a9)?'a\x20JSON\x20object\x20or\x20null':_0x199260(0x1cc));_0x17d93e!==null&&validateChannelConfigFields(_0x1b28a0['channelType'],_0x17d93e),_0x1b28a0[_0x199260(0x1c2)]=_0x17d93e;}for(const _0x58704e of[_0x199260(0x1cb),_0x199260(0x185)]){if(!hasOwn(_0x2e1c00,_0x58704e))continue;const _0x3c8211=_0x2e1c00[_0x58704e];if(_0x3c8211!==null&&(!Number[_0x199260(0x167)](_0x3c8211)||_0x3c8211<0x0))throw notificationError(_0x199260(0x1b9),_0x199260(0x1b2)+_0x58704e+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x1b28a0[_0x58704e]=_0x3c8211;}return _0x1b28a0;}function validateRequiredString(_0x3f58cf,_0xde4945,_0xc2f5a6){const _0x27b634=a196_0x31ae33;if(typeof _0x3f58cf!==_0x27b634(0x19a))throw invalidFieldType(_0xde4945,_0x27b634(0x166));const _0x17f641=_0x3f58cf[_0x27b634(0x190)]();if(!_0x17f641)throw notificationError(_0x27b634(0x1b9),_0x27b634(0x1b2)+_0xde4945+_0x27b634(0x16a));if(_0x17f641[_0x27b634(0x17a)]>_0xc2f5a6)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde4945+_0x27b634(0x16f)+_0xc2f5a6+_0x27b634(0x164));return _0x17f641;}function validateChannelConfigFields(_0x2aa7c5,_0x1c3191){const _0x2330fe=a196_0x31ae33;if(hasOwn(_0x1c3191,_0x2330fe(0x154)))throw forbiddenChannelConfigField(_0x2330fe(0x154));if(_0x2aa7c5===_0x2330fe(0x1a3))for(const _0x37e246 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x1c3191,_0x37e246))throw forbiddenChannelConfigField(_0x37e246);}}function forbiddenChannelConfigField(_0x24ca90){const _0x3572df=a196_0x31ae33;return notificationError('notification_config_channel_field_forbidden',_0x3572df(0x1b1)+_0x24ca90+_0x3572df(0x180));}function invalidFieldType(_0x394c4c,_0x245c94){const _0xdba886=a196_0x31ae33;return notificationError(_0xdba886(0x1b9),_0xdba886(0x1b2)+_0x394c4c+_0xdba886(0x15c)+_0x245c94+'.');}function serializeChannelConfig(_0x21c666){const _0x4d26ca=a196_0x31ae33;return _0x21c666===null||_0x21c666===undefined?null:JSON[_0x4d26ca(0x1a6)](_0x21c666);}function redactSensitive(_0x2df796){const _0x39e6b6=a196_0x31ae33;return _0x2df796===null||_0x2df796===undefined||_0x2df796===''?null:_0x39e6b6(0x19b);}function requireResponseString(_0x12778f,_0x40034d,_0xf4aaa5){const _0x418646=a196_0x31ae33;if(typeof _0x12778f!=='string'||_0x12778f[_0x418646(0x190)]()==='')throw CliErrors[_0x418646(0x1b4)](_0x418646(0x1c5),'Item\x20'+(_0xf4aaa5+0x1)+_0x418646(0x1c4)+_0x40034d+'\x22.');return _0x12778f[_0x418646(0x190)]();}function requireExactString(_0x37f740,_0x555b5e,_0x1ad26d){const _0x1fcd18=a196_0x31ae33;if(typeof _0x37f740!=='string'||_0x37f740[_0x1fcd18(0x190)]()==='')throw notificationError(_0x1fcd18(0x14f),'Notification\x20config\x20'+_0x1ad26d+_0x1fcd18(0x1c4)+_0x555b5e+'\x22.');return _0x37f740[_0x1fcd18(0x190)]();}function responseNullableString(_0xf5dc02,_0x20a5c5,_0x56d281){const _0xe30d6e=a196_0x31ae33;if(_0xf5dc02===undefined||_0xf5dc02===null)return null;if(typeof _0xf5dc02!=='string')throw notificationError(_0xe30d6e(0x14f),_0xe30d6e(0x18b)+_0x56d281+_0xe30d6e(0x19c)+_0x20a5c5+'\x22.');return _0xf5dc02;}function responseNullableTimeout(_0x3d10a1,_0x2b11b6,_0x4ccaa8){const _0x383981=a196_0x31ae33;if(_0x3d10a1===undefined||_0x3d10a1===null)return null;if(!Number['isSafeInteger'](_0x3d10a1)||_0x3d10a1<0x0)throw notificationError('notification_config_response_invalid',_0x383981(0x18b)+_0x4ccaa8+'\x20has\x20invalid\x20field\x20\x22'+_0x2b11b6+'\x22.');return _0x3d10a1;}function normalizeNullableString(_0x6d003c){const _0xcad256=a196_0x31ae33;return typeof _0x6d003c===_0xcad256(0x19a)?_0x6d003c:null;}function a196_0x3640(){const _0x5792bd=['hasOwnProperty','\x20has\x20an\x20unsupported\x20channelType.','notification_config_response_invalid','has','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','messageTemplate','\x20--format\x20compress','updateTime','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','endpointUrlRaw','\x20has\x20an\x20invalid\x20id.','endpointUrl','\x22\x20must\x20be\x20','configCode','_unavailable','notification_config_field_unknown','from-env','WEBHOOK','a\x20supported\x20string','configName','\x20characters.','replyTo','a\x20non-empty\x20string','isSafeInteger','notification_config_','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','90556XxVnWi','file','notification_config_field_required','\x22\x20cannot\x20exceed\x20','keys','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','join','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','\x22configName\x22.','Unknown\x20notification\x20JSON\x20field\x20\x22','notification_config_update_empty','push','114bCsgLA','length','fromName','utf8','isArray','type','a\x20string\x20or\x20null','\x22\x20is\x20forbidden.','notification_config_json_invalid','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','readTimeout','validation','rabetbase\x20notification\x20config-list\x20--appcode\x20','create','channelConfigRaw','path','Notification\x20config\x20','emailTargets','2220040PpVTMO','name','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','trim','number','\x20has\x20an\x20invalid\x20channelType.','\x20failed.','appCode','mutation','notification_config_id_invalid','\x20is\x20invalid.','18373399PpIbZG','Missing\x20notification\x20JSON\x20source.','string','<redacted>','\x20has\x20invalid\x20field\x20\x22','dry-run','36DzstQc','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20from\x20','1611GvYJCc','preflight','EMAIL','Application-level\x20notification\x20config\x20ID','kind','stringify','Allowed\x20values:\x20','description','update','prototype','entries','notification_config_field_forbidden','34952KXCdlx','18rPOfHk','\x20--type\x20','281337XQaWhb','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Notification\x20JSON\x20field\x20\x22','createTime','apiError','boolean','environment\x20variable\x20','some','str','notification_config_field_invalid','Notification\x20JSON\x20source\x20is\x20ambiguous.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','3965UqLodZ','Create\x20JSON\x20requires\x20field\x20','every','includes','Invalid\x20--','call','channelConfig','stdin','\x20is\x20missing\x20required\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','env','2836150qjRfQD','bool','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','file\x20','connectTimeout','a\x20JSON\x20object','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','notification_config_source_unavailable','num','DINGTALK','channelType'];a196_0x3640=function(){return _0x5792bd;};return a196_0x3640();}function isJsonObject(_0x1d188c){const _0x46eb85=a196_0x31ae33;return _0x1d188c!==null&&typeof _0x1d188c==='object'&&!Array[_0x46eb85(0x17d)](_0x1d188c);}function hasOwn(_0x1df4dd,_0x1b941c){const _0xcd2e35=a196_0x31ae33;return Object[_0xcd2e35(0x1aa)][_0xcd2e35(0x14d)][_0xcd2e35(0x1c1)](_0x1df4dd,_0x1b941c);}async function readStdin(){const _0x2f27a7=a196_0x31ae33;let _0x1ccf9e='';process[_0x2f27a7(0x1c3)]['setEncoding']('utf8');for await(const _0x247212 of process[_0x2f27a7(0x1c3)])_0x1ccf9e+=_0x247212;return _0x1ccf9e;}
|
|
1
|
+
const a197_0x5297c2=a197_0x28ce;(function(_0xfc9d69,_0x82ba3a){const _0x5d5f66=a197_0x28ce,_0x1abee8=_0xfc9d69();while(!![]){try{const _0x33eece=-parseInt(_0x5d5f66(0x226))/0x1*(-parseInt(_0x5d5f66(0x1f1))/0x2)+-parseInt(_0x5d5f66(0x20d))/0x3*(parseInt(_0x5d5f66(0x200))/0x4)+-parseInt(_0x5d5f66(0x1c4))/0x5*(parseInt(_0x5d5f66(0x1df))/0x6)+parseInt(_0x5d5f66(0x237))/0x7+-parseInt(_0x5d5f66(0x1c8))/0x8+parseInt(_0x5d5f66(0x21f))/0x9+parseInt(_0x5d5f66(0x236))/0xa;if(_0x33eece===_0x82ba3a)break;else _0x1abee8['push'](_0x1abee8['shift']());}catch(_0x1c4444){_0x1abee8['push'](_0x1abee8['shift']());}}}(a197_0x1773,0x4deb8));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';function a197_0x1773(){const _0x50ea2c=['notification_config_','Invalid\x20notification\x20config\x20response.','endpointUrlRaw','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','a\x20JSON\x20object\x20or\x20null','notification_config_json_invalid','\x20--format\x20compress','parse','\x22\x20cannot\x20exceed\x20','\x22configName\x22.','subjectPrefix','endpointUrl','channelConfig','notification_config_update_empty','WECOM','2XUDjhg','create','notification_config_response_invalid','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Application-level\x20notification\x20config\x20ID','configName','kind','from-env','a\x20supported\x20string','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','number','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','setEncoding','trim','196216SigkIs','length','update','utf8','join','channelConfigRaw','apiError','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','bool','\x20failed.','Invalid\x20--','str','18PFBnrv','notification_config_source_unavailable','configCode','Create\x20JSON\x20requires\x20field\x20','boolean','environment\x20variable\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','push','Item\x20','messageTemplate','\x20has\x20an\x20invalid\x20channelType.','replyTo','isSafeInteger','mutation','a\x20JSON\x20object','\x20is\x20missing\x20required\x20field\x20\x22','1440855RbyifI','ccList','EMAIL','has','\x20characters.','Unknown\x20notification\x20JSON\x20field\x20\x22','stringify','342569gEVREe','a\x20string\x20or\x20null','notification_config_field_unknown','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20--type\x20','path','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Allowed\x20values:\x20','stdin','includes','connectTimeout','FEISHU','notification_config_field_invalid','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Notification\x20JSON\x20from\x20','1862890lHUhtv','3842902BDZCxH','notification_config_confirmation_required','notification_config_id_invalid','file\x20','a\x20non-empty\x20string','description','Notification\x20config\x20','keys','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','\x20has\x20invalid\x20field\x20\x22','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x22\x20is\x20forbidden.','5SHJREU','prototype','channelCode','rabetbase\x20notification\x20config-list\x20--appcode\x20','436128vodnXh','\x20is\x20invalid.','hasOwnProperty','WEBHOOK','failed','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','file','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','string','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','dry-run','channelType','env','call','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','recipients','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','validation','updateTime','name','endpointUrl:null','readTimeout','3419634NELCqg'];a197_0x1773=function(){return _0x50ea2c;};return a197_0x1773();}import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x5297c2(0x221),a197_0x5297c2(0x231),'DINGTALK',a197_0x5297c2(0x1f0),a197_0x5297c2(0x1cb)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x5297c2(0x1f7),'channelType',a197_0x5297c2(0x1ed),'channelConfig',a197_0x5297c2(0x23c),a197_0x5297c2(0x230),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x5297c2(0x1f4),a197_0x5297c2(0x20f),a197_0x5297c2(0x1c6)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x5297c2(0x1d8),a197_0x5297c2(0x220),'bccList',a197_0x5297c2(0x21a),a197_0x5297c2(0x1ec),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x5297c2(0x1ce),'type':a197_0x5297c2(0x1d1),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a197_0x5297c2(0x22e),'type':a197_0x5297c2(0x211),'required':![],'default':![],'description':a197_0x5297c2(0x234)},{'name':'from-env','type':a197_0x5297c2(0x1d1),'required':![],'description':a197_0x5297c2(0x1cd)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x5297c2(0x1fc),'required':!![],'description':a197_0x5297c2(0x1f6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3cf4d8,_0x270d7f,_0x41e511){return new CliError(_0x3cf4d8,0x1,_0x270d7f,_0x41e511);}export function readNotificationId(_0x1a6e16){const _0x30ebf6=a197_0x5297c2,_0x1248f9=_0x1a6e16['num']('id');if(!Number['isSafeInteger'](_0x1248f9)||_0x1248f9<=0x0)throw notificationError(_0x30ebf6(0x239),_0x30ebf6(0x213));return _0x1248f9;}export function requireNotificationExplicitYes(_0x40ebde){const _0x554030=a197_0x5297c2;if(_0x40ebde[_0x554030(0x209)](_0x554030(0x1d3))||_0x40ebde[_0x554030(0x209)]('yes'))return;throw notificationError(_0x554030(0x238),_0x554030(0x1fd),_0x554030(0x1f5));}export function readNotificationChannelType(_0x1f13f9,_0x557f4='type',_0x116d66='EMAIL'){const _0x262ae0=a197_0x5297c2,_0x538578=_0x1f13f9[_0x262ae0(0x20c)](_0x557f4)[_0x262ae0(0x1ff)]()||_0x116d66;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x538578))throw CliErrors[_0x262ae0(0x1da)](_0x262ae0(0x20b)+_0x557f4+':\x20'+_0x538578,_0x262ae0(0x22d)+NOTIFICATION_CHANNEL_TYPES[_0x262ae0(0x204)](',\x20')+'.');return _0x538578;}export function assertSingleNotificationSource(_0x43ff54){const _0x5434e2=a197_0x5297c2,_0x2c5ee4=[],_0x11879f=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1ce))[_0x5434e2(0x1ff)]();if(_0x11879f)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1ce),'path':_0x11879f});if(_0x43ff54[_0x5434e2(0x209)](_0x5434e2(0x22e)))_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x22e)});const _0xfca172=_0x43ff54[_0x5434e2(0x20c)](_0x5434e2(0x1f9))['trim']();if(_0xfca172)_0x2c5ee4[_0x5434e2(0x216)]({'kind':_0x5434e2(0x1d5),'name':_0xfca172});if(_0x2c5ee4[_0x5434e2(0x201)]===0x0)throw CliErrors[_0x5434e2(0x1da)]('Missing\x20notification\x20JSON\x20source.',_0x5434e2(0x207));if(_0x2c5ee4['length']>0x1)throw CliErrors[_0x5434e2(0x1da)](_0x5434e2(0x23f),_0x5434e2(0x207));return _0x2c5ee4[0x0];}export async function readNotificationDocument(_0x3f2692,_0x5ab45e){const _0x23d927=a197_0x5297c2,_0x180dc4=assertSingleNotificationSource(_0x3f2692),_0x39c7fe=_0x180dc4['kind']==='file'?_0x23d927(0x23a)+_0x180dc4[_0x23d927(0x22b)]:_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1d5)?_0x23d927(0x212)+_0x180dc4[_0x23d927(0x1dc)]:_0x23d927(0x22e);let _0x153aa2;try{if(_0x180dc4[_0x23d927(0x1f8)]===_0x23d927(0x1ce))_0x153aa2=await readFile(_0x180dc4['path'],'utf8');else{if(_0x180dc4['kind']===_0x23d927(0x1d5)){if(!(_0x180dc4[_0x23d927(0x1dc)]in process.env))throw notificationError(_0x23d927(0x20e),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x180dc4['name']);_0x153aa2=process.env[_0x180dc4.name]??'';}else _0x153aa2=await readStdin();}}catch(_0x463678){if(_0x463678 instanceof CliError)throw _0x463678;throw notificationError(_0x23d927(0x20e),_0x23d927(0x1c2)+_0x39c7fe+'.');}let _0x379f9c;try{_0x379f9c=JSON[_0x23d927(0x1e9)](_0x153aa2);}catch{throw notificationError('notification_config_json_invalid',_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x1c9),_0x23d927(0x233));}if(!isJsonObject(_0x379f9c))throw notificationError(_0x23d927(0x1e7),_0x23d927(0x235)+_0x39c7fe+_0x23d927(0x215));return validateNotificationDocument(_0x379f9c,_0x5ab45e);}export function projectNotificationListConfig(_0x1e1d95,_0x1b7378){const _0x41c96d=a197_0x5297c2;return{'id':typeof _0x1e1d95['id']===_0x41c96d(0x1fc)?_0x1e1d95['id']:null,'configCode':requireResponseString(_0x1e1d95[_0x41c96d(0x20f)],'configCode',_0x1b7378),'configName':requireResponseString(_0x1e1d95[_0x41c96d(0x1f7)],'configName',_0x1b7378),'channelType':requireResponseString(_0x1e1d95[_0x41c96d(0x1d4)],'channelType',_0x1b7378),'description':normalizeNullableString(_0x1e1d95['description']),'createTime':normalizeNullableString(_0x1e1d95['createTime']),'updateTime':normalizeNullableString(_0x1e1d95[_0x41c96d(0x1db)])};}export function normalizeExactNotificationConfig(_0x10be21,_0x37e1ae,_0x577e93){const _0x51affe=a197_0x5297c2;if(!Number[_0x51affe(0x21b)](_0x10be21['id'])||_0x10be21['id']!==_0x37e1ae)throw notificationError(_0x51affe(0x1f3),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x37e1ae+'.');if(_0x10be21['appCode']!==_0x577e93)throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+_0x51affe(0x1d9));const _0x39f964=requireExactString(_0x10be21['configName'],_0x51affe(0x1f7),_0x37e1ae),_0x202e90=requireExactString(_0x10be21[_0x51affe(0x20f)],_0x51affe(0x20f),_0x37e1ae),_0x40da44=requireExactString(_0x10be21[_0x51affe(0x1d4)],_0x51affe(0x1d4),_0x37e1ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x51affe(0x22f)](_0x40da44))throw notificationError(_0x51affe(0x1f3),_0x51affe(0x23d)+_0x37e1ae+'\x20has\x20an\x20unsupported\x20channelType.');const _0x109121=responseNullableString(_0x10be21[_0x51affe(0x1ed)],_0x51affe(0x1ed),_0x37e1ae),_0x3e1354=responseNullableString(_0x10be21[_0x51affe(0x1ee)],_0x51affe(0x1ee),_0x37e1ae),_0x4970cd=responseNullableString(_0x10be21['description'],_0x51affe(0x23c),_0x37e1ae),_0x476274=responseNullableTimeout(_0x10be21['connectTimeout'],'connectTimeout',_0x37e1ae),_0x99a58e=responseNullableTimeout(_0x10be21[_0x51affe(0x1de)],_0x51affe(0x1de),_0x37e1ae);return{'id':_0x37e1ae,'appCode':_0x577e93,'configCode':_0x202e90,'configName':_0x39f964,'channelType':_0x40da44,'endpointUrl':redactSensitive(_0x109121),'channelConfig':redactSensitive(_0x3e1354),'description':_0x4970cd,'connectTimeout':_0x476274,'readTimeout':_0x99a58e,'endpointUrlRaw':_0x109121,'channelConfigRaw':_0x3e1354};}export async function requireExactNotificationConfig(_0x386962,_0x2e1f92,_0x22ab9d){const _0x3e91f7=a197_0x5297c2;let _0x547dec;try{_0x547dec=await getNotificationChannelConfig(_0x2e1f92,_0x386962);}catch{throw safeApiFailure(_0x22ab9d,'preflight',_0x3e91f7(0x1d7)+_0x386962+_0x3e91f7(0x229));}return normalizeExactNotificationConfig(_0x547dec,_0x2e1f92,_0x386962);}export function projectNotificationConfig(_0x21298c){const _0x51cb61=a197_0x5297c2;return{'id':_0x21298c['id']??null,'appCode':_0x21298c['appCode'],'configCode':_0x21298c[_0x51cb61(0x20f)]??null,'configName':_0x21298c['configName'],'channelType':_0x21298c[_0x51cb61(0x1d4)],'endpointUrl':redactSensitive(_0x21298c['endpointUrl']),'channelConfig':redactSensitive(_0x21298c[_0x51cb61(0x1ee)]),'description':_0x21298c['description']??null,'connectTimeout':_0x21298c[_0x51cb61(0x230)]??null,'readTimeout':_0x21298c['readTimeout']??null};}export function notificationSelector(_0x4471f3){const _0x242055=a197_0x5297c2;return{'appCode':_0x4471f3[_0x242055(0x1f4)],'id':_0x4471f3['id'],'configCode':_0x4471f3[_0x242055(0x20f)],'configName':_0x4471f3[_0x242055(0x1f7)],'channelType':_0x4471f3['channelType']};}export function createMutationInput(_0x152a5c,_0x283bbd){const _0x497bf7=a197_0x5297c2;return{'appCode':_0x152a5c,'configName':_0x283bbd[_0x497bf7(0x1f7)],'channelType':_0x283bbd[_0x497bf7(0x1d4)],...hasOwn(_0x283bbd,_0x497bf7(0x1ed))?{'endpointUrl':_0x283bbd[_0x497bf7(0x1ed)]}:{},...hasOwn(_0x283bbd,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x283bbd['channelConfig'])}:{},...hasOwn(_0x283bbd,'description')?{'description':_0x283bbd[_0x497bf7(0x23c)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x230))?{'connectTimeout':_0x283bbd[_0x497bf7(0x230)]}:{},...hasOwn(_0x283bbd,_0x497bf7(0x1de))?{'readTimeout':_0x283bbd[_0x497bf7(0x1de)]}:{}};}export function mergeUpdateInput(_0x54ed2d,_0x4b0a51){const _0x40b213=a197_0x5297c2;return{'id':_0x54ed2d['id'],'appCode':_0x54ed2d['appCode'],'configName':_0x4b0a51[_0x40b213(0x1f7)]??_0x54ed2d[_0x40b213(0x1f7)],'channelType':_0x4b0a51[_0x40b213(0x1d4)]??_0x54ed2d[_0x40b213(0x1d4)],'endpointUrl':hasOwn(_0x4b0a51,'endpointUrl')?_0x4b0a51[_0x40b213(0x1ed)]:_0x54ed2d[_0x40b213(0x1e2)],'channelConfig':hasOwn(_0x4b0a51,_0x40b213(0x1ee))?serializeChannelConfig(_0x4b0a51[_0x40b213(0x1ee)]):_0x54ed2d[_0x40b213(0x205)],'description':hasOwn(_0x4b0a51,'description')?_0x4b0a51['description']:_0x54ed2d[_0x40b213(0x23c)],'connectTimeout':hasOwn(_0x4b0a51,'connectTimeout')?_0x4b0a51[_0x40b213(0x230)]:_0x54ed2d['connectTimeout'],'readTimeout':hasOwn(_0x4b0a51,_0x40b213(0x1de))?_0x4b0a51[_0x40b213(0x1de)]:_0x54ed2d['readTimeout']};}export function plannedUpdateProjection(_0x37fb6f,_0x5ab2d4){const _0x40b25e=a197_0x5297c2;return projectNotificationConfig({'id':_0x37fb6f['id'],'appCode':_0x37fb6f['appCode'],'configCode':_0x37fb6f[_0x40b25e(0x20f)],'configName':_0x5ab2d4[_0x40b25e(0x1f7)]??_0x37fb6f['configName'],'channelType':_0x5ab2d4[_0x40b25e(0x1d4)]??_0x37fb6f[_0x40b25e(0x1d4)],'endpointUrl':hasOwn(_0x5ab2d4,_0x40b25e(0x1ed))?_0x5ab2d4['endpointUrl']:_0x37fb6f['endpointUrlRaw'],'channelConfig':hasOwn(_0x5ab2d4,_0x40b25e(0x1ee))?_0x5ab2d4[_0x40b25e(0x1ee)]:_0x37fb6f[_0x40b25e(0x205)],'description':hasOwn(_0x5ab2d4,_0x40b25e(0x23c))?_0x5ab2d4['description']:_0x37fb6f[_0x40b25e(0x23c)],'connectTimeout':hasOwn(_0x5ab2d4,'connectTimeout')?_0x5ab2d4[_0x40b25e(0x230)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x37fb6f[_0x40b25e(0x230)],'readTimeout':hasOwn(_0x5ab2d4,_0x40b25e(0x1de))?_0x5ab2d4['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x37fb6f[_0x40b25e(0x1de)]});}export function requestedSafeFieldsMatch(_0x3c7fc9,_0x1bb0e7,_0x9093d8){const _0x125a33=a197_0x5297c2,_0x3d0aff=[],_0x4f7dfd=[],_0x2e0032=[];for(const _0x6aae65 of[_0x125a33(0x1f7),_0x125a33(0x1d4),_0x125a33(0x23c)]){if(!hasOwn(_0x9093d8,_0x6aae65))continue;_0x2e0032[_0x125a33(0x216)](_0x6aae65),_0x3d0aff['push'](_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]),_0x4f7dfd['push'](_0x3c7fc9[_0x6aae65]!==_0x9093d8[_0x6aae65]&&_0x1bb0e7[_0x6aae65]===_0x9093d8[_0x6aae65]);}for(const _0x463e32 of[_0x125a33(0x230),_0x125a33(0x1de)]){if(!hasOwn(_0x9093d8,_0x463e32))continue;const _0x36a388=_0x9093d8[_0x463e32]??(_0x463e32==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2e0032[_0x125a33(0x216)](_0x463e32),_0x3d0aff[_0x125a33(0x216)](_0x1bb0e7[_0x463e32]===_0x36a388),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9[_0x463e32]!==_0x36a388&&_0x1bb0e7[_0x463e32]===_0x36a388);}return hasOwn(_0x9093d8,_0x125a33(0x1ed))&&_0x9093d8[_0x125a33(0x1ed)]===null&&(_0x2e0032[_0x125a33(0x216)](_0x125a33(0x1dd)),_0x3d0aff['push'](_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''),_0x4f7dfd[_0x125a33(0x216)](_0x3c7fc9['endpointUrlRaw']!==null&&_0x3c7fc9[_0x125a33(0x1e2)]!==''&&(_0x1bb0e7['endpointUrlRaw']===null||_0x1bb0e7[_0x125a33(0x1e2)]===''))),{'allMatch':_0x3d0aff['every'](Boolean),'provesChange':_0x4f7dfd['some'](Boolean),'verifiedFields':_0x2e0032};}export function validateNotificationDeleteReadback(_0x41f475,_0x58f23c,_0x4556aa){const _0x2900ae=a197_0x5297c2;for(const [_0x5a5251,_0xd88e57]of _0x41f475['entries']()){if(!Number[_0x2900ae(0x21b)](_0xd88e57['id'])||_0xd88e57['id']<=0x0)throw notificationError(_0x2900ae(0x1f3),'Notification\x20config\x20list\x20item\x20'+(_0x5a5251+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0xd88e57[_0x2900ae(0x1f4)]!==_0x58f23c)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x214));if(_0xd88e57[_0x2900ae(0x1d4)]!==_0x4556aa)throw notificationError(_0x2900ae(0x1f3),_0x2900ae(0x1d0)+(_0x5a5251+0x1)+_0x2900ae(0x219));}}export function safeApiFailure(_0x464247,_0x33fbb6,_0x48cd0e){const _0x432f5e=a197_0x5297c2;return notificationError(_0x432f5e(0x1e0)+_0x464247+'_'+(_0x33fbb6===_0x432f5e(0x21c)?_0x432f5e(0x1cc):_0x33fbb6+'_unavailable'),_0x432f5e(0x23d)+_0x464247+'\x20'+_0x33fbb6+_0x432f5e(0x20a),_0x48cd0e);}export function notificationLookupCommand(_0x523335,_0x1a242b){const _0x21eaaa=a197_0x5297c2;return _0x21eaaa(0x1c7)+_0x523335+_0x21eaaa(0x22a)+_0x1a242b+_0x21eaaa(0x1e8);}function validateNotificationDocument(_0x5dd4eb,_0x5e5d1e){const _0x266ad6=a197_0x5297c2;for(const _0x1a26db of Object['keys'](_0x5dd4eb)){if(FORBIDDEN_IDENTITY_FIELDS[_0x266ad6(0x222)](_0x1a26db))throw notificationError('notification_config_field_forbidden',_0x266ad6(0x1e3)+_0x1a26db+_0x266ad6(0x208));if(!ALLOWED_INPUT_FIELDS['has'](_0x1a26db))throw notificationError(_0x266ad6(0x228),_0x266ad6(0x224)+_0x1a26db+'\x22.');}if(_0x5e5d1e===_0x266ad6(0x202)&&Object[_0x266ad6(0x23e)](_0x5dd4eb)['length']===0x0)throw notificationError(_0x266ad6(0x1ef),_0x266ad6(0x22c));const _0x374821={};if(hasOwn(_0x5dd4eb,_0x266ad6(0x1f7)))_0x374821[_0x266ad6(0x1f7)]=validateRequiredString(_0x5dd4eb[_0x266ad6(0x1f7)],_0x266ad6(0x1f7),0x80);else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+_0x266ad6(0x1eb));}if(hasOwn(_0x5dd4eb,_0x266ad6(0x1d4))){if(typeof _0x5dd4eb['channelType']!==_0x266ad6(0x1d1))throw invalidFieldType(_0x266ad6(0x1d4),_0x266ad6(0x1fa));const _0x58be6=_0x5dd4eb[_0x266ad6(0x1d4)][_0x266ad6(0x1ff)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x22f)](_0x58be6))throw notificationError('notification_config_field_invalid',_0x266ad6(0x1fb),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x266ad6(0x204)](',\x20')+'.');_0x374821['channelType']=_0x58be6;}else{if(_0x5e5d1e===_0x266ad6(0x1f2))throw notificationError(_0x266ad6(0x240),_0x266ad6(0x210)+'\x22channelType\x22.');}for(const [_0x27670d,_0x45bde4]of[[_0x266ad6(0x1ed),0x200],['description',0x100]]){if(!hasOwn(_0x5dd4eb,_0x27670d))continue;const _0x2af05d=_0x5dd4eb[_0x27670d];if(_0x2af05d!==null&&typeof _0x2af05d!==_0x266ad6(0x1d1))throw invalidFieldType(_0x27670d,_0x266ad6(0x227));if(typeof _0x2af05d===_0x266ad6(0x1d1)&&_0x2af05d[_0x266ad6(0x201)]>_0x45bde4)throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0x27670d+_0x266ad6(0x1ea)+_0x45bde4+_0x266ad6(0x223));_0x374821[_0x27670d]=_0x2af05d;}if(hasOwn(_0x5dd4eb,'channelConfig')){const _0xb9fc48=_0x5dd4eb[_0x266ad6(0x1ee)];if(_0xb9fc48===null&&_0x5e5d1e==='create')throw invalidFieldType('channelConfig',_0x266ad6(0x21d));if(_0xb9fc48!==null&&!isJsonObject(_0xb9fc48))throw invalidFieldType(_0x266ad6(0x1ee),_0x5e5d1e===_0x266ad6(0x202)?_0x266ad6(0x1e6):_0x266ad6(0x21d));_0xb9fc48!==null&&validateChannelConfigFields(_0x374821['channelType'],_0xb9fc48),_0x374821[_0x266ad6(0x1ee)]=_0xb9fc48;}for(const _0xa9e3b4 of[_0x266ad6(0x230),'readTimeout']){if(!hasOwn(_0x5dd4eb,_0xa9e3b4))continue;const _0x4d27f8=_0x5dd4eb[_0xa9e3b4];if(_0x4d27f8!==null&&(!Number['isSafeInteger'](_0x4d27f8)||_0x4d27f8<0x0))throw notificationError(_0x266ad6(0x232),_0x266ad6(0x1e3)+_0xa9e3b4+_0x266ad6(0x1d2));_0x374821[_0xa9e3b4]=_0x4d27f8;}return _0x374821;}function validateRequiredString(_0x13d4bd,_0x273f2c,_0x3c7dc3){const _0x596a88=a197_0x5297c2;if(typeof _0x13d4bd!==_0x596a88(0x1d1))throw invalidFieldType(_0x273f2c,_0x596a88(0x23b));const _0x1990d3=_0x13d4bd[_0x596a88(0x1ff)]();if(!_0x1990d3)throw notificationError(_0x596a88(0x232),'Notification\x20JSON\x20field\x20\x22'+_0x273f2c+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1990d3[_0x596a88(0x201)]>_0x3c7dc3)throw notificationError(_0x596a88(0x232),_0x596a88(0x1e3)+_0x273f2c+_0x596a88(0x1ea)+_0x3c7dc3+_0x596a88(0x223));return _0x1990d3;}function validateChannelConfigFields(_0x319e92,_0x4dcf5b){const _0x3812c2=a197_0x5297c2;if(hasOwn(_0x4dcf5b,'messageTemplate'))throw forbiddenChannelConfigField(_0x3812c2(0x218));if(_0x319e92===_0x3812c2(0x221))for(const _0x3bff3e of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4dcf5b,_0x3bff3e))throw forbiddenChannelConfigField(_0x3bff3e);}}function forbiddenChannelConfigField(_0x2f67bf){const _0x207983=a197_0x5297c2;return notificationError(_0x207983(0x1cf),_0x207983(0x1e5)+_0x2f67bf+_0x207983(0x1c3));}function invalidFieldType(_0x1d08c7,_0x112257){const _0x2a742c=a197_0x5297c2;return notificationError(_0x2a742c(0x232),_0x2a742c(0x1e3)+_0x1d08c7+_0x2a742c(0x1e4)+_0x112257+'.');}function serializeChannelConfig(_0x3e8a68){const _0x3635b1=a197_0x5297c2;return _0x3e8a68===null||_0x3e8a68===undefined?null:JSON[_0x3635b1(0x225)](_0x3e8a68);}function redactSensitive(_0x132664){return _0x132664===null||_0x132664===undefined||_0x132664===''?null:'<redacted>';}function requireResponseString(_0x553f5f,_0x3fc2b9,_0x351b1e){const _0x4f219b=a197_0x5297c2;if(typeof _0x553f5f!==_0x4f219b(0x1d1)||_0x553f5f[_0x4f219b(0x1ff)]()==='')throw CliErrors[_0x4f219b(0x206)](_0x4f219b(0x1e1),_0x4f219b(0x217)+(_0x351b1e+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3fc2b9+'\x22.');return _0x553f5f[_0x4f219b(0x1ff)]();}function requireExactString(_0x1ea571,_0x44a5f6,_0x1ef1d3){const _0x10a70b=a197_0x5297c2;if(typeof _0x1ea571!=='string'||_0x1ea571[_0x10a70b(0x1ff)]()==='')throw notificationError(_0x10a70b(0x1f3),_0x10a70b(0x23d)+_0x1ef1d3+_0x10a70b(0x21e)+_0x44a5f6+'\x22.');return _0x1ea571[_0x10a70b(0x1ff)]();}function a197_0x28ce(_0x417639,_0x2d0e0e){_0x417639=_0x417639-0x1c2;const _0x1773c6=a197_0x1773();let _0x28ce49=_0x1773c6[_0x417639];return _0x28ce49;}function responseNullableString(_0x3f9234,_0xdaa76a,_0x8dc5e4){const _0xc8992a=a197_0x5297c2;if(_0x3f9234===undefined||_0x3f9234===null)return null;if(typeof _0x3f9234!==_0xc8992a(0x1d1))throw notificationError(_0xc8992a(0x1f3),_0xc8992a(0x23d)+_0x8dc5e4+_0xc8992a(0x241)+_0xdaa76a+'\x22.');return _0x3f9234;}function responseNullableTimeout(_0x5cfcd5,_0x3c6ee2,_0x2580ba){const _0x948e75=a197_0x5297c2;if(_0x5cfcd5===undefined||_0x5cfcd5===null)return null;if(!Number[_0x948e75(0x21b)](_0x5cfcd5)||_0x5cfcd5<0x0)throw notificationError(_0x948e75(0x1f3),'Notification\x20config\x20'+_0x2580ba+_0x948e75(0x241)+_0x3c6ee2+'\x22.');return _0x5cfcd5;}function normalizeNullableString(_0x5c6cfd){return typeof _0x5c6cfd==='string'?_0x5c6cfd:null;}function isJsonObject(_0x2c0975){return _0x2c0975!==null&&typeof _0x2c0975==='object'&&!Array['isArray'](_0x2c0975);}function hasOwn(_0x59209a,_0x4f03b8){const _0x22ccd3=a197_0x5297c2;return Object[_0x22ccd3(0x1c5)][_0x22ccd3(0x1ca)][_0x22ccd3(0x1d6)](_0x59209a,_0x4f03b8);}async function readStdin(){const _0x1f8618=a197_0x5297c2;let _0x5db7c2='';process[_0x1f8618(0x22e)][_0x1f8618(0x1fe)](_0x1f8618(0x203));for await(const _0x17928f of process['stdin'])_0x5db7c2+=_0x17928f;return _0x5db7c2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x5b7e4f=a198_0x3186;function a198_0x3186(_0x323a3f,_0x4d9562){_0x323a3f=_0x323a3f-0x164;const _0x154ec6=a198_0x154e();let _0x318659=_0x154ec6[_0x323a3f];return _0x318659;}(function(_0x5cb025,_0x153bac){const _0x4289a2=a198_0x3186,_0x1d0a44=_0x5cb025();while(!![]){try{const _0x1e47c8=-parseInt(_0x4289a2(0x181))/0x1*(-parseInt(_0x4289a2(0x165))/0x2)+-parseInt(_0x4289a2(0x175))/0x3*(parseInt(_0x4289a2(0x184))/0x4)+parseInt(_0x4289a2(0x164))/0x5+parseInt(_0x4289a2(0x171))/0x6*(-parseInt(_0x4289a2(0x169))/0x7)+parseInt(_0x4289a2(0x182))/0x8*(-parseInt(_0x4289a2(0x16c))/0x9)+parseInt(_0x4289a2(0x17e))/0xa+parseInt(_0x4289a2(0x16b))/0xb;if(_0x1e47c8===_0x153bac)break;else _0x1d0a44['push'](_0x1d0a44['shift']());}catch(_0x159af8){_0x1d0a44['push'](_0x1d0a44['shift']());}}}(a198_0x154e,0xc4b85));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_0x5b7e4f(0x189),'form',a198_0x5b7e4f(0x16f)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x5b7e4f(0x195),'general':a198_0x5b7e4f(0x170),'form':a198_0x5b7e4f(0x177),'idCard':a198_0x5b7e4f(0x17b)},SCENE_FLAG={'name':'scene','type':a198_0x5b7e4f(0x194),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x5b7e4f(0x196)},IMAGE_FILE_FLAG={'name':'image-file','type':a198_0x5b7e4f(0x194),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a198_0x5b7e4f(0x193),'type':a198_0x5b7e4f(0x194),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4bce2b){const _0x4b3249=a198_0x5b7e4f,_0x475ad5=_0x4bce2b[_0x4b3249(0x167)]()['toLowerCase']();if(_0x475ad5==='idcard')return _0x4b3249(0x16f);if(_0x475ad5==='invoice'||_0x475ad5===_0x4b3249(0x189)||_0x475ad5===_0x4b3249(0x18f))return _0x475ad5;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x4bce2b+_0x4b3249(0x190)+SUPPORTED_SCENES[_0x4b3249(0x16d)](',\x20'));}function selectedInputs(_0x24a2a3){const _0x15d04e=a198_0x5b7e4f,_0x430072=_0x24a2a3['str']('image-file')[_0x15d04e(0x167)](),_0x1ff97f=_0x24a2a3['str'](_0x15d04e(0x193))[_0x15d04e(0x167)]();return{'imageFile':_0x430072,'imageUrl':_0x1ff97f,'count':[_0x430072,_0x1ff97f]['filter'](Boolean)[_0x15d04e(0x191)]};}function validateInputSelection(_0x28f4ab){const _0x382ebc=a198_0x5b7e4f,_0x467aad=selectedInputs(_0x28f4ab);if(_0x467aad[_0x382ebc(0x183)]!==0x1)throw CliErrors['validation'](_0x382ebc(0x188));return _0x467aad;}function a198_0x154e(){const _0x4c6857=['4615410dpMiIb','filePath','/smartapi/common/uploadFile','1Urtqju','286192plCyzW','count','51884trIaVr','recognize','GET','appCode','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','general','POST','\x20OCR\x20from\x20URL','fileName','\x20OCR','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','form','.\x20Supported\x20scenes:\x20','length','imageFile','image-url','string','Invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','4324605tpwRih','1396914aKdycr','File\x20URL\x20response\x20missing\x20fileUrl.','trim','/smartapi/common/queryFileUrl','6986pHdLkt','toString','19312612nDAxaT','351WzoIag','join','image-file','idCard','General','4974pcAGuA','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','apiError','str','174IcLymQ','fileUrl','Table','scene','imageUrl','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','IdCard','ocr','File\x20upload\x20response\x20missing\x20filePath.'];a198_0x154e=function(){return _0x4c6857;};return a198_0x154e();}function withScene(_0x18e731,_0x3c2e80,_0x524d09){const _0x4ed91f=a198_0x5b7e4f;return{..._0x18e731,'scene':_0x3c2e80,..._0x524d09?{'sourceFile':{'fileName':_0x524d09[_0x4ed91f(0x18c)],'filePath':_0x524d09[_0x4ed91f(0x17f)]}}:{}};}const ocrRecognize={'service':a198_0x5b7e4f(0x17c),'command':a198_0x5b7e4f(0x185),'description':a198_0x5b7e4f(0x172),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x50faf2){const _0xc06cbc=a198_0x5b7e4f,_0x1e40ef=normalizeScene(_0x50faf2[_0xc06cbc(0x174)](_0xc06cbc(0x178))),_0x1c8741=SCENE_TO_LEGACY_TYPE[_0x1e40ef],_0x36c171=validateInputSelection(_0x50faf2);if(_0x36c171[_0xc06cbc(0x179)]){const _0x1244d3=new URLSearchParams({'url':_0x36c171['imageUrl'],'type':_0x1c8741,'appCode':_0x50faf2[_0xc06cbc(0x187)]});return{'method':_0xc06cbc(0x186),'url':'/smartapi/ocr/recognize-text?'+_0x1244d3[_0xc06cbc(0x16a)](),'description':'Preview:\x20recognize\x20'+_0x1e40ef+_0xc06cbc(0x18b)};}const _0x2e0802=requireDevelopmentUploadFile(_0x36c171[_0xc06cbc(0x192)],'image-file');return{'method':'POST','url':_0xc06cbc(0x180),'body':{'steps':[{'method':_0xc06cbc(0x18a),'url':_0xc06cbc(0x180),'body':{'appCode':_0x50faf2[_0xc06cbc(0x187)],'multipart':{'file':_0x2e0802}}},{'method':_0xc06cbc(0x18a),'url':_0xc06cbc(0x168),'body':{'filePath':_0xc06cbc(0x18e),'downloadFlag':![]}},{'method':_0xc06cbc(0x186),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x50faf2[_0xc06cbc(0x187)],'url':_0xc06cbc(0x17a),'type':_0x1c8741}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x1e40ef+_0xc06cbc(0x18d)};},async 'execute'(_0x14d209){const _0x13752e=a198_0x5b7e4f,_0x4a43a1=normalizeScene(_0x14d209[_0x13752e(0x174)](_0x13752e(0x178))),_0x3ce4a7=SCENE_TO_LEGACY_TYPE[_0x4a43a1],_0x5552da=validateInputSelection(_0x14d209);if(_0x5552da[_0x13752e(0x179)]){const _0x30c601=await recognizeDevelopmentOcr(_0x14d209['appCode'],{'url':_0x5552da['imageUrl'],'type':_0x3ce4a7});return{'ok':!![],'data':withScene(_0x30c601,_0x4a43a1)};}const _0x56f07b=requireDevelopmentUploadFile(_0x5552da[_0x13752e(0x192)],_0x13752e(0x16e)),_0x4f8e86=await uploadDevelopmentFile(_0x14d209[_0x13752e(0x187)],_0x56f07b['path']);if(!_0x4f8e86[_0x13752e(0x17f)])throw CliErrors[_0x13752e(0x173)](_0x13752e(0x17d));const _0x30d776=await queryDevelopmentFileUrl(_0x4f8e86['filePath'],{'download':![]});if(!_0x30d776[_0x13752e(0x176)])throw CliErrors[_0x13752e(0x173)](_0x13752e(0x166));const _0xb6d373=await recognizeDevelopmentOcr(_0x14d209[_0x13752e(0x187)],{'url':_0x30d776['fileUrl'],'type':_0x3ce4a7});return{'ok':!![],'data':withScene(_0xb6d373,_0x4a43a1,_0x4f8e86)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0xe7c881=a199_0x20e1;(function(_0x187340,_0x31f77f){const _0x3ac715=a199_0x20e1,_0x2074b1=_0x187340();while(!![]){try{const _0x3b92a4=parseInt(_0x3ac715(0x1b2))/0x1*(-parseInt(_0x3ac715(0x1b7))/0x2)+-parseInt(_0x3ac715(0x1ac))/0x3+parseInt(_0x3ac715(0x19f))/0x4*(parseInt(_0x3ac715(0x192))/0x5)+parseInt(_0x3ac715(0x193))/0x6+-parseInt(_0x3ac715(0x19e))/0x7+-parseInt(_0x3ac715(0x196))/0x8*(-parseInt(_0x3ac715(0x188))/0x9)+-parseInt(_0x3ac715(0x18c))/0xa;if(_0x3b92a4===_0x31f77f)break;else _0x2074b1['push'](_0x2074b1['shift']());}catch(_0x4fdb05){_0x2074b1['push'](_0x2074b1['shift']());}}}(a199_0x28d8,0xe623d));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';function a199_0x28d8(){const _0x731753=['5417566MwMEYJ','32zPhbKz','BLANK','page.create','createMenu','now','string','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','isArray','stringify','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','version','includes','241431bCBdEZ','parse','parent-menu-id','../../../templates/custom-pages','isInteger','apiError','548237DHItTn','menuPath','validation','\x20and\x20its\x20menu\x20entry.','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','2vCUXvm','page-dir','pageId','page\x20create\x20does\x20not\x20accept\x20--page-type.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','page-pattern','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','DASHBOARD','parentMenuId','toLowerCase','Invalid\x20Custom\x20Page\x20pattern:\x20','Created\x20Custom\x20Page\x20','ONEPAGE','some','appCode','files','length','create','81ueJNig','page','num','str','11449810ADBPqA','pageName','keys','Custom_page_','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','Custom\x20Page\x20pattern\x20not\x20found:\x20','1127660YGYAnW','955782abgbiJ','values','name','1357096VxaCay','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isNaN','POST','page-content','compress','trim','number'];a199_0x28d8=function(){return _0x731753;};return a199_0x28d8();}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';function a199_0x20e1(_0x3343f8,_0x3f0b56){_0x3343f8=_0x3343f8-0x187;const _0x28d8dd=a199_0x28d8();let _0x20e1e5=_0x28d8dd[_0x3343f8];return _0x20e1e5;}const CUSTOM_PAGE_PATTERNS=[a199_0xe7c881(0x1a0),a199_0xe7c881(0x1c4),a199_0xe7c881(0x1bf)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0xe7c881(0x1af));export const pageCreate={'service':a199_0xe7c881(0x189),'command':a199_0xe7c881(0x187),'description':a199_0xe7c881(0x1b6),'risk':'write','defaultOutputFormat':a199_0xe7c881(0x19b),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a199_0xe7c881(0x1ba),'hint':a199_0xe7c881(0x1bb)},{'name':a199_0xe7c881(0x19a),'message':a199_0xe7c881(0x190),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':a199_0xe7c881(0x195),'type':a199_0xe7c881(0x1a4),'description':a199_0xe7c881(0x197)},{'name':'parent-menu-id','type':a199_0xe7c881(0x19d),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':'page-pattern','type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0xe7c881(0x1b8),'type':a199_0xe7c881(0x1a4),'description':a199_0xe7c881(0x1a9)},APPCODE_FLAG],async 'validate'(_0x110733){await readValidatedPageSource(_0x110733);},async 'dryRun'(_0x53a60e){const _0x21c0c8=a199_0xe7c881,_0x1dd166=readInput(_0x53a60e,await readValidatedPageSource(_0x53a60e));return{'method':_0x21c0c8(0x199),'url':'/smartapi/webcode/page/create','body':{'appCode':_0x1dd166['appCode'],'pageName':_0x1dd166['pageName'],..._0x1dd166[_0x21c0c8(0x1c0)]!=null?{'parentMenuId':_0x1dd166[_0x21c0c8(0x1c0)]}:{},'createMenu':_0x1dd166[_0x21c0c8(0x1a2)],'codeContent':_0x1dd166[_0x21c0c8(0x1c7)]},'description':'Would\x20create\x20Custom\x20Page\x20'+JSON[_0x21c0c8(0x1a7)](_0x1dd166[_0x21c0c8(0x18d)])+_0x21c0c8(0x1b5)};},async 'execute'(_0x3b5d18){const _0x1a25b6=a199_0xe7c881,_0x109dc2=readInput(_0x3b5d18,await readValidatedPageSource(_0x3b5d18)),_0x32e156=await createCustomPage(_0x109dc2);if(!Number[_0x1a25b6(0x1b0)](_0x32e156['pageId'])||_0x32e156[_0x1a25b6(0x1b9)]<=0x0)throw CliErrors[_0x1a25b6(0x1b1)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x288954=buildCustomPageDevelopmentUrl(_0x109dc2[_0x1a25b6(0x1c6)],_0x32e156[_0x1a25b6(0x1b3)]),_0x510f7f=buildCustomPageEditUrl(_0x109dc2[_0x1a25b6(0x1c6)],_0x32e156['pageId']);return{'ok':!![],'data':{'operation':_0x1a25b6(0x1a1),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x3b5d18),'selector':{'appCode':_0x109dc2[_0x1a25b6(0x1c6)],'pageName':_0x109dc2[_0x1a25b6(0x18d)]},'before':null,'after':{'pageId':_0x32e156['pageId'],'pageName':_0x32e156[_0x1a25b6(0x18d)],'appCode':_0x32e156[_0x1a25b6(0x1c6)],'version':_0x32e156[_0x1a25b6(0x1aa)],'menuId':_0x32e156['menuId'],'menuPath':_0x32e156[_0x1a25b6(0x1b3)],'files':_0x32e156[_0x1a25b6(0x1c7)]??Object[_0x1a25b6(0x18e)](_0x109dc2[_0x1a25b6(0x1c7)])},'dryRun':![],'request':_0x109dc2,..._0x288954?{'pageUrl':_0x288954}:{},..._0x510f7f?{'editPageUrl':_0x510f7f}:{},'warnings':_0x288954?[]:[_0x1a25b6(0x1bd)]},'message':_0x1a25b6(0x1c3)+_0x32e156[_0x1a25b6(0x1b9)]+'.'};}};function readPagePattern(_0x592533){const _0xef7c50=a199_0xe7c881,_0x48fae6=_0x592533['str'](_0xef7c50(0x1bc))[_0xef7c50(0x19c)](),_0x47bf0f=_0x592533['str'](_0xef7c50(0x1b8))[_0xef7c50(0x19c)]();if(_0x48fae6&&_0x47bf0f)throw CliErrors['validation'](_0xef7c50(0x1a5));if(_0x47bf0f)return null;if(!_0x48fae6)throw CliErrors['validation']('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0xef7c50(0x1ab)](_0x48fae6))throw CliErrors[_0xef7c50(0x1b4)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x48fae6;}async function readPageSource(_0x584f2d){const _0x10fac6=a199_0xe7c881,_0x2e87e9=_0x584f2d[_0x10fac6(0x18b)](_0x10fac6(0x1b8))[_0x10fac6(0x19c)](),_0x1da754=readPagePattern(_0x584f2d);if(_0x1da754===null){const _0x32f59d=await readCustomPageDirectory(_0x2e87e9);if(Object[_0x10fac6(0x18e)](_0x32f59d)[_0x10fac6(0x1c8)]===0x0)throw CliErrors['validation'](_0x10fac6(0x1be));return _0x32f59d;}let _0x3cf08f;try{_0x3cf08f=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x1da754[_0x10fac6(0x1c1)]()+'.json'),'utf8');}catch{throw CliErrors['validation'](_0x10fac6(0x191)+_0x1da754+'.');}let _0x31cd76;try{_0x31cd76=JSON[_0x10fac6(0x1ad)](_0x3cf08f);}catch{throw CliErrors[_0x10fac6(0x1b4)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x1da754+'.');}if(!_0x31cd76||typeof _0x31cd76!=='object'||Array[_0x10fac6(0x1a6)](_0x31cd76)||Object[_0x10fac6(0x194)](_0x31cd76)[_0x10fac6(0x1c5)](_0x323b31=>typeof _0x323b31!==_0x10fac6(0x1a4)))throw CliErrors[_0x10fac6(0x1b4)](_0x10fac6(0x1c2)+_0x1da754+'.');return _0x31cd76;}async function readValidatedPageSource(_0x282475){const _0x5a62f1=await readPageSource(_0x282475);return await validateCustomPageContent(_0x5a62f1),_0x5a62f1;}function readInput(_0xcbece9,_0x455bba){const _0x40f6c2=a199_0xe7c881,_0x3e8c16=_0xcbece9[_0x40f6c2(0x18b)]('name')[_0x40f6c2(0x19c)]()||_0x40f6c2(0x18f)+Date[_0x40f6c2(0x1a3)]();if(_0x3e8c16[_0x40f6c2(0x1c8)]>0x64)throw CliErrors[_0x40f6c2(0x1b4)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x3e3432=_0xcbece9[_0x40f6c2(0x18a)](_0x40f6c2(0x1ae),NaN),_0x747ffc=!Number[_0x40f6c2(0x198)](_0x3e3432);if(_0x747ffc&&(!Number[_0x40f6c2(0x1b0)](_0x3e3432)||_0x3e3432<=0x0))throw CliErrors[_0x40f6c2(0x1b4)](_0x40f6c2(0x1a8));return{'appCode':_0xcbece9[_0x40f6c2(0x1c6)],'pageName':_0x3e8c16,..._0x747ffc?{'parentMenuId':_0x3e3432}:{},'createMenu':!![],'files':_0x455bba};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x2a0df4=a200_0x1f4e;(function(_0x412c9d,_0x190933){const _0x271f26=a200_0x1f4e,_0x3839fa=_0x412c9d();while(!![]){try{const _0x420895=-parseInt(_0x271f26(0xdb))/0x1*(parseInt(_0x271f26(0xec))/0x2)+-parseInt(_0x271f26(0xe5))/0x3*(parseInt(_0x271f26(0xe7))/0x4)+parseInt(_0x271f26(0xdc))/0x5*(parseInt(_0x271f26(0xe0))/0x6)+-parseInt(_0x271f26(0xe8))/0x7*(parseInt(_0x271f26(0xda))/0x8)+-parseInt(_0x271f26(0xd1))/0x9*(-parseInt(_0x271f26(0xed))/0xa)+parseInt(_0x271f26(0xea))/0xb+parseInt(_0x271f26(0xe4))/0xc;if(_0x420895===_0x190933)break;else _0x3839fa['push'](_0x3839fa['shift']());}catch(_0x574cac){_0x3839fa['push'](_0x3839fa['shift']());}}}(a200_0x53bd,0xdf6b7));import{getCustomPageSource}from'../../../core/api-client.js';function a200_0x1f4e(_0xfe9d69,_0x2613b5){_0xfe9d69=_0xfe9d69-0xd1;const _0x53bd71=a200_0x53bd();let _0x1f4edf=_0x53bd71[_0xfe9d69];return _0x1f4edf;}function a200_0x53bd(){const _0x435d3c=['189eTIbTf','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMinutes','getSeconds','compress','trim','appcode','read','Retrieved\x20Custom\x20Page\x20','16IeCRCJ','69015pnzFkf','7143550IdCvaw','Custom\x20Page\x20ID','padStart','getTime','6XKSdDo','number','pageCode','join','43746648qqrRlT','2591781qPfqoe','getFullYear','8RedlZW','4914721rymHTh','isNaN','2554794kCrmrt','getHours','38PDGhHb','24740LTyyeM','appCode'];a200_0x53bd=function(){return _0x435d3c;};return a200_0x53bd();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':'custom-detail','description':a200_0x2a0df4(0xd2),'risk':a200_0x2a0df4(0xd8),'defaultOutputFormat':a200_0x2a0df4(0xd5),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a200_0x2a0df4(0xe1),'required':!![],'description':a200_0x2a0df4(0xdd)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x465388){readCustomPageId(_0x465388);},async 'execute'(_0x3713b1){const _0x5e28a7=a200_0x2a0df4,_0x5ba4e9=readCustomPageId(_0x3713b1),_0x159417=await getCustomPageSource(_0x5ba4e9),{bundle:_0xcb762f,createTime:_0x4b33ef,updateTime:_0x354e41,..._0x5b697e}=_0x159417,_0x13167f=_0x159417['id']??_0x5ba4e9,_0x347cb9=_0x159417[_0x5e28a7(0xee)]?.[_0x5e28a7(0xd6)]()||_0x3713b1['str'](_0x5e28a7(0xd7))[_0x5e28a7(0xd6)](),_0x41dcfb=buildCustomPageRuntimeUrl(_0x347cb9,_0x159417[_0x5e28a7(0xe2)]),_0x42ba9a=buildCustomPageEditUrl(_0x347cb9,_0x13167f),_0x1a6180=await resolveCustomPageDevelopmentUrl(_0x347cb9,_0x13167f,_0x3713b1['cookie']);return{'ok':!![],'data':{..._0x5b697e,..._0x41dcfb?{'runtimePageUrl':_0x41dcfb}:{},..._0x1a6180?{'pageUrl':_0x1a6180}:{},..._0x42ba9a?{'editPageUrl':_0x42ba9a}:{},..._0x4b33ef==null?{}:{'createTime':formatTime(_0x4b33ef)},..._0x354e41==null?{}:{'updateTime':formatTime(_0x354e41)}},'message':_0x5e28a7(0xd9)+_0x5ba4e9+'.'};}};function formatTime(_0x2e7492){const _0x2e1631=a200_0x2a0df4,_0x22383d=new Date(_0x2e7492);if(Number[_0x2e1631(0xe9)](_0x22383d[_0x2e1631(0xdf)]()))return String(_0x2e7492);const _0x5406d3=[_0x22383d[_0x2e1631(0xe6)](),String(_0x22383d['getMonth']()+0x1)[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d['getDate']())[_0x2e1631(0xde)](0x2,'0')][_0x2e1631(0xe3)]('-'),_0x244a3b=[String(_0x22383d[_0x2e1631(0xeb)]())[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d[_0x2e1631(0xd3)]())[_0x2e1631(0xde)](0x2,'0'),String(_0x22383d[_0x2e1631(0xd4)]())[_0x2e1631(0xde)](0x2,'0')][_0x2e1631(0xe3)](':');return _0x5406d3+'\x20'+_0x244a3b;}
|