@lovrabet/rabetbase-cli 2.5.1-beta.5 → 2.5.1
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.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/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/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 +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase/references/rabetbase-rule.md +15 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a140_0x18e524=a140_0x191d;(function(_0x23658a,_0x1654ba){const _0x21d31d=a140_0x191d,_0x643572=_0x23658a();while(!![]){try{const _0x2d1264=-parseInt(_0x21d31d(0x16e))/0x1+-parseInt(_0x21d31d(0x156))/0x2+parseInt(_0x21d31d(0x11c))/0x3*(-parseInt(_0x21d31d(0x124))/0x4)+-parseInt(_0x21d31d(0x11a))/0x5*(parseInt(_0x21d31d(0x133))/0x6)+-parseInt(_0x21d31d(0x158))/0x7+parseInt(_0x21d31d(0x14c))/0x8+-parseInt(_0x21d31d(0x159))/0x9*(-parseInt(_0x21d31d(0x148))/0xa);if(_0x2d1264===_0x1654ba)break;else _0x643572['push'](_0x643572['shift']());}catch(_0x355017){_0x643572['push'](_0x643572['shift']());}}}(a140_0x504d,0xcb6b8));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_0x18e524(0x135),'path':a140_0x18e524(0x180)}];export const menuVisibilityUpdate={'service':a140_0x18e524(0x186),'command':a140_0x18e524(0x174),'description':a140_0x18e524(0x185),'risk':a140_0x18e524(0x194),'structuredErrors':!![],'flags':[{'name':a140_0x18e524(0x18d),'type':a140_0x18e524(0x160),'description':a140_0x18e524(0x17f)},{'name':'paths','type':a140_0x18e524(0x160),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a140_0x18e524(0x18e),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a140_0x18e524(0x18e),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a140_0x18e524(0x13a),'type':a140_0x18e524(0x119),'description':a140_0x18e524(0x170)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3cbd90){parseInput(_0x3cbd90),requireExplicitYes(_0x3cbd90);},async 'dryRun'(_0x570118){const _0x2fce3f=a140_0x18e524,_0x149cbf=await buildPlan(_0x570118,!![]),_0x1b7b24=_0x149cbf['plan'][_0x2fce3f(0x144)]?.[_0x2fce3f(0x125)]??0x0,_0x3f3e20=_0x149cbf[_0x2fce3f(0x183)][_0x2fce3f(0x175)][_0x2fce3f(0x125)]-_0x1b7b24;return menuDryRunResult(_0x149cbf[_0x2fce3f(0x183)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x149cbf[_0x2fce3f(0x183)][_0x2fce3f(0x144)]?.[_0x2fce3f(0x153)](_0x147dcf=>_0x147dcf[_0x2fce3f(0x138)])??[]},'description':_0x2fce3f(0x146)+_0x1b7b24+_0x2fce3f(0x171)+_0x3f3e20+_0x2fce3f(0x172)});},async 'execute'(_0x5aa78c){const _0x2957d8=a140_0x18e524;requireExplicitYes(_0x5aa78c);const _0x3abd8a=await buildPlan(_0x5aa78c,![]);await recheckMutationSnapshot(_0x5aa78c,_0x3abd8a[_0x2957d8(0x183)],_0x2957d8(0x134));const _0x3b238d=[],_0xd127a5=[],_0x58defb=[];for(const _0x5e912d of _0x3abd8a['plan'][_0x2957d8(0x175)]){if(_0x5e912d['before'][_0x2957d8(0x13b)]===_0x3abd8a[_0x2957d8(0x183)][_0x2957d8(0x15f)]){_0x3b238d[_0x2957d8(0x162)]({'id':_0x5e912d['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5aa78c[_0x2957d8(0x150)],_0x5aa78c[_0x2957d8(0x141)],{'id':_0x5e912d['id'],'visible':_0x3abd8a[_0x2957d8(0x183)][_0x2957d8(0x15f)]}),_0x3b238d[_0x2957d8(0x162)]({'id':_0x5e912d['id'],'updated':!![],'skipped':![]});}catch(_0x4113fa){const _0x1efcf9=mapMenuApiError(_0x4113fa,_0x2957d8(0x178),_0x5e912d['id']);if(isMenuResponseLoss(_0x4113fa)&&_0x1efcf9[_0x2957d8(0x127)]!=='menu_permission_denied'){_0x58defb[_0x2957d8(0x162)](_0x5e912d['id']);continue;}_0xd127a5[_0x2957d8(0x162)]({'id':_0x5e912d['id'],'stage':'update','code':_0x1efcf9[_0x2957d8(0x127)],'message':_0x1efcf9[_0x2957d8(0x161)]});}}let _0x10d906;try{_0x10d906=await fetchMenuSnapshot(_0x5aa78c[_0x2957d8(0x150)],_0x5aa78c[_0x2957d8(0x141)]);}catch(_0x2b9fd0){const _0x3dbed3=describeMenuErrorCause(_0x2b9fd0,'verify\x20menu\x20visibility\x20update'),_0x359837=_0x58defb[_0x2957d8(0x153)](_0x465280=>({'id':_0x465280,'stage':_0x2957d8(0x152),'code':_0x2957d8(0x16b),'message':_0x2957d8(0x16c)+_0x465280+_0x2957d8(0x197),'requestedStateConfirmed':![],'recovered':![]})),_0x466be7={'stage':_0x2957d8(0x190),'code':_0x2957d8(0x16b),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x3abd8a[_0x2957d8(0x183)]['targets']['map'](_0x550af1=>_0x550af1['id']),'requestedStateConfirmed':![],..._0x3dbed3};throw menuFailure(asVerificationError(_0x2b9fd0,_0x2957d8(0x166)),_0x3abd8a[_0x2957d8(0x183)],{'stage':'verification','succeeded':_0x3b238d,'failedRecords':[..._0xd127a5,..._0x359837,_0x466be7],'warnings':[_0x2957d8(0x147)],'verification':{'status':_0x2957d8(0x129),'recoveredCount':0x0,'lookupCommand':_0x2957d8(0x16a)}});}const _0x53440e=[];for(const _0x5d1c9e of _0x3b238d){const _0x2be493=Number(_0x5d1c9e['id']),_0x143431=_0x3abd8a[_0x2957d8(0x123)][_0x2957d8(0x182)](_0x2be493),_0xc3f57d=_0x10d906[_0x2957d8(0x15c)]['get'](_0x2be493);try{verifyVisibilityUpdate(_0x143431,_0xc3f57d,_0x3abd8a[_0x2957d8(0x183)][_0x2957d8(0x15f)]);}catch(_0x2c2a25){const _0x521043=asVerificationError(_0x2c2a25,_0x2957d8(0x126)+_0x2be493+_0x2957d8(0x189));_0x53440e['push']({'id':_0x2be493,'stage':_0x2957d8(0x190),'code':_0x521043['code'],'message':_0x521043[_0x2957d8(0x161)],'requestedStateConfirmed':![]});}}for(const _0x32607b of _0x58defb){const _0x121863=_0x3abd8a['beforeById'][_0x2957d8(0x182)](_0x32607b),_0x222f4d=_0x10d906[_0x2957d8(0x15c)][_0x2957d8(0x182)](_0x32607b);try{verifyVisibilityUpdate(_0x121863,_0x222f4d,_0x3abd8a[_0x2957d8(0x183)][_0x2957d8(0x15f)]),_0x3b238d[_0x2957d8(0x162)]({'id':_0x32607b,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2de5b9){const _0x4262f1=asVerificationError(_0x2de5b9,_0x2957d8(0x14e)+_0x32607b+_0x2957d8(0x13e));_0x53440e[_0x2957d8(0x162)]({'id':_0x32607b,'stage':_0x2957d8(0x152),'code':_0x4262f1[_0x2957d8(0x127)],'message':_0x4262f1[_0x2957d8(0x161)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x53440e[_0x2957d8(0x125)]>0x0){const _0x403de8=_0x53440e['map'](_0x34957c=>Number(_0x34957c['id'])),_0x4c6be6=_0x3b238d[_0x2957d8(0x193)](_0x225f60=>_0x225f60['recovered']===!![])[_0x2957d8(0x125)],_0x124170=menuError(_0x2957d8(0x16b),_0x2957d8(0x122)+_0x403de8[_0x2957d8(0x151)](',\x20')+'.',_0x2957d8(0x154));throw menuFailure(_0x124170,_0x3abd8a[_0x2957d8(0x183)],{'stage':_0x2957d8(0x190),'succeeded':_0x3b238d,'failedRecords':[..._0xd127a5,..._0x53440e],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x2957d8(0x129),..._0x403de8['length']===0x1?{'targetId':_0x403de8[0x0]}:{'targetIds':_0x403de8},'recoveredCount':_0x4c6be6,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4693e3=_0x3b238d[_0x2957d8(0x193)](_0x2abca6=>_0x2abca6[_0x2957d8(0x12e)]===!![])[_0x2957d8(0x125)],_0x4ee24f=_0x3b238d[_0x2957d8(0x125)]-_0x4693e3,_0x2daf50={..._0x3abd8a[_0x2957d8(0x183)],'succeeded':_0x3b238d,'failed':_0xd127a5,'warnings':_0xd127a5[_0x2957d8(0x125)]>0x0?[..._0x3abd8a[_0x2957d8(0x183)]['warnings'],_0x2957d8(0x184)]:_0x3abd8a[_0x2957d8(0x183)][_0x2957d8(0x13d)],'verification':{'checkedBy':_0x2957d8(0x12c),'snapshotHash':_0x10d906[_0x2957d8(0x15a)],'matchesRequestedState':_0xd127a5[_0x2957d8(0x125)]===0x0,'recoveredCount':_0x58defb[_0x2957d8(0x125)]}};return{'ok':_0xd127a5['length']===0x0,'data':_0x2daf50,'message':_0xd127a5[_0x2957d8(0x125)]===0x0?_0x2957d8(0x15d)+_0x4693e3+_0x2957d8(0x149)+_0x4ee24f+_0x2957d8(0x172):_0x2957d8(0x16d)+_0x4693e3+_0x2957d8(0x173)+_0x4ee24f+_0x2957d8(0x176)+_0xd127a5[_0x2957d8(0x125)]+_0x2957d8(0x198)};}};function parseInput(_0x561a45){const _0x2f529f=a140_0x18e524,_0x1364f8=parseMenuIds(_0x561a45[_0x2f529f(0x179)](_0x2f529f(0x18d))),_0x14a804=parseCsv(_0x561a45[_0x2f529f(0x179)](_0x2f529f(0x130)));if(_0x1364f8['length']===0x0&&_0x14a804[_0x2f529f(0x125)]===0x0)throw CliErrors[_0x2f529f(0x14f)](_0x2f529f(0x13c));const _0x145652=parseBooleanFlag(_0x561a45,'visible',!![]),_0x5ad24e=parseBooleanFlag(_0x561a45,_0x2f529f(0x12a),![]);let _0xbf7a8d;if(hasFlag(_0x561a45,_0x2f529f(0x13a))){_0xbf7a8d=_0x561a45[_0x2f529f(0x137)](_0x2f529f(0x13a));if(!Number[_0x2f529f(0x17e)](_0xbf7a8d)||_0xbf7a8d<0x0)throw CliErrors[_0x2f529f(0x14f)](_0x2f529f(0x18a));}return{'menuIds':_0x1364f8,'paths':_0x14a804,'visible':_0x145652,'expectVisible':_0x5ad24e,'expectedCount':_0xbf7a8d};}function a140_0x191d(_0x6b694f,_0x3cf1ea){_0x6b694f=_0x6b694f-0x118;const _0x504d7a=a140_0x504d();let _0x191d70=_0x504d7a[_0x6b694f];return _0x191d70;}async function buildPlan(_0x501d94,_0x2f9e1c){const _0x47e29d=a140_0x18e524,_0x1c1fe9=parseInput(_0x501d94),_0x1e0bcc=await fetchMutationSnapshot(_0x501d94,'update\x20menu\x20visibility'),_0x4367fd=selectTargets(_0x1e0bcc[_0x47e29d(0x195)],_0x1c1fe9[_0x47e29d(0x167)],_0x1c1fe9['paths']);if(_0x1c1fe9[_0x47e29d(0x136)]!==undefined&&_0x4367fd[_0x47e29d(0x125)]!==_0x1c1fe9[_0x47e29d(0x136)])throw menuError(_0x47e29d(0x132),_0x47e29d(0x17c)+_0x4367fd[_0x47e29d(0x125)]+_0x47e29d(0x120)+_0x1c1fe9[_0x47e29d(0x136)]+'.',_0x47e29d(0x16f));if(_0x1c1fe9[_0x47e29d(0x165)]!==undefined){const _0x132bf0=_0x4367fd[_0x47e29d(0x193)](_0x23f20d=>_0x23f20d[_0x47e29d(0x13b)]!==_0x1c1fe9['expectVisible']);if(_0x132bf0[_0x47e29d(0x125)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x132bf0[_0x47e29d(0x153)](_0x418b65=>_0x418b65['id'])[_0x47e29d(0x151)](',\x20')+'.',_0x47e29d(0x13f));}const _0x5ee510=_0x4367fd[_0x47e29d(0x153)](_0x57bf36=>({'id':_0x57bf36['id'],'label':_0x57bf36['label'],'path':_0x57bf36[_0x47e29d(0x14a)],'before':{'visible':_0x57bf36['visible']},'after':{'visible':_0x1c1fe9[_0x47e29d(0x13b)]}})),_0x2288ac=_0x5ee510[_0x47e29d(0x193)](_0x38ef55=>_0x38ef55[_0x47e29d(0x187)]['visible']!==_0x1c1fe9[_0x47e29d(0x13b)])[_0x47e29d(0x153)](_0x4acc90=>({'stage':_0x47e29d(0x17d),'method':_0x47e29d(0x135),'path':_0x47e29d(0x180),'body':{'appCode':_0x501d94['appCode'],'id':_0x4acc90['id'],'visible':_0x1c1fe9['visible']}})),_0x207ef7=mutationResult({'operation':_0x47e29d(0x174),'selector':{'menuIds':_0x1c1fe9[_0x47e29d(0x167)],'paths':_0x1c1fe9[_0x47e29d(0x130)]},'before':{'menus':_0x4367fd[_0x47e29d(0x153)](_0x291dfb=>({'id':_0x291dfb['id'],'path':_0x291dfb[_0x47e29d(0x14a)],'visible':_0x291dfb['visible']}))},'after':{'menus':_0x4367fd[_0x47e29d(0x153)](_0xaeb2c7=>({'id':_0xaeb2c7['id'],'path':_0xaeb2c7['path'],'visible':_0x1c1fe9[_0x47e29d(0x13b)]}))},'dryRun':_0x2f9e1c,'backend':[...BACKEND],'plannedActions':_0x2288ac,'snapshotHash':_0x1e0bcc[_0x47e29d(0x15a)],'warnings':_0x2288ac['length']===0x0?[_0x47e29d(0x157)]:[]});return{'plan':{..._0x207ef7,'requestedVisible':_0x1c1fe9[_0x47e29d(0x13b)],'targets':_0x5ee510},'beforeById':new Map(_0x4367fd[_0x47e29d(0x153)](_0x4f7bff=>[_0x4f7bff['id'],_0x4f7bff]))};}function a140_0x504d(){const _0x9a655d=['plan','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','menu','before','\x20must\x20be\x20true\x20or\x20false.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','pageType','menu-ids','boolean','false','verification','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','flagMissing','filter','high-risk-write','menus','parentId','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20failed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','number','3877350HcLjPo','rawFlags','76947fyQouM','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','resources','modelType','\x20menu(s),\x20expected\x20','trim','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','beforeById','156NoAjAr','length','Menu\x20','code','childrenCount','failed','expect-visible','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu\x20list','resourcesValid','updated','Menu\x20id\x20selector(s)\x20not\x20found:\x20','paths','sort','menu_expected_count_mismatch','6dFKzkp','update\x20menu\x20visibility','POST','expectedCount','num','body','childrenIds','expected-count','visible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','warnings','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','Menu\x20path\x20selector\x20not\x20found:\x20','cookie','split','set','plannedActions','url','Would\x20update\x20visibility\x20for\x20','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','37683450KDagAY','\x20menu(s);\x20skipped\x20','path','isArray','9371736GllSxB','menu_selector_not_found','Response\x20was\x20lost\x20and\x20menu\x20','validation','appCode','join','update-recovery','map','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','2244436CLDMJX','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2978990TZdwcz','9nCpSsl','hash','datasetCode','byId','Updated\x20visibility\x20for\x20','stringify','requestedVisible','string','message','push','values','datasetId','expectVisible','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','menuIds','depth','some','rabetbase\x20menu\x20list\x20--format\x20compress','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20visibility\x20update\x20completed:\x20','783035pAlrjE','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','\x20menu(s);\x20skip\x20','\x20unchanged\x20menu(s).','\x20updated,\x20','visibility-update','targets','\x20skipped,\x20','type','update\x20visibility\x20for','str','\x20changed\x20unexpectedly.','label','Selected\x20','update-menu-visibility','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','/smartapi/menu/update','true','get'];a140_0x504d=function(){return _0x9a655d;};return a140_0x504d();}function selectTargets(_0x3970c9,_0x70554d,_0x2fe9d5){const _0x4d35d3=a140_0x18e524,_0x4628f9=new Map(_0x3970c9['map'](_0x3743cb=>[_0x3743cb['id'],_0x3743cb])),_0x4d8787=new Map(),_0x3c72d1=_0x70554d[_0x4d35d3(0x193)](_0x291908=>!_0x4628f9['has'](_0x291908));if(_0x3c72d1['length']>0x0)throw menuError(_0x4d35d3(0x14d),_0x4d35d3(0x12f)+_0x3c72d1['join'](',\x20')+'.',_0x4d35d3(0x118));for(const _0x11da09 of _0x70554d){_0x4d8787[_0x4d35d3(0x143)](_0x11da09,_0x4628f9[_0x4d35d3(0x182)](_0x11da09));}for(const _0x46d9ce of _0x2fe9d5){const _0x3ebf20=_0x3970c9[_0x4d35d3(0x193)](_0x21af23=>_0x21af23[_0x4d35d3(0x14a)]===_0x46d9ce);if(_0x3ebf20[_0x4d35d3(0x125)]===0x0)throw menuError('menu_selector_not_found',_0x4d35d3(0x140)+JSON[_0x4d35d3(0x15e)](_0x46d9ce)+'.',_0x4d35d3(0x191));if(_0x3ebf20[_0x4d35d3(0x125)]>0x1)throw menuError('menu_selector_ambiguous',_0x4d35d3(0x18b)+JSON[_0x4d35d3(0x15e)](_0x46d9ce)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x3ebf20['map'](_0x7b16ea=>_0x7b16ea['id'])['join'](',\x20')+'.');const _0x404360=_0x3ebf20[0x0];_0x4d8787[_0x4d35d3(0x143)](_0x404360['id'],_0x404360);}return[..._0x4d8787[_0x4d35d3(0x163)]()];}function parseMenuIds(_0x398d58){const _0x5b99fc=a140_0x18e524,_0xead788=parseCsv(_0x398d58),_0x1ee222=_0xead788[_0x5b99fc(0x153)](Number);if(_0x1ee222[_0x5b99fc(0x169)](_0x6b09a3=>!Number['isSafeInteger'](_0x6b09a3)||_0x6b09a3<=0x0))throw CliErrors[_0x5b99fc(0x14f)](_0x5b99fc(0x12b));return[...new Set(_0x1ee222)];}function parseCsv(_0x5450fb){const _0x38cb57=a140_0x18e524;return[...new Set(_0x5450fb[_0x38cb57(0x142)](',')['map'](_0x36ae74=>_0x36ae74[_0x38cb57(0x121)]())[_0x38cb57(0x193)](Boolean))];}function parseBooleanFlag(_0x423507,_0x3a4028,_0x1110d8){const _0x2857b5=a140_0x18e524;if(!hasFlag(_0x423507,_0x3a4028)){if(_0x1110d8)throw CliErrors[_0x2857b5(0x192)](_0x3a4028);return undefined;}const _0x8e77dd=_0x423507[_0x2857b5(0x11b)][_0x3a4028];if(_0x8e77dd===!![]||_0x8e77dd===![])return _0x8e77dd;if(_0x8e77dd===_0x2857b5(0x181))return!![];if(_0x8e77dd===_0x2857b5(0x18f))return![];throw CliErrors[_0x2857b5(0x14f)]('--'+_0x3a4028+_0x2857b5(0x188));}function verifyVisibilityUpdate(_0x418c08,_0x29273b,_0x319791){const _0x43bc92=a140_0x18e524;assertVerified(!!_0x29273b,'Menu\x20'+_0x418c08['id']+_0x43bc92(0x11d)),assertVerified(_0x29273b[_0x43bc92(0x13b)]===_0x319791,_0x43bc92(0x126)+_0x418c08['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x4064d9=[['id',_0x29273b['id'],_0x418c08['id']],[_0x43bc92(0x196),_0x29273b[_0x43bc92(0x196)],_0x418c08[_0x43bc92(0x196)]],[_0x43bc92(0x168),_0x29273b[_0x43bc92(0x168)],_0x418c08[_0x43bc92(0x168)]],[_0x43bc92(0x17b),_0x29273b[_0x43bc92(0x17b)],_0x418c08[_0x43bc92(0x17b)]],[_0x43bc92(0x14a),_0x29273b[_0x43bc92(0x14a)],_0x418c08[_0x43bc92(0x14a)]],[_0x43bc92(0x145),_0x29273b['url'],_0x418c08['url']],['type',_0x29273b['type'],_0x418c08[_0x43bc92(0x177)]],[_0x43bc92(0x131),_0x29273b[_0x43bc92(0x131)],_0x418c08[_0x43bc92(0x131)]],[_0x43bc92(0x11e),_0x29273b[_0x43bc92(0x11e)],_0x418c08[_0x43bc92(0x11e)]],[_0x43bc92(0x12d),_0x29273b['resourcesValid'],_0x418c08[_0x43bc92(0x12d)]],[_0x43bc92(0x139),_0x29273b[_0x43bc92(0x139)],_0x418c08[_0x43bc92(0x139)]],[_0x43bc92(0x128),_0x29273b['childrenCount'],_0x418c08[_0x43bc92(0x128)]],[_0x43bc92(0x155),_0x29273b[_0x43bc92(0x155)],_0x418c08[_0x43bc92(0x155)]],['pageType',_0x29273b[_0x43bc92(0x18c)],_0x418c08[_0x43bc92(0x18c)]],[_0x43bc92(0x11f),_0x29273b[_0x43bc92(0x11f)],_0x418c08[_0x43bc92(0x11f)]],['datasetId',_0x29273b[_0x43bc92(0x164)],_0x418c08['datasetId']],[_0x43bc92(0x15b),_0x29273b[_0x43bc92(0x15b)],_0x418c08[_0x43bc92(0x15b)]]];for(const [_0x2afa6b,_0xc64759,_0x1d0f6e]of _0x4064d9){assertVerified(sameValue(_0xc64759,_0x1d0f6e),_0x43bc92(0x126)+_0x418c08['id']+'\x20'+_0x2afa6b+_0x43bc92(0x17a));}}function sameValue(_0x1dacbe,_0x3bfcba){const _0x134d5f=a140_0x18e524;if(Array[_0x134d5f(0x14b)](_0x1dacbe)||Array['isArray'](_0x3bfcba))return JSON['stringify'](_0x1dacbe)===JSON['stringify'](_0x3bfcba);return _0x1dacbe===_0x3bfcba;}
|
|
1
|
+
const a140_0x5bc500=a140_0x4ea8;(function(_0x1fd2d6,_0x3c72e6){const _0x507064=a140_0x4ea8,_0x1cd569=_0x1fd2d6();while(!![]){try{const _0x32373d=-parseInt(_0x507064(0x211))/0x1+parseInt(_0x507064(0x226))/0x2+parseInt(_0x507064(0x1da))/0x3+-parseInt(_0x507064(0x23c))/0x4+-parseInt(_0x507064(0x206))/0x5*(parseInt(_0x507064(0x1f0))/0x6)+parseInt(_0x507064(0x1fb))/0x7+parseInt(_0x507064(0x20a))/0x8*(parseInt(_0x507064(0x227))/0x9);if(_0x32373d===_0x3c72e6)break;else _0x1cd569['push'](_0x1cd569['shift']());}catch(_0x2a6209){_0x1cd569['push'](_0x1cd569['shift']());}}}(a140_0x43d2,0x21d97));function a140_0x4ea8(_0x1086f7,_0x118aab){_0x1086f7=_0x1086f7-0x1c9;const _0x43d264=a140_0x43d2();let _0x4ea828=_0x43d264[_0x1086f7];return _0x4ea828;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a140_0x5bc500(0x210)}];export const menuVisibilityUpdate={'service':'menu','command':a140_0x5bc500(0x23a),'description':a140_0x5bc500(0x20e),'risk':a140_0x5bc500(0x204),'structuredErrors':!![],'flags':[{'name':a140_0x5bc500(0x1d1),'type':a140_0x5bc500(0x207),'description':a140_0x5bc500(0x1ec)},{'name':a140_0x5bc500(0x1eb),'type':'string','description':a140_0x5bc500(0x231)},{'name':a140_0x5bc500(0x1cf),'type':a140_0x5bc500(0x1f7),'required':!![],'description':a140_0x5bc500(0x223)},{'name':a140_0x5bc500(0x1d2),'type':'boolean','description':a140_0x5bc500(0x1f5)},{'name':a140_0x5bc500(0x212),'type':'number','description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x258cc2){parseInput(_0x258cc2),requireExplicitYes(_0x258cc2);},async 'dryRun'(_0x468905){const _0x494689=a140_0x5bc500,_0x34beb9=await buildPlan(_0x468905,!![]),_0xb09748=_0x34beb9[_0x494689(0x1d5)]['plannedActions']?.[_0x494689(0x1e1)]??0x0,_0x1dc268=_0x34beb9['plan']['targets'][_0x494689(0x1e1)]-_0xb09748;return menuDryRunResult(_0x34beb9[_0x494689(0x1d5)],{'method':_0x494689(0x1d4),'url':_0x494689(0x210),'body':{'updates':_0x34beb9[_0x494689(0x1d5)][_0x494689(0x1f6)]?.[_0x494689(0x237)](_0x34f09a=>_0x34f09a[_0x494689(0x1fe)])??[]},'description':_0x494689(0x1ed)+_0xb09748+_0x494689(0x1ce)+_0x1dc268+_0x494689(0x1df)});},async 'execute'(_0x1903a3){const _0x45063e=a140_0x5bc500;requireExplicitYes(_0x1903a3);const _0x450b40=await buildPlan(_0x1903a3,![]);await recheckMutationSnapshot(_0x1903a3,_0x450b40['plan'],_0x45063e(0x220));const _0x41459c=[],_0x4d2089=[],_0x34d492=[];for(const _0x1cedb0 of _0x450b40[_0x45063e(0x1d5)][_0x45063e(0x22b)]){if(_0x1cedb0['before'][_0x45063e(0x1cf)]===_0x450b40['plan'][_0x45063e(0x1ea)]){_0x41459c['push']({'id':_0x1cedb0['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x1903a3[_0x45063e(0x1d7)],_0x1903a3[_0x45063e(0x205)],{'id':_0x1cedb0['id'],'visible':_0x450b40[_0x45063e(0x1d5)][_0x45063e(0x1ea)]}),_0x41459c[_0x45063e(0x214)]({'id':_0x1cedb0['id'],'updated':!![],'skipped':![]});}catch(_0x522172){const _0xc6b07f=mapMenuApiError(_0x522172,'update\x20visibility\x20for',_0x1cedb0['id']);if(isMenuResponseLoss(_0x522172)&&_0xc6b07f[_0x45063e(0x1dd)]!==_0x45063e(0x232)){_0x34d492['push'](_0x1cedb0['id']);continue;}_0x4d2089[_0x45063e(0x214)]({'id':_0x1cedb0['id'],'stage':_0x45063e(0x233),'code':_0xc6b07f[_0x45063e(0x1dd)],'message':_0xc6b07f[_0x45063e(0x22e)]});}}let _0x296ef2;try{_0x296ef2=await fetchMenuSnapshot(_0x1903a3[_0x45063e(0x1d7)],_0x1903a3['cookie']);}catch(_0x542ab3){const _0x19a91d=describeMenuErrorCause(_0x542ab3,_0x45063e(0x200)),_0x350f8a=_0x34d492[_0x45063e(0x237)](_0x225221=>({'id':_0x225221,'stage':_0x45063e(0x22a),'code':_0x45063e(0x1c9),'message':_0x45063e(0x1ee)+_0x225221+_0x45063e(0x1f2),'requestedStateConfirmed':![],'recovered':![]})),_0x569b19={'stage':'verification','code':_0x45063e(0x1c9),'message':_0x45063e(0x1e2),'targetIds':_0x450b40[_0x45063e(0x1d5)][_0x45063e(0x22b)][_0x45063e(0x237)](_0x48abdc=>_0x48abdc['id']),'requestedStateConfirmed':![],..._0x19a91d};throw menuFailure(asVerificationError(_0x542ab3,_0x45063e(0x22f)),_0x450b40[_0x45063e(0x1d5)],{'stage':_0x45063e(0x236),'succeeded':_0x41459c,'failedRecords':[..._0x4d2089,..._0x350f8a,_0x569b19],'warnings':[_0x45063e(0x1fc)],'verification':{'status':_0x45063e(0x1e6),'recoveredCount':0x0,'lookupCommand':_0x45063e(0x1e5)}});}const _0x2efe78=[];for(const _0x5151ab of _0x41459c){const _0x9b8c03=Number(_0x5151ab['id']),_0x2b0199=_0x450b40[_0x45063e(0x1e3)][_0x45063e(0x1e7)](_0x9b8c03),_0x2e8919=_0x296ef2[_0x45063e(0x234)][_0x45063e(0x1e7)](_0x9b8c03);try{verifyVisibilityUpdate(_0x2b0199,_0x2e8919,_0x450b40[_0x45063e(0x1d5)][_0x45063e(0x1ea)]);}catch(_0x5b89a1){const _0xe6334b=asVerificationError(_0x5b89a1,'Menu\x20'+_0x9b8c03+_0x45063e(0x20c));_0x2efe78[_0x45063e(0x214)]({'id':_0x9b8c03,'stage':_0x45063e(0x236),'code':_0xe6334b[_0x45063e(0x1dd)],'message':_0xe6334b[_0x45063e(0x22e)],'requestedStateConfirmed':![]});}}for(const _0x4c5694 of _0x34d492){const _0x837ef5=_0x450b40['beforeById'][_0x45063e(0x1e7)](_0x4c5694),_0x4a39e5=_0x296ef2['byId'][_0x45063e(0x1e7)](_0x4c5694);try{verifyVisibilityUpdate(_0x837ef5,_0x4a39e5,_0x450b40[_0x45063e(0x1d5)][_0x45063e(0x1ea)]),_0x41459c[_0x45063e(0x214)]({'id':_0x4c5694,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3ad714){const _0x1cb405=asVerificationError(_0x3ad714,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x4c5694+_0x45063e(0x230));_0x2efe78['push']({'id':_0x4c5694,'stage':_0x45063e(0x22a),'code':_0x1cb405[_0x45063e(0x1dd)],'message':_0x1cb405[_0x45063e(0x22e)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2efe78[_0x45063e(0x1e1)]>0x0){const _0x48a72f=_0x2efe78['map'](_0x198f5f=>Number(_0x198f5f['id'])),_0x329c09=_0x41459c[_0x45063e(0x1ff)](_0x3e5d93=>_0x3e5d93[_0x45063e(0x1fd)]===!![])[_0x45063e(0x1e1)],_0x27eed2=menuError(_0x45063e(0x1c9),_0x45063e(0x1cc)+_0x48a72f[_0x45063e(0x1cd)](',\x20')+'.',_0x45063e(0x1de));throw menuFailure(_0x27eed2,_0x450b40[_0x45063e(0x1d5)],{'stage':_0x45063e(0x236),'succeeded':_0x41459c,'failedRecords':[..._0x4d2089,..._0x2efe78],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x45063e(0x1e6),..._0x48a72f[_0x45063e(0x1e1)]===0x1?{'targetId':_0x48a72f[0x0]}:{'targetIds':_0x48a72f},'recoveredCount':_0x329c09,'lookupCommand':_0x45063e(0x1e5)}});}const _0x5e49f1=_0x41459c['filter'](_0x53f939=>_0x53f939[_0x45063e(0x1e4)]===!![])[_0x45063e(0x1e1)],_0x4f7821=_0x41459c['length']-_0x5e49f1,_0x523620={..._0x450b40['plan'],'succeeded':_0x41459c,'failed':_0x4d2089,'warnings':_0x4d2089[_0x45063e(0x1e1)]>0x0?[..._0x450b40[_0x45063e(0x1d5)]['warnings'],_0x45063e(0x1cb)]:_0x450b40['plan']['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x296ef2[_0x45063e(0x1f1)],'matchesRequestedState':_0x4d2089[_0x45063e(0x1e1)]===0x0,'recoveredCount':_0x34d492[_0x45063e(0x1e1)]}};return{'ok':_0x4d2089['length']===0x0,'data':_0x523620,'message':_0x4d2089[_0x45063e(0x1e1)]===0x0?_0x45063e(0x217)+_0x5e49f1+_0x45063e(0x1d8)+_0x4f7821+_0x45063e(0x1df):'Menu\x20visibility\x20update\x20completed:\x20'+_0x5e49f1+_0x45063e(0x215)+_0x4f7821+'\x20skipped,\x20'+_0x4d2089[_0x45063e(0x1e1)]+'\x20failed.'};}};function parseInput(_0x24c281){const _0x171019=a140_0x5bc500,_0xed16fd=parseMenuIds(_0x24c281[_0x171019(0x1dc)](_0x171019(0x1d1))),_0x27f430=parseCsv(_0x24c281[_0x171019(0x1dc)](_0x171019(0x1eb)));if(_0xed16fd[_0x171019(0x1e1)]===0x0&&_0x27f430[_0x171019(0x1e1)]===0x0)throw CliErrors[_0x171019(0x1d3)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x121cd6=parseBooleanFlag(_0x24c281,_0x171019(0x1cf),!![]),_0x5c8419=parseBooleanFlag(_0x24c281,'expect-visible',![]);let _0x4d0891;if(hasFlag(_0x24c281,_0x171019(0x212))){_0x4d0891=_0x24c281[_0x171019(0x21e)](_0x171019(0x212));if(!Number[_0x171019(0x21d)](_0x4d0891)||_0x4d0891<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xed16fd,'paths':_0x27f430,'visible':_0x121cd6,'expectVisible':_0x5c8419,'expectedCount':_0x4d0891};}function a140_0x43d2(){const _0x1587b2=['body','filter','verify\x20menu\x20visibility\x20update','rawFlags','datasetCode','expectedCount','high-risk-write','cookie','505eVuIvI','string','pageId','menu_expected_count_mismatch','88848GoUzVC','datasetId','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20menu(s),\x20expected\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','resources','/smartapi/menu/update','35729YTffqI','expected-count','depth','push','\x20updated,\x20','some','Updated\x20visibility\x20for\x20','values','childrenCount','path','Menu\x20id\x20selector(s)\x20not\x20found:\x20','flagMissing','isSafeInteger','num','childrenIds','update\x20menu\x20visibility','parentId','stringify','Requested\x20menu\x20visibility','Selected\x20','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','47086cTsBry','99QOLMkw','sort','\x20must\x20be\x20true\x20or\x20false.','update-recovery','targets','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','true','message','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu_permission_denied','update','byId','menus','verification','map','resourcesValid','Menu\x20','visibility-update','has','971660IHirOa','menu_selector_ambiguous','menu_verification_failed','menuIds','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','join','\x20menu(s);\x20skip\x20','visible','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','menu-ids','expect-visible','validation','POST','plan','trim','appCode','\x20menu(s);\x20skipped\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','770496zUbhdD','set','str','code','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','\x20unchanged\x20menu(s).','pageType','length','Final\x20menu\x20visibility\x20readback\x20failed.','beforeById','updated','rabetbase\x20menu\x20list\x20--format\x20compress','failed','get','label','isArray','requestedVisible','paths','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Would\x20update\x20visibility\x20for\x20','Response\x20was\x20lost\x20for\x20menu\x20','menu_selector_not_found','8130MCnLev','hash','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','false','split','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','plannedActions','boolean','type','Menu\x20path\x20selector\x20not\x20found:\x20','url','1061235ftBWUw','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','recovered'];a140_0x43d2=function(){return _0x1587b2;};return a140_0x43d2();}async function buildPlan(_0x3edd9c,_0x3f2d20){const _0x385403=a140_0x5bc500,_0x4703cd=parseInput(_0x3edd9c),_0x3dae59=await fetchMutationSnapshot(_0x3edd9c,_0x385403(0x220)),_0x14fc47=selectTargets(_0x3dae59[_0x385403(0x235)],_0x4703cd[_0x385403(0x1ca)],_0x4703cd[_0x385403(0x1eb)]);if(_0x4703cd[_0x385403(0x203)]!==undefined&&_0x14fc47[_0x385403(0x1e1)]!==_0x4703cd[_0x385403(0x203)])throw menuError(_0x385403(0x209),_0x385403(0x224)+_0x14fc47[_0x385403(0x1e1)]+_0x385403(0x20d)+_0x4703cd[_0x385403(0x203)]+'.',_0x385403(0x1d9));if(_0x4703cd['expectVisible']!==undefined){const _0x34bf49=_0x14fc47['filter'](_0x1dca98=>_0x1dca98[_0x385403(0x1cf)]!==_0x4703cd['expectVisible']);if(_0x34bf49['length']>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x34bf49[_0x385403(0x237)](_0x52c41b=>_0x52c41b['id'])[_0x385403(0x1cd)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x716f5e=_0x14fc47[_0x385403(0x237)](_0x8c9186=>({'id':_0x8c9186['id'],'label':_0x8c9186[_0x385403(0x1e8)],'path':_0x8c9186['path'],'before':{'visible':_0x8c9186[_0x385403(0x1cf)]},'after':{'visible':_0x4703cd[_0x385403(0x1cf)]}})),_0x3b5928=_0x716f5e[_0x385403(0x1ff)](_0x46b7cc=>_0x46b7cc['before'][_0x385403(0x1cf)]!==_0x4703cd[_0x385403(0x1cf)])['map'](_0x365996=>({'stage':'update-menu-visibility','method':_0x385403(0x1d4),'path':_0x385403(0x210),'body':{'appCode':_0x3edd9c[_0x385403(0x1d7)],'id':_0x365996['id'],'visible':_0x4703cd[_0x385403(0x1cf)]}})),_0x4fc05b=mutationResult({'operation':_0x385403(0x23a),'selector':{'menuIds':_0x4703cd[_0x385403(0x1ca)],'paths':_0x4703cd[_0x385403(0x1eb)]},'before':{'menus':_0x14fc47[_0x385403(0x237)](_0x911f4d=>({'id':_0x911f4d['id'],'path':_0x911f4d[_0x385403(0x21a)],'visible':_0x911f4d[_0x385403(0x1cf)]}))},'after':{'menus':_0x14fc47['map'](_0x45ad12=>({'id':_0x45ad12['id'],'path':_0x45ad12[_0x385403(0x21a)],'visible':_0x4703cd[_0x385403(0x1cf)]}))},'dryRun':_0x3f2d20,'backend':[...BACKEND],'plannedActions':_0x3b5928,'snapshotHash':_0x3dae59[_0x385403(0x1f1)],'warnings':_0x3b5928['length']===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x4fc05b,'requestedVisible':_0x4703cd[_0x385403(0x1cf)],'targets':_0x716f5e},'beforeById':new Map(_0x14fc47[_0x385403(0x237)](_0x56bf53=>[_0x56bf53['id'],_0x56bf53]))};}function selectTargets(_0x25a107,_0x52ee16,_0xbf798d){const _0x21b96e=a140_0x5bc500,_0x41f835=new Map(_0x25a107[_0x21b96e(0x237)](_0x1176b5=>[_0x1176b5['id'],_0x1176b5])),_0x241b62=new Map(),_0x325f67=_0x52ee16[_0x21b96e(0x1ff)](_0x3a785d=>!_0x41f835[_0x21b96e(0x23b)](_0x3a785d));if(_0x325f67['length']>0x0)throw menuError(_0x21b96e(0x1ef),_0x21b96e(0x21b)+_0x325f67[_0x21b96e(0x1cd)](',\x20')+'.',_0x21b96e(0x225));for(const _0x1354ef of _0x52ee16){_0x241b62[_0x21b96e(0x1db)](_0x1354ef,_0x41f835[_0x21b96e(0x1e7)](_0x1354ef));}for(const _0x3287aa of _0xbf798d){const _0x56b00c=_0x25a107[_0x21b96e(0x1ff)](_0x1475a8=>_0x1475a8[_0x21b96e(0x21a)]===_0x3287aa);if(_0x56b00c[_0x21b96e(0x1e1)]===0x0)throw menuError(_0x21b96e(0x1ef),_0x21b96e(0x1f9)+JSON[_0x21b96e(0x222)](_0x3287aa)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x56b00c[_0x21b96e(0x1e1)]>0x1)throw menuError(_0x21b96e(0x23d),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x21b96e(0x222)](_0x3287aa)+'.',_0x21b96e(0x1d0)+_0x56b00c['map'](_0x4d9411=>_0x4d9411['id'])['join'](',\x20')+'.');const _0x571ad4=_0x56b00c[0x0];_0x241b62['set'](_0x571ad4['id'],_0x571ad4);}return[..._0x241b62[_0x21b96e(0x218)]()];}function parseMenuIds(_0x26f0c5){const _0x7f3005=a140_0x5bc500,_0x38f4b0=parseCsv(_0x26f0c5),_0xad4dcc=_0x38f4b0[_0x7f3005(0x237)](Number);if(_0xad4dcc[_0x7f3005(0x216)](_0x5eaf82=>!Number[_0x7f3005(0x21d)](_0x5eaf82)||_0x5eaf82<=0x0))throw CliErrors[_0x7f3005(0x1d3)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0xad4dcc)];}function parseCsv(_0x4b5747){const _0x5013c3=a140_0x5bc500;return[...new Set(_0x4b5747[_0x5013c3(0x1f4)](',')[_0x5013c3(0x237)](_0x342c7a=>_0x342c7a[_0x5013c3(0x1d6)]())[_0x5013c3(0x1ff)](Boolean))];}function parseBooleanFlag(_0x350b9f,_0x5b4150,_0x803a3c){const _0x5a3bf7=a140_0x5bc500;if(!hasFlag(_0x350b9f,_0x5b4150)){if(_0x803a3c)throw CliErrors[_0x5a3bf7(0x21c)](_0x5b4150);return undefined;}const _0x5949b2=_0x350b9f[_0x5a3bf7(0x201)][_0x5b4150];if(_0x5949b2===!![]||_0x5949b2===![])return _0x5949b2;if(_0x5949b2===_0x5a3bf7(0x22d))return!![];if(_0x5949b2===_0x5a3bf7(0x1f3))return![];throw CliErrors[_0x5a3bf7(0x1d3)]('--'+_0x5b4150+_0x5a3bf7(0x229));}function verifyVisibilityUpdate(_0x64d2f2,_0x4c3498,_0x9b81a5){const _0x563db6=a140_0x5bc500;assertVerified(!!_0x4c3498,_0x563db6(0x239)+_0x64d2f2['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x4c3498['visible']===_0x9b81a5,_0x563db6(0x239)+_0x64d2f2['id']+_0x563db6(0x22c));const _0x230598=[['id',_0x4c3498['id'],_0x64d2f2['id']],[_0x563db6(0x221),_0x4c3498[_0x563db6(0x221)],_0x64d2f2['parentId']],['depth',_0x4c3498[_0x563db6(0x213)],_0x64d2f2['depth']],['label',_0x4c3498[_0x563db6(0x1e8)],_0x64d2f2[_0x563db6(0x1e8)]],['path',_0x4c3498['path'],_0x64d2f2[_0x563db6(0x21a)]],[_0x563db6(0x1fa),_0x4c3498['url'],_0x64d2f2[_0x563db6(0x1fa)]],[_0x563db6(0x1f8),_0x4c3498[_0x563db6(0x1f8)],_0x64d2f2[_0x563db6(0x1f8)]],['sort',_0x4c3498['sort'],_0x64d2f2[_0x563db6(0x228)]],[_0x563db6(0x20f),_0x4c3498['resources'],_0x64d2f2[_0x563db6(0x20f)]],['resourcesValid',_0x4c3498[_0x563db6(0x238)],_0x64d2f2[_0x563db6(0x238)]],[_0x563db6(0x21f),_0x4c3498[_0x563db6(0x21f)],_0x64d2f2[_0x563db6(0x21f)]],['childrenCount',_0x4c3498[_0x563db6(0x219)],_0x64d2f2[_0x563db6(0x219)]],['pageId',_0x4c3498[_0x563db6(0x208)],_0x64d2f2[_0x563db6(0x208)]],['pageType',_0x4c3498[_0x563db6(0x1e0)],_0x64d2f2[_0x563db6(0x1e0)]],['modelType',_0x4c3498['modelType'],_0x64d2f2['modelType']],[_0x563db6(0x20b),_0x4c3498[_0x563db6(0x20b)],_0x64d2f2[_0x563db6(0x20b)]],['datasetCode',_0x4c3498[_0x563db6(0x202)],_0x64d2f2['datasetCode']]];for(const [_0x5c56ee,_0x5007d3,_0x2e452d]of _0x230598){assertVerified(sameValue(_0x5007d3,_0x2e452d),'Menu\x20'+_0x64d2f2['id']+'\x20'+_0x5c56ee+'\x20changed\x20unexpectedly.');}}function sameValue(_0x42c796,_0x440d2c){const _0x18c2b6=a140_0x5bc500;if(Array['isArray'](_0x42c796)||Array[_0x18c2b6(0x1e9)](_0x440d2c))return JSON[_0x18c2b6(0x222)](_0x42c796)===JSON['stringify'](_0x440d2c);return _0x42c796===_0x440d2c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a141_0x4211(){const _0x6c2f85=['configName','POST','readTimeout','channelType','36MoGMIY','appCode','notification','channelConfig','505092RhPZEt','notification_config_create_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','planned','description','4hHfoao','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20','create','9myiuaq','2605670Yeiadz','/notification/channel-config/create','4312072WdpnER','580733WTpuIl','109322CRpYrO','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','isSafeInteger','Created\x20notification\x20config\x20','document','2352855LbXWDi','endpointUrl','2229065XHcdAl','configCode'];a141_0x4211=function(){return _0x6c2f85;};return a141_0x4211();}const a141_0x1632f3=a141_0x2acb;function a141_0x2acb(_0x1f57ca,_0x5a137c){_0x1f57ca=_0x1f57ca-0x175;const _0x4211c2=a141_0x4211();let _0x2acb61=_0x4211c2[_0x1f57ca];return _0x2acb61;}(function(_0x45d8c2,_0x3bd6af){const _0x20dce9=a141_0x2acb,_0x44e780=_0x45d8c2();while(!![]){try{const _0x29f337=-parseInt(_0x20dce9(0x17f))/0x1+-parseInt(_0x20dce9(0x180))/0x2+parseInt(_0x20dce9(0x185))/0x3+-parseInt(_0x20dce9(0x176))/0x4*(parseInt(_0x20dce9(0x187))/0x5)+-parseInt(_0x20dce9(0x18d))/0x6*(-parseInt(_0x20dce9(0x191))/0x7)+parseInt(_0x20dce9(0x17e))/0x8*(parseInt(_0x20dce9(0x17b))/0x9)+-parseInt(_0x20dce9(0x17c))/0xa;if(_0x29f337===_0x3bd6af)break;else _0x44e780['push'](_0x44e780['shift']());}catch(_0x24ab96){_0x44e780['push'](_0x44e780['shift']());}}}(a141_0x4211,0x652f8));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a141_0x1632f3(0x17d);async function prepareCreate(_0x2fde64){const _0x402c72=a141_0x1632f3,_0x1911e8=await readNotificationDocument(_0x2fde64,_0x402c72(0x17a)),_0x37021d=createMutationInput(_0x2fde64[_0x402c72(0x18e)],_0x1911e8);return{'document':_0x1911e8,'input':_0x37021d,'planned':projectNotificationConfig({'appCode':_0x2fde64[_0x402c72(0x18e)],'configName':_0x1911e8['configName'],'channelType':_0x1911e8[_0x402c72(0x18c)],'endpointUrl':_0x1911e8[_0x402c72(0x186)],'channelConfig':_0x1911e8[_0x402c72(0x190)],'description':_0x1911e8[_0x402c72(0x175)],'connectTimeout':_0x1911e8['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1911e8[_0x402c72(0x18b)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a141_0x1632f3(0x18f),'command':'config-create','description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x8a75e7){assertSingleNotificationSource(_0x8a75e7);},async 'dryRun'(_0x187b47){const _0x436561=a141_0x1632f3,_0x356ad0=await prepareCreate(_0x187b47),_0x161401=notificationLookupCommand(_0x187b47[_0x436561(0x18e)],_0x356ad0[_0x436561(0x184)][_0x436561(0x18c)]);return asDryRunResult({'operation':_0x436561(0x17a),'selector':{'appCode':_0x187b47[_0x436561(0x18e)],'configName':_0x356ad0[_0x436561(0x184)]['configName'],'channelType':_0x356ad0['document']['channelType']},'before':null,'after':_0x356ad0[_0x436561(0x194)],'dryRun':!![],'backend':{'method':_0x436561(0x18a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x436561(0x194),'lookupCommand':_0x161401}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x44b167){const _0x404a4d=a141_0x1632f3,_0x36a963=await prepareCreate(_0x44b167),_0x2ac931=notificationLookupCommand(_0x44b167[_0x404a4d(0x18e)],_0x36a963[_0x404a4d(0x184)][_0x404a4d(0x18c)]);let _0x4d0cf0;try{_0x4d0cf0=await createNotificationChannelConfig(_0x36a963['input']);}catch(_0x1d4879){if(isPlatformTransportFailure(_0x1d4879))throw notificationError('notification_config_create_outcome_unknown',_0x404a4d(0x181),_0x404a4d(0x179)+_0x2ac931+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x404a4d(0x17a),'mutation','Inspect\x20with\x20'+_0x2ac931+_0x404a4d(0x178));}if(!Number[_0x404a4d(0x182)](_0x4d0cf0)||_0x4d0cf0<=0x0)throw notificationError(_0x404a4d(0x192),_0x404a4d(0x177),_0x404a4d(0x179)+_0x2ac931+';\x20do\x20not\x20resubmit.');let _0x7901e9;try{const _0x1c603f=await getNotificationChannelConfig(_0x4d0cf0,_0x44b167[_0x404a4d(0x18e)]);_0x7901e9=normalizeExactNotificationConfig(_0x1c603f,_0x4d0cf0,_0x44b167[_0x404a4d(0x18e)]);}catch{throw safeApiFailure(_0x404a4d(0x17a),'verification',_0x404a4d(0x179)+_0x2ac931+_0x404a4d(0x193));}return{'ok':!![],'data':{'operation':_0x404a4d(0x17a),'selector':{'appCode':_0x7901e9[_0x404a4d(0x18e)],'id':_0x7901e9['id'],'configCode':_0x7901e9[_0x404a4d(0x188)],'configName':_0x7901e9[_0x404a4d(0x189)],'channelType':_0x7901e9[_0x404a4d(0x18c)]},'before':null,'after':projectNotificationConfig(_0x7901e9),'dryRun':![],'backend':{'method':_0x404a4d(0x18a),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x2ac931}},'message':_0x404a4d(0x183)+_0x7901e9['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x22c449=a142_0x19c8;function a142_0x5643(){const _0x3612ac=['94300yqOxzN','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','\x20remains\x20present\x20after\x20delete.','114455kSOsPQ','30oDSDyX','/notification/channel-config/delete','unshift','high-risk-write','delete','verified','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','appCode','Deleted\x20notification\x20config\x20','683711vudSst','channelType','Inspect\x20with\x20','1830776EyzGNn','63033JDZUEX','9543735AVUyof',';\x20do\x20not\x20resubmit\x20automatically.','26PGuGXd','129IkdNTm','notification_config_delete_verification_failed','mutation','config-delete','notification_config_delete_verification_unavailable','\x20delete\x20could\x20not\x20be\x20verified.','notification_config_delete_outcome_unknown','790DsJQeY','11258766QCEaRx','notification','before','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','planned'];a142_0x5643=function(){return _0x3612ac;};return a142_0x5643();}(function(_0x33fa0d,_0x13e047){const _0x26878d=a142_0x19c8,_0x1d4aae=_0x33fa0d();while(!![]){try{const _0x3c456f=-parseInt(_0x26878d(0xbb))/0x1*(parseInt(_0x26878d(0xbe))/0x2)+-parseInt(_0x26878d(0xbf))/0x3*(-parseInt(_0x26878d(0xa8))/0x4)+parseInt(_0x26878d(0xbc))/0x5+-parseInt(_0x26878d(0xae))/0x6*(parseInt(_0x26878d(0xb7))/0x7)+-parseInt(_0x26878d(0xba))/0x8+-parseInt(_0x26878d(0xc7))/0x9+-parseInt(_0x26878d(0xc6))/0xa*(-parseInt(_0x26878d(0xad))/0xb);if(_0x3c456f===_0x13e047)break;else _0x1d4aae['push'](_0x1d4aae['shift']());}catch(_0xd0ca5e){_0x1d4aae['push'](_0x1d4aae['shift']());}}}(a142_0x5643,0xe99b4));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a142_0x19c8(_0x2cebf6,_0x5538b9){_0x2cebf6=_0x2cebf6-0xa5;const _0x56438e=a142_0x5643();let _0x19c835=_0x56438e[_0x2cebf6];return _0x19c835;}const DELETE_PATH=a142_0x22c449(0xaf),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x3f4f78){const _0x758c83=a142_0x22c449,_0x386835=readNotificationId(_0x3f4f78),_0x25e265=await requireExactNotificationConfig(_0x3f4f78['appCode'],_0x386835,_0x758c83(0xb2));return{'id':_0x386835,'before':_0x25e265};}export const notificationConfigDelete={'service':a142_0x22c449(0xc8),'command':a142_0x22c449(0xc2),'description':a142_0x22c449(0xb4),'risk':a142_0x22c449(0xb1),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5c4460){readNotificationId(_0x5c4460),requireNotificationExplicitYes(_0x5c4460);},async 'dryRun'(_0x18ffd7){const _0xf95503=a142_0x22c449,_0x4ef734=await prepareDelete(_0x18ffd7),_0x1c3c60=notificationLookupCommand(_0x18ffd7['appCode'],_0x4ef734[_0xf95503(0xa5)]['channelType']);return asDryRunResult({'operation':_0xf95503(0xb2),'selector':notificationSelector(_0x4ef734['before']),'before':projectNotificationConfig(_0x4ef734['before']),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0xf95503(0xa7),'lookupCommand':_0x1c3c60}},{'method':_0xf95503(0xa9),'url':DELETE_PATH});},async 'execute'(_0x3538ec){const _0x167ac1=a142_0x22c449;requireNotificationExplicitYes(_0x3538ec);const _0x3e9135=await prepareDelete(_0x3538ec),_0x1561ce=notificationLookupCommand(_0x3538ec['appCode'],_0x3e9135[_0x167ac1(0xa5)][_0x167ac1(0xb8)]);let _0x14455=![];try{await deleteNotificationChannelConfig(_0x3e9135['id'],_0x3538ec[_0x167ac1(0xb5)]);}catch(_0x2ec130){if(!isPlatformTransportFailure(_0x2ec130))throw safeApiFailure(_0x167ac1(0xb2),_0x167ac1(0xc1),_0x167ac1(0xb9)+_0x1561ce+_0x167ac1(0xaa));_0x14455=!![];}let _0x5c7d25;try{_0x5c7d25=await listNotificationChannelConfigs(_0x3538ec[_0x167ac1(0xb5)],_0x3e9135['before'][_0x167ac1(0xb8)]),validateNotificationDeleteReadback(_0x5c7d25,_0x3538ec[_0x167ac1(0xb5)],_0x3e9135[_0x167ac1(0xa5)][_0x167ac1(0xb8)]);}catch{throw notificationError(_0x14455?_0x167ac1(0xc5):_0x167ac1(0xc3),_0x167ac1(0xab)+_0x3e9135['id']+_0x167ac1(0xc4),'Inspect\x20with\x20'+_0x1561ce+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x5c7d25['some'](_0x2883a9=>_0x2883a9['id']===_0x3e9135['id']))throw notificationError(_0x14455?_0x167ac1(0xc5):_0x167ac1(0xc0),_0x167ac1(0xab)+_0x3e9135['id']+_0x167ac1(0xac),_0x167ac1(0xb9)+_0x1561ce+_0x167ac1(0xbd));const _0xdcb740=[REFERENCE_WARNING];return _0x14455&&_0xdcb740[_0x167ac1(0xb0)](_0x167ac1(0xa6)),{'ok':!![],'data':{'operation':_0x167ac1(0xb2),'selector':notificationSelector(_0x3e9135[_0x167ac1(0xa5)]),'before':projectNotificationConfig(_0x3e9135[_0x167ac1(0xa5)]),'after':null,'dryRun':![],'backend':{'method':_0x167ac1(0xa9),'path':DELETE_PATH},'warnings':_0xdcb740,'verification':{'status':_0x167ac1(0xb3),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x14455,'lookupCommand':_0x1561ce}},'message':_0x167ac1(0xb6)+_0x3e9135['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x43464f=a143_0x414b;function a143_0x4de0(){const _0x1e6592=['\x20notification\x20config(s)','2XjIbUN','read','Notification\x20channel\x20type','3706080ZQaXzb','5858902cmjAUA','config-list','notification','5743545QHDbzr','4222272FTeiyv','Found\x20','1636733WbjWRL','map','appCode','length','4541109mZsZsd','16581592bBbHjR'];a143_0x4de0=function(){return _0x1e6592;};return a143_0x4de0();}(function(_0x515207,_0x4d361a){const _0xe09d7a=a143_0x414b,_0x29b476=_0x515207();while(!![]){try{const _0x536b70=parseInt(_0xe09d7a(0x202))/0x1+parseInt(_0xe09d7a(0x1f8))/0x2*(-parseInt(_0xe09d7a(0x1f5))/0x3)+-parseInt(_0xe09d7a(0x1fb))/0x4+parseInt(_0xe09d7a(0x1ff))/0x5+-parseInt(_0xe09d7a(0x200))/0x6+-parseInt(_0xe09d7a(0x1fc))/0x7+parseInt(_0xe09d7a(0x1f6))/0x8;if(_0x536b70===_0x4d361a)break;else _0x29b476['push'](_0x29b476['shift']());}catch(_0xf92caf){_0x29b476['push'](_0x29b476['shift']());}}}(a143_0x4de0,0xd62a4));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a143_0x414b(_0x52f01a,_0x53d3d3){_0x52f01a=_0x52f01a-0x1f2;const _0x4de01d=a143_0x4de0();let _0x414b57=_0x4de01d[_0x52f01a];return _0x414b57;}export const notificationConfigList={'service':a143_0x43464f(0x1fe),'command':a143_0x43464f(0x1fd),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a143_0x43464f(0x1f9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a143_0x43464f(0x1fa),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0xb9bda4){readNotificationChannelType(_0xb9bda4);},async 'execute'(_0x973f83){const _0x3f9a76=a143_0x43464f,_0xad0331=readNotificationChannelType(_0x973f83),_0x4eb3b3=await listNotificationChannelConfigs(_0x973f83[_0x3f9a76(0x1f3)],_0xad0331),_0x149efa=_0x4eb3b3[_0x3f9a76(0x1f2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x973f83['appCode'],'channelType':_0xad0331,'count':_0x149efa[_0x3f9a76(0x1f4)],'configs':_0x149efa},'message':_0x3f9a76(0x201)+_0x149efa['length']+'\x20'+_0xad0331+_0x3f9a76(0x1f7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a144_0x4c3df4=a144_0x4e01;(function(_0x8d5260,_0x2a419b){const _0x407e7a=a144_0x4e01,_0x2a3280=_0x8d5260();while(!![]){try{const _0x2a9a9e=-parseInt(_0x407e7a(0x16e))/0x1+-parseInt(_0x407e7a(0x17d))/0x2+-parseInt(_0x407e7a(0x182))/0x3+parseInt(_0x407e7a(0x181))/0x4+-parseInt(_0x407e7a(0x171))/0x5+-parseInt(_0x407e7a(0x17b))/0x6*(-parseInt(_0x407e7a(0x187))/0x7)+parseInt(_0x407e7a(0x17a))/0x8;if(_0x2a9a9e===_0x2a419b)break;else _0x2a3280['push'](_0x2a3280['shift']());}catch(_0x3ad188){_0x2a3280['push'](_0x2a3280['shift']());}}}(a144_0x367a,0xaf8bf));import{asDryRunResult}from'../../commands/common/dry-run.js';function a144_0x4e01(_0x3bac9e,_0x432d05){_0x3bac9e=_0x3bac9e-0x167;const _0x367aac=a144_0x367a();let _0x4e011c=_0x367aac[_0x3bac9e];return _0x4e011c;}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_0x4c3df4(0x186);function a144_0x367a(){const _0x54af8a=['Notification\x20config\x20','1740928eNJeoo','1591374xArfcE','channelType','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','update','/notification/channel-config/update','4606mhHjZL','planned','notification_config_update_verification_failed','notification_config_update_outcome_unknown','\x20via\x20','mutation','notification_config_update_verification_unavailable','patch','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','Inspect\x20ID\x20','747277sARLkk','verifiedFields','notification','5327185ELYduc','high-risk-write','POST','allMatch','Inspect\x20with\x20--id\x20','verified','provesChange','before',';\x20no\x20automatic\x20retry\x20was\x20attempted.','17100136FvVrGh','7608JhzCXW',';\x20do\x20not\x20resubmit\x20automatically.','689764ISonJc','appCode','payload'];a144_0x367a=function(){return _0x54af8a;};return a144_0x367a();}async function prepareUpdate(_0x36bdc4){const _0x522dcc=a144_0x4c3df4,_0x109c2b=readNotificationId(_0x36bdc4),_0x4949ec=await readNotificationDocument(_0x36bdc4,_0x522dcc(0x185)),_0x33ef45=await requireExactNotificationConfig(_0x36bdc4['appCode'],_0x109c2b,_0x522dcc(0x185));return{'id':_0x109c2b,'patch':_0x4949ec,'before':_0x33ef45,'payload':mergeUpdateInput(_0x33ef45,_0x4949ec),'planned':plannedUpdateProjection(_0x33ef45,_0x4949ec)};}export const notificationConfigUpdate={'service':a144_0x4c3df4(0x170),'command':'config-update','description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a144_0x4c3df4(0x172),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1eae5c){readNotificationId(_0x1eae5c),assertSingleNotificationSource(_0x1eae5c),requireNotificationExplicitYes(_0x1eae5c);},async 'dryRun'(_0x5d1616){const _0x45f283=a144_0x4c3df4,_0x395a36=await prepareUpdate(_0x5d1616),_0x3d55cb=notificationLookupCommand(_0x5d1616[_0x45f283(0x17e)],_0x395a36[_0x45f283(0x178)][_0x45f283(0x183)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x395a36['before']),'before':projectNotificationConfig(_0x395a36[_0x45f283(0x178)]),'after':_0x395a36['planned'],'dryRun':!![],'backend':{'method':_0x45f283(0x173),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x45f283(0x188),'lookupCommand':_0x3d55cb}},{'method':_0x45f283(0x173),'url':UPDATE_PATH});},async 'execute'(_0x17c06d){const _0x5da3ed=a144_0x4c3df4;requireNotificationExplicitYes(_0x17c06d);const _0x3aef4a=await prepareUpdate(_0x17c06d),_0x2b9113=notificationLookupCommand(_0x17c06d['appCode'],_0x3aef4a['before']['channelType']);let _0x2b1e5d=![];try{await updateNotificationChannelConfig(_0x3aef4a[_0x5da3ed(0x17f)]);}catch(_0x4c7a4e){if(!isPlatformTransportFailure(_0x4c7a4e))throw safeApiFailure(_0x5da3ed(0x185),_0x5da3ed(0x169),_0x5da3ed(0x16d)+_0x3aef4a['id']+'\x20with\x20'+_0x2b9113+_0x5da3ed(0x179));_0x2b1e5d=!![];}let _0x3b1b25;try{const _0x39052f=await getNotificationChannelConfig(_0x3aef4a['id'],_0x17c06d[_0x5da3ed(0x17e)]);_0x3b1b25=normalizeExactNotificationConfig(_0x39052f,_0x3aef4a['id'],_0x17c06d[_0x5da3ed(0x17e)]);}catch{throw notificationError(_0x2b1e5d?_0x5da3ed(0x167):_0x5da3ed(0x16a),_0x5da3ed(0x180)+_0x3aef4a['id']+_0x5da3ed(0x16c),_0x5da3ed(0x175)+_0x3aef4a['id']+_0x5da3ed(0x168)+_0x2b9113+_0x5da3ed(0x17c));}const _0x529933=requestedSafeFieldsMatch(_0x3aef4a[_0x5da3ed(0x178)],_0x3b1b25,_0x3aef4a[_0x5da3ed(0x16b)]);if(!_0x529933[_0x5da3ed(0x174)]||_0x2b1e5d&&!_0x529933[_0x5da3ed(0x177)])throw notificationError(_0x2b1e5d?_0x5da3ed(0x167):_0x5da3ed(0x189),_0x5da3ed(0x180)+_0x3aef4a['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x5da3ed(0x175)+_0x3aef4a['id']+_0x5da3ed(0x168)+_0x2b9113+_0x5da3ed(0x17c));const _0x3fc5e0=_0x2b1e5d?[_0x5da3ed(0x184)]:[];return{'ok':!![],'data':{'operation':_0x5da3ed(0x185),'selector':notificationSelector(_0x3b1b25),'before':projectNotificationConfig(_0x3aef4a['before']),'after':projectNotificationConfig(_0x3b1b25),'dryRun':![],'backend':{'method':_0x5da3ed(0x173),'path':UPDATE_PATH},'warnings':_0x3fc5e0,'verification':{'status':_0x5da3ed(0x176),'recoveredAfterUnknownResponse':_0x2b1e5d,'verifiedFields':_0x529933[_0x5da3ed(0x16f)],'lookupCommand':_0x2b9113}},'message':'Updated\x20notification\x20config\x20'+_0x3b1b25['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a145_0x52ee(){const _0x9f8b7=['70ChFQuG','4994935mbmMJG','3055476jsfIaR','1690pGWaZA','960gwtzsh','2532990ixBEiW','2681945yzechG','6512128DMECii','3PUgGjw','1816731cHnuVl'];a145_0x52ee=function(){return _0x9f8b7;};return a145_0x52ee();}(function(_0x56f4ac,_0x15d72e){const _0x167b50=a145_0x1c9a,_0x326317=_0x56f4ac();while(!![]){try{const _0x59fb78=parseInt(_0x167b50(0xd9))/0x1*(-parseInt(_0x167b50(0xda))/0x2)+-parseInt(_0x167b50(0xd4))/0x3*(parseInt(_0x167b50(0xd8))/0x4)+parseInt(_0x167b50(0xd7))/0x5+-parseInt(_0x167b50(0xdb))/0x6+-parseInt(_0x167b50(0xd2))/0x7+parseInt(_0x167b50(0xd3))/0x8+-parseInt(_0x167b50(0xd5))/0x9*(-parseInt(_0x167b50(0xd6))/0xa);if(_0x59fb78===_0x15d72e)break;else _0x326317['push'](_0x326317['shift']());}catch(_0x3d13d1){_0x326317['push'](_0x326317['shift']());}}}(a145_0x52ee,0xce74f));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a145_0x1c9a(_0x35377f,_0x36f567){_0x35377f=_0x35377f-0xd2;const _0x52ee1b=a145_0x52ee();let _0x1c9a26=_0x52ee1b[_0x35377f];return _0x1c9a26;}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a146_0x3411df=a146_0xcd73;(function(_0xaeb282,_0x457676){const _0x37d3ab=a146_0xcd73,_0x3759e5=_0xaeb282();while(!![]){try{const _0x2e1c9c=parseInt(_0x37d3ab(0xb1))/0x1*(parseInt(_0x37d3ab(0xae))/0x2)+-parseInt(_0x37d3ab(0x89))/0x3+-parseInt(_0x37d3ab(0xb7))/0x4*(parseInt(_0x37d3ab(0x8d))/0x5)+-parseInt(_0x37d3ab(0x98))/0x6*(parseInt(_0x37d3ab(0xaa))/0x7)+parseInt(_0x37d3ab(0x101))/0x8*(-parseInt(_0x37d3ab(0xde))/0x9)+-parseInt(_0x37d3ab(0xbe))/0xa+parseInt(_0x37d3ab(0xc1))/0xb*(parseInt(_0x37d3ab(0xa9))/0xc);if(_0x2e1c9c===_0x457676)break;else _0x3759e5['push'](_0x3759e5['shift']());}catch(_0x4a9dcc){_0x3759e5['push'](_0x3759e5['shift']());}}}(a146_0x40d5,0x8e567));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_0x3411df(0xfe),a146_0x3411df(0xdd),a146_0x3411df(0x95),'WECOM','WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a146_0x3411df(0xc8),a146_0x3411df(0xfc),a146_0x3411df(0x9e),a146_0x3411df(0xab),a146_0x3411df(0xf5),a146_0x3411df(0x94),a146_0x3411df(0xe1)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a146_0x3411df(0x93),a146_0x3411df(0x90),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a146_0x3411df(0xb6),'recipients',a146_0x3411df(0xac),a146_0x3411df(0xda),a146_0x3411df(0xc3),a146_0x3411df(0xbc),a146_0x3411df(0xa6),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a146_0x3411df(0xbb),'type':a146_0x3411df(0x9b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a146_0x3411df(0xcf),'type':a146_0x3411df(0xe0),'required':![],'default':![],'description':a146_0x3411df(0xd0)},{'name':a146_0x3411df(0x86),'type':a146_0x3411df(0x9b),'required':![],'description':a146_0x3411df(0x9a)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a146_0x3411df(0xb4),'required':!![],'description':a146_0x3411df(0xff)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2d6d08,_0x2c3e68,_0x1b3ccd){return new CliError(_0x2d6d08,0x1,_0x2c3e68,_0x1b3ccd);}function a146_0xcd73(_0x1b8fc7,_0x429239){_0x1b8fc7=_0x1b8fc7-0x84;const _0x40d517=a146_0x40d5();let _0xcd73ad=_0x40d517[_0x1b8fc7];return _0xcd73ad;}export function readNotificationId(_0xe827d4){const _0x4bda1c=a146_0x3411df,_0x2117b9=_0xe827d4['num']('id');if(!Number['isSafeInteger'](_0x2117b9)||_0x2117b9<=0x0)throw notificationError(_0x4bda1c(0xcd),_0x4bda1c(0xa5));return _0x2117b9;}function a146_0x40d5(){const _0x594291=['env','stdin','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','path','\x20has\x20an\x20invalid\x20channelType.','has','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','updateTime','call','Item\x20','bccList','notification_config_channel_field_forbidden','a\x20supported\x20string','FEISHU','180WxIHGx','yes','boolean','readTimeout','length','notification_config_field_invalid','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','entries','\x20failed.','update','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','Notification\x20config\x20list\x20item\x20','\x20characters.','prototype','preflight','parse','Missing\x20notification\x20JSON\x20source.','\x20has\x20invalid\x20field\x20\x22','hasOwnProperty','\x22channelType\x22.','includes','Notification\x20JSON\x20from\x20','description','file\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','object','endpointUrl:null','dry-run','environment\x20variable\x20','channelType','some','EMAIL','Application-level\x20notification\x20config\x20ID','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','211424kjfzrz','notification_config_json_invalid','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','utf8','Unknown\x20notification\x20JSON\x20field\x20\x22','from-env','endpointUrlRaw','name','333720JxxnqE','Allowed\x20values:\x20','kind','str','25BAWEgw','createTime','rabetbase\x20notification\x20config-list\x20--appcode\x20','configCode','notification_config_source_unavailable','Notification\x20config\x20','appCode','connectTimeout','DINGTALK','_unavailable','a\x20JSON\x20object\x20or\x20null','466986TPVBMO','push','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','string','bool','failed','endpointUrl','Invalid\x20notification\x20config\x20response.','isArray','\x22\x20is\x20forbidden.','Create\x20JSON\x20requires\x20field\x20','validation','\x20must\x20be\x20an\x20object.','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','fromName','notification_config_','a\x20JSON\x20object','10525404jOlOYi','49ZVMqLZ','channelConfig','ccList','every','46JxkVEb','a\x20non-empty\x20string','isSafeInteger','6866hFiEHF','Invalid\x20--','trim','number','\x22\x20cannot\x20exceed\x20','emailTargets','715188FGsrDw','messageTemplate','\x20has\x20an\x20invalid\x20id.','notification_config_update_empty','file','subjectPrefix','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','10047690JEqhjk','\x20is\x20invalid.','create','44PXtKsa','\x20is\x20missing\x20required\x20field\x20\x22','replyTo','\x20--format\x20compress','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','Notification\x20JSON\x20field\x20\x22','configName','notification_config_response_invalid','mutation','channelConfigRaw','join','notification_config_id_invalid'];a146_0x40d5=function(){return _0x594291;};return a146_0x40d5();}export function requireNotificationExplicitYes(_0x40f6f4){const _0x12db96=a146_0x3411df;if(_0x40f6f4[_0x12db96(0x9c)](_0x12db96(0xfa))||_0x40f6f4[_0x12db96(0x9c)](_0x12db96(0xdf)))return;throw notificationError('notification_config_confirmation_required',_0x12db96(0x100),_0x12db96(0xe4));}export function readNotificationChannelType(_0x576731,_0x235449='type',_0x4454b3='EMAIL'){const _0x53d684=a146_0x3411df,_0x3a6233=_0x576731['str'](_0x235449)[_0x53d684(0xb3)]()||_0x4454b3;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3a6233))throw CliErrors[_0x53d684(0xa3)](_0x53d684(0xb2)+_0x235449+':\x20'+_0x3a6233,_0x53d684(0x8a)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x3a6233;}export function assertSingleNotificationSource(_0xfd3f81){const _0x1ae8e2=a146_0x3411df,_0x1a6ee1=[],_0x281a6b=_0xfd3f81[_0x1ae8e2(0x8c)](_0x1ae8e2(0xbb))[_0x1ae8e2(0xb3)]();if(_0x281a6b)_0x1a6ee1[_0x1ae8e2(0x99)]({'kind':_0x1ae8e2(0xbb),'path':_0x281a6b});if(_0xfd3f81[_0x1ae8e2(0x9c)](_0x1ae8e2(0xcf)))_0x1a6ee1[_0x1ae8e2(0x99)]({'kind':_0x1ae8e2(0xcf)});const _0x2ab54b=_0xfd3f81[_0x1ae8e2(0x8c)](_0x1ae8e2(0x86))['trim']();if(_0x2ab54b)_0x1a6ee1['push']({'kind':_0x1ae8e2(0xce),'name':_0x2ab54b});if(_0x1a6ee1[_0x1ae8e2(0xe2)]===0x0)throw CliErrors['validation'](_0x1ae8e2(0xef),_0x1ae8e2(0x104));if(_0x1a6ee1[_0x1ae8e2(0xe2)]>0x1)throw CliErrors[_0x1ae8e2(0xa3)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x1ae8e2(0x104));return _0x1a6ee1[0x0];}export async function readNotificationDocument(_0x340ade,_0x323b61){const _0x52d424=a146_0x3411df,_0x4fbaca=assertSingleNotificationSource(_0x340ade),_0x409bef=_0x4fbaca[_0x52d424(0x8b)]==='file'?_0x52d424(0xf6)+_0x4fbaca[_0x52d424(0xd3)]:_0x4fbaca[_0x52d424(0x8b)]===_0x52d424(0xce)?_0x52d424(0xfb)+_0x4fbaca[_0x52d424(0x88)]:_0x52d424(0xcf);let _0x3c8d3d;try{if(_0x4fbaca[_0x52d424(0x8b)]==='file')_0x3c8d3d=await readFile(_0x4fbaca[_0x52d424(0xd3)],_0x52d424(0x84));else{if(_0x4fbaca[_0x52d424(0x8b)]===_0x52d424(0xce)){if(!(_0x4fbaca[_0x52d424(0x88)]in process.env))throw notificationError('notification_config_source_unavailable','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x4fbaca['name']);_0x3c8d3d=process.env[_0x4fbaca.name]??'';}else _0x3c8d3d=await readStdin();}}catch(_0x42e3c9){if(_0x42e3c9 instanceof CliError)throw _0x42e3c9;throw notificationError(_0x52d424(0x91),_0x52d424(0xbd)+_0x409bef+'.');}let _0x3b727a;try{_0x3b727a=JSON[_0x52d424(0xee)](_0x3c8d3d);}catch{throw notificationError(_0x52d424(0x102),_0x52d424(0xf4)+_0x409bef+_0x52d424(0xbf),_0x52d424(0xd6));}if(!isJsonObject(_0x3b727a))throw notificationError(_0x52d424(0x102),_0x52d424(0xf4)+_0x409bef+_0x52d424(0xa4));return validateNotificationDocument(_0x3b727a,_0x323b61);}export function projectNotificationListConfig(_0x47416d,_0xb09b72){const _0x133e95=a146_0x3411df;return{'id':typeof _0x47416d['id']===_0x133e95(0xb4)?_0x47416d['id']:null,'configCode':requireResponseString(_0x47416d[_0x133e95(0x90)],'configCode',_0xb09b72),'configName':requireResponseString(_0x47416d[_0x133e95(0xc8)],_0x133e95(0xc8),_0xb09b72),'channelType':requireResponseString(_0x47416d[_0x133e95(0xfc)],_0x133e95(0xfc),_0xb09b72),'description':normalizeNullableString(_0x47416d[_0x133e95(0xf5)]),'createTime':normalizeNullableString(_0x47416d[_0x133e95(0x8e)]),'updateTime':normalizeNullableString(_0x47416d[_0x133e95(0xd7)])};}export function normalizeExactNotificationConfig(_0x11ce29,_0x2ccf32,_0x20af5b){const _0x4de714=a146_0x3411df;if(!Number[_0x4de714(0xb0)](_0x11ce29['id'])||_0x11ce29['id']!==_0x2ccf32)throw notificationError(_0x4de714(0xc9),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2ccf32+'.');if(_0x11ce29[_0x4de714(0x93)]!==_0x20af5b)throw notificationError(_0x4de714(0xc9),_0x4de714(0x92)+_0x2ccf32+_0x4de714(0xe9));const _0x580f97=requireExactString(_0x11ce29[_0x4de714(0xc8)],_0x4de714(0xc8),_0x2ccf32),_0x50528c=requireExactString(_0x11ce29[_0x4de714(0x90)],'configCode',_0x2ccf32),_0x388407=requireExactString(_0x11ce29['channelType'],_0x4de714(0xfc),_0x2ccf32);if(!NOTIFICATION_CHANNEL_TYPES[_0x4de714(0xf3)](_0x388407))throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x2ccf32+'\x20has\x20an\x20unsupported\x20channelType.');const _0x36a633=responseNullableString(_0x11ce29[_0x4de714(0x9e)],'endpointUrl',_0x2ccf32),_0x23c7fd=responseNullableString(_0x11ce29['channelConfig'],'channelConfig',_0x2ccf32),_0x1b21b7=responseNullableString(_0x11ce29['description'],_0x4de714(0xf5),_0x2ccf32),_0x58ecf1=responseNullableTimeout(_0x11ce29[_0x4de714(0x94)],_0x4de714(0x94),_0x2ccf32),_0x515343=responseNullableTimeout(_0x11ce29[_0x4de714(0xe1)],_0x4de714(0xe1),_0x2ccf32);return{'id':_0x2ccf32,'appCode':_0x20af5b,'configCode':_0x50528c,'configName':_0x580f97,'channelType':_0x388407,'endpointUrl':redactSensitive(_0x36a633),'channelConfig':redactSensitive(_0x23c7fd),'description':_0x1b21b7,'connectTimeout':_0x58ecf1,'readTimeout':_0x515343,'endpointUrlRaw':_0x36a633,'channelConfigRaw':_0x23c7fd};}export async function requireExactNotificationConfig(_0x3cfb3c,_0x279a7f,_0x44d7fc){const _0xad323a=a146_0x3411df;let _0x4caf41;try{_0x4caf41=await getNotificationChannelConfig(_0x279a7f,_0x3cfb3c);}catch{throw safeApiFailure(_0x44d7fc,_0xad323a(0xed),_0xad323a(0xc5)+_0x3cfb3c+_0xad323a(0xc6));}return normalizeExactNotificationConfig(_0x4caf41,_0x279a7f,_0x3cfb3c);}export function projectNotificationConfig(_0x5f231b){const _0x48a6b2=a146_0x3411df;return{'id':_0x5f231b['id']??null,'appCode':_0x5f231b[_0x48a6b2(0x93)],'configCode':_0x5f231b[_0x48a6b2(0x90)]??null,'configName':_0x5f231b['configName'],'channelType':_0x5f231b[_0x48a6b2(0xfc)],'endpointUrl':redactSensitive(_0x5f231b['endpointUrl']),'channelConfig':redactSensitive(_0x5f231b[_0x48a6b2(0xab)]),'description':_0x5f231b[_0x48a6b2(0xf5)]??null,'connectTimeout':_0x5f231b['connectTimeout']??null,'readTimeout':_0x5f231b['readTimeout']??null};}export function notificationSelector(_0x15ca51){const _0x370f31=a146_0x3411df;return{'appCode':_0x15ca51[_0x370f31(0x93)],'id':_0x15ca51['id'],'configCode':_0x15ca51[_0x370f31(0x90)],'configName':_0x15ca51[_0x370f31(0xc8)],'channelType':_0x15ca51[_0x370f31(0xfc)]};}export function createMutationInput(_0x2b8aa7,_0x551bed){const _0x5a982c=a146_0x3411df;return{'appCode':_0x2b8aa7,'configName':_0x551bed[_0x5a982c(0xc8)],'channelType':_0x551bed[_0x5a982c(0xfc)],...hasOwn(_0x551bed,_0x5a982c(0x9e))?{'endpointUrl':_0x551bed[_0x5a982c(0x9e)]}:{},...hasOwn(_0x551bed,_0x5a982c(0xab))?{'channelConfig':serializeChannelConfig(_0x551bed[_0x5a982c(0xab)])}:{},...hasOwn(_0x551bed,_0x5a982c(0xf5))?{'description':_0x551bed[_0x5a982c(0xf5)]}:{},...hasOwn(_0x551bed,_0x5a982c(0x94))?{'connectTimeout':_0x551bed[_0x5a982c(0x94)]}:{},...hasOwn(_0x551bed,_0x5a982c(0xe1))?{'readTimeout':_0x551bed['readTimeout']}:{}};}export function mergeUpdateInput(_0xcd9625,_0x101559){const _0x52d7ce=a146_0x3411df;return{'id':_0xcd9625['id'],'appCode':_0xcd9625[_0x52d7ce(0x93)],'configName':_0x101559[_0x52d7ce(0xc8)]??_0xcd9625['configName'],'channelType':_0x101559[_0x52d7ce(0xfc)]??_0xcd9625[_0x52d7ce(0xfc)],'endpointUrl':hasOwn(_0x101559,_0x52d7ce(0x9e))?_0x101559[_0x52d7ce(0x9e)]:_0xcd9625[_0x52d7ce(0x87)],'channelConfig':hasOwn(_0x101559,'channelConfig')?serializeChannelConfig(_0x101559[_0x52d7ce(0xab)]):_0xcd9625[_0x52d7ce(0xcb)],'description':hasOwn(_0x101559,'description')?_0x101559[_0x52d7ce(0xf5)]:_0xcd9625[_0x52d7ce(0xf5)],'connectTimeout':hasOwn(_0x101559,'connectTimeout')?_0x101559[_0x52d7ce(0x94)]:_0xcd9625[_0x52d7ce(0x94)],'readTimeout':hasOwn(_0x101559,_0x52d7ce(0xe1))?_0x101559[_0x52d7ce(0xe1)]:_0xcd9625[_0x52d7ce(0xe1)]};}export function plannedUpdateProjection(_0x9348f4,_0x2003ff){const _0xa611c8=a146_0x3411df;return projectNotificationConfig({'id':_0x9348f4['id'],'appCode':_0x9348f4[_0xa611c8(0x93)],'configCode':_0x9348f4[_0xa611c8(0x90)],'configName':_0x2003ff[_0xa611c8(0xc8)]??_0x9348f4[_0xa611c8(0xc8)],'channelType':_0x2003ff[_0xa611c8(0xfc)]??_0x9348f4['channelType'],'endpointUrl':hasOwn(_0x2003ff,_0xa611c8(0x9e))?_0x2003ff[_0xa611c8(0x9e)]:_0x9348f4[_0xa611c8(0x87)],'channelConfig':hasOwn(_0x2003ff,_0xa611c8(0xab))?_0x2003ff[_0xa611c8(0xab)]:_0x9348f4['channelConfigRaw'],'description':hasOwn(_0x2003ff,'description')?_0x2003ff[_0xa611c8(0xf5)]:_0x9348f4[_0xa611c8(0xf5)],'connectTimeout':hasOwn(_0x2003ff,_0xa611c8(0x94))?_0x2003ff['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x9348f4[_0xa611c8(0x94)],'readTimeout':hasOwn(_0x2003ff,_0xa611c8(0xe1))?_0x2003ff['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x9348f4[_0xa611c8(0xe1)]});}export function requestedSafeFieldsMatch(_0x26b2be,_0x17b660,_0x219bac){const _0x2e8945=a146_0x3411df,_0x43b86d=[],_0x4fbc71=[],_0x4f102c=[];for(const _0x12d767 of['configName',_0x2e8945(0xfc),_0x2e8945(0xf5)]){if(!hasOwn(_0x219bac,_0x12d767))continue;_0x4f102c[_0x2e8945(0x99)](_0x12d767),_0x43b86d['push'](_0x17b660[_0x12d767]===_0x219bac[_0x12d767]),_0x4fbc71['push'](_0x26b2be[_0x12d767]!==_0x219bac[_0x12d767]&&_0x17b660[_0x12d767]===_0x219bac[_0x12d767]);}for(const _0x4f31cc of[_0x2e8945(0x94),_0x2e8945(0xe1)]){if(!hasOwn(_0x219bac,_0x4f31cc))continue;const _0x9665ae=_0x219bac[_0x4f31cc]??(_0x4f31cc===_0x2e8945(0x94)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4f102c[_0x2e8945(0x99)](_0x4f31cc),_0x43b86d[_0x2e8945(0x99)](_0x17b660[_0x4f31cc]===_0x9665ae),_0x4fbc71[_0x2e8945(0x99)](_0x26b2be[_0x4f31cc]!==_0x9665ae&&_0x17b660[_0x4f31cc]===_0x9665ae);}return hasOwn(_0x219bac,_0x2e8945(0x9e))&&_0x219bac['endpointUrl']===null&&(_0x4f102c[_0x2e8945(0x99)](_0x2e8945(0xf9)),_0x43b86d['push'](_0x17b660[_0x2e8945(0x87)]===null||_0x17b660['endpointUrlRaw']===''),_0x4fbc71[_0x2e8945(0x99)](_0x26b2be['endpointUrlRaw']!==null&&_0x26b2be[_0x2e8945(0x87)]!==''&&(_0x17b660['endpointUrlRaw']===null||_0x17b660['endpointUrlRaw']===''))),{'allMatch':_0x43b86d[_0x2e8945(0xad)](Boolean),'provesChange':_0x4fbc71[_0x2e8945(0xfd)](Boolean),'verifiedFields':_0x4f102c};}export function validateNotificationDeleteReadback(_0x56a93f,_0xe226db,_0x1f1c63){const _0x72d80=a146_0x3411df;for(const [_0x3355c2,_0x103765]of _0x56a93f[_0x72d80(0xe6)]()){if(!Number[_0x72d80(0xb0)](_0x103765['id'])||_0x103765['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x3355c2+0x1)+_0x72d80(0xb9));if(_0x103765[_0x72d80(0x93)]!==_0xe226db)throw notificationError(_0x72d80(0xc9),_0x72d80(0xea)+(_0x3355c2+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x103765[_0x72d80(0xfc)]!==_0x1f1c63)throw notificationError(_0x72d80(0xc9),'Notification\x20config\x20list\x20item\x20'+(_0x3355c2+0x1)+_0x72d80(0xd4));}}export function safeApiFailure(_0x47dc8a,_0xe96e2c,_0x1760bd){const _0xfee014=a146_0x3411df;return notificationError(_0xfee014(0xa7)+_0x47dc8a+'_'+(_0xe96e2c===_0xfee014(0xca)?_0xfee014(0x9d):_0xe96e2c+_0xfee014(0x96)),'Notification\x20config\x20'+_0x47dc8a+'\x20'+_0xe96e2c+_0xfee014(0xe7),_0x1760bd);}export function notificationLookupCommand(_0x289cc8,_0x55666d){const _0x5cf74a=a146_0x3411df;return _0x5cf74a(0x8f)+_0x289cc8+'\x20--type\x20'+_0x55666d+_0x5cf74a(0xc4);}function validateNotificationDocument(_0x5c7d61,_0x21afa5){const _0x121e37=a146_0x3411df;for(const _0x5d3200 of Object['keys'](_0x5c7d61)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x5d3200))throw notificationError('notification_config_field_forbidden',_0x121e37(0xc7)+_0x5d3200+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x121e37(0xd5)](_0x5d3200))throw notificationError('notification_config_field_unknown',_0x121e37(0x85)+_0x5d3200+'\x22.');}if(_0x21afa5==='update'&&Object['keys'](_0x5c7d61)['length']===0x0)throw notificationError(_0x121e37(0xba),_0x121e37(0xd2));const _0x4ae00e={};if(hasOwn(_0x5c7d61,_0x121e37(0xc8)))_0x4ae00e[_0x121e37(0xc8)]=validateRequiredString(_0x5c7d61[_0x121e37(0xc8)],_0x121e37(0xc8),0x80);else{if(_0x21afa5===_0x121e37(0xc0))throw notificationError(_0x121e37(0x103),_0x121e37(0xa2)+'\x22configName\x22.');}if(hasOwn(_0x5c7d61,'channelType')){if(typeof _0x5c7d61['channelType']!==_0x121e37(0x9b))throw invalidFieldType(_0x121e37(0xfc),_0x121e37(0xdc));const _0x2b32e7=_0x5c7d61[_0x121e37(0xfc)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x121e37(0xf3)](_0x2b32e7))throw notificationError(_0x121e37(0xe3),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x121e37(0xcc)](',\x20')+'.');_0x4ae00e[_0x121e37(0xfc)]=_0x2b32e7;}else{if(_0x21afa5===_0x121e37(0xc0))throw notificationError(_0x121e37(0x103),'Create\x20JSON\x20requires\x20field\x20'+_0x121e37(0xf2));}for(const [_0xb6b8ed,_0x575888]of[[_0x121e37(0x9e),0x200],[_0x121e37(0xf5),0x100]]){if(!hasOwn(_0x5c7d61,_0xb6b8ed))continue;const _0x572504=_0x5c7d61[_0xb6b8ed];if(_0x572504!==null&&typeof _0x572504!=='string')throw invalidFieldType(_0xb6b8ed,'a\x20string\x20or\x20null');if(typeof _0x572504==='string'&&_0x572504[_0x121e37(0xe2)]>_0x575888)throw notificationError(_0x121e37(0xe3),'Notification\x20JSON\x20field\x20\x22'+_0xb6b8ed+_0x121e37(0xb5)+_0x575888+_0x121e37(0xeb));_0x4ae00e[_0xb6b8ed]=_0x572504;}if(hasOwn(_0x5c7d61,'channelConfig')){const _0x4f86a9=_0x5c7d61[_0x121e37(0xab)];if(_0x4f86a9===null&&_0x21afa5===_0x121e37(0xc0))throw invalidFieldType(_0x121e37(0xab),_0x121e37(0xa8));if(_0x4f86a9!==null&&!isJsonObject(_0x4f86a9))throw invalidFieldType('channelConfig',_0x21afa5===_0x121e37(0xe8)?_0x121e37(0x97):'a\x20JSON\x20object');_0x4f86a9!==null&&validateChannelConfigFields(_0x4ae00e['channelType'],_0x4f86a9),_0x4ae00e[_0x121e37(0xab)]=_0x4f86a9;}for(const _0x55a2a0 of['connectTimeout',_0x121e37(0xe1)]){if(!hasOwn(_0x5c7d61,_0x55a2a0))continue;const _0x582962=_0x5c7d61[_0x55a2a0];if(_0x582962!==null&&(!Number['isSafeInteger'](_0x582962)||_0x582962<0x0))throw notificationError(_0x121e37(0xe3),_0x121e37(0xc7)+_0x55a2a0+_0x121e37(0xd1));_0x4ae00e[_0x55a2a0]=_0x582962;}return _0x4ae00e;}function validateRequiredString(_0x78600d,_0x3630ce,_0x2f3396){const _0x5b5c3d=a146_0x3411df;if(typeof _0x78600d!==_0x5b5c3d(0x9b))throw invalidFieldType(_0x3630ce,_0x5b5c3d(0xaf));const _0x404bf7=_0x78600d[_0x5b5c3d(0xb3)]();if(!_0x404bf7)throw notificationError(_0x5b5c3d(0xe3),'Notification\x20JSON\x20field\x20\x22'+_0x3630ce+_0x5b5c3d(0xe5));if(_0x404bf7[_0x5b5c3d(0xe2)]>_0x2f3396)throw notificationError(_0x5b5c3d(0xe3),_0x5b5c3d(0xc7)+_0x3630ce+'\x22\x20cannot\x20exceed\x20'+_0x2f3396+_0x5b5c3d(0xeb));return _0x404bf7;}function validateChannelConfigFields(_0x541629,_0x3fae89){const _0x50824d=a146_0x3411df;if(hasOwn(_0x3fae89,_0x50824d(0xb8)))throw forbiddenChannelConfigField(_0x50824d(0xb8));if(_0x541629===_0x50824d(0xfe))for(const _0x26a431 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x3fae89,_0x26a431))throw forbiddenChannelConfigField(_0x26a431);}}function forbiddenChannelConfigField(_0x466b41){const _0x45577a=a146_0x3411df;return notificationError(_0x45577a(0xdb),_0x45577a(0xf7)+_0x466b41+_0x45577a(0xa1));}function invalidFieldType(_0x161ab2,_0x5ec421){const _0x79c649=a146_0x3411df;return notificationError(_0x79c649(0xe3),'Notification\x20JSON\x20field\x20\x22'+_0x161ab2+'\x22\x20must\x20be\x20'+_0x5ec421+'.');}function serializeChannelConfig(_0x4cef22){return _0x4cef22===null||_0x4cef22===undefined?null:JSON['stringify'](_0x4cef22);}function redactSensitive(_0x585bbc){return _0x585bbc===null||_0x585bbc===undefined||_0x585bbc===''?null:'<redacted>';}function requireResponseString(_0x18ae41,_0x11d298,_0x59256c){const _0x44ee72=a146_0x3411df;if(typeof _0x18ae41!==_0x44ee72(0x9b)||_0x18ae41['trim']()==='')throw CliErrors['apiError'](_0x44ee72(0x9f),_0x44ee72(0xd9)+(_0x59256c+0x1)+_0x44ee72(0xc2)+_0x11d298+'\x22.');return _0x18ae41['trim']();}function requireExactString(_0x2c0d85,_0x10dfd9,_0x108578){const _0x3dba12=a146_0x3411df;if(typeof _0x2c0d85!==_0x3dba12(0x9b)||_0x2c0d85[_0x3dba12(0xb3)]()==='')throw notificationError(_0x3dba12(0xc9),'Notification\x20config\x20'+_0x108578+_0x3dba12(0xc2)+_0x10dfd9+'\x22.');return _0x2c0d85[_0x3dba12(0xb3)]();}function responseNullableString(_0x5958c6,_0x614e26,_0x1c0d32){const _0x2cf3f5=a146_0x3411df;if(_0x5958c6===undefined||_0x5958c6===null)return null;if(typeof _0x5958c6!==_0x2cf3f5(0x9b))throw notificationError(_0x2cf3f5(0xc9),_0x2cf3f5(0x92)+_0x1c0d32+_0x2cf3f5(0xf0)+_0x614e26+'\x22.');return _0x5958c6;}function responseNullableTimeout(_0xb517b7,_0x5a97cc,_0x4c4d7a){const _0x163cad=a146_0x3411df;if(_0xb517b7===undefined||_0xb517b7===null)return null;if(!Number['isSafeInteger'](_0xb517b7)||_0xb517b7<0x0)throw notificationError('notification_config_response_invalid',_0x163cad(0x92)+_0x4c4d7a+_0x163cad(0xf0)+_0x5a97cc+'\x22.');return _0xb517b7;}function normalizeNullableString(_0x57649d){const _0x4a89be=a146_0x3411df;return typeof _0x57649d===_0x4a89be(0x9b)?_0x57649d:null;}function isJsonObject(_0x194cca){const _0xd4f321=a146_0x3411df;return _0x194cca!==null&&typeof _0x194cca===_0xd4f321(0xf8)&&!Array[_0xd4f321(0xa0)](_0x194cca);}function hasOwn(_0x11e422,_0x3fa34b){const _0x1468ba=a146_0x3411df;return Object[_0x1468ba(0xec)][_0x1468ba(0xf1)][_0x1468ba(0xd8)](_0x11e422,_0x3fa34b);}async function readStdin(){const _0x3b02a7=a146_0x3411df;let _0x35e498='';process['stdin']['setEncoding'](_0x3b02a7(0x84));for await(const _0x6c6843 of process[_0x3b02a7(0xcf)])_0x35e498+=_0x6c6843;return _0x35e498;}
|
|
1
|
+
const a146_0x128dcc=a146_0x4d91;(function(_0x57b184,_0x538f37){const _0x56e36d=a146_0x4d91,_0x250f91=_0x57b184();while(!![]){try{const _0x4803f1=parseInt(_0x56e36d(0x152))/0x1*(-parseInt(_0x56e36d(0x12e))/0x2)+parseInt(_0x56e36d(0x165))/0x3*(-parseInt(_0x56e36d(0x128))/0x4)+parseInt(_0x56e36d(0x169))/0x5*(parseInt(_0x56e36d(0x125))/0x6)+-parseInt(_0x56e36d(0x197))/0x7+-parseInt(_0x56e36d(0x187))/0x8+-parseInt(_0x56e36d(0x151))/0x9+-parseInt(_0x56e36d(0x15e))/0xa*(-parseInt(_0x56e36d(0x13f))/0xb);if(_0x4803f1===_0x538f37)break;else _0x250f91['push'](_0x250f91['shift']());}catch(_0x21362f){_0x250f91['push'](_0x250f91['shift']());}}}(a146_0x6940,0x3de5e));import{readFile}from'node:fs/promises';function a146_0x6940(){const _0x5bc803=['setEncoding','\x20failed.','validation','a\x20JSON\x20object','rabetbase\x20notification\x20config-list\x20--appcode\x20','EMAIL','mutation','1155vRhYLV','endpointUrl','from-env','Notification\x20JSON\x20field\x20\x22','subjectPrefix','DINGTALK','Missing\x20notification\x20JSON\x20source.','\x22channelType\x22.','bccList','\x22configName\x22.','environment\x20variable\x20','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','notification_config_field_forbidden','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','stdin','WECOM','Invalid\x20notification\x20config\x20response.','1201104PEFyuW','1JphXTF','has','\x20has\x20an\x20invalid\x20appCode.','\x20must\x20be\x20an\x20object.','update','join','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Notification\x20config\x20list\x20item\x20','trim','create','WEBHOOK','72350urwVaN','entries','bool','type','messageTemplate','updateTime','Unknown\x20notification\x20JSON\x20field\x20\x22','127866vrfozP','\x22\x20cannot\x20exceed\x20','file\x20','object','37400JXhSte','some','keys','notification_config_confirmation_required','a\x20JSON\x20object\x20or\x20null','\x20has\x20invalid\x20field\x20\x22','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','path','configCode','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','env','appCode','file','string','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_source_unavailable','every','\x20is\x20missing\x20required\x20field\x20\x22','createTime','channelConfig','includes','emailTargets','length','kind','a\x20non-empty\x20string','channelConfigRaw','num','readTimeout','<redacted>','Allowed\x20values:\x20','2769024pvmfHc','endpointUrlRaw','a\x20string\x20or\x20null','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','_unavailable','Notification\x20config\x20','notification_config_update_empty','utf8','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','FEISHU','Notification\x20JSON\x20channelConfig\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','notification_config_field_invalid','fromName','isSafeInteger','replyTo','1280146RmuLZW','parse','\x20has\x20an\x20unsupported\x20channelType.','notification_config_channel_field_forbidden','\x20is\x20invalid.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','a\x20supported\x20string','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','stringify','Notification\x20JSON\x20from\x20','Invalid\x20--','name','notification_config_response_invalid','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','channelType','notification_config_json_invalid','notification_config_field_required','hasOwnProperty','312LmThdr','\x20has\x20an\x20invalid\x20id.','Create\x20JSON\x20requires\x20field\x20','16YJpjPX','push','dry-run','number','configName','channelCode','124302cdUAYt','notification_config_field_unknown','str','yes','connectTimeout','\x20characters.','\x22\x20is\x20forbidden.','prototype','description','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.'];a146_0x6940=function(){return _0x5bc803;};return a146_0x6940();}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_0x128dcc(0x13d),a146_0x128dcc(0x190),a146_0x128dcc(0x144),a146_0x128dcc(0x14f),a146_0x128dcc(0x15d)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a146_0x128dcc(0x121),a146_0x128dcc(0x140),a146_0x128dcc(0x17c),'description','connectTimeout','readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a146_0x128dcc(0x174),a146_0x128dcc(0x171),a146_0x128dcc(0x12d)]),EMAIL_RECIPIENT_FIELDS=new Set([a146_0x128dcc(0x17e),'recipients','ccList',a146_0x128dcc(0x147),a146_0x128dcc(0x196),a146_0x128dcc(0x143),a146_0x128dcc(0x194),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':'string','required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a146_0x128dcc(0x14e),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a146_0x128dcc(0x141),'type':a146_0x128dcc(0x176),'required':![],'description':a146_0x128dcc(0x14c)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a146_0x128dcc(0x12b),'required':!![],'description':a146_0x128dcc(0x192)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x39ee73,_0x166f25,_0x5d8a8f){return new CliError(_0x39ee73,0x1,_0x166f25,_0x5d8a8f);}export function readNotificationId(_0x30f695){const _0x34651c=a146_0x128dcc,_0x1cbf37=_0x30f695[_0x34651c(0x183)]('id');if(!Number[_0x34651c(0x195)](_0x1cbf37)||_0x1cbf37<=0x0)throw notificationError('notification_config_id_invalid',_0x34651c(0x137));return _0x1cbf37;}export function requireNotificationExplicitYes(_0x57cdc6){const _0x1243bc=a146_0x128dcc;if(_0x57cdc6[_0x1243bc(0x160)](_0x1243bc(0x12a))||_0x57cdc6[_0x1243bc(0x160)](_0x1243bc(0x131)))return;throw notificationError(_0x1243bc(0x16c),_0x1243bc(0x14a),_0x1243bc(0x19e));}export function readNotificationChannelType(_0x110620,_0x4161b1=a146_0x128dcc(0x161),_0x4b7992='EMAIL'){const _0x476e1e=a146_0x128dcc,_0x269a20=_0x110620['str'](_0x4161b1)[_0x476e1e(0x15b)]()||_0x4b7992;if(!NOTIFICATION_CHANNEL_TYPES[_0x476e1e(0x17d)](_0x269a20))throw CliErrors['validation'](_0x476e1e(0x11d)+_0x4161b1+':\x20'+_0x269a20,_0x476e1e(0x186)+NOTIFICATION_CHANNEL_TYPES[_0x476e1e(0x157)](',\x20')+'.');return _0x269a20;}export function assertSingleNotificationSource(_0x59e536){const _0x5d721d=a146_0x128dcc,_0x589fbe=[],_0x5cf20a=_0x59e536[_0x5d721d(0x130)](_0x5d721d(0x175))[_0x5d721d(0x15b)]();if(_0x5cf20a)_0x589fbe[_0x5d721d(0x129)]({'kind':_0x5d721d(0x175),'path':_0x5cf20a});if(_0x59e536[_0x5d721d(0x160)](_0x5d721d(0x14e)))_0x589fbe[_0x5d721d(0x129)]({'kind':_0x5d721d(0x14e)});const _0x49d73e=_0x59e536[_0x5d721d(0x130)](_0x5d721d(0x141))[_0x5d721d(0x15b)]();if(_0x49d73e)_0x589fbe[_0x5d721d(0x129)]({'kind':_0x5d721d(0x173),'name':_0x49d73e});if(_0x589fbe['length']===0x0)throw CliErrors[_0x5d721d(0x13a)](_0x5d721d(0x145),_0x5d721d(0x158));if(_0x589fbe[_0x5d721d(0x17f)]>0x1)throw CliErrors[_0x5d721d(0x13a)](_0x5d721d(0x177),_0x5d721d(0x158));return _0x589fbe[0x0];}export async function readNotificationDocument(_0x30c500,_0xfb5c9c){const _0x487685=a146_0x128dcc,_0x4f6115=assertSingleNotificationSource(_0x30c500),_0x1d27ea=_0x4f6115[_0x487685(0x180)]===_0x487685(0x175)?_0x487685(0x167)+_0x4f6115[_0x487685(0x170)]:_0x4f6115[_0x487685(0x180)]===_0x487685(0x173)?_0x487685(0x149)+_0x4f6115['name']:'stdin';let _0x3bed95;try{if(_0x4f6115[_0x487685(0x180)]===_0x487685(0x175))_0x3bed95=await readFile(_0x4f6115[_0x487685(0x170)],_0x487685(0x18e));else{if(_0x4f6115['kind']===_0x487685(0x173)){if(!(_0x4f6115[_0x487685(0x11e)]in process.env))throw notificationError(_0x487685(0x178),_0x487685(0x16f)+_0x4f6115['name']);_0x3bed95=process.env[_0x4f6115.name]??'';}else _0x3bed95=await readStdin();}}catch(_0x5666fd){if(_0x5666fd instanceof CliError)throw _0x5666fd;throw notificationError(_0x487685(0x178),_0x487685(0x120)+_0x1d27ea+'.');}let _0xc06bed;try{_0xc06bed=JSON[_0x487685(0x198)](_0x3bed95);}catch{throw notificationError(_0x487685(0x122),'Notification\x20JSON\x20from\x20'+_0x1d27ea+_0x487685(0x19b),_0x487685(0x18a));}if(!isJsonObject(_0xc06bed))throw notificationError('notification_config_json_invalid',_0x487685(0x11c)+_0x1d27ea+_0x487685(0x155));return validateNotificationDocument(_0xc06bed,_0xfb5c9c);}export function projectNotificationListConfig(_0xcd19d3,_0x39ddcd){const _0x46517c=a146_0x128dcc;return{'id':typeof _0xcd19d3['id']===_0x46517c(0x12b)?_0xcd19d3['id']:null,'configCode':requireResponseString(_0xcd19d3[_0x46517c(0x171)],'configCode',_0x39ddcd),'configName':requireResponseString(_0xcd19d3[_0x46517c(0x12c)],'configName',_0x39ddcd),'channelType':requireResponseString(_0xcd19d3[_0x46517c(0x121)],_0x46517c(0x121),_0x39ddcd),'description':normalizeNullableString(_0xcd19d3[_0x46517c(0x136)]),'createTime':normalizeNullableString(_0xcd19d3[_0x46517c(0x17b)]),'updateTime':normalizeNullableString(_0xcd19d3[_0x46517c(0x163)])};}export function normalizeExactNotificationConfig(_0x47f032,_0x1903f0,_0x4d9715){const _0x9496af=a146_0x128dcc;if(!Number[_0x9496af(0x195)](_0x47f032['id'])||_0x47f032['id']!==_0x1903f0)throw notificationError('notification_config_response_invalid',_0x9496af(0x18f)+_0x1903f0+'.');if(_0x47f032[_0x9496af(0x174)]!==_0x4d9715)throw notificationError(_0x9496af(0x11f),'Notification\x20config\x20'+_0x1903f0+_0x9496af(0x14d));const _0xe6b896=requireExactString(_0x47f032['configName'],_0x9496af(0x12c),_0x1903f0),_0x392320=requireExactString(_0x47f032[_0x9496af(0x171)],_0x9496af(0x171),_0x1903f0),_0xfc158d=requireExactString(_0x47f032['channelType'],_0x9496af(0x121),_0x1903f0);if(!NOTIFICATION_CHANNEL_TYPES[_0x9496af(0x17d)](_0xfc158d))throw notificationError(_0x9496af(0x11f),_0x9496af(0x18c)+_0x1903f0+_0x9496af(0x199));const _0x434951=responseNullableString(_0x47f032[_0x9496af(0x140)],_0x9496af(0x140),_0x1903f0),_0x5f3490=responseNullableString(_0x47f032[_0x9496af(0x17c)],_0x9496af(0x17c),_0x1903f0),_0x317d51=responseNullableString(_0x47f032[_0x9496af(0x136)],_0x9496af(0x136),_0x1903f0),_0x4ec5d7=responseNullableTimeout(_0x47f032[_0x9496af(0x132)],_0x9496af(0x132),_0x1903f0),_0x425475=responseNullableTimeout(_0x47f032[_0x9496af(0x184)],_0x9496af(0x184),_0x1903f0);return{'id':_0x1903f0,'appCode':_0x4d9715,'configCode':_0x392320,'configName':_0xe6b896,'channelType':_0xfc158d,'endpointUrl':redactSensitive(_0x434951),'channelConfig':redactSensitive(_0x5f3490),'description':_0x317d51,'connectTimeout':_0x4ec5d7,'readTimeout':_0x425475,'endpointUrlRaw':_0x434951,'channelConfigRaw':_0x5f3490};}export async function requireExactNotificationConfig(_0x23dcb2,_0x58511a,_0x312cbb){const _0xac7a51=a146_0x128dcc;let _0x4f1eab;try{_0x4f1eab=await getNotificationChannelConfig(_0x58511a,_0x23dcb2);}catch{throw safeApiFailure(_0x312cbb,'preflight','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x23dcb2+_0xac7a51(0x172));}return normalizeExactNotificationConfig(_0x4f1eab,_0x58511a,_0x23dcb2);}export function projectNotificationConfig(_0x491178){const _0x58d992=a146_0x128dcc;return{'id':_0x491178['id']??null,'appCode':_0x491178[_0x58d992(0x174)],'configCode':_0x491178[_0x58d992(0x171)]??null,'configName':_0x491178[_0x58d992(0x12c)],'channelType':_0x491178[_0x58d992(0x121)],'endpointUrl':redactSensitive(_0x491178[_0x58d992(0x140)]),'channelConfig':redactSensitive(_0x491178[_0x58d992(0x17c)]),'description':_0x491178[_0x58d992(0x136)]??null,'connectTimeout':_0x491178[_0x58d992(0x132)]??null,'readTimeout':_0x491178['readTimeout']??null};}export function notificationSelector(_0x302f2b){const _0x1c8cd1=a146_0x128dcc;return{'appCode':_0x302f2b[_0x1c8cd1(0x174)],'id':_0x302f2b['id'],'configCode':_0x302f2b['configCode'],'configName':_0x302f2b[_0x1c8cd1(0x12c)],'channelType':_0x302f2b['channelType']};}export function createMutationInput(_0xa9a264,_0x1aaeec){const _0x558d2f=a146_0x128dcc;return{'appCode':_0xa9a264,'configName':_0x1aaeec[_0x558d2f(0x12c)],'channelType':_0x1aaeec['channelType'],...hasOwn(_0x1aaeec,_0x558d2f(0x140))?{'endpointUrl':_0x1aaeec[_0x558d2f(0x140)]}:{},...hasOwn(_0x1aaeec,_0x558d2f(0x17c))?{'channelConfig':serializeChannelConfig(_0x1aaeec['channelConfig'])}:{},...hasOwn(_0x1aaeec,_0x558d2f(0x136))?{'description':_0x1aaeec['description']}:{},...hasOwn(_0x1aaeec,'connectTimeout')?{'connectTimeout':_0x1aaeec[_0x558d2f(0x132)]}:{},...hasOwn(_0x1aaeec,_0x558d2f(0x184))?{'readTimeout':_0x1aaeec[_0x558d2f(0x184)]}:{}};}export function mergeUpdateInput(_0x3dd423,_0x2fc1fb){const _0x157085=a146_0x128dcc;return{'id':_0x3dd423['id'],'appCode':_0x3dd423[_0x157085(0x174)],'configName':_0x2fc1fb[_0x157085(0x12c)]??_0x3dd423[_0x157085(0x12c)],'channelType':_0x2fc1fb['channelType']??_0x3dd423['channelType'],'endpointUrl':hasOwn(_0x2fc1fb,_0x157085(0x140))?_0x2fc1fb['endpointUrl']:_0x3dd423['endpointUrlRaw'],'channelConfig':hasOwn(_0x2fc1fb,_0x157085(0x17c))?serializeChannelConfig(_0x2fc1fb['channelConfig']):_0x3dd423[_0x157085(0x182)],'description':hasOwn(_0x2fc1fb,_0x157085(0x136))?_0x2fc1fb['description']:_0x3dd423[_0x157085(0x136)],'connectTimeout':hasOwn(_0x2fc1fb,'connectTimeout')?_0x2fc1fb['connectTimeout']:_0x3dd423[_0x157085(0x132)],'readTimeout':hasOwn(_0x2fc1fb,_0x157085(0x184))?_0x2fc1fb['readTimeout']:_0x3dd423['readTimeout']};}export function plannedUpdateProjection(_0x8bf0f5,_0x433cd4){const _0xb82b6e=a146_0x128dcc;return projectNotificationConfig({'id':_0x8bf0f5['id'],'appCode':_0x8bf0f5[_0xb82b6e(0x174)],'configCode':_0x8bf0f5[_0xb82b6e(0x171)],'configName':_0x433cd4[_0xb82b6e(0x12c)]??_0x8bf0f5['configName'],'channelType':_0x433cd4[_0xb82b6e(0x121)]??_0x8bf0f5[_0xb82b6e(0x121)],'endpointUrl':hasOwn(_0x433cd4,'endpointUrl')?_0x433cd4[_0xb82b6e(0x140)]:_0x8bf0f5[_0xb82b6e(0x188)],'channelConfig':hasOwn(_0x433cd4,_0xb82b6e(0x17c))?_0x433cd4['channelConfig']:_0x8bf0f5['channelConfigRaw'],'description':hasOwn(_0x433cd4,'description')?_0x433cd4[_0xb82b6e(0x136)]:_0x8bf0f5[_0xb82b6e(0x136)],'connectTimeout':hasOwn(_0x433cd4,_0xb82b6e(0x132))?_0x433cd4['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x8bf0f5[_0xb82b6e(0x132)],'readTimeout':hasOwn(_0x433cd4,'readTimeout')?_0x433cd4[_0xb82b6e(0x184)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x8bf0f5[_0xb82b6e(0x184)]});}export function requestedSafeFieldsMatch(_0xa07fc0,_0x5b19d1,_0x1368a2){const _0x131c75=a146_0x128dcc,_0x1ee1b9=[],_0xe7463a=[],_0x5a1695=[];for(const _0x5c68c2 of[_0x131c75(0x12c),_0x131c75(0x121),'description']){if(!hasOwn(_0x1368a2,_0x5c68c2))continue;_0x5a1695[_0x131c75(0x129)](_0x5c68c2),_0x1ee1b9[_0x131c75(0x129)](_0x5b19d1[_0x5c68c2]===_0x1368a2[_0x5c68c2]),_0xe7463a[_0x131c75(0x129)](_0xa07fc0[_0x5c68c2]!==_0x1368a2[_0x5c68c2]&&_0x5b19d1[_0x5c68c2]===_0x1368a2[_0x5c68c2]);}for(const _0x4e41ea of[_0x131c75(0x132),'readTimeout']){if(!hasOwn(_0x1368a2,_0x4e41ea))continue;const _0x4efecc=_0x1368a2[_0x4e41ea]??(_0x4e41ea===_0x131c75(0x132)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x5a1695[_0x131c75(0x129)](_0x4e41ea),_0x1ee1b9[_0x131c75(0x129)](_0x5b19d1[_0x4e41ea]===_0x4efecc),_0xe7463a[_0x131c75(0x129)](_0xa07fc0[_0x4e41ea]!==_0x4efecc&&_0x5b19d1[_0x4e41ea]===_0x4efecc);}return hasOwn(_0x1368a2,_0x131c75(0x140))&&_0x1368a2['endpointUrl']===null&&(_0x5a1695[_0x131c75(0x129)]('endpointUrl:null'),_0x1ee1b9[_0x131c75(0x129)](_0x5b19d1['endpointUrlRaw']===null||_0x5b19d1[_0x131c75(0x188)]===''),_0xe7463a[_0x131c75(0x129)](_0xa07fc0[_0x131c75(0x188)]!==null&&_0xa07fc0[_0x131c75(0x188)]!==''&&(_0x5b19d1[_0x131c75(0x188)]===null||_0x5b19d1['endpointUrlRaw']===''))),{'allMatch':_0x1ee1b9[_0x131c75(0x179)](Boolean),'provesChange':_0xe7463a[_0x131c75(0x16a)](Boolean),'verifiedFields':_0x5a1695};}export function validateNotificationDeleteReadback(_0x49784d,_0x52d495,_0xc170b4){const _0x50f167=a146_0x128dcc;for(const [_0x5263ff,_0x285acd]of _0x49784d[_0x50f167(0x15f)]()){if(!Number['isSafeInteger'](_0x285acd['id'])||_0x285acd['id']<=0x0)throw notificationError(_0x50f167(0x11f),_0x50f167(0x15a)+(_0x5263ff+0x1)+_0x50f167(0x126));if(_0x285acd[_0x50f167(0x174)]!==_0x52d495)throw notificationError(_0x50f167(0x11f),_0x50f167(0x15a)+(_0x5263ff+0x1)+_0x50f167(0x154));if(_0x285acd[_0x50f167(0x121)]!==_0xc170b4)throw notificationError(_0x50f167(0x11f),_0x50f167(0x15a)+(_0x5263ff+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x282cfc,_0x1c1ec1,_0x6e44dc){const _0x3eb41e=a146_0x128dcc;return notificationError('notification_config_'+_0x282cfc+'_'+(_0x1c1ec1===_0x3eb41e(0x13e)?'failed':_0x1c1ec1+_0x3eb41e(0x18b)),'Notification\x20config\x20'+_0x282cfc+'\x20'+_0x1c1ec1+_0x3eb41e(0x139),_0x6e44dc);}export function notificationLookupCommand(_0x459beb,_0x5c8f70){const _0x15ebdf=a146_0x128dcc;return _0x15ebdf(0x13c)+_0x459beb+'\x20--type\x20'+_0x5c8f70+'\x20--format\x20compress';}function validateNotificationDocument(_0x5948ea,_0x8e87d5){const _0x467fc3=a146_0x128dcc;for(const _0x377379 of Object[_0x467fc3(0x16b)](_0x5948ea)){if(FORBIDDEN_IDENTITY_FIELDS[_0x467fc3(0x153)](_0x377379))throw notificationError(_0x467fc3(0x14b),'Notification\x20JSON\x20field\x20\x22'+_0x377379+_0x467fc3(0x159));if(!ALLOWED_INPUT_FIELDS[_0x467fc3(0x153)](_0x377379))throw notificationError(_0x467fc3(0x12f),_0x467fc3(0x164)+_0x377379+'\x22.');}if(_0x8e87d5===_0x467fc3(0x156)&&Object[_0x467fc3(0x16b)](_0x5948ea)[_0x467fc3(0x17f)]===0x0)throw notificationError(_0x467fc3(0x18d),_0x467fc3(0x19c));const _0x43465c={};if(hasOwn(_0x5948ea,_0x467fc3(0x12c)))_0x43465c['configName']=validateRequiredString(_0x5948ea[_0x467fc3(0x12c)],_0x467fc3(0x12c),0x80);else{if(_0x8e87d5===_0x467fc3(0x15c))throw notificationError(_0x467fc3(0x123),_0x467fc3(0x127)+_0x467fc3(0x148));}if(hasOwn(_0x5948ea,_0x467fc3(0x121))){if(typeof _0x5948ea[_0x467fc3(0x121)]!==_0x467fc3(0x176))throw invalidFieldType(_0x467fc3(0x121),_0x467fc3(0x19d));const _0x391858=_0x5948ea[_0x467fc3(0x121)][_0x467fc3(0x15b)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x467fc3(0x17d)](_0x391858))throw notificationError(_0x467fc3(0x193),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x467fc3(0x157)](',\x20')+'.');_0x43465c[_0x467fc3(0x121)]=_0x391858;}else{if(_0x8e87d5===_0x467fc3(0x15c))throw notificationError(_0x467fc3(0x123),_0x467fc3(0x127)+_0x467fc3(0x146));}for(const [_0x4371ce,_0x5ba08a]of[[_0x467fc3(0x140),0x200],[_0x467fc3(0x136),0x100]]){if(!hasOwn(_0x5948ea,_0x4371ce))continue;const _0xf387b2=_0x5948ea[_0x4371ce];if(_0xf387b2!==null&&typeof _0xf387b2!==_0x467fc3(0x176))throw invalidFieldType(_0x4371ce,_0x467fc3(0x189));if(typeof _0xf387b2===_0x467fc3(0x176)&&_0xf387b2[_0x467fc3(0x17f)]>_0x5ba08a)throw notificationError(_0x467fc3(0x193),_0x467fc3(0x142)+_0x4371ce+_0x467fc3(0x166)+_0x5ba08a+_0x467fc3(0x133));_0x43465c[_0x4371ce]=_0xf387b2;}if(hasOwn(_0x5948ea,_0x467fc3(0x17c))){const _0x90cdd9=_0x5948ea[_0x467fc3(0x17c)];if(_0x90cdd9===null&&_0x8e87d5===_0x467fc3(0x15c))throw invalidFieldType('channelConfig',_0x467fc3(0x13b));if(_0x90cdd9!==null&&!isJsonObject(_0x90cdd9))throw invalidFieldType(_0x467fc3(0x17c),_0x8e87d5===_0x467fc3(0x156)?_0x467fc3(0x16d):_0x467fc3(0x13b));_0x90cdd9!==null&&validateChannelConfigFields(_0x43465c[_0x467fc3(0x121)],_0x90cdd9),_0x43465c[_0x467fc3(0x17c)]=_0x90cdd9;}for(const _0x1e5196 of[_0x467fc3(0x132),_0x467fc3(0x184)]){if(!hasOwn(_0x5948ea,_0x1e5196))continue;const _0x23dcf8=_0x5948ea[_0x1e5196];if(_0x23dcf8!==null&&(!Number[_0x467fc3(0x195)](_0x23dcf8)||_0x23dcf8<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x1e5196+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x43465c[_0x1e5196]=_0x23dcf8;}return _0x43465c;}function validateRequiredString(_0xea09a2,_0x1cb810,_0x95fa30){const _0x3e5cf1=a146_0x128dcc;if(typeof _0xea09a2!=='string')throw invalidFieldType(_0x1cb810,_0x3e5cf1(0x181));const _0x1806d1=_0xea09a2[_0x3e5cf1(0x15b)]();if(!_0x1806d1)throw notificationError(_0x3e5cf1(0x193),_0x3e5cf1(0x142)+_0x1cb810+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x1806d1['length']>_0x95fa30)throw notificationError(_0x3e5cf1(0x193),'Notification\x20JSON\x20field\x20\x22'+_0x1cb810+_0x3e5cf1(0x166)+_0x95fa30+_0x3e5cf1(0x133));return _0x1806d1;}function a146_0x4d91(_0x17c363,_0x503f36){_0x17c363=_0x17c363-0x11b;const _0x69408e=a146_0x6940();let _0x4d918b=_0x69408e[_0x17c363];return _0x4d918b;}function validateChannelConfigFields(_0x54a3ff,_0x34bf84){const _0x2f267a=a146_0x128dcc;if(hasOwn(_0x34bf84,'messageTemplate'))throw forbiddenChannelConfigField(_0x2f267a(0x162));if(_0x54a3ff===_0x2f267a(0x13d))for(const _0x159c8c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x34bf84,_0x159c8c))throw forbiddenChannelConfigField(_0x159c8c);}}function forbiddenChannelConfigField(_0x1d00a8){const _0xc73e8b=a146_0x128dcc;return notificationError(_0xc73e8b(0x19a),_0xc73e8b(0x191)+_0x1d00a8+_0xc73e8b(0x134));}function invalidFieldType(_0x3461cb,_0x52d0fa){const _0x5d2d4=a146_0x128dcc;return notificationError('notification_config_field_invalid',_0x5d2d4(0x142)+_0x3461cb+'\x22\x20must\x20be\x20'+_0x52d0fa+'.');}function serializeChannelConfig(_0x2e01e4){const _0x405aac=a146_0x128dcc;return _0x2e01e4===null||_0x2e01e4===undefined?null:JSON[_0x405aac(0x11b)](_0x2e01e4);}function redactSensitive(_0x34494b){const _0x2237e2=a146_0x128dcc;return _0x34494b===null||_0x34494b===undefined||_0x34494b===''?null:_0x2237e2(0x185);}function requireResponseString(_0x3a9ea3,_0x458921,_0xce7c0){const _0x24ddb=a146_0x128dcc;if(typeof _0x3a9ea3!==_0x24ddb(0x176)||_0x3a9ea3[_0x24ddb(0x15b)]()==='')throw CliErrors['apiError'](_0x24ddb(0x150),'Item\x20'+(_0xce7c0+0x1)+_0x24ddb(0x17a)+_0x458921+'\x22.');return _0x3a9ea3[_0x24ddb(0x15b)]();}function requireExactString(_0x2f66ef,_0x3ea079,_0x49901c){const _0x530a8f=a146_0x128dcc;if(typeof _0x2f66ef!==_0x530a8f(0x176)||_0x2f66ef[_0x530a8f(0x15b)]()==='')throw notificationError('notification_config_response_invalid','Notification\x20config\x20'+_0x49901c+_0x530a8f(0x17a)+_0x3ea079+'\x22.');return _0x2f66ef[_0x530a8f(0x15b)]();}function responseNullableString(_0x1d50ca,_0x2c9d20,_0x4954d0){const _0x4487da=a146_0x128dcc;if(_0x1d50ca===undefined||_0x1d50ca===null)return null;if(typeof _0x1d50ca!==_0x4487da(0x176))throw notificationError(_0x4487da(0x11f),_0x4487da(0x18c)+_0x4954d0+_0x4487da(0x16e)+_0x2c9d20+'\x22.');return _0x1d50ca;}function responseNullableTimeout(_0x35fe34,_0x5caf9b,_0x9828b9){const _0x856831=a146_0x128dcc;if(_0x35fe34===undefined||_0x35fe34===null)return null;if(!Number[_0x856831(0x195)](_0x35fe34)||_0x35fe34<0x0)throw notificationError(_0x856831(0x11f),_0x856831(0x18c)+_0x9828b9+_0x856831(0x16e)+_0x5caf9b+'\x22.');return _0x35fe34;}function normalizeNullableString(_0x29861c){const _0x1a5b88=a146_0x128dcc;return typeof _0x29861c===_0x1a5b88(0x176)?_0x29861c:null;}function isJsonObject(_0xaf4b33){const _0x168884=a146_0x128dcc;return _0xaf4b33!==null&&typeof _0xaf4b33===_0x168884(0x168)&&!Array['isArray'](_0xaf4b33);}function hasOwn(_0x12ecdf,_0x555dff){const _0x8cb2a5=a146_0x128dcc;return Object[_0x8cb2a5(0x135)][_0x8cb2a5(0x124)]['call'](_0x12ecdf,_0x555dff);}async function readStdin(){const _0x2a26cf=a146_0x128dcc;let _0x168628='';process['stdin'][_0x2a26cf(0x138)](_0x2a26cf(0x18e));for await(const _0x50805a of process[_0x2a26cf(0x14e)])_0x168628+=_0x50805a;return _0x168628;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a147_0x13e33d=a147_0x4277;(function(_0x14f1c2,_0x38c34b){const _0x14f7f6=a147_0x4277,_0x289bb7=_0x14f1c2();while(!![]){try{const _0x1f6de0=parseInt(_0x14f7f6(0xe8))/0x1*(parseInt(_0x14f7f6(0xed))/0x2)+-parseInt(_0x14f7f6(0x11f))/0x3*(-parseInt(_0x14f7f6(0xea))/0x4)+parseInt(_0x14f7f6(0x117))/0x5+-parseInt(_0x14f7f6(0xf6))/0x6*(-parseInt(_0x14f7f6(0x119))/0x7)+-parseInt(_0x14f7f6(0x114))/0x8*(-parseInt(_0x14f7f6(0x10c))/0x9)+parseInt(_0x14f7f6(0x109))/0xa+-parseInt(_0x14f7f6(0xf8))/0xb;if(_0x1f6de0===_0x38c34b)break;else _0x289bb7['push'](_0x289bb7['shift']());}catch(_0x12b57a){_0x289bb7['push'](_0x289bb7['shift']());}}}(a147_0x473a,0x494ba));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=[a147_0x13e33d(0x100),'general',a147_0x13e33d(0x10f),a147_0x13e33d(0xf0)],SCENE_TO_LEGACY_TYPE={'invoice':a147_0x13e33d(0xf9),'general':a147_0x13e33d(0x11b),'form':a147_0x13e33d(0x107),'idCard':a147_0x13e33d(0x116)},SCENE_FLAG={'name':a147_0x13e33d(0xfb),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a147_0x13e33d(0x106)},IMAGE_FILE_FLAG={'name':a147_0x13e33d(0xe7),'type':a147_0x13e33d(0xec),'description':a147_0x13e33d(0x101)},IMAGE_URL_FLAG={'name':a147_0x13e33d(0xfd),'type':a147_0x13e33d(0xec),'description':a147_0x13e33d(0xf7)};function normalizeScene(_0x6f03fa){const _0x19ee23=a147_0x13e33d,_0x3000d1=_0x6f03fa[_0x19ee23(0x104)]()['toLowerCase']();if(_0x3000d1===_0x19ee23(0x111))return _0x19ee23(0xf0);if(_0x3000d1==='invoice'||_0x3000d1==='general'||_0x3000d1===_0x19ee23(0x10f))return _0x3000d1;throw CliErrors[_0x19ee23(0xf4)](_0x19ee23(0xef)+_0x6f03fa+_0x19ee23(0x110)+SUPPORTED_SCENES[_0x19ee23(0xeb)](',\x20'));}function a147_0x473a(){const _0x4c39d7=['Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','File\x20URL\x20response\x20missing\x20fileUrl.','image-file','323mpGBOl','toString','8OELXCV','join','string','1658gkAPBV','str','Unsupported\x20OCR\x20scene:\x20','idCard','appCode','fileName','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','validation','fileUrl','13938PrGaNr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','9256060qZENrz','Invoice','/smartapi/common/uploadFile','scene','path','image-url','apiError','filePath','invoice','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','/smartapi/ocr/recognize-text','trim','imageUrl','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Table','/smartapi/common/queryFileUrl','3640Fjmlzc','\x20OCR','GET','1188ncUxjp','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','recognize','form','.\x20Supported\x20scenes:\x20','idcard','/smartapi/ocr/recognize-text?','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','9672uvEwDk','imageFile','IdCard','559860viTzde','ocr','1337haNqCV','\x20OCR\x20from\x20URL','General','length','POST','File\x20upload\x20response\x20missing\x20filePath.','237441lqBLdl'];a147_0x473a=function(){return _0x4c39d7;};return a147_0x473a();}function a147_0x4277(_0x271ef0,_0x173919){_0x271ef0=_0x271ef0-0xe6;const _0x473a16=a147_0x473a();let _0x427799=_0x473a16[_0x271ef0];return _0x427799;}function selectedInputs(_0x5c8d89){const _0x25941a=a147_0x13e33d,_0x514704=_0x5c8d89[_0x25941a(0xee)](_0x25941a(0xe7))['trim'](),_0x41f5cf=_0x5c8d89['str']('image-url')['trim']();return{'imageFile':_0x514704,'imageUrl':_0x41f5cf,'count':[_0x514704,_0x41f5cf]['filter'](Boolean)[_0x25941a(0x11c)]};}function validateInputSelection(_0x3c5607){const _0x3bab89=a147_0x13e33d,_0x17c001=selectedInputs(_0x3c5607);if(_0x17c001['count']!==0x1)throw CliErrors[_0x3bab89(0xf4)](_0x3bab89(0x120));return _0x17c001;}function withScene(_0x295853,_0x4fd8fe,_0x558836){const _0x415e20=a147_0x13e33d;return{..._0x295853,'scene':_0x4fd8fe,..._0x558836?{'sourceFile':{'fileName':_0x558836[_0x415e20(0xf2)],'filePath':_0x558836[_0x415e20(0xff)]}}:{}};}const ocrRecognize={'service':a147_0x13e33d(0x118),'command':a147_0x13e33d(0x10e),'description':a147_0x13e33d(0x113),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3a0c5b){const _0x364bf8=a147_0x13e33d,_0x4212e3=normalizeScene(_0x3a0c5b[_0x364bf8(0xee)](_0x364bf8(0xfb))),_0x474bef=SCENE_TO_LEGACY_TYPE[_0x4212e3],_0x964fa7=validateInputSelection(_0x3a0c5b);if(_0x964fa7['imageUrl']){const _0xceb2e1=new URLSearchParams({'url':_0x964fa7[_0x364bf8(0x105)],'type':_0x474bef,'appCode':_0x3a0c5b[_0x364bf8(0xf1)]});return{'method':_0x364bf8(0x10b),'url':_0x364bf8(0x112)+_0xceb2e1[_0x364bf8(0xe9)](),'description':'Preview:\x20recognize\x20'+_0x4212e3+_0x364bf8(0x11a)};}const _0x43152d=requireDevelopmentUploadFile(_0x964fa7[_0x364bf8(0x115)],_0x364bf8(0xe7));return{'method':_0x364bf8(0x11d),'url':_0x364bf8(0xfa),'body':{'steps':[{'method':_0x364bf8(0x11d),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x3a0c5b[_0x364bf8(0xf1)],'multipart':{'file':_0x43152d}}},{'method':_0x364bf8(0x11d),'url':_0x364bf8(0x108),'body':{'filePath':_0x364bf8(0xf3),'downloadFlag':![]}},{'method':_0x364bf8(0x10b),'url':_0x364bf8(0x103),'query':{'appCode':_0x3a0c5b['appCode'],'url':_0x364bf8(0x102),'type':_0x474bef}}]},'description':_0x364bf8(0x10d)+_0x4212e3+_0x364bf8(0x10a)};},async 'execute'(_0x44ccdc){const _0x10188b=a147_0x13e33d,_0xd84253=normalizeScene(_0x44ccdc[_0x10188b(0xee)](_0x10188b(0xfb))),_0x239e74=SCENE_TO_LEGACY_TYPE[_0xd84253],_0x3a2701=validateInputSelection(_0x44ccdc);if(_0x3a2701['imageUrl']){const _0x4e0d42=await recognizeDevelopmentOcr(_0x44ccdc[_0x10188b(0xf1)],{'url':_0x3a2701['imageUrl'],'type':_0x239e74});return{'ok':!![],'data':withScene(_0x4e0d42,_0xd84253)};}const _0x36f6bc=requireDevelopmentUploadFile(_0x3a2701['imageFile'],_0x10188b(0xe7)),_0x153178=await uploadDevelopmentFile(_0x44ccdc[_0x10188b(0xf1)],_0x36f6bc[_0x10188b(0xfc)]);if(!_0x153178[_0x10188b(0xff)])throw CliErrors[_0x10188b(0xfe)](_0x10188b(0x11e));const _0x123609=await queryDevelopmentFileUrl(_0x153178[_0x10188b(0xff)],{'download':![]});if(!_0x123609[_0x10188b(0xf5)])throw CliErrors[_0x10188b(0xfe)](_0x10188b(0xe6));const _0x40eb9f=await recognizeDevelopmentOcr(_0x44ccdc[_0x10188b(0xf1)],{'url':_0x123609[_0x10188b(0xf5)],'type':_0x239e74});return{'ok':!![],'data':withScene(_0x40eb9f,_0xd84253,_0x153178)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x310024=a148_0x4cc9;(function(_0x412532,_0x5620cf){const _0x512a60=a148_0x4cc9,_0x5c73ce=_0x412532();while(!![]){try{const _0x255ef2=parseInt(_0x512a60(0x1eb))/0x1+parseInt(_0x512a60(0x1d0))/0x2*(-parseInt(_0x512a60(0x1d1))/0x3)+parseInt(_0x512a60(0x1f0))/0x4+-parseInt(_0x512a60(0x1e3))/0x5+-parseInt(_0x512a60(0x200))/0x6*(-parseInt(_0x512a60(0x1e0))/0x7)+-parseInt(_0x512a60(0x1d5))/0x8+parseInt(_0x512a60(0x20b))/0x9*(-parseInt(_0x512a60(0x1ef))/0xa);if(_0x255ef2===_0x5620cf)break;else _0x5c73ce['push'](_0x5c73ce['shift']());}catch(_0x4e545){_0x5c73ce['push'](_0x5c73ce['shift']());}}}(a148_0x1115,0x8115c));import{APPCODE_FLAG}from'../../commands/common/flags.js';function a148_0x4cc9(_0x9c2f63,_0x1f9f70){_0x9c2f63=_0x9c2f63-0x1d0;const _0x1115d6=a148_0x1115();let _0x4cc94b=_0x1115d6[_0x9c2f63];return _0x4cc94b;}import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';function a148_0x1115(){const _0xf0f116=['213040tjOAGE','18QngOMa','keys','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','CUSTOM','3079120JDIUFq','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','isInteger','version','string','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','createMenu','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','page-type','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','75859UhGyqx','appCode','Would\x20create\x20Custom\x20Page\x20','575075ysHQcy','pagePattern','page-content','length','page','stringify','str','pageName\x20cannot\x20exceed\x20100\x20characters.','943804lnltDB','POST','Custom_page_','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','6123190ajjVeP','2007292cjXlXf','files','pageId','create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','validation','name','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','pageName','parentMenuId','menuPath','menuId','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','langs','page\x20create\x20does\x20not\x20accept\x20--page-type.','462zlxLjF','warnings','parent-menu-id','input','zh-CN','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','now','trim','/smartapi/webcode/page/create','BLANK','page-pattern','9uReanw','\x20and\x20its\x20menu\x20entry.'];a148_0x1115=function(){return _0xf0f116;};return a148_0x1115();}const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a148_0x310024(0x204),'en-US'];export const pageCreate={'service':a148_0x310024(0x1e7),'command':a148_0x310024(0x1f3),'description':a148_0x310024(0x1db),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a148_0x310024(0x1de),'message':a148_0x310024(0x1ff),'hint':a148_0x310024(0x205)}],'flags':[{'name':a148_0x310024(0x1f6),'type':'string','description':a148_0x310024(0x1d6)},{'name':'parent-menu-id','type':'number','description':a148_0x310024(0x1f4)},{'name':'page-pattern','type':a148_0x310024(0x1d9),'description':a148_0x310024(0x1f8),'enum':[a148_0x310024(0x209)]},{'name':a148_0x310024(0x1e5),'type':'string','description':a148_0x310024(0x1da)},APPCODE_FLAG],async 'validate'(_0x442a7d){const _0x82eace=a148_0x310024,_0x276905=readPagePattern(_0x442a7d);await validateCustomPageContent(readInput(_0x442a7d,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x276905)[_0x82eace(0x1f1)]);},async 'dryRun'(_0xfefc92){const _0x1c69e8=a148_0x310024,{input:_0xe36efd}=await prepare(_0xfefc92);return{'method':_0x1c69e8(0x1ec),'url':_0x1c69e8(0x208),'body':{'appCode':_0xe36efd['appCode'],'pageName':_0xe36efd[_0x1c69e8(0x1f9)],..._0xe36efd[_0x1c69e8(0x1fa)]!=null?{'parentMenuId':_0xe36efd[_0x1c69e8(0x1fa)]}:{},'createMenu':_0xe36efd[_0x1c69e8(0x1dc)],'codeContent':_0xe36efd[_0x1c69e8(0x1f1)]},'description':_0x1c69e8(0x1e2)+JSON[_0x1c69e8(0x1e8)](_0xe36efd[_0x1c69e8(0x1f9)])+_0x1c69e8(0x20c)};},async 'execute'(_0x2f68f4){const _0xa45a5b=a148_0x310024,_0x5a0141=await prepare(_0x2f68f4),_0x5cce86=await createCustomPage(_0x5a0141[_0xa45a5b(0x203)]);if(!Number[_0xa45a5b(0x1d7)](_0x5cce86[_0xa45a5b(0x1f2)])||_0x5cce86[_0xa45a5b(0x1f2)]<=0x0)throw CliErrors['apiError'](_0xa45a5b(0x1df));return{'ok':!![],'data':buildMutationData(_0x5a0141,_0x5cce86),'message':'Created\x20Custom\x20Page\x20'+_0x5cce86[_0xa45a5b(0x1f2)]+'.'};}};async function prepare(_0x51f214){const _0x50525e=a148_0x310024,_0x1d38d1=readPagePattern(_0x51f214);if(_0x1d38d1===null)return{'input':readInput(_0x51f214,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1d38d1),'warnings':[],'pagePattern':_0x1d38d1};let _0x1f4143=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1a25d2=[];try{const _0x256020=await getI18nInfo(_0x51f214['appCode']);_0x256020['enableI18n']&&_0x256020[_0x50525e(0x1fe)]?.[_0x50525e(0x1e6)]&&(_0x1f4143=_0x256020[_0x50525e(0x1fe)]);}catch{_0x1a25d2=[_0x50525e(0x1dd)];}return{'input':readInput(_0x51f214,_0x1f4143,_0x1d38d1),'warnings':_0x1a25d2,'pagePattern':_0x1d38d1};}function readPagePattern(_0x138747){const _0x2612ba=a148_0x310024,_0xb825e3=_0x138747[_0x2612ba(0x1e9)](_0x2612ba(0x20a))[_0x2612ba(0x207)](),_0x51e08d=_0x138747[_0x2612ba(0x1e9)](_0x2612ba(0x1e5))[_0x2612ba(0x207)]()[_0x2612ba(0x1e6)]>0x0;if(_0xb825e3&&_0x51e08d)throw CliErrors['validation']('--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.');if(_0x51e08d)return null;if(!_0xb825e3)throw CliErrors[_0x2612ba(0x1f5)](_0x2612ba(0x1ee));if(_0xb825e3!=='BLANK')throw CliErrors[_0x2612ba(0x1f5)](_0x2612ba(0x1fd));return _0xb825e3;}function readInput(_0x575219,_0x1e15f7=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x11ac02=readPagePattern(_0x575219)){const _0x56a2d4=a148_0x310024,_0x362eb7=_0x575219[_0x56a2d4(0x1e9)](_0x56a2d4(0x1f6))['trim']()||_0x56a2d4(0x1ed)+Date[_0x56a2d4(0x206)]();if(_0x362eb7[_0x56a2d4(0x1e6)]>0x64)throw CliErrors[_0x56a2d4(0x1f5)](_0x56a2d4(0x1ea));const _0xc2d013=_0x575219['num'](_0x56a2d4(0x202),NaN),_0x3ce989=!Number['isNaN'](_0xc2d013);if(_0x3ce989&&(!Number[_0x56a2d4(0x1d7)](_0xc2d013)||_0xc2d013<=0x0))throw CliErrors[_0x56a2d4(0x1f5)](_0x56a2d4(0x1d3));return{'appCode':_0x575219[_0x56a2d4(0x1e1)],'pageName':_0x362eb7,..._0x3ce989?{'parentMenuId':_0xc2d013}:{},'createMenu':!![],'files':_0x11ac02===null?parseCustomPageContent(_0x575219['str'](_0x56a2d4(0x1e5))):buildInitialFiles(_0x362eb7,_0x1e15f7)};}function buildMutationData(_0x23bac8,_0x2aa7c2){const _0x2d0c8b=a148_0x310024,{input:_0x3daf12}=_0x23bac8,_0x258d62=_0x2aa7c2&&buildCustomPageDevelopmentUrl(_0x3daf12[_0x2d0c8b(0x1e1)],_0x2aa7c2[_0x2d0c8b(0x1fb)]),_0xf0a78d=_0x2aa7c2&&buildCustomPageEditUrl(_0x3daf12[_0x2d0c8b(0x1e1)],_0x2aa7c2[_0x2d0c8b(0x1f2)]);return{'operation':'page.create','pageType':_0x2d0c8b(0x1d4),'pagePattern':_0x23bac8[_0x2d0c8b(0x1e4)],'selector':{'appCode':_0x3daf12[_0x2d0c8b(0x1e1)],'pageName':_0x3daf12['pageName']},'before':null,'after':{'pageId':_0x2aa7c2?.[_0x2d0c8b(0x1f2)]??null,'pageName':_0x2aa7c2?.[_0x2d0c8b(0x1f9)]??_0x3daf12[_0x2d0c8b(0x1f9)],'appCode':_0x2aa7c2?.[_0x2d0c8b(0x1e1)]??_0x3daf12[_0x2d0c8b(0x1e1)],'version':_0x2aa7c2?.[_0x2d0c8b(0x1d8)]??null,'menuId':_0x2aa7c2?.[_0x2d0c8b(0x1fc)]??null,'menuPath':_0x2aa7c2?.['menuPath']??null,'files':_0x2aa7c2?.['files']??Object[_0x2d0c8b(0x1d2)](_0x3daf12[_0x2d0c8b(0x1f1)])},'dryRun':_0x2aa7c2===undefined,'request':_0x3daf12,..._0x258d62?{'pageUrl':_0x258d62}:{},..._0xf0a78d?{'editPageUrl':_0xf0a78d}:{},'warnings':[..._0x23bac8[_0x2d0c8b(0x201)],..._0x2aa7c2&&!_0x258d62?[_0x2d0c8b(0x1f7)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a149_0x19f5(_0x53f5b9,_0x485c22){_0x53f5b9=_0x53f5b9-0x15a;const _0x4a5c36=a149_0x4a5c();let _0x19f560=_0x4a5c36[_0x53f5b9];return _0x19f560;}function a149_0x4a5c(){const _0x40ccf2=['20CWmOyB','getFullYear','8854952pnZSzV','435VuOyDJ','23492SQLQJQ','498662ucFdzd','761733gideAS','getMinutes','padStart','317872OqdDsz','16880171KrWQEj','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getDate','str','page','getHours','cookie','read','getTime','join','getMonth','appcode','getSeconds','3714672iQkFTt','number','12NQrjpg','trim','custom-detail','9XpOFGT'];a149_0x4a5c=function(){return _0x40ccf2;};return a149_0x4a5c();}const a149_0x12c96a=a149_0x19f5;(function(_0xc10e6,_0x1057d7){const _0x3f313f=a149_0x19f5,_0x470fcc=_0xc10e6();while(!![]){try{const _0x1ba5aa=-parseInt(_0x3f313f(0x16c))/0x1+-parseInt(_0x3f313f(0x170))/0x2*(parseInt(_0x3f313f(0x163))/0x3)+parseInt(_0x3f313f(0x16b))/0x4*(parseInt(_0x3f313f(0x16a))/0x5)+-parseInt(_0x3f313f(0x161))/0x6+-parseInt(_0x3f313f(0x16d))/0x7+parseInt(_0x3f313f(0x169))/0x8*(-parseInt(_0x3f313f(0x166))/0x9)+parseInt(_0x3f313f(0x167))/0xa*(parseInt(_0x3f313f(0x171))/0xb);if(_0x1ba5aa===_0x1057d7)break;else _0x470fcc['push'](_0x470fcc['shift']());}catch(_0x17d7e1){_0x470fcc['push'](_0x470fcc['shift']());}}}(a149_0x4a5c,0x95233));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_0x12c96a(0x175),'command':a149_0x12c96a(0x165),'description':a149_0x12c96a(0x172),'risk':a149_0x12c96a(0x15b),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a149_0x12c96a(0x162),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x46fb4e){readCustomPageId(_0x46fb4e);},async 'execute'(_0x46259b){const _0x11273d=a149_0x12c96a,_0x31e174=readCustomPageId(_0x46259b),_0x2064ae=await getCustomPageSource(_0x31e174),{bundle:_0x4378cf,createTime:_0x3d4541,updateTime:_0x266ec7,..._0x1b3be2}=_0x2064ae,_0x649781=_0x2064ae['id']??_0x31e174,_0x507090=_0x2064ae['appCode']?.['trim']()||_0x46259b[_0x11273d(0x174)](_0x11273d(0x15f))[_0x11273d(0x164)](),_0x503b31=buildCustomPageRuntimeUrl(_0x507090,_0x2064ae['pageCode']),_0x324acc=buildCustomPageEditUrl(_0x507090,_0x649781),_0x59f3bc=await resolveCustomPageDevelopmentUrl(_0x507090,_0x649781,_0x46259b[_0x11273d(0x15a)]);return{'ok':!![],'data':{..._0x1b3be2,..._0x503b31?{'runtimePageUrl':_0x503b31}:{},..._0x59f3bc?{'pageUrl':_0x59f3bc}:{},..._0x324acc?{'editPageUrl':_0x324acc}:{},..._0x3d4541==null?{}:{'createTime':formatTime(_0x3d4541)},..._0x266ec7==null?{}:{'updateTime':formatTime(_0x266ec7)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x31e174+'.'};}};function formatTime(_0x59ef0a){const _0x4d4a5f=a149_0x12c96a,_0x7f12c=new Date(_0x59ef0a);if(Number['isNaN'](_0x7f12c[_0x4d4a5f(0x15c)]()))return String(_0x59ef0a);const _0x55bf01=[_0x7f12c[_0x4d4a5f(0x168)](),String(_0x7f12c[_0x4d4a5f(0x15e)]()+0x1)[_0x4d4a5f(0x16f)](0x2,'0'),String(_0x7f12c[_0x4d4a5f(0x173)]())[_0x4d4a5f(0x16f)](0x2,'0')][_0x4d4a5f(0x15d)]('-'),_0x405f84=[String(_0x7f12c[_0x4d4a5f(0x176)]())[_0x4d4a5f(0x16f)](0x2,'0'),String(_0x7f12c[_0x4d4a5f(0x16e)]())[_0x4d4a5f(0x16f)](0x2,'0'),String(_0x7f12c[_0x4d4a5f(0x160)]())['padStart'](0x2,'0')][_0x4d4a5f(0x15d)](':');return _0x55bf01+'\x20'+_0x405f84;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x26b25d=a150_0x3b90;(function(_0x3d48d6,_0x3c67aa){const _0x33282d=a150_0x3b90,_0x301e62=_0x3d48d6();while(!![]){try{const _0x3da0b6=parseInt(_0x33282d(0x16c))/0x1+parseInt(_0x33282d(0x17c))/0x2+parseInt(_0x33282d(0x16f))/0x3*(-parseInt(_0x33282d(0x17e))/0x4)+parseInt(_0x33282d(0x17d))/0x5+parseInt(_0x33282d(0x16e))/0x6*(parseInt(_0x33282d(0x16d))/0x7)+-parseInt(_0x33282d(0x174))/0x8+parseInt(_0x33282d(0x16a))/0x9*(parseInt(_0x33282d(0x16b))/0xa);if(_0x3da0b6===_0x3c67aa)break;else _0x301e62['push'](_0x301e62['shift']());}catch(_0x20a314){_0x301e62['push'](_0x301e62['shift']());}}}(a150_0x231f,0x8b610));function a150_0x231f(){const _0x2cf5bb=['page','\x20Custom\x20Page(s).','appCode','cookie','react','1132260MpQnIL','2097245puUMtS','1856252JiXsPo','read','16245WSYkdc','70wVTvqO','861763NCzFll','1263731IMkzGI','6Lrnmrc','3isMkYz','No\x20Custom\x20Pages\x20found.','type','flatMap','pageId','8044408nJkPei','compress','length'];a150_0x231f=function(){return _0x2cf5bb;};return a150_0x231f();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a150_0x3b90(_0x4f4c15,_0x448483){_0x4f4c15=_0x4f4c15-0x169;const _0x231f49=a150_0x231f();let _0x3b9079=_0x231f49[_0x4f4c15];return _0x3b9079;}export const pageCustomList={'service':a150_0x26b25d(0x177),'command':'custom-list','description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a150_0x26b25d(0x169),'defaultOutputFormat':a150_0x26b25d(0x175),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2bbc11){const _0x50e4e9=a150_0x26b25d,_0x59f861=(await fetchMenuSnapshot(_0x2bbc11[_0x50e4e9(0x179)],_0x2bbc11[_0x50e4e9(0x17a)]))['menus'][_0x50e4e9(0x172)](_0xe38d1c=>{const _0x180975=_0x50e4e9;if(_0xe38d1c[_0x180975(0x171)]!==_0x180975(0x17b)||_0xe38d1c['pageId']==null)return[];const _0x652795=buildCustomPageDevelopmentUrl(_0x2bbc11[_0x180975(0x179)],_0xe38d1c['path']),_0x182a88=buildCustomPageEditUrl(_0x2bbc11['appCode'],_0xe38d1c[_0x180975(0x173)]);return[{'pageId':_0xe38d1c[_0x180975(0x173)],'label':_0xe38d1c['label'],..._0x652795?{'pageUrl':_0x652795}:{},..._0x182a88?{'editPageUrl':_0x182a88}:{}}];});return{'ok':!![],'data':{'pages':_0x59f861},'message':_0x59f861['length']===0x0?_0x50e4e9(0x170):'Found\x20'+_0x59f861[_0x50e4e9(0x176)]+_0x50e4e9(0x178)};}};
|