@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/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/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.d.ts +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/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/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.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/template.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/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/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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-routing.js +1 -1
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +2 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -16
- 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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- 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/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/types.d.ts +1 -0
- 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/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/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +4 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-init.md +2 -0
- package/skills/rabetbase/references/rabetbase-kb.md +7 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x2fc943=a140_0x4163;(function(_0x84a020,_0x3d36b3){const _0x4027d6=a140_0x4163,_0x45fea4=_0x84a020();while(!![]){try{const _0xd94a0a=-parseInt(_0x4027d6(0x159))/0x1*(parseInt(_0x4027d6(0x150))/0x2)+parseInt(_0x4027d6(0x102))/0x3*(parseInt(_0x4027d6(0x10c))/0x4)+-parseInt(_0x4027d6(0x14d))/0x5+parseInt(_0x4027d6(0x134))/0x6*(-parseInt(_0x4027d6(0x140))/0x7)+-parseInt(_0x4027d6(0xee))/0x8+-parseInt(_0x4027d6(0x13d))/0x9+parseInt(_0x4027d6(0x107))/0xa;if(_0xd94a0a===_0x3d36b3)break;else _0x45fea4['push'](_0x45fea4['shift']());}catch(_0x53009a){_0x45fea4['push'](_0x45fea4['shift']());}}}(a140_0x1057,0x465d9));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';function a140_0x1057(){const _0x218034=['beforeById','path','expectVisible','pageType','rabetbase\x20menu\x20list\x20--format\x20compress','\x20failed.','body','plan','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','resources','rawFlags','requestedVisible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','type','warnings','split','141HgWlWZ','trim','message','resourcesValid','num','14525400pbTrwx','plannedActions','label','childrenIds','update','45484DUnNHL','url','boolean','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','hash','childrenCount','some','\x20menu(s);\x20skipped\x20','\x20menu(s);\x20skip\x20','get','Response\x20was\x20lost\x20for\x20menu\x20','\x20visibility\x20update\x20could\x20not\x20be\x20verified','set','Final\x20menu\x20visibility\x20readback\x20failed.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','isArray','expected-count','POST','menu_selector_not_found','verification','appCode','pageId','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','update\x20visibility\x20for','byId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','/smartapi/menu/update','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menu','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu_permission_denied','verify\x20menu\x20visibility\x20update','update-menu-visibility','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu-ids','targets','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','code','44274AMJtdH','Would\x20update\x20visibility\x20for\x20','Response\x20was\x20lost\x20and\x20menu\x20','join','before','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','stringify','3545487iUCHjr','expect-visible','validation','385NhWIOK','values','datasetId','paths','\x20must\x20be\x20true\x20or\x20false.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','modelType','push','visibility-update','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','failed','update-recovery','\x20updated,\x20','2595865YCkRAE','menu_expected_count_mismatch','\x20unchanged\x20menu(s).','200726xlQXje','visible','cookie','map','depth','parentId','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','filter','expectedCount','3jcQTNq','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','isSafeInteger','high-risk-write','menuIds','flagMissing','menu_verification_failed','Selected\x20','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','str','sort','update\x20menu\x20visibility','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','menus','string','datasetCode','false','Menu\x20','629680nfWcoa','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','length','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.'];a140_0x1057=function(){return _0x218034;};return a140_0x1057();}function a140_0x4163(_0x46508f,_0x239b08){_0x46508f=_0x46508f-0xee;const _0x10576e=a140_0x1057();let _0x41633a=_0x10576e[_0x46508f];return _0x41633a;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a140_0x2fc943(0x126)}];export const menuVisibilityUpdate={'service':a140_0x2fc943(0x128),'command':a140_0x2fc943(0x148),'description':a140_0x2fc943(0x12e),'risk':a140_0x2fc943(0x15c),'structuredErrors':!![],'flags':[{'name':a140_0x2fc943(0x130),'type':a140_0x2fc943(0x167),'description':a140_0x2fc943(0xef)},{'name':a140_0x2fc943(0x143),'type':'string','description':a140_0x2fc943(0x149)},{'name':a140_0x2fc943(0x151),'type':a140_0x2fc943(0x10e),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a140_0x2fc943(0x13e),'type':a140_0x2fc943(0x10e),'description':a140_0x2fc943(0x15a)},{'name':a140_0x2fc943(0x11c),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3cb7cf){parseInput(_0x3cb7cf),requireExplicitYes(_0x3cb7cf);},async 'dryRun'(_0x137634){const _0xcecb00=a140_0x2fc943,_0x3bfb59=await buildPlan(_0x137634,!![]),_0x458664=_0x3bfb59[_0xcecb00(0xf9)]['plannedActions']?.['length']??0x0,_0xde7bac=_0x3bfb59[_0xcecb00(0xf9)][_0xcecb00(0x131)]['length']-_0x458664;return menuDryRunResult(_0x3bfb59[_0xcecb00(0xf9)],{'method':_0xcecb00(0x11d),'url':_0xcecb00(0x126),'body':{'updates':_0x3bfb59[_0xcecb00(0xf9)][_0xcecb00(0x108)]?.[_0xcecb00(0x153)](_0x2f99c3=>_0x2f99c3[_0xcecb00(0xf8)])??[]},'description':_0xcecb00(0x135)+_0x458664+_0xcecb00(0x114)+_0xde7bac+_0xcecb00(0x14f)});},async 'execute'(_0xb13b74){const _0xf93c19=a140_0x2fc943;requireExplicitYes(_0xb13b74);const _0x46065f=await buildPlan(_0xb13b74,![]);await recheckMutationSnapshot(_0xb13b74,_0x46065f[_0xf93c19(0xf9)],_0xf93c19(0x164));const _0x3c7e03=[],_0x1a2d91=[],_0x5887cc=[];for(const _0x502654 of _0x46065f['plan'][_0xf93c19(0x131)]){if(_0x502654[_0xf93c19(0x138)]['visible']===_0x46065f['plan'][_0xf93c19(0xfd)]){_0x3c7e03[_0xf93c19(0x147)]({'id':_0x502654['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xb13b74['appCode'],_0xb13b74[_0xf93c19(0x152)],{'id':_0x502654['id'],'visible':_0x46065f[_0xf93c19(0xf9)][_0xf93c19(0xfd)]}),_0x3c7e03[_0xf93c19(0x147)]({'id':_0x502654['id'],'updated':!![],'skipped':![]});}catch(_0xb63e25){const _0x2bde04=mapMenuApiError(_0xb63e25,_0xf93c19(0x123),_0x502654['id']);if(isMenuResponseLoss(_0xb63e25)&&_0x2bde04[_0xf93c19(0x133)]!==_0xf93c19(0x12a)){_0x5887cc['push'](_0x502654['id']);continue;}_0x1a2d91[_0xf93c19(0x147)]({'id':_0x502654['id'],'stage':_0xf93c19(0x10b),'code':_0x2bde04['code'],'message':_0x2bde04[_0xf93c19(0x104)]});}}let _0x287a7a;try{_0x287a7a=await fetchMenuSnapshot(_0xb13b74[_0xf93c19(0x120)],_0xb13b74[_0xf93c19(0x152)]);}catch(_0x20ed61){const _0x2ba776=describeMenuErrorCause(_0x20ed61,_0xf93c19(0x12b)),_0x477537=_0x5887cc[_0xf93c19(0x153)](_0x50ac0f=>({'id':_0x50ac0f,'stage':_0xf93c19(0x14b),'code':_0xf93c19(0x15f),'message':_0xf93c19(0x116)+_0x50ac0f+_0xf93c19(0x12f),'requestedStateConfirmed':![],'recovered':![]})),_0x283402={'stage':_0xf93c19(0x11f),'code':_0xf93c19(0x15f),'message':_0xf93c19(0x119),'targetIds':_0x46065f[_0xf93c19(0xf9)][_0xf93c19(0x131)][_0xf93c19(0x153)](_0x49b940=>_0x49b940['id']),'requestedStateConfirmed':![],..._0x2ba776};throw menuFailure(asVerificationError(_0x20ed61,_0xf93c19(0x132)),_0x46065f[_0xf93c19(0xf9)],{'stage':'verification','succeeded':_0x3c7e03,'failedRecords':[..._0x1a2d91,..._0x477537,_0x283402],'warnings':[_0xf93c19(0x13b)],'verification':{'status':_0xf93c19(0x14a),'recoveredCount':0x0,'lookupCommand':_0xf93c19(0xf6)}});}const _0xaa5d70=[];for(const _0x164bea of _0x3c7e03){const _0x4b972c=Number(_0x164bea['id']),_0x299266=_0x46065f[_0xf93c19(0xf2)]['get'](_0x4b972c),_0x228a45=_0x287a7a[_0xf93c19(0x124)][_0xf93c19(0x115)](_0x4b972c);try{verifyVisibilityUpdate(_0x299266,_0x228a45,_0x46065f[_0xf93c19(0xf9)][_0xf93c19(0xfd)]);}catch(_0x5a31dc){const _0xab60bc=asVerificationError(_0x5a31dc,_0xf93c19(0x16a)+_0x4b972c+_0xf93c19(0x117));_0xaa5d70[_0xf93c19(0x147)]({'id':_0x4b972c,'stage':_0xf93c19(0x11f),'code':_0xab60bc[_0xf93c19(0x133)],'message':_0xab60bc[_0xf93c19(0x104)],'requestedStateConfirmed':![]});}}for(const _0x24141d of _0x5887cc){const _0x137f34=_0x46065f[_0xf93c19(0xf2)]['get'](_0x24141d),_0x3b468e=_0x287a7a[_0xf93c19(0x124)][_0xf93c19(0x115)](_0x24141d);try{verifyVisibilityUpdate(_0x137f34,_0x3b468e,_0x46065f[_0xf93c19(0xf9)][_0xf93c19(0xfd)]),_0x3c7e03[_0xf93c19(0x147)]({'id':_0x24141d,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x278d56){const _0x3a73dc=asVerificationError(_0x278d56,_0xf93c19(0x136)+_0x24141d+_0xf93c19(0x139));_0xaa5d70[_0xf93c19(0x147)]({'id':_0x24141d,'stage':_0xf93c19(0x14b),'code':_0x3a73dc[_0xf93c19(0x133)],'message':_0x3a73dc[_0xf93c19(0x104)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0xaa5d70[_0xf93c19(0xf0)]>0x0){const _0x117cdd=_0xaa5d70[_0xf93c19(0x153)](_0x4e90e6=>Number(_0x4e90e6['id'])),_0x2fe915=_0x3c7e03[_0xf93c19(0x157)](_0x4cbd4c=>_0x4cbd4c['recovered']===!![])['length'],_0x28b7a3=menuError(_0xf93c19(0x15f),_0xf93c19(0x156)+_0x117cdd[_0xf93c19(0x137)](',\x20')+'.',_0xf93c19(0x165));throw menuFailure(_0x28b7a3,_0x46065f['plan'],{'stage':_0xf93c19(0x11f),'succeeded':_0x3c7e03,'failedRecords':[..._0x1a2d91,..._0xaa5d70],'warnings':[_0xf93c19(0xfe)],'verification':{'status':_0xf93c19(0x14a),..._0x117cdd[_0xf93c19(0xf0)]===0x1?{'targetId':_0x117cdd[0x0]}:{'targetIds':_0x117cdd},'recoveredCount':_0x2fe915,'lookupCommand':_0xf93c19(0xf6)}});}const _0x5d4d4c=_0x3c7e03[_0xf93c19(0x157)](_0x552ae9=>_0x552ae9['updated']===!![])[_0xf93c19(0xf0)],_0xb1090c=_0x3c7e03['length']-_0x5d4d4c,_0x1b0ba4={..._0x46065f[_0xf93c19(0xf9)],'succeeded':_0x3c7e03,'failed':_0x1a2d91,'warnings':_0x1a2d91[_0xf93c19(0xf0)]>0x0?[..._0x46065f[_0xf93c19(0xf9)]['warnings'],_0xf93c19(0x125)]:_0x46065f[_0xf93c19(0xf9)][_0xf93c19(0x100)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x287a7a['hash'],'matchesRequestedState':_0x1a2d91[_0xf93c19(0xf0)]===0x0,'recoveredCount':_0x5887cc['length']}};return{'ok':_0x1a2d91['length']===0x0,'data':_0x1b0ba4,'message':_0x1a2d91[_0xf93c19(0xf0)]===0x0?'Updated\x20visibility\x20for\x20'+_0x5d4d4c+_0xf93c19(0x113)+_0xb1090c+_0xf93c19(0x14f):'Menu\x20visibility\x20update\x20completed:\x20'+_0x5d4d4c+_0xf93c19(0x14c)+_0xb1090c+'\x20skipped,\x20'+_0x1a2d91[_0xf93c19(0xf0)]+_0xf93c19(0xf7)};}};function parseInput(_0x5f0609){const _0x4ce4d6=a140_0x2fc943,_0x23844d=parseMenuIds(_0x5f0609[_0x4ce4d6(0x162)](_0x4ce4d6(0x130))),_0x590dc4=parseCsv(_0x5f0609['str']('paths'));if(_0x23844d[_0x4ce4d6(0xf0)]===0x0&&_0x590dc4[_0x4ce4d6(0xf0)]===0x0)throw CliErrors[_0x4ce4d6(0x13f)](_0x4ce4d6(0xfa));const _0x67ee58=parseBooleanFlag(_0x5f0609,_0x4ce4d6(0x151),!![]),_0x404092=parseBooleanFlag(_0x5f0609,_0x4ce4d6(0x13e),![]);let _0x31e9aa;if(hasFlag(_0x5f0609,'expected-count')){_0x31e9aa=_0x5f0609[_0x4ce4d6(0x106)]('expected-count');if(!Number[_0x4ce4d6(0x15b)](_0x31e9aa)||_0x31e9aa<0x0)throw CliErrors[_0x4ce4d6(0x13f)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x23844d,'paths':_0x590dc4,'visible':_0x67ee58,'expectVisible':_0x404092,'expectedCount':_0x31e9aa};}async function buildPlan(_0x167e02,_0x22e2bc){const _0x12606e=a140_0x2fc943,_0x20020c=parseInput(_0x167e02),_0x14d40e=await fetchMutationSnapshot(_0x167e02,_0x12606e(0x164)),_0x1f5423=selectTargets(_0x14d40e[_0x12606e(0x166)],_0x20020c[_0x12606e(0x15d)],_0x20020c['paths']);if(_0x20020c[_0x12606e(0x158)]!==undefined&&_0x1f5423[_0x12606e(0xf0)]!==_0x20020c['expectedCount'])throw menuError(_0x12606e(0x14e),_0x12606e(0x160)+_0x1f5423['length']+'\x20menu(s),\x20expected\x20'+_0x20020c['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x20020c['expectVisible']!==undefined){const _0x409f60=_0x1f5423[_0x12606e(0x157)](_0x50461b=>_0x50461b[_0x12606e(0x151)]!==_0x20020c[_0x12606e(0xf4)]);if(_0x409f60[_0x12606e(0xf0)]>0x0)throw menuError('menu_state_drift',_0x12606e(0x145)+_0x409f60[_0x12606e(0x153)](_0x1cc920=>_0x1cc920['id'])[_0x12606e(0x137)](',\x20')+'.',_0x12606e(0x11a));}const _0x37b0b8=_0x1f5423[_0x12606e(0x153)](_0x1e5db4=>({'id':_0x1e5db4['id'],'label':_0x1e5db4[_0x12606e(0x109)],'path':_0x1e5db4[_0x12606e(0xf3)],'before':{'visible':_0x1e5db4['visible']},'after':{'visible':_0x20020c['visible']}})),_0x5a9b14=_0x37b0b8[_0x12606e(0x157)](_0x13ee14=>_0x13ee14['before'][_0x12606e(0x151)]!==_0x20020c[_0x12606e(0x151)])[_0x12606e(0x153)](_0x3814af=>({'stage':_0x12606e(0x12c),'method':_0x12606e(0x11d),'path':_0x12606e(0x126),'body':{'appCode':_0x167e02[_0x12606e(0x120)],'id':_0x3814af['id'],'visible':_0x20020c[_0x12606e(0x151)]}})),_0x2464f8=mutationResult({'operation':_0x12606e(0x148),'selector':{'menuIds':_0x20020c[_0x12606e(0x15d)],'paths':_0x20020c[_0x12606e(0x143)]},'before':{'menus':_0x1f5423[_0x12606e(0x153)](_0x4ba413=>({'id':_0x4ba413['id'],'path':_0x4ba413[_0x12606e(0xf3)],'visible':_0x4ba413[_0x12606e(0x151)]}))},'after':{'menus':_0x1f5423[_0x12606e(0x153)](_0x3ef595=>({'id':_0x3ef595['id'],'path':_0x3ef595['path'],'visible':_0x20020c[_0x12606e(0x151)]}))},'dryRun':_0x22e2bc,'backend':[...BACKEND],'plannedActions':_0x5a9b14,'snapshotHash':_0x14d40e[_0x12606e(0x110)],'warnings':_0x5a9b14[_0x12606e(0xf0)]===0x0?[_0x12606e(0x13a)]:[]});return{'plan':{..._0x2464f8,'requestedVisible':_0x20020c[_0x12606e(0x151)],'targets':_0x37b0b8},'beforeById':new Map(_0x1f5423['map'](_0x5c2956=>[_0x5c2956['id'],_0x5c2956]))};}function selectTargets(_0x29bbc5,_0x284804,_0x4ec104){const _0x92741a=a140_0x2fc943,_0x5030e5=new Map(_0x29bbc5[_0x92741a(0x153)](_0x4233e7=>[_0x4233e7['id'],_0x4233e7])),_0x3e9ffd=new Map(),_0x2e8278=_0x284804[_0x92741a(0x157)](_0x23a2ec=>!_0x5030e5['has'](_0x23a2ec));if(_0x2e8278[_0x92741a(0xf0)]>0x0)throw menuError('menu_selector_not_found',_0x92741a(0x12d)+_0x2e8278[_0x92741a(0x137)](',\x20')+'.',_0x92741a(0x127));for(const _0x123990 of _0x284804){_0x3e9ffd[_0x92741a(0x118)](_0x123990,_0x5030e5['get'](_0x123990));}for(const _0x2e2cd0 of _0x4ec104){const _0x4da482=_0x29bbc5[_0x92741a(0x157)](_0x48ceab=>_0x48ceab[_0x92741a(0xf3)]===_0x2e2cd0);if(_0x4da482[_0x92741a(0xf0)]===0x0)throw menuError(_0x92741a(0x11e),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON['stringify'](_0x2e2cd0)+'.',_0x92741a(0xf1));if(_0x4da482[_0x92741a(0xf0)]>0x1)throw menuError('menu_selector_ambiguous',_0x92741a(0x161)+JSON[_0x92741a(0x13c)](_0x2e2cd0)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x4da482[_0x92741a(0x153)](_0x572dcb=>_0x572dcb['id'])['join'](',\x20')+'.');const _0x59f99e=_0x4da482[0x0];_0x3e9ffd['set'](_0x59f99e['id'],_0x59f99e);}return[..._0x3e9ffd[_0x92741a(0x141)]()];}function parseMenuIds(_0x33d268){const _0x16d8db=a140_0x2fc943,_0x41e14e=parseCsv(_0x33d268),_0x218344=_0x41e14e[_0x16d8db(0x153)](Number);if(_0x218344[_0x16d8db(0x112)](_0x5a10de=>!Number[_0x16d8db(0x15b)](_0x5a10de)||_0x5a10de<=0x0))throw CliErrors[_0x16d8db(0x13f)](_0x16d8db(0x122));return[...new Set(_0x218344)];}function parseCsv(_0x395d64){const _0x2c1178=a140_0x2fc943;return[...new Set(_0x395d64[_0x2c1178(0x101)](',')[_0x2c1178(0x153)](_0x3d3e4e=>_0x3d3e4e[_0x2c1178(0x103)]())['filter'](Boolean))];}function parseBooleanFlag(_0x56681c,_0x41ccdb,_0x4c7f3c){const _0x2b0c11=a140_0x2fc943;if(!hasFlag(_0x56681c,_0x41ccdb)){if(_0x4c7f3c)throw CliErrors[_0x2b0c11(0x15e)](_0x41ccdb);return undefined;}const _0x1c80b7=_0x56681c[_0x2b0c11(0xfc)][_0x41ccdb];if(_0x1c80b7===!![]||_0x1c80b7===![])return _0x1c80b7;if(_0x1c80b7==='true')return!![];if(_0x1c80b7===_0x2b0c11(0x169))return![];throw CliErrors[_0x2b0c11(0x13f)]('--'+_0x41ccdb+_0x2b0c11(0x144));}function verifyVisibilityUpdate(_0x5cd8d7,_0x2179ae,_0x2b8169){const _0x55554c=a140_0x2fc943;assertVerified(!!_0x2179ae,_0x55554c(0x16a)+_0x5cd8d7['id']+_0x55554c(0x129)),assertVerified(_0x2179ae['visible']===_0x2b8169,_0x55554c(0x16a)+_0x5cd8d7['id']+_0x55554c(0x10f));const _0x2ff6c7=[['id',_0x2179ae['id'],_0x5cd8d7['id']],[_0x55554c(0x155),_0x2179ae[_0x55554c(0x155)],_0x5cd8d7['parentId']],[_0x55554c(0x154),_0x2179ae[_0x55554c(0x154)],_0x5cd8d7[_0x55554c(0x154)]],['label',_0x2179ae['label'],_0x5cd8d7[_0x55554c(0x109)]],[_0x55554c(0xf3),_0x2179ae[_0x55554c(0xf3)],_0x5cd8d7[_0x55554c(0xf3)]],[_0x55554c(0x10d),_0x2179ae[_0x55554c(0x10d)],_0x5cd8d7[_0x55554c(0x10d)]],[_0x55554c(0xff),_0x2179ae[_0x55554c(0xff)],_0x5cd8d7[_0x55554c(0xff)]],[_0x55554c(0x163),_0x2179ae[_0x55554c(0x163)],_0x5cd8d7[_0x55554c(0x163)]],[_0x55554c(0xfb),_0x2179ae[_0x55554c(0xfb)],_0x5cd8d7[_0x55554c(0xfb)]],[_0x55554c(0x105),_0x2179ae[_0x55554c(0x105)],_0x5cd8d7[_0x55554c(0x105)]],['childrenIds',_0x2179ae[_0x55554c(0x10a)],_0x5cd8d7['childrenIds']],[_0x55554c(0x111),_0x2179ae[_0x55554c(0x111)],_0x5cd8d7['childrenCount']],['pageId',_0x2179ae[_0x55554c(0x121)],_0x5cd8d7[_0x55554c(0x121)]],[_0x55554c(0xf5),_0x2179ae[_0x55554c(0xf5)],_0x5cd8d7[_0x55554c(0xf5)]],[_0x55554c(0x146),_0x2179ae['modelType'],_0x5cd8d7[_0x55554c(0x146)]],[_0x55554c(0x142),_0x2179ae[_0x55554c(0x142)],_0x5cd8d7[_0x55554c(0x142)]],[_0x55554c(0x168),_0x2179ae[_0x55554c(0x168)],_0x5cd8d7['datasetCode']]];for(const [_0x31cf45,_0x1d696b,_0x51f5da]of _0x2ff6c7){assertVerified(sameValue(_0x1d696b,_0x51f5da),'Menu\x20'+_0x5cd8d7['id']+'\x20'+_0x31cf45+'\x20changed\x20unexpectedly.');}}function sameValue(_0x598afa,_0x252288){const _0x4ac1ea=a140_0x2fc943;if(Array[_0x4ac1ea(0x11b)](_0x598afa)||Array['isArray'](_0x252288))return JSON[_0x4ac1ea(0x13c)](_0x598afa)===JSON[_0x4ac1ea(0x13c)](_0x252288);return _0x598afa===_0x252288;}
|
|
1
|
+
const a140_0x4ea6f3=a140_0x1897;(function(_0x76bb04,_0x6023de){const _0x6bb434=a140_0x1897,_0x51779d=_0x76bb04();while(!![]){try{const _0x23dc23=parseInt(_0x6bb434(0x200))/0x1+-parseInt(_0x6bb434(0x22a))/0x2*(-parseInt(_0x6bb434(0x1da))/0x3)+-parseInt(_0x6bb434(0x24a))/0x4*(-parseInt(_0x6bb434(0x209))/0x5)+-parseInt(_0x6bb434(0x217))/0x6+-parseInt(_0x6bb434(0x1e2))/0x7*(parseInt(_0x6bb434(0x227))/0x8)+-parseInt(_0x6bb434(0x1f3))/0x9*(-parseInt(_0x6bb434(0x24b))/0xa)+-parseInt(_0x6bb434(0x239))/0xb*(-parseInt(_0x6bb434(0x230))/0xc);if(_0x23dc23===_0x6023de)break;else _0x51779d['push'](_0x51779d['shift']());}catch(_0x18155d){_0x51779d['push'](_0x51779d['shift']());}}}(a140_0x27f6,0xccb60));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':a140_0x4ea6f3(0x246),'path':'/smartapi/menu/update'}];function a140_0x1897(_0x1050c2,_0x514379){_0x1050c2=_0x1050c2-0x1cf;const _0x27f675=a140_0x27f6();let _0x18973b=_0x27f675[_0x1050c2];return _0x18973b;}export const menuVisibilityUpdate={'service':a140_0x4ea6f3(0x242),'command':a140_0x4ea6f3(0x237),'description':a140_0x4ea6f3(0x244),'risk':a140_0x4ea6f3(0x21b),'structuredErrors':!![],'flags':[{'name':a140_0x4ea6f3(0x1ee),'type':a140_0x4ea6f3(0x1d6),'description':a140_0x4ea6f3(0x214)},{'name':a140_0x4ea6f3(0x20c),'type':a140_0x4ea6f3(0x1d6),'description':a140_0x4ea6f3(0x1f8)},{'name':'visible','type':a140_0x4ea6f3(0x221),'required':!![],'description':a140_0x4ea6f3(0x241)},{'name':a140_0x4ea6f3(0x1fe),'type':a140_0x4ea6f3(0x221),'description':a140_0x4ea6f3(0x1de)},{'name':a140_0x4ea6f3(0x1cf),'type':a140_0x4ea6f3(0x1fc),'description':a140_0x4ea6f3(0x1d4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x325398){parseInput(_0x325398),requireExplicitYes(_0x325398);},async 'dryRun'(_0x58ced6){const _0x48bfd6=a140_0x4ea6f3,_0x5ecf1f=await buildPlan(_0x58ced6,!![]),_0x4e3f6e=_0x5ecf1f[_0x48bfd6(0x208)][_0x48bfd6(0x216)]?.['length']??0x0,_0x9932c0=_0x5ecf1f[_0x48bfd6(0x208)][_0x48bfd6(0x22e)][_0x48bfd6(0x22c)]-_0x4e3f6e;return menuDryRunResult(_0x5ecf1f[_0x48bfd6(0x208)],{'method':'POST','url':_0x48bfd6(0x21a),'body':{'updates':_0x5ecf1f[_0x48bfd6(0x208)][_0x48bfd6(0x216)]?.[_0x48bfd6(0x213)](_0x43e5d8=>_0x43e5d8['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x4e3f6e+_0x48bfd6(0x21f)+_0x9932c0+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x56f625){const _0x645abf=a140_0x4ea6f3;requireExplicitYes(_0x56f625);const _0x598ba2=await buildPlan(_0x56f625,![]);await recheckMutationSnapshot(_0x56f625,_0x598ba2['plan'],_0x645abf(0x240));const _0x2d3e20=[],_0x313148=[],_0x44ca77=[];for(const _0x4c63c9 of _0x598ba2[_0x645abf(0x208)][_0x645abf(0x22e)]){if(_0x4c63c9['before'][_0x645abf(0x235)]===_0x598ba2[_0x645abf(0x208)]['requestedVisible']){_0x2d3e20['push']({'id':_0x4c63c9['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x56f625[_0x645abf(0x1ec)],_0x56f625['cookie'],{'id':_0x4c63c9['id'],'visible':_0x598ba2['plan'][_0x645abf(0x248)]}),_0x2d3e20[_0x645abf(0x1f7)]({'id':_0x4c63c9['id'],'updated':!![],'skipped':![]});}catch(_0x4d4f10){const _0x3f258d=mapMenuApiError(_0x4d4f10,_0x645abf(0x206),_0x4c63c9['id']);if(isMenuResponseLoss(_0x4d4f10)&&_0x3f258d[_0x645abf(0x23d)]!==_0x645abf(0x1d7)){_0x44ca77[_0x645abf(0x1f7)](_0x4c63c9['id']);continue;}_0x313148['push']({'id':_0x4c63c9['id'],'stage':_0x645abf(0x218),'code':_0x3f258d[_0x645abf(0x23d)],'message':_0x3f258d['message']});}}let _0x40ca56;try{_0x40ca56=await fetchMenuSnapshot(_0x56f625[_0x645abf(0x1ec)],_0x56f625[_0x645abf(0x1d0)]);}catch(_0xf749de){const _0x556db2=describeMenuErrorCause(_0xf749de,_0x645abf(0x1eb)),_0x205b14=_0x44ca77[_0x645abf(0x213)](_0x4b30d=>({'id':_0x4b30d,'stage':'update-recovery','code':_0x645abf(0x20b),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x4b30d+_0x645abf(0x205),'requestedStateConfirmed':![],'recovered':![]})),_0x13a9d4={'stage':'verification','code':_0x645abf(0x20b),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x598ba2[_0x645abf(0x208)][_0x645abf(0x22e)][_0x645abf(0x213)](_0x14b747=>_0x14b747['id']),'requestedStateConfirmed':![],..._0x556db2};throw menuFailure(asVerificationError(_0xf749de,_0x645abf(0x1e4)),_0x598ba2[_0x645abf(0x208)],{'stage':_0x645abf(0x23e),'succeeded':_0x2d3e20,'failedRecords':[..._0x313148,..._0x205b14,_0x13a9d4],'warnings':[_0x645abf(0x222)],'verification':{'status':_0x645abf(0x249),'recoveredCount':0x0,'lookupCommand':_0x645abf(0x231)}});}const _0x2bffcd=[];for(const _0x12c743 of _0x2d3e20){const _0x1a915a=Number(_0x12c743['id']),_0x460a37=_0x598ba2['beforeById'][_0x645abf(0x1f2)](_0x1a915a),_0x73f94a=_0x40ca56[_0x645abf(0x233)][_0x645abf(0x1f2)](_0x1a915a);try{verifyVisibilityUpdate(_0x460a37,_0x73f94a,_0x598ba2[_0x645abf(0x208)][_0x645abf(0x248)]);}catch(_0x188a0f){const _0xbab4cc=asVerificationError(_0x188a0f,'Menu\x20'+_0x1a915a+_0x645abf(0x1e7));_0x2bffcd['push']({'id':_0x1a915a,'stage':_0x645abf(0x23e),'code':_0xbab4cc[_0x645abf(0x23d)],'message':_0xbab4cc[_0x645abf(0x21c)],'requestedStateConfirmed':![]});}}for(const _0x48af07 of _0x44ca77){const _0x2b5668=_0x598ba2[_0x645abf(0x1db)][_0x645abf(0x1f2)](_0x48af07),_0x30aa67=_0x40ca56[_0x645abf(0x233)]['get'](_0x48af07);try{verifyVisibilityUpdate(_0x2b5668,_0x30aa67,_0x598ba2[_0x645abf(0x208)][_0x645abf(0x248)]),_0x2d3e20[_0x645abf(0x1f7)]({'id':_0x48af07,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5a0622){const _0x2e8ee1=asVerificationError(_0x5a0622,_0x645abf(0x23b)+_0x48af07+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x2bffcd[_0x645abf(0x1f7)]({'id':_0x48af07,'stage':'update-recovery','code':_0x2e8ee1[_0x645abf(0x23d)],'message':_0x2e8ee1[_0x645abf(0x21c)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2bffcd['length']>0x0){const _0x25e182=_0x2bffcd[_0x645abf(0x213)](_0x63f648=>Number(_0x63f648['id'])),_0x4bdba9=_0x2d3e20[_0x645abf(0x1d1)](_0x469bbc=>_0x469bbc['recovered']===!![])[_0x645abf(0x22c)],_0x358e96=menuError(_0x645abf(0x20b),_0x645abf(0x215)+_0x25e182[_0x645abf(0x1d2)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x358e96,_0x598ba2[_0x645abf(0x208)],{'stage':_0x645abf(0x23e),'succeeded':_0x2d3e20,'failedRecords':[..._0x313148,..._0x2bffcd],'warnings':[_0x645abf(0x234)],'verification':{'status':_0x645abf(0x249),..._0x25e182['length']===0x1?{'targetId':_0x25e182[0x0]}:{'targetIds':_0x25e182},'recoveredCount':_0x4bdba9,'lookupCommand':_0x645abf(0x231)}});}const _0x2adf0e=_0x2d3e20['filter'](_0xfbebac=>_0xfbebac[_0x645abf(0x20e)]===!![])['length'],_0x1a25fb=_0x2d3e20[_0x645abf(0x22c)]-_0x2adf0e,_0x5d206b={..._0x598ba2[_0x645abf(0x208)],'succeeded':_0x2d3e20,'failed':_0x313148,'warnings':_0x313148[_0x645abf(0x22c)]>0x0?[..._0x598ba2[_0x645abf(0x208)][_0x645abf(0x23c)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x598ba2[_0x645abf(0x208)][_0x645abf(0x23c)],'verification':{'checkedBy':_0x645abf(0x24e),'snapshotHash':_0x40ca56[_0x645abf(0x232)],'matchesRequestedState':_0x313148[_0x645abf(0x22c)]===0x0,'recoveredCount':_0x44ca77[_0x645abf(0x22c)]}};return{'ok':_0x313148[_0x645abf(0x22c)]===0x0,'data':_0x5d206b,'message':_0x313148[_0x645abf(0x22c)]===0x0?_0x645abf(0x1d5)+_0x2adf0e+_0x645abf(0x1ea)+_0x1a25fb+_0x645abf(0x247):_0x645abf(0x212)+_0x2adf0e+_0x645abf(0x22f)+_0x1a25fb+_0x645abf(0x229)+_0x313148[_0x645abf(0x22c)]+_0x645abf(0x1e3)};}};function a140_0x27f6(){const _0x52fe5a=['\x20was\x20not\x20found\x20during\x20visibility\x20verification.','\x20menu(s);\x20skip\x20','modelType','boolean','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','depth','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','expectVisible','2828464TrlxTF','expectedCount','\x20skipped,\x20','65542gYLFMQ','has','length','update-menu-visibility','targets','\x20updated,\x20','187548hxHkFe','rabetbase\x20menu\x20list\x20--format\x20compress','hash','byId','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','visible','rawFlags','visibility-update','resources','572dTGaXI','stringify','Response\x20was\x20lost\x20and\x20menu\x20','warnings','code','verification','childrenIds','update\x20menu\x20visibility','Requested\x20menu\x20visibility','menu','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','isArray','POST','\x20unchanged\x20menu(s).','requestedVisible','failed','45524YpcGeO','206210caoLpX','menu_selector_not_found','\x20must\x20be\x20true\x20or\x20false.','menu\x20list','childrenCount','expected-count','cookie','filter','join','path','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Updated\x20visibility\x20for\x20','string','menu_permission_denied','datasetId','Selected\x20','135VoGtYt','beforeById','sort','\x20menu(s),\x20expected\x20','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','some','resourcesValid','pageId','28mqyLYr','\x20failed.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menuIds','trim','\x20visibility\x20update\x20could\x20not\x20be\x20verified','before','flagMissing','\x20menu(s);\x20skipped\x20','verify\x20menu\x20visibility\x20update','appCode','isSafeInteger','menu-ids','parentId','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20changed\x20unexpectedly.','get','144tvWqhn','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Menu\x20path\x20selector\x20not\x20found:\x20','values','push','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','str','validation','Menu\x20id\x20selector(s)\x20not\x20found:\x20','number','label','expect-visible','url','13903wzHKTW','menu_state_drift','menus','Menu\x20','set','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','update\x20visibility\x20for','pageType','plan','180kmHfgN','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','menu_verification_failed','paths','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','updated','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','type','Menu\x20visibility\x20update\x20completed:\x20','map','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','plannedActions','4729380EVhYha','update','split','/smartapi/menu/update','high-risk-write','message','datasetCode'];a140_0x27f6=function(){return _0x52fe5a;};return a140_0x27f6();}function parseInput(_0x4dca91){const _0x33fd3a=a140_0x4ea6f3,_0x33f584=parseMenuIds(_0x4dca91[_0x33fd3a(0x1f9)]('menu-ids')),_0x3d89c2=parseCsv(_0x4dca91[_0x33fd3a(0x1f9)](_0x33fd3a(0x20c)));if(_0x33f584[_0x33fd3a(0x22c)]===0x0&&_0x3d89c2['length']===0x0)throw CliErrors[_0x33fd3a(0x1fa)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x2c2d39=parseBooleanFlag(_0x4dca91,_0x33fd3a(0x235),!![]),_0x17790b=parseBooleanFlag(_0x4dca91,_0x33fd3a(0x1fe),![]);let _0x9210f3;if(hasFlag(_0x4dca91,_0x33fd3a(0x1cf))){_0x9210f3=_0x4dca91['num'](_0x33fd3a(0x1cf));if(!Number[_0x33fd3a(0x1ed)](_0x9210f3)||_0x9210f3<0x0)throw CliErrors[_0x33fd3a(0x1fa)](_0x33fd3a(0x210));}return{'menuIds':_0x33f584,'paths':_0x3d89c2,'visible':_0x2c2d39,'expectVisible':_0x17790b,'expectedCount':_0x9210f3};}async function buildPlan(_0x39b95f,_0x124037){const _0xb3058c=a140_0x4ea6f3,_0x439bcc=parseInput(_0x39b95f),_0x43906c=await fetchMutationSnapshot(_0x39b95f,_0xb3058c(0x240)),_0x2befc9=selectTargets(_0x43906c[_0xb3058c(0x202)],_0x439bcc[_0xb3058c(0x1e5)],_0x439bcc['paths']);if(_0x439bcc[_0xb3058c(0x228)]!==undefined&&_0x2befc9['length']!==_0x439bcc['expectedCount'])throw menuError('menu_expected_count_mismatch',_0xb3058c(0x1d9)+_0x2befc9['length']+_0xb3058c(0x1dd)+_0x439bcc['expectedCount']+'.',_0xb3058c(0x20a));if(_0x439bcc[_0xb3058c(0x226)]!==undefined){const _0x58b8a0=_0x2befc9[_0xb3058c(0x1d1)](_0x42cccc=>_0x42cccc[_0xb3058c(0x235)]!==_0x439bcc[_0xb3058c(0x226)]);if(_0x58b8a0[_0xb3058c(0x22c)]>0x0)throw menuError(_0xb3058c(0x201),_0xb3058c(0x223)+_0x58b8a0[_0xb3058c(0x213)](_0x3348d6=>_0x3348d6['id'])[_0xb3058c(0x1d2)](',\x20')+'.',_0xb3058c(0x1f4));}const _0x46e5e0=_0x2befc9[_0xb3058c(0x213)](_0x2afa86=>({'id':_0x2afa86['id'],'label':_0x2afa86[_0xb3058c(0x1fd)],'path':_0x2afa86['path'],'before':{'visible':_0x2afa86[_0xb3058c(0x235)]},'after':{'visible':_0x439bcc['visible']}})),_0x50704a=_0x46e5e0['filter'](_0x1bc92b=>_0x1bc92b[_0xb3058c(0x1e8)]['visible']!==_0x439bcc[_0xb3058c(0x235)])[_0xb3058c(0x213)](_0x206d3c=>({'stage':_0xb3058c(0x22d),'method':_0xb3058c(0x246),'path':_0xb3058c(0x21a),'body':{'appCode':_0x39b95f[_0xb3058c(0x1ec)],'id':_0x206d3c['id'],'visible':_0x439bcc[_0xb3058c(0x235)]}})),_0x201a4a=mutationResult({'operation':_0xb3058c(0x237),'selector':{'menuIds':_0x439bcc['menuIds'],'paths':_0x439bcc[_0xb3058c(0x20c)]},'before':{'menus':_0x2befc9[_0xb3058c(0x213)](_0x5c9049=>({'id':_0x5c9049['id'],'path':_0x5c9049[_0xb3058c(0x1d3)],'visible':_0x5c9049['visible']}))},'after':{'menus':_0x2befc9[_0xb3058c(0x213)](_0x3bfce5=>({'id':_0x3bfce5['id'],'path':_0x3bfce5[_0xb3058c(0x1d3)],'visible':_0x439bcc['visible']}))},'dryRun':_0x124037,'backend':[...BACKEND],'plannedActions':_0x50704a,'snapshotHash':_0x43906c['hash'],'warnings':_0x50704a[_0xb3058c(0x22c)]===0x0?[_0xb3058c(0x20d)]:[]});return{'plan':{..._0x201a4a,'requestedVisible':_0x439bcc[_0xb3058c(0x235)],'targets':_0x46e5e0},'beforeById':new Map(_0x2befc9[_0xb3058c(0x213)](_0x2a0470=>[_0x2a0470['id'],_0x2a0470]))};}function selectTargets(_0x53a402,_0x1d522e,_0x450396){const _0x5b78e8=a140_0x4ea6f3,_0x2ca6c5=new Map(_0x53a402['map'](_0x14c66c=>[_0x14c66c['id'],_0x14c66c])),_0x1ad90c=new Map(),_0x43c040=_0x1d522e[_0x5b78e8(0x1d1)](_0x3f3fb1=>!_0x2ca6c5[_0x5b78e8(0x22b)](_0x3f3fb1));if(_0x43c040[_0x5b78e8(0x22c)]>0x0)throw menuError(_0x5b78e8(0x24c),_0x5b78e8(0x1fb)+_0x43c040['join'](',\x20')+'.',_0x5b78e8(0x20f));for(const _0x53ee04 of _0x1d522e){_0x1ad90c['set'](_0x53ee04,_0x2ca6c5['get'](_0x53ee04));}for(const _0x3dee99 of _0x450396){const _0x435109=_0x53a402[_0x5b78e8(0x1d1)](_0x40d946=>_0x40d946[_0x5b78e8(0x1d3)]===_0x3dee99);if(_0x435109[_0x5b78e8(0x22c)]===0x0)throw menuError(_0x5b78e8(0x24c),_0x5b78e8(0x1f5)+JSON[_0x5b78e8(0x23a)](_0x3dee99)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x435109[_0x5b78e8(0x22c)]>0x1)throw menuError('menu_selector_ambiguous',_0x5b78e8(0x243)+JSON[_0x5b78e8(0x23a)](_0x3dee99)+'.',_0x5b78e8(0x225)+_0x435109[_0x5b78e8(0x213)](_0x3c39a0=>_0x3c39a0['id'])[_0x5b78e8(0x1d2)](',\x20')+'.');const _0x5e5820=_0x435109[0x0];_0x1ad90c[_0x5b78e8(0x204)](_0x5e5820['id'],_0x5e5820);}return[..._0x1ad90c[_0x5b78e8(0x1f6)]()];}function parseMenuIds(_0x2d718a){const _0x60efa8=a140_0x4ea6f3,_0x5a8457=parseCsv(_0x2d718a),_0x27aedc=_0x5a8457[_0x60efa8(0x213)](Number);if(_0x27aedc[_0x60efa8(0x1df)](_0x2ba0bd=>!Number[_0x60efa8(0x1ed)](_0x2ba0bd)||_0x2ba0bd<=0x0))throw CliErrors['validation'](_0x60efa8(0x1f0));return[...new Set(_0x27aedc)];}function parseCsv(_0x3d307e){const _0x1c908d=a140_0x4ea6f3;return[...new Set(_0x3d307e[_0x1c908d(0x219)](',')[_0x1c908d(0x213)](_0x50ce19=>_0x50ce19[_0x1c908d(0x1e6)]())[_0x1c908d(0x1d1)](Boolean))];}function parseBooleanFlag(_0x4806a0,_0x46888e,_0x5ead84){const _0x156fab=a140_0x4ea6f3;if(!hasFlag(_0x4806a0,_0x46888e)){if(_0x5ead84)throw CliErrors[_0x156fab(0x1e9)](_0x46888e);return undefined;}const _0x3c9942=_0x4806a0[_0x156fab(0x236)][_0x46888e];if(_0x3c9942===!![]||_0x3c9942===![])return _0x3c9942;if(_0x3c9942==='true')return!![];if(_0x3c9942==='false')return![];throw CliErrors[_0x156fab(0x1fa)]('--'+_0x46888e+_0x156fab(0x24d));}function verifyVisibilityUpdate(_0xc377b6,_0x29d03e,_0x48f35d){const _0x38a1b8=a140_0x4ea6f3;assertVerified(!!_0x29d03e,_0x38a1b8(0x203)+_0xc377b6['id']+_0x38a1b8(0x21e)),assertVerified(_0x29d03e[_0x38a1b8(0x235)]===_0x48f35d,_0x38a1b8(0x203)+_0xc377b6['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x2c5785=[['id',_0x29d03e['id'],_0xc377b6['id']],[_0x38a1b8(0x1ef),_0x29d03e[_0x38a1b8(0x1ef)],_0xc377b6[_0x38a1b8(0x1ef)]],[_0x38a1b8(0x224),_0x29d03e[_0x38a1b8(0x224)],_0xc377b6[_0x38a1b8(0x224)]],[_0x38a1b8(0x1fd),_0x29d03e['label'],_0xc377b6['label']],[_0x38a1b8(0x1d3),_0x29d03e['path'],_0xc377b6[_0x38a1b8(0x1d3)]],['url',_0x29d03e[_0x38a1b8(0x1ff)],_0xc377b6[_0x38a1b8(0x1ff)]],[_0x38a1b8(0x211),_0x29d03e[_0x38a1b8(0x211)],_0xc377b6[_0x38a1b8(0x211)]],[_0x38a1b8(0x1dc),_0x29d03e[_0x38a1b8(0x1dc)],_0xc377b6[_0x38a1b8(0x1dc)]],['resources',_0x29d03e['resources'],_0xc377b6[_0x38a1b8(0x238)]],['resourcesValid',_0x29d03e[_0x38a1b8(0x1e0)],_0xc377b6[_0x38a1b8(0x1e0)]],[_0x38a1b8(0x23f),_0x29d03e['childrenIds'],_0xc377b6[_0x38a1b8(0x23f)]],[_0x38a1b8(0x24f),_0x29d03e['childrenCount'],_0xc377b6['childrenCount']],['pageId',_0x29d03e['pageId'],_0xc377b6[_0x38a1b8(0x1e1)]],[_0x38a1b8(0x207),_0x29d03e[_0x38a1b8(0x207)],_0xc377b6[_0x38a1b8(0x207)]],[_0x38a1b8(0x220),_0x29d03e[_0x38a1b8(0x220)],_0xc377b6[_0x38a1b8(0x220)]],[_0x38a1b8(0x1d8),_0x29d03e[_0x38a1b8(0x1d8)],_0xc377b6[_0x38a1b8(0x1d8)]],[_0x38a1b8(0x21d),_0x29d03e[_0x38a1b8(0x21d)],_0xc377b6[_0x38a1b8(0x21d)]]];for(const [_0x1d0377,_0x1a7d74,_0x49cfff]of _0x2c5785){assertVerified(sameValue(_0x1a7d74,_0x49cfff),_0x38a1b8(0x203)+_0xc377b6['id']+'\x20'+_0x1d0377+_0x38a1b8(0x1f1));}}function sameValue(_0x4f0bc2,_0xe5ab28){const _0x5c8d86=a140_0x4ea6f3;if(Array[_0x5c8d86(0x245)](_0x4f0bc2)||Array[_0x5c8d86(0x245)](_0xe5ab28))return JSON[_0x5c8d86(0x23a)](_0x4f0bc2)===JSON['stringify'](_0xe5ab28);return _0x4f0bc2===_0xe5ab28;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a141_0x2f76(){const _0x4413c6=['1021299JcAgSX','522614lFrKFq','input','config-create','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','POST','isSafeInteger','Created\x20notification\x20config\x20','connectTimeout','6305820HDrTqI',';\x20do\x20not\x20resubmit.','write','create','mutation','279YktKJM','planned','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configCode','document','endpointUrl','configName','4kgIsZJ','channelConfig','5ChlGAk','notification_config_create_outcome_unknown','172192pmsBxA','Inspect\x20with\x20','readTimeout',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','11197949wLazcl','description','verification','1070802ndSKpU','/notification/channel-config/create','26740lkmvCh','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','verified','appCode','notification'];a141_0x2f76=function(){return _0x4413c6;};return a141_0x2f76();}const a141_0xb2489a=a141_0x177d;(function(_0x575156,_0x328ecd){const _0x20c333=a141_0x177d,_0x27ac08=_0x575156();while(!![]){try{const _0x202cbc=parseInt(_0x20c333(0x194))/0x1+-parseInt(_0x20c333(0x19c))/0x2+-parseInt(_0x20c333(0x19b))/0x3*(parseInt(_0x20c333(0x188))/0x4)+parseInt(_0x20c333(0x18a))/0x5*(-parseInt(_0x20c333(0x17c))/0x6)+parseInt(_0x20c333(0x191))/0x7+parseInt(_0x20c333(0x18c))/0x8+parseInt(_0x20c333(0x181))/0x9*(-parseInt(_0x20c333(0x196))/0xa);if(_0x202cbc===_0x328ecd)break;else _0x27ac08['push'](_0x27ac08['shift']());}catch(_0x325b87){_0x27ac08['push'](_0x27ac08['shift']());}}}(a141_0x2f76,0xe980d));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 a141_0x177d(_0x4b3ceb,_0x39ef22){_0x4b3ceb=_0x4b3ceb-0x178;const _0x2f7670=a141_0x2f76();let _0x177d0c=_0x2f7670[_0x4b3ceb];return _0x177d0c;}const CREATE_PATH=a141_0xb2489a(0x195);async function prepareCreate(_0x1e59e3){const _0x54f3bd=a141_0xb2489a,_0xcda5a9=await readNotificationDocument(_0x1e59e3,_0x54f3bd(0x17f)),_0x4a25b5=createMutationInput(_0x1e59e3[_0x54f3bd(0x199)],_0xcda5a9);return{'document':_0xcda5a9,'input':_0x4a25b5,'planned':projectNotificationConfig({'appCode':_0x1e59e3[_0x54f3bd(0x199)],'configName':_0xcda5a9[_0x54f3bd(0x187)],'channelType':_0xcda5a9[_0x54f3bd(0x190)],'endpointUrl':_0xcda5a9[_0x54f3bd(0x186)],'channelConfig':_0xcda5a9[_0x54f3bd(0x189)],'description':_0xcda5a9[_0x54f3bd(0x192)],'connectTimeout':_0xcda5a9[_0x54f3bd(0x17b)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xcda5a9[_0x54f3bd(0x18e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a141_0xb2489a(0x19a),'command':a141_0xb2489a(0x19e),'description':a141_0xb2489a(0x197),'risk':a141_0xb2489a(0x17e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2f1da4){assertSingleNotificationSource(_0x2f1da4);},async 'dryRun'(_0x10fb3a){const _0x4282f6=a141_0xb2489a,_0x16543f=await prepareCreate(_0x10fb3a),_0x8b8ce2=notificationLookupCommand(_0x10fb3a['appCode'],_0x16543f[_0x4282f6(0x185)][_0x4282f6(0x190)]);return asDryRunResult({'operation':_0x4282f6(0x17f),'selector':{'appCode':_0x10fb3a[_0x4282f6(0x199)],'configName':_0x16543f[_0x4282f6(0x185)][_0x4282f6(0x187)],'channelType':_0x16543f[_0x4282f6(0x185)]['channelType']},'before':null,'after':_0x16543f[_0x4282f6(0x182)],'dryRun':!![],'backend':{'method':_0x4282f6(0x178),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x8b8ce2}},{'method':_0x4282f6(0x178),'url':CREATE_PATH});},async 'execute'(_0x47cd4d){const _0xa0e273=a141_0xb2489a,_0xea58e5=await prepareCreate(_0x47cd4d),_0x399ad9=notificationLookupCommand(_0x47cd4d['appCode'],_0xea58e5[_0xa0e273(0x185)]['channelType']);let _0x508ac7;try{_0x508ac7=await createNotificationChannelConfig(_0xea58e5[_0xa0e273(0x19d)]);}catch(_0x527828){if(isPlatformTransportFailure(_0x527828))throw notificationError(_0xa0e273(0x18b),_0xa0e273(0x19f),'Inspect\x20with\x20'+_0x399ad9+_0xa0e273(0x17d));throw safeApiFailure(_0xa0e273(0x17f),_0xa0e273(0x180),_0xa0e273(0x18d)+_0x399ad9+_0xa0e273(0x18f));}if(!Number[_0xa0e273(0x179)](_0x508ac7)||_0x508ac7<=0x0)throw notificationError(_0xa0e273(0x18b),_0xa0e273(0x183),_0xa0e273(0x18d)+_0x399ad9+_0xa0e273(0x17d));let _0x50b775;try{const _0x1f40aa=await getNotificationChannelConfig(_0x508ac7,_0x47cd4d[_0xa0e273(0x199)]);_0x50b775=normalizeExactNotificationConfig(_0x1f40aa,_0x508ac7,_0x47cd4d[_0xa0e273(0x199)]);}catch{throw safeApiFailure(_0xa0e273(0x17f),_0xa0e273(0x193),_0xa0e273(0x18d)+_0x399ad9+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0xa0e273(0x17f),'selector':{'appCode':_0x50b775[_0xa0e273(0x199)],'id':_0x50b775['id'],'configCode':_0x50b775[_0xa0e273(0x184)],'configName':_0x50b775[_0xa0e273(0x187)],'channelType':_0x50b775[_0xa0e273(0x190)]},'before':null,'after':projectNotificationConfig(_0x50b775),'dryRun':![],'backend':{'method':_0xa0e273(0x178),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0xa0e273(0x198),'lookupCommand':_0x399ad9}},'message':_0xa0e273(0x17a)+_0x50b775['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a142_0x2899d0=a142_0x195a;(function(_0x3ce3ae,_0x267846){const _0x4f21a6=a142_0x195a,_0x308b75=_0x3ce3ae();while(!![]){try{const _0x155296=-parseInt(_0x4f21a6(0x160))/0x1+-parseInt(_0x4f21a6(0x157))/0x2*(-parseInt(_0x4f21a6(0x16a))/0x3)+parseInt(_0x4f21a6(0x168))/0x4*(parseInt(_0x4f21a6(0x161))/0x5)+parseInt(_0x4f21a6(0x154))/0x6*(-parseInt(_0x4f21a6(0x15c))/0x7)+parseInt(_0x4f21a6(0x15d))/0x8*(-parseInt(_0x4f21a6(0x165))/0x9)+-parseInt(_0x4f21a6(0x166))/0xa+parseInt(_0x4f21a6(0x15a))/0xb*(parseInt(_0x4f21a6(0x167))/0xc);if(_0x155296===_0x267846)break;else _0x308b75['push'](_0x308b75['shift']());}catch(_0x224dfe){_0x308b75['push'](_0x308b75['shift']());}}}(a142_0x396e,0x3a547));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a142_0x195a(_0x9fa9dd,_0x27cab6){_0x9fa9dd=_0x9fa9dd-0x151;const _0x396e9a=a142_0x396e();let _0x195ad2=_0x396e9a[_0x9fa9dd];return _0x195ad2;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a142_0x396e(){const _0x40c5d5=['unshift','appCode','verified','6Wjfwet','notification_config_delete_verification_failed','planned','229344ndQAZh','\x20remains\x20present\x20after\x20delete.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','169147WtWGIs','mutation','2945243nZdvKM','1151704GnCkQQ','Notification\x20config\x20','Inspect\x20with\x20','462937uMoSAc','10KIFyHg','POST','config-delete','high-risk-write','9PLBNVC','447880lREKpG','456dDemOH','766028PsNieZ','notification_config_delete_verification_unavailable','9NAnCqy','notification','before',';\x20do\x20not\x20resubmit\x20automatically.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification_config_delete_outcome_unknown','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','\x20delete\x20could\x20not\x20be\x20verified.','channelType','delete'];a142_0x396e=function(){return _0x40c5d5;};return a142_0x396e();}const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a142_0x2899d0(0x170);async function prepareDelete(_0x5b1adb){const _0x50fec6=a142_0x2899d0,_0x21c387=readNotificationId(_0x5b1adb),_0x27c450=await requireExactNotificationConfig(_0x5b1adb[_0x50fec6(0x152)],_0x21c387,_0x50fec6(0x173));return{'id':_0x21c387,'before':_0x27c450};}export const notificationConfigDelete={'service':a142_0x2899d0(0x16b),'command':a142_0x2899d0(0x163),'description':a142_0x2899d0(0x16e),'risk':a142_0x2899d0(0x164),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5c161d){readNotificationId(_0x5c161d),requireNotificationExplicitYes(_0x5c161d);},async 'dryRun'(_0x33e93b){const _0x2d597b=a142_0x2899d0,_0x156bdc=await prepareDelete(_0x33e93b),_0x59c600=notificationLookupCommand(_0x33e93b[_0x2d597b(0x152)],_0x156bdc[_0x2d597b(0x16c)][_0x2d597b(0x172)]);return asDryRunResult({'operation':_0x2d597b(0x173),'selector':notificationSelector(_0x156bdc[_0x2d597b(0x16c)]),'before':projectNotificationConfig(_0x156bdc[_0x2d597b(0x16c)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x2d597b(0x156),'lookupCommand':_0x59c600}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x1a2497){const _0x5f24c9=a142_0x2899d0;requireNotificationExplicitYes(_0x1a2497);const _0x162aee=await prepareDelete(_0x1a2497),_0x10f9d2=notificationLookupCommand(_0x1a2497[_0x5f24c9(0x152)],_0x162aee['before']['channelType']);let _0x41a8aa=![];try{await deleteNotificationChannelConfig(_0x162aee['id'],_0x1a2497[_0x5f24c9(0x152)]);}catch(_0x274dd8){if(!isPlatformTransportFailure(_0x274dd8))throw safeApiFailure('delete',_0x5f24c9(0x15b),_0x5f24c9(0x15f)+_0x10f9d2+_0x5f24c9(0x159));_0x41a8aa=!![];}let _0x3db16d;try{_0x3db16d=await listNotificationChannelConfigs(_0x1a2497[_0x5f24c9(0x152)],_0x162aee[_0x5f24c9(0x16c)][_0x5f24c9(0x172)]),validateNotificationDeleteReadback(_0x3db16d,_0x1a2497[_0x5f24c9(0x152)],_0x162aee[_0x5f24c9(0x16c)][_0x5f24c9(0x172)]);}catch{throw notificationError(_0x41a8aa?_0x5f24c9(0x16f):_0x5f24c9(0x169),_0x5f24c9(0x15e)+_0x162aee['id']+_0x5f24c9(0x171),'Inspect\x20with\x20'+_0x10f9d2+_0x5f24c9(0x16d));}if(_0x3db16d['some'](_0x37fb48=>_0x37fb48['id']===_0x162aee['id']))throw notificationError(_0x41a8aa?_0x5f24c9(0x16f):_0x5f24c9(0x155),_0x5f24c9(0x15e)+_0x162aee['id']+_0x5f24c9(0x158),_0x5f24c9(0x15f)+_0x10f9d2+_0x5f24c9(0x16d));const _0xed95ff=[REFERENCE_WARNING];return _0x41a8aa&&_0xed95ff[_0x5f24c9(0x151)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x5f24c9(0x173),'selector':notificationSelector(_0x162aee[_0x5f24c9(0x16c)]),'before':projectNotificationConfig(_0x162aee[_0x5f24c9(0x16c)]),'after':null,'dryRun':![],'backend':{'method':_0x5f24c9(0x162),'path':DELETE_PATH},'warnings':_0xed95ff,'verification':{'status':_0x5f24c9(0x153),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x41a8aa,'lookupCommand':_0x10f9d2}},'message':'Deleted\x20notification\x20config\x20'+_0x162aee['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x281d30=a143_0x2da7;(function(_0x147f22,_0x426a0a){const _0xc08ad5=a143_0x2da7,_0x143845=_0x147f22();while(!![]){try{const _0x562593=parseInt(_0xc08ad5(0xde))/0x1+parseInt(_0xc08ad5(0xd1))/0x2*(-parseInt(_0xc08ad5(0xd9))/0x3)+parseInt(_0xc08ad5(0xd7))/0x4+-parseInt(_0xc08ad5(0xda))/0x5+parseInt(_0xc08ad5(0xd8))/0x6+-parseInt(_0xc08ad5(0xcf))/0x7*(parseInt(_0xc08ad5(0xce))/0x8)+-parseInt(_0xc08ad5(0xd5))/0x9*(-parseInt(_0xc08ad5(0xd0))/0xa);if(_0x562593===_0x426a0a)break;else _0x143845['push'](_0x143845['shift']());}catch(_0x4eb97f){_0x143845['push'](_0x143845['shift']());}}}(a143_0x5659,0xe5aeb));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a143_0x2da7(_0x416596,_0x407cb4){_0x416596=_0x416596-0xcd;const _0x56597a=a143_0x5659();let _0x2da705=_0x56597a[_0x416596];return _0x2da705;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a143_0x5659(){const _0x542960=['2137780YBFpCN','2717202KxcWon','1074555sdLluo','6655000oYKpTG','read','EMAIL','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','36503ERvBxw','string','Found\x20','54344hihruK','1442tSbHkb','10RJxjFT','2LCbvFM','map','appCode','notification','27049563XuDgkf','length'];a143_0x5659=function(){return _0x542960;};return a143_0x5659();}export const notificationConfigList={'service':a143_0x281d30(0xd4),'command':'config-list','description':a143_0x281d30(0xdd),'risk':a143_0x281d30(0xdb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a143_0x281d30(0xdf),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a143_0x281d30(0xdc)}],async 'validate'(_0x3d4cff){readNotificationChannelType(_0x3d4cff);},async 'execute'(_0x2984b3){const _0x426ac8=a143_0x281d30,_0x117088=readNotificationChannelType(_0x2984b3),_0x449343=await listNotificationChannelConfigs(_0x2984b3['appCode'],_0x117088),_0x2c14cb=_0x449343[_0x426ac8(0xd2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2984b3[_0x426ac8(0xd3)],'channelType':_0x117088,'count':_0x2c14cb[_0x426ac8(0xd6)],'configs':_0x2c14cb},'message':_0x426ac8(0xcd)+_0x2c14cb['length']+'\x20'+_0x117088+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a144_0x856433=a144_0x4861;(function(_0x2c5a3c,_0x5d4fb5){const _0x465e9d=a144_0x4861,_0x51d8dc=_0x2c5a3c();while(!![]){try{const _0x306ce1=-parseInt(_0x465e9d(0x7d))/0x1+parseInt(_0x465e9d(0x6c))/0x2*(parseInt(_0x465e9d(0x85))/0x3)+parseInt(_0x465e9d(0x70))/0x4*(parseInt(_0x465e9d(0x87))/0x5)+parseInt(_0x465e9d(0x88))/0x6*(parseInt(_0x465e9d(0x74))/0x7)+-parseInt(_0x465e9d(0x8e))/0x8+parseInt(_0x465e9d(0x73))/0x9*(parseInt(_0x465e9d(0x72))/0xa)+parseInt(_0x465e9d(0x84))/0xb*(parseInt(_0x465e9d(0x89))/0xc);if(_0x306ce1===_0x5d4fb5)break;else _0x51d8dc['push'](_0x51d8dc['shift']());}catch(_0x35a926){_0x51d8dc['push'](_0x51d8dc['shift']());}}}(a144_0x5afd,0xc918f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a144_0x856433(0x7c);function a144_0x5afd(){const _0x25cbb2=['notification_config_update_outcome_unknown','notification_config_update_verification_failed','70851xvQHND','2913WIxKzq','appCode','95SrqmBx','12ENnlGD','828fDCBFt','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','planned','config-update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','10459208dppSGe','notification',';\x20do\x20not\x20resubmit\x20automatically.','\x20via\x20','before','2174ajvyFf','Updated\x20notification\x20config\x20','allMatch','channelType','97220OAwHcd','high-risk-write','10tuOfhS','2818467tVnIVg','5047357unXICd','update','POST','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','patch','Inspect\x20with\x20--id\x20','verifiedFields','/notification/channel-config/update','1585870jMsWVv','notification_config_update_verification_unavailable','payload','Notification\x20config\x20','provesChange'];a144_0x5afd=function(){return _0x25cbb2;};return a144_0x5afd();}function a144_0x4861(_0x420f05,_0x10d9c5){_0x420f05=_0x420f05-0x6b;const _0x5afd65=a144_0x5afd();let _0x486153=_0x5afd65[_0x420f05];return _0x486153;}async function prepareUpdate(_0x25cfad){const _0x538cfc=a144_0x856433,_0x2ef0a8=readNotificationId(_0x25cfad),_0x2c72c2=await readNotificationDocument(_0x25cfad,_0x538cfc(0x75)),_0x3cb672=await requireExactNotificationConfig(_0x25cfad['appCode'],_0x2ef0a8,_0x538cfc(0x75));return{'id':_0x2ef0a8,'patch':_0x2c72c2,'before':_0x3cb672,'payload':mergeUpdateInput(_0x3cb672,_0x2c72c2),'planned':plannedUpdateProjection(_0x3cb672,_0x2c72c2)};}export const notificationConfigUpdate={'service':a144_0x856433(0x8f),'command':a144_0x856433(0x8c),'description':a144_0x856433(0x77),'risk':a144_0x856433(0x71),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x12c789){readNotificationId(_0x12c789),assertSingleNotificationSource(_0x12c789),requireNotificationExplicitYes(_0x12c789);},async 'dryRun'(_0x442c96){const _0xb13bd2=a144_0x856433,_0x431cce=await prepareUpdate(_0x442c96),_0x2be955=notificationLookupCommand(_0x442c96[_0xb13bd2(0x86)],_0x431cce[_0xb13bd2(0x6b)][_0xb13bd2(0x6f)]);return asDryRunResult({'operation':_0xb13bd2(0x75),'selector':notificationSelector(_0x431cce['before']),'before':projectNotificationConfig(_0x431cce[_0xb13bd2(0x6b)]),'after':_0x431cce[_0xb13bd2(0x8b)],'dryRun':!![],'backend':{'method':_0xb13bd2(0x76),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0xb13bd2(0x8b),'lookupCommand':_0x2be955}},{'method':_0xb13bd2(0x76),'url':UPDATE_PATH});},async 'execute'(_0x86e3a){const _0x5eba00=a144_0x856433;requireNotificationExplicitYes(_0x86e3a);const _0x285629=await prepareUpdate(_0x86e3a),_0x1b6f7e=notificationLookupCommand(_0x86e3a[_0x5eba00(0x86)],_0x285629[_0x5eba00(0x6b)][_0x5eba00(0x6f)]);let _0x211d0d=![];try{await updateNotificationChannelConfig(_0x285629[_0x5eba00(0x7f)]);}catch(_0x249e3b){if(!isPlatformTransportFailure(_0x249e3b))throw safeApiFailure('update','mutation','Inspect\x20ID\x20'+_0x285629['id']+'\x20with\x20'+_0x1b6f7e+_0x5eba00(0x8d));_0x211d0d=!![];}let _0x1231ea;try{const _0x5aba27=await getNotificationChannelConfig(_0x285629['id'],_0x86e3a[_0x5eba00(0x86)]);_0x1231ea=normalizeExactNotificationConfig(_0x5aba27,_0x285629['id'],_0x86e3a['appCode']);}catch{throw notificationError(_0x211d0d?_0x5eba00(0x82):_0x5eba00(0x7e),_0x5eba00(0x80)+_0x285629['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x5eba00(0x7a)+_0x285629['id']+_0x5eba00(0x91)+_0x1b6f7e+_0x5eba00(0x90));}const _0x34c05b=requestedSafeFieldsMatch(_0x285629[_0x5eba00(0x6b)],_0x1231ea,_0x285629[_0x5eba00(0x79)]);if(!_0x34c05b[_0x5eba00(0x6e)]||_0x211d0d&&!_0x34c05b[_0x5eba00(0x81)])throw notificationError(_0x211d0d?_0x5eba00(0x82):_0x5eba00(0x83),_0x5eba00(0x80)+_0x285629['id']+_0x5eba00(0x8a),_0x5eba00(0x7a)+_0x285629['id']+_0x5eba00(0x91)+_0x1b6f7e+_0x5eba00(0x90));const _0x48eac5=_0x211d0d?[_0x5eba00(0x78)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x1231ea),'before':projectNotificationConfig(_0x285629[_0x5eba00(0x6b)]),'after':projectNotificationConfig(_0x1231ea),'dryRun':![],'backend':{'method':_0x5eba00(0x76),'path':UPDATE_PATH},'warnings':_0x48eac5,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x211d0d,'verifiedFields':_0x34c05b[_0x5eba00(0x7b)],'lookupCommand':_0x1b6f7e}},'message':_0x5eba00(0x6d)+_0x1231ea['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54bd4c,_0x3d7fbe){const _0x3b07d7=a145_0xd16e,_0x4edb31=_0x54bd4c();while(!![]){try{const _0x55f1ba=parseInt(_0x3b07d7(0x92))/0x1+-parseInt(_0x3b07d7(0x91))/0x2*(-parseInt(_0x3b07d7(0x8f))/0x3)+parseInt(_0x3b07d7(0x8d))/0x4+parseInt(_0x3b07d7(0x8c))/0x5*(-parseInt(_0x3b07d7(0x90))/0x6)+-parseInt(_0x3b07d7(0x8b))/0x7+parseInt(_0x3b07d7(0x8e))/0x8+-parseInt(_0x3b07d7(0x8a))/0x9;if(_0x55f1ba===_0x3d7fbe)break;else _0x4edb31['push'](_0x4edb31['shift']());}catch(_0x24684b){_0x4edb31['push'](_0x4edb31['shift']());}}}(a145_0x6d89,0x8f82f));import{notificationConfigList}from'../../commands/notification/config-list.js';function a145_0x6d89(){const _0x4887c5=['329121RgRDZL','375714HtLuuX','16BMplTY','954902AhJgJl','18844209DbroMH','1568553XZjWjT','10fNCpAq','1974664CyCEnO','5637736VscZaq'];a145_0x6d89=function(){return _0x4887c5;};return a145_0x6d89();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a145_0xd16e(_0x138fdc,_0x15093a){_0x138fdc=_0x138fdc-0x8a;const _0x6d89aa=a145_0x6d89();let _0xd16e3b=_0x6d89aa[_0x138fdc];return _0xd16e3b;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a146_0x29555b=a146_0x4f3f;(function(_0x2b1968,_0x709479){const _0x397234=a146_0x4f3f,_0x3b285a=_0x2b1968();while(!![]){try{const _0x345ea=-parseInt(_0x397234(0xed))/0x1+parseInt(_0x397234(0xbe))/0x2*(parseInt(_0x397234(0xbc))/0x3)+parseInt(_0x397234(0xbd))/0x4*(-parseInt(_0x397234(0xd2))/0x5)+-parseInt(_0x397234(0xad))/0x6+-parseInt(_0x397234(0x114))/0x7+-parseInt(_0x397234(0xfc))/0x8+parseInt(_0x397234(0xc9))/0x9*(parseInt(_0x397234(0x10c))/0xa);if(_0x345ea===_0x709479)break;else _0x3b285a['push'](_0x3b285a['shift']());}catch(_0x2db2a3){_0x3b285a['push'](_0x3b285a['shift']());}}}(a146_0x3f48,0xea3e0));import{readFile}from'node:fs/promises';function a146_0x3f48(){const _0x20b1ce=['stdin','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','9441186QYtFgJ','FEISHU','\x22\x20must\x20be\x20a\x20non-empty\x20string.','readTimeout','\x22configName\x22.','Invalid\x20--','<redacted>','parse','failed','bool','endpointUrl','Item\x20','create','validation','str','3gPXrOu','12WdSkgD','1347298PdIOSx','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20--type\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_field_unknown','\x20has\x20invalid\x20field\x20\x22','a\x20non-empty\x20string','some','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20characters.','Notification\x20config\x20','90KOlwAd','messageTemplate','notification_config_field_required','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','number','ccList','replyTo','name','1514830PtkOyH','a\x20supported\x20string','_unavailable','WECOM','notification_config_confirmation_required','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_json_invalid','Application-level\x20notification\x20config\x20ID','path','\x20failed.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','isArray','channelType','length','appCode','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','hasOwnProperty','\x20has\x20an\x20invalid\x20appCode.','\x20has\x20an\x20invalid\x20id.','endpointUrlRaw','configCode','update','channelConfigRaw','includes','isSafeInteger','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','978706QTafli','Notification\x20JSON\x20field\x20\x22','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','environment\x20variable\x20','description','entries','\x22\x20must\x20be\x20','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Invalid\x20notification\x20config\x20response.','Allowed\x20values:\x20','notification_config_response_invalid','prototype','EMAIL','\x20must\x20be\x20an\x20object.','notification_config_field_forbidden','14233000sHPyvU','num','trim','notification_config_field_invalid','kind','a\x20JSON\x20object\x20or\x20null','keys','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','apiError','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Missing\x20notification\x20JSON\x20source.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20config\x20list\x20item\x20','join','dry-run','6142530KEhauj','\x22channelType\x22.','channelConfig','Notification\x20JSON\x20from\x20','file','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20an\x20invalid\x20channelType.','createTime','4315241RvHbIC','boolean','\x20is\x20invalid.','a\x20JSON\x20object','Notification\x20JSON\x20channelConfig\x20field\x20\x22','yes','from-env','utf8','every','configName','has','stringify','env','recipients','file\x20','string','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','connectTimeout','notification_config_id_invalid','push','notification_config_source_unavailable','\x22\x20cannot\x20exceed\x20','notification_config_channel_field_forbidden','channelCode'];a146_0x3f48=function(){return _0x20b1ce;};return a146_0x3f48();}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=[a146_0x29555b(0xf9),a146_0x29555b(0xae),'DINGTALK',a146_0x29555b(0xd5),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a146_0x29555b(0x11d),a146_0x29555b(0xde),a146_0x29555b(0xb7),a146_0x29555b(0x10e),a146_0x29555b(0xf1),a146_0x29555b(0xa4),a146_0x29555b(0xb0)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a146_0x29555b(0xe0),a146_0x29555b(0xe6),a146_0x29555b(0xaa)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets',a146_0x29555b(0x121),a146_0x29555b(0xcf),'bccList',a146_0x29555b(0xd0),'subjectPrefix','fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a146_0x29555b(0xa2),'required':![],'description':a146_0x29555b(0xef)},{'name':a146_0x29555b(0xab),'type':a146_0x29555b(0x115),'required':![],'default':![],'description':a146_0x29555b(0x106)},{'name':'from-env','type':'string','required':![],'description':a146_0x29555b(0x103)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a146_0x29555b(0xce),'required':!![],'description':a146_0x29555b(0xd9)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x51b02c,_0x3ebede,_0x298c02){return new CliError(_0x51b02c,0x1,_0x3ebede,_0x298c02);}export function readNotificationId(_0x47e115){const _0x56d1cf=a146_0x29555b,_0x558818=_0x47e115[_0x56d1cf(0xfd)]('id');if(!Number[_0x56d1cf(0xea)](_0x558818)||_0x558818<=0x0)throw notificationError(_0x56d1cf(0xa5),_0x56d1cf(0xc1));return _0x558818;}export function requireNotificationExplicitYes(_0x54d055){const _0x5d29b8=a146_0x29555b;if(_0x54d055[_0x5d29b8(0xb6)](_0x5d29b8(0x10b))||_0x54d055[_0x5d29b8(0xb6)](_0x5d29b8(0x119)))return;throw notificationError(_0x5d29b8(0xd6),_0x5d29b8(0x108),_0x5d29b8(0xa3));}export function readNotificationChannelType(_0x380e64,_0x3de8e7='type',_0x2b09e5=a146_0x29555b(0xf9)){const _0x4f8bb8=a146_0x29555b,_0xf42768=_0x380e64['str'](_0x3de8e7)[_0x4f8bb8(0xfe)]()||_0x2b09e5;if(!NOTIFICATION_CHANNEL_TYPES[_0x4f8bb8(0xe9)](_0xf42768))throw CliErrors[_0x4f8bb8(0xba)](_0x4f8bb8(0xb2)+_0x3de8e7+':\x20'+_0xf42768,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x4f8bb8(0x10a)](',\x20')+'.');return _0xf42768;}export function assertSingleNotificationSource(_0x3b0b2b){const _0x3318b5=a146_0x29555b,_0x2d125a=[],_0x26c84c=_0x3b0b2b[_0x3318b5(0xbb)]('file')[_0x3318b5(0xfe)]();if(_0x26c84c)_0x2d125a['push']({'kind':_0x3318b5(0x110),'path':_0x26c84c});if(_0x3b0b2b['bool']('stdin'))_0x2d125a['push']({'kind':_0x3318b5(0xab)});const _0x7c834a=_0x3b0b2b['str'](_0x3318b5(0x11a))[_0x3318b5(0xfe)]();if(_0x7c834a)_0x2d125a[_0x3318b5(0xa6)]({'kind':'env','name':_0x7c834a});if(_0x2d125a[_0x3318b5(0xdf)]===0x0)throw CliErrors[_0x3318b5(0xba)](_0x3318b5(0x107),_0x3318b5(0xe1));if(_0x2d125a['length']>0x1)throw CliErrors[_0x3318b5(0xba)](_0x3318b5(0xd7),_0x3318b5(0xe1));return _0x2d125a[0x0];}export async function readNotificationDocument(_0x5035fe,_0x358533){const _0x326235=a146_0x29555b,_0x4178f5=assertSingleNotificationSource(_0x5035fe),_0xaf91e2=_0x4178f5[_0x326235(0x100)]===_0x326235(0x110)?_0x326235(0xa1)+_0x4178f5['path']:_0x4178f5[_0x326235(0x100)]===_0x326235(0x120)?_0x326235(0xf0)+_0x4178f5['name']:_0x326235(0xab);let _0x1502ba;try{if(_0x4178f5[_0x326235(0x100)]===_0x326235(0x110))_0x1502ba=await readFile(_0x4178f5[_0x326235(0xda)],_0x326235(0x11b));else{if(_0x4178f5[_0x326235(0x100)]===_0x326235(0x120)){if(!(_0x4178f5[_0x326235(0xd1)]in process.env))throw notificationError(_0x326235(0xa7),_0x326235(0xc6)+_0x4178f5[_0x326235(0xd1)]);_0x1502ba=process.env[_0x4178f5.name]??'';}else _0x1502ba=await readStdin();}}catch(_0x50c13a){if(_0x50c13a instanceof CliError)throw _0x50c13a;throw notificationError(_0x326235(0xa7),_0x326235(0xdc)+_0xaf91e2+'.');}let _0x48a146;try{_0x48a146=JSON[_0x326235(0xb4)](_0x1502ba);}catch{throw notificationError('notification_config_json_invalid',_0x326235(0x10f)+_0xaf91e2+_0x326235(0x116),_0x326235(0x111));}if(!isJsonObject(_0x48a146))throw notificationError(_0x326235(0xd8),_0x326235(0x10f)+_0xaf91e2+_0x326235(0xfa));return validateNotificationDocument(_0x48a146,_0x358533);}export function projectNotificationListConfig(_0x3be64a,_0x5aa0fa){const _0x4c10e=a146_0x29555b;return{'id':typeof _0x3be64a['id']==='number'?_0x3be64a['id']:null,'configCode':requireResponseString(_0x3be64a[_0x4c10e(0xe6)],_0x4c10e(0xe6),_0x5aa0fa),'configName':requireResponseString(_0x3be64a['configName'],_0x4c10e(0x11d),_0x5aa0fa),'channelType':requireResponseString(_0x3be64a[_0x4c10e(0xde)],_0x4c10e(0xde),_0x5aa0fa),'description':normalizeNullableString(_0x3be64a[_0x4c10e(0xf1)]),'createTime':normalizeNullableString(_0x3be64a[_0x4c10e(0x113)]),'updateTime':normalizeNullableString(_0x3be64a['updateTime'])};}export function normalizeExactNotificationConfig(_0x566994,_0x4dd531,_0x2c2cac){const _0x5df8ef=a146_0x29555b;if(!Number[_0x5df8ef(0xea)](_0x566994['id'])||_0x566994['id']!==_0x4dd531)throw notificationError(_0x5df8ef(0xf7),_0x5df8ef(0xcd)+_0x4dd531+'.');if(_0x566994['appCode']!==_0x2c2cac)throw notificationError(_0x5df8ef(0xf7),_0x5df8ef(0xc8)+_0x4dd531+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4deeb5=requireExactString(_0x566994[_0x5df8ef(0x11d)],_0x5df8ef(0x11d),_0x4dd531),_0x22bc08=requireExactString(_0x566994['configCode'],_0x5df8ef(0xe6),_0x4dd531),_0x52b54f=requireExactString(_0x566994[_0x5df8ef(0xde)],_0x5df8ef(0xde),_0x4dd531);if(!NOTIFICATION_CHANNEL_TYPES[_0x5df8ef(0xe9)](_0x52b54f))throw notificationError(_0x5df8ef(0xf7),_0x5df8ef(0xc8)+_0x4dd531+'\x20has\x20an\x20unsupported\x20channelType.');const _0x28506d=responseNullableString(_0x566994['endpointUrl'],'endpointUrl',_0x4dd531),_0x38779d=responseNullableString(_0x566994[_0x5df8ef(0x10e)],'channelConfig',_0x4dd531),_0x33d7db=responseNullableString(_0x566994[_0x5df8ef(0xf1)],_0x5df8ef(0xf1),_0x4dd531),_0x5168ee=responseNullableTimeout(_0x566994['connectTimeout'],_0x5df8ef(0xa4),_0x4dd531),_0x4eb0e0=responseNullableTimeout(_0x566994[_0x5df8ef(0xb0)],_0x5df8ef(0xb0),_0x4dd531);return{'id':_0x4dd531,'appCode':_0x2c2cac,'configCode':_0x22bc08,'configName':_0x4deeb5,'channelType':_0x52b54f,'endpointUrl':redactSensitive(_0x28506d),'channelConfig':redactSensitive(_0x38779d),'description':_0x33d7db,'connectTimeout':_0x5168ee,'readTimeout':_0x4eb0e0,'endpointUrlRaw':_0x28506d,'channelConfigRaw':_0x38779d};}export async function requireExactNotificationConfig(_0x126ba7,_0x4252b3,_0x41c75b){const _0x1f3018=a146_0x29555b;let _0x7f7f2e;try{_0x7f7f2e=await getNotificationChannelConfig(_0x4252b3,_0x126ba7);}catch{throw safeApiFailure(_0x41c75b,'preflight',_0x1f3018(0xeb)+_0x126ba7+_0x1f3018(0xbf));}return normalizeExactNotificationConfig(_0x7f7f2e,_0x4252b3,_0x126ba7);}export function projectNotificationConfig(_0x3f81b5){const _0x5323b7=a146_0x29555b;return{'id':_0x3f81b5['id']??null,'appCode':_0x3f81b5[_0x5323b7(0xe0)],'configCode':_0x3f81b5[_0x5323b7(0xe6)]??null,'configName':_0x3f81b5[_0x5323b7(0x11d)],'channelType':_0x3f81b5[_0x5323b7(0xde)],'endpointUrl':redactSensitive(_0x3f81b5[_0x5323b7(0xb7)]),'channelConfig':redactSensitive(_0x3f81b5[_0x5323b7(0x10e)]),'description':_0x3f81b5[_0x5323b7(0xf1)]??null,'connectTimeout':_0x3f81b5[_0x5323b7(0xa4)]??null,'readTimeout':_0x3f81b5[_0x5323b7(0xb0)]??null};}export function notificationSelector(_0x35b2ce){const _0x12c78a=a146_0x29555b;return{'appCode':_0x35b2ce[_0x12c78a(0xe0)],'id':_0x35b2ce['id'],'configCode':_0x35b2ce['configCode'],'configName':_0x35b2ce[_0x12c78a(0x11d)],'channelType':_0x35b2ce[_0x12c78a(0xde)]};}export function createMutationInput(_0x3bbaec,_0x6fdfb8){const _0x187178=a146_0x29555b;return{'appCode':_0x3bbaec,'configName':_0x6fdfb8[_0x187178(0x11d)],'channelType':_0x6fdfb8['channelType'],...hasOwn(_0x6fdfb8,_0x187178(0xb7))?{'endpointUrl':_0x6fdfb8[_0x187178(0xb7)]}:{},...hasOwn(_0x6fdfb8,_0x187178(0x10e))?{'channelConfig':serializeChannelConfig(_0x6fdfb8['channelConfig'])}:{},...hasOwn(_0x6fdfb8,'description')?{'description':_0x6fdfb8[_0x187178(0xf1)]}:{},...hasOwn(_0x6fdfb8,_0x187178(0xa4))?{'connectTimeout':_0x6fdfb8[_0x187178(0xa4)]}:{},...hasOwn(_0x6fdfb8,_0x187178(0xb0))?{'readTimeout':_0x6fdfb8[_0x187178(0xb0)]}:{}};}export function mergeUpdateInput(_0x342677,_0x44456d){const _0x4d0b51=a146_0x29555b;return{'id':_0x342677['id'],'appCode':_0x342677[_0x4d0b51(0xe0)],'configName':_0x44456d[_0x4d0b51(0x11d)]??_0x342677[_0x4d0b51(0x11d)],'channelType':_0x44456d[_0x4d0b51(0xde)]??_0x342677[_0x4d0b51(0xde)],'endpointUrl':hasOwn(_0x44456d,_0x4d0b51(0xb7))?_0x44456d[_0x4d0b51(0xb7)]:_0x342677[_0x4d0b51(0xe5)],'channelConfig':hasOwn(_0x44456d,_0x4d0b51(0x10e))?serializeChannelConfig(_0x44456d['channelConfig']):_0x342677[_0x4d0b51(0xe8)],'description':hasOwn(_0x44456d,'description')?_0x44456d[_0x4d0b51(0xf1)]:_0x342677[_0x4d0b51(0xf1)],'connectTimeout':hasOwn(_0x44456d,_0x4d0b51(0xa4))?_0x44456d[_0x4d0b51(0xa4)]:_0x342677[_0x4d0b51(0xa4)],'readTimeout':hasOwn(_0x44456d,_0x4d0b51(0xb0))?_0x44456d[_0x4d0b51(0xb0)]:_0x342677[_0x4d0b51(0xb0)]};}export function plannedUpdateProjection(_0xb61e,_0x5f47b2){const _0x2b28b5=a146_0x29555b;return projectNotificationConfig({'id':_0xb61e['id'],'appCode':_0xb61e[_0x2b28b5(0xe0)],'configCode':_0xb61e[_0x2b28b5(0xe6)],'configName':_0x5f47b2['configName']??_0xb61e[_0x2b28b5(0x11d)],'channelType':_0x5f47b2[_0x2b28b5(0xde)]??_0xb61e['channelType'],'endpointUrl':hasOwn(_0x5f47b2,_0x2b28b5(0xb7))?_0x5f47b2[_0x2b28b5(0xb7)]:_0xb61e[_0x2b28b5(0xe5)],'channelConfig':hasOwn(_0x5f47b2,_0x2b28b5(0x10e))?_0x5f47b2[_0x2b28b5(0x10e)]:_0xb61e['channelConfigRaw'],'description':hasOwn(_0x5f47b2,_0x2b28b5(0xf1))?_0x5f47b2[_0x2b28b5(0xf1)]:_0xb61e[_0x2b28b5(0xf1)],'connectTimeout':hasOwn(_0x5f47b2,'connectTimeout')?_0x5f47b2[_0x2b28b5(0xa4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xb61e[_0x2b28b5(0xa4)],'readTimeout':hasOwn(_0x5f47b2,_0x2b28b5(0xb0))?_0x5f47b2[_0x2b28b5(0xb0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xb61e['readTimeout']});}export function requestedSafeFieldsMatch(_0x20f735,_0x1966de,_0x26e2f6){const _0x409223=a146_0x29555b,_0x4f4dc3=[],_0x22d86c=[],_0x53274a=[];for(const _0x1695ba of[_0x409223(0x11d),_0x409223(0xde),_0x409223(0xf1)]){if(!hasOwn(_0x26e2f6,_0x1695ba))continue;_0x53274a[_0x409223(0xa6)](_0x1695ba),_0x4f4dc3['push'](_0x1966de[_0x1695ba]===_0x26e2f6[_0x1695ba]),_0x22d86c[_0x409223(0xa6)](_0x20f735[_0x1695ba]!==_0x26e2f6[_0x1695ba]&&_0x1966de[_0x1695ba]===_0x26e2f6[_0x1695ba]);}for(const _0x12fcaf of[_0x409223(0xa4),_0x409223(0xb0)]){if(!hasOwn(_0x26e2f6,_0x12fcaf))continue;const _0x4cb52e=_0x26e2f6[_0x12fcaf]??(_0x12fcaf===_0x409223(0xa4)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x53274a[_0x409223(0xa6)](_0x12fcaf),_0x4f4dc3[_0x409223(0xa6)](_0x1966de[_0x12fcaf]===_0x4cb52e),_0x22d86c['push'](_0x20f735[_0x12fcaf]!==_0x4cb52e&&_0x1966de[_0x12fcaf]===_0x4cb52e);}return hasOwn(_0x26e2f6,_0x409223(0xb7))&&_0x26e2f6[_0x409223(0xb7)]===null&&(_0x53274a['push']('endpointUrl:null'),_0x4f4dc3[_0x409223(0xa6)](_0x1966de[_0x409223(0xe5)]===null||_0x1966de[_0x409223(0xe5)]===''),_0x22d86c['push'](_0x20f735['endpointUrlRaw']!==null&&_0x20f735['endpointUrlRaw']!==''&&(_0x1966de[_0x409223(0xe5)]===null||_0x1966de[_0x409223(0xe5)]===''))),{'allMatch':_0x4f4dc3[_0x409223(0x11c)](Boolean),'provesChange':_0x22d86c[_0x409223(0xc5)](Boolean),'verifiedFields':_0x53274a};}export function validateNotificationDeleteReadback(_0x5626fc,_0x5cb862,_0x14c5bb){const _0x4680b9=a146_0x29555b;for(const [_0x11d03e,_0x125104]of _0x5626fc[_0x4680b9(0xf2)]()){if(!Number[_0x4680b9(0xea)](_0x125104['id'])||_0x125104['id']<=0x0)throw notificationError(_0x4680b9(0xf7),_0x4680b9(0x109)+(_0x11d03e+0x1)+_0x4680b9(0xe4));if(_0x125104['appCode']!==_0x5cb862)throw notificationError(_0x4680b9(0xf7),_0x4680b9(0x109)+(_0x11d03e+0x1)+_0x4680b9(0xe3));if(_0x125104[_0x4680b9(0xde)]!==_0x14c5bb)throw notificationError(_0x4680b9(0xf7),_0x4680b9(0x109)+(_0x11d03e+0x1)+_0x4680b9(0x112));}}export function safeApiFailure(_0xf3cb97,_0x4a58fc,_0x22d944){const _0x29a7f0=a146_0x29555b;return notificationError('notification_config_'+_0xf3cb97+'_'+(_0x4a58fc==='mutation'?_0x29a7f0(0xb5):_0x4a58fc+_0x29a7f0(0xd4)),_0x29a7f0(0xc8)+_0xf3cb97+'\x20'+_0x4a58fc+_0x29a7f0(0xdb),_0x22d944);}function a146_0x4f3f(_0xfb410d,_0x47b8e5){_0xfb410d=_0xfb410d-0xa1;const _0x3f48e5=a146_0x3f48();let _0x4f3fa4=_0x3f48e5[_0xfb410d];return _0x4f3fa4;}export function notificationLookupCommand(_0x29ee5e,_0x806dc){const _0x46b51e=a146_0x29555b;return _0x46b51e(0xec)+_0x29ee5e+_0x46b51e(0xc0)+_0x806dc+'\x20--format\x20compress';}function validateNotificationDocument(_0x282348,_0x58576c){const _0x4f359e=a146_0x29555b;for(const _0x5a5816 of Object[_0x4f359e(0x102)](_0x282348)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x5a5816))throw notificationError(_0x4f359e(0xfb),_0x4f359e(0xee)+_0x5a5816+_0x4f359e(0xcc));if(!ALLOWED_INPUT_FIELDS[_0x4f359e(0x11e)](_0x5a5816))throw notificationError(_0x4f359e(0xc2),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x5a5816+'\x22.');}if(_0x58576c===_0x4f359e(0xe7)&&Object['keys'](_0x282348)[_0x4f359e(0xdf)]===0x0)throw notificationError('notification_config_update_empty',_0x4f359e(0xac));const _0x18f883={};if(hasOwn(_0x282348,_0x4f359e(0x11d)))_0x18f883[_0x4f359e(0x11d)]=validateRequiredString(_0x282348[_0x4f359e(0x11d)],'configName',0x80);else{if(_0x58576c===_0x4f359e(0xb9))throw notificationError(_0x4f359e(0xcb),'Create\x20JSON\x20requires\x20field\x20'+_0x4f359e(0xb1));}if(hasOwn(_0x282348,_0x4f359e(0xde))){if(typeof _0x282348['channelType']!==_0x4f359e(0xa2))throw invalidFieldType('channelType',_0x4f359e(0xd3));const _0x4b80d9=_0x282348[_0x4f359e(0xde)][_0x4f359e(0xfe)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4b80d9))throw notificationError(_0x4f359e(0xff),_0x4f359e(0xf4),_0x4f359e(0xf6)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x18f883[_0x4f359e(0xde)]=_0x4b80d9;}else{if(_0x58576c==='create')throw notificationError(_0x4f359e(0xcb),'Create\x20JSON\x20requires\x20field\x20'+_0x4f359e(0x10d));}for(const [_0x2ead55,_0x30a0db]of[[_0x4f359e(0xb7),0x200],[_0x4f359e(0xf1),0x100]]){if(!hasOwn(_0x282348,_0x2ead55))continue;const _0x18af1f=_0x282348[_0x2ead55];if(_0x18af1f!==null&&typeof _0x18af1f!==_0x4f359e(0xa2))throw invalidFieldType(_0x2ead55,'a\x20string\x20or\x20null');if(typeof _0x18af1f==='string'&&_0x18af1f[_0x4f359e(0xdf)]>_0x30a0db)throw notificationError(_0x4f359e(0xff),_0x4f359e(0xee)+_0x2ead55+_0x4f359e(0xa8)+_0x30a0db+_0x4f359e(0xc7));_0x18f883[_0x2ead55]=_0x18af1f;}if(hasOwn(_0x282348,_0x4f359e(0x10e))){const _0x4518b2=_0x282348[_0x4f359e(0x10e)];if(_0x4518b2===null&&_0x58576c===_0x4f359e(0xb9))throw invalidFieldType(_0x4f359e(0x10e),_0x4f359e(0x117));if(_0x4518b2!==null&&!isJsonObject(_0x4518b2))throw invalidFieldType('channelConfig',_0x58576c===_0x4f359e(0xe7)?_0x4f359e(0x101):'a\x20JSON\x20object');_0x4518b2!==null&&validateChannelConfigFields(_0x18f883[_0x4f359e(0xde)],_0x4518b2),_0x18f883[_0x4f359e(0x10e)]=_0x4518b2;}for(const _0x89aa88 of['connectTimeout',_0x4f359e(0xb0)]){if(!hasOwn(_0x282348,_0x89aa88))continue;const _0x22d625=_0x282348[_0x89aa88];if(_0x22d625!==null&&(!Number[_0x4f359e(0xea)](_0x22d625)||_0x22d625<0x0))throw notificationError(_0x4f359e(0xff),_0x4f359e(0xee)+_0x89aa88+_0x4f359e(0x105));_0x18f883[_0x89aa88]=_0x22d625;}return _0x18f883;}function validateRequiredString(_0x26bc40,_0x1565fc,_0x1acc04){const _0x11a7bb=a146_0x29555b;if(typeof _0x26bc40!==_0x11a7bb(0xa2))throw invalidFieldType(_0x1565fc,_0x11a7bb(0xc4));const _0xd1b3e8=_0x26bc40[_0x11a7bb(0xfe)]();if(!_0xd1b3e8)throw notificationError(_0x11a7bb(0xff),_0x11a7bb(0xee)+_0x1565fc+_0x11a7bb(0xaf));if(_0xd1b3e8[_0x11a7bb(0xdf)]>_0x1acc04)throw notificationError(_0x11a7bb(0xff),'Notification\x20JSON\x20field\x20\x22'+_0x1565fc+_0x11a7bb(0xa8)+_0x1acc04+'\x20characters.');return _0xd1b3e8;}function validateChannelConfigFields(_0x57d386,_0x12cca6){const _0x2309dd=a146_0x29555b;if(hasOwn(_0x12cca6,'messageTemplate'))throw forbiddenChannelConfigField(_0x2309dd(0xca));if(_0x57d386===_0x2309dd(0xf9))for(const _0x151566 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x12cca6,_0x151566))throw forbiddenChannelConfigField(_0x151566);}}function forbiddenChannelConfigField(_0x1dd2d4){const _0x4fbe60=a146_0x29555b;return notificationError(_0x4fbe60(0xa9),_0x4fbe60(0x118)+_0x1dd2d4+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x3ccc1e,_0x10f51e){const _0x58a84a=a146_0x29555b;return notificationError(_0x58a84a(0xff),_0x58a84a(0xee)+_0x3ccc1e+_0x58a84a(0xf3)+_0x10f51e+'.');}function serializeChannelConfig(_0x240a80){const _0x5548a2=a146_0x29555b;return _0x240a80===null||_0x240a80===undefined?null:JSON[_0x5548a2(0x11f)](_0x240a80);}function redactSensitive(_0x25b92e){const _0x53b46c=a146_0x29555b;return _0x25b92e===null||_0x25b92e===undefined||_0x25b92e===''?null:_0x53b46c(0xb3);}function requireResponseString(_0x5e1109,_0x553deb,_0x54e486){const _0x312975=a146_0x29555b;if(typeof _0x5e1109!==_0x312975(0xa2)||_0x5e1109[_0x312975(0xfe)]()==='')throw CliErrors[_0x312975(0x104)](_0x312975(0xf5),_0x312975(0xb8)+(_0x54e486+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x553deb+'\x22.');return _0x5e1109[_0x312975(0xfe)]();}function requireExactString(_0x5c1cfc,_0x57bfe4,_0x24ac2f){const _0x3460be=a146_0x29555b;if(typeof _0x5c1cfc!==_0x3460be(0xa2)||_0x5c1cfc[_0x3460be(0xfe)]()==='')throw notificationError(_0x3460be(0xf7),_0x3460be(0xc8)+_0x24ac2f+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x57bfe4+'\x22.');return _0x5c1cfc['trim']();}function responseNullableString(_0x1e1f35,_0x1431ef,_0x3112ad){const _0xd5f767=a146_0x29555b;if(_0x1e1f35===undefined||_0x1e1f35===null)return null;if(typeof _0x1e1f35!==_0xd5f767(0xa2))throw notificationError(_0xd5f767(0xf7),_0xd5f767(0xc8)+_0x3112ad+_0xd5f767(0xc3)+_0x1431ef+'\x22.');return _0x1e1f35;}function responseNullableTimeout(_0xd1d164,_0x2bb82a,_0x663371){const _0x5ecde3=a146_0x29555b;if(_0xd1d164===undefined||_0xd1d164===null)return null;if(!Number[_0x5ecde3(0xea)](_0xd1d164)||_0xd1d164<0x0)throw notificationError(_0x5ecde3(0xf7),_0x5ecde3(0xc8)+_0x663371+_0x5ecde3(0xc3)+_0x2bb82a+'\x22.');return _0xd1d164;}function normalizeNullableString(_0x37ba36){const _0x452725=a146_0x29555b;return typeof _0x37ba36===_0x452725(0xa2)?_0x37ba36:null;}function isJsonObject(_0x45408c){const _0x536234=a146_0x29555b;return _0x45408c!==null&&typeof _0x45408c==='object'&&!Array[_0x536234(0xdd)](_0x45408c);}function hasOwn(_0x5e60b3,_0x519c8e){const _0x3768dc=a146_0x29555b;return Object[_0x3768dc(0xf8)][_0x3768dc(0xe2)]['call'](_0x5e60b3,_0x519c8e);}async function readStdin(){const _0x4e703d=a146_0x29555b;let _0x1d441a='';process[_0x4e703d(0xab)]['setEncoding'](_0x4e703d(0x11b));for await(const _0x4b23b4 of process['stdin'])_0x1d441a+=_0x4b23b4;return _0x1d441a;}
|
|
1
|
+
const a146_0x5eb608=a146_0x37c8;(function(_0x5c20ac,_0x5461a7){const _0x1d1368=a146_0x37c8,_0x34896c=_0x5c20ac();while(!![]){try{const _0xcdd189=-parseInt(_0x1d1368(0x15b))/0x1+-parseInt(_0x1d1368(0x16a))/0x2+parseInt(_0x1d1368(0x143))/0x3+parseInt(_0x1d1368(0x16d))/0x4+parseInt(_0x1d1368(0x18b))/0x5+-parseInt(_0x1d1368(0x145))/0x6*(-parseInt(_0x1d1368(0x11d))/0x7)+parseInt(_0x1d1368(0x168))/0x8*(-parseInt(_0x1d1368(0x156))/0x9);if(_0xcdd189===_0x5461a7)break;else _0x34896c['push'](_0x34896c['shift']());}catch(_0x427995){_0x34896c['push'](_0x34896c['shift']());}}}(a146_0x4bb2,0xb0706));function a146_0x4bb2(){const _0x4b86f5=['environment\x20variable\x20','appCode','Allowed\x20values:\x20','includes','notification_config_','bool','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','call','a\x20non-empty\x20string','3760812kNLTXD','\x20characters.','stdin','notification_config_source_unavailable','recipients','947601VHapje','\x20has\x20an\x20invalid\x20appCode.','update','path','\x20has\x20an\x20unsupported\x20channelType.','notification_config_field_required','Notification\x20config\x20list\x20item\x20','Missing\x20notification\x20JSON\x20source.','EMAIL','messageTemplate','has','object','a\x20string\x20or\x20null','8owxMcH','emailTargets','1432770vrvPuE','mutation','replyTo','4786252rnRJbj','isArray','join','\x20--type\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20JSON\x20field\x20\x22','endpointUrl','WEBHOOK','isSafeInteger','notification_config_channel_field_forbidden','number','str','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','apiError','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','configName','some','channelConfigRaw','\x22\x20cannot\x20exceed\x20','notification_config_confirmation_required','Create\x20JSON\x20requires\x20field\x20','push','Notification\x20JSON\x20from\x20','length','yes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','\x22configName\x22.','_unavailable','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','687555RUlGxT','\x20is\x20invalid.','notification_config_json_invalid','endpointUrl:null','connectTimeout','a\x20JSON\x20object','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','name','create','a\x20JSON\x20object\x20or\x20null','\x22\x20must\x20be\x20','ccList','configCode','string','failed','validation','preflight','notification_config_field_invalid','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','channelType','fromName','\x20must\x20be\x20an\x20object.','notification_config_id_invalid','Notification\x20JSON\x20channelConfig\x20field\x20\x22','5644807PcBOhF','\x20has\x20an\x20invalid\x20id.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','kind','from-env','env','\x20has\x20invalid\x20field\x20\x22','notification_config_response_invalid','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','DINGTALK','num','notification_config_field_unknown','hasOwnProperty','utf8','\x20has\x20an\x20invalid\x20channelType.','readTimeout','notification_config_update_empty','channelConfig','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','subjectPrefix','bccList','\x20is\x20missing\x20required\x20field\x20\x22','FEISHU','setEncoding','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','endpointUrlRaw','keys','Unknown\x20notification\x20JSON\x20field\x20\x22','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','file\x20','trim','WECOM','Invalid\x20--','entries','description','Notification\x20config\x20','dry-run','1992219hdpXbH','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','6WaOtpQ','rabetbase\x20notification\x20config-list\x20--appcode\x20','updateTime','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Application-level\x20notification\x20config\x20ID','Item\x20'];a146_0x4bb2=function(){return _0x4b86f5;};return a146_0x4bb2();}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=[a146_0x5eb608(0x163),a146_0x5eb608(0x134),a146_0x5eb608(0x127),a146_0x5eb608(0x13d),a146_0x5eb608(0x175)];function a146_0x37c8(_0x40e7ec,_0x57f5d0){_0x40e7ec=_0x40e7ec-0x115;const _0x4bb21e=a146_0x4bb2();let _0x37c81d=_0x4bb21e[_0x40e7ec];return _0x37c81d;}export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a146_0x5eb608(0x17d),'channelType','endpointUrl','channelConfig',a146_0x5eb608(0x140),'connectTimeout',a146_0x5eb608(0x12d)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a146_0x5eb608(0x197),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a146_0x5eb608(0x169),a146_0x5eb608(0x15a),a146_0x5eb608(0x196),a146_0x5eb608(0x132),a146_0x5eb608(0x16c),a146_0x5eb608(0x131),a146_0x5eb608(0x119),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a146_0x5eb608(0x148),'type':'string','required':![],'description':a146_0x5eb608(0x152)},{'name':a146_0x5eb608(0x158),'type':'boolean','required':![],'default':![],'description':a146_0x5eb608(0x120)},{'name':a146_0x5eb608(0x122),'type':a146_0x5eb608(0x198),'required':![],'description':a146_0x5eb608(0x153)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a146_0x5eb608(0x178),'required':!![],'description':a146_0x5eb608(0x14a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x5904ef,_0x491fb4,_0x2cf014){return new CliError(_0x5904ef,0x1,_0x491fb4,_0x2cf014);}export function readNotificationId(_0x2abada){const _0xbf9070=a146_0x5eb608,_0x37236a=_0x2abada[_0xbf9070(0x128)]('id');if(!Number[_0xbf9070(0x176)](_0x37236a)||_0x37236a<=0x0)throw notificationError(_0xbf9070(0x11b),_0xbf9070(0x144));return _0x37236a;}export function requireNotificationExplicitYes(_0x53b08){const _0x1865aa=a146_0x5eb608;if(_0x53b08[_0x1865aa(0x151)](_0x1865aa(0x142))||_0x53b08['bool'](_0x1865aa(0x186)))return;throw notificationError(_0x1865aa(0x181),_0x1865aa(0x17c),_0x1865aa(0x17a));}export function readNotificationChannelType(_0x2696f5,_0x36432c='type',_0x494aab=a146_0x5eb608(0x163)){const _0x42766f=a146_0x5eb608,_0x55e400=_0x2696f5[_0x42766f(0x179)](_0x36432c)[_0x42766f(0x13c)]()||_0x494aab;if(!NOTIFICATION_CHANNEL_TYPES[_0x42766f(0x14f)](_0x55e400))throw CliErrors[_0x42766f(0x19a)](_0x42766f(0x13e)+_0x36432c+':\x20'+_0x55e400,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x42766f(0x16f)](',\x20')+'.');return _0x55e400;}export function assertSingleNotificationSource(_0x2aaef1){const _0x40fd66=a146_0x5eb608,_0xb0d1e9=[],_0x36f4d2=_0x2aaef1['str'](_0x40fd66(0x148))[_0x40fd66(0x13c)]();if(_0x36f4d2)_0xb0d1e9[_0x40fd66(0x183)]({'kind':'file','path':_0x36f4d2});if(_0x2aaef1['bool'](_0x40fd66(0x158)))_0xb0d1e9[_0x40fd66(0x183)]({'kind':'stdin'});const _0x3dc5e9=_0x2aaef1[_0x40fd66(0x179)](_0x40fd66(0x122))[_0x40fd66(0x13c)]();if(_0x3dc5e9)_0xb0d1e9[_0x40fd66(0x183)]({'kind':_0x40fd66(0x123),'name':_0x3dc5e9});if(_0xb0d1e9['length']===0x0)throw CliErrors[_0x40fd66(0x19a)](_0x40fd66(0x162),_0x40fd66(0x149));if(_0xb0d1e9['length']>0x1)throw CliErrors[_0x40fd66(0x19a)](_0x40fd66(0x171),_0x40fd66(0x149));return _0xb0d1e9[0x0];}export async function readNotificationDocument(_0x5c115a,_0x2d0643){const _0x3ded30=a146_0x5eb608,_0x1ec958=assertSingleNotificationSource(_0x5c115a),_0x1dcae5=_0x1ec958[_0x3ded30(0x121)]===_0x3ded30(0x148)?_0x3ded30(0x13b)+_0x1ec958[_0x3ded30(0x15e)]:_0x1ec958[_0x3ded30(0x121)]===_0x3ded30(0x123)?_0x3ded30(0x14c)+_0x1ec958[_0x3ded30(0x192)]:_0x3ded30(0x158);let _0x445638;try{if(_0x1ec958[_0x3ded30(0x121)]===_0x3ded30(0x148))_0x445638=await readFile(_0x1ec958['path'],_0x3ded30(0x12b));else{if(_0x1ec958[_0x3ded30(0x121)]===_0x3ded30(0x123)){if(!(_0x1ec958[_0x3ded30(0x192)]in process.env))throw notificationError('notification_config_source_unavailable',_0x3ded30(0x136)+_0x1ec958[_0x3ded30(0x192)]);_0x445638=process.env[_0x1ec958.name]??'';}else _0x445638=await readStdin();}}catch(_0x4c6447){if(_0x4c6447 instanceof CliError)throw _0x4c6447;throw notificationError(_0x3ded30(0x159),_0x3ded30(0x117)+_0x1dcae5+'.');}let _0x754811;try{_0x754811=JSON['parse'](_0x445638);}catch{throw notificationError(_0x3ded30(0x18d),_0x3ded30(0x184)+_0x1dcae5+_0x3ded30(0x18c),_0x3ded30(0x13a));}if(!isJsonObject(_0x754811))throw notificationError(_0x3ded30(0x18d),_0x3ded30(0x184)+_0x1dcae5+_0x3ded30(0x11a));return validateNotificationDocument(_0x754811,_0x2d0643);}export function projectNotificationListConfig(_0x24e361,_0x1f3b3a){const _0xd26937=a146_0x5eb608;return{'id':typeof _0x24e361['id']==='number'?_0x24e361['id']:null,'configCode':requireResponseString(_0x24e361[_0xd26937(0x197)],_0xd26937(0x197),_0x1f3b3a),'configName':requireResponseString(_0x24e361[_0xd26937(0x17d)],_0xd26937(0x17d),_0x1f3b3a),'channelType':requireResponseString(_0x24e361[_0xd26937(0x118)],_0xd26937(0x118),_0x1f3b3a),'description':normalizeNullableString(_0x24e361[_0xd26937(0x140)]),'createTime':normalizeNullableString(_0x24e361['createTime']),'updateTime':normalizeNullableString(_0x24e361[_0xd26937(0x147)])};}export function normalizeExactNotificationConfig(_0x28575e,_0x5430dc,_0x13f3d2){const _0x40498a=a146_0x5eb608;if(!Number[_0x40498a(0x176)](_0x28575e['id'])||_0x28575e['id']!==_0x5430dc)throw notificationError(_0x40498a(0x125),_0x40498a(0x187)+_0x5430dc+'.');if(_0x28575e[_0x40498a(0x14d)]!==_0x13f3d2)throw notificationError(_0x40498a(0x125),_0x40498a(0x141)+_0x5430dc+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x16d626=requireExactString(_0x28575e[_0x40498a(0x17d)],'configName',_0x5430dc),_0x3d6e32=requireExactString(_0x28575e[_0x40498a(0x197)],_0x40498a(0x197),_0x5430dc),_0x757bb0=requireExactString(_0x28575e[_0x40498a(0x118)],_0x40498a(0x118),_0x5430dc);if(!NOTIFICATION_CHANNEL_TYPES[_0x40498a(0x14f)](_0x757bb0))throw notificationError(_0x40498a(0x125),_0x40498a(0x141)+_0x5430dc+_0x40498a(0x15f));const _0x11301f=responseNullableString(_0x28575e[_0x40498a(0x174)],'endpointUrl',_0x5430dc),_0x44d608=responseNullableString(_0x28575e['channelConfig'],_0x40498a(0x12f),_0x5430dc),_0x1067a7=responseNullableString(_0x28575e[_0x40498a(0x140)],'description',_0x5430dc),_0x4d6e24=responseNullableTimeout(_0x28575e[_0x40498a(0x18f)],_0x40498a(0x18f),_0x5430dc),_0x2cc943=responseNullableTimeout(_0x28575e[_0x40498a(0x12d)],'readTimeout',_0x5430dc);return{'id':_0x5430dc,'appCode':_0x13f3d2,'configCode':_0x3d6e32,'configName':_0x16d626,'channelType':_0x757bb0,'endpointUrl':redactSensitive(_0x11301f),'channelConfig':redactSensitive(_0x44d608),'description':_0x1067a7,'connectTimeout':_0x4d6e24,'readTimeout':_0x2cc943,'endpointUrlRaw':_0x11301f,'channelConfigRaw':_0x44d608};}export async function requireExactNotificationConfig(_0x59721f,_0x1acd29,_0x549742){const _0x167e98=a146_0x5eb608;let _0x39d7d6;try{_0x39d7d6=await getNotificationChannelConfig(_0x1acd29,_0x59721f);}catch{throw safeApiFailure(_0x549742,_0x167e98(0x115),_0x167e98(0x126)+_0x59721f+_0x167e98(0x130));}return normalizeExactNotificationConfig(_0x39d7d6,_0x1acd29,_0x59721f);}export function projectNotificationConfig(_0x22274f){const _0x3a82f8=a146_0x5eb608;return{'id':_0x22274f['id']??null,'appCode':_0x22274f[_0x3a82f8(0x14d)],'configCode':_0x22274f[_0x3a82f8(0x197)]??null,'configName':_0x22274f['configName'],'channelType':_0x22274f[_0x3a82f8(0x118)],'endpointUrl':redactSensitive(_0x22274f[_0x3a82f8(0x174)]),'channelConfig':redactSensitive(_0x22274f[_0x3a82f8(0x12f)]),'description':_0x22274f[_0x3a82f8(0x140)]??null,'connectTimeout':_0x22274f[_0x3a82f8(0x18f)]??null,'readTimeout':_0x22274f[_0x3a82f8(0x12d)]??null};}export function notificationSelector(_0x3c2b30){const _0x1993cf=a146_0x5eb608;return{'appCode':_0x3c2b30[_0x1993cf(0x14d)],'id':_0x3c2b30['id'],'configCode':_0x3c2b30[_0x1993cf(0x197)],'configName':_0x3c2b30[_0x1993cf(0x17d)],'channelType':_0x3c2b30[_0x1993cf(0x118)]};}export function createMutationInput(_0x2a581c,_0x3355c9){const _0x42b2ef=a146_0x5eb608;return{'appCode':_0x2a581c,'configName':_0x3355c9['configName'],'channelType':_0x3355c9[_0x42b2ef(0x118)],...hasOwn(_0x3355c9,_0x42b2ef(0x174))?{'endpointUrl':_0x3355c9['endpointUrl']}:{},...hasOwn(_0x3355c9,_0x42b2ef(0x12f))?{'channelConfig':serializeChannelConfig(_0x3355c9[_0x42b2ef(0x12f)])}:{},...hasOwn(_0x3355c9,_0x42b2ef(0x140))?{'description':_0x3355c9[_0x42b2ef(0x140)]}:{},...hasOwn(_0x3355c9,_0x42b2ef(0x18f))?{'connectTimeout':_0x3355c9[_0x42b2ef(0x18f)]}:{},...hasOwn(_0x3355c9,_0x42b2ef(0x12d))?{'readTimeout':_0x3355c9[_0x42b2ef(0x12d)]}:{}};}export function mergeUpdateInput(_0x1fcca9,_0x220a8f){const _0x42b461=a146_0x5eb608;return{'id':_0x1fcca9['id'],'appCode':_0x1fcca9[_0x42b461(0x14d)],'configName':_0x220a8f[_0x42b461(0x17d)]??_0x1fcca9[_0x42b461(0x17d)],'channelType':_0x220a8f[_0x42b461(0x118)]??_0x1fcca9[_0x42b461(0x118)],'endpointUrl':hasOwn(_0x220a8f,'endpointUrl')?_0x220a8f[_0x42b461(0x174)]:_0x1fcca9['endpointUrlRaw'],'channelConfig':hasOwn(_0x220a8f,_0x42b461(0x12f))?serializeChannelConfig(_0x220a8f[_0x42b461(0x12f)]):_0x1fcca9[_0x42b461(0x17f)],'description':hasOwn(_0x220a8f,'description')?_0x220a8f[_0x42b461(0x140)]:_0x1fcca9[_0x42b461(0x140)],'connectTimeout':hasOwn(_0x220a8f,_0x42b461(0x18f))?_0x220a8f[_0x42b461(0x18f)]:_0x1fcca9['connectTimeout'],'readTimeout':hasOwn(_0x220a8f,'readTimeout')?_0x220a8f[_0x42b461(0x12d)]:_0x1fcca9[_0x42b461(0x12d)]};}export function plannedUpdateProjection(_0x3d03b9,_0x5647ef){const _0x5f3096=a146_0x5eb608;return projectNotificationConfig({'id':_0x3d03b9['id'],'appCode':_0x3d03b9[_0x5f3096(0x14d)],'configCode':_0x3d03b9[_0x5f3096(0x197)],'configName':_0x5647ef[_0x5f3096(0x17d)]??_0x3d03b9[_0x5f3096(0x17d)],'channelType':_0x5647ef[_0x5f3096(0x118)]??_0x3d03b9[_0x5f3096(0x118)],'endpointUrl':hasOwn(_0x5647ef,_0x5f3096(0x174))?_0x5647ef[_0x5f3096(0x174)]:_0x3d03b9[_0x5f3096(0x137)],'channelConfig':hasOwn(_0x5647ef,'channelConfig')?_0x5647ef['channelConfig']:_0x3d03b9[_0x5f3096(0x17f)],'description':hasOwn(_0x5647ef,'description')?_0x5647ef[_0x5f3096(0x140)]:_0x3d03b9[_0x5f3096(0x140)],'connectTimeout':hasOwn(_0x5647ef,_0x5f3096(0x18f))?_0x5647ef[_0x5f3096(0x18f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x3d03b9[_0x5f3096(0x18f)],'readTimeout':hasOwn(_0x5647ef,'readTimeout')?_0x5647ef['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x3d03b9[_0x5f3096(0x12d)]});}export function requestedSafeFieldsMatch(_0x347a88,_0x3e97a5,_0x40f0c6){const _0xd363c7=a146_0x5eb608,_0x781b0b=[],_0x13e7b5=[],_0x3dddd4=[];for(const _0x473c10 of[_0xd363c7(0x17d),'channelType',_0xd363c7(0x140)]){if(!hasOwn(_0x40f0c6,_0x473c10))continue;_0x3dddd4[_0xd363c7(0x183)](_0x473c10),_0x781b0b['push'](_0x3e97a5[_0x473c10]===_0x40f0c6[_0x473c10]),_0x13e7b5[_0xd363c7(0x183)](_0x347a88[_0x473c10]!==_0x40f0c6[_0x473c10]&&_0x3e97a5[_0x473c10]===_0x40f0c6[_0x473c10]);}for(const _0x22b72e of[_0xd363c7(0x18f),_0xd363c7(0x12d)]){if(!hasOwn(_0x40f0c6,_0x22b72e))continue;const _0x20f3b1=_0x40f0c6[_0x22b72e]??(_0x22b72e===_0xd363c7(0x18f)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3dddd4[_0xd363c7(0x183)](_0x22b72e),_0x781b0b[_0xd363c7(0x183)](_0x3e97a5[_0x22b72e]===_0x20f3b1),_0x13e7b5[_0xd363c7(0x183)](_0x347a88[_0x22b72e]!==_0x20f3b1&&_0x3e97a5[_0x22b72e]===_0x20f3b1);}return hasOwn(_0x40f0c6,_0xd363c7(0x174))&&_0x40f0c6[_0xd363c7(0x174)]===null&&(_0x3dddd4['push'](_0xd363c7(0x18e)),_0x781b0b[_0xd363c7(0x183)](_0x3e97a5[_0xd363c7(0x137)]===null||_0x3e97a5['endpointUrlRaw']===''),_0x13e7b5[_0xd363c7(0x183)](_0x347a88['endpointUrlRaw']!==null&&_0x347a88[_0xd363c7(0x137)]!==''&&(_0x3e97a5['endpointUrlRaw']===null||_0x3e97a5[_0xd363c7(0x137)]===''))),{'allMatch':_0x781b0b['every'](Boolean),'provesChange':_0x13e7b5[_0xd363c7(0x17e)](Boolean),'verifiedFields':_0x3dddd4};}export function validateNotificationDeleteReadback(_0x33a52c,_0x2465fc,_0x25631f){const _0x275423=a146_0x5eb608;for(const [_0x5c0e34,_0x5ecc7c]of _0x33a52c[_0x275423(0x13f)]()){if(!Number[_0x275423(0x176)](_0x5ecc7c['id'])||_0x5ecc7c['id']<=0x0)throw notificationError(_0x275423(0x125),'Notification\x20config\x20list\x20item\x20'+(_0x5c0e34+0x1)+_0x275423(0x11e));if(_0x5ecc7c['appCode']!==_0x2465fc)throw notificationError(_0x275423(0x125),_0x275423(0x161)+(_0x5c0e34+0x1)+_0x275423(0x15c));if(_0x5ecc7c[_0x275423(0x118)]!==_0x25631f)throw notificationError('notification_config_response_invalid',_0x275423(0x161)+(_0x5c0e34+0x1)+_0x275423(0x12c));}}export function safeApiFailure(_0x4a506a,_0x317524,_0x3891a7){const _0x2d20b0=a146_0x5eb608;return notificationError(_0x2d20b0(0x150)+_0x4a506a+'_'+(_0x317524===_0x2d20b0(0x16b)?_0x2d20b0(0x199):_0x317524+_0x2d20b0(0x189)),_0x2d20b0(0x141)+_0x4a506a+'\x20'+_0x317524+'\x20failed.',_0x3891a7);}export function notificationLookupCommand(_0xea0d3,_0xea83b3){const _0x31230c=a146_0x5eb608;return _0x31230c(0x146)+_0xea0d3+_0x31230c(0x170)+_0xea83b3+'\x20--format\x20compress';}function validateNotificationDocument(_0x454a5d,_0x136c87){const _0x5d9f25=a146_0x5eb608;for(const _0x211854 of Object[_0x5d9f25(0x138)](_0x454a5d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5d9f25(0x165)](_0x211854))throw notificationError('notification_config_field_forbidden',_0x5d9f25(0x173)+_0x211854+_0x5d9f25(0x191));if(!ALLOWED_INPUT_FIELDS[_0x5d9f25(0x165)](_0x211854))throw notificationError(_0x5d9f25(0x129),_0x5d9f25(0x139)+_0x211854+'\x22.');}if(_0x136c87===_0x5d9f25(0x15d)&&Object[_0x5d9f25(0x138)](_0x454a5d)[_0x5d9f25(0x185)]===0x0)throw notificationError(_0x5d9f25(0x12e),_0x5d9f25(0x18a));const _0x36c6f1={};if(hasOwn(_0x454a5d,_0x5d9f25(0x17d)))_0x36c6f1[_0x5d9f25(0x17d)]=validateRequiredString(_0x454a5d['configName'],_0x5d9f25(0x17d),0x80);else{if(_0x136c87==='create')throw notificationError('notification_config_field_required','Create\x20JSON\x20requires\x20field\x20'+_0x5d9f25(0x188));}if(hasOwn(_0x454a5d,_0x5d9f25(0x118))){if(typeof _0x454a5d['channelType']!==_0x5d9f25(0x198))throw invalidFieldType(_0x5d9f25(0x118),'a\x20supported\x20string');const _0x3f4792=_0x454a5d[_0x5d9f25(0x118)][_0x5d9f25(0x13c)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3f4792))throw notificationError(_0x5d9f25(0x116),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x5d9f25(0x14e)+NOTIFICATION_CHANNEL_TYPES[_0x5d9f25(0x16f)](',\x20')+'.');_0x36c6f1['channelType']=_0x3f4792;}else{if(_0x136c87===_0x5d9f25(0x193))throw notificationError(_0x5d9f25(0x160),_0x5d9f25(0x182)+'\x22channelType\x22.');}for(const [_0x448653,_0x4a9ebf]of[[_0x5d9f25(0x174),0x200],[_0x5d9f25(0x140),0x100]]){if(!hasOwn(_0x454a5d,_0x448653))continue;const _0x403ee9=_0x454a5d[_0x448653];if(_0x403ee9!==null&&typeof _0x403ee9!==_0x5d9f25(0x198))throw invalidFieldType(_0x448653,_0x5d9f25(0x167));if(typeof _0x403ee9===_0x5d9f25(0x198)&&_0x403ee9[_0x5d9f25(0x185)]>_0x4a9ebf)throw notificationError(_0x5d9f25(0x116),_0x5d9f25(0x173)+_0x448653+_0x5d9f25(0x180)+_0x4a9ebf+_0x5d9f25(0x157));_0x36c6f1[_0x448653]=_0x403ee9;}if(hasOwn(_0x454a5d,_0x5d9f25(0x12f))){const _0x48afc9=_0x454a5d[_0x5d9f25(0x12f)];if(_0x48afc9===null&&_0x136c87===_0x5d9f25(0x193))throw invalidFieldType(_0x5d9f25(0x12f),_0x5d9f25(0x190));if(_0x48afc9!==null&&!isJsonObject(_0x48afc9))throw invalidFieldType('channelConfig',_0x136c87===_0x5d9f25(0x15d)?_0x5d9f25(0x194):_0x5d9f25(0x190));_0x48afc9!==null&&validateChannelConfigFields(_0x36c6f1[_0x5d9f25(0x118)],_0x48afc9),_0x36c6f1[_0x5d9f25(0x12f)]=_0x48afc9;}for(const _0xb005ea of['connectTimeout','readTimeout']){if(!hasOwn(_0x454a5d,_0xb005ea))continue;const _0x27be70=_0x454a5d[_0xb005ea];if(_0x27be70!==null&&(!Number[_0x5d9f25(0x176)](_0x27be70)||_0x27be70<0x0))throw notificationError(_0x5d9f25(0x116),_0x5d9f25(0x173)+_0xb005ea+_0x5d9f25(0x11f));_0x36c6f1[_0xb005ea]=_0x27be70;}return _0x36c6f1;}function validateRequiredString(_0x17c7f5,_0x401976,_0x529af3){const _0x266c7d=a146_0x5eb608;if(typeof _0x17c7f5!==_0x266c7d(0x198))throw invalidFieldType(_0x401976,_0x266c7d(0x155));const _0x407f82=_0x17c7f5[_0x266c7d(0x13c)]();if(!_0x407f82)throw notificationError(_0x266c7d(0x116),_0x266c7d(0x173)+_0x401976+_0x266c7d(0x172));if(_0x407f82['length']>_0x529af3)throw notificationError(_0x266c7d(0x116),_0x266c7d(0x173)+_0x401976+_0x266c7d(0x180)+_0x529af3+_0x266c7d(0x157));return _0x407f82;}function validateChannelConfigFields(_0x3a6f77,_0x2160f8){const _0x47eafb=a146_0x5eb608;if(hasOwn(_0x2160f8,_0x47eafb(0x164)))throw forbiddenChannelConfigField(_0x47eafb(0x164));if(_0x3a6f77===_0x47eafb(0x163))for(const _0x191177 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2160f8,_0x191177))throw forbiddenChannelConfigField(_0x191177);}}function forbiddenChannelConfigField(_0x2772f2){const _0x5c3a81=a146_0x5eb608;return notificationError(_0x5c3a81(0x177),_0x5c3a81(0x11c)+_0x2772f2+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x15c582,_0x4a2103){const _0x44e3fc=a146_0x5eb608;return notificationError('notification_config_field_invalid',_0x44e3fc(0x173)+_0x15c582+_0x44e3fc(0x195)+_0x4a2103+'.');}function serializeChannelConfig(_0x3e9c09){return _0x3e9c09===null||_0x3e9c09===undefined?null:JSON['stringify'](_0x3e9c09);}function redactSensitive(_0x39af80){return _0x39af80===null||_0x39af80===undefined||_0x39af80===''?null:'<redacted>';}function requireResponseString(_0x3cdf08,_0x3e3f55,_0x56ed06){const _0x1bbf6f=a146_0x5eb608;if(typeof _0x3cdf08!==_0x1bbf6f(0x198)||_0x3cdf08[_0x1bbf6f(0x13c)]()==='')throw CliErrors[_0x1bbf6f(0x17b)]('Invalid\x20notification\x20config\x20response.',_0x1bbf6f(0x14b)+(_0x56ed06+0x1)+_0x1bbf6f(0x133)+_0x3e3f55+'\x22.');return _0x3cdf08[_0x1bbf6f(0x13c)]();}function requireExactString(_0x3af499,_0x58b82e,_0xae0ef4){const _0x315a99=a146_0x5eb608;if(typeof _0x3af499!=='string'||_0x3af499[_0x315a99(0x13c)]()==='')throw notificationError(_0x315a99(0x125),_0x315a99(0x141)+_0xae0ef4+_0x315a99(0x133)+_0x58b82e+'\x22.');return _0x3af499[_0x315a99(0x13c)]();}function responseNullableString(_0x444a8a,_0x5af848,_0x24e09a){const _0x44b93a=a146_0x5eb608;if(_0x444a8a===undefined||_0x444a8a===null)return null;if(typeof _0x444a8a!==_0x44b93a(0x198))throw notificationError(_0x44b93a(0x125),_0x44b93a(0x141)+_0x24e09a+_0x44b93a(0x124)+_0x5af848+'\x22.');return _0x444a8a;}function responseNullableTimeout(_0x5642b6,_0x3a5ae8,_0x470fbe){const _0x540a90=a146_0x5eb608;if(_0x5642b6===undefined||_0x5642b6===null)return null;if(!Number[_0x540a90(0x176)](_0x5642b6)||_0x5642b6<0x0)throw notificationError(_0x540a90(0x125),_0x540a90(0x141)+_0x470fbe+_0x540a90(0x124)+_0x3a5ae8+'\x22.');return _0x5642b6;}function normalizeNullableString(_0x4b8166){const _0x93a67b=a146_0x5eb608;return typeof _0x4b8166===_0x93a67b(0x198)?_0x4b8166:null;}function isJsonObject(_0xed2418){const _0x312ceb=a146_0x5eb608;return _0xed2418!==null&&typeof _0xed2418===_0x312ceb(0x166)&&!Array[_0x312ceb(0x16e)](_0xed2418);}function hasOwn(_0x4521b8,_0x3bd80e){const _0x1f1a94=a146_0x5eb608;return Object['prototype'][_0x1f1a94(0x12a)][_0x1f1a94(0x154)](_0x4521b8,_0x3bd80e);}async function readStdin(){const _0x3395b4=a146_0x5eb608;let _0xc5a6d7='';process[_0x3395b4(0x158)][_0x3395b4(0x135)](_0x3395b4(0x12b));for await(const _0x4a5533 of process[_0x3395b4(0x158)])_0xc5a6d7+=_0x4a5533;return _0xc5a6d7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0xb8d769=a147_0x4ce6;(function(_0x3d34f6,_0x33e854){const _0x488f84=a147_0x4ce6,_0x5d9809=_0x3d34f6();while(!![]){try{const _0x524067=parseInt(_0x488f84(0x1de))/0x1*(parseInt(_0x488f84(0x1d5))/0x2)+parseInt(_0x488f84(0x1c5))/0x3+parseInt(_0x488f84(0x1e2))/0x4*(-parseInt(_0x488f84(0x1e6))/0x5)+parseInt(_0x488f84(0x1c0))/0x6+-parseInt(_0x488f84(0x1e0))/0x7*(parseInt(_0x488f84(0x1f3))/0x8)+-parseInt(_0x488f84(0x1cf))/0x9+parseInt(_0x488f84(0x1d0))/0xa;if(_0x524067===_0x33e854)break;else _0x5d9809['push'](_0x5d9809['shift']());}catch(_0x145b79){_0x5d9809['push'](_0x5d9809['shift']());}}}(a147_0x25fd,0xc26f5));function a147_0x4ce6(_0x32fd27,_0x383d88){_0x32fd27=_0x32fd27-0x1bf;const _0x25fd1d=a147_0x25fd();let _0x4ce641=_0x25fd1d[_0x32fd27];return _0x4ce641;}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice','general',a147_0xb8d769(0x1f2),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a147_0xb8d769(0x1d1),'general':a147_0xb8d769(0x1d4),'form':a147_0xb8d769(0x1c1),'idCard':a147_0xb8d769(0x1f1)},SCENE_FLAG={'name':a147_0xb8d769(0x1ce),'type':a147_0xb8d769(0x1c6),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a147_0xb8d769(0x1d9)},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':a147_0xb8d769(0x1ea)},IMAGE_URL_FLAG={'name':a147_0xb8d769(0x1c4),'type':a147_0xb8d769(0x1c6),'description':a147_0xb8d769(0x1ef)};function normalizeScene(_0x3e78cc){const _0x4c22a7=a147_0xb8d769,_0x1ee16f=_0x3e78cc[_0x4c22a7(0x1e8)]()[_0x4c22a7(0x1cb)]();if(_0x1ee16f===_0x4c22a7(0x1dc))return _0x4c22a7(0x1d6);if(_0x1ee16f===_0x4c22a7(0x1e9)||_0x1ee16f==='general'||_0x1ee16f==='form')return _0x1ee16f;throw CliErrors[_0x4c22a7(0x1d8)]('Unsupported\x20OCR\x20scene:\x20'+_0x3e78cc+_0x4c22a7(0x1c8)+SUPPORTED_SCENES[_0x4c22a7(0x1d7)](',\x20'));}function a147_0x25fd(){const _0x58401f=['string','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','.\x20Supported\x20scenes:\x20','filePath','toString','toLowerCase','read','count','scene','8998029DFIRFO','7271020GYAUvG','Invoice','\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','General','766EqtoDm','idCard','join','validation','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Preview:\x20recognize\x20','/smartapi/common/queryFileUrl','idcard','ocr','3579EBzbgP','fileName','63MpRJxq','POST','32UkAkhO','/smartapi/ocr/recognize-text','str','length','448870dQTyXg','appCode','trim','invoice','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','imageUrl','fileUrl','/smartapi/common/uploadFile','GET','Publicly\x20accessible\x20image\x20or\x20file\x20URL','imageFile','IdCard','form','1135752QGcbOB','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','4667100PCCaqh','Table','path','image-file','image-url','2749170BUMaat'];a147_0x25fd=function(){return _0x58401f;};return a147_0x25fd();}function selectedInputs(_0x270df8){const _0x5a17ee=a147_0xb8d769,_0x454bea=_0x270df8[_0x5a17ee(0x1e4)](_0x5a17ee(0x1c3))[_0x5a17ee(0x1e8)](),_0x64fd82=_0x270df8['str'](_0x5a17ee(0x1c4))[_0x5a17ee(0x1e8)]();return{'imageFile':_0x454bea,'imageUrl':_0x64fd82,'count':[_0x454bea,_0x64fd82]['filter'](Boolean)[_0x5a17ee(0x1e5)]};}function validateInputSelection(_0x2603e0){const _0x124ccb=a147_0xb8d769,_0x2deac0=selectedInputs(_0x2603e0);if(_0x2deac0[_0x124ccb(0x1cd)]!==0x1)throw CliErrors[_0x124ccb(0x1d8)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x2deac0;}function withScene(_0x5d288b,_0x1dcda4,_0x89f3da){const _0x53733b=a147_0xb8d769;return{..._0x5d288b,'scene':_0x1dcda4,..._0x89f3da?{'sourceFile':{'fileName':_0x89f3da[_0x53733b(0x1df)],'filePath':_0x89f3da[_0x53733b(0x1c9)]}}:{}};}const ocrRecognize={'service':a147_0xb8d769(0x1dd),'command':'recognize','description':a147_0xb8d769(0x1bf),'risk':a147_0xb8d769(0x1cc),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x18bad1){const _0x3b0db4=a147_0xb8d769,_0x3d94d7=normalizeScene(_0x18bad1[_0x3b0db4(0x1e4)]('scene')),_0x21a961=SCENE_TO_LEGACY_TYPE[_0x3d94d7],_0x39f6a2=validateInputSelection(_0x18bad1);if(_0x39f6a2[_0x3b0db4(0x1eb)]){const _0x4a39e2=new URLSearchParams({'url':_0x39f6a2[_0x3b0db4(0x1eb)],'type':_0x21a961,'appCode':_0x18bad1[_0x3b0db4(0x1e7)]});return{'method':_0x3b0db4(0x1ee),'url':'/smartapi/ocr/recognize-text?'+_0x4a39e2[_0x3b0db4(0x1ca)](),'description':_0x3b0db4(0x1da)+_0x3d94d7+'\x20OCR\x20from\x20URL'};}const _0x10339c=requireDevelopmentUploadFile(_0x39f6a2[_0x3b0db4(0x1f0)],_0x3b0db4(0x1c3));return{'method':_0x3b0db4(0x1e1),'url':_0x3b0db4(0x1ed),'body':{'steps':[{'method':_0x3b0db4(0x1e1),'url':_0x3b0db4(0x1ed),'body':{'appCode':_0x18bad1[_0x3b0db4(0x1e7)],'multipart':{'file':_0x10339c}}},{'method':'POST','url':_0x3b0db4(0x1db),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x3b0db4(0x1ee),'url':_0x3b0db4(0x1e3),'query':{'appCode':_0x18bad1[_0x3b0db4(0x1e7)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x21a961}}]},'description':_0x3b0db4(0x1c7)+_0x3d94d7+_0x3b0db4(0x1d2)};},async 'execute'(_0x2757f7){const _0x2046f8=a147_0xb8d769,_0x2798c2=normalizeScene(_0x2757f7['str'](_0x2046f8(0x1ce))),_0x3ff76f=SCENE_TO_LEGACY_TYPE[_0x2798c2],_0xd20d4d=validateInputSelection(_0x2757f7);if(_0xd20d4d[_0x2046f8(0x1eb)]){const _0x2de920=await recognizeDevelopmentOcr(_0x2757f7[_0x2046f8(0x1e7)],{'url':_0xd20d4d['imageUrl'],'type':_0x3ff76f});return{'ok':!![],'data':withScene(_0x2de920,_0x2798c2)};}const _0x387017=requireDevelopmentUploadFile(_0xd20d4d[_0x2046f8(0x1f0)],'image-file'),_0x313f86=await uploadDevelopmentFile(_0x2757f7[_0x2046f8(0x1e7)],_0x387017[_0x2046f8(0x1c2)]);if(!_0x313f86['filePath'])throw CliErrors['apiError'](_0x2046f8(0x1d3));const _0x5466c2=await queryDevelopmentFileUrl(_0x313f86['filePath'],{'download':![]});if(!_0x5466c2[_0x2046f8(0x1ec)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x1ebd6c=await recognizeDevelopmentOcr(_0x2757f7[_0x2046f8(0x1e7)],{'url':_0x5466c2['fileUrl'],'type':_0x3ff76f});return{'ok':!![],'data':withScene(_0x1ebd6c,_0x2798c2,_0x313f86)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0xcd25ed=a148_0xf028;(function(_0x5b31cd,_0x5b21a1){const _0x23ac63=a148_0xf028,_0x3a629e=_0x5b31cd();while(!![]){try{const _0x1af4d1=-parseInt(_0x23ac63(0x120))/0x1+-parseInt(_0x23ac63(0x11f))/0x2*(-parseInt(_0x23ac63(0xf0))/0x3)+parseInt(_0x23ac63(0xf7))/0x4*(-parseInt(_0x23ac63(0x112))/0x5)+parseInt(_0x23ac63(0xee))/0x6+parseInt(_0x23ac63(0x114))/0x7+parseInt(_0x23ac63(0x10e))/0x8*(-parseInt(_0x23ac63(0x10b))/0x9)+parseInt(_0x23ac63(0x111))/0xa;if(_0x1af4d1===_0x5b21a1)break;else _0x3a629e['push'](_0x3a629e['shift']());}catch(_0x571c17){_0x3a629e['push'](_0x3a629e['shift']());}}}(a148_0x5a4f,0xda50d));function a148_0x5a4f(){const _0x2bb233=['create','parent-menu-id','langs','en-US','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','1214uWbVjd','502804rWGyMc','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','\x20and\x20its\x20menu\x20entry.','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','menuPath','version','warnings','createMenu','page-type','appCode','521574MiSWZh','page-pattern','3561HKLLCA','Custom_page_','name','page\x20create\x20does\x20not\x20accept\x20--page-type.','validation','keys','Would\x20create\x20Custom\x20Page\x20','4084kjdjbS','isInteger','length','pageName','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','CUSTOM','apiError','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','compress','zh-CN','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','str','page','pagePattern','string','/smartapi/webcode/page/create','pageName\x20cannot\x20exceed\x20100\x20characters.','parentMenuId','files','page-content','156654VfhwAp','pageId','input','352qotzAp','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','14843280rWqeoU','5675BgdJaV','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','7209706NyXgCt','page.create','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','POST','trim','now'];a148_0x5a4f=function(){return _0x2bb233;};return a148_0x5a4f();}import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a148_0xf028(_0x5de4f3,_0x144935){_0x5de4f3=_0x5de4f3-0xe6;const _0x5a4fb8=a148_0x5a4f();let _0xf02834=_0x5a4fb8[_0x5de4f3];return _0xf02834;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a148_0xcd25ed(0x100),a148_0xcd25ed(0x11d)];export const pageCreate={'service':a148_0xcd25ed(0x103),'command':a148_0xcd25ed(0x11a),'description':a148_0xcd25ed(0x113),'risk':'write','defaultOutputFormat':a148_0xcd25ed(0xff),'structuredErrors':!![],'rejectedFlags':[{'name':a148_0xcd25ed(0xec),'message':a148_0xcd25ed(0xf3),'hint':a148_0xcd25ed(0xfe)}],'flags':[{'name':'name','type':'string','description':a148_0xcd25ed(0xe7)},{'name':a148_0xcd25ed(0x11b),'type':'number','description':a148_0xcd25ed(0x10f)},{'name':a148_0xcd25ed(0xef),'type':'string','description':a148_0xcd25ed(0x121),'enum':['BLANK']},{'name':a148_0xcd25ed(0x10a),'type':a148_0xcd25ed(0x105),'description':'Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x34f86a){const _0x1ef331=a148_0xcd25ed,_0x381658=readPagePattern(_0x34f86a);await validateCustomPageContent(readInput(_0x34f86a,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x381658)[_0x1ef331(0x109)]);},async 'dryRun'(_0x5b49e7){const _0x2e22db=a148_0xcd25ed,{input:_0x3fb24f}=await prepare(_0x5b49e7);return{'method':_0x2e22db(0x117),'url':_0x2e22db(0x106),'body':{'appCode':_0x3fb24f[_0x2e22db(0xed)],'pageName':_0x3fb24f['pageName'],..._0x3fb24f[_0x2e22db(0x108)]!=null?{'parentMenuId':_0x3fb24f[_0x2e22db(0x108)]}:{},'createMenu':_0x3fb24f[_0x2e22db(0xeb)],'codeContent':_0x3fb24f[_0x2e22db(0x109)]},'description':_0x2e22db(0xf6)+JSON['stringify'](_0x3fb24f['pageName'])+_0x2e22db(0x122)};},async 'execute'(_0x435c20){const _0x39829d=a148_0xcd25ed,_0x81ca7d=await prepare(_0x435c20),_0x2ee3d5=await createCustomPage(_0x81ca7d[_0x39829d(0x10d)]);if(!Number['isInteger'](_0x2ee3d5[_0x39829d(0x10c)])||_0x2ee3d5['pageId']<=0x0)throw CliErrors[_0x39829d(0xfd)](_0x39829d(0x116));return{'ok':!![],'data':buildMutationData(_0x81ca7d,_0x2ee3d5),'message':'Created\x20Custom\x20Page\x20'+_0x2ee3d5['pageId']+'.'};}};async function prepare(_0x15fbf0){const _0x554d33=a148_0xcd25ed,_0x5e758e=readPagePattern(_0x15fbf0);if(_0x5e758e===null)return{'input':readInput(_0x15fbf0,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5e758e),'warnings':[],'pagePattern':_0x5e758e};let _0x10501e=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x24e712=[];try{const _0x1a6579=await getI18nInfo(_0x15fbf0[_0x554d33(0xed)]);_0x1a6579['enableI18n']&&_0x1a6579['langs']?.[_0x554d33(0xf9)]&&(_0x10501e=_0x1a6579[_0x554d33(0x11c)]);}catch{_0x24e712=[_0x554d33(0x101)];}return{'input':readInput(_0x15fbf0,_0x10501e,_0x5e758e),'warnings':_0x24e712,'pagePattern':_0x5e758e};}function readPagePattern(_0x3e7ef0){const _0x372ec1=a148_0xcd25ed,_0x414630=_0x3e7ef0[_0x372ec1(0x102)]('page-pattern')[_0x372ec1(0x118)](),_0x56755d=_0x3e7ef0[_0x372ec1(0x102)](_0x372ec1(0x10a))[_0x372ec1(0x118)]()[_0x372ec1(0xf9)]>0x0;if(_0x414630&&_0x56755d)throw CliErrors[_0x372ec1(0xf4)]('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x56755d)return null;if(!_0x414630)throw CliErrors[_0x372ec1(0xf4)](_0x372ec1(0xe6));if(_0x414630!=='BLANK')throw CliErrors['validation'](_0x372ec1(0xfb));return _0x414630;}function readInput(_0xb7d7e4,_0x54e0db=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5b6182=readPagePattern(_0xb7d7e4)){const _0x414dfb=a148_0xcd25ed,_0x24684f=_0xb7d7e4[_0x414dfb(0x102)](_0x414dfb(0xf2))[_0x414dfb(0x118)]()||_0x414dfb(0xf1)+Date[_0x414dfb(0x119)]();if(_0x24684f['length']>0x64)throw CliErrors[_0x414dfb(0xf4)](_0x414dfb(0x107));const _0x2cb80f=_0xb7d7e4['num'](_0x414dfb(0x11b),NaN),_0x5bbdd5=!Number['isNaN'](_0x2cb80f);if(_0x5bbdd5&&(!Number[_0x414dfb(0xf8)](_0x2cb80f)||_0x2cb80f<=0x0))throw CliErrors[_0x414dfb(0xf4)](_0x414dfb(0x110));return{'appCode':_0xb7d7e4['appCode'],'pageName':_0x24684f,..._0x5bbdd5?{'parentMenuId':_0x2cb80f}:{},'createMenu':!![],'files':_0x5b6182===null?parseCustomPageContent(_0xb7d7e4['str']('page-content')):buildInitialFiles(_0x24684f,_0x54e0db)};}function buildMutationData(_0x2d18a2,_0x4c02f0){const _0x47786f=a148_0xcd25ed,{input:_0x20b1f3}=_0x2d18a2,_0x450892=_0x4c02f0&&buildCustomPageDevelopmentUrl(_0x20b1f3['appCode'],_0x4c02f0[_0x47786f(0xe8)]),_0x50f4d1=_0x4c02f0&&buildCustomPageEditUrl(_0x20b1f3[_0x47786f(0xed)],_0x4c02f0['pageId']);return{'operation':_0x47786f(0x115),'pageType':_0x47786f(0xfc),'pagePattern':_0x2d18a2[_0x47786f(0x104)],'selector':{'appCode':_0x20b1f3[_0x47786f(0xed)],'pageName':_0x20b1f3[_0x47786f(0xfa)]},'before':null,'after':{'pageId':_0x4c02f0?.[_0x47786f(0x10c)]??null,'pageName':_0x4c02f0?.['pageName']??_0x20b1f3[_0x47786f(0xfa)],'appCode':_0x4c02f0?.[_0x47786f(0xed)]??_0x20b1f3[_0x47786f(0xed)],'version':_0x4c02f0?.[_0x47786f(0xe9)]??null,'menuId':_0x4c02f0?.['menuId']??null,'menuPath':_0x4c02f0?.[_0x47786f(0xe8)]??null,'files':_0x4c02f0?.[_0x47786f(0x109)]??Object[_0x47786f(0xf5)](_0x20b1f3[_0x47786f(0x109)])},'dryRun':_0x4c02f0===undefined,'request':_0x20b1f3,..._0x450892?{'pageUrl':_0x450892}:{},..._0x50f4d1?{'editPageUrl':_0x50f4d1}:{},'warnings':[..._0x2d18a2[_0x47786f(0xea)],..._0x4c02f0&&!_0x450892?[_0x47786f(0x11e)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a149_0x547bb0=a149_0x6d8e;(function(_0x3b8ebe,_0x4d1603){const _0x10baff=a149_0x6d8e,_0x3cc49a=_0x3b8ebe();while(!![]){try{const _0x4bb767=-parseInt(_0x10baff(0x115))/0x1+parseInt(_0x10baff(0x111))/0x2+-parseInt(_0x10baff(0x11c))/0x3*(-parseInt(_0x10baff(0x116))/0x4)+parseInt(_0x10baff(0x10e))/0x5*(parseInt(_0x10baff(0x121))/0x6)+-parseInt(_0x10baff(0x11e))/0x7*(parseInt(_0x10baff(0x118))/0x8)+-parseInt(_0x10baff(0x10b))/0x9*(-parseInt(_0x10baff(0x10c))/0xa)+-parseInt(_0x10baff(0x120))/0xb;if(_0x4bb767===_0x4d1603)break;else _0x3cc49a['push'](_0x3cc49a['shift']());}catch(_0x5100ce){_0x3cc49a['push'](_0x3cc49a['shift']());}}}(a149_0x3444,0x2b5b4));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a149_0x547bb0(0x11b),'command':a149_0x547bb0(0x112),'description':a149_0x547bb0(0x11d),'risk':'read','defaultOutputFormat':a149_0x547bb0(0x110),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x547bb0(0x123),'required':!![],'description':a149_0x547bb0(0x113)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x8d3978){readCustomPageId(_0x8d3978);},async 'execute'(_0x23fbbc){const _0x242b5a=a149_0x547bb0,_0x3edf03=readCustomPageId(_0x23fbbc),_0x727bc7=await getCustomPageSource(_0x3edf03),{bundle:_0x8d5b3c,createTime:_0x2885b3,updateTime:_0x55b9b7,..._0x1ba50d}=_0x727bc7,_0x22e1e7=_0x727bc7['id']??_0x3edf03,_0x531656=_0x727bc7[_0x242b5a(0x11a)]?.['trim']()||_0x23fbbc['str']('appcode')['trim'](),_0x3d3140=buildCustomPageRuntimeUrl(_0x531656,_0x727bc7[_0x242b5a(0x119)]),_0x47b5a2=buildCustomPageEditUrl(_0x531656,_0x22e1e7),_0x333cba=await resolveCustomPageDevelopmentUrl(_0x531656,_0x22e1e7,_0x23fbbc[_0x242b5a(0x114)]);return{'ok':!![],'data':{..._0x1ba50d,..._0x3d3140?{'runtimePageUrl':_0x3d3140}:{},..._0x333cba?{'pageUrl':_0x333cba}:{},..._0x47b5a2?{'editPageUrl':_0x47b5a2}:{},..._0x2885b3==null?{}:{'createTime':formatTime(_0x2885b3)},..._0x55b9b7==null?{}:{'updateTime':formatTime(_0x55b9b7)}},'message':_0x242b5a(0x127)+_0x3edf03+'.'};}};function a149_0x6d8e(_0xc288b0,_0x2cd7b7){_0xc288b0=_0xc288b0-0x10b;const _0x344477=a149_0x3444();let _0x6d8e6a=_0x344477[_0xc288b0];return _0x6d8e6a;}function a149_0x3444(){const _0x4e6e96=['3ILxYqi','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','959PWVCaB','getHours','3583789SwlOjK','764538UpsGnH','padStart','number','join','getTime','getMonth','Retrieved\x20Custom\x20Page\x20','9EeyeIY','374830HieLwh','getSeconds','10rxJOSn','getDate','compress','537346gjGnBO','custom-detail','Custom\x20Page\x20ID','cookie','69730hSLlRk','243548WVumsI','getFullYear','2848mRkKGf','pageCode','appCode','page'];a149_0x3444=function(){return _0x4e6e96;};return a149_0x3444();}function formatTime(_0x1cb253){const _0x498084=a149_0x547bb0,_0x116849=new Date(_0x1cb253);if(Number['isNaN'](_0x116849[_0x498084(0x125)]()))return String(_0x1cb253);const _0x4689ea=[_0x116849[_0x498084(0x117)](),String(_0x116849[_0x498084(0x126)]()+0x1)[_0x498084(0x122)](0x2,'0'),String(_0x116849[_0x498084(0x10f)]())['padStart'](0x2,'0')][_0x498084(0x124)]('-'),_0x24a1d8=[String(_0x116849[_0x498084(0x11f)]())[_0x498084(0x122)](0x2,'0'),String(_0x116849['getMinutes']())[_0x498084(0x122)](0x2,'0'),String(_0x116849[_0x498084(0x10d)]())[_0x498084(0x122)](0x2,'0')]['join'](':');return _0x4689ea+'\x20'+_0x24a1d8;}
|