@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a191_0x2ff954=a191_0x1a20;function a191_0x3a94(){const _0x2fc0ed=['update-recovery','\x20changed\x20unexpectedly.','length','117PBseAm','69036kYPhBP','3898906QfyxGm','path','updated','join','type','modelType','true','11080863bIJyEP','set','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Would\x20update\x20visibility\x20for\x20','beforeById','Requested\x20menu\x20visibility','string','write','hash','update-menu-visibility','cookie','pageId','paths','10TSsnpq','message','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','POST','pageType','update','split','Final\x20menu\x20visibility\x20readback\x20failed.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','requestedVisible','label','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20','number','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','6741072xBIMLG','map','expected-count','\x20unchanged\x20menu(s).','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','1Bsozyd','update\x20menu\x20visibility','plan','menu_expected_count_mismatch','failed','validation','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','boolean','resources','code','36UYQmTj','visible','childrenCount','warnings','2143402XfeclP','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','str','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','targets','56iZppbr','parentId','datasetId','update\x20visibility\x20for','\x20menu(s);\x20skip\x20','values','\x20skipped,\x20','menus','2754545ylWMOS','menuIds','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Response\x20was\x20lost\x20for\x20menu\x20','menu_selector_not_found','before','resourcesValid','rabetbase\x20menu\x20list\x20--format\x20compress','verification','num','plannedActions','push','expect-visible','menu_selector_ambiguous','verify\x20menu\x20visibility\x20update','datasetCode','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','stringify','byId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','url','\x20must\x20be\x20true\x20or\x20false.','appCode','expectedCount','\x20failed.','filter','\x20menu(s);\x20skipped\x20','menu-ids','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','false','/smartapi/menu/update','body','expectVisible','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu_verification_failed','\x20menu(s),\x20expected\x20','969972FdEKgB','isArray','get','menu\x20list','visibility-update','Menu\x20id\x20selector(s)\x20not\x20found:\x20','childrenIds','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'];a191_0x3a94=function(){return _0x2fc0ed;};return a191_0x3a94();}(function(_0xe7e032,_0x1e70d5){const _0x477efc=a191_0x1a20,_0x2f0d54=_0xe7e032();while(!![]){try{const _0x3d62bc=-parseInt(_0x477efc(0x14d))/0x1*(parseInt(_0x477efc(0x15b))/0x2)+parseInt(_0x477efc(0x123))/0x3*(parseInt(_0x477efc(0x124))/0x4)+-parseInt(_0x477efc(0x168))/0x5+parseInt(_0x477efc(0x115))/0x6*(-parseInt(_0x477efc(0x160))/0x7)+parseInt(_0x477efc(0x148))/0x8+parseInt(_0x477efc(0x12c))/0x9*(parseInt(_0x477efc(0x139))/0xa)+parseInt(_0x477efc(0x125))/0xb*(parseInt(_0x477efc(0x157))/0xc);if(_0x3d62bc===_0x1e70d5)break;else _0x2f0d54['push'](_0x2f0d54['shift']());}catch(_0x243161){_0x2f0d54['push'](_0x2f0d54['shift']());}}}(a191_0x3a94,0xda5a6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x1a20(_0x59efb5,_0x26c80d){_0x59efb5=_0x59efb5-0xf9;const _0x3a9409=a191_0x3a94();let _0x1a2053=_0x3a9409[_0x59efb5];return _0x1a2053;}const BACKEND=[{'method':a191_0x2ff954(0x13c),'path':a191_0x2ff954(0x10f)}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x2ff954(0x119),'description':a191_0x2ff954(0x100),'risk':a191_0x2ff954(0x133),'structuredErrors':!![],'flags':[{'name':a191_0x2ff954(0x10c),'type':a191_0x2ff954(0x132),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x2ff954(0x138),'type':a191_0x2ff954(0x132),'description':a191_0x2ff954(0x112)},{'name':'visible','type':'boolean','required':!![],'description':a191_0x2ff954(0x131)},{'name':'expect-visible','type':a191_0x2ff954(0x154),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a191_0x2ff954(0x14a),'type':a191_0x2ff954(0x146),'description':a191_0x2ff954(0x12e)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4afe91){parseInput(_0x4afe91);},async 'dryRun'(_0x82e18a){const _0x2fd24c=a191_0x2ff954,_0x34ecd6=await buildPlan(_0x82e18a,!![]),_0x52fcb8=_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0xfa)]?.[_0x2fd24c(0x122)]??0x0,_0x236c36=_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0x15f)]['length']-_0x52fcb8;return menuDryRunResult(_0x34ecd6[_0x2fd24c(0x14f)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x34ecd6[_0x2fd24c(0x14f)][_0x2fd24c(0xfa)]?.[_0x2fd24c(0x149)](_0x2b254b=>_0x2b254b[_0x2fd24c(0x110)])??[]},'description':_0x2fd24c(0x12f)+_0x52fcb8+_0x2fd24c(0x164)+_0x236c36+_0x2fd24c(0x14b)});},async 'execute'(_0x546439){const _0x1e7412=a191_0x2ff954,_0x5bbb6d=await buildPlan(_0x546439,![]);await recheckMutationSnapshot(_0x546439,_0x5bbb6d[_0x1e7412(0x14f)],_0x1e7412(0x14e));const _0x168de2=[],_0x5c839f=[],_0x1944bb=[];for(const _0xe705f7 of _0x5bbb6d[_0x1e7412(0x14f)]['targets']){if(_0xe705f7[_0x1e7412(0x16e)][_0x1e7412(0x158)]===_0x5bbb6d[_0x1e7412(0x14f)]['requestedVisible']){_0x168de2[_0x1e7412(0xfb)]({'id':_0xe705f7['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x546439['appCode'],_0x546439[_0x1e7412(0x136)],{'id':_0xe705f7['id'],'visible':_0x5bbb6d['plan'][_0x1e7412(0x142)]}),_0x168de2['push']({'id':_0xe705f7['id'],'updated':!![],'skipped':![]});}catch(_0x5d2938){const _0x567c52=mapMenuApiError(_0x5d2938,_0x1e7412(0x163),_0xe705f7['id']);if(isMenuResponseLoss(_0x5d2938)&&_0x567c52[_0x1e7412(0x156)]!=='menu_permission_denied'){_0x1944bb[_0x1e7412(0xfb)](_0xe705f7['id']);continue;}_0x5c839f[_0x1e7412(0xfb)]({'id':_0xe705f7['id'],'stage':_0x1e7412(0x13e),'code':_0x567c52[_0x1e7412(0x156)],'message':_0x567c52[_0x1e7412(0x13a)]});}}let _0x15e596;try{_0x15e596=await fetchMenuSnapshot(_0x546439['appCode'],_0x546439[_0x1e7412(0x136)]);}catch(_0x1df7ee){const _0x42bfa3=describeMenuErrorCause(_0x1df7ee,_0x1e7412(0xfe)),_0x2a736b=_0x1944bb['map'](_0x191c39=>({'id':_0x191c39,'stage':_0x1e7412(0x120),'code':'menu_verification_failed','message':_0x1e7412(0x16c)+_0x191c39+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x179654={'stage':_0x1e7412(0x171),'code':_0x1e7412(0x113),'message':_0x1e7412(0x140),'targetIds':_0x5bbb6d['plan']['targets'][_0x1e7412(0x149)](_0x8dc79b=>_0x8dc79b['id']),'requestedStateConfirmed':![],..._0x42bfa3};throw menuFailure(asVerificationError(_0x1df7ee,_0x1e7412(0x153)),_0x5bbb6d[_0x1e7412(0x14f)],{'stage':'verification','succeeded':_0x168de2,'failedRecords':[..._0x5c839f,..._0x2a736b,_0x179654],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x1e7412(0x151),'recoveredCount':0x0,'lookupCommand':_0x1e7412(0x170)}});}const _0x426b1e=[];for(const _0x435bec of _0x168de2){const _0xb62afb=Number(_0x435bec['id']),_0x56b7e4=_0x5bbb6d[_0x1e7412(0x130)]['get'](_0xb62afb),_0x4f8863=_0x15e596[_0x1e7412(0x103)][_0x1e7412(0x117)](_0xb62afb);try{verifyVisibilityUpdate(_0x56b7e4,_0x4f8863,_0x5bbb6d['plan']['requestedVisible']);}catch(_0x9b95ca){const _0xb28339=asVerificationError(_0x9b95ca,_0x1e7412(0x145)+_0xb62afb+_0x1e7412(0x11c));_0x426b1e[_0x1e7412(0xfb)]({'id':_0xb62afb,'stage':_0x1e7412(0x171),'code':_0xb28339[_0x1e7412(0x156)],'message':_0xb28339['message'],'requestedStateConfirmed':![]});}}for(const _0x46aa80 of _0x1944bb){const _0x34d2f6=_0x5bbb6d[_0x1e7412(0x130)][_0x1e7412(0x117)](_0x46aa80),_0x176ad6=_0x15e596['byId']['get'](_0x46aa80);try{verifyVisibilityUpdate(_0x34d2f6,_0x176ad6,_0x5bbb6d[_0x1e7412(0x14f)][_0x1e7412(0x142)]),_0x168de2['push']({'id':_0x46aa80,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x499302){const _0x2957aa=asVerificationError(_0x499302,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x46aa80+_0x1e7412(0x15c));_0x426b1e[_0x1e7412(0xfb)]({'id':_0x46aa80,'stage':_0x1e7412(0x120),'code':_0x2957aa[_0x1e7412(0x156)],'message':_0x2957aa[_0x1e7412(0x13a)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x426b1e['length']>0x0){const _0x1af251=_0x426b1e['map'](_0x3691ee=>Number(_0x3691ee['id'])),_0x51ae53=_0x168de2[_0x1e7412(0x10a)](_0x1e0a38=>_0x1e0a38['recovered']===!![])['length'],_0x3311cf=menuError('menu_verification_failed',_0x1e7412(0x11f)+_0x1af251[_0x1e7412(0x128)](',\x20')+'.',_0x1e7412(0x13b));throw menuFailure(_0x3311cf,_0x5bbb6d[_0x1e7412(0x14f)],{'stage':'verification','succeeded':_0x168de2,'failedRecords':[..._0x5c839f,..._0x426b1e],'warnings':[_0x1e7412(0x15e)],'verification':{'status':_0x1e7412(0x151),..._0x1af251[_0x1e7412(0x122)]===0x1?{'targetId':_0x1af251[0x0]}:{'targetIds':_0x1af251},'recoveredCount':_0x51ae53,'lookupCommand':_0x1e7412(0x170)}});}const _0x5957b6=_0x168de2[_0x1e7412(0x10a)](_0x3ed081=>_0x3ed081[_0x1e7412(0x127)]===!![])['length'],_0x5b1260=_0x168de2['length']-_0x5957b6,_0x56fff2={..._0x5bbb6d[_0x1e7412(0x14f)],'succeeded':_0x168de2,'failed':_0x5c839f,'warnings':_0x5c839f[_0x1e7412(0x122)]>0x0?[..._0x5bbb6d[_0x1e7412(0x14f)]['warnings'],_0x1e7412(0x141)]:_0x5bbb6d['plan'][_0x1e7412(0x15a)],'verification':{'checkedBy':_0x1e7412(0x118),'snapshotHash':_0x15e596['hash'],'matchesRequestedState':_0x5c839f[_0x1e7412(0x122)]===0x0,'recoveredCount':_0x1944bb[_0x1e7412(0x122)]}};return{'ok':_0x5c839f['length']===0x0,'data':_0x56fff2,'message':_0x5c839f[_0x1e7412(0x122)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5957b6+_0x1e7412(0x10b)+_0x5b1260+_0x1e7412(0x14b):'Menu\x20visibility\x20update\x20completed:\x20'+_0x5957b6+'\x20updated,\x20'+_0x5b1260+_0x1e7412(0x166)+_0x5c839f['length']+_0x1e7412(0x109)};}};function parseInput(_0x5d63e7){const _0x257e74=a191_0x2ff954,_0xe02b6a=parseMenuIds(_0x5d63e7[_0x257e74(0x15d)](_0x257e74(0x10c))),_0xec0cbd=parseCsv(_0x5d63e7['str'](_0x257e74(0x138)));if(_0xe02b6a[_0x257e74(0x122)]===0x0&&_0xec0cbd[_0x257e74(0x122)]===0x0)throw CliErrors['validation']('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x5cb6c0=parseBooleanFlag(_0x5d63e7,_0x257e74(0x158),!![]),_0x748689=parseBooleanFlag(_0x5d63e7,_0x257e74(0xfc),![]);let _0x368684;if(hasFlag(_0x5d63e7,_0x257e74(0x14a))){_0x368684=_0x5d63e7[_0x257e74(0xf9)](_0x257e74(0x14a));if(!Number['isSafeInteger'](_0x368684)||_0x368684<0x0)throw CliErrors[_0x257e74(0x152)](_0x257e74(0x16b));}return{'menuIds':_0xe02b6a,'paths':_0xec0cbd,'visible':_0x5cb6c0,'expectVisible':_0x748689,'expectedCount':_0x368684};}async function buildPlan(_0x68fe7f,_0x28b4d9){const _0x208882=a191_0x2ff954,_0x24ee50=parseInput(_0x68fe7f),_0x14c41b=await fetchMutationSnapshot(_0x68fe7f,'update\x20menu\x20visibility'),_0x382ebd=selectTargets(_0x14c41b[_0x208882(0x167)],_0x24ee50[_0x208882(0x169)],_0x24ee50[_0x208882(0x138)]);if(_0x24ee50['expectedCount']!==undefined&&_0x382ebd[_0x208882(0x122)]!==_0x24ee50[_0x208882(0x108)])throw menuError(_0x208882(0x150),'Selected\x20'+_0x382ebd['length']+_0x208882(0x114)+_0x24ee50[_0x208882(0x108)]+'.',_0x208882(0x14c));if(_0x24ee50['expectVisible']!==undefined){const _0x461cf5=_0x382ebd[_0x208882(0x10a)](_0x16b6ef=>_0x16b6ef[_0x208882(0x158)]!==_0x24ee50[_0x208882(0x111)]);if(_0x461cf5['length']>0x0)throw menuError('menu_state_drift',_0x208882(0x147)+_0x461cf5['map'](_0x4f2ddf=>_0x4f2ddf['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x3ddd6d=_0x382ebd['map'](_0x4720d9=>({'id':_0x4720d9['id'],'label':_0x4720d9[_0x208882(0x143)],'path':_0x4720d9[_0x208882(0x126)],'before':{'visible':_0x4720d9['visible']},'after':{'visible':_0x24ee50['visible']}})),_0x44847c=_0x3ddd6d['filter'](_0x51fa63=>_0x51fa63[_0x208882(0x16e)][_0x208882(0x158)]!==_0x24ee50[_0x208882(0x158)])[_0x208882(0x149)](_0x406fd6=>({'stage':_0x208882(0x135),'method':'POST','path':_0x208882(0x10f),'body':{'appCode':_0x68fe7f[_0x208882(0x107)],'id':_0x406fd6['id'],'visible':_0x24ee50[_0x208882(0x158)]}})),_0x1885f4=mutationResult({'operation':_0x208882(0x119),'selector':{'menuIds':_0x24ee50[_0x208882(0x169)],'paths':_0x24ee50['paths']},'before':{'menus':_0x382ebd[_0x208882(0x149)](_0x55c25b=>({'id':_0x55c25b['id'],'path':_0x55c25b[_0x208882(0x126)],'visible':_0x55c25b['visible']}))},'after':{'menus':_0x382ebd['map'](_0x2f376a=>({'id':_0x2f376a['id'],'path':_0x2f376a[_0x208882(0x126)],'visible':_0x24ee50[_0x208882(0x158)]}))},'dryRun':_0x28b4d9,'backend':[...BACKEND],'plannedActions':_0x44847c,'snapshotHash':_0x14c41b[_0x208882(0x134)],'warnings':_0x44847c['length']===0x0?[_0x208882(0x11e)]:[]});return{'plan':{..._0x1885f4,'requestedVisible':_0x24ee50[_0x208882(0x158)],'targets':_0x3ddd6d},'beforeById':new Map(_0x382ebd[_0x208882(0x149)](_0x3e43ac=>[_0x3e43ac['id'],_0x3e43ac]))};}function selectTargets(_0x2d6ce6,_0x5d049f,_0x5b2671){const _0x298bac=a191_0x2ff954,_0x1ab0e0=new Map(_0x2d6ce6[_0x298bac(0x149)](_0x35d723=>[_0x35d723['id'],_0x35d723])),_0x41851f=new Map(),_0x2a014c=_0x5d049f[_0x298bac(0x10a)](_0x4475b6=>!_0x1ab0e0['has'](_0x4475b6));if(_0x2a014c[_0x298bac(0x122)]>0x0)throw menuError(_0x298bac(0x16d),_0x298bac(0x11a)+_0x2a014c[_0x298bac(0x128)](',\x20')+'.',_0x298bac(0x144));for(const _0x896b9c of _0x5d049f){_0x41851f['set'](_0x896b9c,_0x1ab0e0['get'](_0x896b9c));}for(const _0x25c292 of _0x5b2671){const _0x47f357=_0x2d6ce6[_0x298bac(0x10a)](_0x4d0185=>_0x4d0185['path']===_0x25c292);if(_0x47f357['length']===0x0)throw menuError(_0x298bac(0x16d),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x298bac(0x102)](_0x25c292)+'.',_0x298bac(0x10d));if(_0x47f357[_0x298bac(0x122)]>0x1)throw menuError(_0x298bac(0xfd),_0x298bac(0x11d)+JSON[_0x298bac(0x102)](_0x25c292)+'.',_0x298bac(0x101)+_0x47f357[_0x298bac(0x149)](_0x353607=>_0x353607['id'])[_0x298bac(0x128)](',\x20')+'.');const _0x48c209=_0x47f357[0x0];_0x41851f[_0x298bac(0x12d)](_0x48c209['id'],_0x48c209);}return[..._0x41851f[_0x298bac(0x165)]()];}function parseMenuIds(_0xae1d2){const _0xdfdf71=a191_0x2ff954,_0x468f48=parseCsv(_0xae1d2),_0x1aec4e=_0x468f48[_0xdfdf71(0x149)](Number);if(_0x1aec4e['some'](_0x3eccb9=>!Number['isSafeInteger'](_0x3eccb9)||_0x3eccb9<=0x0))throw CliErrors[_0xdfdf71(0x152)](_0xdfdf71(0x16a));return[...new Set(_0x1aec4e)];}function parseCsv(_0x4fd5c1){const _0x5d1f69=a191_0x2ff954;return[...new Set(_0x4fd5c1[_0x5d1f69(0x13f)](',')[_0x5d1f69(0x149)](_0x4bd830=>_0x4bd830['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x5459b,_0x4072c9,_0x1ee37f){const _0x3da042=a191_0x2ff954;if(!hasFlag(_0x5459b,_0x4072c9)){if(_0x1ee37f)throw CliErrors['flagMissing'](_0x4072c9);return undefined;}const _0x571bc3=_0x5459b['rawFlags'][_0x4072c9];if(_0x571bc3===!![]||_0x571bc3===![])return _0x571bc3;if(_0x571bc3===_0x3da042(0x12b))return!![];if(_0x571bc3===_0x3da042(0x10e))return![];throw CliErrors[_0x3da042(0x152)]('--'+_0x4072c9+_0x3da042(0x106));}function verifyVisibilityUpdate(_0x5963af,_0x3b77f4,_0x3050ea){const _0x31ed06=a191_0x2ff954;assertVerified(!!_0x3b77f4,'Menu\x20'+_0x5963af['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x3b77f4[_0x31ed06(0x158)]===_0x3050ea,'Menu\x20'+_0x5963af['id']+_0x31ed06(0x104));const _0x305417=[['id',_0x3b77f4['id'],_0x5963af['id']],[_0x31ed06(0x161),_0x3b77f4[_0x31ed06(0x161)],_0x5963af[_0x31ed06(0x161)]],['depth',_0x3b77f4['depth'],_0x5963af['depth']],[_0x31ed06(0x143),_0x3b77f4[_0x31ed06(0x143)],_0x5963af[_0x31ed06(0x143)]],['path',_0x3b77f4[_0x31ed06(0x126)],_0x5963af[_0x31ed06(0x126)]],[_0x31ed06(0x105),_0x3b77f4[_0x31ed06(0x105)],_0x5963af['url']],[_0x31ed06(0x129),_0x3b77f4[_0x31ed06(0x129)],_0x5963af['type']],['sort',_0x3b77f4['sort'],_0x5963af['sort']],[_0x31ed06(0x155),_0x3b77f4[_0x31ed06(0x155)],_0x5963af[_0x31ed06(0x155)]],['resourcesValid',_0x3b77f4[_0x31ed06(0x16f)],_0x5963af[_0x31ed06(0x16f)]],[_0x31ed06(0x11b),_0x3b77f4[_0x31ed06(0x11b)],_0x5963af[_0x31ed06(0x11b)]],[_0x31ed06(0x159),_0x3b77f4[_0x31ed06(0x159)],_0x5963af['childrenCount']],['pageId',_0x3b77f4[_0x31ed06(0x137)],_0x5963af[_0x31ed06(0x137)]],[_0x31ed06(0x13d),_0x3b77f4[_0x31ed06(0x13d)],_0x5963af[_0x31ed06(0x13d)]],['modelType',_0x3b77f4[_0x31ed06(0x12a)],_0x5963af[_0x31ed06(0x12a)]],['datasetId',_0x3b77f4[_0x31ed06(0x162)],_0x5963af[_0x31ed06(0x162)]],[_0x31ed06(0xff),_0x3b77f4[_0x31ed06(0xff)],_0x5963af[_0x31ed06(0xff)]]];for(const [_0xe66bb5,_0x2dbb2a,_0x5eb1ba]of _0x305417){assertVerified(sameValue(_0x2dbb2a,_0x5eb1ba),_0x31ed06(0x145)+_0x5963af['id']+'\x20'+_0xe66bb5+_0x31ed06(0x121));}}function sameValue(_0x9d865e,_0xa1935c){const _0x568358=a191_0x2ff954;if(Array[_0x568358(0x116)](_0x9d865e)||Array['isArray'](_0xa1935c))return JSON[_0x568358(0x102)](_0x9d865e)===JSON['stringify'](_0xa1935c);return _0x9d865e===_0xa1935c;}
|
|
1
|
+
const a191_0x5e6a12=a191_0x4a5e;(function(_0x5033b0,_0x4376c8){const _0x20830f=a191_0x4a5e,_0x3185a2=_0x5033b0();while(!![]){try{const _0x5cb63f=parseInt(_0x20830f(0x19f))/0x1*(-parseInt(_0x20830f(0x178))/0x2)+-parseInt(_0x20830f(0x1dc))/0x3+parseInt(_0x20830f(0x1b8))/0x4+-parseInt(_0x20830f(0x1ce))/0x5+parseInt(_0x20830f(0x19d))/0x6+-parseInt(_0x20830f(0x1c7))/0x7*(-parseInt(_0x20830f(0x1a0))/0x8)+parseInt(_0x20830f(0x199))/0x9;if(_0x5cb63f===_0x4376c8)break;else _0x3185a2['push'](_0x3185a2['shift']());}catch(_0x1c0573){_0x3185a2['push'](_0x3185a2['shift']());}}}(a191_0xbe67,0x98908));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0xbe67(){const _0x225ebf=['cookie','resourcesValid','plannedActions','menu_permission_denied','boolean','byId','\x20failed.','pageId','pageType','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu-ids','verification','menuIds','childrenCount','menu','Response\x20was\x20lost\x20and\x20menu\x20','split','paths','\x20menu(s);\x20skip\x20','label','updated','hash','rabetbase\x20menu\x20list\x20--format\x20compress','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','set','640292WMFzUB','resources','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','expectedCount','update\x20visibility\x20for','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','path','update','Menu\x20id\x20selector(s)\x20not\x20found:\x20','stringify','Menu\x20visibility\x20update\x20completed:\x20','Final\x20menu\x20visibility\x20readback\x20failed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20','recovered','has','code','requestedVisible','\x20menu(s),\x20expected\x20','expected-count','length','menu\x20list','str','warnings','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu_state_drift','\x20updated,\x20','map','message','menus','join','menu_selector_ambiguous','7235235xHgKuk','type','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','4728738HorbTy','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','3VmJomM','16elNxAW','get','expectVisible','isArray','sort','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','\x20must\x20be\x20true\x20or\x20false.','modelType','menu_expected_count_mismatch','datasetCode','true','number','visibility-update','plan','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','datasetId','failed','Would\x20update\x20visibility\x20for\x20','trim','string','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','2034188uTzyFp','expect-visible','some','body','/smartapi/menu/update','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','rawFlags','filter','write','\x20skipped,\x20','verify\x20menu\x20visibility\x20update','targets','beforeById','58163daKHla','menu_selector_not_found','Selected\x20','flagMissing','before','update\x20menu\x20visibility','push','2288900hxFsqt','\x20unchanged\x20menu(s).','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','values','validation','appCode','isSafeInteger','url','depth','childrenIds','visible','parentId','\x20visibility\x20update\x20could\x20not\x20be\x20verified','222243QUahAW'];a191_0xbe67=function(){return _0x225ebf;};return a191_0xbe67();}function a191_0x4a5e(_0x158d66,_0x530721){_0x158d66=_0x158d66-0x162;const _0xbe678e=a191_0xbe67();let _0x4a5ebf=_0xbe678e[_0x158d66];return _0x4a5ebf;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x5e6a12(0x1bf),'path':a191_0x5e6a12(0x1bc)}];export const menuVisibilityUpdate={'service':a191_0x5e6a12(0x16d),'command':a191_0x5e6a12(0x1ae),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x5e6a12(0x1c2),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x5e6a12(0x1b5),'description':a191_0x5e6a12(0x1b6)},{'name':a191_0x5e6a12(0x170),'type':a191_0x5e6a12(0x1b5),'description':a191_0x5e6a12(0x167)},{'name':a191_0x5e6a12(0x1d9),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x5e6a12(0x1b9),'type':a191_0x5e6a12(0x162),'description':a191_0x5e6a12(0x17d)},{'name':a191_0x5e6a12(0x18b),'type':a191_0x5e6a12(0x1ad),'description':a191_0x5e6a12(0x1b0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3aefde){parseInput(_0x3aefde);},async 'dryRun'(_0x4b96fa){const _0x4299e9=a191_0x5e6a12,_0x59b7ff=await buildPlan(_0x4b96fa,!![]),_0x2e4132=_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1df)]?.[_0x4299e9(0x18c)]??0x0,_0x597160=_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1c5)][_0x4299e9(0x18c)]-_0x2e4132;return menuDryRunResult(_0x59b7ff[_0x4299e9(0x1af)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1df)]?.['map'](_0x13a5a0=>_0x13a5a0[_0x4299e9(0x1bb)])??[]},'description':_0x4299e9(0x1b3)+_0x2e4132+_0x4299e9(0x171)+_0x597160+_0x4299e9(0x1cf)});},async 'execute'(_0x2ce898){const _0x4d062f=a191_0x5e6a12,_0xb77a34=await buildPlan(_0x2ce898,![]);await recheckMutationSnapshot(_0x2ce898,_0xb77a34['plan'],_0x4d062f(0x1cc));const _0x1ecaf5=[],_0x4283ab=[],_0x2b4979=[];for(const _0x4c98ef of _0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x1c5)]){if(_0x4c98ef[_0x4d062f(0x1cb)][_0x4d062f(0x1d9)]===_0xb77a34['plan'][_0x4d062f(0x189)]){_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2ce898[_0x4d062f(0x1d4)],_0x2ce898[_0x4d062f(0x1dd)],{'id':_0x4c98ef['id'],'visible':_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x189)]}),_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'updated':!![],'skipped':![]});}catch(_0x19b94f){const _0x525b02=mapMenuApiError(_0x19b94f,_0x4d062f(0x17c),_0x4c98ef['id']);if(isMenuResponseLoss(_0x19b94f)&&_0x525b02[_0x4d062f(0x188)]!==_0x4d062f(0x1e0)){_0x2b4979[_0x4d062f(0x1cd)](_0x4c98ef['id']);continue;}_0x4283ab[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'stage':_0x4d062f(0x17f),'code':_0x525b02[_0x4d062f(0x188)],'message':_0x525b02[_0x4d062f(0x195)]});}}let _0x56111c;try{_0x56111c=await fetchMenuSnapshot(_0x2ce898[_0x4d062f(0x1d4)],_0x2ce898['cookie']);}catch(_0xc2426){const _0x41e70c=describeMenuErrorCause(_0xc2426,_0x4d062f(0x1c4)),_0x39c025=_0x2b4979[_0x4d062f(0x194)](_0x334e20=>({'id':_0x334e20,'stage':_0x4d062f(0x19b),'code':_0x4d062f(0x1a6),'message':_0x4d062f(0x1a7)+_0x334e20+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x8cf39c={'stage':'verification','code':_0x4d062f(0x1a6),'message':_0x4d062f(0x183),'targetIds':_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x1c5)][_0x4d062f(0x194)](_0x429732=>_0x429732['id']),'requestedStateConfirmed':![],..._0x41e70c};throw menuFailure(asVerificationError(_0xc2426,_0x4d062f(0x1bd)),_0xb77a34[_0x4d062f(0x1af)],{'stage':_0x4d062f(0x16a),'succeeded':_0x1ecaf5,'failedRecords':[..._0x4283ab,..._0x39c025,_0x8cf39c],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x4d062f(0x1b2),'recoveredCount':0x0,'lookupCommand':_0x4d062f(0x175)}});}const _0x119393=[];for(const _0x4abbaf of _0x1ecaf5){const _0x46f727=Number(_0x4abbaf['id']),_0x2d242a=_0xb77a34[_0x4d062f(0x1c6)][_0x4d062f(0x1a1)](_0x46f727),_0xc6e2f3=_0x56111c[_0x4d062f(0x163)][_0x4d062f(0x1a1)](_0x46f727);try{verifyVisibilityUpdate(_0x2d242a,_0xc6e2f3,_0xb77a34['plan']['requestedVisible']);}catch(_0xe500a9){const _0x116bb8=asVerificationError(_0xe500a9,'Menu\x20'+_0x46f727+_0x4d062f(0x1db));_0x119393[_0x4d062f(0x1cd)]({'id':_0x46f727,'stage':_0x4d062f(0x16a),'code':_0x116bb8[_0x4d062f(0x188)],'message':_0x116bb8['message'],'requestedStateConfirmed':![]});}}for(const _0x52932d of _0x2b4979){const _0x4bee2f=_0xb77a34[_0x4d062f(0x1c6)][_0x4d062f(0x1a1)](_0x52932d),_0x5607a7=_0x56111c['byId'][_0x4d062f(0x1a1)](_0x52932d);try{verifyVisibilityUpdate(_0x4bee2f,_0x5607a7,_0xb77a34['plan'][_0x4d062f(0x189)]),_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x52932d,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x55c39a){const _0x9f1ccc=asVerificationError(_0x55c39a,_0x4d062f(0x16e)+_0x52932d+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x119393['push']({'id':_0x52932d,'stage':_0x4d062f(0x19b),'code':_0x9f1ccc['code'],'message':_0x9f1ccc[_0x4d062f(0x195)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x119393[_0x4d062f(0x18c)]>0x0){const _0x1b19d6=_0x119393['map'](_0x3f51b9=>Number(_0x3f51b9['id'])),_0x25960b=_0x1ecaf5[_0x4d062f(0x1c1)](_0x3ef50b=>_0x3ef50b[_0x4d062f(0x186)]===!![])[_0x4d062f(0x18c)],_0x25cc3e=menuError(_0x4d062f(0x1a6),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1b19d6[_0x4d062f(0x197)](',\x20')+'.',_0x4d062f(0x176));throw menuFailure(_0x25cc3e,_0xb77a34[_0x4d062f(0x1af)],{'stage':_0x4d062f(0x16a),'succeeded':_0x1ecaf5,'failedRecords':[..._0x4283ab,..._0x119393],'warnings':[_0x4d062f(0x1d0)],'verification':{'status':_0x4d062f(0x1b2),..._0x1b19d6['length']===0x1?{'targetId':_0x1b19d6[0x0]}:{'targetIds':_0x1b19d6},'recoveredCount':_0x25960b,'lookupCommand':_0x4d062f(0x175)}});}const _0x3a9813=_0x1ecaf5[_0x4d062f(0x1c1)](_0x153c6b=>_0x153c6b[_0x4d062f(0x173)]===!![])[_0x4d062f(0x18c)],_0x33465b=_0x1ecaf5[_0x4d062f(0x18c)]-_0x3a9813,_0x5a34f8={..._0xb77a34['plan'],'succeeded':_0x1ecaf5,'failed':_0x4283ab,'warnings':_0x4283ab[_0x4d062f(0x18c)]>0x0?[..._0xb77a34['plan'][_0x4d062f(0x18f)],_0x4d062f(0x1a5)]:_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x18f)],'verification':{'checkedBy':_0x4d062f(0x18d),'snapshotHash':_0x56111c[_0x4d062f(0x174)],'matchesRequestedState':_0x4283ab[_0x4d062f(0x18c)]===0x0,'recoveredCount':_0x2b4979['length']}};return{'ok':_0x4283ab[_0x4d062f(0x18c)]===0x0,'data':_0x5a34f8,'message':_0x4283ab['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x3a9813+'\x20menu(s);\x20skipped\x20'+_0x33465b+'\x20unchanged\x20menu(s).':_0x4d062f(0x182)+_0x3a9813+_0x4d062f(0x193)+_0x33465b+_0x4d062f(0x1c3)+_0x4283ab[_0x4d062f(0x18c)]+_0x4d062f(0x164)};}};function parseInput(_0x41b1f0){const _0x23f306=a191_0x5e6a12,_0xce1704=parseMenuIds(_0x41b1f0[_0x23f306(0x18e)](_0x23f306(0x169))),_0x57aebc=parseCsv(_0x41b1f0[_0x23f306(0x18e)](_0x23f306(0x170)));if(_0xce1704[_0x23f306(0x18c)]===0x0&&_0x57aebc[_0x23f306(0x18c)]===0x0)throw CliErrors[_0x23f306(0x1d3)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x548452=parseBooleanFlag(_0x41b1f0,_0x23f306(0x1d9),!![]),_0x2e6618=parseBooleanFlag(_0x41b1f0,_0x23f306(0x1b9),![]);let _0x3a412a;if(hasFlag(_0x41b1f0,_0x23f306(0x18b))){_0x3a412a=_0x41b1f0['num'](_0x23f306(0x18b));if(!Number['isSafeInteger'](_0x3a412a)||_0x3a412a<0x0)throw CliErrors[_0x23f306(0x1d3)](_0x23f306(0x191));}return{'menuIds':_0xce1704,'paths':_0x57aebc,'visible':_0x548452,'expectVisible':_0x2e6618,'expectedCount':_0x3a412a};}async function buildPlan(_0x4779d8,_0x4738c3){const _0x448620=a191_0x5e6a12,_0x46c616=parseInput(_0x4779d8),_0x443dad=await fetchMutationSnapshot(_0x4779d8,_0x448620(0x1cc)),_0x2cea96=selectTargets(_0x443dad[_0x448620(0x196)],_0x46c616['menuIds'],_0x46c616[_0x448620(0x170)]);if(_0x46c616[_0x448620(0x17b)]!==undefined&&_0x2cea96['length']!==_0x46c616[_0x448620(0x17b)])throw menuError(_0x448620(0x1aa),_0x448620(0x1c9)+_0x2cea96['length']+_0x448620(0x18a)+_0x46c616[_0x448620(0x17b)]+'.',_0x448620(0x1b7));if(_0x46c616[_0x448620(0x1a2)]!==undefined){const _0x469c37=_0x2cea96[_0x448620(0x1c1)](_0x192c57=>_0x192c57['visible']!==_0x46c616[_0x448620(0x1a2)]);if(_0x469c37['length']>0x0)throw menuError(_0x448620(0x192),_0x448620(0x17a)+_0x469c37['map'](_0x2b6f48=>_0x2b6f48['id'])[_0x448620(0x197)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x565bc0=_0x2cea96[_0x448620(0x194)](_0x1ae733=>({'id':_0x1ae733['id'],'label':_0x1ae733['label'],'path':_0x1ae733['path'],'before':{'visible':_0x1ae733[_0x448620(0x1d9)]},'after':{'visible':_0x46c616[_0x448620(0x1d9)]}})),_0x1efd96=_0x565bc0[_0x448620(0x1c1)](_0x1c5a7a=>_0x1c5a7a[_0x448620(0x1cb)][_0x448620(0x1d9)]!==_0x46c616[_0x448620(0x1d9)])[_0x448620(0x194)](_0xf6a801=>({'stage':'update-menu-visibility','method':_0x448620(0x1bf),'path':_0x448620(0x1bc),'body':{'appCode':_0x4779d8[_0x448620(0x1d4)],'id':_0xf6a801['id'],'visible':_0x46c616[_0x448620(0x1d9)]}})),_0x49e520=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x46c616[_0x448620(0x16b)],'paths':_0x46c616['paths']},'before':{'menus':_0x2cea96[_0x448620(0x194)](_0x241274=>({'id':_0x241274['id'],'path':_0x241274[_0x448620(0x17e)],'visible':_0x241274[_0x448620(0x1d9)]}))},'after':{'menus':_0x2cea96['map'](_0x5bb820=>({'id':_0x5bb820['id'],'path':_0x5bb820['path'],'visible':_0x46c616[_0x448620(0x1d9)]}))},'dryRun':_0x4738c3,'backend':[...BACKEND],'plannedActions':_0x1efd96,'snapshotHash':_0x443dad[_0x448620(0x174)],'warnings':_0x1efd96[_0x448620(0x18c)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x49e520,'requestedVisible':_0x46c616[_0x448620(0x1d9)],'targets':_0x565bc0},'beforeById':new Map(_0x2cea96[_0x448620(0x194)](_0x3b00a9=>[_0x3b00a9['id'],_0x3b00a9]))};}function selectTargets(_0x389724,_0x54c46d,_0x36c102){const _0x328824=a191_0x5e6a12,_0x3da0e4=new Map(_0x389724[_0x328824(0x194)](_0x1385fb=>[_0x1385fb['id'],_0x1385fb])),_0x5c969b=new Map(),_0x13327b=_0x54c46d[_0x328824(0x1c1)](_0x11716e=>!_0x3da0e4[_0x328824(0x187)](_0x11716e));if(_0x13327b[_0x328824(0x18c)]>0x0)throw menuError(_0x328824(0x1c8),_0x328824(0x180)+_0x13327b['join'](',\x20')+'.',_0x328824(0x184));for(const _0x55fd61 of _0x54c46d){_0x5c969b[_0x328824(0x177)](_0x55fd61,_0x3da0e4[_0x328824(0x1a1)](_0x55fd61));}for(const _0x5283b2 of _0x36c102){const _0x472f0c=_0x389724['filter'](_0x12922b=>_0x12922b[_0x328824(0x17e)]===_0x5283b2);if(_0x472f0c['length']===0x0)throw menuError(_0x328824(0x1c8),_0x328824(0x19c)+JSON[_0x328824(0x181)](_0x5283b2)+'.',_0x328824(0x1d1));if(_0x472f0c[_0x328824(0x18c)]>0x1)throw menuError(_0x328824(0x198),_0x328824(0x19e)+JSON[_0x328824(0x181)](_0x5283b2)+'.',_0x328824(0x190)+_0x472f0c['map'](_0x28ebc6=>_0x28ebc6['id'])[_0x328824(0x197)](',\x20')+'.');const _0x391e59=_0x472f0c[0x0];_0x5c969b[_0x328824(0x177)](_0x391e59['id'],_0x391e59);}return[..._0x5c969b[_0x328824(0x1d2)]()];}function parseMenuIds(_0x593c94){const _0x4ac829=a191_0x5e6a12,_0x110090=parseCsv(_0x593c94),_0x355a90=_0x110090[_0x4ac829(0x194)](Number);if(_0x355a90[_0x4ac829(0x1ba)](_0x2e927b=>!Number[_0x4ac829(0x1d5)](_0x2e927b)||_0x2e927b<=0x0))throw CliErrors[_0x4ac829(0x1d3)](_0x4ac829(0x1be));return[...new Set(_0x355a90)];}function parseCsv(_0x34c720){const _0x5ebba5=a191_0x5e6a12;return[...new Set(_0x34c720[_0x5ebba5(0x16f)](',')[_0x5ebba5(0x194)](_0x59da20=>_0x59da20[_0x5ebba5(0x1b4)]())[_0x5ebba5(0x1c1)](Boolean))];}function parseBooleanFlag(_0x31b04d,_0x23786a,_0x416695){const _0x3eb18e=a191_0x5e6a12;if(!hasFlag(_0x31b04d,_0x23786a)){if(_0x416695)throw CliErrors[_0x3eb18e(0x1ca)](_0x23786a);return undefined;}const _0x136424=_0x31b04d[_0x3eb18e(0x1c0)][_0x23786a];if(_0x136424===!![]||_0x136424===![])return _0x136424;if(_0x136424===_0x3eb18e(0x1ac))return!![];if(_0x136424==='false')return![];throw CliErrors['validation']('--'+_0x23786a+_0x3eb18e(0x1a8));}function verifyVisibilityUpdate(_0x178141,_0xdf922a,_0x5f1cec){const _0x2347b7=a191_0x5e6a12;assertVerified(!!_0xdf922a,_0x2347b7(0x185)+_0x178141['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0xdf922a['visible']===_0x5f1cec,_0x2347b7(0x185)+_0x178141['id']+_0x2347b7(0x168));const _0x18c74f=[['id',_0xdf922a['id'],_0x178141['id']],[_0x2347b7(0x1da),_0xdf922a[_0x2347b7(0x1da)],_0x178141[_0x2347b7(0x1da)]],[_0x2347b7(0x1d7),_0xdf922a[_0x2347b7(0x1d7)],_0x178141['depth']],[_0x2347b7(0x172),_0xdf922a[_0x2347b7(0x172)],_0x178141[_0x2347b7(0x172)]],[_0x2347b7(0x17e),_0xdf922a[_0x2347b7(0x17e)],_0x178141['path']],[_0x2347b7(0x1d6),_0xdf922a[_0x2347b7(0x1d6)],_0x178141[_0x2347b7(0x1d6)]],[_0x2347b7(0x19a),_0xdf922a[_0x2347b7(0x19a)],_0x178141[_0x2347b7(0x19a)]],[_0x2347b7(0x1a4),_0xdf922a[_0x2347b7(0x1a4)],_0x178141[_0x2347b7(0x1a4)]],['resources',_0xdf922a[_0x2347b7(0x179)],_0x178141[_0x2347b7(0x179)]],['resourcesValid',_0xdf922a[_0x2347b7(0x1de)],_0x178141[_0x2347b7(0x1de)]],[_0x2347b7(0x1d8),_0xdf922a['childrenIds'],_0x178141[_0x2347b7(0x1d8)]],['childrenCount',_0xdf922a[_0x2347b7(0x16c)],_0x178141['childrenCount']],[_0x2347b7(0x165),_0xdf922a['pageId'],_0x178141[_0x2347b7(0x165)]],['pageType',_0xdf922a[_0x2347b7(0x166)],_0x178141[_0x2347b7(0x166)]],[_0x2347b7(0x1a9),_0xdf922a[_0x2347b7(0x1a9)],_0x178141[_0x2347b7(0x1a9)]],[_0x2347b7(0x1b1),_0xdf922a[_0x2347b7(0x1b1)],_0x178141['datasetId']],[_0x2347b7(0x1ab),_0xdf922a[_0x2347b7(0x1ab)],_0x178141[_0x2347b7(0x1ab)]]];for(const [_0x234174,_0x39a5f8,_0x1ca580]of _0x18c74f){assertVerified(sameValue(_0x39a5f8,_0x1ca580),_0x2347b7(0x185)+_0x178141['id']+'\x20'+_0x234174+'\x20changed\x20unexpectedly.');}}function sameValue(_0x3d90a6,_0x27322a){const _0x29dbb3=a191_0x5e6a12;if(Array[_0x29dbb3(0x1a3)](_0x3d90a6)||Array[_0x29dbb3(0x1a3)](_0x27322a))return JSON[_0x29dbb3(0x181)](_0x3d90a6)===JSON[_0x29dbb3(0x181)](_0x27322a);return _0x3d90a6===_0x27322a;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a192_0xab5d(){const _0x591680=['notification',';\x20do\x20not\x20resubmit\x20automatically.','POST','planned','9wvGfnt','channelConfig','6veUDQz','130mXjpoH','verified','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','channelType','8284445idPgar','notification_config_create_outcome_unknown','readTimeout','mutation','161gGzWjI','create',';\x20do\x20not\x20resubmit.','document','5tESzug','485656LrxWhw','2069016sVeuEh','/notification/channel-config/create','isSafeInteger','599005CAfcUO','description','verification','29510844tuKDfb','endpointUrl','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','appCode','13PxBdHy','8202879rAmSVQ','723950lmkOCM','input','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20','configName'];a192_0xab5d=function(){return _0x591680;};return a192_0xab5d();}const a192_0x42e5a3=a192_0x1125;(function(_0x9d9213,_0x4b6c5c){const _0x84d640=a192_0x1125,_0x3ed46d=_0x9d9213();while(!![]){try{const _0xbed404=-parseInt(_0x84d640(0x1fa))/0x1*(parseInt(_0x84d640(0x208))/0x2)+parseInt(_0x84d640(0x211))/0x3*(-parseInt(_0x84d640(0x1fc))/0x4)+parseInt(_0x84d640(0x1f2))/0x5*(parseInt(_0x84d640(0x1ed))/0x6)+-parseInt(_0x84d640(0x1f6))/0x7*(parseInt(_0x84d640(0x1fb))/0x8)+parseInt(_0x84d640(0x207))/0x9+-parseInt(_0x84d640(0x1ee))/0xa*(-parseInt(_0x84d640(0x1ff))/0xb)+parseInt(_0x84d640(0x202))/0xc*(parseInt(_0x84d640(0x206))/0xd);if(_0xbed404===_0x4b6c5c)break;else _0x3ed46d['push'](_0x3ed46d['shift']());}catch(_0x2c8a66){_0x3ed46d['push'](_0x3ed46d['shift']());}}}(a192_0xab5d,0xeeaa6));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x42e5a3(0x1fd);function a192_0x1125(_0x364795,_0x1d2a8f){_0x364795=_0x364795-0x1ec;const _0xab5d1d=a192_0xab5d();let _0x1125d4=_0xab5d1d[_0x364795];return _0x1125d4;}async function prepareCreate(_0x5a22b3){const _0x2e2c9d=a192_0x42e5a3,_0x582214=await readNotificationDocument(_0x5a22b3,_0x2e2c9d(0x1f7)),_0x487b70=createMutationInput(_0x5a22b3[_0x2e2c9d(0x205)],_0x582214);return{'document':_0x582214,'input':_0x487b70,'planned':projectNotificationConfig({'appCode':_0x5a22b3[_0x2e2c9d(0x205)],'configName':_0x582214['configName'],'channelType':_0x582214['channelType'],'endpointUrl':_0x582214[_0x2e2c9d(0x203)],'channelConfig':_0x582214[_0x2e2c9d(0x1ec)],'description':_0x582214[_0x2e2c9d(0x200)],'connectTimeout':_0x582214['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x582214[_0x2e2c9d(0x1f4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x42e5a3(0x20d),'command':'config-create','description':a192_0x42e5a3(0x1f0),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2dffd7){assertSingleNotificationSource(_0x2dffd7);},async 'dryRun'(_0x37dfdc){const _0x65c4bb=a192_0x42e5a3,_0x39bf70=await prepareCreate(_0x37dfdc),_0xcbd697=notificationLookupCommand(_0x37dfdc[_0x65c4bb(0x205)],_0x39bf70['document'][_0x65c4bb(0x1f1)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x37dfdc['appCode'],'configName':_0x39bf70[_0x65c4bb(0x1f9)][_0x65c4bb(0x20c)],'channelType':_0x39bf70[_0x65c4bb(0x1f9)][_0x65c4bb(0x1f1)]},'before':null,'after':_0x39bf70['planned'],'dryRun':!![],'backend':{'method':_0x65c4bb(0x20f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x65c4bb(0x210),'lookupCommand':_0xcbd697}},{'method':_0x65c4bb(0x20f),'url':CREATE_PATH});},async 'execute'(_0x31ea01){const _0x4d2d81=a192_0x42e5a3,_0x5495a0=await prepareCreate(_0x31ea01),_0x433b03=notificationLookupCommand(_0x31ea01['appCode'],_0x5495a0['document'][_0x4d2d81(0x1f1)]);let _0x39f5da;try{_0x39f5da=await createNotificationChannelConfig(_0x5495a0[_0x4d2d81(0x209)]);}catch(_0x7574c){if(isPlatformTransportFailure(_0x7574c))throw notificationError('notification_config_create_outcome_unknown',_0x4d2d81(0x204),_0x4d2d81(0x20b)+_0x433b03+_0x4d2d81(0x1f8));throw safeApiFailure('create',_0x4d2d81(0x1f5),_0x4d2d81(0x20b)+_0x433b03+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x4d2d81(0x1fe)](_0x39f5da)||_0x39f5da<=0x0)throw notificationError(_0x4d2d81(0x1f3),_0x4d2d81(0x20a),_0x4d2d81(0x20b)+_0x433b03+';\x20do\x20not\x20resubmit.');let _0x4ce5c2;try{const _0x2812c0=await getNotificationChannelConfig(_0x39f5da,_0x31ea01[_0x4d2d81(0x205)]);_0x4ce5c2=normalizeExactNotificationConfig(_0x2812c0,_0x39f5da,_0x31ea01[_0x4d2d81(0x205)]);}catch{throw safeApiFailure(_0x4d2d81(0x1f7),_0x4d2d81(0x201),_0x4d2d81(0x20b)+_0x433b03+_0x4d2d81(0x20e));}return{'ok':!![],'data':{'operation':_0x4d2d81(0x1f7),'selector':{'appCode':_0x4ce5c2[_0x4d2d81(0x205)],'id':_0x4ce5c2['id'],'configCode':_0x4ce5c2['configCode'],'configName':_0x4ce5c2[_0x4d2d81(0x20c)],'channelType':_0x4ce5c2[_0x4d2d81(0x1f1)]},'before':null,'after':projectNotificationConfig(_0x4ce5c2),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4d2d81(0x1ef),'lookupCommand':_0x433b03}},'message':'Created\x20notification\x20config\x20'+_0x4ce5c2['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0xed5ad1=a193_0x47ac;function a193_0x47ac(_0x46bf41,_0x40a1bf){_0x46bf41=_0x46bf41-0x15d;const _0x33c3c0=a193_0x33c3();let _0x47acaf=_0x33c3c0[_0x46bf41];return _0x47acaf;}(function(_0x437d9b,_0x3b7d2a){const _0x135341=a193_0x47ac,_0x164071=_0x437d9b();while(!![]){try{const _0x1d18a1=-parseInt(_0x135341(0x16a))/0x1+parseInt(_0x135341(0x162))/0x2*(parseInt(_0x135341(0x179))/0x3)+parseInt(_0x135341(0x15e))/0x4*(-parseInt(_0x135341(0x161))/0x5)+parseInt(_0x135341(0x170))/0x6*(parseInt(_0x135341(0x15f))/0x7)+-parseInt(_0x135341(0x174))/0x8+parseInt(_0x135341(0x172))/0x9+parseInt(_0x135341(0x16f))/0xa;if(_0x1d18a1===_0x3b7d2a)break;else _0x164071['push'](_0x164071['shift']());}catch(_0x229ca4){_0x164071['push'](_0x164071['shift']());}}}(a193_0x33c3,0x3e51d));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x33c3(){const _0x7cdf2b=['175EtFKLy','378086oquVaB','Inspect\x20with\x20','Notification\x20config\x20','\x20delete\x20could\x20not\x20be\x20verified.','notification_config_delete_verification_failed','/notification/channel-config/delete',';\x20do\x20not\x20resubmit\x20automatically.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','233965gVuQxj','appCode','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','3331640nhUXqz','60vLhqCO','config-delete','2957013PvGiJb','delete','2077664sJurlI','high-risk-write','channelType','mutation','before','3bdqhnm','verified','Deleted\x20notification\x20config\x20','POST','planned','36072sloUTO','149660UalMal','some'];a193_0x33c3=function(){return _0x7cdf2b;};return a193_0x33c3();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0xed5ad1(0x167),REFERENCE_WARNING=a193_0xed5ad1(0x169);async function prepareDelete(_0x9e0d05){const _0x448081=a193_0xed5ad1,_0x1a730b=readNotificationId(_0x9e0d05),_0x407f3d=await requireExactNotificationConfig(_0x9e0d05['appCode'],_0x1a730b,_0x448081(0x173));return{'id':_0x1a730b,'before':_0x407f3d};}export const notificationConfigDelete={'service':a193_0xed5ad1(0x16d),'command':a193_0xed5ad1(0x171),'description':a193_0xed5ad1(0x16e),'risk':a193_0xed5ad1(0x175),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x1eafc8){readNotificationId(_0x1eafc8),requireNotificationExplicitYes(_0x1eafc8);},async 'dryRun'(_0x4af073){const _0x3d37d5=a193_0xed5ad1,_0x525d03=await prepareDelete(_0x4af073),_0x19d977=notificationLookupCommand(_0x4af073[_0x3d37d5(0x16b)],_0x525d03[_0x3d37d5(0x178)]['channelType']);return asDryRunResult({'operation':_0x3d37d5(0x173),'selector':notificationSelector(_0x525d03['before']),'before':projectNotificationConfig(_0x525d03['before']),'after':null,'dryRun':!![],'backend':{'method':_0x3d37d5(0x17c),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x3d37d5(0x15d),'lookupCommand':_0x19d977}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0xaece31){const _0x4aca33=a193_0xed5ad1;requireNotificationExplicitYes(_0xaece31);const _0x157a38=await prepareDelete(_0xaece31),_0x610d3d=notificationLookupCommand(_0xaece31[_0x4aca33(0x16b)],_0x157a38[_0x4aca33(0x178)]['channelType']);let _0x42c099=![];try{await deleteNotificationChannelConfig(_0x157a38['id'],_0xaece31[_0x4aca33(0x16b)]);}catch(_0x3c7780){if(!isPlatformTransportFailure(_0x3c7780))throw safeApiFailure(_0x4aca33(0x173),_0x4aca33(0x177),_0x4aca33(0x163)+_0x610d3d+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x42c099=!![];}let _0x44c511;try{_0x44c511=await listNotificationChannelConfigs(_0xaece31['appCode'],_0x157a38[_0x4aca33(0x178)]['channelType']),validateNotificationDeleteReadback(_0x44c511,_0xaece31[_0x4aca33(0x16b)],_0x157a38[_0x4aca33(0x178)][_0x4aca33(0x176)]);}catch{throw notificationError(_0x42c099?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x4aca33(0x164)+_0x157a38['id']+_0x4aca33(0x165),_0x4aca33(0x163)+_0x610d3d+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x44c511[_0x4aca33(0x160)](_0xcefdd2=>_0xcefdd2['id']===_0x157a38['id']))throw notificationError(_0x42c099?'notification_config_delete_outcome_unknown':_0x4aca33(0x166),_0x4aca33(0x164)+_0x157a38['id']+'\x20remains\x20present\x20after\x20delete.',_0x4aca33(0x163)+_0x610d3d+_0x4aca33(0x168));const _0x41a30c=[REFERENCE_WARNING];return _0x42c099&&_0x41a30c['unshift'](_0x4aca33(0x16c)),{'ok':!![],'data':{'operation':_0x4aca33(0x173),'selector':notificationSelector(_0x157a38[_0x4aca33(0x178)]),'before':projectNotificationConfig(_0x157a38['before']),'after':null,'dryRun':![],'backend':{'method':_0x4aca33(0x17c),'path':DELETE_PATH},'warnings':_0x41a30c,'verification':{'status':_0x4aca33(0x17a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x42c099,'lookupCommand':_0x610d3d}},'message':_0x4aca33(0x17b)+_0x157a38['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x2a980e=a194_0x56e8;(function(_0x9972d7,_0x4d39fc){const _0x16aebe=a194_0x56e8,_0x345120=_0x9972d7();while(!![]){try{const _0x3b5b29=-parseInt(_0x16aebe(0x1ec))/0x1*(parseInt(_0x16aebe(0x1ed))/0x2)+parseInt(_0x16aebe(0x209))/0x3*(-parseInt(_0x16aebe(0x1f8))/0x4)+-parseInt(_0x16aebe(0x204))/0x5+-parseInt(_0x16aebe(0x1fb))/0x6*(parseInt(_0x16aebe(0x208))/0x7)+-parseInt(_0x16aebe(0x206))/0x8+-parseInt(_0x16aebe(0x205))/0x9+parseInt(_0x16aebe(0x1f7))/0xa*(parseInt(_0x16aebe(0x1fc))/0xb);if(_0x3b5b29===_0x4d39fc)break;else _0x345120['push'](_0x345120['shift']());}catch(_0x3a5dd6){_0x345120['push'](_0x345120['shift']());}}}(a194_0x1607,0x48b48));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x56e8(_0x40c83c,_0x1c2fa2){_0x40c83c=_0x40c83c-0x1eb;const _0x160761=a194_0x1607();let _0x56e889=_0x160761[_0x40c83c];return _0x56e889;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a194_0x1607(){const _0x2049a2=['22CHQZyS','all','config-list','read','map','length','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','validation','676175sBFfqf','4222899LRYgoa','2574000TfMZYr','flat','1427475mUTaAn','1649895UAnbwI','str','1LwKUlr','162324ydsQUH','appCode','string','trim','bool','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','notification','Notification\x20channel\x20type','\x20notification\x20config(s)','10295240lKMFhI','4gjxiIk','Found\x20','type','6WjGqcI'];a194_0x1607=function(){return _0x2049a2;};return a194_0x1607();}export const notificationConfigList={'service':a194_0x2a980e(0x1f4),'command':a194_0x2a980e(0x1fe),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x2a980e(0x1ff),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x2a980e(0x1fa),'type':a194_0x2a980e(0x1ef),'description':a194_0x2a980e(0x1f5),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':'boolean','default':![],'description':a194_0x2a980e(0x202)}],async 'validate'(_0x620c3e){const _0x167b31=a194_0x2a980e;if(_0x620c3e[_0x167b31(0x1f1)]('all')&&_0x620c3e[_0x167b31(0x1eb)]('type')[_0x167b31(0x1f0)]())throw CliErrors[_0x167b31(0x203)](_0x167b31(0x1f2),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x620c3e[_0x167b31(0x1f1)](_0x167b31(0x1fd)))return;readNotificationChannelType(_0x620c3e);},async 'execute'(_0x265d27){const _0x37d328=a194_0x2a980e;if(_0x265d27[_0x37d328(0x1f1)](_0x37d328(0x1fd))){const _0x36b4f7=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x37d328(0x200)](_0x255deb=>listNotificationChannelConfigs(_0x265d27[_0x37d328(0x1ee)],_0x255deb))),_0x532147=_0x36b4f7[_0x37d328(0x207)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x265d27[_0x37d328(0x1ee)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x532147[_0x37d328(0x201)],'configs':_0x532147},'message':'Found\x20'+_0x532147[_0x37d328(0x201)]+_0x37d328(0x1f3)};}const _0x685f5a=readNotificationChannelType(_0x265d27),_0x15a836=await listNotificationChannelConfigs(_0x265d27['appCode'],_0x685f5a),_0x248a5c=_0x15a836[_0x37d328(0x200)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x265d27['appCode'],'channelType':_0x685f5a,'count':_0x248a5c[_0x37d328(0x201)],'configs':_0x248a5c},'message':_0x37d328(0x1f9)+_0x248a5c['length']+'\x20'+_0x685f5a+_0x37d328(0x1f6)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x32c05b=a195_0x1ce1;(function(_0x2cc980,_0x40ac51){const _0x280bea=a195_0x1ce1,_0x4a663f=_0x2cc980();while(!![]){try{const _0x171e4a=-parseInt(_0x280bea(0x204))/0x1+-parseInt(_0x280bea(0x202))/0x2+parseInt(_0x280bea(0x1f9))/0x3*(parseInt(_0x280bea(0x1fb))/0x4)+parseInt(_0x280bea(0x1e7))/0x5+parseInt(_0x280bea(0x206))/0x6*(-parseInt(_0x280bea(0x1e8))/0x7)+-parseInt(_0x280bea(0x1f3))/0x8+parseInt(_0x280bea(0x1eb))/0x9;if(_0x171e4a===_0x40ac51)break;else _0x4a663f['push'](_0x4a663f['shift']());}catch(_0x536062){_0x4a663f['push'](_0x4a663f['shift']());}}}(a195_0x5e8d,0x5019f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a195_0x1ce1(_0x3c3e2e,_0x58f69a){_0x3c3e2e=_0x3c3e2e-0x1e6;const _0x5e8dd9=a195_0x5e8d();let _0x1ce13e=_0x5e8dd9[_0x3c3e2e];return _0x1ce13e;}function a195_0x5e8d(){const _0x2de849=['206574SKWamp','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','before','provesChange','Inspect\x20with\x20--id\x20','2657765rOPsZR','35eeLXDJ','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','4722021PBljoa',';\x20do\x20not\x20resubmit\x20automatically.','mutation','notification_config_update_outcome_unknown','notification_config_update_verification_unavailable','Inspect\x20ID\x20','Notification\x20config\x20','channelType','374528fagVfv','\x20via\x20','update','Updated\x20notification\x20config\x20','allMatch','verified','66873lvmqSR','patch','8EUJiGx','planned','notification','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20with\x20','notification_config_update_verification_failed','appCode','884556wlLgjT','/notification/channel-config/update','111470tjoPVF','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.'];a195_0x5e8d=function(){return _0x2de849;};return a195_0x5e8d();}import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a195_0x32c05b(0x203);async function prepareUpdate(_0x7b5e26){const _0x1ea75e=a195_0x32c05b,_0x48bec6=readNotificationId(_0x7b5e26),_0x152a85=await readNotificationDocument(_0x7b5e26,_0x1ea75e(0x1f5)),_0x1f0cd0=await requireExactNotificationConfig(_0x7b5e26[_0x1ea75e(0x201)],_0x48bec6,_0x1ea75e(0x1f5));return{'id':_0x48bec6,'patch':_0x152a85,'before':_0x1f0cd0,'payload':mergeUpdateInput(_0x1f0cd0,_0x152a85),'planned':plannedUpdateProjection(_0x1f0cd0,_0x152a85)};}export const notificationConfigUpdate={'service':a195_0x32c05b(0x1fd),'command':'config-update','description':a195_0x32c05b(0x207),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3c2a8e){readNotificationId(_0x3c2a8e),assertSingleNotificationSource(_0x3c2a8e),requireNotificationExplicitYes(_0x3c2a8e);},async 'dryRun'(_0x4cfd55){const _0x56ec90=a195_0x32c05b,_0x127c2c=await prepareUpdate(_0x4cfd55),_0x55b472=notificationLookupCommand(_0x4cfd55[_0x56ec90(0x201)],_0x127c2c[_0x56ec90(0x208)][_0x56ec90(0x1f2)]);return asDryRunResult({'operation':_0x56ec90(0x1f5),'selector':notificationSelector(_0x127c2c[_0x56ec90(0x208)]),'before':projectNotificationConfig(_0x127c2c[_0x56ec90(0x208)]),'after':_0x127c2c[_0x56ec90(0x1fc)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x55b472}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x163955){const _0x225453=a195_0x32c05b;requireNotificationExplicitYes(_0x163955);const _0x37cdc1=await prepareUpdate(_0x163955),_0x54cdab=notificationLookupCommand(_0x163955[_0x225453(0x201)],_0x37cdc1[_0x225453(0x208)][_0x225453(0x1f2)]);let _0xf95851=![];try{await updateNotificationChannelConfig(_0x37cdc1['payload']);}catch(_0x31afd7){if(!isPlatformTransportFailure(_0x31afd7))throw safeApiFailure('update',_0x225453(0x1ed),_0x225453(0x1f0)+_0x37cdc1['id']+_0x225453(0x1ff)+_0x54cdab+_0x225453(0x1ea));_0xf95851=!![];}let _0x12b161;try{const _0x1c61d6=await getNotificationChannelConfig(_0x37cdc1['id'],_0x163955[_0x225453(0x201)]);_0x12b161=normalizeExactNotificationConfig(_0x1c61d6,_0x37cdc1['id'],_0x163955[_0x225453(0x201)]);}catch{throw notificationError(_0xf95851?_0x225453(0x1ee):_0x225453(0x1ef),_0x225453(0x1f1)+_0x37cdc1['id']+_0x225453(0x205),_0x225453(0x1e6)+_0x37cdc1['id']+_0x225453(0x1f4)+_0x54cdab+';\x20do\x20not\x20resubmit\x20automatically.');}const _0xa6c449=requestedSafeFieldsMatch(_0x37cdc1[_0x225453(0x208)],_0x12b161,_0x37cdc1[_0x225453(0x1fa)]);if(!_0xa6c449[_0x225453(0x1f7)]||_0xf95851&&!_0xa6c449[_0x225453(0x209)])throw notificationError(_0xf95851?_0x225453(0x1ee):_0x225453(0x200),_0x225453(0x1f1)+_0x37cdc1['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x225453(0x1e6)+_0x37cdc1['id']+'\x20via\x20'+_0x54cdab+_0x225453(0x1ec));const _0x32ff5a=_0xf95851?[_0x225453(0x1fe)]:[];return{'ok':!![],'data':{'operation':_0x225453(0x1f5),'selector':notificationSelector(_0x12b161),'before':projectNotificationConfig(_0x37cdc1[_0x225453(0x208)]),'after':projectNotificationConfig(_0x12b161),'dryRun':![],'backend':{'method':_0x225453(0x1e9),'path':UPDATE_PATH},'warnings':_0x32ff5a,'verification':{'status':_0x225453(0x1f8),'recoveredAfterUnknownResponse':_0xf95851,'verifiedFields':_0xa6c449['verifiedFields'],'lookupCommand':_0x54cdab}},'message':_0x225453(0x1f6)+_0x12b161['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a196_0x210e(_0x6cf00f,_0x405e5e){_0x6cf00f=_0x6cf00f-0x103;const _0x4270c0=a196_0x4270();let _0x210ebf=_0x4270c0[_0x6cf00f];return _0x210ebf;}(function(_0x3401cc,_0x36def5){const _0x1cdb89=a196_0x210e,_0x2b128e=_0x3401cc();while(!![]){try{const _0x578df6=-parseInt(_0x1cdb89(0x105))/0x1*(parseInt(_0x1cdb89(0x108))/0x2)+parseInt(_0x1cdb89(0x10b))/0x3+parseInt(_0x1cdb89(0x109))/0x4+parseInt(_0x1cdb89(0x10a))/0x5+-parseInt(_0x1cdb89(0x104))/0x6+parseInt(_0x1cdb89(0x107))/0x7*(parseInt(_0x1cdb89(0x106))/0x8)+-parseInt(_0x1cdb89(0x103))/0x9;if(_0x578df6===_0x36def5)break;else _0x2b128e['push'](_0x2b128e['shift']());}catch(_0x24773c){_0x2b128e['push'](_0x2b128e['shift']());}}}(a196_0x4270,0xb51d5));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a196_0x4270(){const _0x536fe5=['4161210QknQrx','924156XNYHuv','8306145mWglxC','1089024feclPk','23xSmUnf','48eZbCmO','912884QuxDvi','34194nDBJIO','1266876BTNCMO'];a196_0x4270=function(){return _0x536fe5;};return a196_0x4270();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a197_0x2459a9=a197_0x2662;(function(_0x1d5bf2,_0xf85492){const _0x3bbe51=a197_0x2662,_0x41aa15=_0x1d5bf2();while(!![]){try{const _0x101e4d=-parseInt(_0x3bbe51(0x12c))/0x1*(-parseInt(_0x3bbe51(0x19b))/0x2)+parseInt(_0x3bbe51(0x14c))/0x3+parseInt(_0x3bbe51(0x13b))/0x4*(-parseInt(_0x3bbe51(0x167))/0x5)+-parseInt(_0x3bbe51(0x182))/0x6+-parseInt(_0x3bbe51(0x18c))/0x7+-parseInt(_0x3bbe51(0x177))/0x8*(parseInt(_0x3bbe51(0x157))/0x9)+-parseInt(_0x3bbe51(0x160))/0xa*(parseInt(_0x3bbe51(0x153))/0xb);if(_0x101e4d===_0xf85492)break;else _0x41aa15['push'](_0x41aa15['shift']());}catch(_0x60b22f){_0x41aa15['push'](_0x41aa15['shift']());}}}(a197_0x193b,0x4fb37));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a197_0x2459a9(0x193),a197_0x2459a9(0x136),a197_0x2459a9(0x191),a197_0x2459a9(0x1a3),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x2459a9(0x146),'channelType','endpointUrl',a197_0x2459a9(0x13d),a197_0x2459a9(0x13a),'connectTimeout',a197_0x2459a9(0x197)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2459a9(0x12b),'configCode',a197_0x2459a9(0x1ac)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x2459a9(0x16f),a197_0x2459a9(0x15a),a197_0x2459a9(0x132),a197_0x2459a9(0x1a7),a197_0x2459a9(0x151),a197_0x2459a9(0x139),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x2459a9(0x14b),'type':'string','required':![],'description':a197_0x2459a9(0x17d)},{'name':'stdin','type':'boolean','required':![],'default':![],'description':a197_0x2459a9(0x198)},{'name':a197_0x2459a9(0x17b),'type':a197_0x2459a9(0x16d),'required':![],'description':a197_0x2459a9(0x150)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x2459a9(0x17e),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5195c3,_0x151390,_0x2fee96){return new CliError(_0x5195c3,0x1,_0x151390,_0x2fee96);}export function readNotificationId(_0x59571a){const _0x246272=a197_0x2459a9,_0x49b619=_0x59571a[_0x246272(0x154)]('id');if(!Number[_0x246272(0x169)](_0x49b619)||_0x49b619<=0x0)throw notificationError(_0x246272(0x143),_0x246272(0x178));return _0x49b619;}export function requireNotificationExplicitYes(_0x30d131){const _0x52fa4e=a197_0x2459a9;if(_0x30d131['bool'](_0x52fa4e(0x19a))||_0x30d131[_0x52fa4e(0x1af)](_0x52fa4e(0x173)))return;throw notificationError(_0x52fa4e(0x159),_0x52fa4e(0x196),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x13e64a,_0x3d34c7='type',_0x47e7bc='EMAIL'){const _0x29a93f=a197_0x2459a9,_0x3e501d=_0x13e64a[_0x29a93f(0x142)](_0x3d34c7)[_0x29a93f(0x166)]()||_0x47e7bc;if(!NOTIFICATION_CHANNEL_TYPES[_0x29a93f(0x19d)](_0x3e501d))throw CliErrors[_0x29a93f(0x15c)](_0x29a93f(0x19f)+_0x3d34c7+':\x20'+_0x3e501d,_0x29a93f(0x133)+NOTIFICATION_CHANNEL_TYPES[_0x29a93f(0x176)](',\x20')+'.');return _0x3e501d;}export function assertSingleNotificationSource(_0x1b390a){const _0xfcb980=a197_0x2459a9,_0x48e2f7=[],_0xf25e99=_0x1b390a[_0xfcb980(0x142)](_0xfcb980(0x14b))[_0xfcb980(0x166)]();if(_0xf25e99)_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x14b),'path':_0xf25e99});if(_0x1b390a[_0xfcb980(0x1af)](_0xfcb980(0x13c)))_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x13c)});const _0x3d6c82=_0x1b390a[_0xfcb980(0x142)]('from-env')[_0xfcb980(0x166)]();if(_0x3d6c82)_0x48e2f7[_0xfcb980(0x144)]({'kind':_0xfcb980(0x145),'name':_0x3d6c82});if(_0x48e2f7[_0xfcb980(0x1a6)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0xfcb980(0x179));if(_0x48e2f7[_0xfcb980(0x1a6)]>0x1)throw CliErrors[_0xfcb980(0x15c)](_0xfcb980(0x14e),_0xfcb980(0x179));return _0x48e2f7[0x0];}export async function readNotificationDocument(_0x59818e,_0x319e0f){const _0x3aeb2f=a197_0x2459a9,_0x3388da=assertSingleNotificationSource(_0x59818e),_0x420eb7=_0x3388da[_0x3aeb2f(0x12f)]==='file'?_0x3aeb2f(0x15e)+_0x3388da[_0x3aeb2f(0x180)]:_0x3388da['kind']===_0x3aeb2f(0x145)?_0x3aeb2f(0x170)+_0x3388da[_0x3aeb2f(0x18b)]:_0x3aeb2f(0x13c);let _0x1d7d5d;try{if(_0x3388da[_0x3aeb2f(0x12f)]===_0x3aeb2f(0x14b))_0x1d7d5d=await readFile(_0x3388da[_0x3aeb2f(0x180)],_0x3aeb2f(0x134));else{if(_0x3388da[_0x3aeb2f(0x12f)]===_0x3aeb2f(0x145)){if(!(_0x3388da[_0x3aeb2f(0x18b)]in process.env))throw notificationError('notification_config_source_unavailable',_0x3aeb2f(0x138)+_0x3388da['name']);_0x1d7d5d=process.env[_0x3388da.name]??'';}else _0x1d7d5d=await readStdin();}}catch(_0x402153){if(_0x402153 instanceof CliError)throw _0x402153;throw notificationError(_0x3aeb2f(0x15b),_0x3aeb2f(0x187)+_0x420eb7+'.');}let _0x4cbc03;try{_0x4cbc03=JSON['parse'](_0x1d7d5d);}catch{throw notificationError(_0x3aeb2f(0x141),_0x3aeb2f(0x18a)+_0x420eb7+_0x3aeb2f(0x18e),_0x3aeb2f(0x155));}if(!isJsonObject(_0x4cbc03))throw notificationError(_0x3aeb2f(0x141),_0x3aeb2f(0x18a)+_0x420eb7+_0x3aeb2f(0x185));return validateNotificationDocument(_0x4cbc03,_0x319e0f);}export function projectNotificationListConfig(_0x309e86,_0x242d47){const _0xbadec=a197_0x2459a9;return{'id':typeof _0x309e86['id']==='number'?_0x309e86['id']:null,'configCode':requireResponseString(_0x309e86['configCode'],'configCode',_0x242d47),'configName':requireResponseString(_0x309e86['configName'],_0xbadec(0x146),_0x242d47),'channelType':requireResponseString(_0x309e86['channelType'],_0xbadec(0x192),_0x242d47),'description':normalizeNullableString(_0x309e86[_0xbadec(0x13a)]),'createTime':normalizeNullableString(_0x309e86[_0xbadec(0x135)]),'updateTime':normalizeNullableString(_0x309e86[_0xbadec(0x16e)])};}export function normalizeExactNotificationConfig(_0x40a69b,_0x232809,_0x428cbf){const _0x486cac=a197_0x2459a9;if(!Number[_0x486cac(0x169)](_0x40a69b['id'])||_0x40a69b['id']!==_0x232809)throw notificationError(_0x486cac(0x12e),_0x486cac(0x131)+_0x232809+'.');if(_0x40a69b[_0x486cac(0x12b)]!==_0x428cbf)throw notificationError(_0x486cac(0x12e),'Notification\x20config\x20'+_0x232809+_0x486cac(0x163));const _0x18fd4d=requireExactString(_0x40a69b[_0x486cac(0x146)],_0x486cac(0x146),_0x232809),_0x5ac874=requireExactString(_0x40a69b[_0x486cac(0x186)],'configCode',_0x232809),_0x46a387=requireExactString(_0x40a69b['channelType'],'channelType',_0x232809);if(!NOTIFICATION_CHANNEL_TYPES[_0x486cac(0x19d)](_0x46a387))throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x232809+_0x486cac(0x172));const _0x13d901=responseNullableString(_0x40a69b[_0x486cac(0x17c)],_0x486cac(0x17c),_0x232809),_0x20584b=responseNullableString(_0x40a69b[_0x486cac(0x13d)],_0x486cac(0x13d),_0x232809),_0x3952a2=responseNullableString(_0x40a69b['description'],_0x486cac(0x13a),_0x232809),_0x55cf06=responseNullableTimeout(_0x40a69b[_0x486cac(0x15d)],_0x486cac(0x15d),_0x232809),_0x146491=responseNullableTimeout(_0x40a69b['readTimeout'],_0x486cac(0x197),_0x232809);return{'id':_0x232809,'appCode':_0x428cbf,'configCode':_0x5ac874,'configName':_0x18fd4d,'channelType':_0x46a387,'endpointUrl':redactSensitive(_0x13d901),'channelConfig':redactSensitive(_0x20584b),'description':_0x3952a2,'connectTimeout':_0x55cf06,'readTimeout':_0x146491,'endpointUrlRaw':_0x13d901,'channelConfigRaw':_0x20584b};}export async function requireExactNotificationConfig(_0x13e64d,_0x4c2e2c,_0x16af93){const _0x264388=a197_0x2459a9;let _0x2716f9;try{_0x2716f9=await getNotificationChannelConfig(_0x4c2e2c,_0x13e64d);}catch{throw safeApiFailure(_0x16af93,_0x264388(0x12d),_0x264388(0x174)+_0x13e64d+_0x264388(0x149));}return normalizeExactNotificationConfig(_0x2716f9,_0x4c2e2c,_0x13e64d);}export function projectNotificationConfig(_0x267ee){const _0x3e61d5=a197_0x2459a9;return{'id':_0x267ee['id']??null,'appCode':_0x267ee[_0x3e61d5(0x12b)],'configCode':_0x267ee[_0x3e61d5(0x186)]??null,'configName':_0x267ee[_0x3e61d5(0x146)],'channelType':_0x267ee[_0x3e61d5(0x192)],'endpointUrl':redactSensitive(_0x267ee['endpointUrl']),'channelConfig':redactSensitive(_0x267ee[_0x3e61d5(0x13d)]),'description':_0x267ee[_0x3e61d5(0x13a)]??null,'connectTimeout':_0x267ee[_0x3e61d5(0x15d)]??null,'readTimeout':_0x267ee[_0x3e61d5(0x197)]??null};}function a197_0x2662(_0x28d855,_0x416f84){_0x28d855=_0x28d855-0x12a;const _0x193bd5=a197_0x193b();let _0x2662bb=_0x193bd5[_0x28d855];return _0x2662bb;}export function notificationSelector(_0x8a17b1){const _0x396467=a197_0x2459a9;return{'appCode':_0x8a17b1[_0x396467(0x12b)],'id':_0x8a17b1['id'],'configCode':_0x8a17b1[_0x396467(0x186)],'configName':_0x8a17b1[_0x396467(0x146)],'channelType':_0x8a17b1['channelType']};}export function createMutationInput(_0x35cf8a,_0x2e9c6d){const _0xebdfc2=a197_0x2459a9;return{'appCode':_0x35cf8a,'configName':_0x2e9c6d[_0xebdfc2(0x146)],'channelType':_0x2e9c6d[_0xebdfc2(0x192)],...hasOwn(_0x2e9c6d,_0xebdfc2(0x17c))?{'endpointUrl':_0x2e9c6d[_0xebdfc2(0x17c)]}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x13d))?{'channelConfig':serializeChannelConfig(_0x2e9c6d[_0xebdfc2(0x13d)])}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x13a))?{'description':_0x2e9c6d['description']}:{},...hasOwn(_0x2e9c6d,'connectTimeout')?{'connectTimeout':_0x2e9c6d[_0xebdfc2(0x15d)]}:{},...hasOwn(_0x2e9c6d,_0xebdfc2(0x197))?{'readTimeout':_0x2e9c6d[_0xebdfc2(0x197)]}:{}};}export function mergeUpdateInput(_0x9f9ea1,_0x273a28){const _0x4701c1=a197_0x2459a9;return{'id':_0x9f9ea1['id'],'appCode':_0x9f9ea1['appCode'],'configName':_0x273a28['configName']??_0x9f9ea1['configName'],'channelType':_0x273a28['channelType']??_0x9f9ea1[_0x4701c1(0x192)],'endpointUrl':hasOwn(_0x273a28,_0x4701c1(0x17c))?_0x273a28[_0x4701c1(0x17c)]:_0x9f9ea1[_0x4701c1(0x16c)],'channelConfig':hasOwn(_0x273a28,_0x4701c1(0x13d))?serializeChannelConfig(_0x273a28[_0x4701c1(0x13d)]):_0x9f9ea1[_0x4701c1(0x14d)],'description':hasOwn(_0x273a28,_0x4701c1(0x13a))?_0x273a28[_0x4701c1(0x13a)]:_0x9f9ea1[_0x4701c1(0x13a)],'connectTimeout':hasOwn(_0x273a28,_0x4701c1(0x15d))?_0x273a28[_0x4701c1(0x15d)]:_0x9f9ea1[_0x4701c1(0x15d)],'readTimeout':hasOwn(_0x273a28,_0x4701c1(0x197))?_0x273a28[_0x4701c1(0x197)]:_0x9f9ea1[_0x4701c1(0x197)]};}export function plannedUpdateProjection(_0x1d1623,_0x2e2165){const _0x2ba7d1=a197_0x2459a9;return projectNotificationConfig({'id':_0x1d1623['id'],'appCode':_0x1d1623[_0x2ba7d1(0x12b)],'configCode':_0x1d1623['configCode'],'configName':_0x2e2165[_0x2ba7d1(0x146)]??_0x1d1623['configName'],'channelType':_0x2e2165[_0x2ba7d1(0x192)]??_0x1d1623[_0x2ba7d1(0x192)],'endpointUrl':hasOwn(_0x2e2165,_0x2ba7d1(0x17c))?_0x2e2165[_0x2ba7d1(0x17c)]:_0x1d1623[_0x2ba7d1(0x16c)],'channelConfig':hasOwn(_0x2e2165,'channelConfig')?_0x2e2165[_0x2ba7d1(0x13d)]:_0x1d1623[_0x2ba7d1(0x14d)],'description':hasOwn(_0x2e2165,_0x2ba7d1(0x13a))?_0x2e2165['description']:_0x1d1623[_0x2ba7d1(0x13a)],'connectTimeout':hasOwn(_0x2e2165,_0x2ba7d1(0x15d))?_0x2e2165['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1d1623[_0x2ba7d1(0x15d)],'readTimeout':hasOwn(_0x2e2165,_0x2ba7d1(0x197))?_0x2e2165[_0x2ba7d1(0x197)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1d1623[_0x2ba7d1(0x197)]});}export function requestedSafeFieldsMatch(_0xe0ca2,_0x261f68,_0x39047d){const _0x3e9843=a197_0x2459a9,_0x181cc2=[],_0x5a2234=[],_0x6c942c=[];for(const _0x321119 of[_0x3e9843(0x146),_0x3e9843(0x192),_0x3e9843(0x13a)]){if(!hasOwn(_0x39047d,_0x321119))continue;_0x6c942c[_0x3e9843(0x144)](_0x321119),_0x181cc2['push'](_0x261f68[_0x321119]===_0x39047d[_0x321119]),_0x5a2234[_0x3e9843(0x144)](_0xe0ca2[_0x321119]!==_0x39047d[_0x321119]&&_0x261f68[_0x321119]===_0x39047d[_0x321119]);}for(const _0x594510 of[_0x3e9843(0x15d),_0x3e9843(0x197)]){if(!hasOwn(_0x39047d,_0x594510))continue;const _0x1018ff=_0x39047d[_0x594510]??(_0x594510==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x6c942c[_0x3e9843(0x144)](_0x594510),_0x181cc2['push'](_0x261f68[_0x594510]===_0x1018ff),_0x5a2234['push'](_0xe0ca2[_0x594510]!==_0x1018ff&&_0x261f68[_0x594510]===_0x1018ff);}return hasOwn(_0x39047d,_0x3e9843(0x17c))&&_0x39047d[_0x3e9843(0x17c)]===null&&(_0x6c942c[_0x3e9843(0x144)](_0x3e9843(0x13f)),_0x181cc2['push'](_0x261f68['endpointUrlRaw']===null||_0x261f68[_0x3e9843(0x16c)]===''),_0x5a2234[_0x3e9843(0x144)](_0xe0ca2[_0x3e9843(0x16c)]!==null&&_0xe0ca2['endpointUrlRaw']!==''&&(_0x261f68['endpointUrlRaw']===null||_0x261f68[_0x3e9843(0x16c)]===''))),{'allMatch':_0x181cc2[_0x3e9843(0x17f)](Boolean),'provesChange':_0x5a2234[_0x3e9843(0x199)](Boolean),'verifiedFields':_0x6c942c};}export function validateNotificationDeleteReadback(_0x5f04d5,_0x1aa4dd,_0x363e08){const _0x408062=a197_0x2459a9;for(const [_0x533b76,_0x368163]of _0x5f04d5[_0x408062(0x18d)]()){if(!Number[_0x408062(0x169)](_0x368163['id'])||_0x368163['id']<=0x0)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x368163['appCode']!==_0x1aa4dd)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+_0x408062(0x181));if(_0x368163['channelType']!==_0x363e08)throw notificationError(_0x408062(0x12e),_0x408062(0x158)+(_0x533b76+0x1)+_0x408062(0x164));}}export function safeApiFailure(_0x4ea749,_0x5e663e,_0x341ce8){const _0x9918c2=a197_0x2459a9;return notificationError(_0x9918c2(0x156)+_0x4ea749+'_'+(_0x5e663e===_0x9918c2(0x165)?_0x9918c2(0x162):_0x5e663e+_0x9918c2(0x137)),_0x9918c2(0x183)+_0x4ea749+'\x20'+_0x5e663e+_0x9918c2(0x1a0),_0x341ce8);}export function notificationLookupCommand(_0x44a575,_0x1c1534){const _0x51ac2c=a197_0x2459a9;return _0x51ac2c(0x19e)+_0x44a575+_0x51ac2c(0x16b)+_0x1c1534+_0x51ac2c(0x17a);}function validateNotificationDocument(_0x4cf474,_0x1acf40){const _0x33ca41=a197_0x2459a9;for(const _0x3d3c5d of Object[_0x33ca41(0x1aa)](_0x4cf474)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x3d3c5d))throw notificationError(_0x33ca41(0x175),_0x33ca41(0x148)+_0x3d3c5d+_0x33ca41(0x16a));if(!ALLOWED_INPUT_FIELDS['has'](_0x3d3c5d))throw notificationError(_0x33ca41(0x19c),_0x33ca41(0x184)+_0x3d3c5d+'\x22.');}if(_0x1acf40===_0x33ca41(0x14a)&&Object[_0x33ca41(0x1aa)](_0x4cf474)[_0x33ca41(0x1a6)]===0x0)throw notificationError('notification_config_update_empty',_0x33ca41(0x130));const _0x53f59c={};if(hasOwn(_0x4cf474,_0x33ca41(0x146)))_0x53f59c[_0x33ca41(0x146)]=validateRequiredString(_0x4cf474[_0x33ca41(0x146)],_0x33ca41(0x146),0x80);else{if(_0x1acf40===_0x33ca41(0x195))throw notificationError(_0x33ca41(0x190),'Create\x20JSON\x20requires\x20field\x20'+_0x33ca41(0x140));}if(hasOwn(_0x4cf474,'channelType')){if(typeof _0x4cf474[_0x33ca41(0x192)]!==_0x33ca41(0x16d))throw invalidFieldType(_0x33ca41(0x192),_0x33ca41(0x188));const _0x3b1f7d=_0x4cf474['channelType'][_0x33ca41(0x166)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3b1f7d))throw notificationError(_0x33ca41(0x168),_0x33ca41(0x1ab),_0x33ca41(0x133)+NOTIFICATION_CHANNEL_TYPES[_0x33ca41(0x176)](',\x20')+'.');_0x53f59c['channelType']=_0x3b1f7d;}else{if(_0x1acf40===_0x33ca41(0x195))throw notificationError('notification_config_field_required',_0x33ca41(0x18f)+'\x22channelType\x22.');}for(const [_0x31fb80,_0x4f540f]of[['endpointUrl',0x200],[_0x33ca41(0x13a),0x100]]){if(!hasOwn(_0x4cf474,_0x31fb80))continue;const _0x4d359f=_0x4cf474[_0x31fb80];if(_0x4d359f!==null&&typeof _0x4d359f!==_0x33ca41(0x16d))throw invalidFieldType(_0x31fb80,'a\x20string\x20or\x20null');if(typeof _0x4d359f===_0x33ca41(0x16d)&&_0x4d359f['length']>_0x4f540f)throw notificationError(_0x33ca41(0x168),_0x33ca41(0x148)+_0x31fb80+_0x33ca41(0x1a5)+_0x4f540f+_0x33ca41(0x1ad));_0x53f59c[_0x31fb80]=_0x4d359f;}if(hasOwn(_0x4cf474,'channelConfig')){const _0x51d966=_0x4cf474[_0x33ca41(0x13d)];if(_0x51d966===null&&_0x1acf40===_0x33ca41(0x195))throw invalidFieldType(_0x33ca41(0x13d),'a\x20JSON\x20object');if(_0x51d966!==null&&!isJsonObject(_0x51d966))throw invalidFieldType(_0x33ca41(0x13d),_0x1acf40==='update'?'a\x20JSON\x20object\x20or\x20null':_0x33ca41(0x13e));_0x51d966!==null&&validateChannelConfigFields(_0x53f59c[_0x33ca41(0x192)],_0x51d966),_0x53f59c[_0x33ca41(0x13d)]=_0x51d966;}for(const _0x261523 of['connectTimeout',_0x33ca41(0x197)]){if(!hasOwn(_0x4cf474,_0x261523))continue;const _0x24ea88=_0x4cf474[_0x261523];if(_0x24ea88!==null&&(!Number['isSafeInteger'](_0x24ea88)||_0x24ea88<0x0))throw notificationError(_0x33ca41(0x168),'Notification\x20JSON\x20field\x20\x22'+_0x261523+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x53f59c[_0x261523]=_0x24ea88;}return _0x53f59c;}function validateRequiredString(_0x48e803,_0x11e0d9,_0x3aa0c5){const _0x5789b3=a197_0x2459a9;if(typeof _0x48e803!==_0x5789b3(0x16d))throw invalidFieldType(_0x11e0d9,_0x5789b3(0x1a2));const _0x216e97=_0x48e803['trim']();if(!_0x216e97)throw notificationError(_0x5789b3(0x168),_0x5789b3(0x148)+_0x11e0d9+_0x5789b3(0x1a1));if(_0x216e97[_0x5789b3(0x1a6)]>_0x3aa0c5)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x11e0d9+_0x5789b3(0x1a5)+_0x3aa0c5+'\x20characters.');return _0x216e97;}function validateChannelConfigFields(_0x1de3f8,_0x2cfaec){const _0x6fa048=a197_0x2459a9;if(hasOwn(_0x2cfaec,_0x6fa048(0x12a)))throw forbiddenChannelConfigField(_0x6fa048(0x12a));if(_0x1de3f8===_0x6fa048(0x193))for(const _0x5a2a5d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2cfaec,_0x5a2a5d))throw forbiddenChannelConfigField(_0x5a2a5d);}}function forbiddenChannelConfigField(_0x3f6472){const _0x30afeb=a197_0x2459a9;return notificationError(_0x30afeb(0x1a9),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x3f6472+_0x30afeb(0x189));}function invalidFieldType(_0x5a77ed,_0xff4d80){const _0x40d32a=a197_0x2459a9;return notificationError(_0x40d32a(0x168),_0x40d32a(0x148)+_0x5a77ed+_0x40d32a(0x161)+_0xff4d80+'.');}function serializeChannelConfig(_0x66c6b0){const _0x2c8358=a197_0x2459a9;return _0x66c6b0===null||_0x66c6b0===undefined?null:JSON[_0x2c8358(0x1a4)](_0x66c6b0);}function redactSensitive(_0x498d76){return _0x498d76===null||_0x498d76===undefined||_0x498d76===''?null:'<redacted>';}function requireResponseString(_0x4f5e7d,_0x4c128d,_0x1f1eea){const _0x2628f3=a197_0x2459a9;if(typeof _0x4f5e7d!==_0x2628f3(0x16d)||_0x4f5e7d[_0x2628f3(0x166)]()==='')throw CliErrors['apiError'](_0x2628f3(0x147),_0x2628f3(0x171)+(_0x1f1eea+0x1)+_0x2628f3(0x14f)+_0x4c128d+'\x22.');return _0x4f5e7d[_0x2628f3(0x166)]();}function requireExactString(_0x47ea78,_0x236ec1,_0x4f1644){const _0x29090e=a197_0x2459a9;if(typeof _0x47ea78!==_0x29090e(0x16d)||_0x47ea78['trim']()==='')throw notificationError(_0x29090e(0x12e),_0x29090e(0x183)+_0x4f1644+_0x29090e(0x14f)+_0x236ec1+'\x22.');return _0x47ea78[_0x29090e(0x166)]();}function a197_0x193b(){const _0x25ac42=['env','configName','Invalid\x20notification\x20config\x20response.','Notification\x20JSON\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','update','file','1442694zJkRiM','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','\x20is\x20missing\x20required\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','replyTo','call','11WiPurI','num','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','notification_config_','1035DpmVTa','Notification\x20config\x20list\x20item\x20','notification_config_confirmation_required','recipients','notification_config_source_unavailable','validation','connectTimeout','file\x20','hasOwnProperty','525550TlskrS','\x22\x20must\x20be\x20','failed','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20has\x20an\x20invalid\x20channelType.','mutation','trim','235AosAIu','notification_config_field_invalid','isSafeInteger','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x20--type\x20','endpointUrlRaw','string','updateTime','emailTargets','environment\x20variable\x20','Item\x20','\x20has\x20an\x20unsupported\x20channelType.','yes','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_forbidden','join','13800uJUbOq','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x20--format\x20compress','from-env','endpointUrl','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','number','every','path','\x20has\x20an\x20invalid\x20appCode.','803700cdtvie','Notification\x20config\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20must\x20be\x20an\x20object.','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','a\x20supported\x20string','\x22\x20is\x20forbidden.','Notification\x20JSON\x20from\x20','name','1775158qXERPz','entries','\x20is\x20invalid.','Create\x20JSON\x20requires\x20field\x20','notification_config_field_required','DINGTALK','channelType','EMAIL','isArray','create','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','readTimeout','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','some','dry-run','554hTbCQU','notification_config_field_unknown','includes','rabetbase\x20notification\x20config-list\x20--appcode\x20','Invalid\x20--','\x20failed.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20non-empty\x20string','WECOM','stringify','\x22\x20cannot\x20exceed\x20','length','bccList','object','notification_config_channel_field_forbidden','keys','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','channelCode','\x20characters.','setEncoding','bool','messageTemplate','appCode','1781hIwsYK','preflight','notification_config_response_invalid','kind','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','ccList','Allowed\x20values:\x20','utf8','createTime','FEISHU','_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','subjectPrefix','description','792IOHGjX','stdin','channelConfig','a\x20JSON\x20object','endpointUrl:null','\x22configName\x22.','notification_config_json_invalid','str','notification_config_id_invalid','push'];a197_0x193b=function(){return _0x25ac42;};return a197_0x193b();}function responseNullableString(_0x2242e8,_0x509240,_0x26f93e){const _0x4490bd=a197_0x2459a9;if(_0x2242e8===undefined||_0x2242e8===null)return null;if(typeof _0x2242e8!==_0x4490bd(0x16d))throw notificationError(_0x4490bd(0x12e),_0x4490bd(0x183)+_0x26f93e+'\x20has\x20invalid\x20field\x20\x22'+_0x509240+'\x22.');return _0x2242e8;}function responseNullableTimeout(_0x45dd00,_0x1e69f2,_0x263398){const _0x812174=a197_0x2459a9;if(_0x45dd00===undefined||_0x45dd00===null)return null;if(!Number[_0x812174(0x169)](_0x45dd00)||_0x45dd00<0x0)throw notificationError('notification_config_response_invalid',_0x812174(0x183)+_0x263398+'\x20has\x20invalid\x20field\x20\x22'+_0x1e69f2+'\x22.');return _0x45dd00;}function normalizeNullableString(_0x309f06){const _0x388ab9=a197_0x2459a9;return typeof _0x309f06===_0x388ab9(0x16d)?_0x309f06:null;}function isJsonObject(_0x5f1a26){const _0x4cc3d0=a197_0x2459a9;return _0x5f1a26!==null&&typeof _0x5f1a26===_0x4cc3d0(0x1a8)&&!Array[_0x4cc3d0(0x194)](_0x5f1a26);}function hasOwn(_0x54d143,_0x3a4671){const _0x12a42d=a197_0x2459a9;return Object['prototype'][_0x12a42d(0x15f)][_0x12a42d(0x152)](_0x54d143,_0x3a4671);}async function readStdin(){const _0x12b72b=a197_0x2459a9;let _0x42eb6f='';process['stdin'][_0x12b72b(0x1ae)]('utf8');for await(const _0xc03df0 of process['stdin'])_0x42eb6f+=_0xc03df0;return _0x42eb6f;}
|
|
1
|
+
const a197_0x2ac617=a197_0x4143;(function(_0x362378,_0x4e8de8){const _0xf7bb6a=a197_0x4143,_0x22e7b3=_0x362378();while(!![]){try{const _0x53ee47=parseInt(_0xf7bb6a(0xa4))/0x1*(parseInt(_0xf7bb6a(0x109))/0x2)+-parseInt(_0xf7bb6a(0x88))/0x3*(-parseInt(_0xf7bb6a(0xc5))/0x4)+parseInt(_0xf7bb6a(0xcd))/0x5*(-parseInt(_0xf7bb6a(0xb5))/0x6)+parseInt(_0xf7bb6a(0x89))/0x7+parseInt(_0xf7bb6a(0xe1))/0x8+parseInt(_0xf7bb6a(0xd0))/0x9+-parseInt(_0xf7bb6a(0xfd))/0xa;if(_0x53ee47===_0x4e8de8)break;else _0x22e7b3['push'](_0x22e7b3['shift']());}catch(_0x18539b){_0x22e7b3['push'](_0x22e7b3['shift']());}}}(a197_0x31f0,0x99d36));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',a197_0x2ac617(0xf9),a197_0x2ac617(0x8a),a197_0x2ac617(0xf1),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a197_0x2ac617(0xc2),'endpointUrl',a197_0x2ac617(0xb7),a197_0x2ac617(0xba),a197_0x2ac617(0xd4),a197_0x2ac617(0x83)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x2ac617(0xe6),a197_0x2ac617(0x91),a197_0x2ac617(0x10b)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a197_0x2ac617(0x98),a197_0x2ac617(0xd6),a197_0x2ac617(0x94),a197_0x2ac617(0xe7),'subjectPrefix',a197_0x2ac617(0xdd),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a197_0x2ac617(0xa7),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a197_0x2ac617(0xa8),'type':a197_0x2ac617(0xa0),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':'from-env','type':a197_0x2ac617(0xa7),'required':![],'description':a197_0x2ac617(0xc7)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a197_0x2ac617(0xbc)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3e0589,_0x41cfee,_0x7b8427){return new CliError(_0x3e0589,0x1,_0x41cfee,_0x7b8427);}export function readNotificationId(_0x137211){const _0x362839=a197_0x2ac617,_0x20e858=_0x137211[_0x362839(0x93)]('id');if(!Number[_0x362839(0x9b)](_0x20e858)||_0x20e858<=0x0)throw notificationError(_0x362839(0xff),_0x362839(0xae));return _0x20e858;}export function requireNotificationExplicitYes(_0x300213){const _0x2cec29=a197_0x2ac617;if(_0x300213[_0x2cec29(0x96)](_0x2cec29(0xb4))||_0x300213[_0x2cec29(0x96)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x2cec29(0xf7),_0x2cec29(0xfe));}export function readNotificationChannelType(_0x5cf4b8,_0x5f16a9=a197_0x2ac617(0xfc),_0x3d192f=a197_0x2ac617(0xbb)){const _0x19e704=a197_0x2ac617,_0x478b66=_0x5cf4b8['str'](_0x5f16a9)[_0x19e704(0x104)]()||_0x3d192f;if(!NOTIFICATION_CHANNEL_TYPES[_0x19e704(0xe3)](_0x478b66))throw CliErrors[_0x19e704(0xbe)](_0x19e704(0xde)+_0x5f16a9+':\x20'+_0x478b66,_0x19e704(0xa2)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x478b66;}function a197_0x4143(_0x4cd2ce,_0x4ca428){_0x4cd2ce=_0x4cd2ce-0x83;const _0x31f0cb=a197_0x31f0();let _0x414300=_0x31f0cb[_0x4cd2ce];return _0x414300;}export function assertSingleNotificationSource(_0x2367dc){const _0x5c59bd=a197_0x2ac617,_0x5424f3=[],_0x5c9886=_0x2367dc[_0x5c59bd(0xe2)](_0x5c59bd(0xad))[_0x5c59bd(0x104)]();if(_0x5c9886)_0x5424f3['push']({'kind':_0x5c59bd(0xad),'path':_0x5c9886});if(_0x2367dc[_0x5c59bd(0x96)]('stdin'))_0x5424f3[_0x5c59bd(0xe8)]({'kind':_0x5c59bd(0xa8)});const _0x250d22=_0x2367dc[_0x5c59bd(0xe2)](_0x5c59bd(0xd9))['trim']();if(_0x250d22)_0x5424f3['push']({'kind':'env','name':_0x250d22});if(_0x5424f3['length']===0x0)throw CliErrors[_0x5c59bd(0xbe)](_0x5c59bd(0xfa),_0x5c59bd(0xb9));if(_0x5424f3['length']>0x1)throw CliErrors['validation'](_0x5c59bd(0x107),_0x5c59bd(0xb9));return _0x5424f3[0x0];}export async function readNotificationDocument(_0x16cd38,_0x4c07e8){const _0x5043b7=a197_0x2ac617,_0x117442=assertSingleNotificationSource(_0x16cd38),_0x2a2fd0=_0x117442[_0x5043b7(0xf3)]===_0x5043b7(0xad)?_0x5043b7(0xac)+_0x117442[_0x5043b7(0x9f)]:_0x117442['kind']==='env'?_0x5043b7(0xa5)+_0x117442[_0x5043b7(0x102)]:'stdin';let _0x3e6794;try{if(_0x117442[_0x5043b7(0xf3)]===_0x5043b7(0xad))_0x3e6794=await readFile(_0x117442[_0x5043b7(0x9f)],_0x5043b7(0xa3));else{if(_0x117442[_0x5043b7(0xf3)]===_0x5043b7(0xb2)){if(!(_0x117442[_0x5043b7(0x102)]in process.env))throw notificationError(_0x5043b7(0xd3),_0x5043b7(0xf8)+_0x117442['name']);_0x3e6794=process.env[_0x117442.name]??'';}else _0x3e6794=await readStdin();}}catch(_0x4e5ab0){if(_0x4e5ab0 instanceof CliError)throw _0x4e5ab0;throw notificationError(_0x5043b7(0xd3),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x2a2fd0+'.');}let _0x3b0919;try{_0x3b0919=JSON[_0x5043b7(0xaf)](_0x3e6794);}catch{throw notificationError(_0x5043b7(0xc0),_0x5043b7(0xb0)+_0x2a2fd0+'\x20is\x20invalid.',_0x5043b7(0xd7));}if(!isJsonObject(_0x3b0919))throw notificationError('notification_config_json_invalid',_0x5043b7(0xb0)+_0x2a2fd0+_0x5043b7(0x90));return validateNotificationDocument(_0x3b0919,_0x4c07e8);}export function projectNotificationListConfig(_0x13151f,_0x1b2a0f){const _0x12578e=a197_0x2ac617;return{'id':typeof _0x13151f['id']==='number'?_0x13151f['id']:null,'configCode':requireResponseString(_0x13151f[_0x12578e(0x91)],_0x12578e(0x91),_0x1b2a0f),'configName':requireResponseString(_0x13151f[_0x12578e(0x100)],_0x12578e(0x100),_0x1b2a0f),'channelType':requireResponseString(_0x13151f[_0x12578e(0xc2)],_0x12578e(0xc2),_0x1b2a0f),'description':normalizeNullableString(_0x13151f[_0x12578e(0xba)]),'createTime':normalizeNullableString(_0x13151f[_0x12578e(0xf0)]),'updateTime':normalizeNullableString(_0x13151f[_0x12578e(0xe4)])};}export function normalizeExactNotificationConfig(_0x2396ce,_0x341fac,_0x4b39f7){const _0x131787=a197_0x2ac617;if(!Number[_0x131787(0x9b)](_0x2396ce['id'])||_0x2396ce['id']!==_0x341fac)throw notificationError(_0x131787(0x108),_0x131787(0x9c)+_0x341fac+'.');if(_0x2396ce['appCode']!==_0x4b39f7)throw notificationError(_0x131787(0x108),_0x131787(0x87)+_0x341fac+_0x131787(0xaa));const _0x445289=requireExactString(_0x2396ce[_0x131787(0x100)],'configName',_0x341fac),_0x29e8a8=requireExactString(_0x2396ce[_0x131787(0x91)],_0x131787(0x91),_0x341fac),_0x4d7ac7=requireExactString(_0x2396ce[_0x131787(0xc2)],_0x131787(0xc2),_0x341fac);if(!NOTIFICATION_CHANNEL_TYPES[_0x131787(0xe3)](_0x4d7ac7))throw notificationError('notification_config_response_invalid',_0x131787(0x87)+_0x341fac+_0x131787(0xb1));const _0x2240ec=responseNullableString(_0x2396ce['endpointUrl'],_0x131787(0x10a),_0x341fac),_0x508622=responseNullableString(_0x2396ce['channelConfig'],_0x131787(0xb7),_0x341fac),_0x148151=responseNullableString(_0x2396ce[_0x131787(0xba)],_0x131787(0xba),_0x341fac),_0x26d5f0=responseNullableTimeout(_0x2396ce[_0x131787(0xd4)],_0x131787(0xd4),_0x341fac),_0x2e93c9=responseNullableTimeout(_0x2396ce[_0x131787(0x83)],'readTimeout',_0x341fac);return{'id':_0x341fac,'appCode':_0x4b39f7,'configCode':_0x29e8a8,'configName':_0x445289,'channelType':_0x4d7ac7,'endpointUrl':redactSensitive(_0x2240ec),'channelConfig':redactSensitive(_0x508622),'description':_0x148151,'connectTimeout':_0x26d5f0,'readTimeout':_0x2e93c9,'endpointUrlRaw':_0x2240ec,'channelConfigRaw':_0x508622};}export async function requireExactNotificationConfig(_0x1ce474,_0x1a03af,_0x3d6929){const _0x4341a0=a197_0x2ac617;let _0x41d5fc;try{_0x41d5fc=await getNotificationChannelConfig(_0x1a03af,_0x1ce474);}catch{throw safeApiFailure(_0x3d6929,_0x4341a0(0x86),_0x4341a0(0xee)+_0x1ce474+_0x4341a0(0x101));}return normalizeExactNotificationConfig(_0x41d5fc,_0x1a03af,_0x1ce474);}export function projectNotificationConfig(_0x2c826c){const _0x4d832d=a197_0x2ac617;return{'id':_0x2c826c['id']??null,'appCode':_0x2c826c['appCode'],'configCode':_0x2c826c[_0x4d832d(0x91)]??null,'configName':_0x2c826c[_0x4d832d(0x100)],'channelType':_0x2c826c[_0x4d832d(0xc2)],'endpointUrl':redactSensitive(_0x2c826c[_0x4d832d(0x10a)]),'channelConfig':redactSensitive(_0x2c826c[_0x4d832d(0xb7)]),'description':_0x2c826c[_0x4d832d(0xba)]??null,'connectTimeout':_0x2c826c[_0x4d832d(0xd4)]??null,'readTimeout':_0x2c826c[_0x4d832d(0x83)]??null};}export function notificationSelector(_0x95afb){const _0x1e6939=a197_0x2ac617;return{'appCode':_0x95afb[_0x1e6939(0xe6)],'id':_0x95afb['id'],'configCode':_0x95afb[_0x1e6939(0x91)],'configName':_0x95afb['configName'],'channelType':_0x95afb[_0x1e6939(0xc2)]};}export function createMutationInput(_0x5541cf,_0x4a3bf2){const _0xca12b7=a197_0x2ac617;return{'appCode':_0x5541cf,'configName':_0x4a3bf2['configName'],'channelType':_0x4a3bf2['channelType'],...hasOwn(_0x4a3bf2,_0xca12b7(0x10a))?{'endpointUrl':_0x4a3bf2[_0xca12b7(0x10a)]}:{},...hasOwn(_0x4a3bf2,_0xca12b7(0xb7))?{'channelConfig':serializeChannelConfig(_0x4a3bf2[_0xca12b7(0xb7)])}:{},...hasOwn(_0x4a3bf2,_0xca12b7(0xba))?{'description':_0x4a3bf2['description']}:{},...hasOwn(_0x4a3bf2,'connectTimeout')?{'connectTimeout':_0x4a3bf2[_0xca12b7(0xd4)]}:{},...hasOwn(_0x4a3bf2,'readTimeout')?{'readTimeout':_0x4a3bf2[_0xca12b7(0x83)]}:{}};}export function mergeUpdateInput(_0x226efe,_0xeda3c9){const _0xf70343=a197_0x2ac617;return{'id':_0x226efe['id'],'appCode':_0x226efe['appCode'],'configName':_0xeda3c9[_0xf70343(0x100)]??_0x226efe[_0xf70343(0x100)],'channelType':_0xeda3c9[_0xf70343(0xc2)]??_0x226efe[_0xf70343(0xc2)],'endpointUrl':hasOwn(_0xeda3c9,_0xf70343(0x10a))?_0xeda3c9[_0xf70343(0x10a)]:_0x226efe[_0xf70343(0xea)],'channelConfig':hasOwn(_0xeda3c9,_0xf70343(0xb7))?serializeChannelConfig(_0xeda3c9[_0xf70343(0xb7)]):_0x226efe['channelConfigRaw'],'description':hasOwn(_0xeda3c9,_0xf70343(0xba))?_0xeda3c9[_0xf70343(0xba)]:_0x226efe[_0xf70343(0xba)],'connectTimeout':hasOwn(_0xeda3c9,_0xf70343(0xd4))?_0xeda3c9[_0xf70343(0xd4)]:_0x226efe[_0xf70343(0xd4)],'readTimeout':hasOwn(_0xeda3c9,_0xf70343(0x83))?_0xeda3c9[_0xf70343(0x83)]:_0x226efe[_0xf70343(0x83)]};}export function plannedUpdateProjection(_0x52220b,_0x577362){const _0x49bd4b=a197_0x2ac617;return projectNotificationConfig({'id':_0x52220b['id'],'appCode':_0x52220b['appCode'],'configCode':_0x52220b[_0x49bd4b(0x91)],'configName':_0x577362[_0x49bd4b(0x100)]??_0x52220b[_0x49bd4b(0x100)],'channelType':_0x577362[_0x49bd4b(0xc2)]??_0x52220b['channelType'],'endpointUrl':hasOwn(_0x577362,'endpointUrl')?_0x577362[_0x49bd4b(0x10a)]:_0x52220b['endpointUrlRaw'],'channelConfig':hasOwn(_0x577362,_0x49bd4b(0xb7))?_0x577362[_0x49bd4b(0xb7)]:_0x52220b[_0x49bd4b(0x8b)],'description':hasOwn(_0x577362,_0x49bd4b(0xba))?_0x577362[_0x49bd4b(0xba)]:_0x52220b[_0x49bd4b(0xba)],'connectTimeout':hasOwn(_0x577362,'connectTimeout')?_0x577362[_0x49bd4b(0xd4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x52220b[_0x49bd4b(0xd4)],'readTimeout':hasOwn(_0x577362,'readTimeout')?_0x577362[_0x49bd4b(0x83)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x52220b[_0x49bd4b(0x83)]});}export function requestedSafeFieldsMatch(_0x52c4c5,_0x4b1c8d,_0x17eb5d){const _0x152148=a197_0x2ac617,_0x59d782=[],_0x27fe88=[],_0x2b04a9=[];for(const _0x3c9c24 of[_0x152148(0x100),'channelType',_0x152148(0xba)]){if(!hasOwn(_0x17eb5d,_0x3c9c24))continue;_0x2b04a9[_0x152148(0xe8)](_0x3c9c24),_0x59d782[_0x152148(0xe8)](_0x4b1c8d[_0x3c9c24]===_0x17eb5d[_0x3c9c24]),_0x27fe88[_0x152148(0xe8)](_0x52c4c5[_0x3c9c24]!==_0x17eb5d[_0x3c9c24]&&_0x4b1c8d[_0x3c9c24]===_0x17eb5d[_0x3c9c24]);}for(const _0x59daed of[_0x152148(0xd4),_0x152148(0x83)]){if(!hasOwn(_0x17eb5d,_0x59daed))continue;const _0x1f38b4=_0x17eb5d[_0x59daed]??(_0x59daed===_0x152148(0xd4)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x2b04a9['push'](_0x59daed),_0x59d782[_0x152148(0xe8)](_0x4b1c8d[_0x59daed]===_0x1f38b4),_0x27fe88[_0x152148(0xe8)](_0x52c4c5[_0x59daed]!==_0x1f38b4&&_0x4b1c8d[_0x59daed]===_0x1f38b4);}return hasOwn(_0x17eb5d,_0x152148(0x10a))&&_0x17eb5d[_0x152148(0x10a)]===null&&(_0x2b04a9[_0x152148(0xe8)](_0x152148(0x9e)),_0x59d782['push'](_0x4b1c8d[_0x152148(0xea)]===null||_0x4b1c8d['endpointUrlRaw']===''),_0x27fe88[_0x152148(0xe8)](_0x52c4c5['endpointUrlRaw']!==null&&_0x52c4c5[_0x152148(0xea)]!==''&&(_0x4b1c8d[_0x152148(0xea)]===null||_0x4b1c8d[_0x152148(0xea)]===''))),{'allMatch':_0x59d782[_0x152148(0xc1)](Boolean),'provesChange':_0x27fe88[_0x152148(0xfb)](Boolean),'verifiedFields':_0x2b04a9};}export function validateNotificationDeleteReadback(_0xf5b55d,_0x16e87b,_0x3dffc6){const _0x18c65b=a197_0x2ac617;for(const [_0x38d99b,_0x1ac0c4]of _0xf5b55d[_0x18c65b(0xef)]()){if(!Number[_0x18c65b(0x9b)](_0x1ac0c4['id'])||_0x1ac0c4['id']<=0x0)throw notificationError(_0x18c65b(0x108),_0x18c65b(0xc8)+(_0x38d99b+0x1)+_0x18c65b(0xb6));if(_0x1ac0c4[_0x18c65b(0xe6)]!==_0x16e87b)throw notificationError('notification_config_response_invalid',_0x18c65b(0xc8)+(_0x38d99b+0x1)+_0x18c65b(0xa9));if(_0x1ac0c4[_0x18c65b(0xc2)]!==_0x3dffc6)throw notificationError('notification_config_response_invalid',_0x18c65b(0xc8)+(_0x38d99b+0x1)+_0x18c65b(0xab));}}export function safeApiFailure(_0xc01926,_0x454b2b,_0x18cbf4){const _0x577de9=a197_0x2ac617;return notificationError(_0x577de9(0xd2)+_0xc01926+'_'+(_0x454b2b===_0x577de9(0x8c)?'failed':_0x454b2b+'_unavailable'),_0x577de9(0x87)+_0xc01926+'\x20'+_0x454b2b+_0x577de9(0xcf),_0x18cbf4);}export function notificationLookupCommand(_0x4ea181,_0x133fa6){const _0x1a145b=a197_0x2ac617;return _0x1a145b(0xb3)+_0x4ea181+_0x1a145b(0x9d)+_0x133fa6+_0x1a145b(0x84);}function validateNotificationDocument(_0x511001,_0x535fa5){const _0x238412=a197_0x2ac617;for(const _0xc7171a of Object[_0x238412(0xed)](_0x511001)){if(FORBIDDEN_IDENTITY_FIELDS[_0x238412(0x103)](_0xc7171a))throw notificationError('notification_config_field_forbidden',_0x238412(0x105)+_0xc7171a+_0x238412(0xa6));if(!ALLOWED_INPUT_FIELDS[_0x238412(0x103)](_0xc7171a))throw notificationError('notification_config_field_unknown',_0x238412(0xf4)+_0xc7171a+'\x22.');}if(_0x535fa5==='update'&&Object[_0x238412(0xed)](_0x511001)[_0x238412(0xa1)]===0x0)throw notificationError(_0x238412(0xf2),_0x238412(0xd5));const _0x2f4b44={};if(hasOwn(_0x511001,'configName'))_0x2f4b44['configName']=validateRequiredString(_0x511001[_0x238412(0x100)],_0x238412(0x100),0x80);else{if(_0x535fa5===_0x238412(0xec))throw notificationError('notification_config_field_required',_0x238412(0xda)+_0x238412(0xf5));}if(hasOwn(_0x511001,_0x238412(0xc2))){if(typeof _0x511001['channelType']!=='string')throw invalidFieldType(_0x238412(0xc2),_0x238412(0xbf));const _0x440764=_0x511001[_0x238412(0xc2)][_0x238412(0x104)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x238412(0xe3)](_0x440764))throw notificationError(_0x238412(0xce),_0x238412(0xc9),_0x238412(0xa2)+NOTIFICATION_CHANNEL_TYPES[_0x238412(0xdf)](',\x20')+'.');_0x2f4b44[_0x238412(0xc2)]=_0x440764;}else{if(_0x535fa5===_0x238412(0xec))throw notificationError(_0x238412(0xe9),'Create\x20JSON\x20requires\x20field\x20'+_0x238412(0xe0));}for(const [_0xd55f84,_0x1c085e]of[[_0x238412(0x10a),0x200],[_0x238412(0xba),0x100]]){if(!hasOwn(_0x511001,_0xd55f84))continue;const _0x5a1965=_0x511001[_0xd55f84];if(_0x5a1965!==null&&typeof _0x5a1965!==_0x238412(0xa7))throw invalidFieldType(_0xd55f84,_0x238412(0xeb));if(typeof _0x5a1965===_0x238412(0xa7)&&_0x5a1965['length']>_0x1c085e)throw notificationError(_0x238412(0xce),_0x238412(0x105)+_0xd55f84+_0x238412(0x9a)+_0x1c085e+_0x238412(0xdb));_0x2f4b44[_0xd55f84]=_0x5a1965;}if(hasOwn(_0x511001,_0x238412(0xb7))){const _0x28b857=_0x511001[_0x238412(0xb7)];if(_0x28b857===null&&_0x535fa5===_0x238412(0xec))throw invalidFieldType(_0x238412(0xb7),_0x238412(0xf6));if(_0x28b857!==null&&!isJsonObject(_0x28b857))throw invalidFieldType('channelConfig',_0x535fa5===_0x238412(0xd8)?_0x238412(0x8f):_0x238412(0xf6));_0x28b857!==null&&validateChannelConfigFields(_0x2f4b44[_0x238412(0xc2)],_0x28b857),_0x2f4b44[_0x238412(0xb7)]=_0x28b857;}for(const _0x44829a of[_0x238412(0xd4),_0x238412(0x83)]){if(!hasOwn(_0x511001,_0x44829a))continue;const _0xa5b1c=_0x511001[_0x44829a];if(_0xa5b1c!==null&&(!Number[_0x238412(0x9b)](_0xa5b1c)||_0xa5b1c<0x0))throw notificationError(_0x238412(0xce),_0x238412(0x105)+_0x44829a+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x2f4b44[_0x44829a]=_0xa5b1c;}return _0x2f4b44;}function validateRequiredString(_0x1ce000,_0x578490,_0x3ac2c9){const _0x33ad8a=a197_0x2ac617;if(typeof _0x1ce000!==_0x33ad8a(0xa7))throw invalidFieldType(_0x578490,'a\x20non-empty\x20string');const _0x1adbcc=_0x1ce000[_0x33ad8a(0x104)]();if(!_0x1adbcc)throw notificationError(_0x33ad8a(0xce),'Notification\x20JSON\x20field\x20\x22'+_0x578490+_0x33ad8a(0x92));if(_0x1adbcc[_0x33ad8a(0xa1)]>_0x3ac2c9)throw notificationError(_0x33ad8a(0xce),_0x33ad8a(0x105)+_0x578490+_0x33ad8a(0x9a)+_0x3ac2c9+_0x33ad8a(0xdb));return _0x1adbcc;}function validateChannelConfigFields(_0x1839c8,_0x155ebf){const _0x290187=a197_0x2ac617;if(hasOwn(_0x155ebf,_0x290187(0x85)))throw forbiddenChannelConfigField(_0x290187(0x85));if(_0x1839c8===_0x290187(0xbb))for(const _0x30b5fe of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x155ebf,_0x30b5fe))throw forbiddenChannelConfigField(_0x30b5fe);}}function forbiddenChannelConfigField(_0x3e2ab6){const _0x15c17e=a197_0x2ac617;return notificationError(_0x15c17e(0xb8),_0x15c17e(0x95)+_0x3e2ab6+_0x15c17e(0xd1));}function a197_0x31f0(){const _0x40562f=['Invalid\x20--','join','\x22channelType\x22.','715696uiVHis','str','includes','updateTime','setEncoding','appCode','replyTo','push','notification_config_field_required','endpointUrlRaw','a\x20string\x20or\x20null','create','keys','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','entries','createTime','WECOM','notification_config_update_empty','kind','Unknown\x20notification\x20JSON\x20field\x20\x22','\x22configName\x22.','a\x20JSON\x20object','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','FEISHU','Missing\x20notification\x20JSON\x20source.','some','type','14912600tYaqGh','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','notification_config_id_invalid','configName','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','name','has','trim','Notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_response_invalid','1042wJvydL','endpointUrl','channelCode','readTimeout','\x20--format\x20compress','messageTemplate','preflight','Notification\x20config\x20','37806hpcVJR','3180016tfctTX','DINGTALK','channelConfigRaw','mutation','call','\x20is\x20missing\x20required\x20field\x20\x22','a\x20JSON\x20object\x20or\x20null','\x20must\x20be\x20an\x20object.','configCode','\x22\x20must\x20be\x20a\x20non-empty\x20string.','num','bccList','Notification\x20JSON\x20channelConfig\x20field\x20\x22','bool','apiError','recipients','hasOwnProperty','\x22\x20cannot\x20exceed\x20','isSafeInteger','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','\x20--type\x20','endpointUrl:null','path','boolean','length','Allowed\x20values:\x20','utf8','896lFcheX','environment\x20variable\x20','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','string','stdin','\x20has\x20an\x20invalid\x20appCode.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x20has\x20an\x20invalid\x20channelType.','file\x20','file','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','parse','Notification\x20JSON\x20from\x20','\x20has\x20an\x20unsupported\x20channelType.','env','rabetbase\x20notification\x20config-list\x20--appcode\x20','dry-run','1534746ghgwCP','\x20has\x20an\x20invalid\x20id.','channelConfig','notification_config_channel_field_forbidden','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','description','EMAIL','Application-level\x20notification\x20config\x20ID','\x20has\x20invalid\x20field\x20\x22','validation','a\x20supported\x20string','notification_config_json_invalid','every','channelType','isArray','stringify','228HVxOwH','prototype','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Item\x20','<redacted>','object','15TVfODM','notification_config_field_invalid','\x20failed.','10438407SpzJpo','\x22\x20is\x20forbidden.','notification_config_','notification_config_source_unavailable','connectTimeout','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','ccList','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','update','from-env','Create\x20JSON\x20requires\x20field\x20','\x20characters.','Invalid\x20notification\x20config\x20response.','fromName'];a197_0x31f0=function(){return _0x40562f;};return a197_0x31f0();}function invalidFieldType(_0x10b53b,_0x201aa9){const _0x21df8b=a197_0x2ac617;return notificationError(_0x21df8b(0xce),'Notification\x20JSON\x20field\x20\x22'+_0x10b53b+_0x21df8b(0x106)+_0x201aa9+'.');}function serializeChannelConfig(_0x57ab1a){const _0x535d50=a197_0x2ac617;return _0x57ab1a===null||_0x57ab1a===undefined?null:JSON[_0x535d50(0xc4)](_0x57ab1a);}function redactSensitive(_0x1479cb){const _0x412f6d=a197_0x2ac617;return _0x1479cb===null||_0x1479cb===undefined||_0x1479cb===''?null:_0x412f6d(0xcb);}function requireResponseString(_0x101d86,_0x2bbd9e,_0x4e5b24){const _0x4e2ba6=a197_0x2ac617;if(typeof _0x101d86!=='string'||_0x101d86[_0x4e2ba6(0x104)]()==='')throw CliErrors[_0x4e2ba6(0x97)](_0x4e2ba6(0xdc),_0x4e2ba6(0xca)+(_0x4e5b24+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x2bbd9e+'\x22.');return _0x101d86[_0x4e2ba6(0x104)]();}function requireExactString(_0x4a2ef8,_0x38ab9f,_0x4ca451){const _0x5edc99=a197_0x2ac617;if(typeof _0x4a2ef8!=='string'||_0x4a2ef8[_0x5edc99(0x104)]()==='')throw notificationError('notification_config_response_invalid',_0x5edc99(0x87)+_0x4ca451+_0x5edc99(0x8e)+_0x38ab9f+'\x22.');return _0x4a2ef8['trim']();}function responseNullableString(_0x2c6ac6,_0x3cbfc5,_0xd92bf0){const _0x418c09=a197_0x2ac617;if(_0x2c6ac6===undefined||_0x2c6ac6===null)return null;if(typeof _0x2c6ac6!==_0x418c09(0xa7))throw notificationError(_0x418c09(0x108),_0x418c09(0x87)+_0xd92bf0+_0x418c09(0xbd)+_0x3cbfc5+'\x22.');return _0x2c6ac6;}function responseNullableTimeout(_0x538c73,_0x3bcea5,_0x1e3c34){const _0x1f3b5f=a197_0x2ac617;if(_0x538c73===undefined||_0x538c73===null)return null;if(!Number['isSafeInteger'](_0x538c73)||_0x538c73<0x0)throw notificationError(_0x1f3b5f(0x108),'Notification\x20config\x20'+_0x1e3c34+_0x1f3b5f(0xbd)+_0x3bcea5+'\x22.');return _0x538c73;}function normalizeNullableString(_0x109625){const _0x5f1c3f=a197_0x2ac617;return typeof _0x109625===_0x5f1c3f(0xa7)?_0x109625:null;}function isJsonObject(_0x518d03){const _0x58b40d=a197_0x2ac617;return _0x518d03!==null&&typeof _0x518d03===_0x58b40d(0xcc)&&!Array[_0x58b40d(0xc3)](_0x518d03);}function hasOwn(_0x326d18,_0x431e58){const _0x2cdaa9=a197_0x2ac617;return Object[_0x2cdaa9(0xc6)][_0x2cdaa9(0x99)][_0x2cdaa9(0x8d)](_0x326d18,_0x431e58);}async function readStdin(){const _0xd518a1=a197_0x2ac617;let _0x48d464='';process[_0xd518a1(0xa8)][_0xd518a1(0xe5)](_0xd518a1(0xa3));for await(const _0x554bf1 of process[_0xd518a1(0xa8)])_0x48d464+=_0x554bf1;return _0x48d464;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a198_0x17a9a5=a198_0x20e9;(function(_0x162f39,_0x4d1e8b){const _0x263733=a198_0x20e9,_0x5d3a30=_0x162f39();while(!![]){try{const _0x2f5069=parseInt(_0x263733(0x1d0))/0x1*(parseInt(_0x263733(0x205))/0x2)+parseInt(_0x263733(0x1de))/0x3+-parseInt(_0x263733(0x1dd))/0x4+-parseInt(_0x263733(0x1e5))/0x5+-parseInt(_0x263733(0x1dc))/0x6*(-parseInt(_0x263733(0x200))/0x7)+parseInt(_0x263733(0x202))/0x8+-parseInt(_0x263733(0x1f5))/0x9*(-parseInt(_0x263733(0x1fb))/0xa);if(_0x2f5069===_0x4d1e8b)break;else _0x5d3a30['push'](_0x5d3a30['shift']());}catch(_0x514150){_0x5d3a30['push'](_0x5d3a30['shift']());}}}(a198_0x2280,0x7f9c4));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a198_0x20e9(_0x47f4c4,_0x5e051f){_0x47f4c4=_0x47f4c4-0x1cf;const _0x228005=a198_0x2280();let _0x20e9f4=_0x228005[_0x47f4c4];return _0x20e9f4;}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x17a9a5(0x1d7),a198_0x17a9a5(0x1fe),a198_0x17a9a5(0x1e2),a198_0x17a9a5(0x1f3)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x17a9a5(0x1d1),'general':a198_0x17a9a5(0x1f6),'form':a198_0x17a9a5(0x1eb),'idCard':a198_0x17a9a5(0x1e8)},SCENE_FLAG={'name':'scene','type':a198_0x17a9a5(0x1e6),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a198_0x17a9a5(0x1ff),'type':'string','description':a198_0x17a9a5(0x1e7)},IMAGE_URL_FLAG={'name':a198_0x17a9a5(0x1ec),'type':a198_0x17a9a5(0x1e6),'description':a198_0x17a9a5(0x1cf)};function normalizeScene(_0x17c7b6){const _0x7407b9=a198_0x17a9a5,_0x4595e3=_0x17c7b6[_0x7407b9(0x1d4)]()[_0x7407b9(0x1e9)]();if(_0x4595e3===_0x7407b9(0x1ea))return _0x7407b9(0x1f3);if(_0x4595e3===_0x7407b9(0x1d7)||_0x4595e3===_0x7407b9(0x1fe)||_0x4595e3===_0x7407b9(0x1e2))return _0x4595e3;throw CliErrors[_0x7407b9(0x1d8)](_0x7407b9(0x1f0)+_0x17c7b6+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x7407b9(0x1fa)](',\x20'));}function selectedInputs(_0xaf2928){const _0x2a909a=a198_0x17a9a5,_0x4be3c6=_0xaf2928[_0x2a909a(0x206)](_0x2a909a(0x1ff))[_0x2a909a(0x1d4)](),_0x2c3f3e=_0xaf2928[_0x2a909a(0x206)](_0x2a909a(0x1ec))[_0x2a909a(0x1d4)]();return{'imageFile':_0x4be3c6,'imageUrl':_0x2c3f3e,'count':[_0x4be3c6,_0x2c3f3e]['filter'](Boolean)[_0x2a909a(0x1d6)]};}function validateInputSelection(_0x12c60c){const _0x5790c4=a198_0x17a9a5,_0x2eb6e9=selectedInputs(_0x12c60c);if(_0x2eb6e9[_0x5790c4(0x201)]!==0x1)throw CliErrors[_0x5790c4(0x1d8)](_0x5790c4(0x203));return _0x2eb6e9;}function withScene(_0x4fc204,_0xc274c7,_0x49a552){const _0x544b22=a198_0x17a9a5;return{..._0x4fc204,'scene':_0xc274c7,..._0x49a552?{'sourceFile':{'fileName':_0x49a552['fileName'],'filePath':_0x49a552[_0x544b22(0x1fc)]}}:{}};}function a198_0x2280(){const _0x164b76=['General','recognize','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','toString','join','4001690ZFuIaP','filePath','File\x20URL\x20response\x20missing\x20fileUrl.','general','image-file','471863nvqOzL','count','2711840tCAZNs','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','imageUrl','2jAzkTM','str','Publicly\x20accessible\x20image\x20or\x20file\x20URL','401917dnmWcy','Invoice','scene','\x20OCR','trim','appCode','length','invoice','validation','File\x20upload\x20response\x20missing\x20filePath.','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','/smartapi/common/uploadFile','48gzWHJG','2980040eRFxbM','714561XAqvJx','POST','/smartapi/ocr/recognize-text?','fileUrl','form','imageFile','path','3254115gSKXUn','string','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','IdCard','toLowerCase','idcard','Table','image-url','/smartapi/common/queryFileUrl','GET','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Unsupported\x20OCR\x20scene:\x20','/smartapi/ocr/recognize-text','read','idCard','apiError','9nVjVof'];a198_0x2280=function(){return _0x164b76;};return a198_0x2280();}const ocrRecognize={'service':'ocr','command':a198_0x17a9a5(0x1f7),'description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a198_0x17a9a5(0x1f2),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x323ff6){const _0x5d8925=a198_0x17a9a5,_0x499e3c=normalizeScene(_0x323ff6['str'](_0x5d8925(0x1d2))),_0x536b51=SCENE_TO_LEGACY_TYPE[_0x499e3c],_0x567877=validateInputSelection(_0x323ff6);if(_0x567877['imageUrl']){const _0x4a5dd9=new URLSearchParams({'url':_0x567877['imageUrl'],'type':_0x536b51,'appCode':_0x323ff6[_0x5d8925(0x1d5)]});return{'method':'GET','url':_0x5d8925(0x1e0)+_0x4a5dd9[_0x5d8925(0x1f9)](),'description':'Preview:\x20recognize\x20'+_0x499e3c+'\x20OCR\x20from\x20URL'};}const _0x364696=requireDevelopmentUploadFile(_0x567877[_0x5d8925(0x1e3)],_0x5d8925(0x1ff));return{'method':_0x5d8925(0x1df),'url':_0x5d8925(0x1db),'body':{'steps':[{'method':_0x5d8925(0x1df),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x323ff6[_0x5d8925(0x1d5)],'multipart':{'file':_0x364696}}},{'method':_0x5d8925(0x1df),'url':_0x5d8925(0x1ed),'body':{'filePath':_0x5d8925(0x1da),'downloadFlag':![]}},{'method':_0x5d8925(0x1ee),'url':_0x5d8925(0x1f1),'query':{'appCode':_0x323ff6['appCode'],'url':_0x5d8925(0x1ef),'type':_0x536b51}}]},'description':_0x5d8925(0x1f8)+_0x499e3c+_0x5d8925(0x1d3)};},async 'execute'(_0x5368c0){const _0x2f4050=a198_0x17a9a5,_0x139077=normalizeScene(_0x5368c0[_0x2f4050(0x206)](_0x2f4050(0x1d2))),_0x44d4fa=SCENE_TO_LEGACY_TYPE[_0x139077],_0x33b738=validateInputSelection(_0x5368c0);if(_0x33b738[_0x2f4050(0x204)]){const _0x2abd91=await recognizeDevelopmentOcr(_0x5368c0[_0x2f4050(0x1d5)],{'url':_0x33b738[_0x2f4050(0x204)],'type':_0x44d4fa});return{'ok':!![],'data':withScene(_0x2abd91,_0x139077)};}const _0x4fd58d=requireDevelopmentUploadFile(_0x33b738['imageFile'],'image-file'),_0x2006ce=await uploadDevelopmentFile(_0x5368c0[_0x2f4050(0x1d5)],_0x4fd58d[_0x2f4050(0x1e4)]);if(!_0x2006ce[_0x2f4050(0x1fc)])throw CliErrors[_0x2f4050(0x1f4)](_0x2f4050(0x1d9));const _0x508f6a=await queryDevelopmentFileUrl(_0x2006ce[_0x2f4050(0x1fc)],{'download':![]});if(!_0x508f6a['fileUrl'])throw CliErrors[_0x2f4050(0x1f4)](_0x2f4050(0x1fd));const _0x177daa=await recognizeDevelopmentOcr(_0x5368c0[_0x2f4050(0x1d5)],{'url':_0x508f6a[_0x2f4050(0x1e1)],'type':_0x44d4fa});return{'ok':!![],'data':withScene(_0x177daa,_0x139077,_0x2006ce)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x447b0a=a199_0x2dab;(function(_0x1d8d95,_0x5a9710){const _0x434fbc=a199_0x2dab,_0x37cede=_0x1d8d95();while(!![]){try{const _0x206c37=-parseInt(_0x434fbc(0x1de))/0x1*(-parseInt(_0x434fbc(0x1f3))/0x2)+-parseInt(_0x434fbc(0x1fc))/0x3*(parseInt(_0x434fbc(0x210))/0x4)+parseInt(_0x434fbc(0x209))/0x5+-parseInt(_0x434fbc(0x20a))/0x6+-parseInt(_0x434fbc(0x215))/0x7+parseInt(_0x434fbc(0x219))/0x8*(-parseInt(_0x434fbc(0x211))/0x9)+parseInt(_0x434fbc(0x214))/0xa*(parseInt(_0x434fbc(0x21c))/0xb);if(_0x206c37===_0x5a9710)break;else _0x37cede['push'](_0x37cede['shift']());}catch(_0x58da89){_0x37cede['push'](_0x37cede['shift']());}}}(a199_0xa0ce,0x79a9e));import{readFile}from'node:fs/promises';function a199_0xa0ce(){const _0x32d756=['Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','name','page-type','menuId','version','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','page\x20create\x20does\x20not\x20accept\x20--page-type.','stringify','pageName\x20cannot\x20exceed\x20100\x20characters.','isInteger','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','.json','Custom_page_','/smartapi/webcode/page/create','str','num','ONEPAGE','425002axYCjL','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','CUSTOM','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page-dir','values','page.create','../../../templates/custom-pages','Would\x20create\x20Custom\x20Page\x20','15LlEniU','appCode','pageId','page-pattern','trim','files','parse','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','createMenu','apiError','isArray','string','Custom\x20Page\x20pattern\x20not\x20found:\x20','3572400MMuJYz','325050wrDffz','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','pageName','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','POST','keys','314900XFRlPl','1351683MEjFGc','Invalid\x20Custom\x20Page\x20pattern:\x20','length','1896330yLShPX','6779206stwJsQ','page','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','toLowerCase','8cdHtvI','parentMenuId','number','66ZmHDnm','validation','menuPath','parent-menu-id','isNaN','Created\x20Custom\x20Page\x20','1KteJBR','now','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'];a199_0xa0ce=function(){return _0x32d756;};return a199_0xa0ce();}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=['BLANK',a199_0x447b0a(0x1f2),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a199_0x447b0a(0x1fa));export const pageCreate={'service':a199_0x447b0a(0x216),'command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a199_0x447b0a(0x1e4),'message':a199_0x447b0a(0x1e8),'hint':a199_0x447b0a(0x1ec)},{'name':'page-content','message':a199_0x447b0a(0x20d),'hint':a199_0x447b0a(0x1e2)}],'flags':[{'name':a199_0x447b0a(0x1e3),'type':'string','description':a199_0x447b0a(0x1f4)},{'name':'parent-menu-id','type':a199_0x447b0a(0x21b),'description':a199_0x447b0a(0x1f6)},{'name':a199_0x447b0a(0x1ff),'type':a199_0x447b0a(0x207),'description':a199_0x447b0a(0x203),'enum':CUSTOM_PAGE_PATTERNS},{'name':a199_0x447b0a(0x1f7),'type':a199_0x447b0a(0x207),'description':a199_0x447b0a(0x1e1)},APPCODE_FLAG],async 'validate'(_0x51adc2){await readValidatedPageSource(_0x51adc2);},async 'dryRun'(_0x22676e){const _0x178860=a199_0x447b0a,_0x38b93c=readInput(_0x22676e,await readValidatedPageSource(_0x22676e));return{'method':_0x178860(0x20e),'url':_0x178860(0x1ef),'body':{'appCode':_0x38b93c[_0x178860(0x1fd)],'pageName':_0x38b93c['pageName'],..._0x38b93c[_0x178860(0x21a)]!=null?{'parentMenuId':_0x38b93c['parentMenuId']}:{},'createMenu':_0x38b93c[_0x178860(0x204)],'codeContent':_0x38b93c[_0x178860(0x201)]},'description':_0x178860(0x1fb)+JSON[_0x178860(0x1e9)](_0x38b93c[_0x178860(0x20c)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x1c6027){const _0x537399=a199_0x447b0a,_0x59feba=readInput(_0x1c6027,await readValidatedPageSource(_0x1c6027)),_0x5db481=await createCustomPage(_0x59feba);if(!Number[_0x537399(0x1eb)](_0x5db481['pageId'])||_0x5db481['pageId']<=0x0)throw CliErrors[_0x537399(0x205)](_0x537399(0x1e0));const _0x5bf991=buildCustomPageDevelopmentUrl(_0x59feba['appCode'],_0x5db481[_0x537399(0x21e)]),_0x3c641c=buildCustomPageEditUrl(_0x59feba[_0x537399(0x1fd)],_0x5db481[_0x537399(0x1fe)]);return{'ok':!![],'data':{'operation':_0x537399(0x1f9),'pageType':_0x537399(0x1f5),'pagePattern':readPagePattern(_0x1c6027),'selector':{'appCode':_0x59feba[_0x537399(0x1fd)],'pageName':_0x59feba[_0x537399(0x20c)]},'before':null,'after':{'pageId':_0x5db481['pageId'],'pageName':_0x5db481['pageName'],'appCode':_0x5db481['appCode'],'version':_0x5db481[_0x537399(0x1e6)],'menuId':_0x5db481[_0x537399(0x1e5)],'menuPath':_0x5db481['menuPath'],'files':_0x5db481['files']??Object[_0x537399(0x20f)](_0x59feba[_0x537399(0x201)])},'dryRun':![],'request':_0x59feba,..._0x5bf991?{'pageUrl':_0x5bf991}:{},..._0x3c641c?{'editPageUrl':_0x3c641c}:{},'warnings':_0x5bf991?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x537399(0x1dd)+_0x5db481[_0x537399(0x1fe)]+'.'};}};function readPagePattern(_0x380869){const _0x4b271a=a199_0x447b0a,_0x84b5cd=_0x380869[_0x4b271a(0x1f0)]('page-pattern')['trim'](),_0x23d65a=_0x380869[_0x4b271a(0x1f0)](_0x4b271a(0x1f7))['trim']();if(_0x84b5cd&&_0x23d65a)throw CliErrors['validation']('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x23d65a)return null;if(!_0x84b5cd)throw CliErrors[_0x4b271a(0x21d)](_0x4b271a(0x20b));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x84b5cd))throw CliErrors['validation'](_0x4b271a(0x217));return _0x84b5cd;}function a199_0x2dab(_0x265a75,_0x3bf5d9){_0x265a75=_0x265a75-0x1dc;const _0xa0ce2=a199_0xa0ce();let _0x2dab45=_0xa0ce2[_0x265a75];return _0x2dab45;}async function readPageSource(_0x59f30c){const _0x3804e9=a199_0x447b0a,_0x204113=_0x59f30c[_0x3804e9(0x1f0)](_0x3804e9(0x1f7))[_0x3804e9(0x200)](),_0x494d0c=readPagePattern(_0x59f30c);if(_0x494d0c===null){const _0x248d2d=await readCustomPageDirectory(_0x204113);if(Object[_0x3804e9(0x20f)](_0x248d2d)[_0x3804e9(0x213)]===0x0)throw CliErrors[_0x3804e9(0x21d)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x248d2d;}let _0x497f4d;try{_0x497f4d=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x494d0c[_0x3804e9(0x218)]()+_0x3804e9(0x1ed)),'utf8');}catch{throw CliErrors[_0x3804e9(0x21d)](_0x3804e9(0x208)+_0x494d0c+'.');}let _0x24f8bf;try{_0x24f8bf=JSON[_0x3804e9(0x202)](_0x497f4d);}catch{throw CliErrors[_0x3804e9(0x21d)](_0x3804e9(0x212)+_0x494d0c+'.');}if(!_0x24f8bf||typeof _0x24f8bf!=='object'||Array[_0x3804e9(0x206)](_0x24f8bf)||Object[_0x3804e9(0x1f8)](_0x24f8bf)['some'](_0x3b3b4e=>typeof _0x3b3b4e!==_0x3804e9(0x207)))throw CliErrors['validation'](_0x3804e9(0x212)+_0x494d0c+'.');return _0x24f8bf;}async function readValidatedPageSource(_0x533e69){const _0x2b0678=await readPageSource(_0x533e69);return await validateCustomPageContent(_0x2b0678),_0x2b0678;}function readInput(_0x4db593,_0x2b41bf){const _0x59b282=a199_0x447b0a,_0x24901d=_0x4db593[_0x59b282(0x1f0)](_0x59b282(0x1e3))[_0x59b282(0x200)]()||_0x59b282(0x1ee)+Date[_0x59b282(0x1df)]();if(_0x24901d[_0x59b282(0x213)]>0x64)throw CliErrors['validation'](_0x59b282(0x1ea));const _0x56d2c0=_0x4db593[_0x59b282(0x1f1)](_0x59b282(0x21f),NaN),_0x18af0d=!Number[_0x59b282(0x1dc)](_0x56d2c0);if(_0x18af0d&&(!Number[_0x59b282(0x1eb)](_0x56d2c0)||_0x56d2c0<=0x0))throw CliErrors[_0x59b282(0x21d)](_0x59b282(0x1e7));return{'appCode':_0x4db593['appCode'],'pageName':_0x24901d,..._0x18af0d?{'parentMenuId':_0x56d2c0}:{},'createMenu':!![],'files':_0x2b41bf};}
|