@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +7 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- 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.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/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.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- 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/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/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.d.ts +2 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +176 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- 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.d.ts +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +11 -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.d.ts +12 -0
- 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 +4 -1
- package/skills/rabetbase/SKILL.md +31 -9
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -60
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +10 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const a151_0x2c6522=a151_0x2465;function a151_0x2465(_0x422b47,_0x3ddec8){_0x422b47=_0x422b47-0x1d9;const _0x25ab1f=a151_0x25ab();let _0x24651d=_0x25ab1f[_0x422b47];return _0x24651d;}(function(_0x282213,_0x47b120){const _0x4309e=a151_0x2465,_0x5a1092=_0x282213();while(!![]){try{const _0x2088cd=-parseInt(_0x4309e(0x22b))/0x1+parseInt(_0x4309e(0x21f))/0x2*(-parseInt(_0x4309e(0x208))/0x3)+parseInt(_0x4309e(0x230))/0x4*(parseInt(_0x4309e(0x214))/0x5)+-parseInt(_0x4309e(0x250))/0x6*(-parseInt(_0x4309e(0x24b))/0x7)+-parseInt(_0x4309e(0x23b))/0x8+-parseInt(_0x4309e(0x238))/0x9+parseInt(_0x4309e(0x203))/0xa*(parseInt(_0x4309e(0x228))/0xb);if(_0x2088cd===_0x47b120)break;else _0x5a1092['push'](_0x5a1092['shift']());}catch(_0x1f7b08){_0x5a1092['push'](_0x5a1092['shift']());}}}(a151_0x25ab,0x57b41));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x25ab(){const _0x4d4aa7=['rabetbase\x20menu\x20list\x20--format\x20compress','expected-count','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageType','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','141197CsTHrT','childrenCount','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu-ids','datasetCode','144xSRhph','values','stringify','url','expect-visible','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_permission_denied','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','updated','expectVisible','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','menu_expected_count_mismatch','depth','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20failed.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu','verification','paths','split','str','visible','\x20unchanged\x20menu(s).','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','path','visibility-update','update-recovery','map','Menu\x20path\x20selector\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','flagMissing','warnings','failed','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','length','high-risk-write','\x20updated,\x20','false','byId','filter','menuIds','boolean','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','80jMCbhY','appCode','POST','menu_verification_failed','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','307947DmZIfS','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20menu(s),\x20expected\x20','childrenIds','/smartapi/menu/update','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20for\x20menu\x20','before','parentId','Selected\x20','plan','type','635AQzYIV','\x20menu(s);\x20skipped\x20','resourcesValid','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','isSafeInteger','sort','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','push','menus','menu_selector_ambiguous','num','6Ptbxag','\x20changed\x20unexpectedly.','pageId','plannedActions','menu_selector_not_found','resources','set','code','get','1564585FJkrPb','message','join','301522UZeelR','isArray','\x20skipped,\x20','beforeById','Updated\x20visibility\x20for\x20','2728pkXRpu','Would\x20update\x20visibility\x20for\x20','label','datasetId','number','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update\x20menu\x20visibility','requestedVisible','3597669zKZUPU','recovered','validation','2721240NEWPOr','update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','update-menu-visibility','expectedCount','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','modelType','Menu\x20','has','string'];a151_0x25ab=function(){return _0x4d4aa7;};return a151_0x25ab();}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a151_0x2c6522(0x205),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a151_0x2c6522(0x1e6),'command':'visibility-update','description':a151_0x2c6522(0x1f3),'risk':a151_0x2c6522(0x1fb),'structuredErrors':!![],'flags':[{'name':a151_0x2c6522(0x24e),'type':'string','description':a151_0x2c6522(0x24a)},{'name':a151_0x2c6522(0x1e8),'type':a151_0x2c6522(0x245),'description':a151_0x2c6522(0x1f4)},{'name':a151_0x2c6522(0x1eb),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a151_0x2c6522(0x254),'type':a151_0x2c6522(0x201),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a151_0x2c6522(0x247),'type':a151_0x2c6522(0x234),'description':a151_0x2c6522(0x23d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ddda8){parseInput(_0x3ddda8),requireExplicitYes(_0x3ddda8);},async 'dryRun'(_0x2ae315){const _0x1c8ec2=a151_0x2c6522,_0x38f408=await buildPlan(_0x2ae315,!![]),_0x1b5fcc=_0x38f408['plan'][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1fa)]??0x0,_0x3fb311=_0x38f408['plan'][_0x1c8ec2(0x23e)][_0x1c8ec2(0x1fa)]-_0x1b5fcc;return menuDryRunResult(_0x38f408[_0x1c8ec2(0x212)],{'method':_0x1c8ec2(0x205),'url':_0x1c8ec2(0x20c),'body':{'updates':_0x38f408[_0x1c8ec2(0x212)][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1f1)](_0x315490=>_0x315490['body'])??[]},'description':_0x1c8ec2(0x231)+_0x1b5fcc+'\x20menu(s);\x20skip\x20'+_0x3fb311+_0x1c8ec2(0x1ec)});},async 'execute'(_0x5e759b){const _0x10a077=a151_0x2c6522;requireExplicitYes(_0x5e759b);const _0x287d15=await buildPlan(_0x5e759b,![]);await recheckMutationSnapshot(_0x5e759b,_0x287d15['plan'],_0x10a077(0x236));const _0x2e519c=[],_0x13230d=[],_0x13a818=[];for(const _0x38893a of _0x287d15[_0x10a077(0x212)][_0x10a077(0x23e)]){if(_0x38893a[_0x10a077(0x20f)][_0x10a077(0x1eb)]===_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]){_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e759b['appCode'],_0x5e759b[_0x10a077(0x1f8)],{'id':_0x38893a['id'],'visible':_0x287d15['plan'][_0x10a077(0x237)]}),_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':!![],'skipped':![]});}catch(_0x1ecfe5){const _0x46d529=mapMenuApiError(_0x1ecfe5,'update\x20visibility\x20for',_0x38893a['id']);if(isMenuResponseLoss(_0x1ecfe5)&&_0x46d529[_0x10a077(0x226)]!==_0x10a077(0x1d9)){_0x13a818['push'](_0x38893a['id']);continue;}_0x13230d[_0x10a077(0x21b)]({'id':_0x38893a['id'],'stage':_0x10a077(0x23c),'code':_0x46d529[_0x10a077(0x226)],'message':_0x46d529['message']});}}let _0x223952;try{_0x223952=await fetchMenuSnapshot(_0x5e759b[_0x10a077(0x204)],_0x5e759b[_0x10a077(0x1f8)]);}catch(_0xe0c97d){const _0x4c1354=describeMenuErrorCause(_0xe0c97d,'verify\x20menu\x20visibility\x20update'),_0x473565=_0x13a818[_0x10a077(0x1f1)](_0x10d03d=>({'id':_0x10d03d,'stage':_0x10a077(0x1f0),'code':_0x10a077(0x206),'message':_0x10a077(0x20e)+_0x10d03d+_0x10a077(0x1e4),'requestedStateConfirmed':![],'recovered':![]})),_0x84f14={'stage':_0x10a077(0x1e7),'code':_0x10a077(0x206),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x287d15[_0x10a077(0x212)]['targets'][_0x10a077(0x1f1)](_0x60b8f4=>_0x60b8f4['id']),'requestedStateConfirmed':![],..._0x4c1354};throw menuFailure(asVerificationError(_0xe0c97d,_0x10a077(0x207)),_0x287d15['plan'],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x473565,_0x84f14],'warnings':[_0x10a077(0x202)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x10a077(0x246)}});}const _0x4a4ca7=[];for(const _0x492bac of _0x2e519c){const _0x5b7604=Number(_0x492bac['id']),_0x3f069f=_0x287d15[_0x10a077(0x22e)]['get'](_0x5b7604),_0x59f101=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x5b7604);try{verifyVisibilityUpdate(_0x3f069f,_0x59f101,_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]);}catch(_0x3e4bf5){const _0x10c4c5=asVerificationError(_0x3e4bf5,_0x10a077(0x243)+_0x5b7604+_0x10a077(0x1de));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x5b7604,'stage':_0x10a077(0x1e7),'code':_0x10c4c5[_0x10a077(0x226)],'message':_0x10c4c5[_0x10a077(0x229)],'requestedStateConfirmed':![]});}}for(const _0x2f37f4 of _0x13a818){const _0x15c66f=_0x287d15['beforeById'][_0x10a077(0x227)](_0x2f37f4),_0x4a726b=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x2f37f4);try{verifyVisibilityUpdate(_0x15c66f,_0x4a726b,_0x287d15['plan'][_0x10a077(0x237)]),_0x2e519c[_0x10a077(0x21b)]({'id':_0x2f37f4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4f15bd){const _0x5a03ce=asVerificationError(_0x4f15bd,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2f37f4+_0x10a077(0x24d));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x2f37f4,'stage':_0x10a077(0x1f0),'code':_0x5a03ce['code'],'message':_0x5a03ce[_0x10a077(0x229)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4a4ca7[_0x10a077(0x1fa)]>0x0){const _0x5cd76d=_0x4a4ca7['map'](_0x4f827d=>Number(_0x4f827d['id'])),_0x4fd200=_0x2e519c['filter'](_0x2533d8=>_0x2533d8[_0x10a077(0x239)]===!![])[_0x10a077(0x1fa)],_0x56c295=menuError('menu_verification_failed',_0x10a077(0x255)+_0x5cd76d[_0x10a077(0x22a)](',\x20')+'.',_0x10a077(0x248));throw menuFailure(_0x56c295,_0x287d15[_0x10a077(0x212)],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x4a4ca7],'warnings':[_0x10a077(0x209)],'verification':{'status':_0x10a077(0x1f7),..._0x5cd76d[_0x10a077(0x1fa)]===0x1?{'targetId':_0x5cd76d[0x0]}:{'targetIds':_0x5cd76d},'recoveredCount':_0x4fd200,'lookupCommand':_0x10a077(0x246)}});}const _0x31c125=_0x2e519c['filter'](_0x2b2043=>_0x2b2043[_0x10a077(0x1db)]===!![])[_0x10a077(0x1fa)],_0x32b0c4=_0x2e519c[_0x10a077(0x1fa)]-_0x31c125,_0x566329={..._0x287d15['plan'],'succeeded':_0x2e519c,'failed':_0x13230d,'warnings':_0x13230d[_0x10a077(0x1fa)]>0x0?[..._0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],_0x10a077(0x217)]:_0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x223952['hash'],'matchesRequestedState':_0x13230d[_0x10a077(0x1fa)]===0x0,'recoveredCount':_0x13a818['length']}};return{'ok':_0x13230d[_0x10a077(0x1fa)]===0x0,'data':_0x566329,'message':_0x13230d[_0x10a077(0x1fa)]===0x0?_0x10a077(0x22f)+_0x31c125+_0x10a077(0x215)+_0x32b0c4+_0x10a077(0x1ec):'Menu\x20visibility\x20update\x20completed:\x20'+_0x31c125+_0x10a077(0x1fc)+_0x32b0c4+_0x10a077(0x22d)+_0x13230d[_0x10a077(0x1fa)]+_0x10a077(0x1e3)};}};function parseInput(_0x2d944f){const _0x15bbc8=a151_0x2c6522,_0x50676b=parseMenuIds(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x24e))),_0x3d9b34=parseCsv(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x1e8)));if(_0x50676b[_0x15bbc8(0x1fa)]===0x0&&_0x3d9b34[_0x15bbc8(0x1fa)]===0x0)throw CliErrors[_0x15bbc8(0x23a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x4e7150=parseBooleanFlag(_0x2d944f,_0x15bbc8(0x1eb),!![]),_0xa8881e=parseBooleanFlag(_0x2d944f,'expect-visible',![]);let _0xec3f11;if(hasFlag(_0x2d944f,_0x15bbc8(0x247))){_0xec3f11=_0x2d944f[_0x15bbc8(0x21e)](_0x15bbc8(0x247));if(!Number[_0x15bbc8(0x218)](_0xec3f11)||_0xec3f11<0x0)throw CliErrors[_0x15bbc8(0x23a)](_0x15bbc8(0x235));}return{'menuIds':_0x50676b,'paths':_0x3d9b34,'visible':_0x4e7150,'expectVisible':_0xa8881e,'expectedCount':_0xec3f11};}async function buildPlan(_0x3f4267,_0x1cd4d7){const _0x4dc8ca=a151_0x2c6522,_0x4817d9=parseInput(_0x3f4267),_0x2ec0ae=await fetchMutationSnapshot(_0x3f4267,_0x4dc8ca(0x236)),_0x3e263e=selectTargets(_0x2ec0ae[_0x4dc8ca(0x21c)],_0x4817d9[_0x4dc8ca(0x200)],_0x4817d9[_0x4dc8ca(0x1e8)]);if(_0x4817d9['expectedCount']!==undefined&&_0x3e263e[_0x4dc8ca(0x1fa)]!==_0x4817d9[_0x4dc8ca(0x240)])throw menuError(_0x4dc8ca(0x1df),_0x4dc8ca(0x211)+_0x3e263e[_0x4dc8ca(0x1fa)]+_0x4dc8ca(0x20a)+_0x4817d9[_0x4dc8ca(0x240)]+'.',_0x4dc8ca(0x1da));if(_0x4817d9[_0x4dc8ca(0x1dc)]!==undefined){const _0x28fd95=_0x3e263e[_0x4dc8ca(0x1ff)](_0x529453=>_0x529453['visible']!==_0x4817d9[_0x4dc8ca(0x1dc)]);if(_0x28fd95[_0x4dc8ca(0x1fa)]>0x0)throw menuError('menu_state_drift',_0x4dc8ca(0x1e2)+_0x28fd95['map'](_0x52314b=>_0x52314b['id'])[_0x4dc8ca(0x22a)](',\x20')+'.',_0x4dc8ca(0x1f9));}const _0x823447=_0x3e263e[_0x4dc8ca(0x1f1)](_0x12b6ad=>({'id':_0x12b6ad['id'],'label':_0x12b6ad[_0x4dc8ca(0x232)],'path':_0x12b6ad['path'],'before':{'visible':_0x12b6ad[_0x4dc8ca(0x1eb)]},'after':{'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x4eb27a=_0x823447[_0x4dc8ca(0x1ff)](_0x58d73f=>_0x58d73f[_0x4dc8ca(0x20f)][_0x4dc8ca(0x1eb)]!==_0x4817d9[_0x4dc8ca(0x1eb)])['map'](_0x37a78f=>({'stage':_0x4dc8ca(0x23f),'method':_0x4dc8ca(0x205),'path':'/smartapi/menu/update','body':{'appCode':_0x3f4267[_0x4dc8ca(0x204)],'id':_0x37a78f['id'],'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x5279a8=mutationResult({'operation':_0x4dc8ca(0x1ef),'selector':{'menuIds':_0x4817d9['menuIds'],'paths':_0x4817d9['paths']},'before':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x25477d=>({'id':_0x25477d['id'],'path':_0x25477d[_0x4dc8ca(0x1ee)],'visible':_0x25477d['visible']}))},'after':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x37443e=>({'id':_0x37443e['id'],'path':_0x37443e[_0x4dc8ca(0x1ee)],'visible':_0x4817d9['visible']}))},'dryRun':_0x1cd4d7,'backend':[...BACKEND],'plannedActions':_0x4eb27a,'snapshotHash':_0x2ec0ae['hash'],'warnings':_0x4eb27a['length']===0x0?[_0x4dc8ca(0x1dd)]:[]});return{'plan':{..._0x5279a8,'requestedVisible':_0x4817d9[_0x4dc8ca(0x1eb)],'targets':_0x823447},'beforeById':new Map(_0x3e263e[_0x4dc8ca(0x1f1)](_0x1c0f08=>[_0x1c0f08['id'],_0x1c0f08]))};}function selectTargets(_0x130f36,_0x55d3f3,_0x3359d3){const _0x5e5b25=a151_0x2c6522,_0x29baf9=new Map(_0x130f36[_0x5e5b25(0x1f1)](_0x2cbc66=>[_0x2cbc66['id'],_0x2cbc66])),_0x3148c5=new Map(),_0x342a43=_0x55d3f3[_0x5e5b25(0x1ff)](_0x368c33=>!_0x29baf9[_0x5e5b25(0x244)](_0x368c33));if(_0x342a43[_0x5e5b25(0x1fa)]>0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1e1)+_0x342a43[_0x5e5b25(0x22a)](',\x20')+'.',_0x5e5b25(0x21a));for(const _0x3ff442 of _0x55d3f3){_0x3148c5['set'](_0x3ff442,_0x29baf9['get'](_0x3ff442));}for(const _0x572306 of _0x3359d3){const _0x475b30=_0x130f36[_0x5e5b25(0x1ff)](_0x34d681=>_0x34d681['path']===_0x572306);if(_0x475b30['length']===0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1f2)+JSON['stringify'](_0x572306)+'.',_0x5e5b25(0x1ed));if(_0x475b30[_0x5e5b25(0x1fa)]>0x1)throw menuError(_0x5e5b25(0x21d),_0x5e5b25(0x241)+JSON[_0x5e5b25(0x252)](_0x572306)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x475b30[_0x5e5b25(0x1f1)](_0x2ab42a=>_0x2ab42a['id'])[_0x5e5b25(0x22a)](',\x20')+'.');const _0x2fe32e=_0x475b30[0x0];_0x3148c5[_0x5e5b25(0x225)](_0x2fe32e['id'],_0x2fe32e);}return[..._0x3148c5[_0x5e5b25(0x251)]()];}function parseMenuIds(_0x492da8){const _0x3c580d=a151_0x2c6522,_0x343c66=parseCsv(_0x492da8),_0x536145=_0x343c66[_0x3c580d(0x1f1)](Number);if(_0x536145['some'](_0x590f5b=>!Number[_0x3c580d(0x218)](_0x590f5b)||_0x590f5b<=0x0))throw CliErrors[_0x3c580d(0x23a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x536145)];}function parseCsv(_0x36817d){const _0x171900=a151_0x2c6522;return[...new Set(_0x36817d[_0x171900(0x1e9)](',')[_0x171900(0x1f1)](_0x45422c=>_0x45422c['trim']())[_0x171900(0x1ff)](Boolean))];}function parseBooleanFlag(_0x185301,_0x26b517,_0x50e992){const _0x38ce60=a151_0x2c6522;if(!hasFlag(_0x185301,_0x26b517)){if(_0x50e992)throw CliErrors[_0x38ce60(0x1f5)](_0x26b517);return undefined;}const _0x598476=_0x185301['rawFlags'][_0x26b517];if(_0x598476===!![]||_0x598476===![])return _0x598476;if(_0x598476==='true')return!![];if(_0x598476===_0x38ce60(0x1fd))return![];throw CliErrors['validation']('--'+_0x26b517+_0x38ce60(0x20d));}function verifyVisibilityUpdate(_0x5ac038,_0x268908,_0x488acb){const _0x28d42a=a151_0x2c6522;assertVerified(!!_0x268908,_0x28d42a(0x243)+_0x5ac038['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x268908[_0x28d42a(0x1eb)]===_0x488acb,_0x28d42a(0x243)+_0x5ac038['id']+_0x28d42a(0x1e5));const _0x172d7e=[['id',_0x268908['id'],_0x5ac038['id']],[_0x28d42a(0x210),_0x268908[_0x28d42a(0x210)],_0x5ac038[_0x28d42a(0x210)]],['depth',_0x268908['depth'],_0x5ac038[_0x28d42a(0x1e0)]],[_0x28d42a(0x232),_0x268908['label'],_0x5ac038['label']],[_0x28d42a(0x1ee),_0x268908['path'],_0x5ac038[_0x28d42a(0x1ee)]],[_0x28d42a(0x253),_0x268908[_0x28d42a(0x253)],_0x5ac038['url']],[_0x28d42a(0x213),_0x268908[_0x28d42a(0x213)],_0x5ac038[_0x28d42a(0x213)]],[_0x28d42a(0x219),_0x268908[_0x28d42a(0x219)],_0x5ac038[_0x28d42a(0x219)]],[_0x28d42a(0x224),_0x268908[_0x28d42a(0x224)],_0x5ac038[_0x28d42a(0x224)]],[_0x28d42a(0x216),_0x268908[_0x28d42a(0x216)],_0x5ac038[_0x28d42a(0x216)]],[_0x28d42a(0x20b),_0x268908[_0x28d42a(0x20b)],_0x5ac038[_0x28d42a(0x20b)]],[_0x28d42a(0x24c),_0x268908[_0x28d42a(0x24c)],_0x5ac038[_0x28d42a(0x24c)]],['pageId',_0x268908[_0x28d42a(0x221)],_0x5ac038[_0x28d42a(0x221)]],[_0x28d42a(0x249),_0x268908[_0x28d42a(0x249)],_0x5ac038[_0x28d42a(0x249)]],[_0x28d42a(0x242),_0x268908[_0x28d42a(0x242)],_0x5ac038['modelType']],[_0x28d42a(0x233),_0x268908[_0x28d42a(0x233)],_0x5ac038['datasetId']],[_0x28d42a(0x24f),_0x268908['datasetCode'],_0x5ac038['datasetCode']]];for(const [_0x3b1f98,_0x163bd9,_0x4b7e69]of _0x172d7e){assertVerified(sameValue(_0x163bd9,_0x4b7e69),_0x28d42a(0x243)+_0x5ac038['id']+'\x20'+_0x3b1f98+_0x28d42a(0x220));}}function sameValue(_0x3f7698,_0x35e613){const _0x264e01=a151_0x2c6522;if(Array[_0x264e01(0x22c)](_0x3f7698)||Array[_0x264e01(0x22c)](_0x35e613))return JSON[_0x264e01(0x252)](_0x3f7698)===JSON['stringify'](_0x35e613);return _0x3f7698===_0x35e613;}
|
|
1
|
+
const a175_0x533931=a175_0x2079;(function(_0x4ca04e,_0x3dce8c){const _0x2bc3e5=a175_0x2079,_0x5485cf=_0x4ca04e();while(!![]){try{const _0x509703=-parseInt(_0x2bc3e5(0x187))/0x1*(-parseInt(_0x2bc3e5(0x1f3))/0x2)+parseInt(_0x2bc3e5(0x1d9))/0x3+parseInt(_0x2bc3e5(0x1d4))/0x4+parseInt(_0x2bc3e5(0x1fd))/0x5*(-parseInt(_0x2bc3e5(0x1f4))/0x6)+parseInt(_0x2bc3e5(0x19d))/0x7+-parseInt(_0x2bc3e5(0x1b6))/0x8*(-parseInt(_0x2bc3e5(0x1ac))/0x9)+-parseInt(_0x2bc3e5(0x1c5))/0xa;if(_0x509703===_0x3dce8c)break;else _0x5485cf['push'](_0x5485cf['shift']());}catch(_0x1267ac){_0x5485cf['push'](_0x5485cf['shift']());}}}(a175_0x5a72,0x6e7f1));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a175_0x5a72(){const _0x45af0e=['resourcesValid','Menu\x20path\x20selector\x20not\x20found:\x20','label','flagMissing','path','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','verification','resources','url','before','Menu\x20id\x20selector(s)\x20not\x20found:\x20','2143834tblEoK','paths','plan','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','requestedVisible','\x20unchanged\x20menu(s).','code','map','isSafeInteger','\x20menu(s);\x20skip\x20','failed','expectVisible','boolean','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','40842WbLjsm','visibility-update','str','\x20visibility\x20update\x20could\x20not\x20be\x20verified','POST','childrenIds','menu_selector_not_found','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20failed.','type','1368iLJkQg','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','recovered','depth','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','validation','Selected\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','beforeById','pageType','childrenCount','false','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Response\x20was\x20lost\x20for\x20menu\x20','expectedCount','22046920eVllRV','menu','set','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','true','\x20updated,\x20','stringify','string','expected-count','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','datasetId','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','pageId','join','menus','1567288SvIuzx','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','trim','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','Response\x20was\x20lost\x20and\x20menu\x20','1049037CrflpE','cookie','Menu\x20','datasetCode','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','appCode','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Final\x20menu\x20visibility\x20readback\x20failed.','visible','\x20menu(s),\x20expected\x20','updated','\x20changed\x20unexpectedly.','filter','\x20must\x20be\x20true\x20or\x20false.','Would\x20update\x20visibility\x20for\x20','update-recovery','message','values','update\x20menu\x20visibility','push','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','targets','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','rabetbase\x20menu\x20list\x20--format\x20compress','menu_permission_denied','menu_expected_count_mismatch','2NkPqHK','6xLfCmH','modelType','menu_state_drift','length','/smartapi/menu/update','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','has','sort','byId','91625TfJanT','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','isArray','split','851849gChaua','parentId','menu-ids','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Requested\x20menu\x20visibility','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menu_verification_failed','expect-visible','get','num','plannedActions'];a175_0x5a72=function(){return _0x45af0e;};return a175_0x5a72();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a175_0x2079(_0x399968,_0x3d10bb){_0x399968=_0x399968-0x187;const _0x5a72f3=a175_0x5a72();let _0x2079b0=_0x5a72f3[_0x399968];return _0x2079b0;}const BACKEND=[{'method':'POST','path':a175_0x533931(0x1f8)}];export const menuVisibilityUpdate={'service':a175_0x533931(0x1c6),'command':a175_0x533931(0x1ad),'description':a175_0x533931(0x1aa),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a175_0x533931(0x189),'type':a175_0x533931(0x1cc),'description':a175_0x533931(0x1dd)},{'name':a175_0x533931(0x19e),'type':a175_0x533931(0x1cc),'description':a175_0x533931(0x1df)},{'name':'visible','type':a175_0x533931(0x1a9),'required':!![],'description':a175_0x533931(0x18b)},{'name':a175_0x533931(0x18e),'type':a175_0x533931(0x1a9),'description':a175_0x533931(0x1d0)},{'name':a175_0x533931(0x1cd),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bb526){parseInput(_0x2bb526),requireExplicitYes(_0x2bb526);},async 'dryRun'(_0x1db8b7){const _0x525e0e=a175_0x533931,_0x4da932=await buildPlan(_0x1db8b7,!![]),_0x1face8=_0x4da932[_0x525e0e(0x19f)][_0x525e0e(0x191)]?.['length']??0x0,_0x13d55c=_0x4da932['plan'][_0x525e0e(0x1ee)][_0x525e0e(0x1f7)]-_0x1face8;return menuDryRunResult(_0x4da932[_0x525e0e(0x19f)],{'method':_0x525e0e(0x1b0),'url':_0x525e0e(0x1f8),'body':{'updates':_0x4da932[_0x525e0e(0x19f)]['plannedActions']?.[_0x525e0e(0x1a4)](_0x5ea5c6=>_0x5ea5c6['body'])??[]},'description':_0x525e0e(0x1e7)+_0x1face8+_0x525e0e(0x1a6)+_0x13d55c+_0x525e0e(0x1a2)});},async 'execute'(_0x4075c6){const _0x3f841=a175_0x533931;requireExplicitYes(_0x4075c6);const _0x152200=await buildPlan(_0x4075c6,![]);await recheckMutationSnapshot(_0x4075c6,_0x152200[_0x3f841(0x19f)],_0x3f841(0x1eb));const _0x1271b8=[],_0x2c2b65=[],_0x5deeef=[];for(const _0x21bf4c of _0x152200[_0x3f841(0x19f)][_0x3f841(0x1ee)]){if(_0x21bf4c[_0x3f841(0x19b)][_0x3f841(0x1e1)]===_0x152200[_0x3f841(0x19f)][_0x3f841(0x1a1)]){_0x1271b8['push']({'id':_0x21bf4c['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4075c6[_0x3f841(0x1de)],_0x4075c6[_0x3f841(0x1da)],{'id':_0x21bf4c['id'],'visible':_0x152200[_0x3f841(0x19f)][_0x3f841(0x1a1)]}),_0x1271b8[_0x3f841(0x1ec)]({'id':_0x21bf4c['id'],'updated':!![],'skipped':![]});}catch(_0x377835){const _0x49c256=mapMenuApiError(_0x377835,'update\x20visibility\x20for',_0x21bf4c['id']);if(isMenuResponseLoss(_0x377835)&&_0x49c256[_0x3f841(0x1a3)]!==_0x3f841(0x1f1)){_0x5deeef['push'](_0x21bf4c['id']);continue;}_0x2c2b65['push']({'id':_0x21bf4c['id'],'stage':'update','code':_0x49c256['code'],'message':_0x49c256[_0x3f841(0x1e9)]});}}let _0x1e6998;try{_0x1e6998=await fetchMenuSnapshot(_0x4075c6[_0x3f841(0x1de)],_0x4075c6[_0x3f841(0x1da)]);}catch(_0x547b0e){const _0xf744a4=describeMenuErrorCause(_0x547b0e,'verify\x20menu\x20visibility\x20update'),_0x1df36d=_0x5deeef[_0x3f841(0x1a4)](_0x27c924=>({'id':_0x27c924,'stage':_0x3f841(0x1e8),'code':'menu_verification_failed','message':_0x3f841(0x1c3)+_0x27c924+_0x3f841(0x1fe),'requestedStateConfirmed':![],'recovered':![]})),_0x2213ec={'stage':_0x3f841(0x198),'code':_0x3f841(0x18d),'message':_0x3f841(0x1e0),'targetIds':_0x152200[_0x3f841(0x19f)][_0x3f841(0x1ee)][_0x3f841(0x1a4)](_0x28ffc2=>_0x28ffc2['id']),'requestedStateConfirmed':![],..._0xf744a4};throw menuFailure(asVerificationError(_0x547b0e,_0x3f841(0x1ba)),_0x152200[_0x3f841(0x19f)],{'stage':_0x3f841(0x198),'succeeded':_0x1271b8,'failedRecords':[..._0x2c2b65,..._0x1df36d,_0x2213ec],'warnings':[_0x3f841(0x18a)],'verification':{'status':_0x3f841(0x1a7),'recoveredCount':0x0,'lookupCommand':_0x3f841(0x1f0)}});}const _0x5653d9=[];for(const _0x15a656 of _0x1271b8){const _0xb8ee3f=Number(_0x15a656['id']),_0x307567=_0x152200[_0x3f841(0x1be)][_0x3f841(0x18f)](_0xb8ee3f),_0x34d7e4=_0x1e6998[_0x3f841(0x1fc)][_0x3f841(0x18f)](_0xb8ee3f);try{verifyVisibilityUpdate(_0x307567,_0x34d7e4,_0x152200['plan'][_0x3f841(0x1a1)]);}catch(_0x2b573b){const _0x48c577=asVerificationError(_0x2b573b,'Menu\x20'+_0xb8ee3f+_0x3f841(0x1af));_0x5653d9[_0x3f841(0x1ec)]({'id':_0xb8ee3f,'stage':'verification','code':_0x48c577['code'],'message':_0x48c577['message'],'requestedStateConfirmed':![]});}}for(const _0x1fba08 of _0x5deeef){const _0x1bc0b5=_0x152200['beforeById'][_0x3f841(0x18f)](_0x1fba08),_0x286326=_0x1e6998[_0x3f841(0x1fc)][_0x3f841(0x18f)](_0x1fba08);try{verifyVisibilityUpdate(_0x1bc0b5,_0x286326,_0x152200[_0x3f841(0x19f)][_0x3f841(0x1a1)]),_0x1271b8[_0x3f841(0x1ec)]({'id':_0x1fba08,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x49db6c){const _0x36a1cd=asVerificationError(_0x49db6c,_0x3f841(0x1d8)+_0x1fba08+_0x3f841(0x1f9));_0x5653d9[_0x3f841(0x1ec)]({'id':_0x1fba08,'stage':'update-recovery','code':_0x36a1cd[_0x3f841(0x1a3)],'message':_0x36a1cd[_0x3f841(0x1e9)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x5653d9[_0x3f841(0x1f7)]>0x0){const _0x442ed1=_0x5653d9['map'](_0x5514aa=>Number(_0x5514aa['id'])),_0x50ae0c=_0x1271b8[_0x3f841(0x1e5)](_0x459677=>_0x459677[_0x3f841(0x1b8)]===!![])['length'],_0x496f56=menuError(_0x3f841(0x18d),_0x3f841(0x1b7)+_0x442ed1[_0x3f841(0x1d2)](',\x20')+'.',_0x3f841(0x1ab));throw menuFailure(_0x496f56,_0x152200[_0x3f841(0x19f)],{'stage':_0x3f841(0x198),'succeeded':_0x1271b8,'failedRecords':[..._0x2c2b65,..._0x5653d9],'warnings':[_0x3f841(0x1ce)],'verification':{'status':_0x3f841(0x1a7),..._0x442ed1[_0x3f841(0x1f7)]===0x1?{'targetId':_0x442ed1[0x0]}:{'targetIds':_0x442ed1},'recoveredCount':_0x50ae0c,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3a8650=_0x1271b8['filter'](_0x19380d=>_0x19380d[_0x3f841(0x1e3)]===!![])['length'],_0x5e1edd=_0x1271b8['length']-_0x3a8650,_0x161323={..._0x152200['plan'],'succeeded':_0x1271b8,'failed':_0x2c2b65,'warnings':_0x2c2b65[_0x3f841(0x1f7)]>0x0?[..._0x152200[_0x3f841(0x19f)]['warnings'],_0x3f841(0x1d5)]:_0x152200[_0x3f841(0x19f)]['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x1e6998['hash'],'matchesRequestedState':_0x2c2b65[_0x3f841(0x1f7)]===0x0,'recoveredCount':_0x5deeef[_0x3f841(0x1f7)]}};return{'ok':_0x2c2b65['length']===0x0,'data':_0x161323,'message':_0x2c2b65['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x3a8650+'\x20menu(s);\x20skipped\x20'+_0x5e1edd+_0x3f841(0x1a2):'Menu\x20visibility\x20update\x20completed:\x20'+_0x3a8650+_0x3f841(0x1ca)+_0x5e1edd+'\x20skipped,\x20'+_0x2c2b65[_0x3f841(0x1f7)]+_0x3f841(0x1b4)};}};function parseInput(_0x28443f){const _0x22255d=a175_0x533931,_0x3ac765=parseMenuIds(_0x28443f[_0x22255d(0x1ae)](_0x22255d(0x189))),_0x1f1355=parseCsv(_0x28443f[_0x22255d(0x1ae)](_0x22255d(0x19e)));if(_0x3ac765[_0x22255d(0x1f7)]===0x0&&_0x1f1355['length']===0x0)throw CliErrors['validation'](_0x22255d(0x1c8));const _0x280cbe=parseBooleanFlag(_0x28443f,_0x22255d(0x1e1),!![]),_0x39fbcc=parseBooleanFlag(_0x28443f,_0x22255d(0x18e),![]);let _0x593318;if(hasFlag(_0x28443f,_0x22255d(0x1cd))){_0x593318=_0x28443f[_0x22255d(0x190)](_0x22255d(0x1cd));if(!Number[_0x22255d(0x1a5)](_0x593318)||_0x593318<0x0)throw CliErrors[_0x22255d(0x1bb)](_0x22255d(0x1b3));}return{'menuIds':_0x3ac765,'paths':_0x1f1355,'visible':_0x280cbe,'expectVisible':_0x39fbcc,'expectedCount':_0x593318};}async function buildPlan(_0x856712,_0x2e58b8){const _0x3cffcc=a175_0x533931,_0x3e2c50=parseInput(_0x856712),_0x2d88eb=await fetchMutationSnapshot(_0x856712,_0x3cffcc(0x1eb)),_0x30b3f1=selectTargets(_0x2d88eb[_0x3cffcc(0x1d3)],_0x3e2c50['menuIds'],_0x3e2c50[_0x3cffcc(0x19e)]);if(_0x3e2c50[_0x3cffcc(0x1c4)]!==undefined&&_0x30b3f1[_0x3cffcc(0x1f7)]!==_0x3e2c50[_0x3cffcc(0x1c4)])throw menuError(_0x3cffcc(0x1f2),_0x3cffcc(0x1bc)+_0x30b3f1[_0x3cffcc(0x1f7)]+_0x3cffcc(0x1e2)+_0x3e2c50['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x3e2c50[_0x3cffcc(0x1a8)]!==undefined){const _0x105fff=_0x30b3f1[_0x3cffcc(0x1e5)](_0x41e4b1=>_0x41e4b1['visible']!==_0x3e2c50[_0x3cffcc(0x1a8)]);if(_0x105fff['length']>0x0)throw menuError(_0x3cffcc(0x1f6),_0x3cffcc(0x1ed)+_0x105fff[_0x3cffcc(0x1a4)](_0x20e337=>_0x20e337['id'])[_0x3cffcc(0x1d2)](',\x20')+'.',_0x3cffcc(0x1ff));}const _0x3cf75a=_0x30b3f1[_0x3cffcc(0x1a4)](_0x406d14=>({'id':_0x406d14['id'],'label':_0x406d14['label'],'path':_0x406d14[_0x3cffcc(0x196)],'before':{'visible':_0x406d14[_0x3cffcc(0x1e1)]},'after':{'visible':_0x3e2c50[_0x3cffcc(0x1e1)]}})),_0x23e08a=_0x3cf75a[_0x3cffcc(0x1e5)](_0x3eff50=>_0x3eff50[_0x3cffcc(0x19b)][_0x3cffcc(0x1e1)]!==_0x3e2c50[_0x3cffcc(0x1e1)])[_0x3cffcc(0x1a4)](_0x24c159=>({'stage':'update-menu-visibility','method':_0x3cffcc(0x1b0),'path':'/smartapi/menu/update','body':{'appCode':_0x856712[_0x3cffcc(0x1de)],'id':_0x24c159['id'],'visible':_0x3e2c50['visible']}})),_0x1690e1=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3e2c50['menuIds'],'paths':_0x3e2c50[_0x3cffcc(0x19e)]},'before':{'menus':_0x30b3f1[_0x3cffcc(0x1a4)](_0x225b05=>({'id':_0x225b05['id'],'path':_0x225b05[_0x3cffcc(0x196)],'visible':_0x225b05[_0x3cffcc(0x1e1)]}))},'after':{'menus':_0x30b3f1[_0x3cffcc(0x1a4)](_0x1dc58c=>({'id':_0x1dc58c['id'],'path':_0x1dc58c[_0x3cffcc(0x196)],'visible':_0x3e2c50[_0x3cffcc(0x1e1)]}))},'dryRun':_0x2e58b8,'backend':[...BACKEND],'plannedActions':_0x23e08a,'snapshotHash':_0x2d88eb['hash'],'warnings':_0x23e08a[_0x3cffcc(0x1f7)]===0x0?[_0x3cffcc(0x197)]:[]});return{'plan':{..._0x1690e1,'requestedVisible':_0x3e2c50[_0x3cffcc(0x1e1)],'targets':_0x3cf75a},'beforeById':new Map(_0x30b3f1[_0x3cffcc(0x1a4)](_0x896867=>[_0x896867['id'],_0x896867]))};}function selectTargets(_0x343468,_0x47c7ca,_0x3978b3){const _0x21f516=a175_0x533931,_0x3f8f8e=new Map(_0x343468[_0x21f516(0x1a4)](_0xaa4807=>[_0xaa4807['id'],_0xaa4807])),_0x2ab04c=new Map(),_0x30abea=_0x47c7ca['filter'](_0x34af71=>!_0x3f8f8e[_0x21f516(0x1fa)](_0x34af71));if(_0x30abea[_0x21f516(0x1f7)]>0x0)throw menuError(_0x21f516(0x1b2),_0x21f516(0x19c)+_0x30abea[_0x21f516(0x1d2)](',\x20')+'.',_0x21f516(0x18c));for(const _0x2afe15 of _0x47c7ca){_0x2ab04c[_0x21f516(0x1c7)](_0x2afe15,_0x3f8f8e[_0x21f516(0x18f)](_0x2afe15));}for(const _0x477691 of _0x3978b3){const _0x3cc1a3=_0x343468[_0x21f516(0x1e5)](_0x5761ce=>_0x5761ce[_0x21f516(0x196)]===_0x477691);if(_0x3cc1a3[_0x21f516(0x1f7)]===0x0)throw menuError(_0x21f516(0x1b2),_0x21f516(0x193)+JSON[_0x21f516(0x1cb)](_0x477691)+'.',_0x21f516(0x1bd));if(_0x3cc1a3[_0x21f516(0x1f7)]>0x1)throw menuError('menu_selector_ambiguous',_0x21f516(0x1c2)+JSON[_0x21f516(0x1cb)](_0x477691)+'.',_0x21f516(0x1d7)+_0x3cc1a3[_0x21f516(0x1a4)](_0x3af806=>_0x3af806['id'])[_0x21f516(0x1d2)](',\x20')+'.');const _0xc8e240=_0x3cc1a3[0x0];_0x2ab04c[_0x21f516(0x1c7)](_0xc8e240['id'],_0xc8e240);}return[..._0x2ab04c[_0x21f516(0x1ea)]()];}function parseMenuIds(_0x3b0074){const _0x38b904=a175_0x533931,_0x2f0783=parseCsv(_0x3b0074),_0x4def7e=_0x2f0783[_0x38b904(0x1a4)](Number);if(_0x4def7e['some'](_0x1a3265=>!Number['isSafeInteger'](_0x1a3265)||_0x1a3265<=0x0))throw CliErrors[_0x38b904(0x1bb)](_0x38b904(0x200));return[...new Set(_0x4def7e)];}function parseCsv(_0x5446b0){const _0x342342=a175_0x533931;return[...new Set(_0x5446b0[_0x342342(0x202)](',')['map'](_0x4b1c32=>_0x4b1c32[_0x342342(0x1d6)]())['filter'](Boolean))];}function parseBooleanFlag(_0x469cb7,_0x53e518,_0x125568){const _0x36975a=a175_0x533931;if(!hasFlag(_0x469cb7,_0x53e518)){if(_0x125568)throw CliErrors[_0x36975a(0x195)](_0x53e518);return undefined;}const _0x13e9c6=_0x469cb7['rawFlags'][_0x53e518];if(_0x13e9c6===!![]||_0x13e9c6===![])return _0x13e9c6;if(_0x13e9c6===_0x36975a(0x1c9))return!![];if(_0x13e9c6===_0x36975a(0x1c1))return![];throw CliErrors[_0x36975a(0x1bb)]('--'+_0x53e518+_0x36975a(0x1e6));}function verifyVisibilityUpdate(_0x1534fd,_0x4d3333,_0x250b63){const _0x2d7454=a175_0x533931;assertVerified(!!_0x4d3333,_0x2d7454(0x1db)+_0x1534fd['id']+_0x2d7454(0x1a0)),assertVerified(_0x4d3333[_0x2d7454(0x1e1)]===_0x250b63,_0x2d7454(0x1db)+_0x1534fd['id']+_0x2d7454(0x1ef));const _0x10b2fc=[['id',_0x4d3333['id'],_0x1534fd['id']],['parentId',_0x4d3333[_0x2d7454(0x188)],_0x1534fd[_0x2d7454(0x188)]],[_0x2d7454(0x1b9),_0x4d3333['depth'],_0x1534fd['depth']],[_0x2d7454(0x194),_0x4d3333[_0x2d7454(0x194)],_0x1534fd['label']],[_0x2d7454(0x196),_0x4d3333[_0x2d7454(0x196)],_0x1534fd['path']],[_0x2d7454(0x19a),_0x4d3333[_0x2d7454(0x19a)],_0x1534fd[_0x2d7454(0x19a)]],[_0x2d7454(0x1b5),_0x4d3333['type'],_0x1534fd[_0x2d7454(0x1b5)]],[_0x2d7454(0x1fb),_0x4d3333['sort'],_0x1534fd[_0x2d7454(0x1fb)]],[_0x2d7454(0x199),_0x4d3333[_0x2d7454(0x199)],_0x1534fd['resources']],['resourcesValid',_0x4d3333[_0x2d7454(0x192)],_0x1534fd[_0x2d7454(0x192)]],['childrenIds',_0x4d3333[_0x2d7454(0x1b1)],_0x1534fd['childrenIds']],[_0x2d7454(0x1c0),_0x4d3333['childrenCount'],_0x1534fd[_0x2d7454(0x1c0)]],[_0x2d7454(0x1d1),_0x4d3333['pageId'],_0x1534fd['pageId']],[_0x2d7454(0x1bf),_0x4d3333[_0x2d7454(0x1bf)],_0x1534fd['pageType']],[_0x2d7454(0x1f5),_0x4d3333[_0x2d7454(0x1f5)],_0x1534fd[_0x2d7454(0x1f5)]],[_0x2d7454(0x1cf),_0x4d3333['datasetId'],_0x1534fd[_0x2d7454(0x1cf)]],['datasetCode',_0x4d3333[_0x2d7454(0x1dc)],_0x1534fd['datasetCode']]];for(const [_0x532bc5,_0x401a7e,_0x529503]of _0x10b2fc){assertVerified(sameValue(_0x401a7e,_0x529503),'Menu\x20'+_0x1534fd['id']+'\x20'+_0x532bc5+_0x2d7454(0x1e4));}}function sameValue(_0x1bff84,_0x183487){const _0x4cd0c1=a175_0x533931;if(Array[_0x4cd0c1(0x201)](_0x1bff84)||Array[_0x4cd0c1(0x201)](_0x183487))return JSON[_0x4cd0c1(0x1cb)](_0x1bff84)===JSON[_0x4cd0c1(0x1cb)](_0x183487);return _0x1bff84===_0x183487;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a176_0x2ecb6b=a176_0x1a41;function a176_0x1a41(_0x4f35ef,_0xef725f){_0x4f35ef=_0x4f35ef-0x65;const _0x589747=a176_0x5897();let _0x1a41ca=_0x589747[_0x4f35ef];return _0x1a41ca;}(function(_0x4ee58b,_0x4f427e){const _0x5cc87b=a176_0x1a41,_0x2df67c=_0x4ee58b();while(!![]){try{const _0x5f4625=parseInt(_0x5cc87b(0x6d))/0x1+parseInt(_0x5cc87b(0x66))/0x2*(-parseInt(_0x5cc87b(0x6f))/0x3)+-parseInt(_0x5cc87b(0x6a))/0x4+-parseInt(_0x5cc87b(0x68))/0x5+-parseInt(_0x5cc87b(0x6c))/0x6+parseInt(_0x5cc87b(0x72))/0x7*(-parseInt(_0x5cc87b(0x84))/0x8)+parseInt(_0x5cc87b(0x83))/0x9;if(_0x5f4625===_0x4f427e)break;else _0x2df67c['push'](_0x2df67c['shift']());}catch(_0x282ef3){_0x2df67c['push'](_0x2df67c['shift']());}}}(a176_0x5897,0x35e85));function a176_0x5897(){const _0x1416e8=['configName','write','input','channelType',';\x20do\x20not\x20resubmit.','appCode','channelConfig','13047804CLSaWU','8UrCOJT','notification','mutation','8278ChdXwR','configCode','2126715nlMETr','verification','1415112ViVskj','document','1718856yeURur','181119vftMUC','/notification/channel-config/create','198BfRawg','Created\x20notification\x20config\x20','Inspect\x20with\x20','499093UJmbzi','config-create','POST','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification_config_create_outcome_unknown','connectTimeout','create','readTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','endpointUrl'];a176_0x5897=function(){return _0x1416e8;};return a176_0x5897();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a176_0x2ecb6b(0x6e);async function prepareCreate(_0x3295f9){const _0x1e7552=a176_0x2ecb6b,_0xde7005=await readNotificationDocument(_0x3295f9,_0x1e7552(0x78)),_0x3d3495=createMutationInput(_0x3295f9[_0x1e7552(0x81)],_0xde7005);return{'document':_0xde7005,'input':_0x3d3495,'planned':projectNotificationConfig({'appCode':_0x3295f9[_0x1e7552(0x81)],'configName':_0xde7005[_0x1e7552(0x7c)],'channelType':_0xde7005[_0x1e7552(0x7f)],'endpointUrl':_0xde7005[_0x1e7552(0x7b)],'channelConfig':_0xde7005[_0x1e7552(0x82)],'description':_0xde7005['description'],'connectTimeout':_0xde7005[_0x1e7552(0x77)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xde7005[_0x1e7552(0x79)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a176_0x2ecb6b(0x85),'command':a176_0x2ecb6b(0x73),'description':a176_0x2ecb6b(0x7a),'risk':a176_0x2ecb6b(0x7d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x494dd2){assertSingleNotificationSource(_0x494dd2);},async 'dryRun'(_0xeed35c){const _0x196a26=a176_0x2ecb6b,_0x2a44e8=await prepareCreate(_0xeed35c),_0x189023=notificationLookupCommand(_0xeed35c['appCode'],_0x2a44e8[_0x196a26(0x6b)][_0x196a26(0x7f)]);return asDryRunResult({'operation':_0x196a26(0x78),'selector':{'appCode':_0xeed35c[_0x196a26(0x81)],'configName':_0x2a44e8[_0x196a26(0x6b)][_0x196a26(0x7c)],'channelType':_0x2a44e8['document']['channelType']},'before':null,'after':_0x2a44e8['planned'],'dryRun':!![],'backend':{'method':_0x196a26(0x74),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x189023}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x1f57ef){const _0xdbcf32=a176_0x2ecb6b,_0x4155c3=await prepareCreate(_0x1f57ef),_0x47da81=notificationLookupCommand(_0x1f57ef[_0xdbcf32(0x81)],_0x4155c3['document'][_0xdbcf32(0x7f)]);let _0x41269e;try{_0x41269e=await createNotificationChannelConfig(_0x4155c3[_0xdbcf32(0x7e)]);}catch(_0x9f12bf){if(isPlatformTransportFailure(_0x9f12bf))throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Inspect\x20with\x20'+_0x47da81+_0xdbcf32(0x80));throw safeApiFailure(_0xdbcf32(0x78),_0xdbcf32(0x65),'Inspect\x20with\x20'+_0x47da81+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number['isSafeInteger'](_0x41269e)||_0x41269e<=0x0)throw notificationError(_0xdbcf32(0x76),_0xdbcf32(0x75),_0xdbcf32(0x71)+_0x47da81+_0xdbcf32(0x80));let _0x9a00bb;try{const _0x4309a3=await getNotificationChannelConfig(_0x41269e,_0x1f57ef[_0xdbcf32(0x81)]);_0x9a00bb=normalizeExactNotificationConfig(_0x4309a3,_0x41269e,_0x1f57ef[_0xdbcf32(0x81)]);}catch{throw safeApiFailure('create',_0xdbcf32(0x69),_0xdbcf32(0x71)+_0x47da81+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0xdbcf32(0x78),'selector':{'appCode':_0x9a00bb[_0xdbcf32(0x81)],'id':_0x9a00bb['id'],'configCode':_0x9a00bb[_0xdbcf32(0x67)],'configName':_0x9a00bb[_0xdbcf32(0x7c)],'channelType':_0x9a00bb[_0xdbcf32(0x7f)]},'before':null,'after':projectNotificationConfig(_0x9a00bb),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x47da81}},'message':_0xdbcf32(0x70)+_0x9a00bb['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a177_0x3519af=a177_0x4184;(function(_0x575b9d,_0x3d8f3b){const _0x1b8e7c=a177_0x4184,_0x2669a9=_0x575b9d();while(!![]){try{const _0x31741b=-parseInt(_0x1b8e7c(0x131))/0x1+parseInt(_0x1b8e7c(0x145))/0x2+parseInt(_0x1b8e7c(0x144))/0x3*(-parseInt(_0x1b8e7c(0x129))/0x4)+parseInt(_0x1b8e7c(0x12c))/0x5+-parseInt(_0x1b8e7c(0x137))/0x6*(-parseInt(_0x1b8e7c(0x136))/0x7)+parseInt(_0x1b8e7c(0x134))/0x8+-parseInt(_0x1b8e7c(0x141))/0x9*(parseInt(_0x1b8e7c(0x139))/0xa);if(_0x31741b===_0x3d8f3b)break;else _0x2669a9['push'](_0x2669a9['shift']());}catch(_0x14399a){_0x2669a9['push'](_0x2669a9['shift']());}}}(a177_0x1f5c,0xa263e));import{asDryRunResult}from'../../commands/common/dry-run.js';function a177_0x4184(_0x40f59e,_0x397e63){_0x40f59e=_0x40f59e-0x129;const _0x1f5cb1=a177_0x1f5c();let _0x418479=_0x1f5cb1[_0x40f59e];return _0x418479;}function a177_0x1f5c(){const _0x5c5e7d=['500hqEBCt','delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','POST','notification_config_delete_outcome_unknown','notification_config_delete_verification_unavailable','\x20remains\x20present\x20after\x20delete.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','188739ireAaN','channelType','before','63027yFVyYh','2546900ZuaIZj','unshift','156qHkWFC','planned','Deleted\x20notification\x20config\x20','2301745OUmkSn','\x20delete\x20could\x20not\x20be\x20verified.','appCode','Notification\x20config\x20','notification','512404bAtZqB','some','notification_config_delete_verification_failed','3493728zmrEzc','config-delete','14FvYhUE','2624820lOYKyC','Inspect\x20with\x20'];a177_0x1f5c=function(){return _0x5c5e7d;};return a177_0x1f5c();}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='/notification/channel-config/delete',REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x1ff452){const _0x8da82f=a177_0x4184,_0x1b07c5=readNotificationId(_0x1ff452),_0x4a20b8=await requireExactNotificationConfig(_0x1ff452['appCode'],_0x1b07c5,_0x8da82f(0x13a));return{'id':_0x1b07c5,'before':_0x4a20b8};}export const notificationConfigDelete={'service':a177_0x3519af(0x130),'command':a177_0x3519af(0x135),'description':a177_0x3519af(0x140),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x41f0b5){readNotificationId(_0x41f0b5),requireNotificationExplicitYes(_0x41f0b5);},async 'dryRun'(_0x44a1c6){const _0x2c2e98=a177_0x3519af,_0x210fef=await prepareDelete(_0x44a1c6),_0x4b549d=notificationLookupCommand(_0x44a1c6[_0x2c2e98(0x12e)],_0x210fef[_0x2c2e98(0x143)][_0x2c2e98(0x142)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x210fef['before']),'before':projectNotificationConfig(_0x210fef['before']),'after':null,'dryRun':!![],'backend':{'method':_0x2c2e98(0x13c),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x2c2e98(0x12a),'lookupCommand':_0x4b549d}},{'method':_0x2c2e98(0x13c),'url':DELETE_PATH});},async 'execute'(_0x54e690){const _0x12ac0c=a177_0x3519af;requireNotificationExplicitYes(_0x54e690);const _0x5d1741=await prepareDelete(_0x54e690),_0x235b9e=notificationLookupCommand(_0x54e690[_0x12ac0c(0x12e)],_0x5d1741['before'][_0x12ac0c(0x142)]);let _0x1c6f1e=![];try{await deleteNotificationChannelConfig(_0x5d1741['id'],_0x54e690[_0x12ac0c(0x12e)]);}catch(_0x652415){if(!isPlatformTransportFailure(_0x652415))throw safeApiFailure(_0x12ac0c(0x13a),'mutation',_0x12ac0c(0x138)+_0x235b9e+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x1c6f1e=!![];}let _0x1a3227;try{_0x1a3227=await listNotificationChannelConfigs(_0x54e690['appCode'],_0x5d1741[_0x12ac0c(0x143)][_0x12ac0c(0x142)]),validateNotificationDeleteReadback(_0x1a3227,_0x54e690[_0x12ac0c(0x12e)],_0x5d1741[_0x12ac0c(0x143)][_0x12ac0c(0x142)]);}catch{throw notificationError(_0x1c6f1e?'notification_config_delete_outcome_unknown':_0x12ac0c(0x13e),_0x12ac0c(0x12f)+_0x5d1741['id']+_0x12ac0c(0x12d),'Inspect\x20with\x20'+_0x235b9e+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x1a3227[_0x12ac0c(0x132)](_0x4e2b62=>_0x4e2b62['id']===_0x5d1741['id']))throw notificationError(_0x1c6f1e?_0x12ac0c(0x13d):_0x12ac0c(0x133),_0x12ac0c(0x12f)+_0x5d1741['id']+_0x12ac0c(0x13f),'Inspect\x20with\x20'+_0x235b9e+';\x20do\x20not\x20resubmit\x20automatically.');const _0x119bf1=[REFERENCE_WARNING];return _0x1c6f1e&&_0x119bf1[_0x12ac0c(0x146)](_0x12ac0c(0x13b)),{'ok':!![],'data':{'operation':_0x12ac0c(0x13a),'selector':notificationSelector(_0x5d1741[_0x12ac0c(0x143)]),'before':projectNotificationConfig(_0x5d1741[_0x12ac0c(0x143)]),'after':null,'dryRun':![],'backend':{'method':_0x12ac0c(0x13c),'path':DELETE_PATH},'warnings':_0x119bf1,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1c6f1e,'lookupCommand':_0x235b9e}},'message':_0x12ac0c(0x12b)+_0x5d1741['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a178_0x23e7(_0x5580f1,_0x144a35){_0x5580f1=_0x5580f1-0x144;const _0x2f910c=a178_0x2f91();let _0x23e7aa=_0x2f910c[_0x5580f1];return _0x23e7aa;}const a178_0x3d9166=a178_0x23e7;(function(_0x2e88ba,_0x18f7ed){const _0xddcfc=a178_0x23e7,_0xb72e65=_0x2e88ba();while(!![]){try{const _0x20de4c=-parseInt(_0xddcfc(0x15f))/0x1+parseInt(_0xddcfc(0x154))/0x2*(-parseInt(_0xddcfc(0x148))/0x3)+-parseInt(_0xddcfc(0x155))/0x4*(-parseInt(_0xddcfc(0x14c))/0x5)+-parseInt(_0xddcfc(0x152))/0x6*(parseInt(_0xddcfc(0x15b))/0x7)+-parseInt(_0xddcfc(0x150))/0x8+parseInt(_0xddcfc(0x14f))/0x9*(parseInt(_0xddcfc(0x144))/0xa)+parseInt(_0xddcfc(0x159))/0xb;if(_0x20de4c===_0x18f7ed)break;else _0xb72e65['push'](_0xb72e65['shift']());}catch(_0x510db8){_0xb72e65['push'](_0xb72e65['shift']());}}}(a178_0x2f91,0xd2130));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a178_0x2f91(){const _0x38f27f=['Notification\x20channel\x20type','48UWrZPs','length','1925604IMwxsi','4267972RelqhR','trim','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','bool','22030008cmLqwQ','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','90517JiTonY','map','boolean','all','793419xucYUx','string','Found\x20','4000310KzdjMZ','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','flat','type','3mbXgjW','\x20notification\x20config(s)','notification','appCode','5rhqvvA','config-list','str','18zZvEzl','9197200MrEMlK'];a178_0x2f91=function(){return _0x38f27f;};return a178_0x2f91();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a178_0x3d9166(0x14a),'command':a178_0x3d9166(0x14d),'description':a178_0x3d9166(0x157),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a178_0x3d9166(0x160),'description':a178_0x3d9166(0x151),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x3d9166(0x15e),'type':a178_0x3d9166(0x15d),'default':![],'description':a178_0x3d9166(0x15a)}],async 'validate'(_0x54d7a9){const _0x4fa941=a178_0x3d9166;if(_0x54d7a9[_0x4fa941(0x158)]('all')&&_0x54d7a9[_0x4fa941(0x14e)](_0x4fa941(0x147))[_0x4fa941(0x156)]())throw CliErrors['validation']('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x4fa941(0x145));if(_0x54d7a9[_0x4fa941(0x158)](_0x4fa941(0x15e)))return;readNotificationChannelType(_0x54d7a9);},async 'execute'(_0x33ec98){const _0x23a3d0=a178_0x3d9166;if(_0x33ec98[_0x23a3d0(0x158)]('all')){const _0x1ec3f6=await Promise[_0x23a3d0(0x15e)](NOTIFICATION_CHANNEL_TYPES[_0x23a3d0(0x15c)](_0x36921d=>listNotificationChannelConfigs(_0x33ec98[_0x23a3d0(0x14b)],_0x36921d))),_0x11e626=_0x1ec3f6[_0x23a3d0(0x146)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x33ec98['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x11e626['length'],'configs':_0x11e626},'message':_0x23a3d0(0x161)+_0x11e626[_0x23a3d0(0x153)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x1c09d3=readNotificationChannelType(_0x33ec98),_0x1b44d6=await listNotificationChannelConfigs(_0x33ec98[_0x23a3d0(0x14b)],_0x1c09d3),_0x29c48f=_0x1b44d6[_0x23a3d0(0x15c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x33ec98[_0x23a3d0(0x14b)],'channelType':_0x1c09d3,'count':_0x29c48f[_0x23a3d0(0x153)],'configs':_0x29c48f},'message':_0x23a3d0(0x161)+_0x29c48f[_0x23a3d0(0x153)]+'\x20'+_0x1c09d3+_0x23a3d0(0x149)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x3bacbd=a179_0x5797;(function(_0x215e09,_0x2ca505){const _0x18eca0=a179_0x5797,_0x5e9e32=_0x215e09();while(!![]){try{const _0x170688=-parseInt(_0x18eca0(0x152))/0x1+parseInt(_0x18eca0(0x14e))/0x2+parseInt(_0x18eca0(0x14b))/0x3+-parseInt(_0x18eca0(0x146))/0x4+parseInt(_0x18eca0(0x149))/0x5*(-parseInt(_0x18eca0(0x148))/0x6)+-parseInt(_0x18eca0(0x13c))/0x7+parseInt(_0x18eca0(0x156))/0x8*(parseInt(_0x18eca0(0x14f))/0x9);if(_0x170688===_0x2ca505)break;else _0x5e9e32['push'](_0x5e9e32['shift']());}catch(_0x127b6a){_0x5e9e32['push'](_0x5e9e32['shift']());}}}(a179_0x2aae,0xd1b82));import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x5797(_0xe4506a,_0x268e25){_0xe4506a=_0xe4506a-0x139;const _0x2aae6c=a179_0x2aae();let _0x5797c2=_0x2aae6c[_0xe4506a];return _0x5797c2;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';function a179_0x2aae(){const _0x59872b=['Inspect\x20with\x20--id\x20','2858660CcgTgS','notification_config_update_outcome_unknown','2482212ncLpza','15IzUxPD','notification','5021064WPSjpA','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','POST','1259378nBwndt','14367105QBqhoo','verified','Updated\x20notification\x20config\x20','1622986yLWGBM','patch','verifiedFields','before','16IXLxbg','config-update','\x20with\x20','provesChange','update',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_verification_unavailable','Inspect\x20ID\x20','mutation','\x20via\x20','7408100KFLXLy','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','planned','appCode','channelType','payload','notification_config_update_verification_failed'];a179_0x2aae=function(){return _0x59872b;};return a179_0x2aae();}async function prepareUpdate(_0x2ac079){const _0x3bb2b1=a179_0x5797,_0x4402d6=readNotificationId(_0x2ac079),_0x5b36ef=await readNotificationDocument(_0x2ac079,_0x3bb2b1(0x15a)),_0x567ad2=await requireExactNotificationConfig(_0x2ac079[_0x3bb2b1(0x141)],_0x4402d6,_0x3bb2b1(0x15a));return{'id':_0x4402d6,'patch':_0x5b36ef,'before':_0x567ad2,'payload':mergeUpdateInput(_0x567ad2,_0x5b36ef),'planned':plannedUpdateProjection(_0x567ad2,_0x5b36ef)};}export const notificationConfigUpdate={'service':a179_0x3bacbd(0x14a),'command':a179_0x3bacbd(0x157),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3b7001){readNotificationId(_0x3b7001),assertSingleNotificationSource(_0x3b7001),requireNotificationExplicitYes(_0x3b7001);},async 'dryRun'(_0x2ff77c){const _0x436582=a179_0x3bacbd,_0x30d522=await prepareUpdate(_0x2ff77c),_0x43cd9f=notificationLookupCommand(_0x2ff77c['appCode'],_0x30d522[_0x436582(0x155)]['channelType']);return asDryRunResult({'operation':_0x436582(0x15a),'selector':notificationSelector(_0x30d522[_0x436582(0x155)]),'before':projectNotificationConfig(_0x30d522[_0x436582(0x155)]),'after':_0x30d522[_0x436582(0x140)],'dryRun':!![],'backend':{'method':_0x436582(0x14d),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x436582(0x140),'lookupCommand':_0x43cd9f}},{'method':_0x436582(0x14d),'url':UPDATE_PATH});},async 'execute'(_0x47d2e9){const _0x4b046f=a179_0x3bacbd;requireNotificationExplicitYes(_0x47d2e9);const _0x453f8d=await prepareUpdate(_0x47d2e9),_0x3a83a8=notificationLookupCommand(_0x47d2e9['appCode'],_0x453f8d[_0x4b046f(0x155)][_0x4b046f(0x142)]);let _0x1359a3=![];try{await updateNotificationChannelConfig(_0x453f8d[_0x4b046f(0x143)]);}catch(_0x13fc8e){if(!isPlatformTransportFailure(_0x13fc8e))throw safeApiFailure(_0x4b046f(0x15a),_0x4b046f(0x13a),_0x4b046f(0x139)+_0x453f8d['id']+_0x4b046f(0x158)+_0x3a83a8+_0x4b046f(0x13e));_0x1359a3=!![];}let _0x1a31e0;try{const _0x3f3b8f=await getNotificationChannelConfig(_0x453f8d['id'],_0x47d2e9[_0x4b046f(0x141)]);_0x1a31e0=normalizeExactNotificationConfig(_0x3f3b8f,_0x453f8d['id'],_0x47d2e9['appCode']);}catch{throw notificationError(_0x1359a3?_0x4b046f(0x147):_0x4b046f(0x15c),_0x4b046f(0x13f)+_0x453f8d['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x4b046f(0x145)+_0x453f8d['id']+_0x4b046f(0x13b)+_0x3a83a8+_0x4b046f(0x15b));}const _0xbb5f3=requestedSafeFieldsMatch(_0x453f8d[_0x4b046f(0x155)],_0x1a31e0,_0x453f8d[_0x4b046f(0x153)]);if(!_0xbb5f3['allMatch']||_0x1359a3&&!_0xbb5f3[_0x4b046f(0x159)])throw notificationError(_0x1359a3?_0x4b046f(0x147):_0x4b046f(0x144),_0x4b046f(0x13f)+_0x453f8d['id']+_0x4b046f(0x14c),_0x4b046f(0x145)+_0x453f8d['id']+_0x4b046f(0x13b)+_0x3a83a8+_0x4b046f(0x15b));const _0x511df5=_0x1359a3?[_0x4b046f(0x13d)]:[];return{'ok':!![],'data':{'operation':_0x4b046f(0x15a),'selector':notificationSelector(_0x1a31e0),'before':projectNotificationConfig(_0x453f8d[_0x4b046f(0x155)]),'after':projectNotificationConfig(_0x1a31e0),'dryRun':![],'backend':{'method':_0x4b046f(0x14d),'path':UPDATE_PATH},'warnings':_0x511df5,'verification':{'status':_0x4b046f(0x150),'recoveredAfterUnknownResponse':_0x1359a3,'verifiedFields':_0xbb5f3[_0x4b046f(0x154)],'lookupCommand':_0x3a83a8}},'message':_0x4b046f(0x151)+_0x1a31e0['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9753e6,_0x4beefb){const _0x467394=a180_0x2949,_0x5ab27d=_0x9753e6();while(!![]){try{const _0xcd679c=-parseInt(_0x467394(0x1a8))/0x1+parseInt(_0x467394(0x1aa))/0x2*(-parseInt(_0x467394(0x1a5))/0x3)+parseInt(_0x467394(0x1a7))/0x4+parseInt(_0x467394(0x1a4))/0x5+parseInt(_0x467394(0x1a2))/0x6*(-parseInt(_0x467394(0x1ac))/0x7)+parseInt(_0x467394(0x1a9))/0x8*(-parseInt(_0x467394(0x1a3))/0x9)+parseInt(_0x467394(0x1ab))/0xa*(parseInt(_0x467394(0x1a6))/0xb);if(_0xcd679c===_0x4beefb)break;else _0x5ab27d['push'](_0x5ab27d['shift']());}catch(_0x16ad99){_0x5ab27d['push'](_0x5ab27d['shift']());}}}(a180_0x2885,0xad887));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 a180_0x2949(_0x36cb86,_0x56c6d5){_0x36cb86=_0x36cb86-0x1a2;const _0x28850f=a180_0x2885();let _0x294951=_0x28850f[_0x36cb86];return _0x294951;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a180_0x2885(){const _0xffb8c4=['30CJGXtM','2079oJWtYf','398732pxIGpR','643962SsQQLy','241808HUYUji','131302QusoeX','90190AsOraH','35lubdiR','168780EYrOJo','198moxOCQ','5063055vlwLgJ'];a180_0x2885=function(){return _0xffb8c4;};return a180_0x2885();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a157_0x959504=a157_0x19c8;(function(_0x15a06a,_0x56c516){const _0x2fbef2=a157_0x19c8,_0x187767=_0x15a06a();while(!![]){try{const _0x5a82ef=-parseInt(_0x2fbef2(0x228))/0x1*(-parseInt(_0x2fbef2(0x225))/0x2)+-parseInt(_0x2fbef2(0x21b))/0x3+parseInt(_0x2fbef2(0x1f2))/0x4+-parseInt(_0x2fbef2(0x1d6))/0x5+-parseInt(_0x2fbef2(0x1e9))/0x6+-parseInt(_0x2fbef2(0x23d))/0x7*(parseInt(_0x2fbef2(0x1f0))/0x8)+parseInt(_0x2fbef2(0x220))/0x9*(parseInt(_0x2fbef2(0x1dc))/0xa);if(_0x5a82ef===_0x56c516)break;else _0x187767['push'](_0x187767['shift']());}catch(_0x15e209){_0x187767['push'](_0x187767['shift']());}}}(a157_0x1fc0,0x542e1));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x959504(0x21a),a157_0x959504(0x1d8),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a157_0x959504(0x224),a157_0x959504(0x205),a157_0x959504(0x21f),a157_0x959504(0x22e),a157_0x959504(0x22a)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x959504(0x234),'recipients',a157_0x959504(0x1db),'bccList','replyTo',a157_0x959504(0x22f),a157_0x959504(0x209),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x959504(0x204),'type':'string','required':![],'description':a157_0x959504(0x1f1)},{'name':a157_0x959504(0x20f),'type':a157_0x959504(0x1d1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x959504(0x1d0),'type':a157_0x959504(0x20b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x959504(0x23b),'required':!![],'description':a157_0x959504(0x1e6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2588f8,_0x2057d0,_0xa0b41a){return new CliError(_0x2588f8,0x1,_0x2057d0,_0xa0b41a);}export function readNotificationId(_0x2be0b4){const _0x4c3b2f=a157_0x959504,_0x398358=_0x2be0b4[_0x4c3b2f(0x1da)]('id');if(!Number[_0x4c3b2f(0x23e)](_0x398358)||_0x398358<=0x0)throw notificationError(_0x4c3b2f(0x229),_0x4c3b2f(0x1ed));return _0x398358;}export function requireNotificationExplicitYes(_0x20f0ef){const _0x28100a=a157_0x959504;if(_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x1ce))||_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x227)))return;throw notificationError(_0x28100a(0x223),_0x28100a(0x1d2),_0x28100a(0x22b));}export function readNotificationChannelType(_0x55068b,_0x144f09=a157_0x959504(0x1cc),_0x5a2abd='EMAIL'){const _0x95a55b=a157_0x959504,_0x4c0fc=_0x55068b[_0x95a55b(0x1cd)](_0x144f09)['trim']()||_0x5a2abd;if(!NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x1ee)](_0x4c0fc))throw CliErrors['validation'](_0x95a55b(0x1c9)+_0x144f09+':\x20'+_0x4c0fc,_0x95a55b(0x21d)+NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x221)](',\x20')+'.');return _0x4c0fc;}export function assertSingleNotificationSource(_0x371a24){const _0x1437ff=a157_0x959504,_0x1267e3=[],_0x33da40=_0x371a24[_0x1437ff(0x1cd)](_0x1437ff(0x204))[_0x1437ff(0x241)]();if(_0x33da40)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x204),'path':_0x33da40});if(_0x371a24['bool'](_0x1437ff(0x20f)))_0x1267e3['push']({'kind':_0x1437ff(0x20f)});const _0x5f27a4=_0x371a24[_0x1437ff(0x1cd)]('from-env')[_0x1437ff(0x241)]();if(_0x5f27a4)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x232),'name':_0x5f27a4});if(_0x1267e3[_0x1437ff(0x240)]===0x0)throw CliErrors['validation'](_0x1437ff(0x1ea),_0x1437ff(0x1e8));if(_0x1267e3[_0x1437ff(0x240)]>0x1)throw CliErrors[_0x1437ff(0x23f)](_0x1437ff(0x1f4),_0x1437ff(0x1e8));return _0x1267e3[0x0];}export async function readNotificationDocument(_0x3d7d31,_0x33b83d){const _0x468b01=a157_0x959504,_0x5605f4=assertSingleNotificationSource(_0x3d7d31),_0x3ccb36=_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204)?_0x468b01(0x239)+_0x5605f4[_0x468b01(0x20a)]:_0x5605f4['kind']===_0x468b01(0x232)?_0x468b01(0x237)+_0x5605f4[_0x468b01(0x211)]:_0x468b01(0x20f);let _0x4bf735;try{if(_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204))_0x4bf735=await readFile(_0x5605f4[_0x468b01(0x20a)],_0x468b01(0x1e2));else{if(_0x5605f4['kind']===_0x468b01(0x232)){if(!(_0x5605f4[_0x468b01(0x211)]in process.env))throw notificationError(_0x468b01(0x21e),_0x468b01(0x1f6)+_0x5605f4['name']);_0x4bf735=process.env[_0x5605f4.name]??'';}else _0x4bf735=await readStdin();}}catch(_0x438a8d){if(_0x438a8d instanceof CliError)throw _0x438a8d;throw notificationError(_0x468b01(0x21e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3ccb36+'.');}let _0x2ab1f5;try{_0x2ab1f5=JSON[_0x468b01(0x236)](_0x4bf735);}catch{throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x1de),_0x468b01(0x1e4));}if(!isJsonObject(_0x2ab1f5))throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x238));return validateNotificationDocument(_0x2ab1f5,_0x33b83d);}export function projectNotificationListConfig(_0x2a0782,_0xbd4dea){const _0x219997=a157_0x959504;return{'id':typeof _0x2a0782['id']==='number'?_0x2a0782['id']:null,'configCode':requireResponseString(_0x2a0782['configCode'],_0x219997(0x1c7),_0xbd4dea),'configName':requireResponseString(_0x2a0782[_0x219997(0x200)],_0x219997(0x200),_0xbd4dea),'channelType':requireResponseString(_0x2a0782[_0x219997(0x1d9)],_0x219997(0x1d9),_0xbd4dea),'description':normalizeNullableString(_0x2a0782[_0x219997(0x21f)]),'createTime':normalizeNullableString(_0x2a0782[_0x219997(0x214)]),'updateTime':normalizeNullableString(_0x2a0782[_0x219997(0x213)])};}export function normalizeExactNotificationConfig(_0x1853ff,_0x484a1c,_0x423c12){const _0x15a774=a157_0x959504;if(!Number[_0x15a774(0x23e)](_0x1853ff['id'])||_0x1853ff['id']!==_0x484a1c)throw notificationError('notification_config_response_invalid',_0x15a774(0x1e3)+_0x484a1c+'.');if(_0x1853ff[_0x15a774(0x1f8)]!==_0x423c12)throw notificationError('notification_config_response_invalid',_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1ca));const _0x39db79=requireExactString(_0x1853ff['configName'],_0x15a774(0x200),_0x484a1c),_0x32b83d=requireExactString(_0x1853ff[_0x15a774(0x1c7)],_0x15a774(0x1c7),_0x484a1c),_0x13ba85=requireExactString(_0x1853ff[_0x15a774(0x1d9)],'channelType',_0x484a1c);if(!NOTIFICATION_CHANNEL_TYPES[_0x15a774(0x1ee)](_0x13ba85))throw notificationError(_0x15a774(0x1d5),_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1c8));const _0x20fb20=responseNullableString(_0x1853ff[_0x15a774(0x224)],_0x15a774(0x224),_0x484a1c),_0xbbe7cb=responseNullableString(_0x1853ff[_0x15a774(0x205)],_0x15a774(0x205),_0x484a1c),_0x5858de=responseNullableString(_0x1853ff['description'],'description',_0x484a1c),_0x2aeea1=responseNullableTimeout(_0x1853ff[_0x15a774(0x22e)],_0x15a774(0x22e),_0x484a1c),_0x749ace=responseNullableTimeout(_0x1853ff[_0x15a774(0x22a)],_0x15a774(0x22a),_0x484a1c);return{'id':_0x484a1c,'appCode':_0x423c12,'configCode':_0x32b83d,'configName':_0x39db79,'channelType':_0x13ba85,'endpointUrl':redactSensitive(_0x20fb20),'channelConfig':redactSensitive(_0xbbe7cb),'description':_0x5858de,'connectTimeout':_0x2aeea1,'readTimeout':_0x749ace,'endpointUrlRaw':_0x20fb20,'channelConfigRaw':_0xbbe7cb};}export async function requireExactNotificationConfig(_0x2ba4aa,_0x17fa21,_0x19fc2f){const _0x19da52=a157_0x959504;let _0x1588ef;try{_0x1588ef=await getNotificationChannelConfig(_0x17fa21,_0x2ba4aa);}catch{throw safeApiFailure(_0x19fc2f,'preflight',_0x19da52(0x208)+_0x2ba4aa+_0x19da52(0x1dd));}return normalizeExactNotificationConfig(_0x1588ef,_0x17fa21,_0x2ba4aa);}export function projectNotificationConfig(_0x84259c){const _0x379a4b=a157_0x959504;return{'id':_0x84259c['id']??null,'appCode':_0x84259c[_0x379a4b(0x1f8)],'configCode':_0x84259c[_0x379a4b(0x1c7)]??null,'configName':_0x84259c[_0x379a4b(0x200)],'channelType':_0x84259c['channelType'],'endpointUrl':redactSensitive(_0x84259c['endpointUrl']),'channelConfig':redactSensitive(_0x84259c[_0x379a4b(0x205)]),'description':_0x84259c[_0x379a4b(0x21f)]??null,'connectTimeout':_0x84259c[_0x379a4b(0x22e)]??null,'readTimeout':_0x84259c[_0x379a4b(0x22a)]??null};}export function notificationSelector(_0x3660c7){const _0x18b479=a157_0x959504;return{'appCode':_0x3660c7[_0x18b479(0x1f8)],'id':_0x3660c7['id'],'configCode':_0x3660c7[_0x18b479(0x1c7)],'configName':_0x3660c7[_0x18b479(0x200)],'channelType':_0x3660c7[_0x18b479(0x1d9)]};}export function createMutationInput(_0x54c000,_0x53a29e){const _0x307032=a157_0x959504;return{'appCode':_0x54c000,'configName':_0x53a29e[_0x307032(0x200)],'channelType':_0x53a29e[_0x307032(0x1d9)],...hasOwn(_0x53a29e,'endpointUrl')?{'endpointUrl':_0x53a29e[_0x307032(0x224)]}:{},...hasOwn(_0x53a29e,_0x307032(0x205))?{'channelConfig':serializeChannelConfig(_0x53a29e[_0x307032(0x205)])}:{},...hasOwn(_0x53a29e,_0x307032(0x21f))?{'description':_0x53a29e['description']}:{},...hasOwn(_0x53a29e,_0x307032(0x22e))?{'connectTimeout':_0x53a29e['connectTimeout']}:{},...hasOwn(_0x53a29e,_0x307032(0x22a))?{'readTimeout':_0x53a29e[_0x307032(0x22a)]}:{}};}export function mergeUpdateInput(_0x2ba735,_0x304083){const _0x10037d=a157_0x959504;return{'id':_0x2ba735['id'],'appCode':_0x2ba735['appCode'],'configName':_0x304083[_0x10037d(0x200)]??_0x2ba735[_0x10037d(0x200)],'channelType':_0x304083['channelType']??_0x2ba735[_0x10037d(0x1d9)],'endpointUrl':hasOwn(_0x304083,'endpointUrl')?_0x304083[_0x10037d(0x224)]:_0x2ba735[_0x10037d(0x1d3)],'channelConfig':hasOwn(_0x304083,_0x10037d(0x205))?serializeChannelConfig(_0x304083['channelConfig']):_0x2ba735[_0x10037d(0x219)],'description':hasOwn(_0x304083,'description')?_0x304083[_0x10037d(0x21f)]:_0x2ba735[_0x10037d(0x21f)],'connectTimeout':hasOwn(_0x304083,_0x10037d(0x22e))?_0x304083[_0x10037d(0x22e)]:_0x2ba735[_0x10037d(0x22e)],'readTimeout':hasOwn(_0x304083,_0x10037d(0x22a))?_0x304083[_0x10037d(0x22a)]:_0x2ba735[_0x10037d(0x22a)]};}export function plannedUpdateProjection(_0x458152,_0xbd697e){const _0x4de80d=a157_0x959504;return projectNotificationConfig({'id':_0x458152['id'],'appCode':_0x458152[_0x4de80d(0x1f8)],'configCode':_0x458152[_0x4de80d(0x1c7)],'configName':_0xbd697e['configName']??_0x458152[_0x4de80d(0x200)],'channelType':_0xbd697e[_0x4de80d(0x1d9)]??_0x458152[_0x4de80d(0x1d9)],'endpointUrl':hasOwn(_0xbd697e,_0x4de80d(0x224))?_0xbd697e[_0x4de80d(0x224)]:_0x458152[_0x4de80d(0x1d3)],'channelConfig':hasOwn(_0xbd697e,_0x4de80d(0x205))?_0xbd697e[_0x4de80d(0x205)]:_0x458152[_0x4de80d(0x219)],'description':hasOwn(_0xbd697e,_0x4de80d(0x21f))?_0xbd697e[_0x4de80d(0x21f)]:_0x458152[_0x4de80d(0x21f)],'connectTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22e))?_0xbd697e[_0x4de80d(0x22e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x458152[_0x4de80d(0x22e)],'readTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22a))?_0xbd697e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x458152['readTimeout']});}export function requestedSafeFieldsMatch(_0xf3030d,_0x8cb5c,_0x3791da){const _0x28c998=a157_0x959504,_0x3bf6a2=[],_0x466a11=[],_0x38bae6=[];for(const _0x187c51 of[_0x28c998(0x200),'channelType',_0x28c998(0x21f)]){if(!hasOwn(_0x3791da,_0x187c51))continue;_0x38bae6[_0x28c998(0x242)](_0x187c51),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]),_0x466a11['push'](_0xf3030d[_0x187c51]!==_0x3791da[_0x187c51]&&_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]);}for(const _0x4dd592 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3791da,_0x4dd592))continue;const _0x30c49e=_0x3791da[_0x4dd592]??(_0x4dd592===_0x28c998(0x22e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x38bae6[_0x28c998(0x242)](_0x4dd592),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x4dd592]===_0x30c49e),_0x466a11[_0x28c998(0x242)](_0xf3030d[_0x4dd592]!==_0x30c49e&&_0x8cb5c[_0x4dd592]===_0x30c49e);}return hasOwn(_0x3791da,_0x28c998(0x224))&&_0x3791da[_0x28c998(0x224)]===null&&(_0x38bae6['push'](_0x28c998(0x22c)),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''),_0x466a11[_0x28c998(0x242)](_0xf3030d['endpointUrlRaw']!==null&&_0xf3030d[_0x28c998(0x1d3)]!==''&&(_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''))),{'allMatch':_0x3bf6a2[_0x28c998(0x207)](Boolean),'provesChange':_0x466a11[_0x28c998(0x20d)](Boolean),'verifiedFields':_0x38bae6};}export function validateNotificationDeleteReadback(_0xeb700b,_0x3c7bf5,_0x405326){const _0x4cf8c4=a157_0x959504;for(const [_0x219331,_0x4034ad]of _0xeb700b[_0x4cf8c4(0x1cf)]()){if(!Number[_0x4cf8c4(0x23e)](_0x4034ad['id'])||_0x4034ad['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x219331+0x1)+_0x4cf8c4(0x202));if(_0x4034ad[_0x4cf8c4(0x1f8)]!==_0x3c7bf5)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+_0x4cf8c4(0x23c));if(_0x4034ad[_0x4cf8c4(0x1d9)]!==_0x405326)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x5bae07,_0x45206b,_0x42082f){const _0x5b0168=a157_0x959504;return notificationError(_0x5b0168(0x1ec)+_0x5bae07+'_'+(_0x45206b===_0x5b0168(0x1e1)?'failed':_0x45206b+'_unavailable'),_0x5b0168(0x1fd)+_0x5bae07+'\x20'+_0x45206b+_0x5b0168(0x20c),_0x42082f);}export function notificationLookupCommand(_0x4a33b5,_0x536b95){const _0x3b6d40=a157_0x959504;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4a33b5+_0x3b6d40(0x1f7)+_0x536b95+_0x3b6d40(0x203);}function validateNotificationDocument(_0x1f2ab7,_0x2e1b86){const _0x51c2aa=a157_0x959504;for(const _0x4aac41 of Object['keys'](_0x1f2ab7)){if(FORBIDDEN_IDENTITY_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1d7),'Notification\x20JSON\x20field\x20\x22'+_0x4aac41+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1df),_0x51c2aa(0x20e)+_0x4aac41+'\x22.');}if(_0x2e1b86===_0x51c2aa(0x245)&&Object['keys'](_0x1f2ab7)[_0x51c2aa(0x240)]===0x0)throw notificationError(_0x51c2aa(0x233),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x19cdf6={};if(hasOwn(_0x1f2ab7,'configName'))_0x19cdf6[_0x51c2aa(0x200)]=validateRequiredString(_0x1f2ab7['configName'],'configName',0x80);else{if(_0x2e1b86===_0x51c2aa(0x1fa))throw notificationError(_0x51c2aa(0x1f5),_0x51c2aa(0x235)+_0x51c2aa(0x222));}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x1d9))){if(typeof _0x1f2ab7[_0x51c2aa(0x1d9)]!==_0x51c2aa(0x20b))throw invalidFieldType(_0x51c2aa(0x1d9),_0x51c2aa(0x210));const _0x348665=_0x1f2ab7[_0x51c2aa(0x1d9)][_0x51c2aa(0x241)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x348665))throw notificationError(_0x51c2aa(0x215),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x51c2aa(0x21d)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x19cdf6['channelType']=_0x348665;}else{if(_0x2e1b86==='create')throw notificationError(_0x51c2aa(0x1f5),'Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x1b99b1,_0x307447]of[[_0x51c2aa(0x224),0x200],[_0x51c2aa(0x21f),0x100]]){if(!hasOwn(_0x1f2ab7,_0x1b99b1))continue;const _0x36b285=_0x1f2ab7[_0x1b99b1];if(_0x36b285!==null&&typeof _0x36b285!==_0x51c2aa(0x20b))throw invalidFieldType(_0x1b99b1,_0x51c2aa(0x243));if(typeof _0x36b285===_0x51c2aa(0x20b)&&_0x36b285[_0x51c2aa(0x240)]>_0x307447)throw notificationError(_0x51c2aa(0x215),_0x51c2aa(0x226)+_0x1b99b1+'\x22\x20cannot\x20exceed\x20'+_0x307447+'\x20characters.');_0x19cdf6[_0x1b99b1]=_0x36b285;}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x205))){const _0x398b95=_0x1f2ab7[_0x51c2aa(0x205)];if(_0x398b95===null&&_0x2e1b86===_0x51c2aa(0x1fa))throw invalidFieldType(_0x51c2aa(0x205),_0x51c2aa(0x1d4));if(_0x398b95!==null&&!isJsonObject(_0x398b95))throw invalidFieldType(_0x51c2aa(0x205),_0x2e1b86==='update'?'a\x20JSON\x20object\x20or\x20null':_0x51c2aa(0x1d4));_0x398b95!==null&&validateChannelConfigFields(_0x19cdf6[_0x51c2aa(0x1d9)],_0x398b95),_0x19cdf6['channelConfig']=_0x398b95;}for(const _0x3dc52f of[_0x51c2aa(0x22e),_0x51c2aa(0x22a)]){if(!hasOwn(_0x1f2ab7,_0x3dc52f))continue;const _0xadc9ed=_0x1f2ab7[_0x3dc52f];if(_0xadc9ed!==null&&(!Number[_0x51c2aa(0x23e)](_0xadc9ed)||_0xadc9ed<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x3dc52f+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x19cdf6[_0x3dc52f]=_0xadc9ed;}return _0x19cdf6;}function validateRequiredString(_0x4ff3a4,_0x51e389,_0x5a564c){const _0xa527e1=a157_0x959504;if(typeof _0x4ff3a4!==_0xa527e1(0x20b))throw invalidFieldType(_0x51e389,_0xa527e1(0x1fe));const _0x445dc3=_0x4ff3a4[_0xa527e1(0x241)]();if(!_0x445dc3)throw notificationError(_0xa527e1(0x215),'Notification\x20JSON\x20field\x20\x22'+_0x51e389+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x445dc3[_0xa527e1(0x240)]>_0x5a564c)throw notificationError('notification_config_field_invalid',_0xa527e1(0x226)+_0x51e389+_0xa527e1(0x216)+_0x5a564c+_0xa527e1(0x1ef));return _0x445dc3;}function validateChannelConfigFields(_0xe7c1ab,_0x2bd387){const _0xce902b=a157_0x959504;if(hasOwn(_0x2bd387,_0xce902b(0x23a)))throw forbiddenChannelConfigField('messageTemplate');if(_0xe7c1ab==='EMAIL')for(const _0x2cbbc1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2bd387,_0x2cbbc1))throw forbiddenChannelConfigField(_0x2cbbc1);}}function forbiddenChannelConfigField(_0x5a92aa){const _0x19cb94=a157_0x959504;return notificationError('notification_config_channel_field_forbidden',_0x19cb94(0x1fb)+_0x5a92aa+_0x19cb94(0x1f9));}function invalidFieldType(_0x80fde4,_0x26a079){const _0x30ede2=a157_0x959504;return notificationError(_0x30ede2(0x215),_0x30ede2(0x226)+_0x80fde4+_0x30ede2(0x206)+_0x26a079+'.');}function serializeChannelConfig(_0x177c9a){const _0x1bdc6b=a157_0x959504;return _0x177c9a===null||_0x177c9a===undefined?null:JSON[_0x1bdc6b(0x201)](_0x177c9a);}function redactSensitive(_0x1d64ac){return _0x1d64ac===null||_0x1d64ac===undefined||_0x1d64ac===''?null:'<redacted>';}function requireResponseString(_0x517159,_0x24ccd1,_0x4a1cd0){const _0x24227d=a157_0x959504;if(typeof _0x517159!=='string'||_0x517159[_0x24227d(0x241)]()==='')throw CliErrors[_0x24227d(0x231)](_0x24227d(0x1eb),'Item\x20'+(_0x4a1cd0+0x1)+_0x24227d(0x1e7)+_0x24ccd1+'\x22.');return _0x517159[_0x24227d(0x241)]();}function requireExactString(_0x4f07b7,_0x22b6cc,_0x3d79f8){const _0x3962eb=a157_0x959504;if(typeof _0x4f07b7!==_0x3962eb(0x20b)||_0x4f07b7[_0x3962eb(0x241)]()==='')throw notificationError(_0x3962eb(0x1d5),'Notification\x20config\x20'+_0x3d79f8+_0x3962eb(0x1e7)+_0x22b6cc+'\x22.');return _0x4f07b7[_0x3962eb(0x241)]();}function responseNullableString(_0x469a60,_0x6e9d34,_0x2a20fc){const _0x3265cb=a157_0x959504;if(_0x469a60===undefined||_0x469a60===null)return null;if(typeof _0x469a60!==_0x3265cb(0x20b))throw notificationError(_0x3265cb(0x1d5),'Notification\x20config\x20'+_0x2a20fc+_0x3265cb(0x1e5)+_0x6e9d34+'\x22.');return _0x469a60;}function responseNullableTimeout(_0x2e28cf,_0x446c3b,_0x4d8af4){const _0x1d7ce7=a157_0x959504;if(_0x2e28cf===undefined||_0x2e28cf===null)return null;if(!Number[_0x1d7ce7(0x23e)](_0x2e28cf)||_0x2e28cf<0x0)throw notificationError(_0x1d7ce7(0x1d5),_0x1d7ce7(0x1fd)+_0x4d8af4+_0x1d7ce7(0x1e5)+_0x446c3b+'\x22.');return _0x2e28cf;}function a157_0x19c8(_0x4de368,_0x3b8639){_0x4de368=_0x4de368-0x1c7;const _0x1fc0f0=a157_0x1fc0();let _0x19c87b=_0x1fc0f0[_0x4de368];return _0x19c87b;}function normalizeNullableString(_0x385ec6){const _0xf7e520=a157_0x959504;return typeof _0x385ec6===_0xf7e520(0x20b)?_0x385ec6:null;}function isJsonObject(_0xbaa64d){const _0x133c34=a157_0x959504;return _0xbaa64d!==null&&typeof _0xbaa64d===_0x133c34(0x1f3)&&!Array[_0x133c34(0x1cb)](_0xbaa64d);}function hasOwn(_0x3fe4a7,_0x2e318f){const _0x31f9bc=a157_0x959504;return Object[_0x31f9bc(0x212)][_0x31f9bc(0x21c)][_0x31f9bc(0x218)](_0x3fe4a7,_0x2e318f);}async function readStdin(){const _0x31ef1d=a157_0x959504;let _0x3227a9='';process[_0x31ef1d(0x20f)][_0x31ef1d(0x1ff)](_0x31ef1d(0x1e2));for await(const _0x2377e4 of process[_0x31ef1d(0x20f)])_0x3227a9+=_0x2377e4;return _0x3227a9;}function a157_0x1fc0(){const _0x275463=['Notification\x20JSON\x20field\x20\x22','yes','347731SDmIFV','notification_config_id_invalid','readTimeout','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','endpointUrl:null','Notification\x20JSON\x20from\x20','connectTimeout','subjectPrefix','bool','apiError','env','notification_config_update_empty','emailTargets','Create\x20JSON\x20requires\x20field\x20','parse','environment\x20variable\x20','\x20must\x20be\x20an\x20object.','file\x20','messageTemplate','number','\x20has\x20an\x20invalid\x20appCode.','1129751PlZGPf','isSafeInteger','validation','length','trim','push','a\x20string\x20or\x20null','has','update','configCode','\x20has\x20an\x20unsupported\x20channelType.','Invalid\x20--','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','isArray','type','str','dry-run','entries','from-env','boolean','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','endpointUrlRaw','a\x20JSON\x20object','notification_config_response_invalid','1454370DtkAwL','notification_config_field_forbidden','WECOM','channelType','num','ccList','162110iomuLt','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20invalid.','notification_config_field_unknown','Notification\x20config\x20list\x20item\x20','mutation','utf8','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','\x20is\x20missing\x20required\x20field\x20\x22','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','1263582HldKGP','Missing\x20notification\x20JSON\x20source.','Invalid\x20notification\x20config\x20response.','notification_config_','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','includes','\x20characters.','8TvETYX','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','718784JoZQWC','object','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','appCode','\x22\x20is\x20forbidden.','create','Notification\x20JSON\x20channelConfig\x20field\x20\x22','kind','Notification\x20config\x20','a\x20non-empty\x20string','setEncoding','configName','stringify','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','file','channelConfig','\x22\x20must\x20be\x20','every','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','fromName','path','string','\x20failed.','some','Unknown\x20notification\x20JSON\x20field\x20\x22','stdin','a\x20supported\x20string','name','prototype','updateTime','createTime','notification_config_field_invalid','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','call','channelConfigRaw','DINGTALK','1623165uhrrsu','hasOwnProperty','Allowed\x20values:\x20','notification_config_source_unavailable','description','567hWXFpR','join','\x22configName\x22.','notification_config_confirmation_required','endpointUrl','2ZCDPpS'];a157_0x1fc0=function(){return _0x275463;};return a157_0x1fc0();}
|
|
1
|
+
const a181_0x4164a7=a181_0x1c7d;(function(_0x492e05,_0x4b0aaa){const _0x4a9877=a181_0x1c7d,_0x4b05a5=_0x492e05();while(!![]){try{const _0x1ae5a9=parseInt(_0x4a9877(0x23b))/0x1+parseInt(_0x4a9877(0x23d))/0x2+-parseInt(_0x4a9877(0x247))/0x3+-parseInt(_0x4a9877(0x230))/0x4+-parseInt(_0x4a9877(0x203))/0x5*(parseInt(_0x4a9877(0x23a))/0x6)+-parseInt(_0x4a9877(0x25a))/0x7*(parseInt(_0x4a9877(0x1ea))/0x8)+parseInt(_0x4a9877(0x1e6))/0x9;if(_0x1ae5a9===_0x4b0aaa)break;else _0x4b05a5['push'](_0x4b05a5['shift']());}catch(_0x2f90e2){_0x4b05a5['push'](_0x4b05a5['shift']());}}}(a181_0x1e41,0xd6c84));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=[a181_0x4164a7(0x20f),a181_0x4164a7(0x227),a181_0x4164a7(0x252),'WECOM',a181_0x4164a7(0x253)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4164a7(0x1ef),a181_0x4164a7(0x1e1),a181_0x4164a7(0x241),a181_0x4164a7(0x1f7),a181_0x4164a7(0x1de),a181_0x4164a7(0x1dc),a181_0x4164a7(0x22d)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4164a7(0x234),a181_0x4164a7(0x201)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4164a7(0x22e),a181_0x4164a7(0x20c),a181_0x4164a7(0x212),a181_0x4164a7(0x255),a181_0x4164a7(0x1dd),a181_0x4164a7(0x231),'fromName','to','cc']);function a181_0x1c7d(_0x5a6155,_0x26cebe){_0x5a6155=_0x5a6155-0x1d9;const _0x1e41d4=a181_0x1e41();let _0x1c7db5=_0x1e41d4[_0x5a6155];return _0x1c7db5;}export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4164a7(0x24e),'type':a181_0x4164a7(0x25c),'required':![],'description':a181_0x4164a7(0x24f)},{'name':a181_0x4164a7(0x21c),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0x4164a7(0x20a),'type':'string','required':![],'description':a181_0x4164a7(0x208)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x4164a7(0x24b),'required':!![],'description':a181_0x4164a7(0x228)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x901d27,_0x1609e4,_0x1773f4){return new CliError(_0x901d27,0x1,_0x1609e4,_0x1773f4);}export function readNotificationId(_0x3e43fe){const _0x2153b5=a181_0x4164a7,_0x33b6ab=_0x3e43fe[_0x2153b5(0x222)]('id');if(!Number[_0x2153b5(0x238)](_0x33b6ab)||_0x33b6ab<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x33b6ab;}export function requireNotificationExplicitYes(_0x2916d6){const _0x465092=a181_0x4164a7;if(_0x2916d6[_0x465092(0x244)](_0x465092(0x237))||_0x2916d6[_0x465092(0x244)](_0x465092(0x205)))return;throw notificationError(_0x465092(0x20b),_0x465092(0x1f4),_0x465092(0x20e));}export function readNotificationChannelType(_0x1e0dc6,_0x5b4773=a181_0x4164a7(0x21a),_0x675641=a181_0x4164a7(0x20f)){const _0x139391=a181_0x4164a7,_0x98eb3b=_0x1e0dc6[_0x139391(0x242)](_0x5b4773)['trim']()||_0x675641;if(!NOTIFICATION_CHANNEL_TYPES[_0x139391(0x1fc)](_0x98eb3b))throw CliErrors['validation'](_0x139391(0x251)+_0x5b4773+':\x20'+_0x98eb3b,_0x139391(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x139391(0x258)](',\x20')+'.');return _0x98eb3b;}export function assertSingleNotificationSource(_0x219a7d){const _0x405a7c=a181_0x4164a7,_0x36209b=[],_0x44d057=_0x219a7d[_0x405a7c(0x242)](_0x405a7c(0x24e))[_0x405a7c(0x1e8)]();if(_0x44d057)_0x36209b['push']({'kind':'file','path':_0x44d057});if(_0x219a7d[_0x405a7c(0x244)](_0x405a7c(0x21c)))_0x36209b['push']({'kind':_0x405a7c(0x21c)});const _0x10b4c1=_0x219a7d['str'](_0x405a7c(0x20a))['trim']();if(_0x10b4c1)_0x36209b[_0x405a7c(0x223)]({'kind':'env','name':_0x10b4c1});if(_0x36209b[_0x405a7c(0x22a)]===0x0)throw CliErrors[_0x405a7c(0x22c)](_0x405a7c(0x1ee),_0x405a7c(0x233));if(_0x36209b['length']>0x1)throw CliErrors['validation'](_0x405a7c(0x1fe),_0x405a7c(0x233));return _0x36209b[0x0];}export async function readNotificationDocument(_0x445e77,_0x4e2036){const _0x1316e2=a181_0x4164a7,_0x74dd2b=assertSingleNotificationSource(_0x445e77),_0x32ff67=_0x74dd2b[_0x1316e2(0x213)]==='file'?_0x1316e2(0x21d)+_0x74dd2b[_0x1316e2(0x235)]:_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)?_0x1316e2(0x257)+_0x74dd2b[_0x1316e2(0x22b)]:_0x1316e2(0x21c);let _0x5c010f;try{if(_0x74dd2b[_0x1316e2(0x213)]==='file')_0x5c010f=await readFile(_0x74dd2b[_0x1316e2(0x235)],'utf8');else{if(_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)){if(!(_0x74dd2b[_0x1316e2(0x22b)]in process.env))throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x250)+_0x74dd2b[_0x1316e2(0x22b)]);_0x5c010f=process.env[_0x74dd2b.name]??'';}else _0x5c010f=await readStdin();}}catch(_0x2da873){if(_0x2da873 instanceof CliError)throw _0x2da873;throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x224)+_0x32ff67+'.');}let _0xfddaf7;try{_0xfddaf7=JSON[_0x1316e2(0x254)](_0x5c010f);}catch{throw notificationError('notification_config_json_invalid',_0x1316e2(0x216)+_0x32ff67+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0xfddaf7))throw notificationError(_0x1316e2(0x207),_0x1316e2(0x216)+_0x32ff67+_0x1316e2(0x1f9));return validateNotificationDocument(_0xfddaf7,_0x4e2036);}export function projectNotificationListConfig(_0x118e9e,_0x3c0a98){const _0x27bf2b=a181_0x4164a7;return{'id':typeof _0x118e9e['id']==='number'?_0x118e9e['id']:null,'configCode':requireResponseString(_0x118e9e[_0x27bf2b(0x234)],_0x27bf2b(0x234),_0x3c0a98),'configName':requireResponseString(_0x118e9e['configName'],'configName',_0x3c0a98),'channelType':requireResponseString(_0x118e9e[_0x27bf2b(0x1e1)],_0x27bf2b(0x1e1),_0x3c0a98),'description':normalizeNullableString(_0x118e9e[_0x27bf2b(0x1de)]),'createTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x248)]),'updateTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x21e)])};}export function normalizeExactNotificationConfig(_0x4ff3f2,_0xc71fb3,_0x3d257c){const _0x7a10dd=a181_0x4164a7;if(!Number[_0x7a10dd(0x238)](_0x4ff3f2['id'])||_0x4ff3f2['id']!==_0xc71fb3)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x1fd)+_0xc71fb3+'.');if(_0x4ff3f2['appCode']!==_0x3d257c)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x226));const _0x187aca=requireExactString(_0x4ff3f2[_0x7a10dd(0x1ef)],_0x7a10dd(0x1ef),_0xc71fb3),_0x31098a=requireExactString(_0x4ff3f2['configCode'],_0x7a10dd(0x234),_0xc71fb3),_0x370a93=requireExactString(_0x4ff3f2[_0x7a10dd(0x1e1)],_0x7a10dd(0x1e1),_0xc71fb3);if(!NOTIFICATION_CHANNEL_TYPES[_0x7a10dd(0x1fc)](_0x370a93))throw notificationError('notification_config_response_invalid',_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x1d9));const _0x15f2ac=responseNullableString(_0x4ff3f2['endpointUrl'],_0x7a10dd(0x241),_0xc71fb3),_0x30227a=responseNullableString(_0x4ff3f2[_0x7a10dd(0x1f7)],_0x7a10dd(0x1f7),_0xc71fb3),_0x1ee346=responseNullableString(_0x4ff3f2['description'],_0x7a10dd(0x1de),_0xc71fb3),_0x265227=responseNullableTimeout(_0x4ff3f2['connectTimeout'],_0x7a10dd(0x1dc),_0xc71fb3),_0x3fc204=responseNullableTimeout(_0x4ff3f2[_0x7a10dd(0x22d)],_0x7a10dd(0x22d),_0xc71fb3);return{'id':_0xc71fb3,'appCode':_0x3d257c,'configCode':_0x31098a,'configName':_0x187aca,'channelType':_0x370a93,'endpointUrl':redactSensitive(_0x15f2ac),'channelConfig':redactSensitive(_0x30227a),'description':_0x1ee346,'connectTimeout':_0x265227,'readTimeout':_0x3fc204,'endpointUrlRaw':_0x15f2ac,'channelConfigRaw':_0x30227a};}export async function requireExactNotificationConfig(_0x2a0057,_0x382312,_0x5b1808){const _0x315c88=a181_0x4164a7;let _0x23933b;try{_0x23933b=await getNotificationChannelConfig(_0x382312,_0x2a0057);}catch{throw safeApiFailure(_0x5b1808,_0x315c88(0x245),_0x315c88(0x21f)+_0x2a0057+_0x315c88(0x1f2));}return normalizeExactNotificationConfig(_0x23933b,_0x382312,_0x2a0057);}export function projectNotificationConfig(_0x3404df){const _0x5bdd8e=a181_0x4164a7;return{'id':_0x3404df['id']??null,'appCode':_0x3404df[_0x5bdd8e(0x256)],'configCode':_0x3404df[_0x5bdd8e(0x234)]??null,'configName':_0x3404df[_0x5bdd8e(0x1ef)],'channelType':_0x3404df['channelType'],'endpointUrl':redactSensitive(_0x3404df[_0x5bdd8e(0x241)]),'channelConfig':redactSensitive(_0x3404df[_0x5bdd8e(0x1f7)]),'description':_0x3404df[_0x5bdd8e(0x1de)]??null,'connectTimeout':_0x3404df[_0x5bdd8e(0x1dc)]??null,'readTimeout':_0x3404df[_0x5bdd8e(0x22d)]??null};}export function notificationSelector(_0x3a3c07){const _0x5b71ec=a181_0x4164a7;return{'appCode':_0x3a3c07[_0x5b71ec(0x256)],'id':_0x3a3c07['id'],'configCode':_0x3a3c07[_0x5b71ec(0x234)],'configName':_0x3a3c07[_0x5b71ec(0x1ef)],'channelType':_0x3a3c07[_0x5b71ec(0x1e1)]};}export function createMutationInput(_0x2dac62,_0x4704dc){const _0x1a30f1=a181_0x4164a7;return{'appCode':_0x2dac62,'configName':_0x4704dc[_0x1a30f1(0x1ef)],'channelType':_0x4704dc[_0x1a30f1(0x1e1)],...hasOwn(_0x4704dc,_0x1a30f1(0x241))?{'endpointUrl':_0x4704dc[_0x1a30f1(0x241)]}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1f7))?{'channelConfig':serializeChannelConfig(_0x4704dc[_0x1a30f1(0x1f7)])}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1de))?{'description':_0x4704dc['description']}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1dc))?{'connectTimeout':_0x4704dc['connectTimeout']}:{},...hasOwn(_0x4704dc,'readTimeout')?{'readTimeout':_0x4704dc[_0x1a30f1(0x22d)]}:{}};}export function mergeUpdateInput(_0x1fdc5a,_0x592227){const _0x1f2b71=a181_0x4164a7;return{'id':_0x1fdc5a['id'],'appCode':_0x1fdc5a[_0x1f2b71(0x256)],'configName':_0x592227['configName']??_0x1fdc5a[_0x1f2b71(0x1ef)],'channelType':_0x592227[_0x1f2b71(0x1e1)]??_0x1fdc5a[_0x1f2b71(0x1e1)],'endpointUrl':hasOwn(_0x592227,'endpointUrl')?_0x592227[_0x1f2b71(0x241)]:_0x1fdc5a[_0x1f2b71(0x217)],'channelConfig':hasOwn(_0x592227,'channelConfig')?serializeChannelConfig(_0x592227[_0x1f2b71(0x1f7)]):_0x1fdc5a['channelConfigRaw'],'description':hasOwn(_0x592227,_0x1f2b71(0x1de))?_0x592227[_0x1f2b71(0x1de)]:_0x1fdc5a[_0x1f2b71(0x1de)],'connectTimeout':hasOwn(_0x592227,_0x1f2b71(0x1dc))?_0x592227['connectTimeout']:_0x1fdc5a['connectTimeout'],'readTimeout':hasOwn(_0x592227,_0x1f2b71(0x22d))?_0x592227[_0x1f2b71(0x22d)]:_0x1fdc5a['readTimeout']};}export function plannedUpdateProjection(_0x4523c2,_0x2f323c){const _0x337e27=a181_0x4164a7;return projectNotificationConfig({'id':_0x4523c2['id'],'appCode':_0x4523c2[_0x337e27(0x256)],'configCode':_0x4523c2[_0x337e27(0x234)],'configName':_0x2f323c[_0x337e27(0x1ef)]??_0x4523c2[_0x337e27(0x1ef)],'channelType':_0x2f323c[_0x337e27(0x1e1)]??_0x4523c2['channelType'],'endpointUrl':hasOwn(_0x2f323c,_0x337e27(0x241))?_0x2f323c[_0x337e27(0x241)]:_0x4523c2['endpointUrlRaw'],'channelConfig':hasOwn(_0x2f323c,_0x337e27(0x1f7))?_0x2f323c[_0x337e27(0x1f7)]:_0x4523c2[_0x337e27(0x23f)],'description':hasOwn(_0x2f323c,_0x337e27(0x1de))?_0x2f323c[_0x337e27(0x1de)]:_0x4523c2[_0x337e27(0x1de)],'connectTimeout':hasOwn(_0x2f323c,_0x337e27(0x1dc))?_0x2f323c['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4523c2[_0x337e27(0x1dc)],'readTimeout':hasOwn(_0x2f323c,_0x337e27(0x22d))?_0x2f323c['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4523c2[_0x337e27(0x22d)]});}export function requestedSafeFieldsMatch(_0x4e1597,_0x589632,_0x260a8b){const _0x3ccadf=a181_0x4164a7,_0x4d44cf=[],_0x58493f=[],_0x47204c=[];for(const _0x1363c4 of[_0x3ccadf(0x1ef),_0x3ccadf(0x1e1),'description']){if(!hasOwn(_0x260a8b,_0x1363c4))continue;_0x47204c[_0x3ccadf(0x223)](_0x1363c4),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x1363c4]!==_0x260a8b[_0x1363c4]&&_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]);}for(const _0x5a09a2 of[_0x3ccadf(0x1dc),_0x3ccadf(0x22d)]){if(!hasOwn(_0x260a8b,_0x5a09a2))continue;const _0x9dafcf=_0x260a8b[_0x5a09a2]??(_0x5a09a2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x47204c[_0x3ccadf(0x223)](_0x5a09a2),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x5a09a2]===_0x9dafcf),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x5a09a2]!==_0x9dafcf&&_0x589632[_0x5a09a2]===_0x9dafcf);}return hasOwn(_0x260a8b,_0x3ccadf(0x241))&&_0x260a8b[_0x3ccadf(0x241)]===null&&(_0x47204c[_0x3ccadf(0x223)]('endpointUrl:null'),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''),_0x58493f[_0x3ccadf(0x223)](_0x4e1597['endpointUrlRaw']!==null&&_0x4e1597[_0x3ccadf(0x217)]!==''&&(_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''))),{'allMatch':_0x4d44cf[_0x3ccadf(0x218)](Boolean),'provesChange':_0x58493f[_0x3ccadf(0x1e9)](Boolean),'verifiedFields':_0x47204c};}export function validateNotificationDeleteReadback(_0x427443,_0x49e2e4,_0x4d31eb){const _0x28f2b8=a181_0x4164a7;for(const [_0x4e6111,_0x45dd66]of _0x427443[_0x28f2b8(0x232)]()){if(!Number[_0x28f2b8(0x238)](_0x45dd66['id'])||_0x45dd66['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x28f2b8(0x1df)+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x45dd66[_0x28f2b8(0x256)]!==_0x49e2e4)throw notificationError(_0x28f2b8(0x1ed),'Notification\x20config\x20list\x20item\x20'+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x45dd66['channelType']!==_0x4d31eb)throw notificationError(_0x28f2b8(0x1ed),_0x28f2b8(0x1df)+(_0x4e6111+0x1)+_0x28f2b8(0x1e2));}}export function safeApiFailure(_0x4b61b5,_0xd0349a,_0x4e49fb){const _0x57a150=a181_0x4164a7;return notificationError(_0x57a150(0x25d)+_0x4b61b5+'_'+(_0xd0349a==='mutation'?_0x57a150(0x1fa):_0xd0349a+_0x57a150(0x23c)),_0x57a150(0x210)+_0x4b61b5+'\x20'+_0xd0349a+_0x57a150(0x1f3),_0x4e49fb);}export function notificationLookupCommand(_0x4a7661,_0x5ec057){const _0x3d6fa8=a181_0x4164a7;return _0x3d6fa8(0x24c)+_0x4a7661+'\x20--type\x20'+_0x5ec057+_0x3d6fa8(0x239);}function validateNotificationDocument(_0x5a5c8a,_0x235cc7){const _0x56e055=a181_0x4164a7;for(const _0x18e476 of Object[_0x56e055(0x24a)](_0x5a5c8a)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56e055(0x1f5)](_0x18e476))throw notificationError(_0x56e055(0x243),_0x56e055(0x249)+_0x18e476+_0x56e055(0x1da));if(!ALLOWED_INPUT_FIELDS['has'](_0x18e476))throw notificationError(_0x56e055(0x229),_0x56e055(0x1ff)+_0x18e476+'\x22.');}if(_0x235cc7===_0x56e055(0x25b)&&Object['keys'](_0x5a5c8a)[_0x56e055(0x22a)]===0x0)throw notificationError(_0x56e055(0x215),_0x56e055(0x22f));const _0x1236a9={};if(hasOwn(_0x5a5c8a,_0x56e055(0x1ef)))_0x1236a9[_0x56e055(0x1ef)]=validateRequiredString(_0x5a5c8a[_0x56e055(0x1ef)],_0x56e055(0x1ef),0x80);else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x1ec));}if(hasOwn(_0x5a5c8a,_0x56e055(0x1e1))){if(typeof _0x5a5c8a[_0x56e055(0x1e1)]!==_0x56e055(0x25c))throw invalidFieldType('channelType','a\x20supported\x20string');const _0x1be0ac=_0x5a5c8a[_0x56e055(0x1e1)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x1fc)](_0x1be0ac))throw notificationError(_0x56e055(0x206),_0x56e055(0x1f1),_0x56e055(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x258)](',\x20')+'.');_0x1236a9[_0x56e055(0x1e1)]=_0x1be0ac;}else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x211));}for(const [_0x17fc6b,_0x191360]of[[_0x56e055(0x241),0x200],[_0x56e055(0x1de),0x100]]){if(!hasOwn(_0x5a5c8a,_0x17fc6b))continue;const _0x50e787=_0x5a5c8a[_0x17fc6b];if(_0x50e787!==null&&typeof _0x50e787!==_0x56e055(0x25c))throw invalidFieldType(_0x17fc6b,_0x56e055(0x1e5));if(typeof _0x50e787===_0x56e055(0x25c)&&_0x50e787['length']>_0x191360)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x17fc6b+'\x22\x20cannot\x20exceed\x20'+_0x191360+_0x56e055(0x24d));_0x1236a9[_0x17fc6b]=_0x50e787;}if(hasOwn(_0x5a5c8a,_0x56e055(0x1f7))){const _0x5e215e=_0x5a5c8a['channelConfig'];if(_0x5e215e===null&&_0x235cc7===_0x56e055(0x1e7))throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x5e215e!==null&&!isJsonObject(_0x5e215e))throw invalidFieldType(_0x56e055(0x1f7),_0x235cc7==='update'?_0x56e055(0x204):_0x56e055(0x214));_0x5e215e!==null&&validateChannelConfigFields(_0x1236a9['channelType'],_0x5e215e),_0x1236a9[_0x56e055(0x1f7)]=_0x5e215e;}for(const _0x333441 of['connectTimeout',_0x56e055(0x22d)]){if(!hasOwn(_0x5a5c8a,_0x333441))continue;const _0x3a0dce=_0x5a5c8a[_0x333441];if(_0x3a0dce!==null&&(!Number[_0x56e055(0x238)](_0x3a0dce)||_0x3a0dce<0x0))throw notificationError(_0x56e055(0x206),'Notification\x20JSON\x20field\x20\x22'+_0x333441+_0x56e055(0x202));_0x1236a9[_0x333441]=_0x3a0dce;}return _0x1236a9;}function validateRequiredString(_0x178761,_0x4c241f,_0x34a147){const _0xb15ecb=a181_0x4164a7;if(typeof _0x178761!==_0xb15ecb(0x25c))throw invalidFieldType(_0x4c241f,_0xb15ecb(0x1e0));const _0x3793e5=_0x178761[_0xb15ecb(0x1e8)]();if(!_0x3793e5)throw notificationError('notification_config_field_invalid',_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x1e3));if(_0x3793e5[_0xb15ecb(0x22a)]>_0x34a147)throw notificationError(_0xb15ecb(0x206),_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x246)+_0x34a147+_0xb15ecb(0x24d));return _0x3793e5;}function validateChannelConfigFields(_0x570f02,_0x191689){const _0x58ac31=a181_0x4164a7;if(hasOwn(_0x191689,_0x58ac31(0x225)))throw forbiddenChannelConfigField(_0x58ac31(0x225));if(_0x570f02===_0x58ac31(0x20f))for(const _0x159f4a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x191689,_0x159f4a))throw forbiddenChannelConfigField(_0x159f4a);}}function forbiddenChannelConfigField(_0x28c8ef){const _0x56db18=a181_0x4164a7;return notificationError(_0x56db18(0x1fb),_0x56db18(0x220)+_0x28c8ef+_0x56db18(0x1db));}function invalidFieldType(_0x1fdcca,_0x119bce){const _0x416180=a181_0x4164a7;return notificationError(_0x416180(0x206),_0x416180(0x249)+_0x1fdcca+_0x416180(0x200)+_0x119bce+'.');}function serializeChannelConfig(_0x5d4f73){return _0x5d4f73===null||_0x5d4f73===undefined?null:JSON['stringify'](_0x5d4f73);}function redactSensitive(_0x36853f){const _0x166ecf=a181_0x4164a7;return _0x36853f===null||_0x36853f===undefined||_0x36853f===''?null:_0x166ecf(0x1f0);}function requireResponseString(_0x417a76,_0x3a3ae1,_0x369ec9){const _0x36a507=a181_0x4164a7;if(typeof _0x417a76!==_0x36a507(0x25c)||_0x417a76[_0x36a507(0x1e8)]()==='')throw CliErrors[_0x36a507(0x240)](_0x36a507(0x20d),'Item\x20'+(_0x369ec9+0x1)+_0x36a507(0x1f8)+_0x3a3ae1+'\x22.');return _0x417a76[_0x36a507(0x1e8)]();}function requireExactString(_0x399246,_0x350e67,_0x1afde1){const _0x588b9d=a181_0x4164a7;if(typeof _0x399246!==_0x588b9d(0x25c)||_0x399246[_0x588b9d(0x1e8)]()==='')throw notificationError(_0x588b9d(0x1ed),'Notification\x20config\x20'+_0x1afde1+_0x588b9d(0x1f8)+_0x350e67+'\x22.');return _0x399246[_0x588b9d(0x1e8)]();}function responseNullableString(_0x234b28,_0x200a49,_0x33f3f3){const _0x11d875=a181_0x4164a7;if(_0x234b28===undefined||_0x234b28===null)return null;if(typeof _0x234b28!=='string')throw notificationError(_0x11d875(0x1ed),_0x11d875(0x210)+_0x33f3f3+'\x20has\x20invalid\x20field\x20\x22'+_0x200a49+'\x22.');return _0x234b28;}function responseNullableTimeout(_0x83cd2c,_0xfe083c,_0x412d9e){const _0x58af0d=a181_0x4164a7;if(_0x83cd2c===undefined||_0x83cd2c===null)return null;if(!Number[_0x58af0d(0x238)](_0x83cd2c)||_0x83cd2c<0x0)throw notificationError(_0x58af0d(0x1ed),_0x58af0d(0x210)+_0x412d9e+_0x58af0d(0x21b)+_0xfe083c+'\x22.');return _0x83cd2c;}function normalizeNullableString(_0x5dcd5e){const _0x1286ce=a181_0x4164a7;return typeof _0x5dcd5e===_0x1286ce(0x25c)?_0x5dcd5e:null;}function isJsonObject(_0x2d0eab){const _0x5f011a=a181_0x4164a7;return _0x2d0eab!==null&&typeof _0x2d0eab===_0x5f011a(0x219)&&!Array['isArray'](_0x2d0eab);}function hasOwn(_0x1ada30,_0x27b085){const _0x33c723=a181_0x4164a7;return Object[_0x33c723(0x1eb)]['hasOwnProperty'][_0x33c723(0x209)](_0x1ada30,_0x27b085);}function a181_0x1e41(){const _0x4f47e5=['Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','call','from-env','notification_config_confirmation_required','recipients','Invalid\x20notification\x20config\x20response.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','EMAIL','Notification\x20config\x20','\x22channelType\x22.','ccList','kind','a\x20JSON\x20object','notification_config_update_empty','Notification\x20JSON\x20from\x20','endpointUrlRaw','every','object','type','\x20has\x20invalid\x20field\x20\x22','stdin','file\x20','updateTime','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','setEncoding','num','push','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','messageTemplate','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','FEISHU','Application-level\x20notification\x20config\x20ID','notification_config_field_unknown','length','name','validation','readTimeout','emailTargets','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','3631308wWWzJh','subjectPrefix','entries','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','path','env','dry-run','isSafeInteger','\x20--format\x20compress','6KHJlaj','1408687PsOXFY','_unavailable','1022854dQNzNY','Allowed\x20values:\x20','channelConfigRaw','apiError','endpointUrl','str','notification_config_field_forbidden','bool','preflight','\x22\x20cannot\x20exceed\x20','3152766gqzqaW','createTime','Notification\x20JSON\x20field\x20\x22','keys','number','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20characters.','file','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Invalid\x20--','DINGTALK','WEBHOOK','parse','bccList','appCode','environment\x20variable\x20','join','Create\x20JSON\x20requires\x20field\x20','29239huMcTf','update','string','notification_config_','\x20has\x20an\x20unsupported\x20channelType.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20is\x20forbidden.','connectTimeout','replyTo','description','Notification\x20config\x20list\x20item\x20','a\x20non-empty\x20string','channelType','\x20has\x20an\x20invalid\x20channelType.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','notification_config_field_required','a\x20string\x20or\x20null','34825032CIRSSy','create','trim','some','2416wvtBUS','prototype','\x22configName\x22.','notification_config_response_invalid','Missing\x20notification\x20JSON\x20source.','configName','<redacted>','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20failed.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','has','notification_config_source_unavailable','channelConfig','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','failed','notification_config_channel_field_forbidden','includes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unknown\x20notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','channelCode','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','8448055vypiAt','a\x20JSON\x20object\x20or\x20null','yes','notification_config_field_invalid','notification_config_json_invalid'];a181_0x1e41=function(){return _0x4f47e5;};return a181_0x1e41();}async function readStdin(){const _0x27ebee=a181_0x4164a7;let _0x5b97b6='';process[_0x27ebee(0x21c)][_0x27ebee(0x221)]('utf8');for await(const _0x4fe3da of process[_0x27ebee(0x21c)])_0x5b97b6+=_0x4fe3da;return _0x5b97b6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x129c(){const _0x293ed2=['recognize','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Unsupported\x20OCR\x20scene:\x20','GET','14360877iZiJSI','891555BpRQPW','filePath','/smartapi/common/queryFileUrl','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','fileName','general','imageUrl','filter','2623264ovvTUw','Table','validation','scene','\x20OCR\x20from\x20URL','fileUrl','525cGDUsy','image-file','count','POST','join','imageFile','1074334ETexHB','path','appCode','Preview:\x20recognize\x20','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','.\x20Supported\x20scenes:\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','2020647hWGXmW','\x20OCR','8SJWGzA','idCard','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','toLowerCase','767621mojpCF','Invoice','trim','form','string','str','5250hVgoDS','idcard','length','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url'];a182_0x129c=function(){return _0x293ed2;};return a182_0x129c();}const a182_0x29f76f=a182_0x5e67;(function(_0x17ed77,_0x2d5d8b){const _0x5311c8=a182_0x5e67,_0x40fb2=_0x17ed77();while(!![]){try{const _0x1de8c3=parseInt(_0x5311c8(0x18c))/0x1+-parseInt(_0x5311c8(0x17d))/0x2+-parseInt(_0x5311c8(0x185))/0x3+-parseInt(_0x5311c8(0x171))/0x4+-parseInt(_0x5311c8(0x19c))/0x5+parseInt(_0x5311c8(0x192))/0x6*(parseInt(_0x5311c8(0x177))/0x7)+parseInt(_0x5311c8(0x187))/0x8*(parseInt(_0x5311c8(0x19b))/0x9);if(_0x1de8c3===_0x2d5d8b)break;else _0x40fb2['push'](_0x40fb2['shift']());}catch(_0x58b540){_0x40fb2['push'](_0x40fb2['shift']());}}}(a182_0x129c,0x5dc38));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',a182_0x29f76f(0x1a2),a182_0x29f76f(0x18f),a182_0x29f76f(0x188)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x29f76f(0x18d),'general':'General','form':a182_0x29f76f(0x172),'idCard':'IdCard'},SCENE_FLAG={'name':a182_0x29f76f(0x174),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x29f76f(0x184)},IMAGE_FILE_FLAG={'name':a182_0x29f76f(0x178),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x195)},IMAGE_URL_FLAG={'name':a182_0x29f76f(0x196),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x1a0)};function normalizeScene(_0x2dc491){const _0x16c432=a182_0x29f76f,_0x5c7511=_0x2dc491['trim']()[_0x16c432(0x18b)]();if(_0x5c7511===_0x16c432(0x193))return'idCard';if(_0x5c7511==='invoice'||_0x5c7511===_0x16c432(0x1a2)||_0x5c7511===_0x16c432(0x18f))return _0x5c7511;throw CliErrors['validation'](_0x16c432(0x199)+_0x2dc491+_0x16c432(0x183)+SUPPORTED_SCENES[_0x16c432(0x17b)](',\x20'));}function selectedInputs(_0x22b1ce){const _0x3918d3=a182_0x29f76f,_0x29d496=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x178))[_0x3918d3(0x18e)](),_0x5ca673=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x196))[_0x3918d3(0x18e)]();return{'imageFile':_0x29d496,'imageUrl':_0x5ca673,'count':[_0x29d496,_0x5ca673][_0x3918d3(0x170)](Boolean)[_0x3918d3(0x194)]};}function a182_0x5e67(_0xfdf51b,_0x58a250){_0xfdf51b=_0xfdf51b-0x16f;const _0x129c09=a182_0x129c();let _0x5e67e4=_0x129c09[_0xfdf51b];return _0x5e67e4;}function validateInputSelection(_0x21297e){const _0x32821d=a182_0x29f76f,_0x4bc8e6=selectedInputs(_0x21297e);if(_0x4bc8e6[_0x32821d(0x179)]!==0x1)throw CliErrors[_0x32821d(0x173)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x4bc8e6;}function withScene(_0x1581c7,_0x1c600b,_0x49b540){const _0x547fc7=a182_0x29f76f;return{..._0x1581c7,'scene':_0x1c600b,..._0x49b540?{'sourceFile':{'fileName':_0x49b540[_0x547fc7(0x1a1)],'filePath':_0x49b540[_0x547fc7(0x19d)]}}:{}};}const ocrRecognize={'service':a182_0x29f76f(0x19f),'command':a182_0x29f76f(0x197),'description':a182_0x29f76f(0x181),'risk':a182_0x29f76f(0x182),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1aacf6){const _0x543f6f=a182_0x29f76f,_0xf09bcf=normalizeScene(_0x1aacf6[_0x543f6f(0x191)](_0x543f6f(0x174))),_0x5ed17b=SCENE_TO_LEGACY_TYPE[_0xf09bcf],_0x305af1=validateInputSelection(_0x1aacf6);if(_0x305af1[_0x543f6f(0x16f)]){const _0x4627b7=new URLSearchParams({'url':_0x305af1[_0x543f6f(0x16f)],'type':_0x5ed17b,'appCode':_0x1aacf6[_0x543f6f(0x17f)]});return{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text?'+_0x4627b7['toString'](),'description':_0x543f6f(0x180)+_0xf09bcf+_0x543f6f(0x175)};}const _0x161a68=requireDevelopmentUploadFile(_0x305af1[_0x543f6f(0x17c)],_0x543f6f(0x178));return{'method':_0x543f6f(0x17a),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'multipart':{'file':_0x161a68}}},{'method':'POST','url':_0x543f6f(0x19e),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'url':_0x543f6f(0x198),'type':_0x5ed17b}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xf09bcf+_0x543f6f(0x186)};},async 'execute'(_0x7961d5){const _0x5efb84=a182_0x29f76f,_0x3fd9ae=normalizeScene(_0x7961d5['str']('scene')),_0x51069f=SCENE_TO_LEGACY_TYPE[_0x3fd9ae],_0x142e23=validateInputSelection(_0x7961d5);if(_0x142e23['imageUrl']){const _0x3fad86=await recognizeDevelopmentOcr(_0x7961d5[_0x5efb84(0x17f)],{'url':_0x142e23[_0x5efb84(0x16f)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x3fad86,_0x3fd9ae)};}const _0x5a43bc=requireDevelopmentUploadFile(_0x142e23['imageFile'],_0x5efb84(0x178)),_0x25953b=await uploadDevelopmentFile(_0x7961d5['appCode'],_0x5a43bc[_0x5efb84(0x17e)]);if(!_0x25953b['filePath'])throw CliErrors[_0x5efb84(0x189)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5d9091=await queryDevelopmentFileUrl(_0x25953b[_0x5efb84(0x19d)],{'download':![]});if(!_0x5d9091[_0x5efb84(0x176)])throw CliErrors[_0x5efb84(0x189)](_0x5efb84(0x18a));const _0x4716a0=await recognizeDevelopmentOcr(_0x7961d5['appCode'],{'url':_0x5d9091[_0x5efb84(0x176)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x4716a0,_0x3fd9ae,_0x25953b)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a183_0x2206d8=a183_0x3395;(function(_0x3ea515,_0xe20e6a){const _0x43317a=a183_0x3395,_0x263c30=_0x3ea515();while(!![]){try{const _0x4a897b=-parseInt(_0x43317a(0x9f))/0x1*(-parseInt(_0x43317a(0xa7))/0x2)+parseInt(_0x43317a(0xb1))/0x3*(-parseInt(_0x43317a(0xb2))/0x4)+parseInt(_0x43317a(0xa8))/0x5+parseInt(_0x43317a(0xa0))/0x6*(parseInt(_0x43317a(0xac))/0x7)+parseInt(_0x43317a(0xc4))/0x8*(-parseInt(_0x43317a(0xba))/0x9)+parseInt(_0x43317a(0xcd))/0xa*(-parseInt(_0x43317a(0xe0))/0xb)+parseInt(_0x43317a(0xc3))/0xc;if(_0x4a897b===_0xe20e6a)break;else _0x263c30['push'](_0x263c30['shift']());}catch(_0x474c2d){_0x263c30['push'](_0x263c30['shift']());}}}(a183_0x1a72,0xdf16c));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a183_0x3395(_0xb020f4,_0x5f50ff){_0xb020f4=_0xb020f4-0x9b;const _0x1a72bd=a183_0x1a72();let _0x3395a4=_0x1a72bd[_0xb020f4];return _0x3395a4;}import{fileURLToPath}from'node:url';function a183_0x1a72(){const _0x4294c7=['.json','values','60000xivqTz','../../../templates/custom-pages','name','apiError','POST','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Invalid\x20Custom\x20Page\x20pattern:\x20','str','Custom_page_','files','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','length','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','version','isInteger','parent-menu-id','write','pageName','/smartapi/webcode/page/create','2607wJvsas','ONEPAGE','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','BLANK','create','toLowerCase','trim','isArray','1321049HaYnDX','12QCDqgl','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','parentMenuId','compress','page-dir','pageName\x20cannot\x20exceed\x20100\x20characters.','pageId','2jPZeSH','6827130jAmaLf','DASHBOARD','number','parse','110243OqAMPj','utf8','some','object','validation','231LkZYPC','3324DoTnPf','page-content','stringify','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','keys','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','4401qesZpx','menuPath','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','CUSTOM','page-pattern','4220592GhwvFF','10960yoHEPm','Would\x20create\x20Custom\x20Page\x20','page\x20create\x20does\x20not\x20accept\x20--page-type.','page.create','createMenu','string','appCode'];a183_0x1a72=function(){return _0x4294c7;};return a183_0x1a72();}import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x2206d8(0xe3),a183_0x2206d8(0xe1),a183_0x2206d8(0xa9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x2206d8(0xce));export const pageCreate={'service':a183_0x2206d8(0xbd),'command':a183_0x2206d8(0x9b),'description':a183_0x2206d8(0xa1),'risk':a183_0x2206d8(0xdd),'defaultOutputFormat':a183_0x2206d8(0xa3),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a183_0x2206d8(0xc6),'hint':a183_0x2206d8(0xb8)},{'name':a183_0x2206d8(0xb3),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a183_0x2206d8(0xd7)}],'flags':[{'name':'name','type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd9)},{'name':a183_0x2206d8(0xdc),'type':a183_0x2206d8(0xaa),'description':a183_0x2206d8(0xbc)},{'name':a183_0x2206d8(0xc2),'type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x2206d8(0xa4),'type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd2)},APPCODE_FLAG],async 'validate'(_0x992715){await readValidatedPageSource(_0x992715);},async 'dryRun'(_0x2f8216){const _0x2b6e97=a183_0x2206d8,_0x15d353=readInput(_0x2f8216,await readValidatedPageSource(_0x2f8216));return{'method':_0x2b6e97(0xd1),'url':_0x2b6e97(0xdf),'body':{'appCode':_0x15d353['appCode'],'pageName':_0x15d353[_0x2b6e97(0xde)],..._0x15d353[_0x2b6e97(0xa2)]!=null?{'parentMenuId':_0x15d353[_0x2b6e97(0xa2)]}:{},'createMenu':_0x15d353[_0x2b6e97(0xc8)],'codeContent':_0x15d353[_0x2b6e97(0xd6)]},'description':_0x2b6e97(0xc5)+JSON[_0x2b6e97(0xb4)](_0x15d353[_0x2b6e97(0xde)])+_0x2b6e97(0xbe)};},async 'execute'(_0x1c737d){const _0x32279a=a183_0x2206d8,_0x4b81ac=readInput(_0x1c737d,await readValidatedPageSource(_0x1c737d)),_0x5a599d=await createCustomPage(_0x4b81ac);if(!Number[_0x32279a(0xdb)](_0x5a599d[_0x32279a(0xa6)])||_0x5a599d[_0x32279a(0xa6)]<=0x0)throw CliErrors[_0x32279a(0xd0)](_0x32279a(0xb7));const _0x5af446=buildCustomPageDevelopmentUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xbb)]),_0x2ceabf=buildCustomPageEditUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xa6)]);return{'ok':!![],'data':{'operation':_0x32279a(0xc7),'pageType':_0x32279a(0xc1),'pagePattern':readPagePattern(_0x1c737d),'selector':{'appCode':_0x4b81ac[_0x32279a(0xca)],'pageName':_0x4b81ac['pageName']},'before':null,'after':{'pageId':_0x5a599d[_0x32279a(0xa6)],'pageName':_0x5a599d[_0x32279a(0xde)],'appCode':_0x5a599d['appCode'],'version':_0x5a599d[_0x32279a(0xda)],'menuId':_0x5a599d['menuId'],'menuPath':_0x5a599d[_0x32279a(0xbb)],'files':_0x5a599d['files']??Object['keys'](_0x4b81ac[_0x32279a(0xd6)])},'dryRun':![],'request':_0x4b81ac,..._0x5af446?{'pageUrl':_0x5af446}:{},..._0x2ceabf?{'editPageUrl':_0x2ceabf}:{},'warnings':_0x5af446?[]:[_0x32279a(0xb5)]},'message':'Created\x20Custom\x20Page\x20'+_0x5a599d[_0x32279a(0xa6)]+'.'};}};function readPagePattern(_0x1f8b19){const _0x5dc75f=a183_0x2206d8,_0x2b64d3=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xc2))[_0x5dc75f(0x9d)](),_0xe78688=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xa4))['trim']();if(_0x2b64d3&&_0xe78688)throw CliErrors['validation'](_0x5dc75f(0xbf));if(_0xe78688)return null;if(!_0x2b64d3)throw CliErrors[_0x5dc75f(0xb0)](_0x5dc75f(0xb9));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x2b64d3))throw CliErrors[_0x5dc75f(0xb0)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x2b64d3;}async function readPageSource(_0x176354){const _0x4acac9=a183_0x2206d8,_0x513352=_0x176354['str'](_0x4acac9(0xa4))[_0x4acac9(0x9d)](),_0x4947df=readPagePattern(_0x176354);if(_0x4947df===null){const _0x5b40b9=await readCustomPageDirectory(_0x513352);if(Object[_0x4acac9(0xb6)](_0x5b40b9)['length']===0x0)throw CliErrors[_0x4acac9(0xb0)](_0x4acac9(0xe2));return _0x5b40b9;}let _0xa0e52;try{_0xa0e52=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x4947df[_0x4acac9(0x9c)]()+_0x4acac9(0xcb)),_0x4acac9(0xad));}catch{throw CliErrors[_0x4acac9(0xb0)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x4947df+'.');}let _0x128ce4;try{_0x128ce4=JSON[_0x4acac9(0xab)](_0xa0e52);}catch{throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');}if(!_0x128ce4||typeof _0x128ce4!==_0x4acac9(0xaf)||Array[_0x4acac9(0x9e)](_0x128ce4)||Object[_0x4acac9(0xcc)](_0x128ce4)[_0x4acac9(0xae)](_0x159036=>typeof _0x159036!==_0x4acac9(0xc9)))throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');return _0x128ce4;}async function readValidatedPageSource(_0xe9ebd3){const _0x570034=await readPageSource(_0xe9ebd3);return await validateCustomPageContent(_0x570034),_0x570034;}function readInput(_0x5cc2f7,_0x5c4bff){const _0x250409=a183_0x2206d8,_0x33fb12=_0x5cc2f7[_0x250409(0xd4)](_0x250409(0xcf))[_0x250409(0x9d)]()||_0x250409(0xd5)+Date['now']();if(_0x33fb12[_0x250409(0xd8)]>0x64)throw CliErrors[_0x250409(0xb0)](_0x250409(0xa5));const _0x302296=_0x5cc2f7['num']('parent-menu-id',NaN),_0x20888c=!Number['isNaN'](_0x302296);if(_0x20888c&&(!Number['isInteger'](_0x302296)||_0x302296<=0x0))throw CliErrors[_0x250409(0xb0)](_0x250409(0xc0));return{'appCode':_0x5cc2f7['appCode'],'pageName':_0x33fb12,..._0x20888c?{'parentMenuId':_0x302296}:{},'createMenu':!![],'files':_0x5c4bff};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a184_0x35ab(){const _0x219b1b=['padStart','Custom\x20Page\x20ID','str','getFullYear','221798cPRfFo','join','number','5531364OAickR','1786036biDpJC','custom-detail','trim','Retrieved\x20Custom\x20Page\x20','getHours','getMinutes','read','151036PlNSaw','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','2098525SquOKk','getMonth','getSeconds','getTime','7770104EIXuGJ','appCode','7150850eRDblY','6ZJzTCz','page','20erwqph','pageCode','57IyMAHG','compress'];a184_0x35ab=function(){return _0x219b1b;};return a184_0x35ab();}const a184_0xd3fda0=a184_0x24c0;(function(_0xea4ec9,_0x190c1d){const _0x16d5fc=a184_0x24c0,_0x6fd150=_0xea4ec9();while(!![]){try{const _0x54fcb7=-parseInt(_0x16d5fc(0x1de))/0x1+-parseInt(_0x16d5fc(0x1e2))/0x2+parseInt(_0x16d5fc(0x1d8))/0x3*(parseInt(_0x16d5fc(0x1e9))/0x4)+parseInt(_0x16d5fc(0x1cd))/0x5+-parseInt(_0x16d5fc(0x1d4))/0x6*(-parseInt(_0x16d5fc(0x1d3))/0x7)+parseInt(_0x16d5fc(0x1d1))/0x8+parseInt(_0x16d5fc(0x1e1))/0x9*(-parseInt(_0x16d5fc(0x1d6))/0xa);if(_0x54fcb7===_0x190c1d)break;else _0x6fd150['push'](_0x6fd150['shift']());}catch(_0x40d1b4){_0x6fd150['push'](_0x6fd150['shift']());}}}(a184_0x35ab,0xbfe0b));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a184_0x24c0(_0x355d34,_0x112546){_0x355d34=_0x355d34-0x1cd;const _0x35ab7f=a184_0x35ab();let _0x24c087=_0x35ab7f[_0x355d34];return _0x24c087;}export const pageCustomDetail={'service':a184_0xd3fda0(0x1d5),'command':a184_0xd3fda0(0x1e3),'description':a184_0xd3fda0(0x1ea),'risk':a184_0xd3fda0(0x1e8),'defaultOutputFormat':a184_0xd3fda0(0x1d9),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0xd3fda0(0x1e0),'required':!![],'description':a184_0xd3fda0(0x1db)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f1d50){readCustomPageId(_0x4f1d50);},async 'execute'(_0xc8c99f){const _0x455e8b=a184_0xd3fda0,_0x3dcf95=readCustomPageId(_0xc8c99f),_0x1e09f3=await getCustomPageSource(_0x3dcf95),{bundle:_0x47645f,createTime:_0x5404a6,updateTime:_0x3c0c70,..._0x9735ab}=_0x1e09f3,_0x521513=_0x1e09f3['id']??_0x3dcf95,_0x340ea7=_0x1e09f3[_0x455e8b(0x1d2)]?.[_0x455e8b(0x1e4)]()||_0xc8c99f[_0x455e8b(0x1dc)]('appcode')[_0x455e8b(0x1e4)](),_0xd40492=buildCustomPageRuntimeUrl(_0x340ea7,_0x1e09f3[_0x455e8b(0x1d7)]),_0x3796e8=buildCustomPageEditUrl(_0x340ea7,_0x521513),_0x5f3b8a=await resolveCustomPageDevelopmentUrl(_0x340ea7,_0x521513,_0xc8c99f['cookie']);return{'ok':!![],'data':{..._0x9735ab,..._0xd40492?{'runtimePageUrl':_0xd40492}:{},..._0x5f3b8a?{'pageUrl':_0x5f3b8a}:{},..._0x3796e8?{'editPageUrl':_0x3796e8}:{},..._0x5404a6==null?{}:{'createTime':formatTime(_0x5404a6)},..._0x3c0c70==null?{}:{'updateTime':formatTime(_0x3c0c70)}},'message':_0x455e8b(0x1e5)+_0x3dcf95+'.'};}};function formatTime(_0x41de54){const _0x5e704a=a184_0xd3fda0,_0x2bdd99=new Date(_0x41de54);if(Number['isNaN'](_0x2bdd99[_0x5e704a(0x1d0)]()))return String(_0x41de54);const _0x3b6e03=[_0x2bdd99[_0x5e704a(0x1dd)](),String(_0x2bdd99[_0x5e704a(0x1ce)]()+0x1)[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99['getDate']())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)]('-'),_0x4830b0=[String(_0x2bdd99[_0x5e704a(0x1e6)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1e7)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1cf)]())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)](':');return _0x3b6e03+'\x20'+_0x4830b0;}
|