@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.2
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/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/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/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.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +172 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- 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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +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.d.ts +2 -8
- 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.d.ts +2 -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 +27 -8
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +6 -5
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +9 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +9 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a164_0x14fbdf=a164_0x4b50;(function(_0x35727d,_0x4cc0a0){const _0x5c3449=a164_0x4b50,_0x5f0078=_0x35727d();while(!![]){try{const _0x3806aa=-parseInt(_0x5c3449(0x138))/0x1+parseInt(_0x5c3449(0x12a))/0x2*(parseInt(_0x5c3449(0x13c))/0x3)+-parseInt(_0x5c3449(0x119))/0x4+-parseInt(_0x5c3449(0x132))/0x5*(-parseInt(_0x5c3449(0xff))/0x6)+parseInt(_0x5c3449(0x131))/0x7*(parseInt(_0x5c3449(0x113))/0x8)+-parseInt(_0x5c3449(0xf6))/0x9+parseInt(_0x5c3449(0xf8))/0xa*(parseInt(_0x5c3449(0x109))/0xb);if(_0x3806aa===_0x4cc0a0)break;else _0x5f0078['push'](_0x5f0078['shift']());}catch(_0x20cc0f){_0x5f0078['push'](_0x5f0078['shift']());}}}(a164_0x582a,0x65271));import a164_0x3e731a from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a164_0x582a(){const _0x2532d2=['Creating\x20','1420209mHRfxR','appCode','11630FPyJth','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Online\x20menu\x20list\x20fetched','\x20created,\x20','created','gray','40368AIzEDn','Sync\x20local\x20pages\x20as\x20platform\x20menus','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','jsUrl','length','\x20page(s)','\x20created.','message','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cssUrl','1837lesxCb','size','skipped','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','validation','Created\x20','/smartapi/menu/create','cyan','failed','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','80CYKElB','Pre-fill\x20JS/CSS\x20URLs.\x20','trim','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Menu\x20sync\x20completed:\x20','Menu\x20creation\x20failed','797508claQvd','map','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)...','✓\x20Menu\x20sync\x20completed:\x20','\x20failed.','Would\x20create\x20','\x20\x20✓\x20Selected:\x20','\x20menu(s)','\x20\x20Create\x20','filter','write','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','cookie','rawFlags','paths','922cPBlRd','localPages','Menu\x20sync\x20skipped','appcode','\x20\x20Cancelled.','yes','onlinePaths','325997HlgtLl','265zjojaK','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','yellow','Fetching\x20online\x20menu\x20list...','params','320159dbOPZP','split','str','onlineMenuList','489BMMKjw','\x20and\x20CSS:\x20'];a164_0x582a=function(){return _0x2532d2;};return a164_0x582a();}import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a164_0x4b50(_0x404ab6,_0x3467c2){_0x404ab6=_0x404ab6-0xf5;const _0x582a4b=a164_0x582a();let _0x4b50f0=_0x582a4b[_0x404ab6];return _0x4b50f0;}import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a164_0x14fbdf(0x100),'risk':a164_0x14fbdf(0x125),'flags':[{'name':a164_0x14fbdf(0x137),'type':'string','description':a164_0x14fbdf(0x114)+a164_0x14fbdf(0x126)},{'name':'paths','type':'string','description':a164_0x14fbdf(0x116)},{'name':a164_0x14fbdf(0x12f),'type':'boolean','description':a164_0x14fbdf(0x107)}],async 'dryRun'(_0x3373ce){const _0x258453=a164_0x14fbdf;ensureRunnableContext(_0x3373ce['rawFlags'],_0x3373ce['selectedAppName']);const _0x36be30=await runMenuSyncCore(_0x3373ce[_0x258453(0xf7)],_0x3373ce[_0x258453(0x127)],parsePaths(_0x3373ce['str'](_0x258453(0x129))),_0x3373ce[_0x258453(0x13a)]('params'),{'dryRun':!![]});return{'method':'POST','url':_0x258453(0x10f),'body':_0x36be30,'description':_0x36be30[_0x258453(0x10b)]?_0x258453(0x101):_0x258453(0x120)+_0x36be30['targetPages']['length']+_0x258453(0x11c)};},async 'execute'(_0x244957){const _0x1a6247=a164_0x14fbdf;ensureRunnableContext(_0x244957[_0x1a6247(0x128)],_0x244957['selectedAppName']);const _0x4f736b=_0x244957['flag'](_0x1a6247(0x12f)),_0x18252a=_0x244957[_0x1a6247(0x13a)]('params'),_0x5624d5=parsePaths(_0x244957[_0x1a6247(0x13a)](_0x1a6247(0x129))),_0x9128a2=parseMenuSyncParams(_0x18252a);if(_0x4f736b){const _0x32be7a=await runMenuSyncCore(_0x244957['appCode'],_0x244957['cookie'],_0x5624d5,_0x18252a);if(_0x32be7a[_0x1a6247(0x10b)]){const _0x21d0e6=getLocalPages();_0x21d0e6['length']===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x1a6247(0x10c));}else writeCliSideChannelLine(_0x1a6247(0x11e)+_0x32be7a[_0x1a6247(0xfd)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x32be7a,'message':_0x32be7a[_0x1a6247(0x10b)]?_0x1a6247(0x12c):_0x1a6247(0x117)+_0x32be7a[_0x1a6247(0xfd)]+_0x1a6247(0x105)};}if(_0x5624d5[_0x1a6247(0x103)]>0x0)throw CliErrors[_0x1a6247(0x10d)](_0x1a6247(0xfa),_0x1a6247(0x11b));if(!isInteractive()&&_0x18252a)throw CliErrors[_0x1a6247(0x10d)](_0x1a6247(0x112),_0x1a6247(0x11b));requireInteractive();const _0x3df11a=startSpinner(_0x1a6247(0x136));let _0x3b6db2,_0x34103d,_0x53ea89;try{const _0x20d96d=await fetchMenuData(_0x244957['appCode'],_0x244957[_0x1a6247(0x127)]);_0x3b6db2=_0x20d96d[_0x1a6247(0x12b)],_0x34103d=_0x20d96d[_0x1a6247(0x130)],_0x53ea89=_0x20d96d[_0x1a6247(0x13b)],stopSpinner(_0x3df11a,_0x1a6247(0xfb),!![]);}catch(_0x374047){stopSpinner(_0x3df11a,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x1a6247(0x10d)](_0x374047 instanceof Error?_0x374047[_0x1a6247(0x106)]:_0x1a6247(0x134));}if(_0x3b6db2[_0x1a6247(0x103)]===0x0)return writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0x135)](_0x1a6247(0xf9))),{'ok':!![]};const _0x14ddc2=buildCompareRows(_0x3b6db2,_0x34103d);writeCliSideChannelLine(renderCompareTable(_0x14ddc2)),writeCliSideChannelLine('');const _0x3f02a5=await selectPages(_0x3b6db2,_0x34103d);writeCliSideChannelLine(''),writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0x110)](_0x1a6247(0x121)+_0x3f02a5[_0x1a6247(0x103)]+_0x1a6247(0x104)));const _0x447b23=_0x9128a2[_0x1a6247(0x102)]&&_0x9128a2[_0x1a6247(0x108)];if(!_0x447b23){writeCliSideChannelLine(renderSyncSummary(_0x3f02a5,_0x34103d[_0x1a6247(0x10a)]>0x0));const _0x4ec8b0=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4ec8b0)return writeCliSideChannelLine(a164_0x3e731a['gray'](_0x1a6247(0x12e))),{'ok':!![]};}let _0x50f4d1=_0x9128a2[_0x1a6247(0x102)],_0x30f4f5=_0x9128a2[_0x1a6247(0x108)];!_0x50f4d1&&(_0x50f4d1=await askJsUrl());!_0x30f4f5&&(_0x30f4f5=await askCssUrl());const _0x235d82=await askConfirm(_0x1a6247(0x123)+_0x3f02a5[_0x1a6247(0x103)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x50f4d1+_0x1a6247(0x13d)+_0x30f4f5+'?');if(!_0x235d82)return writeCliSideChannelLine(a164_0x3e731a[_0x1a6247(0xfe)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x28be26=[_0x50f4d1,_0x30f4f5],_0x309c1a=startSpinner(_0x1a6247(0xf5)+_0x3f02a5[_0x1a6247(0x103)]+_0x1a6247(0x11d));try{const _0x8d5295=await doCreateMenus(_0x244957[_0x1a6247(0xf7)],_0x244957['cookie'],_0x3f02a5,_0x28be26);return stopSpinner(_0x309c1a,_0x1a6247(0x10e)+_0x8d5295['created']+_0x1a6247(0x122),!![]),{'ok':!![],'data':_0x8d5295,'message':_0x1a6247(0x117)+_0x8d5295['created']+_0x1a6247(0xfc)+_0x8d5295[_0x1a6247(0x111)]+_0x1a6247(0x11f)};}catch(_0x30afad){stopSpinner(_0x309c1a,_0x1a6247(0x118),![]);throw CliErrors[_0x1a6247(0x10d)](_0x30afad instanceof Error?_0x30afad[_0x1a6247(0x106)]:_0x1a6247(0x118));}}};function ensureRunnableContext(_0x48a358,_0x46a58e){const _0x4b4deb=a164_0x14fbdf,_0x3a6b92=_0x48a358['appcode']?String(_0x48a358[_0x4b4deb(0x12d)])['trim']():'';if(!isInProject()&&!_0x46a58e&&!_0x3a6b92)throw CliErrors['validation'](_0x4b4deb(0x133)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x187691){const _0x75ac48=a164_0x14fbdf;return[...new Set(_0x187691[_0x75ac48(0x139)](',')[_0x75ac48(0x11a)](_0x1fb4e5=>_0x1fb4e5[_0x75ac48(0x115)]())[_0x75ac48(0x124)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a151_0x1434c8=a151_0x355f;(function(_0x4ba6b9,_0x5ca7d7){const _0x343ee3=a151_0x355f,_0x191e3f=_0x4ba6b9();while(!![]){try{const _0x162cd1=-parseInt(_0x343ee3(0x113))/0x1+parseInt(_0x343ee3(0x149))/0x2+parseInt(_0x343ee3(0x155))/0x3+parseInt(_0x343ee3(0x14f))/0x4+parseInt(_0x343ee3(0x15f))/0x5*(-parseInt(_0x343ee3(0x176))/0x6)+parseInt(_0x343ee3(0x172))/0x7*(parseInt(_0x343ee3(0x10f))/0x8)+parseInt(_0x343ee3(0x108))/0x9*(-parseInt(_0x343ee3(0x17a))/0xa);if(_0x162cd1===_0x5ca7d7)break;else _0x191e3f['push'](_0x191e3f['shift']());}catch(_0x2b3aef){_0x191e3f['push'](_0x191e3f['shift']());}}}(a151_0x2188,0xd41d9));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a151_0x1434c8(0x132)}];export const menuVisibilityUpdate={'service':a151_0x1434c8(0x17d),'command':a151_0x1434c8(0x11d),'description':a151_0x1434c8(0x119),'risk':a151_0x1434c8(0x12b),'structuredErrors':!![],'flags':[{'name':a151_0x1434c8(0x163),'type':a151_0x1434c8(0x12a),'description':a151_0x1434c8(0x16a)},{'name':'paths','type':'string','description':a151_0x1434c8(0x17e)},{'name':a151_0x1434c8(0x150),'type':a151_0x1434c8(0x16c),'required':!![],'description':a151_0x1434c8(0x153)},{'name':a151_0x1434c8(0x130),'type':a151_0x1434c8(0x16c),'description':a151_0x1434c8(0x14c)},{'name':'expected-count','type':a151_0x1434c8(0x16e),'description':a151_0x1434c8(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x319ceb){parseInput(_0x319ceb),requireExplicitYes(_0x319ceb);},async 'dryRun'(_0x110529){const _0x3d838b=a151_0x1434c8,_0x84a1e=await buildPlan(_0x110529,!![]),_0x5266c4=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x178)]?.[_0x3d838b(0x15d)]??0x0,_0x67d16e=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x13f)][_0x3d838b(0x15d)]-_0x5266c4;return menuDryRunResult(_0x84a1e[_0x3d838b(0x114)],{'method':'POST','url':_0x3d838b(0x132),'body':{'updates':_0x84a1e['plan'][_0x3d838b(0x178)]?.[_0x3d838b(0x117)](_0x149785=>_0x149785[_0x3d838b(0x14e)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x5266c4+_0x3d838b(0x11a)+_0x67d16e+_0x3d838b(0x164)});},async 'execute'(_0xebb376){const _0xfe707f=a151_0x1434c8;requireExplicitYes(_0xebb376);const _0x435fa2=await buildPlan(_0xebb376,![]);await recheckMutationSnapshot(_0xebb376,_0x435fa2['plan'],_0xfe707f(0x122));const _0x452750=[],_0x57f931=[],_0x4abcf5=[];for(const _0x5ce168 of _0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x13f)]){if(_0x5ce168[_0xfe707f(0x10e)]['visible']===_0x435fa2['plan']['requestedVisible']){_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)],{'id':_0x5ce168['id'],'visible':_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]}),_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':!![],'skipped':![]});}catch(_0x37aea2){const _0x1e7d21=mapMenuApiError(_0x37aea2,'update\x20visibility\x20for',_0x5ce168['id']);if(isMenuResponseLoss(_0x37aea2)&&_0x1e7d21['code']!=='menu_permission_denied'){_0x4abcf5[_0xfe707f(0x156)](_0x5ce168['id']);continue;}_0x57f931['push']({'id':_0x5ce168['id'],'stage':_0xfe707f(0x112),'code':_0x1e7d21['code'],'message':_0x1e7d21['message']});}}let _0x529aa0;try{_0x529aa0=await fetchMenuSnapshot(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)]);}catch(_0x538f9d){const _0x4dd1dc=describeMenuErrorCause(_0x538f9d,'verify\x20menu\x20visibility\x20update'),_0x2b72d2=_0x4abcf5[_0xfe707f(0x117)](_0x153f8f=>({'id':_0x153f8f,'stage':_0xfe707f(0x175),'code':_0xfe707f(0x135),'message':_0xfe707f(0x13d)+_0x153f8f+_0xfe707f(0x134),'requestedStateConfirmed':![],'recovered':![]})),_0x3709b3={'stage':'verification','code':_0xfe707f(0x135),'message':_0xfe707f(0x17b),'targetIds':_0x435fa2[_0xfe707f(0x114)]['targets']['map'](_0x5b9fb2=>_0x5b9fb2['id']),'requestedStateConfirmed':![],..._0x4dd1dc};throw menuFailure(asVerificationError(_0x538f9d,_0xfe707f(0x13a)),_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x2b72d2,_0x3709b3],'warnings':[_0xfe707f(0x157)],'verification':{'status':_0xfe707f(0x15c),'recoveredCount':0x0,'lookupCommand':_0xfe707f(0x127)}});}const _0x4e7dbc=[];for(const _0x2d7757 of _0x452750){const _0x5b4d8a=Number(_0x2d7757['id']),_0x554253=_0x435fa2[_0xfe707f(0x161)][_0xfe707f(0x123)](_0x5b4d8a),_0x1e32d5=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5b4d8a);try{verifyVisibilityUpdate(_0x554253,_0x1e32d5,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]);}catch(_0x1e7e54){const _0xfc31b7=asVerificationError(_0x1e7e54,_0xfe707f(0x11b)+_0x5b4d8a+_0xfe707f(0x115));_0x4e7dbc['push']({'id':_0x5b4d8a,'stage':_0xfe707f(0x14b),'code':_0xfc31b7[_0xfe707f(0x148)],'message':_0xfc31b7[_0xfe707f(0x160)],'requestedStateConfirmed':![]});}}for(const _0x5c4a90 of _0x4abcf5){const _0x212cc0=_0x435fa2[_0xfe707f(0x161)]['get'](_0x5c4a90),_0x1f43ff=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5c4a90);try{verifyVisibilityUpdate(_0x212cc0,_0x1f43ff,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]),_0x452750[_0xfe707f(0x156)]({'id':_0x5c4a90,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3205d6){const _0x3cd0b1=asVerificationError(_0x3205d6,_0xfe707f(0x14d)+_0x5c4a90+_0xfe707f(0x17f));_0x4e7dbc[_0xfe707f(0x156)]({'id':_0x5c4a90,'stage':_0xfe707f(0x175),'code':_0x3cd0b1[_0xfe707f(0x148)],'message':_0x3cd0b1[_0xfe707f(0x160)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4e7dbc[_0xfe707f(0x15d)]>0x0){const _0x1c0284=_0x4e7dbc[_0xfe707f(0x117)](_0x445425=>Number(_0x445425['id'])),_0x53b08a=_0x452750[_0xfe707f(0x15a)](_0x32ec10=>_0x32ec10['recovered']===!![])[_0xfe707f(0x15d)],_0x1521d2=menuError(_0xfe707f(0x135),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1c0284[_0xfe707f(0x12c)](',\x20')+'.',_0xfe707f(0x179));throw menuFailure(_0x1521d2,_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x4e7dbc],'warnings':[_0xfe707f(0x131)],'verification':{'status':_0xfe707f(0x15c),..._0x1c0284['length']===0x1?{'targetId':_0x1c0284[0x0]}:{'targetIds':_0x1c0284},'recoveredCount':_0x53b08a,'lookupCommand':_0xfe707f(0x127)}});}const _0x2085fb=_0x452750[_0xfe707f(0x15a)](_0x4df252=>_0x4df252['updated']===!![])['length'],_0x1ab325=_0x452750[_0xfe707f(0x15d)]-_0x2085fb,_0x3cf9f2={..._0x435fa2[_0xfe707f(0x114)],'succeeded':_0x452750,'failed':_0x57f931,'warnings':_0x57f931[_0xfe707f(0x15d)]>0x0?[..._0x435fa2['plan'][_0xfe707f(0x133)],_0xfe707f(0x10a)]:_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x133)],'verification':{'checkedBy':_0xfe707f(0x181),'snapshotHash':_0x529aa0['hash'],'matchesRequestedState':_0x57f931[_0xfe707f(0x15d)]===0x0,'recoveredCount':_0x4abcf5[_0xfe707f(0x15d)]}};return{'ok':_0x57f931[_0xfe707f(0x15d)]===0x0,'data':_0x3cf9f2,'message':_0x57f931[_0xfe707f(0x15d)]===0x0?_0xfe707f(0x12e)+_0x2085fb+_0xfe707f(0x15e)+_0x1ab325+_0xfe707f(0x164):'Menu\x20visibility\x20update\x20completed:\x20'+_0x2085fb+'\x20updated,\x20'+_0x1ab325+_0xfe707f(0x11e)+_0x57f931[_0xfe707f(0x15d)]+_0xfe707f(0x173)};}};function a151_0x355f(_0x1b78ad,_0x35c544){_0x1b78ad=_0x1b78ad-0x107;const _0x218845=a151_0x2188();let _0x355fff=_0x218845[_0x1b78ad];return _0x355fff;}function parseInput(_0x3d6962){const _0x511761=a151_0x1434c8,_0x2789c0=parseMenuIds(_0x3d6962['str'](_0x511761(0x163))),_0x4e8ead=parseCsv(_0x3d6962[_0x511761(0x12d)]('paths'));if(_0x2789c0[_0x511761(0x15d)]===0x0&&_0x4e8ead[_0x511761(0x15d)]===0x0)throw CliErrors[_0x511761(0x10b)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x3cf9ea=parseBooleanFlag(_0x3d6962,_0x511761(0x150),!![]),_0xab8bea=parseBooleanFlag(_0x3d6962,_0x511761(0x130),![]);let _0xa39c74;if(hasFlag(_0x3d6962,_0x511761(0x15b))){_0xa39c74=_0x3d6962[_0x511761(0x167)](_0x511761(0x15b));if(!Number[_0x511761(0x10c)](_0xa39c74)||_0xa39c74<0x0)throw CliErrors['validation'](_0x511761(0x11f));}return{'menuIds':_0x2789c0,'paths':_0x4e8ead,'visible':_0x3cf9ea,'expectVisible':_0xab8bea,'expectedCount':_0xa39c74};}async function buildPlan(_0x371710,_0x1c8fbf){const _0x5a0067=a151_0x1434c8,_0x2b7e91=parseInput(_0x371710),_0x180275=await fetchMutationSnapshot(_0x371710,_0x5a0067(0x122)),_0x2c930d=selectTargets(_0x180275[_0x5a0067(0x107)],_0x2b7e91[_0x5a0067(0x125)],_0x2b7e91[_0x5a0067(0x144)]);if(_0x2b7e91['expectedCount']!==undefined&&_0x2c930d['length']!==_0x2b7e91[_0x5a0067(0x169)])throw menuError('menu_expected_count_mismatch','Selected\x20'+_0x2c930d['length']+_0x5a0067(0x128)+_0x2b7e91['expectedCount']+'.',_0x5a0067(0x109));if(_0x2b7e91[_0x5a0067(0x120)]!==undefined){const _0x2a836d=_0x2c930d[_0x5a0067(0x15a)](_0x6753c9=>_0x6753c9[_0x5a0067(0x150)]!==_0x2b7e91[_0x5a0067(0x120)]);if(_0x2a836d[_0x5a0067(0x15d)]>0x0)throw menuError(_0x5a0067(0x126),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2a836d[_0x5a0067(0x117)](_0x5e6dee=>_0x5e6dee['id'])[_0x5a0067(0x12c)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x237198=_0x2c930d[_0x5a0067(0x117)](_0x3096fb=>({'id':_0x3096fb['id'],'label':_0x3096fb[_0x5a0067(0x111)],'path':_0x3096fb[_0x5a0067(0x12f)],'before':{'visible':_0x3096fb[_0x5a0067(0x150)]},'after':{'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x4e24bf=_0x237198[_0x5a0067(0x15a)](_0x27d004=>_0x27d004[_0x5a0067(0x10e)]['visible']!==_0x2b7e91[_0x5a0067(0x150)])[_0x5a0067(0x117)](_0xe48776=>({'stage':_0x5a0067(0x14a),'method':_0x5a0067(0x13b),'path':_0x5a0067(0x132),'body':{'appCode':_0x371710['appCode'],'id':_0xe48776['id'],'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x52fff6=mutationResult({'operation':_0x5a0067(0x11d),'selector':{'menuIds':_0x2b7e91['menuIds'],'paths':_0x2b7e91[_0x5a0067(0x144)]},'before':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x1c64ff=>({'id':_0x1c64ff['id'],'path':_0x1c64ff[_0x5a0067(0x12f)],'visible':_0x1c64ff[_0x5a0067(0x150)]}))},'after':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x3ef778=>({'id':_0x3ef778['id'],'path':_0x3ef778['path'],'visible':_0x2b7e91[_0x5a0067(0x150)]}))},'dryRun':_0x1c8fbf,'backend':[...BACKEND],'plannedActions':_0x4e24bf,'snapshotHash':_0x180275[_0x5a0067(0x138)],'warnings':_0x4e24bf['length']===0x0?[_0x5a0067(0x118)]:[]});return{'plan':{..._0x52fff6,'requestedVisible':_0x2b7e91[_0x5a0067(0x150)],'targets':_0x237198},'beforeById':new Map(_0x2c930d['map'](_0x1e82e0=>[_0x1e82e0['id'],_0x1e82e0]))};}function selectTargets(_0x1b9fea,_0x3a840e,_0x1b1934){const _0x2a85cb=a151_0x1434c8,_0x18e524=new Map(_0x1b9fea[_0x2a85cb(0x117)](_0xde8168=>[_0xde8168['id'],_0xde8168])),_0x31d170=new Map(),_0x55f879=_0x3a840e[_0x2a85cb(0x15a)](_0xa7d43d=>!_0x18e524[_0x2a85cb(0x139)](_0xa7d43d));if(_0x55f879[_0x2a85cb(0x15d)]>0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x158)+_0x55f879[_0x2a85cb(0x12c)](',\x20')+'.',_0x2a85cb(0x143));for(const _0x388315 of _0x3a840e){_0x31d170[_0x2a85cb(0x141)](_0x388315,_0x18e524['get'](_0x388315));}for(const _0x35325b of _0x1b1934){const _0x28965d=_0x1b9fea['filter'](_0x3ec924=>_0x3ec924['path']===_0x35325b);if(_0x28965d[_0x2a85cb(0x15d)]===0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x154)+JSON[_0x2a85cb(0x16b)](_0x35325b)+'.',_0x2a85cb(0x110));if(_0x28965d[_0x2a85cb(0x15d)]>0x1)throw menuError(_0x2a85cb(0x17c),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x35325b)+'.',_0x2a85cb(0x151)+_0x28965d[_0x2a85cb(0x117)](_0x9624e7=>_0x9624e7['id'])['join'](',\x20')+'.');const _0x4d51f4=_0x28965d[0x0];_0x31d170[_0x2a85cb(0x141)](_0x4d51f4['id'],_0x4d51f4);}return[..._0x31d170[_0x2a85cb(0x136)]()];}function parseMenuIds(_0x57cd61){const _0x2baff2=a151_0x1434c8,_0x10eec2=parseCsv(_0x57cd61),_0x32a2f2=_0x10eec2['map'](Number);if(_0x32a2f2[_0x2baff2(0x11c)](_0x18284a=>!Number['isSafeInteger'](_0x18284a)||_0x18284a<=0x0))throw CliErrors[_0x2baff2(0x10b)](_0x2baff2(0x171));return[...new Set(_0x32a2f2)];}function parseCsv(_0x1f41ff){const _0x217ef5=a151_0x1434c8;return[...new Set(_0x1f41ff['split'](',')[_0x217ef5(0x117)](_0x29f064=>_0x29f064[_0x217ef5(0x140)]())[_0x217ef5(0x15a)](Boolean))];}function a151_0x2188(){const _0x3e9faf=['path','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','/smartapi/menu/update','warnings','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_verification_failed','values','cookie','hash','has','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','POST','resources','Response\x20was\x20lost\x20for\x20menu\x20','rawFlags','targets','trim','set','pageId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','paths','menu_selector_not_found','\x20must\x20be\x20true\x20or\x20false.','false','code','3450676FBlbdj','update-menu-visibility','verification','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Response\x20was\x20lost\x20and\x20menu\x20','body','5054448arRYbQ','visible','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','sort','Requested\x20menu\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','3623871qeTDPo','push','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','byId','filter','expected-count','failed','length','\x20menu(s);\x20skipped\x20','5CwohXU','message','beforeById','resourcesValid','menu-ids','\x20unchanged\x20menu(s).','childrenIds','depth','num','isArray','expectedCount','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','stringify','boolean','url','number','datasetCode','flagMissing','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','98ywDtcP','\x20failed.','type','update-recovery','5742834VJxgmJ','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','plannedActions','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','5270eWinCk','Final\x20menu\x20visibility\x20readback\x20failed.','menu_selector_ambiguous','menu','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','menu\x20list','menus','15633nWVFbI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','validation','isSafeInteger','childrenCount','before','40808tULFIv','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','label','update','1526958WxJQeN','plan','\x20visibility\x20update\x20could\x20not\x20be\x20verified','datasetId','map','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20menu(s);\x20skip\x20','Menu\x20','some','visibility-update','\x20skipped,\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','expectVisible','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','update\x20menu\x20visibility','get','modelType','menuIds','menu_state_drift','rabetbase\x20menu\x20list\x20--format\x20compress','\x20menu(s),\x20expected\x20','pageType','string','high-risk-write','join','str','Updated\x20visibility\x20for\x20'];a151_0x2188=function(){return _0x3e9faf;};return a151_0x2188();}function parseBooleanFlag(_0x3558cc,_0x2976af,_0x584331){const _0x1b5c9d=a151_0x1434c8;if(!hasFlag(_0x3558cc,_0x2976af)){if(_0x584331)throw CliErrors[_0x1b5c9d(0x170)](_0x2976af);return undefined;}const _0x2c257a=_0x3558cc[_0x1b5c9d(0x13e)][_0x2976af];if(_0x2c257a===!![]||_0x2c257a===![])return _0x2c257a;if(_0x2c257a==='true')return!![];if(_0x2c257a===_0x1b5c9d(0x147))return![];throw CliErrors[_0x1b5c9d(0x10b)]('--'+_0x2976af+_0x1b5c9d(0x146));}function verifyVisibilityUpdate(_0x345c87,_0x4e763e,_0x1c90f4){const _0x1a8d73=a151_0x1434c8;assertVerified(!!_0x4e763e,_0x1a8d73(0x11b)+_0x345c87['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x4e763e[_0x1a8d73(0x150)]===_0x1c90f4,_0x1a8d73(0x11b)+_0x345c87['id']+_0x1a8d73(0x121));const _0x4d51da=[['id',_0x4e763e['id'],_0x345c87['id']],['parentId',_0x4e763e['parentId'],_0x345c87['parentId']],[_0x1a8d73(0x166),_0x4e763e['depth'],_0x345c87['depth']],['label',_0x4e763e['label'],_0x345c87['label']],[_0x1a8d73(0x12f),_0x4e763e[_0x1a8d73(0x12f)],_0x345c87[_0x1a8d73(0x12f)]],[_0x1a8d73(0x16d),_0x4e763e['url'],_0x345c87[_0x1a8d73(0x16d)]],[_0x1a8d73(0x174),_0x4e763e[_0x1a8d73(0x174)],_0x345c87[_0x1a8d73(0x174)]],['sort',_0x4e763e['sort'],_0x345c87[_0x1a8d73(0x152)]],['resources',_0x4e763e[_0x1a8d73(0x13c)],_0x345c87[_0x1a8d73(0x13c)]],[_0x1a8d73(0x162),_0x4e763e[_0x1a8d73(0x162)],_0x345c87[_0x1a8d73(0x162)]],['childrenIds',_0x4e763e[_0x1a8d73(0x165)],_0x345c87[_0x1a8d73(0x165)]],[_0x1a8d73(0x10d),_0x4e763e['childrenCount'],_0x345c87[_0x1a8d73(0x10d)]],[_0x1a8d73(0x142),_0x4e763e[_0x1a8d73(0x142)],_0x345c87['pageId']],[_0x1a8d73(0x129),_0x4e763e[_0x1a8d73(0x129)],_0x345c87[_0x1a8d73(0x129)]],[_0x1a8d73(0x124),_0x4e763e[_0x1a8d73(0x124)],_0x345c87[_0x1a8d73(0x124)]],[_0x1a8d73(0x116),_0x4e763e[_0x1a8d73(0x116)],_0x345c87['datasetId']],[_0x1a8d73(0x16f),_0x4e763e[_0x1a8d73(0x16f)],_0x345c87[_0x1a8d73(0x16f)]]];for(const [_0x427080,_0x5e328b,_0x1520e3]of _0x4d51da){assertVerified(sameValue(_0x5e328b,_0x1520e3),_0x1a8d73(0x11b)+_0x345c87['id']+'\x20'+_0x427080+'\x20changed\x20unexpectedly.');}}function sameValue(_0x324994,_0x379a67){const _0x1319c7=a151_0x1434c8;if(Array[_0x1319c7(0x168)](_0x324994)||Array[_0x1319c7(0x168)](_0x379a67))return JSON[_0x1319c7(0x16b)](_0x324994)===JSON[_0x1319c7(0x16b)](_0x379a67);return _0x324994===_0x379a67;}
|
|
1
|
+
const a165_0x214bdc=a165_0x391d;(function(_0x5f342b,_0x391228){const _0x5d8840=a165_0x391d,_0x2e67c1=_0x5f342b();while(!![]){try{const _0x2d74d9=-parseInt(_0x5d8840(0x149))/0x1+-parseInt(_0x5d8840(0x172))/0x2+-parseInt(_0x5d8840(0x158))/0x3*(-parseInt(_0x5d8840(0x15a))/0x4)+parseInt(_0x5d8840(0x17a))/0x5+-parseInt(_0x5d8840(0x165))/0x6*(parseInt(_0x5d8840(0x140))/0x7)+parseInt(_0x5d8840(0x147))/0x8*(parseInt(_0x5d8840(0x1a2))/0x9)+parseInt(_0x5d8840(0x183))/0xa*(parseInt(_0x5d8840(0x190))/0xb);if(_0x2d74d9===_0x391228)break;else _0x2e67c1['push'](_0x2e67c1['shift']());}catch(_0xcf3c5e){_0x2e67c1['push'](_0x2e67c1['shift']());}}}(a165_0x5b50,0xa22f3));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a165_0x5b50(){const _0x160c67=['boolean','isArray','expectedCount','Response\x20was\x20lost\x20and\x20menu\x20','Requested\x20menu\x20visibility','visible','childrenCount','pageType','update-menu-visibility','7252021JqpPwk','filter','values','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','\x20menu(s);\x20skip\x20','map','Updated\x20visibility\x20for\x20','75176uaffEQ','type','1064067ZLbIIm','message','plannedActions','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','code','cookie','str','menu_expected_count_mismatch','menu_selector_not_found','targets','\x20must\x20be\x20true\x20or\x20false.','\x20skipped,\x20','depth','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','35757uuUdJj','true','412tMbJVB','string','beforeById','verification','expect-visible','pageId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','isSafeInteger','number','6cNgqaK','url','body','set','plan','validation','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','\x20changed\x20unexpectedly.','expected-count','has','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','resourcesValid','2391798Fejeqm','menus','num','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','rabetbase\x20menu\x20list\x20--format\x20compress','before','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','visibility-update','4365010YSJZVX','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','failed','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20','resources','Menu\x20visibility\x20update\x20completed:\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Final\x20menu\x20visibility\x20readback\x20failed.','20ywjRBv','split','byId','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Would\x20update\x20visibility\x20for\x20','menuIds','false','menu_permission_denied','stringify','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','9452641UeSouE','get','\x20failed.','updated','update\x20visibility\x20for','verify\x20menu\x20visibility\x20update','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','menu','datasetCode','rawFlags','update-recovery','\x20unchanged\x20menu(s).','datasetId','trim','requestedVisible','warnings','menu_verification_failed','135URvOds','childrenIds','menu\x20list','recovered','sort','length','update\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','push','label','\x20menu(s),\x20expected\x20','paths','parentId','menu-ids','join','some','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','POST','path','/smartapi/menu/update','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.'];a165_0x5b50=function(){return _0x160c67;};return a165_0x5b50();}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a165_0x214bdc(0x1b6)}];export const menuVisibilityUpdate={'service':a165_0x214bdc(0x198),'command':'visibility-update','description':a165_0x214bdc(0x188),'risk':'high-risk-write','structuredErrors':!![],'flags':[{'name':a165_0x214bdc(0x1af),'type':a165_0x214bdc(0x15b),'description':a165_0x214bdc(0x17b)},{'name':a165_0x214bdc(0x1ad),'type':'string','description':a165_0x214bdc(0x161)},{'name':a165_0x214bdc(0x13c),'type':a165_0x214bdc(0x1b8),'required':!![],'description':a165_0x214bdc(0x13b)},{'name':a165_0x214bdc(0x15e),'type':a165_0x214bdc(0x1b8),'description':a165_0x214bdc(0x1b2)},{'name':a165_0x214bdc(0x16d),'type':a165_0x214bdc(0x164),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b5cbf){parseInput(_0x2b5cbf),requireExplicitYes(_0x2b5cbf);},async 'dryRun'(_0xcb5772){const _0x370143=a165_0x214bdc,_0x24fd3b=await buildPlan(_0xcb5772,!![]),_0x2955cc=_0x24fd3b['plan'][_0x370143(0x14b)]?.['length']??0x0,_0x4979e7=_0x24fd3b[_0x370143(0x169)][_0x370143(0x152)]['length']-_0x2955cc;return menuDryRunResult(_0x24fd3b[_0x370143(0x169)],{'method':_0x370143(0x1b4),'url':'/smartapi/menu/update','body':{'updates':_0x24fd3b['plan'][_0x370143(0x14b)]?.[_0x370143(0x145)](_0x1c8a25=>_0x1c8a25[_0x370143(0x167)])??[]},'description':_0x370143(0x18a)+_0x2955cc+_0x370143(0x144)+_0x4979e7+_0x370143(0x19c)});},async 'execute'(_0x4a9f49){const _0x5e2d4c=a165_0x214bdc;requireExplicitYes(_0x4a9f49);const _0x3a60e8=await buildPlan(_0x4a9f49,![]);await recheckMutationSnapshot(_0x4a9f49,_0x3a60e8['plan'],_0x5e2d4c(0x1a8));const _0x3b3c71=[],_0x249c4f=[],_0x178945=[];for(const _0xbf38bf of _0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x152)]){if(_0xbf38bf[_0x5e2d4c(0x177)][_0x5e2d4c(0x13c)]===_0x3a60e8['plan'][_0x5e2d4c(0x19f)]){_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0xbf38bf['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4a9f49['appCode'],_0x4a9f49['cookie'],{'id':_0xbf38bf['id'],'visible':_0x3a60e8[_0x5e2d4c(0x169)]['requestedVisible']}),_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0xbf38bf['id'],'updated':!![],'skipped':![]});}catch(_0x10e610){const _0x47e92f=mapMenuApiError(_0x10e610,_0x5e2d4c(0x194),_0xbf38bf['id']);if(isMenuResponseLoss(_0x10e610)&&_0x47e92f[_0x5e2d4c(0x14d)]!==_0x5e2d4c(0x18d)){_0x178945['push'](_0xbf38bf['id']);continue;}_0x249c4f['push']({'id':_0xbf38bf['id'],'stage':'update','code':_0x47e92f['code'],'message':_0x47e92f[_0x5e2d4c(0x14a)]});}}let _0x3aa3c0;try{_0x3aa3c0=await fetchMenuSnapshot(_0x4a9f49['appCode'],_0x4a9f49[_0x5e2d4c(0x14e)]);}catch(_0x2c17ad){const _0x4a2280=describeMenuErrorCause(_0x2c17ad,_0x5e2d4c(0x195)),_0x312335=_0x178945[_0x5e2d4c(0x145)](_0x2101c7=>({'id':_0x2101c7,'stage':_0x5e2d4c(0x19b),'code':_0x5e2d4c(0x1a1),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x2101c7+_0x5e2d4c(0x16f),'requestedStateConfirmed':![],'recovered':![]})),_0x44af5f={'stage':_0x5e2d4c(0x15d),'code':_0x5e2d4c(0x1a1),'message':_0x5e2d4c(0x182),'targetIds':_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x152)][_0x5e2d4c(0x145)](_0x335170=>_0x335170['id']),'requestedStateConfirmed':![],..._0x4a2280};throw menuFailure(asVerificationError(_0x2c17ad,_0x5e2d4c(0x178)),_0x3a60e8['plan'],{'stage':_0x5e2d4c(0x15d),'succeeded':_0x3b3c71,'failedRecords':[..._0x249c4f,..._0x312335,_0x44af5f],'warnings':[_0x5e2d4c(0x17d)],'verification':{'status':_0x5e2d4c(0x17c),'recoveredCount':0x0,'lookupCommand':_0x5e2d4c(0x176)}});}const _0x2d11a4=[];for(const _0x4614cf of _0x3b3c71){const _0x224ae6=Number(_0x4614cf['id']),_0x46991e=_0x3a60e8[_0x5e2d4c(0x15c)][_0x5e2d4c(0x191)](_0x224ae6),_0x10084c=_0x3aa3c0[_0x5e2d4c(0x185)][_0x5e2d4c(0x191)](_0x224ae6);try{verifyVisibilityUpdate(_0x46991e,_0x10084c,_0x3a60e8['plan'][_0x5e2d4c(0x19f)]);}catch(_0x3d932a){const _0x1ea0a1=asVerificationError(_0x3d932a,_0x5e2d4c(0x17e)+_0x224ae6+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x2d11a4['push']({'id':_0x224ae6,'stage':_0x5e2d4c(0x15d),'code':_0x1ea0a1[_0x5e2d4c(0x14d)],'message':_0x1ea0a1[_0x5e2d4c(0x14a)],'requestedStateConfirmed':![]});}}for(const _0x43bbc2 of _0x178945){const _0x292de1=_0x3a60e8[_0x5e2d4c(0x15c)][_0x5e2d4c(0x191)](_0x43bbc2),_0x3f3612=_0x3aa3c0[_0x5e2d4c(0x185)][_0x5e2d4c(0x191)](_0x43bbc2);try{verifyVisibilityUpdate(_0x292de1,_0x3f3612,_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x19f)]),_0x3b3c71[_0x5e2d4c(0x1aa)]({'id':_0x43bbc2,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x24ec21){const _0x560f2b=asVerificationError(_0x24ec21,_0x5e2d4c(0x13a)+_0x43bbc2+_0x5e2d4c(0x175));_0x2d11a4['push']({'id':_0x43bbc2,'stage':_0x5e2d4c(0x19b),'code':_0x560f2b['code'],'message':_0x560f2b[_0x5e2d4c(0x14a)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2d11a4[_0x5e2d4c(0x1a7)]>0x0){const _0x941677=_0x2d11a4[_0x5e2d4c(0x145)](_0x4bd8b7=>Number(_0x4bd8b7['id'])),_0x506bf1=_0x3b3c71['filter'](_0x5d50a8=>_0x5d50a8[_0x5e2d4c(0x1a5)]===!![])['length'],_0x5a1176=menuError(_0x5e2d4c(0x1a1),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x941677[_0x5e2d4c(0x1b0)](',\x20')+'.',_0x5e2d4c(0x1a9));throw menuFailure(_0x5a1176,_0x3a60e8[_0x5e2d4c(0x169)],{'stage':_0x5e2d4c(0x15d),'succeeded':_0x3b3c71,'failedRecords':[..._0x249c4f,..._0x2d11a4],'warnings':[_0x5e2d4c(0x18f)],'verification':{'status':_0x5e2d4c(0x17c),..._0x941677[_0x5e2d4c(0x1a7)]===0x1?{'targetId':_0x941677[0x0]}:{'targetIds':_0x941677},'recoveredCount':_0x506bf1,'lookupCommand':_0x5e2d4c(0x176)}});}const _0x3e7831=_0x3b3c71['filter'](_0xbcc99b=>_0xbcc99b[_0x5e2d4c(0x193)]===!![])['length'],_0x9dc8ed=_0x3b3c71[_0x5e2d4c(0x1a7)]-_0x3e7831,_0x1a280a={..._0x3a60e8[_0x5e2d4c(0x169)],'succeeded':_0x3b3c71,'failed':_0x249c4f,'warnings':_0x249c4f[_0x5e2d4c(0x1a7)]>0x0?[..._0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x1a0)],_0x5e2d4c(0x160)]:_0x3a60e8[_0x5e2d4c(0x169)][_0x5e2d4c(0x1a0)],'verification':{'checkedBy':_0x5e2d4c(0x1a4),'snapshotHash':_0x3aa3c0['hash'],'matchesRequestedState':_0x249c4f['length']===0x0,'recoveredCount':_0x178945[_0x5e2d4c(0x1a7)]}};return{'ok':_0x249c4f[_0x5e2d4c(0x1a7)]===0x0,'data':_0x1a280a,'message':_0x249c4f['length']===0x0?_0x5e2d4c(0x146)+_0x3e7831+'\x20menu(s);\x20skipped\x20'+_0x9dc8ed+_0x5e2d4c(0x19c):_0x5e2d4c(0x180)+_0x3e7831+'\x20updated,\x20'+_0x9dc8ed+_0x5e2d4c(0x154)+_0x249c4f[_0x5e2d4c(0x1a7)]+_0x5e2d4c(0x192)};}};function a165_0x391d(_0x1a72b7,_0x51e621){_0x1a72b7=_0x1a72b7-0x13a;const _0x5b507d=a165_0x5b50();let _0x391d0a=_0x5b507d[_0x1a72b7];return _0x391d0a;}function parseInput(_0x287d36){const _0x3b2173=a165_0x214bdc,_0x112566=parseMenuIds(_0x287d36['str'](_0x3b2173(0x1af))),_0x1f6c99=parseCsv(_0x287d36[_0x3b2173(0x14f)](_0x3b2173(0x1ad)));if(_0x112566[_0x3b2173(0x1a7)]===0x0&&_0x1f6c99[_0x3b2173(0x1a7)]===0x0)throw CliErrors[_0x3b2173(0x16a)](_0x3b2173(0x14c));const _0x1ea64b=parseBooleanFlag(_0x287d36,_0x3b2173(0x13c),!![]),_0x17d1cf=parseBooleanFlag(_0x287d36,_0x3b2173(0x15e),![]);let _0x2da380;if(hasFlag(_0x287d36,_0x3b2173(0x16d))){_0x2da380=_0x287d36[_0x3b2173(0x174)](_0x3b2173(0x16d));if(!Number[_0x3b2173(0x163)](_0x2da380)||_0x2da380<0x0)throw CliErrors[_0x3b2173(0x16a)](_0x3b2173(0x143));}return{'menuIds':_0x112566,'paths':_0x1f6c99,'visible':_0x1ea64b,'expectVisible':_0x17d1cf,'expectedCount':_0x2da380};}async function buildPlan(_0x3ff92d,_0x4c39a6){const _0x10dfc5=a165_0x214bdc,_0x4682dd=parseInput(_0x3ff92d),_0x178f03=await fetchMutationSnapshot(_0x3ff92d,_0x10dfc5(0x1a8)),_0x271d20=selectTargets(_0x178f03[_0x10dfc5(0x173)],_0x4682dd[_0x10dfc5(0x18b)],_0x4682dd[_0x10dfc5(0x1ad)]);if(_0x4682dd[_0x10dfc5(0x1ba)]!==undefined&&_0x271d20[_0x10dfc5(0x1a7)]!==_0x4682dd[_0x10dfc5(0x1ba)])throw menuError(_0x10dfc5(0x150),'Selected\x20'+_0x271d20['length']+_0x10dfc5(0x1ac)+_0x4682dd[_0x10dfc5(0x1ba)]+'.',_0x10dfc5(0x1b7));if(_0x4682dd['expectVisible']!==undefined){const _0x10e693=_0x271d20[_0x10dfc5(0x141)](_0xe5e6cd=>_0xe5e6cd[_0x10dfc5(0x13c)]!==_0x4682dd[_0x10dfc5(0x157)]);if(_0x10e693[_0x10dfc5(0x1a7)]>0x0)throw menuError('menu_state_drift',_0x10dfc5(0x187)+_0x10e693['map'](_0x22d266=>_0x22d266['id'])[_0x10dfc5(0x1b0)](',\x20')+'.',_0x10dfc5(0x197));}const _0x2f0fcd=_0x271d20[_0x10dfc5(0x145)](_0x29346c=>({'id':_0x29346c['id'],'label':_0x29346c['label'],'path':_0x29346c[_0x10dfc5(0x1b5)],'before':{'visible':_0x29346c[_0x10dfc5(0x13c)]},'after':{'visible':_0x4682dd[_0x10dfc5(0x13c)]}})),_0x311cf1=_0x2f0fcd[_0x10dfc5(0x141)](_0x2cbcf5=>_0x2cbcf5['before'][_0x10dfc5(0x13c)]!==_0x4682dd[_0x10dfc5(0x13c)])[_0x10dfc5(0x145)](_0x449ae9=>({'stage':_0x10dfc5(0x13f),'method':_0x10dfc5(0x1b4),'path':_0x10dfc5(0x1b6),'body':{'appCode':_0x3ff92d[_0x10dfc5(0x196)],'id':_0x449ae9['id'],'visible':_0x4682dd[_0x10dfc5(0x13c)]}})),_0x49ccc6=mutationResult({'operation':_0x10dfc5(0x179),'selector':{'menuIds':_0x4682dd[_0x10dfc5(0x18b)],'paths':_0x4682dd[_0x10dfc5(0x1ad)]},'before':{'menus':_0x271d20['map'](_0x28228e=>({'id':_0x28228e['id'],'path':_0x28228e[_0x10dfc5(0x1b5)],'visible':_0x28228e['visible']}))},'after':{'menus':_0x271d20[_0x10dfc5(0x145)](_0x2bbec6=>({'id':_0x2bbec6['id'],'path':_0x2bbec6[_0x10dfc5(0x1b5)],'visible':_0x4682dd[_0x10dfc5(0x13c)]}))},'dryRun':_0x4c39a6,'backend':[...BACKEND],'plannedActions':_0x311cf1,'snapshotHash':_0x178f03['hash'],'warnings':_0x311cf1['length']===0x0?[_0x10dfc5(0x189)]:[]});return{'plan':{..._0x49ccc6,'requestedVisible':_0x4682dd[_0x10dfc5(0x13c)],'targets':_0x2f0fcd},'beforeById':new Map(_0x271d20[_0x10dfc5(0x145)](_0x2c2dd9=>[_0x2c2dd9['id'],_0x2c2dd9]))};}function selectTargets(_0x4772a0,_0xfee997,_0x2ea841){const _0x2761dc=a165_0x214bdc,_0x1a8c9a=new Map(_0x4772a0[_0x2761dc(0x145)](_0x3e2820=>[_0x3e2820['id'],_0x3e2820])),_0x1ac121=new Map(),_0xf14c21=_0xfee997[_0x2761dc(0x141)](_0x6e5e4c=>!_0x1a8c9a[_0x2761dc(0x16e)](_0x6e5e4c));if(_0xf14c21[_0x2761dc(0x1a7)]>0x0)throw menuError(_0x2761dc(0x151),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0xf14c21[_0x2761dc(0x1b0)](',\x20')+'.',_0x2761dc(0x16b));for(const _0x9bb53e of _0xfee997){_0x1ac121['set'](_0x9bb53e,_0x1a8c9a['get'](_0x9bb53e));}for(const _0x4799bf of _0x2ea841){const _0x410ba5=_0x4772a0[_0x2761dc(0x141)](_0x5ca35a=>_0x5ca35a[_0x2761dc(0x1b5)]===_0x4799bf);if(_0x410ba5[_0x2761dc(0x1a7)]===0x0)throw menuError(_0x2761dc(0x151),_0x2761dc(0x181)+JSON[_0x2761dc(0x18e)](_0x4799bf)+'.',_0x2761dc(0x162));if(_0x410ba5['length']>0x1)throw menuError('menu_selector_ambiguous',_0x2761dc(0x156)+JSON['stringify'](_0x4799bf)+'.',_0x2761dc(0x1b3)+_0x410ba5[_0x2761dc(0x145)](_0xec8661=>_0xec8661['id'])[_0x2761dc(0x1b0)](',\x20')+'.');const _0x43a2aa=_0x410ba5[0x0];_0x1ac121[_0x2761dc(0x168)](_0x43a2aa['id'],_0x43a2aa);}return[..._0x1ac121[_0x2761dc(0x142)]()];}function parseMenuIds(_0x78b1fa){const _0x367d50=a165_0x214bdc,_0x45d717=parseCsv(_0x78b1fa),_0x502084=_0x45d717[_0x367d50(0x145)](Number);if(_0x502084[_0x367d50(0x1b1)](_0x22a5c4=>!Number[_0x367d50(0x163)](_0x22a5c4)||_0x22a5c4<=0x0))throw CliErrors[_0x367d50(0x16a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x502084)];}function parseCsv(_0x2a7ba2){const _0x4ab817=a165_0x214bdc;return[...new Set(_0x2a7ba2[_0x4ab817(0x184)](',')['map'](_0x4d8325=>_0x4d8325[_0x4ab817(0x19e)]())[_0x4ab817(0x141)](Boolean))];}function parseBooleanFlag(_0x260d58,_0x32ec14,_0x310dbc){const _0x2714c2=a165_0x214bdc;if(!hasFlag(_0x260d58,_0x32ec14)){if(_0x310dbc)throw CliErrors['flagMissing'](_0x32ec14);return undefined;}const _0x27b135=_0x260d58[_0x2714c2(0x19a)][_0x32ec14];if(_0x27b135===!![]||_0x27b135===![])return _0x27b135;if(_0x27b135===_0x2714c2(0x159))return!![];if(_0x27b135===_0x2714c2(0x18c))return![];throw CliErrors[_0x2714c2(0x16a)]('--'+_0x32ec14+_0x2714c2(0x153));}function verifyVisibilityUpdate(_0x53297f,_0x3b7924,_0x1aa950){const _0x48ac54=a165_0x214bdc;assertVerified(!!_0x3b7924,'Menu\x20'+_0x53297f['id']+_0x48ac54(0x170)),assertVerified(_0x3b7924[_0x48ac54(0x13c)]===_0x1aa950,_0x48ac54(0x17e)+_0x53297f['id']+_0x48ac54(0x186));const _0x5575df=[['id',_0x3b7924['id'],_0x53297f['id']],[_0x48ac54(0x1ae),_0x3b7924[_0x48ac54(0x1ae)],_0x53297f[_0x48ac54(0x1ae)]],[_0x48ac54(0x155),_0x3b7924[_0x48ac54(0x155)],_0x53297f[_0x48ac54(0x155)]],[_0x48ac54(0x1ab),_0x3b7924[_0x48ac54(0x1ab)],_0x53297f[_0x48ac54(0x1ab)]],[_0x48ac54(0x1b5),_0x3b7924[_0x48ac54(0x1b5)],_0x53297f[_0x48ac54(0x1b5)]],[_0x48ac54(0x166),_0x3b7924['url'],_0x53297f[_0x48ac54(0x166)]],[_0x48ac54(0x148),_0x3b7924[_0x48ac54(0x148)],_0x53297f[_0x48ac54(0x148)]],[_0x48ac54(0x1a6),_0x3b7924[_0x48ac54(0x1a6)],_0x53297f[_0x48ac54(0x1a6)]],[_0x48ac54(0x17f),_0x3b7924[_0x48ac54(0x17f)],_0x53297f['resources']],[_0x48ac54(0x171),_0x3b7924[_0x48ac54(0x171)],_0x53297f['resourcesValid']],[_0x48ac54(0x1a3),_0x3b7924[_0x48ac54(0x1a3)],_0x53297f[_0x48ac54(0x1a3)]],[_0x48ac54(0x13d),_0x3b7924[_0x48ac54(0x13d)],_0x53297f['childrenCount']],['pageId',_0x3b7924[_0x48ac54(0x15f)],_0x53297f['pageId']],['pageType',_0x3b7924['pageType'],_0x53297f[_0x48ac54(0x13e)]],['modelType',_0x3b7924['modelType'],_0x53297f['modelType']],[_0x48ac54(0x19d),_0x3b7924[_0x48ac54(0x19d)],_0x53297f[_0x48ac54(0x19d)]],[_0x48ac54(0x199),_0x3b7924[_0x48ac54(0x199)],_0x53297f[_0x48ac54(0x199)]]];for(const [_0x10b6bc,_0x4a1802,_0x58b3a4]of _0x5575df){assertVerified(sameValue(_0x4a1802,_0x58b3a4),_0x48ac54(0x17e)+_0x53297f['id']+'\x20'+_0x10b6bc+_0x48ac54(0x16c));}}function sameValue(_0x4f5b9b,_0x2aae98){const _0x167017=a165_0x214bdc;if(Array[_0x167017(0x1b9)](_0x4f5b9b)||Array[_0x167017(0x1b9)](_0x2aae98))return JSON['stringify'](_0x4f5b9b)===JSON[_0x167017(0x18e)](_0x2aae98);return _0x4f5b9b===_0x2aae98;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x4da6e2=a166_0x41dc;(function(_0x3b95f8,_0x40ac15){const _0x459c11=a166_0x41dc,_0x56b566=_0x3b95f8();while(!![]){try{const _0x1ca5c9=parseInt(_0x459c11(0xd4))/0x1+parseInt(_0x459c11(0xc0))/0x2*(-parseInt(_0x459c11(0xdd))/0x3)+-parseInt(_0x459c11(0xc7))/0x4+-parseInt(_0x459c11(0xce))/0x5*(parseInt(_0x459c11(0xc9))/0x6)+parseInt(_0x459c11(0xcd))/0x7+parseInt(_0x459c11(0xd6))/0x8*(parseInt(_0x459c11(0xda))/0x9)+parseInt(_0x459c11(0xdf))/0xa*(parseInt(_0x459c11(0xd5))/0xb);if(_0x1ca5c9===_0x40ac15)break;else _0x56b566['push'](_0x56b566['shift']());}catch(_0x4556d0){_0x56b566['push'](_0x56b566['shift']());}}}(a166_0x46bc,0xf161a));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';function a166_0x41dc(_0x538d8d,_0xf50e5d){_0x538d8d=_0x538d8d-0xbd;const _0x46bcc0=a166_0x46bc();let _0x41dc43=_0x46bcc0[_0x538d8d];return _0x41dc43;}function a166_0x46bc(){const _0x35ed2d=['14385qPWbZM','document','Inspect\x20with\x20','write','notification_config_create_outcome_unknown','configName','349797hJjnyS','11445731dGUvcI','973864YQOWtk','planned',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','63VCVDHu','configCode','connectTimeout','325494uLlYYa','notification','30xVZTTN','channelConfig',';\x20do\x20not\x20resubmit\x20automatically.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','mutation','22sOQqxb','description','appCode','POST','create','channelType','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','6565532FLsyVM','endpointUrl','2022cEMoSz','readTimeout','verification','/notification/channel-config/create','3287319fypoeD'];a166_0x46bc=function(){return _0x35ed2d;};return a166_0x46bc();}const CREATE_PATH=a166_0x4da6e2(0xcc);async function prepareCreate(_0x37d5f6){const _0x286dde=a166_0x4da6e2,_0x3b70c4=await readNotificationDocument(_0x37d5f6,_0x286dde(0xc4)),_0x24211a=createMutationInput(_0x37d5f6['appCode'],_0x3b70c4);return{'document':_0x3b70c4,'input':_0x24211a,'planned':projectNotificationConfig({'appCode':_0x37d5f6[_0x286dde(0xc2)],'configName':_0x3b70c4['configName'],'channelType':_0x3b70c4['channelType'],'endpointUrl':_0x3b70c4[_0x286dde(0xc8)],'channelConfig':_0x3b70c4[_0x286dde(0xe0)],'description':_0x3b70c4[_0x286dde(0xc1)],'connectTimeout':_0x3b70c4[_0x286dde(0xdc)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x3b70c4[_0x286dde(0xca)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a166_0x4da6e2(0xde),'command':'config-create','description':a166_0x4da6e2(0xbe),'risk':a166_0x4da6e2(0xd1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4c04fd){assertSingleNotificationSource(_0x4c04fd);},async 'dryRun'(_0x35957e){const _0x3742e8=a166_0x4da6e2,_0x2b47c1=await prepareCreate(_0x35957e),_0x224e4c=notificationLookupCommand(_0x35957e[_0x3742e8(0xc2)],_0x2b47c1['document'][_0x3742e8(0xc5)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x35957e[_0x3742e8(0xc2)],'configName':_0x2b47c1['document']['configName'],'channelType':_0x2b47c1[_0x3742e8(0xcf)][_0x3742e8(0xc5)]},'before':null,'after':_0x2b47c1[_0x3742e8(0xd7)],'dryRun':!![],'backend':{'method':_0x3742e8(0xc3),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3742e8(0xd7),'lookupCommand':_0x224e4c}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x353762){const _0x282db9=a166_0x4da6e2,_0x576276=await prepareCreate(_0x353762),_0x22ce9c=notificationLookupCommand(_0x353762[_0x282db9(0xc2)],_0x576276[_0x282db9(0xcf)]['channelType']);let _0x2910b2;try{_0x2910b2=await createNotificationChannelConfig(_0x576276['input']);}catch(_0x218ae5){if(isPlatformTransportFailure(_0x218ae5))throw notificationError(_0x282db9(0xd2),_0x282db9(0xd9),'Inspect\x20with\x20'+_0x22ce9c+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x282db9(0xc4),_0x282db9(0xbf),_0x282db9(0xd0)+_0x22ce9c+_0x282db9(0xd8));}if(!Number['isSafeInteger'](_0x2910b2)||_0x2910b2<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x282db9(0xc6),'Inspect\x20with\x20'+_0x22ce9c+';\x20do\x20not\x20resubmit.');let _0x30d7e8;try{const _0x1edb17=await getNotificationChannelConfig(_0x2910b2,_0x353762[_0x282db9(0xc2)]);_0x30d7e8=normalizeExactNotificationConfig(_0x1edb17,_0x2910b2,_0x353762['appCode']);}catch{throw safeApiFailure(_0x282db9(0xc4),_0x282db9(0xcb),_0x282db9(0xd0)+_0x22ce9c+_0x282db9(0xbd));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x30d7e8[_0x282db9(0xc2)],'id':_0x30d7e8['id'],'configCode':_0x30d7e8[_0x282db9(0xdb)],'configName':_0x30d7e8[_0x282db9(0xd3)],'channelType':_0x30d7e8[_0x282db9(0xc5)]},'before':null,'after':projectNotificationConfig(_0x30d7e8),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x22ce9c}},'message':'Created\x20notification\x20config\x20'+_0x30d7e8['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x1eeb6f=a167_0x5c59;function a167_0x5c59(_0x55102e,_0x6831d0){_0x55102e=_0x55102e-0x19f;const _0xd590dc=a167_0xd590();let _0x5c59c6=_0xd590dc[_0x55102e];return _0x5c59c6;}(function(_0x25bfa4,_0x75770){const _0xb9c601=a167_0x5c59,_0x123c73=_0x25bfa4();while(!![]){try{const _0x4f2b0b=-parseInt(_0xb9c601(0x1be))/0x1*(-parseInt(_0xb9c601(0x1ba))/0x2)+parseInt(_0xb9c601(0x1b1))/0x3*(parseInt(_0xb9c601(0x1a9))/0x4)+-parseInt(_0xb9c601(0x1a7))/0x5*(parseInt(_0xb9c601(0x1bf))/0x6)+-parseInt(_0xb9c601(0x1b4))/0x7*(-parseInt(_0xb9c601(0x19f))/0x8)+-parseInt(_0xb9c601(0x1ad))/0x9*(-parseInt(_0xb9c601(0x1ae))/0xa)+parseInt(_0xb9c601(0x1b7))/0xb*(-parseInt(_0xb9c601(0x1bb))/0xc)+-parseInt(_0xb9c601(0x1af))/0xd*(-parseInt(_0xb9c601(0x1a8))/0xe);if(_0x4f2b0b===_0x75770)break;else _0x123c73['push'](_0x123c73['shift']());}catch(_0x54d405){_0x123c73['push'](_0x123c73['shift']());}}}(a167_0xd590,0x76bf6));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a167_0x1eeb6f(0x1bc),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';function a167_0xd590(){const _0x11a4f0=['verified','42183JryDoL','150tQJLpu','799812MmUjPb','Inspect\x20with\x20','31446weNLYC','planned','before','7AqBjKG','unshift','mutation','4598dSvoNM','Deleted\x20notification\x20config\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','34ulsvjv','22332OQszrO','/notification/channel-config/delete','notification_config_delete_verification_failed','478pOuvam','402XMZxJj','\x20delete\x20could\x20not\x20be\x20verified.','notification','POST','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','6282704MhoSkh','delete','high-risk-write','appCode',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','Notification\x20config\x20','notification_config_delete_outcome_unknown','31975rusnyL','98vvwySn','152sdPiTg',';\x20do\x20not\x20resubmit\x20automatically.','some'];a167_0xd590=function(){return _0x11a4f0;};return a167_0xd590();}async function prepareDelete(_0x2d8242){const _0x1e67c5=readNotificationId(_0x2d8242),_0x2a4ff5=await requireExactNotificationConfig(_0x2d8242['appCode'],_0x1e67c5,'delete');return{'id':_0x1e67c5,'before':_0x2a4ff5};}export const notificationConfigDelete={'service':a167_0x1eeb6f(0x1c1),'command':'config-delete','description':a167_0x1eeb6f(0x1b9),'risk':a167_0x1eeb6f(0x1a1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x527060){readNotificationId(_0x527060),requireNotificationExplicitYes(_0x527060);},async 'dryRun'(_0x4dca04){const _0x33d585=a167_0x1eeb6f,_0x5df4a3=await prepareDelete(_0x4dca04),_0x337b7d=notificationLookupCommand(_0x4dca04[_0x33d585(0x1a2)],_0x5df4a3[_0x33d585(0x1b3)][_0x33d585(0x1a4)]);return asDryRunResult({'operation':_0x33d585(0x1a0),'selector':notificationSelector(_0x5df4a3[_0x33d585(0x1b3)]),'before':projectNotificationConfig(_0x5df4a3[_0x33d585(0x1b3)]),'after':null,'dryRun':!![],'backend':{'method':_0x33d585(0x1c2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x33d585(0x1b2),'lookupCommand':_0x337b7d}},{'method':_0x33d585(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x272d65){const _0x50f316=a167_0x1eeb6f;requireNotificationExplicitYes(_0x272d65);const _0x3dfb26=await prepareDelete(_0x272d65),_0x2281aa=notificationLookupCommand(_0x272d65[_0x50f316(0x1a2)],_0x3dfb26[_0x50f316(0x1b3)][_0x50f316(0x1a4)]);let _0x4d4348=![];try{await deleteNotificationChannelConfig(_0x3dfb26['id'],_0x272d65[_0x50f316(0x1a2)]);}catch(_0x5395b8){if(!isPlatformTransportFailure(_0x5395b8))throw safeApiFailure(_0x50f316(0x1a0),_0x50f316(0x1b6),_0x50f316(0x1b0)+_0x2281aa+_0x50f316(0x1a3));_0x4d4348=!![];}let _0x119f79;try{_0x119f79=await listNotificationChannelConfigs(_0x272d65['appCode'],_0x3dfb26['before'][_0x50f316(0x1a4)]),validateNotificationDeleteReadback(_0x119f79,_0x272d65['appCode'],_0x3dfb26[_0x50f316(0x1b3)][_0x50f316(0x1a4)]);}catch{throw notificationError(_0x4d4348?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x3dfb26['id']+_0x50f316(0x1c0),'Inspect\x20with\x20'+_0x2281aa+_0x50f316(0x1aa));}if(_0x119f79[_0x50f316(0x1ab)](_0x2d8c25=>_0x2d8c25['id']===_0x3dfb26['id']))throw notificationError(_0x4d4348?_0x50f316(0x1a6):_0x50f316(0x1bd),_0x50f316(0x1a5)+_0x3dfb26['id']+'\x20remains\x20present\x20after\x20delete.',_0x50f316(0x1b0)+_0x2281aa+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1e1230=[REFERENCE_WARNING];return _0x4d4348&&_0x1e1230[_0x50f316(0x1b5)](_0x50f316(0x1c3)),{'ok':!![],'data':{'operation':_0x50f316(0x1a0),'selector':notificationSelector(_0x3dfb26['before']),'before':projectNotificationConfig(_0x3dfb26[_0x50f316(0x1b3)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1e1230,'verification':{'status':_0x50f316(0x1ac),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4d4348,'lookupCommand':_0x2281aa}},'message':_0x50f316(0x1b8)+_0x3dfb26['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a168_0x21c1ed=a168_0x2582;function a168_0x42aa(){const _0x5b3310=['--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','6666436lzCpUN','Notification\x20channel\x20type','1486306nKHVfE','89943QhaCyX','type','validation','\x20notification\x20config(s)','bool','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','appCode','flat','config-list','785217kwBSYQ','971448LfWmuL','map','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','all','boolean','string','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','5667284wTJRZQ','6847025RLAVXZ','str','notification','length','Found\x20'];a168_0x42aa=function(){return _0x5b3310;};return a168_0x42aa();}(function(_0x344373,_0x4b979b){const _0x5d5211=a168_0x2582,_0x4de21d=_0x344373();while(!![]){try{const _0x315272=parseInt(_0x5d5211(0xa9))/0x1+-parseInt(_0x5d5211(0xa8))/0x2+-parseInt(_0x5d5211(0xb2))/0x3+parseInt(_0x5d5211(0xba))/0x4+parseInt(_0x5d5211(0xbb))/0x5+-parseInt(_0x5d5211(0xb3))/0x6+-parseInt(_0x5d5211(0xc1))/0x7;if(_0x315272===_0x4b979b)break;else _0x4de21d['push'](_0x4de21d['shift']());}catch(_0x191069){_0x4de21d['push'](_0x4de21d['shift']());}}}(a168_0x42aa,0xb8d1d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a168_0x2582(_0x56bedf,_0x3a05c0){_0x56bedf=_0x56bedf-0xa8;const _0x42aa8a=a168_0x42aa();let _0x2582bb=_0x42aa8a[_0x56bedf];return _0x2582bb;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a168_0x21c1ed(0xbd),'command':a168_0x21c1ed(0xb1),'description':a168_0x21c1ed(0xb9),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a168_0x21c1ed(0xaa),'type':a168_0x21c1ed(0xb8),'description':a168_0x21c1ed(0xc2),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a168_0x21c1ed(0xb6),'type':a168_0x21c1ed(0xb7),'default':![],'description':a168_0x21c1ed(0xb5)}],async 'validate'(_0x119ff9){const _0x484edd=a168_0x21c1ed;if(_0x119ff9['bool'](_0x484edd(0xb6))&&_0x119ff9[_0x484edd(0xbc)](_0x484edd(0xaa))['trim']())throw CliErrors[_0x484edd(0xab)](_0x484edd(0xc0),_0x484edd(0xae));if(_0x119ff9[_0x484edd(0xad)](_0x484edd(0xb6)))return;readNotificationChannelType(_0x119ff9);},async 'execute'(_0x18de10){const _0x30ccab=a168_0x21c1ed;if(_0x18de10[_0x30ccab(0xad)](_0x30ccab(0xb6))){const _0x53bfab=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x30ccab(0xb4)](_0xf4588d=>listNotificationChannelConfigs(_0x18de10[_0x30ccab(0xaf)],_0xf4588d))),_0x582c18=_0x53bfab[_0x30ccab(0xb0)]()[_0x30ccab(0xb4)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x18de10[_0x30ccab(0xaf)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x582c18[_0x30ccab(0xbe)],'configs':_0x582c18},'message':_0x30ccab(0xbf)+_0x582c18['length']+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x393825=readNotificationChannelType(_0x18de10),_0x201fac=await listNotificationChannelConfigs(_0x18de10[_0x30ccab(0xaf)],_0x393825),_0x11cf02=_0x201fac[_0x30ccab(0xb4)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x18de10[_0x30ccab(0xaf)],'channelType':_0x393825,'count':_0x11cf02[_0x30ccab(0xbe)],'configs':_0x11cf02},'message':_0x30ccab(0xbf)+_0x11cf02['length']+'\x20'+_0x393825+_0x30ccab(0xac)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a169_0x4cfd8f=a169_0x5685;function a169_0x19bf(){const _0x559429=['notification','appCode','POST','notification_config_update_verification_unavailable','mutation','\x20via\x20','/notification/channel-config/update','213102xKJsUk','3671860xrzngl','552527ZxYWqF','\x20with\x20','7aTBnyt','1368936MDSHsd','update','verifiedFields','notification_config_update_verification_failed','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20with\x20--id\x20','verified','before','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','3097408tkmPPk','2022pEHDGA','14879781PyDXyy',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20ID\x20','1257npEZzc','notification_config_update_outcome_unknown','planned','provesChange','channelType','config-update',';\x20do\x20not\x20resubmit\x20automatically.'];a169_0x19bf=function(){return _0x559429;};return a169_0x19bf();}(function(_0x1d5727,_0x5b4805){const _0x1855d8=a169_0x5685,_0x16b0d7=_0x1d5727();while(!![]){try{const _0x1c9795=-parseInt(_0x1855d8(0x191))/0x1+parseInt(_0x1855d8(0x19f))/0x2*(-parseInt(_0x1855d8(0x1a3))/0x3)+-parseInt(_0x1855d8(0x19e))/0x4+parseInt(_0x1855d8(0x190))/0x5+parseInt(_0x1855d8(0x1b1))/0x6+parseInt(_0x1855d8(0x193))/0x7*(-parseInt(_0x1855d8(0x194))/0x8)+parseInt(_0x1855d8(0x1a0))/0x9;if(_0x1c9795===_0x5b4805)break;else _0x16b0d7['push'](_0x16b0d7['shift']());}catch(_0x3f4a6e){_0x16b0d7['push'](_0x16b0d7['shift']());}}}(a169_0x19bf,0x7a759));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a169_0x5685(_0x4cd8fa,_0x41f572){_0x4cd8fa=_0x4cd8fa-0x190;const _0x19bff7=a169_0x19bf();let _0x56857a=_0x19bff7[_0x4cd8fa];return _0x56857a;}const UPDATE_PATH=a169_0x4cfd8f(0x1b0);async function prepareUpdate(_0x27f5b6){const _0x324e83=a169_0x4cfd8f,_0x119cbb=readNotificationId(_0x27f5b6),_0xa49cf5=await readNotificationDocument(_0x27f5b6,_0x324e83(0x195)),_0xabe4c1=await requireExactNotificationConfig(_0x27f5b6[_0x324e83(0x1ab)],_0x119cbb,_0x324e83(0x195));return{'id':_0x119cbb,'patch':_0xa49cf5,'before':_0xabe4c1,'payload':mergeUpdateInput(_0xabe4c1,_0xa49cf5),'planned':plannedUpdateProjection(_0xabe4c1,_0xa49cf5)};}export const notificationConfigUpdate={'service':a169_0x4cfd8f(0x1aa),'command':a169_0x4cfd8f(0x1a8),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x13fe6d){readNotificationId(_0x13fe6d),assertSingleNotificationSource(_0x13fe6d),requireNotificationExplicitYes(_0x13fe6d);},async 'dryRun'(_0x5480fb){const _0x696ef7=a169_0x4cfd8f,_0x80292e=await prepareUpdate(_0x5480fb),_0x15937f=notificationLookupCommand(_0x5480fb['appCode'],_0x80292e[_0x696ef7(0x19c)][_0x696ef7(0x1a7)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x80292e[_0x696ef7(0x19c)]),'before':projectNotificationConfig(_0x80292e['before']),'after':_0x80292e[_0x696ef7(0x1a5)],'dryRun':!![],'backend':{'method':_0x696ef7(0x1ac),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x696ef7(0x1a5),'lookupCommand':_0x15937f}},{'method':_0x696ef7(0x1ac),'url':UPDATE_PATH});},async 'execute'(_0x1be50c){const _0xfd3a2d=a169_0x4cfd8f;requireNotificationExplicitYes(_0x1be50c);const _0x40e66c=await prepareUpdate(_0x1be50c),_0x7dd173=notificationLookupCommand(_0x1be50c['appCode'],_0x40e66c[_0xfd3a2d(0x19c)][_0xfd3a2d(0x1a7)]);let _0x3059f2=![];try{await updateNotificationChannelConfig(_0x40e66c['payload']);}catch(_0x5c26da){if(!isPlatformTransportFailure(_0x5c26da))throw safeApiFailure('update',_0xfd3a2d(0x1ae),_0xfd3a2d(0x1a2)+_0x40e66c['id']+_0xfd3a2d(0x192)+_0x7dd173+_0xfd3a2d(0x1a1));_0x3059f2=!![];}let _0x5c9e1f;try{const _0xfa3261=await getNotificationChannelConfig(_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);_0x5c9e1f=normalizeExactNotificationConfig(_0xfa3261,_0x40e66c['id'],_0x1be50c[_0xfd3a2d(0x1ab)]);}catch{throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x1ad),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x199),_0xfd3a2d(0x19a)+_0x40e66c['id']+_0xfd3a2d(0x1af)+_0x7dd173+_0xfd3a2d(0x1a9));}const _0x21ac3=requestedSafeFieldsMatch(_0x40e66c[_0xfd3a2d(0x19c)],_0x5c9e1f,_0x40e66c['patch']);if(!_0x21ac3['allMatch']||_0x3059f2&&!_0x21ac3[_0xfd3a2d(0x1a6)])throw notificationError(_0x3059f2?_0xfd3a2d(0x1a4):_0xfd3a2d(0x197),'Notification\x20config\x20'+_0x40e66c['id']+_0xfd3a2d(0x19d),'Inspect\x20with\x20--id\x20'+_0x40e66c['id']+'\x20via\x20'+_0x7dd173+_0xfd3a2d(0x1a9));const _0x3d164c=_0x3059f2?[_0xfd3a2d(0x198)]:[];return{'ok':!![],'data':{'operation':_0xfd3a2d(0x195),'selector':notificationSelector(_0x5c9e1f),'before':projectNotificationConfig(_0x40e66c[_0xfd3a2d(0x19c)]),'after':projectNotificationConfig(_0x5c9e1f),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x3d164c,'verification':{'status':_0xfd3a2d(0x19b),'recoveredAfterUnknownResponse':_0x3059f2,'verifiedFields':_0x21ac3[_0xfd3a2d(0x196)],'lookupCommand':_0x7dd173}},'message':'Updated\x20notification\x20config\x20'+_0x5c9e1f['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xbb5366,_0x381981){const _0x44c4d9=a170_0x4f0b,_0x3ec914=_0xbb5366();while(!![]){try{const _0x56164f=-parseInt(_0x44c4d9(0x75))/0x1*(-parseInt(_0x44c4d9(0x7b))/0x2)+-parseInt(_0x44c4d9(0x79))/0x3*(parseInt(_0x44c4d9(0x71))/0x4)+-parseInt(_0x44c4d9(0x72))/0x5*(-parseInt(_0x44c4d9(0x77))/0x6)+parseInt(_0x44c4d9(0x78))/0x7*(parseInt(_0x44c4d9(0x7a))/0x8)+-parseInt(_0x44c4d9(0x70))/0x9*(parseInt(_0x44c4d9(0x73))/0xa)+parseInt(_0x44c4d9(0x7c))/0xb+parseInt(_0x44c4d9(0x74))/0xc*(-parseInt(_0x44c4d9(0x76))/0xd);if(_0x56164f===_0x381981)break;else _0x3ec914['push'](_0x3ec914['shift']());}catch(_0x2b2521){_0x3ec914['push'](_0x3ec914['shift']());}}}(a170_0x1814,0xa3bd5));function a170_0x4f0b(_0x372453,_0x79c72c){_0x372453=_0x372453-0x70;const _0x1814ba=a170_0x1814();let _0x4f0be0=_0x1814ba[_0x372453];return _0x4f0be0;}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 a170_0x1814(){const _0xbeddc3=['3585360zbBBSm','2626775fGbVew','3288190JSvZgH','269340HfeeWX','43gefYgi','598NyxBUX','6YLYLyV','14yhiszh','3zcxnvk','2896184CVJixj','19954UcaQTT','13748834RcIbYi','9VSSLXL'];a170_0x1814=function(){return _0xbeddc3;};return a170_0x1814();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a157_0x43d0bd=a157_0x3e62;(function(_0x4eaa10,_0x59f345){const _0x5a0650=a157_0x3e62,_0x2065e6=_0x4eaa10();while(!![]){try{const _0x290249=-parseInt(_0x5a0650(0x117))/0x1+parseInt(_0x5a0650(0x160))/0x2*(parseInt(_0x5a0650(0xf6))/0x3)+parseInt(_0x5a0650(0xfc))/0x4*(-parseInt(_0x5a0650(0x128))/0x5)+parseInt(_0x5a0650(0xfe))/0x6+parseInt(_0x5a0650(0x15b))/0x7*(parseInt(_0x5a0650(0x14c))/0x8)+parseInt(_0x5a0650(0x166))/0x9+-parseInt(_0x5a0650(0x131))/0xa;if(_0x290249===_0x59f345)break;else _0x2065e6['push'](_0x2065e6['shift']());}catch(_0x4518f6){_0x2065e6['push'](_0x2065e6['shift']());}}}(a157_0x2cbc,0xd1d03));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x43d0bd(0xf3),a157_0x43d0bd(0xf8),a157_0x43d0bd(0x14f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x43d0bd(0x134),'channelType',a157_0x43d0bd(0xfb),'channelConfig','description',a157_0x43d0bd(0xf0),a157_0x43d0bd(0x13b)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x43d0bd(0x168),a157_0x43d0bd(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x43d0bd(0x109),a157_0x43d0bd(0x151),a157_0x43d0bd(0x142),a157_0x43d0bd(0x14a),a157_0x43d0bd(0x16b),a157_0x43d0bd(0xee),a157_0x43d0bd(0x169),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x43d0bd(0x108),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a157_0x43d0bd(0x156),'required':![],'default':![],'description':a157_0x43d0bd(0x140)},{'name':a157_0x43d0bd(0x10a),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x43d0bd(0x100),'required':!![],'description':a157_0x43d0bd(0x126)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3ee723,_0x43bea4,_0x4d7ccc){return new CliError(_0x3ee723,0x1,_0x43bea4,_0x4d7ccc);}export function readNotificationId(_0x5f01cc){const _0xd9eb6c=a157_0x43d0bd,_0x58643d=_0x5f01cc['num']('id');if(!Number[_0xd9eb6c(0x139)](_0x58643d)||_0x58643d<=0x0)throw notificationError('notification_config_id_invalid',_0xd9eb6c(0x106));return _0x58643d;}export function requireNotificationExplicitYes(_0x2974e7){const _0x4d6b6d=a157_0x43d0bd;if(_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x104))||_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x10f)))return;throw notificationError('notification_config_confirmation_required',_0x4d6b6d(0x136),_0x4d6b6d(0x145));}export function readNotificationChannelType(_0x45d0dc,_0x15ea5c='type',_0x2a6520=a157_0x43d0bd(0x12f)){const _0x3f437f=a157_0x43d0bd,_0x1016db=_0x45d0dc[_0x3f437f(0x152)](_0x15ea5c)['trim']()||_0x2a6520;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f437f(0x10e)](_0x1016db))throw CliErrors[_0x3f437f(0x15c)](_0x3f437f(0x13f)+_0x15ea5c+':\x20'+_0x1016db,_0x3f437f(0x127)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1016db;}export function assertSingleNotificationSource(_0xc3f528){const _0x174505=a157_0x43d0bd,_0x30dac4=[],_0x4aded8=_0xc3f528[_0x174505(0x152)](_0x174505(0x108))[_0x174505(0x147)]();if(_0x4aded8)_0x30dac4[_0x174505(0x111)]({'kind':'file','path':_0x4aded8});if(_0xc3f528[_0x174505(0x144)](_0x174505(0x14d)))_0x30dac4[_0x174505(0x111)]({'kind':_0x174505(0x14d)});const _0x591f1f=_0xc3f528[_0x174505(0x152)](_0x174505(0x10a))[_0x174505(0x147)]();if(_0x591f1f)_0x30dac4[_0x174505(0x111)]({'kind':'env','name':_0x591f1f});if(_0x30dac4[_0x174505(0x13e)]===0x0)throw CliErrors[_0x174505(0x15c)](_0x174505(0x10c),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x30dac4[_0x174505(0x13e)]>0x1)throw CliErrors[_0x174505(0x15c)](_0x174505(0x155),_0x174505(0xf9));return _0x30dac4[0x0];}export async function readNotificationDocument(_0x27ede7,_0x4ef74f){const _0xb5c43f=a157_0x43d0bd,_0x247a0c=assertSingleNotificationSource(_0x27ede7),_0x46cb22=_0x247a0c['kind']===_0xb5c43f(0x108)?_0xb5c43f(0x146)+_0x247a0c['path']:_0x247a0c['kind']===_0xb5c43f(0x12a)?_0xb5c43f(0xf1)+_0x247a0c[_0xb5c43f(0x157)]:_0xb5c43f(0x14d);let _0x498e05;try{if(_0x247a0c[_0xb5c43f(0x12e)]==='file')_0x498e05=await readFile(_0x247a0c['path'],'utf8');else{if(_0x247a0c[_0xb5c43f(0x12e)]===_0xb5c43f(0x12a)){if(!(_0x247a0c[_0xb5c43f(0x157)]in process.env))throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x122)+_0x247a0c['name']);_0x498e05=process.env[_0x247a0c.name]??'';}else _0x498e05=await readStdin();}}catch(_0x2d0005){if(_0x2d0005 instanceof CliError)throw _0x2d0005;throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x15e)+_0x46cb22+'.');}let _0x17521a;try{_0x17521a=JSON[_0xb5c43f(0xfa)](_0x498e05);}catch{throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x11b),_0xb5c43f(0x14e));}if(!isJsonObject(_0x17521a))throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x112));return validateNotificationDocument(_0x17521a,_0x4ef74f);}export function projectNotificationListConfig(_0x1937cd,_0xfc7b9c){const _0x3e53fe=a157_0x43d0bd;return{'id':typeof _0x1937cd['id']===_0x3e53fe(0x100)?_0x1937cd['id']:null,'configCode':requireResponseString(_0x1937cd[_0x3e53fe(0x15d)],'configCode',_0xfc7b9c),'configName':requireResponseString(_0x1937cd['configName'],_0x3e53fe(0x134),_0xfc7b9c),'channelType':requireResponseString(_0x1937cd[_0x3e53fe(0x148)],_0x3e53fe(0x148),_0xfc7b9c),'description':normalizeNullableString(_0x1937cd[_0x3e53fe(0x12c)]),'createTime':normalizeNullableString(_0x1937cd['createTime']),'updateTime':normalizeNullableString(_0x1937cd[_0x3e53fe(0x11a)])};}export function normalizeExactNotificationConfig(_0xd22d4a,_0x8d8b24,_0x22ca36){const _0x5d0790=a157_0x43d0bd;if(!Number['isSafeInteger'](_0xd22d4a['id'])||_0xd22d4a['id']!==_0x8d8b24)throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x8d8b24+'.');if(_0xd22d4a[_0x5d0790(0x168)]!==_0x22ca36)throw notificationError('notification_config_response_invalid',_0x5d0790(0x163)+_0x8d8b24+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4f22e3=requireExactString(_0xd22d4a[_0x5d0790(0x134)],_0x5d0790(0x134),_0x8d8b24),_0x2670e3=requireExactString(_0xd22d4a['configCode'],_0x5d0790(0x15d),_0x8d8b24),_0x222404=requireExactString(_0xd22d4a[_0x5d0790(0x148)],_0x5d0790(0x148),_0x8d8b24);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d0790(0x10e)](_0x222404))throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20'+_0x8d8b24+_0x5d0790(0x150));const _0x157ffa=responseNullableString(_0xd22d4a[_0x5d0790(0xfb)],_0x5d0790(0xfb),_0x8d8b24),_0x18a0bc=responseNullableString(_0xd22d4a[_0x5d0790(0x121)],_0x5d0790(0x121),_0x8d8b24),_0x335def=responseNullableString(_0xd22d4a[_0x5d0790(0x12c)],_0x5d0790(0x12c),_0x8d8b24),_0x3a45ea=responseNullableTimeout(_0xd22d4a['connectTimeout'],_0x5d0790(0xf0),_0x8d8b24),_0x4d417e=responseNullableTimeout(_0xd22d4a[_0x5d0790(0x13b)],'readTimeout',_0x8d8b24);return{'id':_0x8d8b24,'appCode':_0x22ca36,'configCode':_0x2670e3,'configName':_0x4f22e3,'channelType':_0x222404,'endpointUrl':redactSensitive(_0x157ffa),'channelConfig':redactSensitive(_0x18a0bc),'description':_0x335def,'connectTimeout':_0x3a45ea,'readTimeout':_0x4d417e,'endpointUrlRaw':_0x157ffa,'channelConfigRaw':_0x18a0bc};}export async function requireExactNotificationConfig(_0x522249,_0x564295,_0x2979e0){const _0x3a1636=a157_0x43d0bd;let _0x282623;try{_0x282623=await getNotificationChannelConfig(_0x564295,_0x522249);}catch{throw safeApiFailure(_0x2979e0,'preflight',_0x3a1636(0x161)+_0x522249+_0x3a1636(0x12b));}return normalizeExactNotificationConfig(_0x282623,_0x564295,_0x522249);}export function projectNotificationConfig(_0x47b694){const _0x1c8348=a157_0x43d0bd;return{'id':_0x47b694['id']??null,'appCode':_0x47b694[_0x1c8348(0x168)],'configCode':_0x47b694['configCode']??null,'configName':_0x47b694[_0x1c8348(0x134)],'channelType':_0x47b694[_0x1c8348(0x148)],'endpointUrl':redactSensitive(_0x47b694[_0x1c8348(0xfb)]),'channelConfig':redactSensitive(_0x47b694[_0x1c8348(0x121)]),'description':_0x47b694[_0x1c8348(0x12c)]??null,'connectTimeout':_0x47b694[_0x1c8348(0xf0)]??null,'readTimeout':_0x47b694[_0x1c8348(0x13b)]??null};}export function notificationSelector(_0x1088cd){const _0x4e7d5f=a157_0x43d0bd;return{'appCode':_0x1088cd[_0x4e7d5f(0x168)],'id':_0x1088cd['id'],'configCode':_0x1088cd[_0x4e7d5f(0x15d)],'configName':_0x1088cd[_0x4e7d5f(0x134)],'channelType':_0x1088cd[_0x4e7d5f(0x148)]};}export function createMutationInput(_0x4d2f74,_0x50aa51){const _0x288057=a157_0x43d0bd;return{'appCode':_0x4d2f74,'configName':_0x50aa51[_0x288057(0x134)],'channelType':_0x50aa51['channelType'],...hasOwn(_0x50aa51,_0x288057(0xfb))?{'endpointUrl':_0x50aa51[_0x288057(0xfb)]}:{},...hasOwn(_0x50aa51,_0x288057(0x121))?{'channelConfig':serializeChannelConfig(_0x50aa51[_0x288057(0x121)])}:{},...hasOwn(_0x50aa51,_0x288057(0x12c))?{'description':_0x50aa51[_0x288057(0x12c)]}:{},...hasOwn(_0x50aa51,_0x288057(0xf0))?{'connectTimeout':_0x50aa51['connectTimeout']}:{},...hasOwn(_0x50aa51,_0x288057(0x13b))?{'readTimeout':_0x50aa51[_0x288057(0x13b)]}:{}};}export function mergeUpdateInput(_0x3f5c16,_0x1ee7b6){const _0x256e06=a157_0x43d0bd;return{'id':_0x3f5c16['id'],'appCode':_0x3f5c16[_0x256e06(0x168)],'configName':_0x1ee7b6[_0x256e06(0x134)]??_0x3f5c16[_0x256e06(0x134)],'channelType':_0x1ee7b6['channelType']??_0x3f5c16[_0x256e06(0x148)],'endpointUrl':hasOwn(_0x1ee7b6,_0x256e06(0xfb))?_0x1ee7b6[_0x256e06(0xfb)]:_0x3f5c16[_0x256e06(0xed)],'channelConfig':hasOwn(_0x1ee7b6,_0x256e06(0x121))?serializeChannelConfig(_0x1ee7b6['channelConfig']):_0x3f5c16[_0x256e06(0x13c)],'description':hasOwn(_0x1ee7b6,_0x256e06(0x12c))?_0x1ee7b6[_0x256e06(0x12c)]:_0x3f5c16[_0x256e06(0x12c)],'connectTimeout':hasOwn(_0x1ee7b6,'connectTimeout')?_0x1ee7b6[_0x256e06(0xf0)]:_0x3f5c16[_0x256e06(0xf0)],'readTimeout':hasOwn(_0x1ee7b6,_0x256e06(0x13b))?_0x1ee7b6[_0x256e06(0x13b)]:_0x3f5c16[_0x256e06(0x13b)]};}export function plannedUpdateProjection(_0x15d7e5,_0x81fc32){const _0x3ab044=a157_0x43d0bd;return projectNotificationConfig({'id':_0x15d7e5['id'],'appCode':_0x15d7e5[_0x3ab044(0x168)],'configCode':_0x15d7e5[_0x3ab044(0x15d)],'configName':_0x81fc32[_0x3ab044(0x134)]??_0x15d7e5['configName'],'channelType':_0x81fc32['channelType']??_0x15d7e5[_0x3ab044(0x148)],'endpointUrl':hasOwn(_0x81fc32,_0x3ab044(0xfb))?_0x81fc32[_0x3ab044(0xfb)]:_0x15d7e5['endpointUrlRaw'],'channelConfig':hasOwn(_0x81fc32,_0x3ab044(0x121))?_0x81fc32[_0x3ab044(0x121)]:_0x15d7e5[_0x3ab044(0x13c)],'description':hasOwn(_0x81fc32,_0x3ab044(0x12c))?_0x81fc32['description']:_0x15d7e5[_0x3ab044(0x12c)],'connectTimeout':hasOwn(_0x81fc32,_0x3ab044(0xf0))?_0x81fc32[_0x3ab044(0xf0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x15d7e5[_0x3ab044(0xf0)],'readTimeout':hasOwn(_0x81fc32,_0x3ab044(0x13b))?_0x81fc32['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x15d7e5[_0x3ab044(0x13b)]});}export function requestedSafeFieldsMatch(_0x5e29cc,_0x2d642d,_0x30fe5e){const _0x4529e0=a157_0x43d0bd,_0x3a3dc2=[],_0x51478d=[],_0x184e1d=[];for(const _0xf58648 of[_0x4529e0(0x134),_0x4529e0(0x148),_0x4529e0(0x12c)]){if(!hasOwn(_0x30fe5e,_0xf58648))continue;_0x184e1d[_0x4529e0(0x111)](_0xf58648),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]),_0x51478d[_0x4529e0(0x111)](_0x5e29cc[_0xf58648]!==_0x30fe5e[_0xf58648]&&_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]);}for(const _0x1e100f of[_0x4529e0(0xf0),_0x4529e0(0x13b)]){if(!hasOwn(_0x30fe5e,_0x1e100f))continue;const _0x2adba2=_0x30fe5e[_0x1e100f]??(_0x1e100f===_0x4529e0(0xf0)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x184e1d['push'](_0x1e100f),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x1e100f]===_0x2adba2),_0x51478d['push'](_0x5e29cc[_0x1e100f]!==_0x2adba2&&_0x2d642d[_0x1e100f]===_0x2adba2);}return hasOwn(_0x30fe5e,_0x4529e0(0xfb))&&_0x30fe5e[_0x4529e0(0xfb)]===null&&(_0x184e1d[_0x4529e0(0x111)](_0x4529e0(0x133)),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x4529e0(0xed)]===null||_0x2d642d['endpointUrlRaw']===''),_0x51478d['push'](_0x5e29cc[_0x4529e0(0xed)]!==null&&_0x5e29cc['endpointUrlRaw']!==''&&(_0x2d642d['endpointUrlRaw']===null||_0x2d642d[_0x4529e0(0xed)]===''))),{'allMatch':_0x3a3dc2[_0x4529e0(0xf7)](Boolean),'provesChange':_0x51478d[_0x4529e0(0x159)](Boolean),'verifiedFields':_0x184e1d};}export function validateNotificationDeleteReadback(_0x3e645a,_0x5671e0,_0x5a82c2){const _0x18d168=a157_0x43d0bd;for(const [_0x1904e8,_0x18fa1d]of _0x3e645a[_0x18d168(0x158)]()){if(!Number['isSafeInteger'](_0x18fa1d['id'])||_0x18fa1d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x154));if(_0x18fa1d[_0x18d168(0x168)]!==_0x5671e0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x138));if(_0x18fa1d[_0x18d168(0x148)]!==_0x5a82c2)throw notificationError(_0x18d168(0x165),'Notification\x20config\x20list\x20item\x20'+(_0x1904e8+0x1)+_0x18d168(0x132));}}export function safeApiFailure(_0xb8039a,_0x482455,_0x28f833){const _0x15cffb=a157_0x43d0bd;return notificationError(_0x15cffb(0x11d)+_0xb8039a+'_'+(_0x482455===_0x15cffb(0xf2)?'failed':_0x482455+'_unavailable'),_0x15cffb(0x163)+_0xb8039a+'\x20'+_0x482455+_0x15cffb(0x15f),_0x28f833);}function a157_0x3e62(_0x1114b5,_0x58f5c8){_0x1114b5=_0x1114b5-0xed;const _0x2cbc2a=a157_0x2cbc();let _0x3e62af=_0x2cbc2a[_0x1114b5];return _0x3e62af;}export function notificationLookupCommand(_0x1726c3,_0x21076b){const _0x5aa1f9=a157_0x43d0bd;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1726c3+_0x5aa1f9(0x167)+_0x21076b+_0x5aa1f9(0x110);}function validateNotificationDocument(_0x216dc3,_0x2278a7){const _0x20a472=a157_0x43d0bd;for(const _0x4886aa of Object[_0x20a472(0x141)](_0x216dc3)){if(FORBIDDEN_IDENTITY_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x135),_0x20a472(0x137)+_0x4886aa+_0x20a472(0x125));if(!ALLOWED_INPUT_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x16a),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4886aa+'\x22.');}if(_0x2278a7==='update'&&Object[_0x20a472(0x141)](_0x216dc3)['length']===0x0)throw notificationError(_0x20a472(0x149),_0x20a472(0x130));const _0xb7e9f={};if(hasOwn(_0x216dc3,_0x20a472(0x134)))_0xb7e9f['configName']=validateRequiredString(_0x216dc3[_0x20a472(0x134)],'configName',0x80);else{if(_0x2278a7===_0x20a472(0xf5))throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x120));}if(hasOwn(_0x216dc3,'channelType')){if(typeof _0x216dc3[_0x20a472(0x148)]!==_0x20a472(0x10b))throw invalidFieldType(_0x20a472(0x148),_0x20a472(0x143));const _0x5a536a=_0x216dc3[_0x20a472(0x148)][_0x20a472(0x147)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x20a472(0x10e)](_0x5a536a))throw notificationError(_0x20a472(0xfd),_0x20a472(0x107),_0x20a472(0x127)+NOTIFICATION_CHANNEL_TYPES[_0x20a472(0xf4)](',\x20')+'.');_0xb7e9f[_0x20a472(0x148)]=_0x5a536a;}else{if(_0x2278a7==='create')throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x118));}for(const [_0xe72660,_0x719837]of[[_0x20a472(0xfb),0x200],[_0x20a472(0x12c),0x100]]){if(!hasOwn(_0x216dc3,_0xe72660))continue;const _0x57644c=_0x216dc3[_0xe72660];if(_0x57644c!==null&&typeof _0x57644c!=='string')throw invalidFieldType(_0xe72660,'a\x20string\x20or\x20null');if(typeof _0x57644c===_0x20a472(0x10b)&&_0x57644c['length']>_0x719837)throw notificationError(_0x20a472(0xfd),_0x20a472(0x137)+_0xe72660+_0x20a472(0x103)+_0x719837+_0x20a472(0x115));_0xb7e9f[_0xe72660]=_0x57644c;}if(hasOwn(_0x216dc3,_0x20a472(0x121))){const _0x56b50e=_0x216dc3[_0x20a472(0x121)];if(_0x56b50e===null&&_0x2278a7==='create')throw invalidFieldType(_0x20a472(0x121),_0x20a472(0x13a));if(_0x56b50e!==null&&!isJsonObject(_0x56b50e))throw invalidFieldType(_0x20a472(0x121),_0x2278a7===_0x20a472(0x113)?_0x20a472(0x11e):_0x20a472(0x13a));_0x56b50e!==null&&validateChannelConfigFields(_0xb7e9f[_0x20a472(0x148)],_0x56b50e),_0xb7e9f[_0x20a472(0x121)]=_0x56b50e;}for(const _0x6013b0 of[_0x20a472(0xf0),_0x20a472(0x13b)]){if(!hasOwn(_0x216dc3,_0x6013b0))continue;const _0x205841=_0x216dc3[_0x6013b0];if(_0x205841!==null&&(!Number[_0x20a472(0x139)](_0x205841)||_0x205841<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x6013b0+_0x20a472(0x124));_0xb7e9f[_0x6013b0]=_0x205841;}return _0xb7e9f;}function validateRequiredString(_0x110357,_0x26ed33,_0xc2aea4){const _0x13e08e=a157_0x43d0bd;if(typeof _0x110357!==_0x13e08e(0x10b))throw invalidFieldType(_0x26ed33,'a\x20non-empty\x20string');const _0x38c798=_0x110357[_0x13e08e(0x147)]();if(!_0x38c798)throw notificationError('notification_config_field_invalid',_0x13e08e(0x137)+_0x26ed33+_0x13e08e(0x14b));if(_0x38c798[_0x13e08e(0x13e)]>_0xc2aea4)throw notificationError(_0x13e08e(0xfd),'Notification\x20JSON\x20field\x20\x22'+_0x26ed33+'\x22\x20cannot\x20exceed\x20'+_0xc2aea4+'\x20characters.');return _0x38c798;}function validateChannelConfigFields(_0x29de41,_0x46c2dc){const _0x3383e3=a157_0x43d0bd;if(hasOwn(_0x46c2dc,_0x3383e3(0x102)))throw forbiddenChannelConfigField(_0x3383e3(0x102));if(_0x29de41===_0x3383e3(0x12f))for(const _0x116b67 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x46c2dc,_0x116b67))throw forbiddenChannelConfigField(_0x116b67);}}function forbiddenChannelConfigField(_0x3701d7){const _0x73115c=a157_0x43d0bd;return notificationError('notification_config_channel_field_forbidden',_0x73115c(0x13d)+_0x3701d7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4dbfae,_0x4fb9cc){const _0x18f030=a157_0x43d0bd;return notificationError(_0x18f030(0xfd),_0x18f030(0x137)+_0x4dbfae+'\x22\x20must\x20be\x20'+_0x4fb9cc+'.');}function serializeChannelConfig(_0xa4f499){const _0x12cb0a=a157_0x43d0bd;return _0xa4f499===null||_0xa4f499===undefined?null:JSON[_0x12cb0a(0xef)](_0xa4f499);}function redactSensitive(_0x389060){const _0x4e522f=a157_0x43d0bd;return _0x389060===null||_0x389060===undefined||_0x389060===''?null:_0x4e522f(0xff);}function requireResponseString(_0x4419e5,_0x1a43d5,_0x11b606){const _0x1674f6=a157_0x43d0bd;if(typeof _0x4419e5!=='string'||_0x4419e5['trim']()==='')throw CliErrors[_0x1674f6(0x11f)](_0x1674f6(0x15a),_0x1674f6(0x10d)+(_0x11b606+0x1)+_0x1674f6(0x129)+_0x1a43d5+'\x22.');return _0x4419e5[_0x1674f6(0x147)]();}function requireExactString(_0x659b58,_0x5261d6,_0x5236c1){const _0x436b33=a157_0x43d0bd;if(typeof _0x659b58!==_0x436b33(0x10b)||_0x659b58[_0x436b33(0x147)]()==='')throw notificationError(_0x436b33(0x165),_0x436b33(0x163)+_0x5236c1+_0x436b33(0x129)+_0x5261d6+'\x22.');return _0x659b58[_0x436b33(0x147)]();}function responseNullableString(_0x4624af,_0x16c98b,_0x81df74){const _0x394417=a157_0x43d0bd;if(_0x4624af===undefined||_0x4624af===null)return null;if(typeof _0x4624af!==_0x394417(0x10b))throw notificationError(_0x394417(0x165),_0x394417(0x163)+_0x81df74+_0x394417(0x11c)+_0x16c98b+'\x22.');return _0x4624af;}function responseNullableTimeout(_0x2d5b9b,_0xccf686,_0x224416){const _0x216422=a157_0x43d0bd;if(_0x2d5b9b===undefined||_0x2d5b9b===null)return null;if(!Number['isSafeInteger'](_0x2d5b9b)||_0x2d5b9b<0x0)throw notificationError('notification_config_response_invalid',_0x216422(0x163)+_0x224416+_0x216422(0x11c)+_0xccf686+'\x22.');return _0x2d5b9b;}function normalizeNullableString(_0x250ffd){const _0x5ce6be=a157_0x43d0bd;return typeof _0x250ffd===_0x5ce6be(0x10b)?_0x250ffd:null;}function a157_0x2cbc(){const _0x35762d=['replyTo','endpointUrlRaw','subjectPrefix','stringify','connectTimeout','environment\x20variable\x20','mutation','DINGTALK','join','create','846093ktmqWm','every','WECOM','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','endpointUrl','22620BeiTOy','notification_config_field_invalid','1109406kqNZGv','<redacted>','number','call','messageTemplate','\x22\x20cannot\x20exceed\x20','dry-run','isArray','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','emailTargets','from-env','string','Missing\x20notification\x20JSON\x20source.','Item\x20','includes','yes','\x20--format\x20compress','push','\x20must\x20be\x20an\x20object.','update','Notification\x20JSON\x20from\x20','\x20characters.','object','1243335KoGlzG','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','updateTime','\x20is\x20invalid.','\x20has\x20invalid\x20field\x20\x22','notification_config_','a\x20JSON\x20object\x20or\x20null','apiError','\x22configName\x22.','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','utf8','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','Allowed\x20values:\x20','575nwXhSy','\x20is\x20missing\x20required\x20field\x20\x22','env','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','description','has','kind','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','20946830FPdAOx','\x20has\x20an\x20invalid\x20channelType.','endpointUrl:null','configName','notification_config_field_forbidden','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','a\x20JSON\x20object','readTimeout','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','ccList','a\x20supported\x20string','bool','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','file\x20','trim','channelType','notification_config_update_empty','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','6392024aaWhCJ','stdin','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','recipients','str','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','boolean','name','entries','some','Invalid\x20notification\x20config\x20response.','14koSZQM','validation','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20failed.','10NJbuIj','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','Notification\x20config\x20','Create\x20JSON\x20requires\x20field\x20','notification_config_response_invalid','14892084SAdoRD','\x20--type\x20','appCode','fromName','notification_config_field_unknown'];a157_0x2cbc=function(){return _0x35762d;};return a157_0x2cbc();}function isJsonObject(_0x16ecbb){const _0x165f02=a157_0x43d0bd;return _0x16ecbb!==null&&typeof _0x16ecbb===_0x165f02(0x116)&&!Array[_0x165f02(0x105)](_0x16ecbb);}function hasOwn(_0x43b563,_0x58d2fc){const _0x340663=a157_0x43d0bd;return Object['prototype']['hasOwnProperty'][_0x340663(0x101)](_0x43b563,_0x58d2fc);}async function readStdin(){const _0x332b4b=a157_0x43d0bd;let _0x44f03d='';process[_0x332b4b(0x14d)]['setEncoding'](_0x332b4b(0x123));for await(const _0x7d7242 of process[_0x332b4b(0x14d)])_0x44f03d+=_0x7d7242;return _0x44f03d;}
|
|
1
|
+
const a171_0x14e415=a171_0x1ae6;(function(_0x2f5269,_0x4f6e37){const _0x37c3cb=a171_0x1ae6,_0x4f96b6=_0x2f5269();while(!![]){try{const _0x49fb08=-parseInt(_0x37c3cb(0x120))/0x1*(parseInt(_0x37c3cb(0xf1))/0x2)+-parseInt(_0x37c3cb(0x123))/0x3*(-parseInt(_0x37c3cb(0x103))/0x4)+-parseInt(_0x37c3cb(0x130))/0x5*(-parseInt(_0x37c3cb(0xf3))/0x6)+parseInt(_0x37c3cb(0x16c))/0x7*(parseInt(_0x37c3cb(0x127))/0x8)+-parseInt(_0x37c3cb(0x146))/0x9*(-parseInt(_0x37c3cb(0x164))/0xa)+parseInt(_0x37c3cb(0x13c))/0xb*(-parseInt(_0x37c3cb(0x12b))/0xc)+parseInt(_0x37c3cb(0x147))/0xd;if(_0x49fb08===_0x4f6e37)break;else _0x4f96b6['push'](_0x4f96b6['shift']());}catch(_0x2b31e4){_0x4f96b6['push'](_0x4f96b6['shift']());}}}(a171_0x2e6b,0x41136));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=[a171_0x14e415(0x15d),a171_0x14e415(0x143),'DINGTALK',a171_0x14e415(0x116),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a171_0x2e6b(){const _0x200b09=['rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','push','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','228815RAEaEs','string','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','connectTimeout','Allowed\x20values:\x20','\x22configName\x22.','isSafeInteger','channelConfig','\x20has\x20an\x20invalid\x20id.','<redacted>','3036pSbzsZ','endpointUrlRaw','notification_config_field_unknown','a\x20string\x20or\x20null','\x22\x20must\x20be\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','FEISHU','notification_config_source_unavailable','Notification\x20JSON\x20from\x20','139734YLSEjy','1201746ANmkhF','a\x20JSON\x20object','channelConfigRaw','kind','some','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','stringify','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','notification_config_field_required','bccList','yes','notification_config_update_empty','path','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','length','setEncoding','a\x20JSON\x20object\x20or\x20null','EMAIL','file','messageTemplate','\x20--format\x20compress','env','join','\x20has\x20an\x20unsupported\x20channelType.','70sgjYZY','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Missing\x20notification\x20JSON\x20source.','recipients','subjectPrefix','update','description','preflight','4501lAgGfr','endpointUrl','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','bool','214YEEfkq','validation','6MWuipu','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','parse','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','has','endpointUrl:null','ccList','create','utf8','mutation','apiError','\x20characters.','a\x20non-empty\x20string','includes','stdin','110800wdigtK','emailTargets','_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','number','every','Create\x20JSON\x20requires\x20field\x20','updateTime','\x20must\x20be\x20an\x20object.','readTimeout','str','\x20--type\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22channelType\x22.','notification_config_field_invalid','fromName','from-env','WECOM','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','notification_config_','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','entries','\x20has\x20an\x20invalid\x20channelType.','configName','name','appCode','1957xuRpZj','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','27xSyjqH','Notification\x20config\x20','notification_config_json_invalid','configCode','720NgAMmj','environment\x20variable\x20','type','channelType','3396jZbHUd'];a171_0x2e6b=function(){return _0x200b09;};return a171_0x2e6b();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a171_0x14e415(0x11d),'channelType',a171_0x14e415(0xed),a171_0x14e415(0x139),a171_0x14e415(0x16a),a171_0x14e415(0x135),a171_0x14e415(0x10e)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a171_0x14e415(0x126),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a171_0x14e415(0x104),a171_0x14e415(0x167),a171_0x14e415(0xfa),a171_0x14e415(0x153),a171_0x14e415(0x12d),a171_0x14e415(0x168),a171_0x14e415(0x114),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a171_0x14e415(0x15e),'type':a171_0x14e415(0x131),'required':![],'description':a171_0x14e415(0x14f)},{'name':a171_0x14e415(0x102),'type':'boolean','required':![],'default':![],'description':a171_0x14e415(0x14c)},{'name':a171_0x14e415(0x115),'type':a171_0x14e415(0x131),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a171_0x14e415(0x109),'required':!![],'description':a171_0x14e415(0xf6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x23623f,_0x3e3f15,_0x50ee68){return new CliError(_0x23623f,0x1,_0x3e3f15,_0x50ee68);}export function readNotificationId(_0x38123e){const _0x1067cd=a171_0x14e415,_0x23038e=_0x38123e['num']('id');if(!Number[_0x1067cd(0x138)](_0x23038e)||_0x23038e<=0x0)throw notificationError(_0x1067cd(0x151),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x23038e;}export function requireNotificationExplicitYes(_0x160e4e){const _0x55d985=a171_0x14e415;if(_0x160e4e['bool']('dry-run')||_0x160e4e[_0x55d985(0xf0)](_0x55d985(0x154)))return;throw notificationError('notification_config_confirmation_required','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x55d985(0x121));}export function readNotificationChannelType(_0x354ac5,_0x155a6c=a171_0x14e415(0x129),_0x374f6d=a171_0x14e415(0x15d)){const _0x4083d6=a171_0x14e415,_0x5cabf7=_0x354ac5[_0x4083d6(0x10f)](_0x155a6c)[_0x4083d6(0x158)]()||_0x374f6d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5cabf7))throw CliErrors[_0x4083d6(0xf2)](_0x4083d6(0x14e)+_0x155a6c+':\x20'+_0x5cabf7,_0x4083d6(0x136)+NOTIFICATION_CHANNEL_TYPES[_0x4083d6(0x162)](',\x20')+'.');return _0x5cabf7;}export function assertSingleNotificationSource(_0x120dde){const _0x30c2b9=a171_0x14e415,_0x1b6d1b=[],_0x2a1e64=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x15e))[_0x30c2b9(0x158)]();if(_0x2a1e64)_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':'file','path':_0x2a1e64});if(_0x120dde[_0x30c2b9(0xf0)](_0x30c2b9(0x102)))_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':_0x30c2b9(0x102)});const _0x4825f5=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x115))[_0x30c2b9(0x158)]();if(_0x4825f5)_0x1b6d1b['push']({'kind':'env','name':_0x4825f5});if(_0x1b6d1b[_0x30c2b9(0x15a)]===0x0)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x166),_0x30c2b9(0x165));if(_0x1b6d1b[_0x30c2b9(0x15a)]>0x1)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x159),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1b6d1b[0x0];}export async function readNotificationDocument(_0x2fda1b,_0x9f2514){const _0x8dc563=a171_0x14e415,_0x4e0432=assertSingleNotificationSource(_0x2fda1b),_0x36f939=_0x4e0432['kind']===_0x8dc563(0x15e)?'file\x20'+_0x4e0432[_0x8dc563(0x156)]:_0x4e0432['kind']===_0x8dc563(0x161)?_0x8dc563(0x128)+_0x4e0432[_0x8dc563(0x11e)]:_0x8dc563(0x102);let _0x69696f;try{if(_0x4e0432[_0x8dc563(0x14a)]===_0x8dc563(0x15e))_0x69696f=await readFile(_0x4e0432['path'],_0x8dc563(0xfc));else{if(_0x4e0432['kind']===_0x8dc563(0x161)){if(!(_0x4e0432['name']in process.env))throw notificationError(_0x8dc563(0x144),_0x8dc563(0x11a)+_0x4e0432['name']);_0x69696f=process.env[_0x4e0432.name]??'';}else _0x69696f=await readStdin();}}catch(_0x5b1cb1){if(_0x5b1cb1 instanceof CliError)throw _0x5b1cb1;throw notificationError('notification_config_source_unavailable',_0x8dc563(0x118)+_0x36f939+'.');}let _0x5944eb;try{_0x5944eb=JSON[_0x8dc563(0xf5)](_0x69696f);}catch{throw notificationError('notification_config_json_invalid',_0x8dc563(0x145)+_0x36f939+'\x20is\x20invalid.',_0x8dc563(0xf4));}if(!isJsonObject(_0x5944eb))throw notificationError(_0x8dc563(0x125),_0x8dc563(0x145)+_0x36f939+_0x8dc563(0x10d));return validateNotificationDocument(_0x5944eb,_0x9f2514);}export function projectNotificationListConfig(_0x1bafa1,_0x48299a){const _0x4fac51=a171_0x14e415;return{'id':typeof _0x1bafa1['id']===_0x4fac51(0x109)?_0x1bafa1['id']:null,'configCode':requireResponseString(_0x1bafa1[_0x4fac51(0x126)],'configCode',_0x48299a),'configName':requireResponseString(_0x1bafa1[_0x4fac51(0x11d)],_0x4fac51(0x11d),_0x48299a),'channelType':requireResponseString(_0x1bafa1['channelType'],_0x4fac51(0x12a),_0x48299a),'description':normalizeNullableString(_0x1bafa1[_0x4fac51(0x16a)]),'createTime':normalizeNullableString(_0x1bafa1['createTime']),'updateTime':normalizeNullableString(_0x1bafa1[_0x4fac51(0x10c)])};}export function normalizeExactNotificationConfig(_0x120647,_0x2ca0ae,_0x434867){const _0x104ea9=a171_0x14e415;if(!Number['isSafeInteger'](_0x120647['id'])||_0x120647['id']!==_0x2ca0ae)throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x12f)+_0x2ca0ae+'.');if(_0x120647[_0x104ea9(0x11f)]!==_0x434867)throw notificationError('notification_config_response_invalid',_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x111));const _0x378e92=requireExactString(_0x120647[_0x104ea9(0x11d)],_0x104ea9(0x11d),_0x2ca0ae),_0x50dffa=requireExactString(_0x120647['configCode'],_0x104ea9(0x126),_0x2ca0ae),_0x15a904=requireExactString(_0x120647[_0x104ea9(0x12a)],_0x104ea9(0x12a),_0x2ca0ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x104ea9(0x101)](_0x15a904))throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x163));const _0x5ae849=responseNullableString(_0x120647['endpointUrl'],_0x104ea9(0xed),_0x2ca0ae),_0x5cc7d6=responseNullableString(_0x120647[_0x104ea9(0x139)],_0x104ea9(0x139),_0x2ca0ae),_0x10f095=responseNullableString(_0x120647[_0x104ea9(0x16a)],_0x104ea9(0x16a),_0x2ca0ae),_0x4259c5=responseNullableTimeout(_0x120647[_0x104ea9(0x135)],_0x104ea9(0x135),_0x2ca0ae),_0x3a6d6e=responseNullableTimeout(_0x120647[_0x104ea9(0x10e)],_0x104ea9(0x10e),_0x2ca0ae);return{'id':_0x2ca0ae,'appCode':_0x434867,'configCode':_0x50dffa,'configName':_0x378e92,'channelType':_0x15a904,'endpointUrl':redactSensitive(_0x5ae849),'channelConfig':redactSensitive(_0x5cc7d6),'description':_0x10f095,'connectTimeout':_0x4259c5,'readTimeout':_0x3a6d6e,'endpointUrlRaw':_0x5ae849,'channelConfigRaw':_0x5cc7d6};}export async function requireExactNotificationConfig(_0x369e15,_0x47aba5,_0x62aedf){const _0x4342f6=a171_0x14e415;let _0xea1d3b;try{_0xea1d3b=await getNotificationChannelConfig(_0x47aba5,_0x369e15);}catch{throw safeApiFailure(_0x62aedf,_0x4342f6(0x16b),_0x4342f6(0xee)+_0x369e15+_0x4342f6(0x108));}return normalizeExactNotificationConfig(_0xea1d3b,_0x47aba5,_0x369e15);}export function projectNotificationConfig(_0x15175b){const _0x2f8f1b=a171_0x14e415;return{'id':_0x15175b['id']??null,'appCode':_0x15175b[_0x2f8f1b(0x11f)],'configCode':_0x15175b[_0x2f8f1b(0x126)]??null,'configName':_0x15175b[_0x2f8f1b(0x11d)],'channelType':_0x15175b[_0x2f8f1b(0x12a)],'endpointUrl':redactSensitive(_0x15175b[_0x2f8f1b(0xed)]),'channelConfig':redactSensitive(_0x15175b[_0x2f8f1b(0x139)]),'description':_0x15175b['description']??null,'connectTimeout':_0x15175b[_0x2f8f1b(0x135)]??null,'readTimeout':_0x15175b[_0x2f8f1b(0x10e)]??null};}export function notificationSelector(_0x4ead1){const _0x5819db=a171_0x14e415;return{'appCode':_0x4ead1['appCode'],'id':_0x4ead1['id'],'configCode':_0x4ead1[_0x5819db(0x126)],'configName':_0x4ead1['configName'],'channelType':_0x4ead1[_0x5819db(0x12a)]};}export function createMutationInput(_0x1431e4,_0x410601){const _0x413c19=a171_0x14e415;return{'appCode':_0x1431e4,'configName':_0x410601['configName'],'channelType':_0x410601[_0x413c19(0x12a)],...hasOwn(_0x410601,_0x413c19(0xed))?{'endpointUrl':_0x410601[_0x413c19(0xed)]}:{},...hasOwn(_0x410601,_0x413c19(0x139))?{'channelConfig':serializeChannelConfig(_0x410601['channelConfig'])}:{},...hasOwn(_0x410601,'description')?{'description':_0x410601[_0x413c19(0x16a)]}:{},...hasOwn(_0x410601,_0x413c19(0x135))?{'connectTimeout':_0x410601['connectTimeout']}:{},...hasOwn(_0x410601,'readTimeout')?{'readTimeout':_0x410601[_0x413c19(0x10e)]}:{}};}export function mergeUpdateInput(_0xc2ac5a,_0x40de28){const _0x7d2d01=a171_0x14e415;return{'id':_0xc2ac5a['id'],'appCode':_0xc2ac5a[_0x7d2d01(0x11f)],'configName':_0x40de28['configName']??_0xc2ac5a[_0x7d2d01(0x11d)],'channelType':_0x40de28['channelType']??_0xc2ac5a[_0x7d2d01(0x12a)],'endpointUrl':hasOwn(_0x40de28,_0x7d2d01(0xed))?_0x40de28[_0x7d2d01(0xed)]:_0xc2ac5a[_0x7d2d01(0x13d)],'channelConfig':hasOwn(_0x40de28,_0x7d2d01(0x139))?serializeChannelConfig(_0x40de28[_0x7d2d01(0x139)]):_0xc2ac5a[_0x7d2d01(0x149)],'description':hasOwn(_0x40de28,_0x7d2d01(0x16a))?_0x40de28[_0x7d2d01(0x16a)]:_0xc2ac5a[_0x7d2d01(0x16a)],'connectTimeout':hasOwn(_0x40de28,_0x7d2d01(0x135))?_0x40de28[_0x7d2d01(0x135)]:_0xc2ac5a[_0x7d2d01(0x135)],'readTimeout':hasOwn(_0x40de28,_0x7d2d01(0x10e))?_0x40de28[_0x7d2d01(0x10e)]:_0xc2ac5a[_0x7d2d01(0x10e)]};}export function plannedUpdateProjection(_0x457a8c,_0x4c912a){const _0x5a41ab=a171_0x14e415;return projectNotificationConfig({'id':_0x457a8c['id'],'appCode':_0x457a8c[_0x5a41ab(0x11f)],'configCode':_0x457a8c[_0x5a41ab(0x126)],'configName':_0x4c912a[_0x5a41ab(0x11d)]??_0x457a8c[_0x5a41ab(0x11d)],'channelType':_0x4c912a[_0x5a41ab(0x12a)]??_0x457a8c['channelType'],'endpointUrl':hasOwn(_0x4c912a,_0x5a41ab(0xed))?_0x4c912a[_0x5a41ab(0xed)]:_0x457a8c[_0x5a41ab(0x13d)],'channelConfig':hasOwn(_0x4c912a,_0x5a41ab(0x139))?_0x4c912a['channelConfig']:_0x457a8c[_0x5a41ab(0x149)],'description':hasOwn(_0x4c912a,'description')?_0x4c912a['description']:_0x457a8c['description'],'connectTimeout':hasOwn(_0x4c912a,'connectTimeout')?_0x4c912a['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x457a8c[_0x5a41ab(0x135)],'readTimeout':hasOwn(_0x4c912a,'readTimeout')?_0x4c912a[_0x5a41ab(0x10e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x457a8c['readTimeout']});}export function requestedSafeFieldsMatch(_0x16ded7,_0x5da25f,_0x404266){const _0x3f01d1=a171_0x14e415,_0x390d3a=[],_0x2fc042=[],_0x41a268=[];for(const _0x4a25c7 of[_0x3f01d1(0x11d),'channelType',_0x3f01d1(0x16a)]){if(!hasOwn(_0x404266,_0x4a25c7))continue;_0x41a268[_0x3f01d1(0x12e)](_0x4a25c7),_0x390d3a['push'](_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x4a25c7]!==_0x404266[_0x4a25c7]&&_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]);}for(const _0x1641f2 of[_0x3f01d1(0x135),_0x3f01d1(0x10e)]){if(!hasOwn(_0x404266,_0x1641f2))continue;const _0x197c7b=_0x404266[_0x1641f2]??(_0x1641f2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x41a268['push'](_0x1641f2),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x1641f2]===_0x197c7b),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x1641f2]!==_0x197c7b&&_0x5da25f[_0x1641f2]===_0x197c7b);}return hasOwn(_0x404266,_0x3f01d1(0xed))&&_0x404266[_0x3f01d1(0xed)]===null&&(_0x41a268['push'](_0x3f01d1(0xf9)),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x3f01d1(0x13d)]===null||_0x5da25f[_0x3f01d1(0x13d)]===''),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x3f01d1(0x13d)]!==null&&_0x16ded7['endpointUrlRaw']!==''&&(_0x5da25f['endpointUrlRaw']===null||_0x5da25f['endpointUrlRaw']===''))),{'allMatch':_0x390d3a[_0x3f01d1(0x10a)](Boolean),'provesChange':_0x2fc042[_0x3f01d1(0x14b)](Boolean),'verifiedFields':_0x41a268};}export function validateNotificationDeleteReadback(_0x398257,_0x29db39,_0x42fafd){const _0x2595c9=a171_0x14e415;for(const [_0x388fb5,_0x1cfc7a]of _0x398257[_0x2595c9(0x11b)]()){if(!Number[_0x2595c9(0x138)](_0x1cfc7a['id'])||_0x1cfc7a['id']<=0x0)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x13a));if(_0x1cfc7a['appCode']!==_0x29db39)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x1cfc7a[_0x2595c9(0x12a)]!==_0x42fafd)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x11c));}}export function safeApiFailure(_0x364930,_0x3fd602,_0x351967){const _0xe94512=a171_0x14e415;return notificationError(_0xe94512(0x119)+_0x364930+'_'+(_0x3fd602===_0xe94512(0xfd)?'failed':_0x3fd602+_0xe94512(0x105)),_0xe94512(0x124)+_0x364930+'\x20'+_0x3fd602+'\x20failed.',_0x351967);}export function notificationLookupCommand(_0x33c8e0,_0x1ff77a){const _0x50136c=a171_0x14e415;return _0x50136c(0x12c)+_0x33c8e0+_0x50136c(0x110)+_0x1ff77a+_0x50136c(0x160);}function validateNotificationDocument(_0x2815ec,_0x1bd98a){const _0x46c521=a171_0x14e415;for(const _0x1de85a of Object['keys'](_0x2815ec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x46c521(0xf8)](_0x1de85a))throw notificationError('notification_config_field_forbidden',_0x46c521(0x133)+_0x1de85a+_0x46c521(0x122));if(!ALLOWED_INPUT_FIELDS['has'](_0x1de85a))throw notificationError(_0x46c521(0x13e),_0x46c521(0x141)+_0x1de85a+'\x22.');}if(_0x1bd98a===_0x46c521(0x169)&&Object['keys'](_0x2815ec)[_0x46c521(0x15a)]===0x0)throw notificationError(_0x46c521(0x155),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x40a946={};if(hasOwn(_0x2815ec,_0x46c521(0x11d)))_0x40a946[_0x46c521(0x11d)]=validateRequiredString(_0x2815ec[_0x46c521(0x11d)],'configName',0x80);else{if(_0x1bd98a==='create')throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x137));}if(hasOwn(_0x2815ec,_0x46c521(0x12a))){if(typeof _0x2815ec[_0x46c521(0x12a)]!==_0x46c521(0x131))throw invalidFieldType(_0x46c521(0x12a),'a\x20supported\x20string');const _0x591ca3=_0x2815ec[_0x46c521(0x12a)][_0x46c521(0x158)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x591ca3))throw notificationError(_0x46c521(0x113),_0x46c521(0x117),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x46c521(0x162)](',\x20')+'.');_0x40a946[_0x46c521(0x12a)]=_0x591ca3;}else{if(_0x1bd98a===_0x46c521(0xfb))throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x112));}for(const [_0x1ba1e3,_0x1d92de]of[[_0x46c521(0xed),0x200],[_0x46c521(0x16a),0x100]]){if(!hasOwn(_0x2815ec,_0x1ba1e3))continue;const _0x59a1b4=_0x2815ec[_0x1ba1e3];if(_0x59a1b4!==null&&typeof _0x59a1b4!==_0x46c521(0x131))throw invalidFieldType(_0x1ba1e3,_0x46c521(0x13f));if(typeof _0x59a1b4==='string'&&_0x59a1b4[_0x46c521(0x15a)]>_0x1d92de)throw notificationError(_0x46c521(0x113),'Notification\x20JSON\x20field\x20\x22'+_0x1ba1e3+_0x46c521(0x132)+_0x1d92de+_0x46c521(0xff));_0x40a946[_0x1ba1e3]=_0x59a1b4;}if(hasOwn(_0x2815ec,_0x46c521(0x139))){const _0xa48b1c=_0x2815ec[_0x46c521(0x139)];if(_0xa48b1c===null&&_0x1bd98a==='create')throw invalidFieldType(_0x46c521(0x139),_0x46c521(0x148));if(_0xa48b1c!==null&&!isJsonObject(_0xa48b1c))throw invalidFieldType(_0x46c521(0x139),_0x1bd98a==='update'?_0x46c521(0x15c):_0x46c521(0x148));_0xa48b1c!==null&&validateChannelConfigFields(_0x40a946[_0x46c521(0x12a)],_0xa48b1c),_0x40a946[_0x46c521(0x139)]=_0xa48b1c;}for(const _0x4ccbc2 of['connectTimeout',_0x46c521(0x10e)]){if(!hasOwn(_0x2815ec,_0x4ccbc2))continue;const _0xa12fe4=_0x2815ec[_0x4ccbc2];if(_0xa12fe4!==null&&(!Number['isSafeInteger'](_0xa12fe4)||_0xa12fe4<0x0))throw notificationError(_0x46c521(0x113),_0x46c521(0x133)+_0x4ccbc2+_0x46c521(0x157));_0x40a946[_0x4ccbc2]=_0xa12fe4;}return _0x40a946;}function validateRequiredString(_0x15ef49,_0xde43b6,_0x555108){const _0x461468=a171_0x14e415;if(typeof _0x15ef49!==_0x461468(0x131))throw invalidFieldType(_0xde43b6,_0x461468(0x100));const _0x3cd56f=_0x15ef49[_0x461468(0x158)]();if(!_0x3cd56f)throw notificationError(_0x461468(0x113),_0x461468(0x133)+_0xde43b6+_0x461468(0x106));if(_0x3cd56f[_0x461468(0x15a)]>_0x555108)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde43b6+_0x461468(0x132)+_0x555108+_0x461468(0xff));return _0x3cd56f;}function validateChannelConfigFields(_0xa27c3d,_0x59c9d3){const _0x22a984=a171_0x14e415;if(hasOwn(_0x59c9d3,'messageTemplate'))throw forbiddenChannelConfigField(_0x22a984(0x15f));if(_0xa27c3d===_0x22a984(0x15d))for(const _0x4549d1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x59c9d3,_0x4549d1))throw forbiddenChannelConfigField(_0x4549d1);}}function forbiddenChannelConfigField(_0x4205f4){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x4205f4+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x33a7f0,_0x48a7af){const _0x4c4285=a171_0x14e415;return notificationError('notification_config_field_invalid',_0x4c4285(0x133)+_0x33a7f0+_0x4c4285(0x140)+_0x48a7af+'.');}function serializeChannelConfig(_0x375ba5){const _0x4c72a7=a171_0x14e415;return _0x375ba5===null||_0x375ba5===undefined?null:JSON[_0x4c72a7(0x14d)](_0x375ba5);}function redactSensitive(_0x1b6730){const _0x31ec52=a171_0x14e415;return _0x1b6730===null||_0x1b6730===undefined||_0x1b6730===''?null:_0x31ec52(0x13b);}function requireResponseString(_0x30ffca,_0x2d4cdd,_0x135fcc){const _0x16d523=a171_0x14e415;if(typeof _0x30ffca!==_0x16d523(0x131)||_0x30ffca[_0x16d523(0x158)]()==='')throw CliErrors[_0x16d523(0xfe)](_0x16d523(0x142),'Item\x20'+(_0x135fcc+0x1)+_0x16d523(0x150)+_0x2d4cdd+'\x22.');return _0x30ffca[_0x16d523(0x158)]();}function requireExactString(_0x427f24,_0x4f3b27,_0x11f9c5){const _0x4bc41e=a171_0x14e415;if(typeof _0x427f24!==_0x4bc41e(0x131)||_0x427f24['trim']()==='')throw notificationError(_0x4bc41e(0xf7),_0x4bc41e(0x124)+_0x11f9c5+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4f3b27+'\x22.');return _0x427f24[_0x4bc41e(0x158)]();}function a171_0x1ae6(_0x562f64,_0x389363){_0x562f64=_0x562f64-0xed;const _0x2e6be2=a171_0x2e6b();let _0x1ae6e5=_0x2e6be2[_0x562f64];return _0x1ae6e5;}function responseNullableString(_0x82180a,_0x477d5a,_0x157eb7){const _0x93b89c=a171_0x14e415;if(_0x82180a===undefined||_0x82180a===null)return null;if(typeof _0x82180a!==_0x93b89c(0x131))throw notificationError(_0x93b89c(0xf7),_0x93b89c(0x124)+_0x157eb7+'\x20has\x20invalid\x20field\x20\x22'+_0x477d5a+'\x22.');return _0x82180a;}function responseNullableTimeout(_0x23019a,_0x586840,_0x7e5145){const _0x58c81f=a171_0x14e415;if(_0x23019a===undefined||_0x23019a===null)return null;if(!Number['isSafeInteger'](_0x23019a)||_0x23019a<0x0)throw notificationError(_0x58c81f(0xf7),_0x58c81f(0x124)+_0x7e5145+_0x58c81f(0xef)+_0x586840+'\x22.');return _0x23019a;}function normalizeNullableString(_0x207826){const _0x4ba658=a171_0x14e415;return typeof _0x207826===_0x4ba658(0x131)?_0x207826:null;}function isJsonObject(_0x128da7){return _0x128da7!==null&&typeof _0x128da7==='object'&&!Array['isArray'](_0x128da7);}function hasOwn(_0x5e46fd,_0x1d639e){const _0x4f6bb8=a171_0x14e415;return Object['prototype'][_0x4f6bb8(0x134)]['call'](_0x5e46fd,_0x1d639e);}async function readStdin(){const _0x40b86c=a171_0x14e415;let _0x352209='';process['stdin'][_0x40b86c(0x15b)](_0x40b86c(0xfc));for await(const _0x1ebb1f of process[_0x40b86c(0x102)])_0x352209+=_0x1ebb1f;return _0x352209;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a172_0x535dca=a172_0x11b4;(function(_0xd38d92,_0x125e10){const _0x5ed806=a172_0x11b4,_0x55e2c4=_0xd38d92();while(!![]){try{const _0x2424c5=-parseInt(_0x5ed806(0x21b))/0x1*(parseInt(_0x5ed806(0x1f1))/0x2)+-parseInt(_0x5ed806(0x20c))/0x3*(-parseInt(_0x5ed806(0x20e))/0x4)+-parseInt(_0x5ed806(0x1f2))/0x5*(-parseInt(_0x5ed806(0x207))/0x6)+parseInt(_0x5ed806(0x1f0))/0x7*(-parseInt(_0x5ed806(0x200))/0x8)+-parseInt(_0x5ed806(0x20a))/0x9*(parseInt(_0x5ed806(0x210))/0xa)+parseInt(_0x5ed806(0x214))/0xb+-parseInt(_0x5ed806(0x21e))/0xc*(-parseInt(_0x5ed806(0x209))/0xd);if(_0x2424c5===_0x125e10)break;else _0x55e2c4['push'](_0x55e2c4['shift']());}catch(_0x123a66){_0x55e2c4['push'](_0x55e2c4['shift']());}}}(a172_0x3d0a,0xb2e76));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a172_0x11b4(_0x3d4c19,_0x542330){_0x3d4c19=_0x3d4c19-0x1e9;const _0x3d0aa8=a172_0x3d0a();let _0x11b432=_0x3d0aa8[_0x3d4c19];return _0x11b432;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a172_0x535dca(0x21d),a172_0x535dca(0x1f8),a172_0x535dca(0x1f4),a172_0x535dca(0x221)],SCENE_TO_LEGACY_TYPE={'invoice':a172_0x535dca(0x1fb),'general':'General','form':a172_0x535dca(0x1f5),'idCard':a172_0x535dca(0x20d)},SCENE_FLAG={'name':a172_0x535dca(0x1ed),'type':a172_0x535dca(0x216),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a172_0x535dca(0x1f6)},IMAGE_FILE_FLAG={'name':a172_0x535dca(0x1ef),'type':'string','description':a172_0x535dca(0x1f7)},IMAGE_URL_FLAG={'name':a172_0x535dca(0x1fa),'type':a172_0x535dca(0x216),'description':a172_0x535dca(0x1fd)};function normalizeScene(_0x34e502){const _0x1bb01e=a172_0x535dca,_0xedd0c7=_0x34e502['trim']()[_0x1bb01e(0x1fe)]();if(_0xedd0c7===_0x1bb01e(0x201))return _0x1bb01e(0x221);if(_0xedd0c7===_0x1bb01e(0x21d)||_0xedd0c7===_0x1bb01e(0x1f8)||_0xedd0c7==='form')return _0xedd0c7;throw CliErrors[_0x1bb01e(0x208)]('Unsupported\x20OCR\x20scene:\x20'+_0x34e502+_0x1bb01e(0x204)+SUPPORTED_SCENES[_0x1bb01e(0x222)](',\x20'));}function selectedInputs(_0xbde60b){const _0x32afae=a172_0x535dca,_0x102321=_0xbde60b[_0x32afae(0x218)]('image-file')[_0x32afae(0x1ee)](),_0x3ffceb=_0xbde60b[_0x32afae(0x218)]('image-url')[_0x32afae(0x1ee)]();return{'imageFile':_0x102321,'imageUrl':_0x3ffceb,'count':[_0x102321,_0x3ffceb][_0x32afae(0x20f)](Boolean)['length']};}function validateInputSelection(_0x11c5e4){const _0x5f3a33=a172_0x535dca,_0x119800=selectedInputs(_0x11c5e4);if(_0x119800[_0x5f3a33(0x1f3)]!==0x1)throw CliErrors[_0x5f3a33(0x208)](_0x5f3a33(0x223));return _0x119800;}function withScene(_0x1c042a,_0xf783f6,_0x114adf){const _0xb3ae44=a172_0x535dca;return{..._0x1c042a,'scene':_0xf783f6,..._0x114adf?{'sourceFile':{'fileName':_0x114adf['fileName'],'filePath':_0x114adf[_0xb3ae44(0x1ea)]}}:{}};}const ocrRecognize={'service':a172_0x535dca(0x202),'command':'recognize','description':a172_0x535dca(0x21f),'risk':a172_0x535dca(0x21c),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5e0f2b){const _0x15265f=a172_0x535dca,_0xbc8f49=normalizeScene(_0x5e0f2b[_0x15265f(0x218)](_0x15265f(0x1ed))),_0x2708b9=SCENE_TO_LEGACY_TYPE[_0xbc8f49],_0x5d20a6=validateInputSelection(_0x5e0f2b);if(_0x5d20a6['imageUrl']){const _0x37effe=new URLSearchParams({'url':_0x5d20a6['imageUrl'],'type':_0x2708b9,'appCode':_0x5e0f2b[_0x15265f(0x220)]});return{'method':_0x15265f(0x1fc),'url':_0x15265f(0x1e9)+_0x37effe[_0x15265f(0x211)](),'description':_0x15265f(0x1eb)+_0xbc8f49+_0x15265f(0x1f9)};}const _0x4c0cd3=requireDevelopmentUploadFile(_0x5d20a6[_0x15265f(0x1ff)],_0x15265f(0x1ef));return{'method':_0x15265f(0x20b),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x15265f(0x20b),'url':_0x15265f(0x215),'body':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'multipart':{'file':_0x4c0cd3}}},{'method':_0x15265f(0x20b),'url':_0x15265f(0x217),'body':{'filePath':_0x15265f(0x21a),'downloadFlag':![]}},{'method':_0x15265f(0x1fc),'url':_0x15265f(0x219),'query':{'appCode':_0x5e0f2b[_0x15265f(0x220)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2708b9}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xbc8f49+_0x15265f(0x212)};},async 'execute'(_0x1e4262){const _0x1aa6d7=a172_0x535dca,_0x587e42=normalizeScene(_0x1e4262[_0x1aa6d7(0x218)](_0x1aa6d7(0x1ed))),_0x23d1fd=SCENE_TO_LEGACY_TYPE[_0x587e42],_0x37c74c=validateInputSelection(_0x1e4262);if(_0x37c74c[_0x1aa6d7(0x205)]){const _0x5b373d=await recognizeDevelopmentOcr(_0x1e4262[_0x1aa6d7(0x220)],{'url':_0x37c74c[_0x1aa6d7(0x205)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5b373d,_0x587e42)};}const _0x61a7f3=requireDevelopmentUploadFile(_0x37c74c[_0x1aa6d7(0x1ff)],_0x1aa6d7(0x1ef)),_0x5d0d2c=await uploadDevelopmentFile(_0x1e4262[_0x1aa6d7(0x220)],_0x61a7f3[_0x1aa6d7(0x213)]);if(!_0x5d0d2c[_0x1aa6d7(0x1ea)])throw CliErrors[_0x1aa6d7(0x203)](_0x1aa6d7(0x206));const _0x421c53=await queryDevelopmentFileUrl(_0x5d0d2c[_0x1aa6d7(0x1ea)],{'download':![]});if(!_0x421c53[_0x1aa6d7(0x1ec)])throw CliErrors[_0x1aa6d7(0x203)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5ef935=await recognizeDevelopmentOcr(_0x1e4262['appCode'],{'url':_0x421c53[_0x1aa6d7(0x1ec)],'type':_0x23d1fd});return{'ok':!![],'data':withScene(_0x5ef935,_0x587e42,_0x5d0d2c)};}};function a172_0x3d0a(){const _0xf3bd68=['toString','\x20OCR','path','8022289LrHInE','/smartapi/common/uploadFile','string','/smartapi/common/queryFileUrl','str','/smartapi/ocr/recognize-text','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','7sqNTyJ','read','invoice','199668KumfGu','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','appCode','idCard','join','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/smartapi/ocr/recognize-text?','filePath','Preview:\x20recognize\x20','fileUrl','scene','trim','image-file','10235365StknjA','21252dSgBMk','122810adlZBW','count','form','Table','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','general','\x20OCR\x20from\x20URL','image-url','Invoice','GET','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toLowerCase','imageFile','8fnCkrg','idcard','ocr','apiError','.\x20Supported\x20scenes:\x20','imageUrl','File\x20upload\x20response\x20missing\x20filePath.','186yQWBph','validation','403wUXXkC','9QrxTMT','POST','26739dRUOOh','IdCard','284BNQILv','filter','3699860IDHadt'];a172_0x3d0a=function(){return _0xf3bd68;};return a172_0x3d0a();}export const ocrDefinitions=[ocrRecognize];
|