@lovrabet/rabetbase-cli 2.3.16-beta.7 → 2.4.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/README.md +4 -10
- 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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.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-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/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.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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/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/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/react/create.d.ts +2 -0
- package/lib/commands/page/react/create.js +1 -0
- package/lib/commands/page/react/detail.d.ts +2 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.d.ts +2 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.d.ts +2 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.d.ts +78 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.d.ts +18 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.d.ts +8 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.d.ts +2 -0
- package/lib/commands/page/react/update.js +1 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +1 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.d.ts +2 -0
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -0
- package/lib/commands/user-account/index.d.ts +2 -0
- package/lib/commands/user-account/index.js +1 -0
- 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/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/risk.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 +117 -0
- 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/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.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.d.ts +3 -0
- package/lib/postinstall.js +1 -0
- 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.d.ts +37 -0
- package/lib/skills/builtin-skill.js +1 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +4 -2
- 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/copy-directory.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/rules-cdn.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 +9 -3
- package/scripts/postinstall.mjs +24 -0
- package/skills/rabetbase/SKILL.md +493 -0
- package/skills/rabetbase/guides/backend-function.md +835 -0
- package/skills/rabetbase/guides/best-practices.md +137 -0
- package/skills/rabetbase/guides/bff-creation-workflow.md +148 -0
- package/skills/rabetbase/guides/conflict-detection.md +119 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +414 -0
- package/skills/rabetbase/guides/database-connection-workflow.md +169 -0
- package/skills/rabetbase/guides/frontend-development.md +179 -0
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +495 -0
- package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +137 -0
- package/skills/rabetbase/guides/page-development-workflow.md +187 -0
- package/skills/rabetbase/guides/react-custom-page-workflow.md +184 -0
- package/skills/rabetbase/guides/role-permit-workflow.md +127 -0
- package/skills/rabetbase/guides/sql-creation-workflow.md +173 -0
- package/skills/rabetbase/guides/sql-mybatis.md +126 -0
- package/skills/rabetbase/guides/troubleshooting.md +67 -0
- package/skills/rabetbase/guides/typescript-sdk.md +227 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartCreate.md +367 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartDetail.md +153 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +291 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartFilter.md +478 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +119 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +223 -0
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +632 -0
- package/skills/rabetbase/knowledge/page-schema/YtPage.md +172 -0
- package/skills/rabetbase/knowledge/page-schema/dataset-relations.md +126 -0
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +232 -0
- package/skills/rabetbase/knowledge/page-schema/field-components.md +312 -0
- package/skills/rabetbase/knowledge/page-schema/syntax-reference.md +278 -0
- package/skills/rabetbase/knowledge/react-page/components.md +225 -0
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +385 -0
- package/skills/rabetbase/references/rabetbase-api-list.md +58 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +82 -0
- package/skills/rabetbase/references/rabetbase-app-config.md +95 -0
- package/skills/rabetbase/references/rabetbase-app-list.md +79 -0
- package/skills/rabetbase/references/rabetbase-app-members-list.md +64 -0
- package/skills/rabetbase/references/rabetbase-auth-login.md +53 -0
- package/skills/rabetbase/references/rabetbase-auth-logout.md +29 -0
- package/skills/rabetbase/references/rabetbase-bff-create.md +59 -0
- package/skills/rabetbase/references/rabetbase-bff-delete.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +38 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +61 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +42 -0
- package/skills/rabetbase/references/rabetbase-bff-push.md +65 -0
- package/skills/rabetbase/references/rabetbase-bff-save.md +63 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +37 -0
- package/skills/rabetbase/references/rabetbase-cli-skill-install.md +42 -0
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +35 -0
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +33 -0
- package/skills/rabetbase/references/rabetbase-config.md +296 -0
- package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +84 -0
- package/skills/rabetbase/references/rabetbase-dataset-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +106 -0
- package/skills/rabetbase/references/rabetbase-dataset-extend-update.md +70 -0
- package/skills/rabetbase/references/rabetbase-dataset-field-update.md +117 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +206 -0
- package/skills/rabetbase/references/rabetbase-dataset-list.md +42 -0
- package/skills/rabetbase/references/rabetbase-dataset-operations.md +34 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-audit.md +63 -0
- package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +141 -0
- package/skills/rabetbase/references/rabetbase-dataset-relations.md +71 -0
- package/skills/rabetbase/references/rabetbase-dataset-rename.md +107 -0
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +135 -0
- package/skills/rabetbase/references/rabetbase-db-create.md +54 -0
- package/skills/rabetbase/references/rabetbase-db-delete.md +26 -0
- package/skills/rabetbase/references/rabetbase-db-detail.md +27 -0
- package/skills/rabetbase/references/rabetbase-db-diff.md +57 -0
- package/skills/rabetbase/references/rabetbase-db-list.md +37 -0
- package/skills/rabetbase/references/rabetbase-db-tables.md +25 -0
- package/skills/rabetbase/references/rabetbase-db-test.md +29 -0
- package/skills/rabetbase/references/rabetbase-db-update.md +29 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +62 -0
- package/skills/rabetbase/references/rabetbase-file.md +35 -0
- package/skills/rabetbase/references/rabetbase-init.md +70 -0
- package/skills/rabetbase/references/rabetbase-issue-report.md +132 -0
- package/skills/rabetbase/references/rabetbase-kb.md +62 -0
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +135 -0
- package/skills/rabetbase/references/rabetbase-menu-delete.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-create.md +63 -0
- package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +74 -0
- package/skills/rabetbase/references/rabetbase-menu-group-create.md +33 -0
- package/skills/rabetbase/references/rabetbase-menu-group-update.md +38 -0
- package/skills/rabetbase/references/rabetbase-menu-list.md +144 -0
- package/skills/rabetbase/references/rabetbase-menu-move.md +54 -0
- package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +45 -0
- package/skills/rabetbase/references/rabetbase-menu-rename.md +48 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +60 -0
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +80 -0
- package/skills/rabetbase/references/rabetbase-ocr.md +86 -0
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +32 -0
- package/skills/rabetbase/references/rabetbase-page-pull.md +47 -0
- package/skills/rabetbase/references/rabetbase-page-push.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-react-create.md +29 -0
- package/skills/rabetbase/references/rabetbase-page-react-detail.md +26 -0
- package/skills/rabetbase/references/rabetbase-page-react-list.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-publish.md +23 -0
- package/skills/rabetbase/references/rabetbase-page-react-update.md +24 -0
- package/skills/rabetbase/references/rabetbase-page-relation-binding.md +72 -0
- package/skills/rabetbase/references/rabetbase-page-restore.md +45 -0
- package/skills/rabetbase/references/rabetbase-page-sync.md +36 -0
- package/skills/rabetbase/references/rabetbase-permit-page-set.md +69 -0
- package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +53 -0
- package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +57 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +46 -0
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +57 -0
- package/skills/rabetbase/references/rabetbase-role-list.md +68 -0
- package/skills/rabetbase/references/rabetbase-role-user-add.md +54 -0
- package/skills/rabetbase/references/rabetbase-role-user-resolve.md +27 -0
- package/skills/rabetbase/references/rabetbase-run.md +53 -0
- package/skills/rabetbase/references/rabetbase-schema.md +22 -0
- package/skills/rabetbase/references/rabetbase-sql-create.md +41 -0
- package/skills/rabetbase/references/rabetbase-sql-delete.md +37 -0
- package/skills/rabetbase/references/rabetbase-sql-detail.md +32 -0
- package/skills/rabetbase/references/rabetbase-sql-exec.md +34 -0
- package/skills/rabetbase/references/rabetbase-sql-list.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-pull.md +54 -0
- package/skills/rabetbase/references/rabetbase-sql-push.md +46 -0
- package/skills/rabetbase/references/rabetbase-sql-status.md +39 -0
- package/skills/rabetbase/references/rabetbase-sql-validate.md +73 -0
- package/skills/rabetbase/references/rabetbase-standard-page-status.md +31 -0
- package/skills/rabetbase/references/rabetbase-task-status.md +40 -0
- package/skills/rabetbase/references/rabetbase-tenant-members-list.md +69 -0
- package/skills/rabetbase/references/rabetbase-update.md +56 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +45 -0
- package/skills/rabetbase/references/rabetbase-workspace.md +60 -0
- package/skills/rabetbase.manifest.json +137 -0
package/lib/core/api-client.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export declare function recognizeDevelopmentOcr(appCode: string, input: {
|
|
|
54
54
|
url: string;
|
|
55
55
|
type: string;
|
|
56
56
|
}): Promise<DevelopmentOcrResponse>;
|
|
57
|
+
export declare const DING_TALK_SANDBOX_BIND_PATH = "/smartapi/user-accounts/cli/dingding-sandbox/bind";
|
|
58
|
+
export declare function bindDingTalkSandboxAccount(dingTalkUserId: string): Promise<boolean>;
|
|
57
59
|
export interface PlatformFetchOptions {
|
|
58
60
|
method?: "GET" | "POST";
|
|
59
61
|
body?: Record<string, any>;
|
|
@@ -405,6 +407,7 @@ export interface TextGeneratedDatasetPreviewInput {
|
|
|
405
407
|
}
|
|
406
408
|
export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
|
|
407
409
|
export interface TextGeneratedDatasetJobStartResult {
|
|
410
|
+
taskId?: string;
|
|
408
411
|
operationId?: string;
|
|
409
412
|
clientOperationId?: string;
|
|
410
413
|
status?: string;
|
|
@@ -416,6 +419,7 @@ export interface TextGeneratedDatasetJobStartResult {
|
|
|
416
419
|
[key: string]: any;
|
|
417
420
|
}
|
|
418
421
|
export interface TextGeneratedDatasetJobStatus {
|
|
422
|
+
taskId?: string;
|
|
419
423
|
operationId?: string;
|
|
420
424
|
clientOperationId?: string;
|
|
421
425
|
status?: string;
|
|
@@ -430,6 +434,7 @@ export declare function startTextGeneratedDataset(appCode: string, design: Recor
|
|
|
430
434
|
clientOperationId?: string;
|
|
431
435
|
}): Promise<TextGeneratedDatasetJobStartResult>;
|
|
432
436
|
export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
|
|
437
|
+
taskId?: string;
|
|
433
438
|
operationId?: string;
|
|
434
439
|
clientOperationId?: string;
|
|
435
440
|
}): Promise<TextGeneratedDatasetJobStatus>;
|
|
@@ -481,6 +486,7 @@ export interface GenerateStandardPagesResult {
|
|
|
481
486
|
[key: string]: any;
|
|
482
487
|
}
|
|
483
488
|
export interface StandardPageGenerateJobStartResult {
|
|
489
|
+
taskId?: string;
|
|
484
490
|
operationId?: string;
|
|
485
491
|
status?: string;
|
|
486
492
|
progressRate?: number | null;
|
|
@@ -507,6 +513,7 @@ export interface StandardPageGenerateResultSummary {
|
|
|
507
513
|
[key: string]: any;
|
|
508
514
|
}
|
|
509
515
|
export interface StandardPageGenerateJobStatus {
|
|
516
|
+
taskId?: string;
|
|
510
517
|
operationId?: string;
|
|
511
518
|
status?: string;
|
|
512
519
|
progressRate?: number | null;
|
|
@@ -581,6 +588,115 @@ export interface PageDetail {
|
|
|
581
588
|
relatedPageInfoList?: RelatedPageInfo[];
|
|
582
589
|
[key: string]: any;
|
|
583
590
|
}
|
|
591
|
+
export interface ReactPageCreateRequest {
|
|
592
|
+
appCode: string;
|
|
593
|
+
pageName: string;
|
|
594
|
+
parentMenuId?: number;
|
|
595
|
+
createMenu: true;
|
|
596
|
+
files: Record<string, string>;
|
|
597
|
+
}
|
|
598
|
+
export interface ReactPageCreateResponse {
|
|
599
|
+
pageId: number;
|
|
600
|
+
pageName: string;
|
|
601
|
+
appCode: string;
|
|
602
|
+
version: number;
|
|
603
|
+
menuId?: number | null;
|
|
604
|
+
menuPath?: string | null;
|
|
605
|
+
files?: string[];
|
|
606
|
+
}
|
|
607
|
+
export interface ReactPageUpdateRequest {
|
|
608
|
+
pageId: number;
|
|
609
|
+
pageContent: Record<string, string>;
|
|
610
|
+
}
|
|
611
|
+
export interface ReactPageUpdateResponse {
|
|
612
|
+
pageId: number;
|
|
613
|
+
newVersion: number;
|
|
614
|
+
}
|
|
615
|
+
export interface ReactPagePublishRequest {
|
|
616
|
+
pageId: number;
|
|
617
|
+
remark?: string;
|
|
618
|
+
}
|
|
619
|
+
export interface AppI18nInfo {
|
|
620
|
+
enableI18n?: boolean;
|
|
621
|
+
langs?: string[];
|
|
622
|
+
}
|
|
623
|
+
export interface AppInfo {
|
|
624
|
+
appCode: string;
|
|
625
|
+
appDomain?: string;
|
|
626
|
+
appName?: string;
|
|
627
|
+
appDesc?: string;
|
|
628
|
+
enableI18n?: boolean;
|
|
629
|
+
i18nInfo?: AppI18nInfo;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* 获取应用信息
|
|
633
|
+
*
|
|
634
|
+
* @param appCode 目标应用 code
|
|
635
|
+
* @returns 应用详情
|
|
636
|
+
*/
|
|
637
|
+
export declare function getAppInfo(appCode: string): Promise<AppInfo>;
|
|
638
|
+
/**
|
|
639
|
+
* 获取应用国际化配置
|
|
640
|
+
*
|
|
641
|
+
* @param appCode 目标应用 code
|
|
642
|
+
* @returns 应用国际化开关和语言列表
|
|
643
|
+
*/
|
|
644
|
+
export declare function getI18nInfo(appCode: string): Promise<AppI18nInfo>;
|
|
645
|
+
/**
|
|
646
|
+
* 创建 React 自定义页面
|
|
647
|
+
*
|
|
648
|
+
* 服务端根据请求同时创建页面、初始文件和菜单入口
|
|
649
|
+
*
|
|
650
|
+
* @param input 已生成初始文件的页面创建请求
|
|
651
|
+
* @returns 服务端返回的页面、菜单和文件信息
|
|
652
|
+
*/
|
|
653
|
+
export declare function createReactPage(input: ReactPageCreateRequest): Promise<ReactPageCreateResponse>;
|
|
654
|
+
/**
|
|
655
|
+
* 保存 React 自定义页面的完整文件内容
|
|
656
|
+
*
|
|
657
|
+
* 通过更新内容接口提交页面 ID 和完整文件内容
|
|
658
|
+
* 服务端成功保存后返回新草稿版本号
|
|
659
|
+
*
|
|
660
|
+
* @param input 需要保存的页面标识和完整页面文件内容
|
|
661
|
+
* @returns 服务端返回的页面标识和新草稿版本号
|
|
662
|
+
* @throws 服务端保存页面内容失败时抛出 API 错误
|
|
663
|
+
*/
|
|
664
|
+
export declare function updateReactPageContent(input: ReactPageUpdateRequest): Promise<ReactPageUpdateResponse>;
|
|
665
|
+
/**
|
|
666
|
+
* 发布 React 自定义页面
|
|
667
|
+
*
|
|
668
|
+
* 将当前草稿版本发布为正式版本
|
|
669
|
+
*
|
|
670
|
+
* @param input 要发布的页面 ID 和可选发布备注
|
|
671
|
+
* @returns 服务端确认发布的页面 ID
|
|
672
|
+
*/
|
|
673
|
+
export declare function publishReactPage(input: ReactPagePublishRequest): Promise<number>;
|
|
674
|
+
export interface ReactPageSource {
|
|
675
|
+
id?: number;
|
|
676
|
+
appCode?: string;
|
|
677
|
+
pageCode?: string;
|
|
678
|
+
bundle?: unknown;
|
|
679
|
+
materialName?: string;
|
|
680
|
+
draftVersion?: number;
|
|
681
|
+
formalVersion?: number;
|
|
682
|
+
status?: string;
|
|
683
|
+
codeContent?: Record<string, string>;
|
|
684
|
+
createTime?: string | number;
|
|
685
|
+
createUserName?: string;
|
|
686
|
+
updateTime?: string | number;
|
|
687
|
+
updateUserName?: string;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* 按页面 ID 读取 React 自定义页面原始详情
|
|
691
|
+
*
|
|
692
|
+
* 页面详情接口同时返回元数据和完整文件映射
|
|
693
|
+
* 由页面命令按需投影为详情、内容或所属应用信息
|
|
694
|
+
*
|
|
695
|
+
* @param pageId React 自定义页面 ID
|
|
696
|
+
* @returns 服务端返回的页面详情
|
|
697
|
+
* @throws 页面不存在时抛出校验错误
|
|
698
|
+
*/
|
|
699
|
+
export declare function getReactPageSource(pageId: number): Promise<ReactPageSource>;
|
|
584
700
|
export type DeletedPageType = "STANDARD" | "JSX";
|
|
585
701
|
export interface DeletedPageItem {
|
|
586
702
|
pageType: DeletedPageType;
|
|
@@ -607,6 +723,7 @@ export declare function startGenerateStandardPages(appCode: string, datasetCode:
|
|
|
607
723
|
clientOperationId?: string;
|
|
608
724
|
}): Promise<StandardPageGenerateJobStartResult>;
|
|
609
725
|
export declare function getGenerateStandardPagesStatus(appCode: string, datasetCode: string, options: {
|
|
726
|
+
taskId?: string;
|
|
610
727
|
operationId?: string;
|
|
611
728
|
clientOperationId?: string;
|
|
612
729
|
}): Promise<StandardPageGenerateJobStatus>;
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a208_0x5df3b4=a208_0x3afd;(function(_0x146dfb,_0x42446d){const _0x5b052c=a208_0x3afd,_0x58da27=_0x146dfb();while(!![]){try{const _0x5befec=parseInt(_0x5b052c(0x100))/0x1+parseInt(_0x5b052c(0x1cf))/0x2*(-parseInt(_0x5b052c(0x1cc))/0x3)+-parseInt(_0x5b052c(0x1da))/0x4*(-parseInt(_0x5b052c(0x126))/0x5)+parseInt(_0x5b052c(0x1e6))/0x6*(parseInt(_0x5b052c(0xe6))/0x7)+parseInt(_0x5b052c(0x163))/0x8*(parseInt(_0x5b052c(0x13b))/0x9)+-parseInt(_0x5b052c(0x1c0))/0xa+parseInt(_0x5b052c(0x17e))/0xb*(-parseInt(_0x5b052c(0x145))/0xc);if(_0x5befec===_0x42446d)break;else _0x58da27['push'](_0x58da27['shift']());}catch(_0x2b8eaa){_0x58da27['push'](_0x58da27['shift']());}}}(a208_0xa36d,0xaccdd));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x32f4ef){_activeCookie=_0x32f4ef||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x57e40,PLATFORM_TRANSPORT_FAILURE=Symbol('platform-transport-failure'),PLATFORM_ERROR_CODE=Symbol(a208_0x5df3b4(0xe9));export function isPlatformTransportFailure(_0x3603d1){const _0x185afc=a208_0x5df3b4;return Boolean(_0x3603d1&&typeof _0x3603d1===_0x185afc(0x104)&&_0x3603d1[PLATFORM_TRANSPORT_FAILURE]===!![]);}export function getPlatformErrorCode(_0x19751f){const _0x38f657=a208_0x5df3b4;if(!_0x19751f||typeof _0x19751f!=='object')return undefined;const _0x628acf=_0x19751f[PLATFORM_ERROR_CODE];return typeof _0x628acf===_0x38f657(0x142)&&_0x628acf?_0x628acf:undefined;}function createPlatformApiError(_0x3a44a8,_0x371ba2){const _0x3788b9=a208_0x5df3b4,_0x568ed5=typeof _0x371ba2===_0x3788b9(0x142)?_0x371ba2[_0x3788b9(0x18d)]():typeof _0x371ba2==='number'?String(_0x371ba2):'',_0x501ce1=CliErrors[_0x3788b9(0x1b6)](_0x3a44a8,_0x568ed5?'API\x20error\x20code:\x20'+_0x568ed5:undefined);return _0x568ed5&&(Object[_0x3788b9(0x197)](_0x501ce1,PLATFORM_ERROR_CODE,{'value':_0x568ed5}),Object[_0x3788b9(0x197)](_0x501ce1,'data',{'value':{'remoteErrorCode':_0x568ed5},'enumerable':![]})),_0x501ce1;}function createFetchFailureError(_0x16dd8b,_0x4de928){const _0x295d99=a208_0x5df3b4,_0x5e0955=_0x4de928 instanceof Error?_0x4de928[_0x295d99(0x181)]:String(_0x4de928),_0x1bf484=CliErrors[_0x295d99(0x1b6)](_0x295d99(0x10c)+_0x16dd8b+(_0x5e0955?'\x20('+_0x5e0955+')':''),_0x295d99(0x18f));return Object[_0x295d99(0x197)](_0x1bf484,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x1bf484;}function createIndeterminateResponseError(_0x134d23){const _0x5c092a=a208_0x5df3b4,_0x52080e=CliErrors[_0x5c092a(0x1b6)](_0x134d23+_0x5c092a(0xea),_0x5c092a(0x102));return Object[_0x5c092a(0x197)](_0x52080e,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x52080e;}async function apiRequest(_0xf68570,_0x384106={}){const _0x5014d2=a208_0x5df3b4,{method:method='GET',body:_0x310913,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x384106,_0x3ca593=useRuntime?getRuntimeDomain():getApiDomain(),_0x4dfbe2=_activeCookie||getCookie(),_0x26d1bd=''+_0x3ca593+_0xf68570,_0x8d39ff=new AbortController(),_0x2f0296=setTimeout(()=>_0x8d39ff[_0x5014d2(0x137)](),timeout);try{const _0x27b222=await fetch(_0x26d1bd,{'method':method,'headers':{'Content-Type':_0x5014d2(0x1c7),'Cookie':_0x4dfbe2,'X-Invoke-Source':_0x5014d2(0x1e3),...headers},'body':_0x310913?JSON['stringify'](_0x310913):undefined,'signal':_0x8d39ff[_0x5014d2(0x117)]});let _0x168f98;try{_0x168f98=await _0x27b222[_0x5014d2(0x116)]();}catch(_0x49a44a){if(_0x49a44a instanceof Error&&_0x49a44a['name']==='AbortError')throw CliErrors[_0x5014d2(0x1b6)](_0x5014d2(0x1bb)+_0x26d1bd);if(_0x27b222['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors['apiError'](_0x5014d2(0x17d)+_0x27b222[_0x5014d2(0x10f)]+')',_0x27b222[_0x5014d2(0x10f)]>=0x190?_0x5014d2(0x14c):undefined);}if(!_0x27b222['ok']||_0x168f98['success']===![])throw CliErrors['apiError'](_0x168f98[_0x5014d2(0x1e2)]||_0x168f98['message']||_0x5014d2(0x105)+_0x27b222[_0x5014d2(0x10f)],_0x168f98[_0x5014d2(0x191)]?_0x5014d2(0x1a3)+_0x168f98[_0x5014d2(0x191)]:undefined);return _0x168f98;}catch(_0x3abf0c){if(_0x3abf0c instanceof CliError)throw _0x3abf0c;if(_0x3abf0c instanceof Error&&_0x3abf0c[_0x5014d2(0x1db)]===_0x5014d2(0x11c))throw CliErrors[_0x5014d2(0x1b6)]('Request\x20timeout:\x20'+_0x26d1bd);throw createFetchFailureError(_0x26d1bd,_0x3abf0c);}finally{clearTimeout(_0x2f0296);}}async function apiFormRequest(_0x5a669b,_0x3d5a14,_0x234209={}){const _0x393372=a208_0x5df3b4,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x234209,_0x204b4a=_activeCookie||getCookie(),_0x26085b=''+getApiDomain()+_0x5a669b,_0xfa2eed=new AbortController(),_0x227d32=setTimeout(()=>_0xfa2eed[_0x393372(0x137)](),timeout);try{const _0xfc22fa=await fetch(_0x26085b,{'method':_0x393372(0x1c9),'headers':{'Cookie':_0x204b4a,'X-Invoke-Source':'cli:rabetbase'},'body':_0x3d5a14,'signal':_0xfa2eed[_0x393372(0x117)]});let _0x5e04d0;try{_0x5e04d0=await _0xfc22fa[_0x393372(0x116)]();}catch(_0x5ae811){if(_0x5ae811 instanceof Error&&_0x5ae811[_0x393372(0x1db)]==='AbortError')throw CliErrors[_0x393372(0x1b6)](_0x393372(0x1bb)+_0x26085b);throw CliErrors['apiError'](_0x393372(0x17d)+_0xfc22fa[_0x393372(0x10f)]+')',_0xfc22fa[_0x393372(0x10f)]>=0x190?_0x393372(0x14c):undefined);}if(!_0xfc22fa['ok']||_0x5e04d0['success']===![])throw CliErrors['apiError'](_0x5e04d0[_0x393372(0x1e2)]||_0x5e04d0['message']||_0x393372(0x105)+_0xfc22fa[_0x393372(0x10f)],_0x5e04d0[_0x393372(0x191)]?'API\x20error\x20code:\x20'+_0x5e04d0[_0x393372(0x191)]:undefined);return _0x5e04d0;}catch(_0x40f13c){if(_0x40f13c instanceof CliError)throw _0x40f13c;if(_0x40f13c instanceof Error&&_0x40f13c[_0x393372(0x1db)]==='AbortError')throw CliErrors[_0x393372(0x1b6)](_0x393372(0x1bb)+_0x26085b);throw createFetchFailureError(_0x26085b,_0x40f13c);}finally{clearTimeout(_0x227d32);}}function a208_0xa36d(){const _0x1b145e=['/generate-standard-pages/status?','pageSize','/smartapi/permit/role/delete','/smartapi/page/getDeletedPageList?','target','Operation\x20\x22','getOne','modelId','add','validation','1373306JkGMzP','/api/management/library/scripts/info?id=','The\x20server\x20outcome\x20is\x20indeterminate.\x20Verify\x20current\x20state\x20before\x20retrying\x20any\x20mutation.','/userTenant/queryBelongsTenants','object','API\x20error:\x20','markdown','/smartapi/dblink/getOne','/smartapi/dataset/delete-dataset','permits','/standard-page-status?appCode=','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20','Request\x20failed:\x20','Delete\x20enterprise\x20knowledge\x20base','array','status','/smartapi/question/er-config/cli/delete-single','file','startsWith','/smartapi/permit/role/create','List\x20enterprise\x20knowledge\x20bases\x20returned\x20an\x20invalid\x20response\x20contract.','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','json','signal','/smartapi/custom/updateUserCustomSql','pageIndex','warn','needPublic','AbortError','operations','Fetch\x20doc\x20(','toLowerCase','const\x20result\x20=\x20await\x20client.models.','/smartapi/dblink/delete','totalCount','/api/management/library/scripts/list?appCode=','toString','company','2735AihlwD','code','/generate-standard-pages/start','sqlName','/smartapi/custom/getUserCustomSql','Fetch\x20datasets','scriptType','email','/smartapi/menu/delete','/smartapi/dataset/text-generate/preview','Fetch\x20async\x20task\x20','/smartapi/db-analysis/jobs/cancel','/smartapi/app-config/create','success','/smartapi/page/restore','/smartapi/dataset/get-dataset-operation','replace','abort','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','needSelf','url','4030614yAMtjr','stringify','tableData','/smartapi/custom/saveUserCustomSql','/api/','/api/custom/executeSql','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','string','value','const\x20data\x20=\x20await\x20client.sql.execute({','12yNPfvH','\x20\x20sqlCode:\x20\x27','username','functionName','operationId','/smartapi/menu/find?','/smartapi/dblink/getList','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','401','sdk','tableList','entries','api_error','\x20\x20});','/smartapi/lovrabet/detail?pageId=','label','Knowledge-base\x20API\x20returned\x20an\x20invalid\x20record\x20contract.','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/app-config/getByKey','summary','/smartapi/lovrabet/update-page','push','/smartapi/ocr/recognize-text?','scriptName','/admin/knowledge-base/get-list','Knowledge-base\x20response\x20is\x20missing\x20a\x20valid\x20','\x20\x20pageSize:\x2020,','/smartapi/lovrabet/dataset/','Fetch\x20menu\x20list','Dataset\x20not\x20found:\x20','24mFuNzS','?sqlCode=','/smartapi/dataset/text-generate/status?','join','modelCode','});','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20scope.','\x22\x20not\x20found\x20in\x20dataset\x20','mobile','isArray','filter','/smartapi/dataset/get-driven-data?','description','table','DATA_NOT_EXIST','tags','/notification/channel-config/list','deleted','physicalTableCount','\x20\x20where:\x20{},','number','avatar','/smartapi/permit/resource/get-menu-list','/smartapi/permit/role/update','isInteger','method','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','15597065zWtDOG','Knowledge-base\x20pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20','//\x20SQL:\x20','message','Page\x20not\x20found:\x20','ER\x20relation\x20does\x20not\x20exist','updateTime','key','/smartapi/permit/page/get-one','&type=','list','remove','requirementDescription','/smartapi/common/uploadFile','/smartapi/menu/batchDelete','trim','List\x20enterprise\x20knowledge\x20bases','Check\x20network\x20connectivity\x20and\x20try\x20again.','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','errorCode','scope','fetch-model-list','Warning:\x20showing\x20first\x20','currentPage','max','defineProperty','datasetTableCount','dataset_','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','createTime','/admin/knowledge-base/delete','datasetName','has','isSafeInteger','/smartapi/dblink/update','Invalid\x20response\x20format\x20(','/api/management/library/scripts/save','API\x20error\x20code:\x20','/smartapi/tasks/','delete','Create\x20enterprise\x20knowledge\x20base','cookie','set','(/*\x20params\x20*/);','version','\x20\x20\x20\x20sqlCode:\x20\x27',':\x20invalid\x20JSON\x20response\x20envelope','CUSTOM','/admin/knowledge-base/get-one','operationName','data','/smartapi/permit/page/save','requestFields','type','/smartapi/dataset/text-generate/start','\x20of\x20','apiError','/smartapi/permit/user-role/get-user-list','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','/api/management/library/scripts/delete','dbId','Request\x20timeout:\x20','/smartapi/question/er-config',',\x20HTTP\x20','content','find','10927550SSBliy','/userTenant/getByTenantCode','tableName','title','//\x20','Get\x20enterprise\x20knowledge\x20base','.remove(id);','application/json','relation','POST','UNAUTHORIZED','.getOne(id);','9CwzZMz','/smartapi/question/er-config/business-group/edit','sqlCode','664786SoZdbB','):\x20missing\x20data.markdown\x20field','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','personal','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','includeImports','hint','NaN','\x20failed','path','.create({\x20/*\x20fields\x20*/\x20});','8788OtLsRt','name','roleType','/api/node-toolbox/api-doc-generator','map','roleName','test','includes','errorMsg','cli:rabetbase','/smartapi/db-analysis/start','body','18DaOrww','GET','/smartapi/question/er-config/cli/erCreate','/smartapi/custom/deleteUserCustomSql','length','clientOperationId','userTenantRelationList','693119LNleSk','/smartapi/question/er-config/cli/detail?','userId','platform-error-code','\x20returned\x20an\x20invalid\x20JSON\x20response\x20envelope\x20after\x20HTTP\x20success.','min','nickname','append','/smartapi/dblink/create','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','isFinite','info','SQL\x20query\x20not\x20found:\x20id=','remark','appCode','/smartapi/question/er-config/cli/update-single'];a208_0xa36d=function(){return _0x1b145e;};return a208_0xa36d();}export async function uploadDevelopmentFile(_0x6b9c83,_0x3552b4){const _0x39b78a=a208_0x5df3b4,_0x2b0cdf=await readFile(_0x3552b4),_0x368b81=new FormData();_0x368b81[_0x39b78a(0xed)](_0x39b78a(0xf4),_0x6b9c83),_0x368b81[_0x39b78a(0xed)](_0x39b78a(0x111),new Blob([new Uint8Array(_0x2b0cdf)]),basename(_0x3552b4));const _0x3d002c=await apiFormRequest(_0x39b78a(0x18b),_0x368b81);return _0x3d002c['data'];}export async function queryDevelopmentFileUrl(_0x515f73,_0x3553d5={}){const _0x411969=a208_0x5df3b4,_0x354bc0=await apiRequest('/smartapi/common/queryFileUrl',{'method':'POST','body':{'filePath':_0x515f73,'downloadFlag':_0x3553d5['download']??![],..._0x3553d5['longTerm']?{'longTerm':!![]}:{}}});return _0x354bc0[_0x411969(0x1b0)];}export async function recognizeDevelopmentOcr(_0x1aba89,_0x9836e6){const _0x405017=a208_0x5df3b4,_0x3e87d7=new URLSearchParams({'url':_0x9836e6[_0x405017(0x13a)],'type':_0x9836e6['type'],'appCode':_0x1aba89}),_0x515e62=await apiRequest(_0x405017(0x15b)+_0x3e87d7[_0x405017(0x124)](),{'method':_0x405017(0x1e7)});return _0x515e62[_0x405017(0x1b0)];}function isAuthFailure(_0x5ec14a){const _0x1ceb90=a208_0x5df3b4,_0x3b0eec=_0x5ec14a[_0x1ceb90(0x1e2)]||_0x5ec14a[_0x1ceb90(0x181)]||_0x5ec14a[_0x1ceb90(0x1b0)]?.[_0x1ceb90(0x181)]||_0x5ec14a['errorMessage']||_0x5ec14a['error']||'';return _0x5ec14a[_0x1ceb90(0x191)]===_0x1ceb90(0x1ca)||_0x5ec14a[_0x1ceb90(0x127)]===0x191||_0x5ec14a[_0x1ceb90(0x127)]===_0x1ceb90(0x14d)||_0x3b0eec[_0x1ceb90(0x1e1)](_0x1ceb90(0x14d))||_0x3b0eec[_0x1ceb90(0x1e1)]('Unauthorized')||_0x3b0eec[_0x1ceb90(0x1e1)]('登录')||_0x3b0eec[_0x1ceb90(0x1e1)]('认证');}export async function platformFetch(_0x1e48d2,_0x5df830){const _0x309afc=a208_0x5df3b4;let _0x33d71f;try{_0x33d71f=await fetch(_0x1e48d2,{'method':_0x5df830[_0x309afc(0x17c)]??_0x309afc(0x1e7),'headers':{'Content-Type':_0x309afc(0x1c7),'Cookie':_0x5df830[_0x309afc(0x1a7)],'X-Invoke-Source':'cli:rabetbase'},..._0x5df830[_0x309afc(0x1e5)]&&{'body':JSON[_0x309afc(0x13c)](_0x5df830[_0x309afc(0x1e5)])}});}catch(_0x1b6f43){throw createFetchFailureError(_0x1e48d2,_0x1b6f43);}let _0x59f075;try{_0x59f075=await _0x33d71f[_0x309afc(0x116)]();}catch(_0x33369f){if(!_0x33d71f['ok']){if(_0x33d71f[_0x309afc(0x10f)]===0x191)throw CliErrors['authRequired']();throw CliErrors['apiError'](_0x5df830[_0x309afc(0x154)]+'\x20failed,\x20HTTP\x20'+_0x33d71f[_0x309afc(0x10f)]);}throw createFetchFailureError(_0x1e48d2,_0x33369f);}if(_0x59f075===null||typeof _0x59f075!==_0x309afc(0x104)||Array[_0x309afc(0x16c)](_0x59f075)){if(_0x33d71f['status']===0x191)throw CliErrors['authRequired']();if(_0x33d71f['ok'])throw createIndeterminateResponseError(_0x5df830[_0x309afc(0x154)]);throw CliErrors[_0x309afc(0x1b6)](_0x5df830[_0x309afc(0x154)]+_0x309afc(0x1d7)+(!_0x33d71f['ok']?_0x309afc(0x1bd)+_0x33d71f['status']:'')+_0x309afc(0x1ac));}const _0x3b1ab7=typeof _0x59f075['errorCode']===_0x309afc(0x142)||typeof _0x59f075[_0x309afc(0x191)]===_0x309afc(0x177),_0x1f4195=_0x3b1ab7?String(_0x59f075[_0x309afc(0x191)])[_0x309afc(0x18d)]():'',_0x5c3f86=_0x59f075[_0x309afc(0x133)]===![]||_0x3b1ab7&&_0x1f4195!=='0000';if(!_0x33d71f['ok']||_0x5c3f86){if(_0x33d71f[_0x309afc(0x10f)]===0x191||isAuthFailure(_0x59f075))throw CliErrors['authRequired']();throw createPlatformApiError(_0x59f075[_0x309afc(0x1e2)]||_0x59f075[_0x309afc(0x181)]||_0x5df830[_0x309afc(0x154)]+_0x309afc(0x1d7)+(!_0x33d71f['ok']?',\x20HTTP\x20'+_0x33d71f[_0x309afc(0x10f)]:''),_0x59f075[_0x309afc(0x191)]??_0x59f075[_0x309afc(0x127)]);}if(_0x59f075[_0x309afc(0x133)]!==!![]||_0x59f075[_0x309afc(0x191)]!=='0000')throw createIndeterminateResponseError(_0x5df830[_0x309afc(0x154)]);return _0x59f075['data'];}export async function platformRequest(_0x367ad1,_0x43e431){const _0xe681ff=a208_0x5df3b4;if(/^https?:\/\//i[_0xe681ff(0x1e0)](_0x367ad1))throw CliErrors[_0xe681ff(0xff)](_0xe681ff(0x138)+_0x367ad1,_0xe681ff(0xef));const _0x55af06=_0x367ad1[_0xe681ff(0x112)]('/')?_0x367ad1:'/'+_0x367ad1;return platformFetch(''+getApiDomain()+_0x55af06,_0x43e431);}const MAX_KNOWLEDGE_BASE_PAGE_SIZE=0x64;function parseKnowledgeBaseInteger(_0x3eabf1,_0x12d1ba){const _0x366c81=a208_0x5df3b4,_0x3e2efa=typeof _0x3eabf1==='number'?_0x3eabf1:typeof _0x3eabf1===_0x366c81(0x142)&&/^(0|[1-9]\d*)$/[_0x366c81(0x1e0)](_0x3eabf1)?Number(_0x3eabf1):Number[_0x366c81(0x1d6)],_0x373ff8=Number['isSafeInteger'](_0x3e2efa)&&(_0x12d1ba==='id'?_0x3e2efa>0x0:_0x3e2efa>=0x0);if(!_0x373ff8)throw CliErrors['apiError'](_0x366c81(0x10b)+_0x12d1ba+'.');return _0x3e2efa;}function parseKnowledgeBaseText(_0x54ade6,_0x691513){const _0x364107=a208_0x5df3b4;if(typeof _0x54ade6===_0x364107(0x142)&&(_0x691513===_0x364107(0x1be)||_0x54ade6[_0x364107(0x18d)]()))return _0x54ade6;throw CliErrors[_0x364107(0x1b6)](_0x364107(0x15e)+_0x691513+'.');}function parseKnowledgeBaseRecord(_0x37d176){const _0x3e3db8=a208_0x5df3b4;if(!_0x37d176||typeof _0x37d176!==_0x3e3db8(0x104)||Array[_0x3e3db8(0x16c)](_0x37d176))throw CliErrors['apiError'](_0x3e3db8(0x155));const _0x597766=_0x37d176;if(_0x597766[_0x3e3db8(0x192)]!==_0x3e3db8(0x125)&&_0x597766[_0x3e3db8(0x192)]!==_0x3e3db8(0x1d2))throw CliErrors[_0x3e3db8(0x1b6)](_0x3e3db8(0x169));const _0x12713b={'id':parseKnowledgeBaseInteger(_0x597766['id'],'id'),'scope':_0x597766[_0x3e3db8(0x192)],'appCode':parseKnowledgeBaseText(_0x597766[_0x3e3db8(0xf4)],_0x3e3db8(0xf4)),'title':parseKnowledgeBaseText(_0x597766['title'],_0x3e3db8(0x1c3)),'version':parseKnowledgeBaseInteger(_0x597766[_0x3e3db8(0x1aa)],'version'),'content':parseKnowledgeBaseText(_0x597766[_0x3e3db8(0x1be)],'content')};return(_0x597766['createTime']===null||typeof _0x597766[_0x3e3db8(0x19b)]===_0x3e3db8(0x142)||typeof _0x597766[_0x3e3db8(0x19b)]===_0x3e3db8(0x177))&&(_0x12713b[_0x3e3db8(0x19b)]=_0x597766[_0x3e3db8(0x19b)]),(_0x597766['updateTime']===null||typeof _0x597766[_0x3e3db8(0x184)]===_0x3e3db8(0x142)||typeof _0x597766[_0x3e3db8(0x184)]===_0x3e3db8(0x177))&&(_0x12713b[_0x3e3db8(0x184)]=_0x597766[_0x3e3db8(0x184)]),_0x12713b;}export async function listEnterpriseKnowledgeBases(_0x24a51d,_0x1758e6={}){const _0x91b071=a208_0x5df3b4,_0x677248=_0x1758e6[_0x91b071(0xf7)]??0x32;if(!Number[_0x91b071(0x19f)](_0x677248)||_0x677248<0x1||_0x677248>MAX_KNOWLEDGE_BASE_PAGE_SIZE)throw CliErrors['validation'](_0x91b071(0x17f)+MAX_KNOWLEDGE_BASE_PAGE_SIZE+'.');const _0x13c04b=await platformRequest(_0x91b071(0x15d),{'method':_0x91b071(0x1c9),'cookie':_0x24a51d,'label':_0x91b071(0x18e),'body':{'currentPage':_0x1758e6[_0x91b071(0x195)]??0x1,'pageSize':_0x677248,'scope':_0x91b071(0x125),..._0x1758e6[_0x91b071(0xf4)]?{'appCode':_0x1758e6['appCode']}:{},..._0x1758e6[_0x91b071(0x1c3)]?{'title':_0x1758e6[_0x91b071(0x1c3)]}:{}}});if(!_0x13c04b||typeof _0x13c04b!==_0x91b071(0x104)||Array['isArray'](_0x13c04b)||!Array[_0x91b071(0x16c)](_0x13c04b['tableData']))throw CliErrors['apiError'](_0x91b071(0x114));const _0x21accf=extractPaging(_0x13c04b);if(!_0x21accf||!Number[_0x91b071(0x17b)](_0x21accf[_0x91b071(0x195)])||!Number['isInteger'](_0x21accf[_0x91b071(0xf7)])||!Number['isInteger'](_0x21accf['totalCount'])||_0x21accf[_0x91b071(0x195)]<0x1||_0x21accf[_0x91b071(0xf7)]<0x1||_0x21accf['pageSize']>MAX_KNOWLEDGE_BASE_PAGE_SIZE||_0x21accf['totalCount']<0x0)throw CliErrors[_0x91b071(0x1b6)]('List\x20enterprise\x20knowledge\x20bases\x20returned\x20invalid\x20paging\x20metadata.');return{'items':extractList(_0x13c04b)[_0x91b071(0x1de)](parseKnowledgeBaseRecord),'paging':_0x21accf};}export async function getEnterpriseKnowledgeBase(_0x126fac,_0x35863d){const _0x502daa=a208_0x5df3b4,_0x533ba1=await platformRequest(_0x502daa(0x1ae)+buildQuery({'id':_0x35863d}),{'cookie':_0x126fac,'label':_0x502daa(0x1c5)});return parseKnowledgeBaseRecord(_0x533ba1);}export async function createEnterpriseKnowledgeBase(_0x2f2171,_0x18678f){const _0x2b1fd9=a208_0x5df3b4,_0x4bda48=await platformRequest('/admin/knowledge-base/create',{'method':_0x2b1fd9(0x1c9),'cookie':_0x2f2171,'label':_0x2b1fd9(0x1a6),'body':{'scope':_0x2b1fd9(0x125),..._0x18678f}});return parseKnowledgeBaseRecord(_0x4bda48);}export async function updateEnterpriseKnowledgeBase(_0x214b78,_0x57c868){const _0x3a43a7=a208_0x5df3b4;if(_0x57c868[_0x3a43a7(0x1c3)]===undefined&&_0x57c868[_0x3a43a7(0x1be)]===undefined)throw CliErrors[_0x3a43a7(0xff)]('Knowledge-base\x20update\x20requires\x20title\x20or\x20content.');const _0x24183e=await platformRequest('/admin/knowledge-base/update',{'method':_0x3a43a7(0x1c9),'cookie':_0x214b78,'label':'Update\x20enterprise\x20knowledge\x20base','body':{'id':_0x57c868['id'],..._0x57c868[_0x3a43a7(0x1c3)]!==undefined?{'title':_0x57c868['title']}:{},..._0x57c868['content']!==undefined?{'content':_0x57c868[_0x3a43a7(0x1be)]}:{}}});return parseKnowledgeBaseRecord(_0x24183e);}export async function deleteEnterpriseKnowledgeBase(_0x3d7ee3,_0x87cc99){const _0x13af12=a208_0x5df3b4;await platformRequest(_0x13af12(0x19c),{'method':_0x13af12(0x1c9),'cookie':_0x3d7ee3,'label':_0x13af12(0x10d),'body':{'id':_0x87cc99}});}function cleanNewlines(_0x33012b){const _0x45f5e3=a208_0x5df3b4;return _0x33012b['replace'](/[\r\n]+/g,'\x20')[_0x45f5e3(0x18d)]();}function cleanDatasetName(_0x3b2c4f){const _0x6305f9=a208_0x5df3b4;if(!_0x3b2c4f[_0x6305f9(0x1db)])return _0x3b2c4f;return{..._0x3b2c4f,'name':cleanNewlines(_0x3b2c4f[_0x6305f9(0x1db)])};}export async function fetchModelList(_0x1ee0ac,_0x5a0c6f){const _0x20d698=a208_0x5df3b4,_0x3f1523=getEnv(),_0xdb3f4f=new URLSearchParams({'appcode':_0x1ee0ac,'otype':_0x20d698(0x10e)}),_0xa741dd='/api/node-toolbox/dataset/model-list?'+_0xdb3f4f[_0x20d698(0x124)]();logger[_0x20d698(0xf1)](_0x20d698(0x193),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x3f1523+')',{'apiPath':_0xa741dd});const _0x1ab832=await platformRequest(_0xa741dd,{'cookie':_0x5a0c6f,'label':_0x20d698(0x12b)}),_0x3e49d0=(_0x1ab832['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x3e49d0,'count':_0x3e49d0[_0x20d698(0x1ea)]};}export async function fetchDatasetDoc(_0x4ee408){const _0x59e915=a208_0x5df3b4,{appCode:_0xbd1a1,cookie:_0x5ec6d3,datasetCode:_0x15559b,datasetId:_0x598638,extraParams:_0x27fd95}=_0x4ee408,_0x564902=await platformRequest(_0x59e915(0x1dd),{'method':_0x59e915(0x1c9),'body':{'appCode':_0xbd1a1,'datasetCode':_0x15559b,'datasetId':_0x598638,..._0x27fd95||{}},'cookie':_0x5ec6d3,'label':_0x59e915(0x11e)+_0x15559b+')'});if(!_0x564902||typeof _0x564902[_0x59e915(0x106)]!=='string')throw new Error(_0x59e915(0x1a1)+_0x15559b+_0x59e915(0x1d0));return _0x564902[_0x59e915(0x106)];}export async function getMenuTree(_0x5165c0,_0x9f5648){const _0x40a1cd=a208_0x5df3b4,_0x83ec81=new URLSearchParams({'appCode':_0x5165c0});return platformRequest(_0x40a1cd(0x14a)+_0x83ec81['toString'](),{'cookie':_0x9f5648,'label':_0x40a1cd(0x161)});}export async function createMenuRecord(_0x2bf4d2,_0x3727bb,_0x20ac0c){return platformRequest('/smartapi/menu/create',{'method':'POST','body':_0x2bf4d2,'cookie':_0x3727bb,'label':_0x20ac0c});}export async function updateMenuRecord(_0x7e74e9,_0x2ecdf1,_0x2f007a){const _0x72d18a=a208_0x5df3b4;return platformRequest('/smartapi/menu/update',{'method':_0x72d18a(0x1c9),'body':_0x7e74e9,'cookie':_0x2ecdf1,'label':_0x2f007a});}export async function deleteMenuRecord(_0x4540a5,_0x1733d9,_0x1430d2){const _0x1e94c4=a208_0x5df3b4;return platformRequest(_0x1e94c4(0x12e),{'method':_0x1e94c4(0x1c9),'body':{'id':_0x4540a5},'cookie':_0x1733d9,'label':_0x1430d2});}export async function batchDeleteMenuRecords(_0xb411c7,_0x51bad1,_0x4b1530){const _0x1493f5=a208_0x5df3b4;return platformRequest(_0x1493f5(0x18c),{'method':_0x1493f5(0x1c9),'body':{'idList':_0xb411c7},'cookie':_0x51bad1,'label':_0x4b1530});}export async function startMenuRegroup(_0x385c54,_0xa7de8e,_0x42a4fc){return platformRequest('/smartapi/menu/regroup',{'method':'POST','body':_0x385c54,'cookie':_0xa7de8e,'label':_0x42a4fc});}export async function getAsyncTaskStatus(_0x115ce8,_0x3cea79,_0x426788){const _0x4ff0a3=a208_0x5df3b4,_0x3704f9=new URLSearchParams({'appCode':_0x3cea79});return platformRequest(_0x4ff0a3(0x1a4)+encodeURIComponent(_0x115ce8)+'?'+_0x3704f9[_0x4ff0a3(0x124)](),{'cookie':_0x426788,'label':_0x4ff0a3(0x130)+_0x115ce8});}export async function listBffScripts(_0x50bea5,_0x305d88,_0x19cc49){const _0x13330c=a208_0x5df3b4;let _0x2a1aa6=_0x13330c(0x123)+_0x50bea5;if(_0x305d88)_0x2a1aa6+=_0x13330c(0x187)+_0x305d88;const _0x596313=await apiRequest(_0x2a1aa6);let _0xec08de=extractList(_0x596313[_0x13330c(0x1b0)]);if(_0x19cc49?.[_0x13330c(0x15c)]){const _0x4d6eba=_0x19cc49[_0x13330c(0x15c)][_0x13330c(0x11f)]();_0xec08de=_0xec08de['filter'](_0x43bab6=>_0x43bab6['functionName']?.[_0x13330c(0x11f)]()[_0x13330c(0x1e1)](_0x4d6eba)||_0x43bab6[_0x13330c(0x16f)]?.['toLowerCase']()[_0x13330c(0x1e1)](_0x4d6eba));}return _0xec08de;}export async function getBffScriptInfo(_0x7d5ef3){const _0x59b1cb=a208_0x5df3b4,_0x10c196=await apiRequest(_0x59b1cb(0x101)+_0x7d5ef3);if(!_0x10c196[_0x59b1cb(0x1b0)])throw CliErrors[_0x59b1cb(0xff)]('BFF\x20script\x20not\x20found:\x20id='+_0x7d5ef3);return _0x10c196[_0x59b1cb(0x1b0)];}export async function saveBffScript(_0x2e3b5a){const _0x472eda=a208_0x5df3b4,_0x5868eb=await apiRequest(_0x472eda(0x1a2),{'method':_0x472eda(0x1c9),'body':_0x2e3b5a}),{id:_0x58a1d0,entity:_0x5d46ea}=normalizeEntityWithIdResponse(_0x5868eb[_0x472eda(0x1b0)]);if(_0x58a1d0!==undefined){const _0x5c8ee1=typeof _0x5d46ea[_0x472eda(0x148)]==='string'||typeof _0x5d46ea[_0x472eda(0x12c)]===_0x472eda(0x142)?_0x5d46ea:undefined;return{'id':_0x58a1d0,'script':_0x5c8ee1};}throw CliErrors[_0x472eda(0x1b6)]('BFF\x20save\x20returned\x20no\x20valid\x20id');}export async function deleteBffScript(_0x1aba9a){const _0x26a209=a208_0x5df3b4;await apiRequest(_0x26a209(0x1b9),{'method':'POST','body':{'id':_0x1aba9a}});}export async function getBffScriptStatistics(_0x219550){const _0x2defca=a208_0x5df3b4,_0x22f8d9=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0x219550);return extractList(_0x22f8d9[_0x2defca(0x1b0)]);}export async function clearBffScriptCache(){const _0x184822=a208_0x5df3b4,_0x146cd6=await apiRequest('/api/management/script/cache/clear',{'method':_0x184822(0x1c9),'useRuntime':!![]});return typeof _0x146cd6[_0x184822(0x1b0)]===_0x184822(0x142)?_0x146cd6[_0x184822(0x1b0)]:'';}export async function listBffDatasetOperations(_0x1997b6,_0x1ee139){const _0x451f7d=a208_0x5df3b4,_0x2f860a=await apiRequest(_0x451f7d(0x135),{'method':_0x451f7d(0x1c9),'body':{'appCode':_0x1997b6,'datasetId':_0x1ee139}});return _0x2f860a['data'];}export async function listSqlQueries(_0x3124d7,_0x3e5480){const _0x4c4e09=a208_0x5df3b4,_0xa03827=await apiRequest('/smartapi/custom/queryUserCustomSqlList',{'method':_0x4c4e09(0x1c9),'body':{'appCode':_0x3124d7,'currentPage':_0x3e5480?.[_0x4c4e09(0x195)]??0x1,'pageSize':_0x3e5480?.['pageSize']??0x32,'sqlCode':_0x3e5480?.['sqlCode'],'sqlName':_0x3e5480?.[_0x4c4e09(0x129)]}});return _0xa03827[_0x4c4e09(0x1b0)];}export async function getSqlQueryInfo(_0x2d903a,_0x4061cb){const _0x367768=a208_0x5df3b4,_0x52a1cd=await listSqlQueries(_0x2d903a,{'sqlCode':_0x4061cb}),_0x2c86e7=_0x52a1cd[_0x367768(0x13d)]?.[0x0];if(!_0x2c86e7)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x4061cb);return _0x2c86e7;}export async function getSqlQueryDetail(_0xc5cb6c){const _0x18d166=a208_0x5df3b4,_0x2ae058=await apiRequest(_0x18d166(0x12a)+(_0x18d166(0x164)+encodeURIComponent(_0xc5cb6c)));if(!_0x2ae058['data'])throw CliErrors[_0x18d166(0xff)]('SQL\x20query\x20not\x20found:\x20'+_0xc5cb6c);return _0x2ae058[_0x18d166(0x1b0)];}export async function getSqlQueryDetailById(_0x51eaae){const _0x909500=a208_0x5df3b4,_0x56bc2f=await apiRequest('/smartapi/custom/getUserCustomSql?id='+_0x51eaae);if(!_0x56bc2f['data'])throw CliErrors[_0x909500(0xff)](_0x909500(0xf2)+_0x51eaae);return _0x56bc2f['data'];}export async function createSqlQuery(_0x4743e4){const _0x538b21=a208_0x5df3b4,_0x207423=await apiRequest(_0x538b21(0x13e),{'method':_0x538b21(0x1c9),'body':_0x4743e4}),{id:_0x1279b6,entity:_0x468bf7}=normalizeEntityWithIdResponse(_0x207423[_0x538b21(0x1b0)]);if(!(_0x538b21(0x1ce)in _0x468bf7)&&_0x1279b6)return getSqlQueryDetailById(_0x1279b6);return normalizeSqlQueryEntity(_0x468bf7);}export async function updateSqlQuery(_0x360775){const _0x3045f6=a208_0x5df3b4,_0xc37f28=await apiRequest(_0x3045f6(0x118),{'method':'POST','body':_0x360775}),{id:_0x1c44b2,entity:_0xe19c76}=normalizeEntityWithIdResponse(_0xc37f28['data']);if(!('sqlCode'in _0xe19c76)){if(_0x360775[_0x3045f6(0x1ce)])return getSqlQueryDetail(_0x360775[_0x3045f6(0x1ce)]);if(_0x1c44b2)return getSqlQueryDetailById(_0x1c44b2);}return normalizeSqlQueryEntity(_0xe19c76);}function a208_0x3afd(_0x52074d,_0x42fb46){_0x52074d=_0x52074d-0xe5;const _0xa36d16=a208_0xa36d();let _0x3afdcd=_0xa36d16[_0x52074d];return _0x3afdcd;}export async function deleteSqlQuery(_0x44be6b){const _0x87222e=a208_0x5df3b4;await apiRequest(_0x87222e(0x1e9),{'method':_0x87222e(0x1c9),'body':_0x44be6b});}export async function saveSqlQuery(_0x3e1206){const _0x53435e=a208_0x5df3b4,_0x1b56ed=await apiRequest('/api/node-toolbox/sql/save',{'method':'POST','body':_0x3e1206});return _0x1b56ed[_0x53435e(0x1b0)];}function normalizeSqlQueryEntity(_0x2ee59e){const _0x25965e=a208_0x5df3b4;return{..._0x2ee59e,'id':Number(_0x2ee59e['id']),'dbId':_0x2ee59e[_0x25965e(0x1ba)]==null?undefined:Number(_0x2ee59e[_0x25965e(0x1ba)]),'version':_0x2ee59e[_0x25965e(0x1aa)]==null?undefined:Number(_0x2ee59e[_0x25965e(0x1aa)])};}export async function executeSql(_0x5e27c7,_0x1183b,_0xc17550){const _0x86793c=a208_0x5df3b4,_0x827c24=await apiRequest(_0x86793c(0x140),{'method':_0x86793c(0x1c9),'body':{'appCode':_0x5e27c7,'sqlCode':_0x1183b,..._0xc17550&&{'params':_0xc17550}},'useRuntime':!![]});return _0x827c24['data'];}export async function executeDatasetDataOperation(_0x31c056,_0x4773f2,_0x37d7f7,_0x3bb76a={}){const _0x1ea7be=a208_0x5df3b4;try{const _0x28cfdc=await apiRequest(_0x1ea7be(0x13f)+_0x31c056+'/'+_0x4773f2+'/'+_0x37d7f7,{'method':'POST','body':_0x3bb76a,'useRuntime':!![]});return _0x28cfdc[_0x1ea7be(0x1b0)];}catch(_0x1c5e36){if(_0x37d7f7==='getOne'&&_0x1c5e36 instanceof CliError&&_0x1c5e36[_0x1ea7be(0x127)]==='api_error'&&_0x3bb76a['id']!==undefined&&_0x3bb76a['id']!==null&&_0x3bb76a['id']!==''){const _0x56d87d=await apiRequest('/api/'+_0x31c056+'/'+_0x4773f2+'/filter',{'method':_0x1ea7be(0x1c9),'body':{'where':{'id':{'$eq':_0x3bb76a['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0xd92df3=Array[_0x1ea7be(0x16c)](_0x56d87d[_0x1ea7be(0x1b0)]?.[_0x1ea7be(0x13d)])?_0x56d87d[_0x1ea7be(0x1b0)]['tableData']:[];return _0xd92df3[0x0]??null;}throw _0x1c5e36;}}export async function listDatasets(_0x1362c9,_0x4d6458){const _0x37aef7=a208_0x5df3b4,_0x31474d={'appCode':_0x1362c9,'deleted':_0x4d6458?.[_0x37aef7(0x174)]??![]};if(_0x4d6458?.[_0x37aef7(0x127)])_0x31474d['code']=_0x4d6458[_0x37aef7(0x127)];if(_0x4d6458?.['name'])_0x31474d[_0x37aef7(0x1db)]=_0x4d6458['name'];const _0xe3f456=await apiRequest('/smartapi/dataset/get-dataset-list',{'method':_0x37aef7(0x1c9),'body':_0x31474d});return extractList(_0xe3f456[_0x37aef7(0x1b0)]);}export async function deleteDataset(_0x10d91c,_0x330e4b){const _0x13a667=a208_0x5df3b4;await apiRequest(_0x13a667(0x108),{'method':_0x13a667(0x1c9),'body':{'appCode':_0x10d91c,'datasetId':_0x330e4b}});}export async function restoreDataset(_0x451bc1,_0x106ddd){const _0x5945b9=a208_0x5df3b4;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x5945b9(0x1c9),'body':{'appCode':_0x451bc1,'datasetId':_0x106ddd}});}export async function previewTextGeneratedDataset(_0xa98bc8,_0xb124a1){const _0x446dce=a208_0x5df3b4,_0x4c8005=await apiRequest(_0x446dce(0x12f),{'method':'POST','body':{'appCode':_0xa98bc8,'datasetName':_0xb124a1[_0x446dce(0x19d)],'requirementDescription':_0xb124a1[_0x446dce(0x18a)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x4c8005[_0x446dce(0x1b0)];}export async function startTextGeneratedDataset(_0x187df3,_0x2b0e0f,_0x18d6c9){const _0x5e5071=a208_0x5df3b4,_0x203e94=await apiRequest(_0x5e5071(0x1b4),{'method':'POST','body':{'appCode':_0x187df3,..._0x18d6c9?.['clientOperationId']?{'clientOperationId':_0x18d6c9[_0x5e5071(0x1eb)]}:{},'design':_0x2b0e0f},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x203e94['data'];}export async function getTextGeneratedDatasetStatus(_0x51905a,_0x3541fe){const _0x1a4362=a208_0x5df3b4,_0x3f66ae=new URLSearchParams({'appCode':_0x51905a});_0x3541fe[_0x1a4362(0x149)]&&_0x3f66ae['set'](_0x1a4362(0x149),_0x3541fe['operationId']);_0x3541fe[_0x1a4362(0x1eb)]&&_0x3f66ae[_0x1a4362(0x1a8)](_0x1a4362(0x1eb),_0x3541fe[_0x1a4362(0x1eb)]);const _0x20e423=await apiRequest(_0x1a4362(0x165)+_0x3f66ae[_0x1a4362(0x124)]());return _0x20e423['data'];}export async function searchDatasets(_0x3f4d0d,_0x53aa1e){const _0x44b2c2=a208_0x5df3b4,_0x466d78=await listDatasets(_0x3f4d0d,{'name':_0x53aa1e}),_0x5c2fd5=_0x53aa1e[_0x44b2c2(0x11f)](),_0x521cb1=new Set(_0x466d78['map'](_0x27afea=>_0x27afea['id'])),_0xbda145=_0x466d78['filter'](_0xbb1155=>_0xbb1155['dbtableConfig']?.['tableName']?.[_0x44b2c2(0x11f)]()[_0x44b2c2(0x1e1)](_0x5c2fd5)||_0xbb1155[_0x44b2c2(0x16f)]?.[_0x44b2c2(0x11f)]()[_0x44b2c2(0x1e1)](_0x5c2fd5)),_0x1e1416=await listDatasets(_0x3f4d0d,{'code':_0x53aa1e});for(const _0x34685a of _0x1e1416){!_0x521cb1[_0x44b2c2(0x19e)](_0x34685a['id'])&&(_0x466d78[_0x44b2c2(0x15a)](_0x34685a),_0x521cb1[_0x44b2c2(0xfe)](_0x34685a['id']));}return _0x466d78;}export function normalizeDatasetOperations(_0xc83169){const _0x2d675e=a208_0x5df3b4;if(Array[_0x2d675e(0x16c)](_0xc83169))return _0xc83169[_0x2d675e(0x16d)](_0x135723=>_0x135723!=null&&typeof _0x135723==='object');if(_0xc83169&&typeof _0xc83169==='object')return Object['entries'](_0xc83169)[_0x2d675e(0x16d)](([,_0x287188])=>_0x287188!=null&&typeof _0x287188===_0x2d675e(0x104))[_0x2d675e(0x1de)](([_0x502bad,_0x551296])=>({..._0x551296,'name':_0x551296[_0x2d675e(0x1db)]??_0x551296[_0x2d675e(0x1af)]??_0x502bad}));return[];}export async function getDatasetDetail(_0x14c37b){const _0x5c4f89=a208_0x5df3b4,_0x1a1ae8=/^\d+$/['test'](_0x14c37b)?'id':'code',_0x5addff=await apiRequest(_0x5c4f89(0x16e)+_0x1a1ae8+'='+_0x14c37b);return _0x5addff['data'];}export async function updateDrivenData(_0x29d615){const _0x21987a=a208_0x5df3b4,_0x4c57b1=await apiRequest('/smartapi/dataset/update-driven-data',{'method':_0x21987a(0x1c9),'body':_0x29d615});return _0x4c57b1[_0x21987a(0x1b0)];}export async function getDatasetOperations(_0x4af54a){const _0x5451aa=a208_0x5df3b4,_0x5971ae=await getDatasetDetail(_0x4af54a),_0x2ab032=normalizeDatasetOperations(_0x5971ae[_0x5451aa(0x11d)])[_0x5451aa(0x1de)](_0x1d30a2=>({'name':_0x1d30a2['name']||_0x1d30a2[_0x5451aa(0x1af)],'displayName':_0x1d30a2['displayName']||_0x1d30a2['name'],'type':_0x1d30a2[_0x5451aa(0x1b3)],'method':_0x1d30a2[_0x5451aa(0x17c)],'path':_0x1d30a2[_0x5451aa(0x1d8)],'enabled':_0x1d30a2['enabled']??!![],'requestFields':_0x1d30a2[_0x5451aa(0x1b2)],'responseFields':_0x1d30a2['responseFields']}));return{'dataset':{'id':_0x5971ae['id']??_0x5971ae[_0x5451aa(0xfd)],'name':_0x5971ae[_0x5451aa(0x1db)],'code':_0x5971ae['code']||_0x5971ae[_0x5451aa(0x167)],'tableName':_0x5971ae[_0x5451aa(0x1c2)]||_0x5971ae['dbtableConfig']?.[_0x5451aa(0x1c2)]},'operations':_0x2ab032};}export async function getOperationDetail(_0x1dcda4,_0x1864a6,_0x284fa9){const _0x2a6c57=a208_0x5df3b4;let _0x54a5a0=_0x1864a6;if(!/^\d+$/[_0x2a6c57(0x1e0)](_0x1864a6)){const _0x2e2a56=await listDatasets(_0x1dcda4,{'code':_0x1864a6}),_0xd4d37f=_0x2e2a56[_0x2a6c57(0x1bf)](_0x510a66=>_0x510a66['code']===_0x1864a6||String(_0x510a66['id'])===_0x1864a6);if(!_0xd4d37f)throw CliErrors[_0x2a6c57(0xff)](_0x2a6c57(0x162)+_0x1864a6);_0x54a5a0=String(_0xd4d37f['id']);}const _0x34f3d8=await getDatasetDetail(_0x54a5a0),_0x4d4326=normalizeDatasetOperations(_0x34f3d8[_0x2a6c57(0x11d)])[_0x2a6c57(0x1bf)](_0x5922fb=>(_0x5922fb['name']||_0x5922fb[_0x2a6c57(0x1af)])===_0x284fa9);if(!_0x4d4326)throw CliErrors[_0x2a6c57(0xff)](_0x2a6c57(0xfb)+_0x284fa9+_0x2a6c57(0x16a)+_0x1864a6);return{'dataset':{'id':_0x34f3d8['id']??_0x34f3d8[_0x2a6c57(0xfd)],'name':_0x34f3d8[_0x2a6c57(0x1db)],'code':_0x34f3d8['code']||_0x34f3d8['modelCode'],'tableName':_0x34f3d8[_0x2a6c57(0x1c2)]||_0x34f3d8['dbtableConfig']?.[_0x2a6c57(0x1c2)]},'operation':_0x4d4326};}export async function startGenerateStandardPages(_0x25b2a0,_0xb837de,_0x26ced){const _0x2aaee4=a208_0x5df3b4,_0x3934ad=await apiRequest('/smartapi/lovrabet/dataset/'+_0xb837de+_0x2aaee4(0x128),{'method':_0x2aaee4(0x1c9),'body':{'appCode':_0x25b2a0,..._0x26ced?.['clientOperationId']?{'clientOperationId':_0x26ced[_0x2aaee4(0x1eb)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x3934ad['data'];}export async function getGenerateStandardPagesStatus(_0x5479f7,_0x5795bd,_0x562930){const _0x218ab5=a208_0x5df3b4,_0x36ff55=new URLSearchParams({'appCode':_0x5479f7});_0x562930[_0x218ab5(0x149)]&&_0x36ff55[_0x218ab5(0x1a8)](_0x218ab5(0x149),_0x562930['operationId']);_0x562930[_0x218ab5(0x1eb)]&&_0x36ff55[_0x218ab5(0x1a8)](_0x218ab5(0x1eb),_0x562930[_0x218ab5(0x1eb)]);const _0x4d6588=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5795bd+_0x218ab5(0xf6)+_0x36ff55[_0x218ab5(0x124)]());return _0x4d6588[_0x218ab5(0x1b0)];}export async function getStandardPageStatus(_0x13aa84,_0x46f393){const _0x1e1f96=a208_0x5df3b4,_0x3b6b47=await apiRequest(_0x1e1f96(0x160)+_0x46f393+_0x1e1f96(0x10a)+encodeURIComponent(_0x13aa84));return _0x3b6b47['data'];}export async function tryGetStandardPageStatus(_0x5c72fc,_0x28aabf){const _0x5179d2=a208_0x5df3b4;try{return await getStandardPageStatus(_0x5c72fc,_0x28aabf);}catch(_0x291847){if(_0x291847 instanceof CliError&&_0x291847[_0x5179d2(0x127)]==='api_error'&&/404|not found|non-json response/i[_0x5179d2(0x1e0)](_0x291847['message']))return null;throw _0x291847;}}export async function syncStandardPages(_0x3510a2,_0x3bca00){const _0x5350cf=a208_0x5df3b4,_0x9dd960=await apiRequest(_0x5350cf(0x160)+_0x3bca00+'/sync-to-pages',{'method':_0x5350cf(0x1c9),'body':{'appCode':_0x3510a2}});return _0x9dd960[_0x5350cf(0x1b0)];}export async function getPageDetail(_0x1d8b60){const _0x441772=a208_0x5df3b4,_0x238b21=await apiRequest(_0x441772(0x153)+_0x1d8b60);if(!_0x238b21[_0x441772(0x1b0)])throw CliErrors[_0x441772(0xff)](_0x441772(0x182)+_0x1d8b60);return _0x238b21[_0x441772(0x1b0)];}export async function listDeletedPages(_0x29cff5,_0x7132ec,_0x413df8){const _0x5d96e2=a208_0x5df3b4,_0x29b059=new URLSearchParams({'appCode':_0x29cff5,'type':_0x7132ec,'currentPage':String(_0x413df8[_0x5d96e2(0x195)]),'pageSize':String(_0x413df8[_0x5d96e2(0xf7)])}),_0x1ce216=await apiRequest(_0x5d96e2(0xf9)+_0x29b059[_0x5d96e2(0x124)]());return _0x1ce216['data'];}export async function restoreStandardPage(_0x510fdd){const _0x4b17b6=a208_0x5df3b4;await apiRequest(_0x4b17b6(0x134),{'method':_0x4b17b6(0x1c9),'body':{'id':_0x510fdd}});}export async function restoreJsxPage(_0x1dd554,_0x4b61aa){const _0x50f6a4=a208_0x5df3b4,_0x5a700d=await apiRequest('/smartapi/webcode/page/restore',{'method':_0x50f6a4(0x1c9),'body':{'appCode':_0x1dd554,'id':_0x4b61aa}});return _0x5a700d[_0x50f6a4(0x1b0)];}export async function updatePage(_0x4571ce,_0xf99ec4,_0x5df27d,_0x50c959){const _0x158b37=a208_0x5df3b4,_0x2159c4=await apiRequest(_0x158b37(0x159),{'method':_0x158b37(0x1c9),'body':{'appCode':_0x4571ce,'pageId':_0xf99ec4,'code':_0x5df27d,'datasetIds':_0x50c959}});return _0x2159c4[_0x158b37(0x1b0)];}export function generateSdkCode(_0x10d3f3,_0x271fd8,_0x2a4c2d){const _0x2bd233=a208_0x5df3b4,_0x5da1f9=_0x2a4c2d?.[_0x2bd233(0x1d4)]??!![],_0x5a7d40=_0x2bd233(0x199)+_0x10d3f3['code']?.[_0x2bd233(0x136)](/-/g,'_'),_0x43691e=_0x271fd8[_0x2bd233(0x1db)]||_0x271fd8[_0x2bd233(0x1af)]||_0x2bd233(0x16d),_0x5b85a8=[];_0x5da1f9&&_0x5b85a8[_0x2bd233(0x15a)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x2bd233(0x19a),'');_0x5b85a8['push'](_0x2bd233(0x1c4)+_0x10d3f3['name']+'\x20('+(_0x10d3f3['tableName']||_0x2bd233(0x170))+')');if(_0x43691e===_0x2bd233(0x16d))_0x5b85a8['push']('const\x20result\x20=\x20await\x20client.models.'+_0x5a7d40+'.filter({',_0x2bd233(0x176),_0x2bd233(0x15f),'\x20\x20currentPage:\x201,',_0x2bd233(0x168));else{if(_0x43691e===_0x2bd233(0xfc))_0x5b85a8[_0x2bd233(0x15a)](_0x2bd233(0x120)+_0x5a7d40+_0x2bd233(0x1cb));else{if(_0x43691e==='create')_0x5b85a8[_0x2bd233(0x15a)](_0x2bd233(0x120)+_0x5a7d40+_0x2bd233(0x1d9));else{if(_0x43691e==='update')_0x5b85a8[_0x2bd233(0x15a)](_0x2bd233(0x120)+_0x5a7d40+_0x2bd233(0x115));else _0x43691e===_0x2bd233(0x1a5)||_0x43691e===_0x2bd233(0x189)?_0x5b85a8[_0x2bd233(0x15a)]('const\x20result\x20=\x20await\x20client.models.'+_0x5a7d40+_0x2bd233(0x1c6)):_0x5b85a8[_0x2bd233(0x15a)](_0x2bd233(0x120)+_0x5a7d40+'.'+_0x43691e+_0x2bd233(0x1a9));}}}return _0x5b85a8[_0x2bd233(0x166)]('\x0a');}export function generateSqlCodeTemplate(_0x328c71,_0x2da550){const _0x14fe35=a208_0x5df3b4,_0x2165ed=_0x2da550?.[_0x14fe35(0xfa)]??_0x14fe35(0x14e),_0x5e0725=_0x2da550?.[_0x14fe35(0x1d4)]??!![],_0x862d36=[];return _0x862d36[_0x14fe35(0x15a)](_0x14fe35(0x180)+_0x328c71[_0x14fe35(0x129)]+'\x20('+_0x328c71[_0x14fe35(0x1ce)]+')'),_0x2165ed===_0x14fe35(0x14e)?(_0x5e0725&&_0x862d36[_0x14fe35(0x15a)](_0x14fe35(0x156),'',_0x14fe35(0x19a),''),_0x862d36[_0x14fe35(0x15a)](_0x14fe35(0x144),_0x14fe35(0x146)+_0x328c71[_0x14fe35(0x1ce)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x14fe35(0x168),_0x14fe35(0x141),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x862d36['push'](_0x14fe35(0x190),_0x14fe35(0x1b8),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x14fe35(0x1ab)+_0x328c71[_0x14fe35(0x1ce)]+'\x27,',_0x14fe35(0x1d1),_0x14fe35(0x152),'\x20\x20return\x20rows;','}'),_0x862d36[_0x14fe35(0x166)]('\x0a');}export async function getErConfig(_0x5cf9f2,_0xfca924){const _0x1ee77c=a208_0x5df3b4,_0x9350db=await apiRequest(_0x1ee77c(0x1bc),{'method':'POST','body':{'appCode':_0x5cf9f2,'dblinkId':_0xfca924},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x9350db['data'];}export async function getErRelationDetail(_0x1547b8,_0x3e5c4f){const _0x273a5a=a208_0x5df3b4,_0x1e3ed0=new URLSearchParams({'appCode':_0x1547b8,'relationId':String(_0x3e5c4f)});try{const _0x52baa0=await apiRequest(_0x273a5a(0xe7)+_0x1e3ed0[_0x273a5a(0x124)]());return _0x52baa0['data']?.[_0x273a5a(0x1c8)]??null;}catch(_0x2c3247){if(_0x2c3247 instanceof CliError&&_0x2c3247['code']===_0x273a5a(0x151)&&(_0x2c3247[_0x273a5a(0x1d5)]?.[_0x273a5a(0x1e1)](_0x273a5a(0x171))||_0x2c3247[_0x273a5a(0x1d5)]==='API\x20error\x20code:\x20306'&&_0x2c3247['message']===_0x273a5a(0x183)))return null;throw _0x2c3247;}}export async function createErRelation(_0x1db85c){const _0xed0540=a208_0x5df3b4,_0x4bb825=await apiRequest(_0xed0540(0x1e8),{'method':_0xed0540(0x1c9),'body':_0x1db85c,'allowNonJsonSuccess':!![]});return _0x4bb825['data'];}export async function updateErRelation(_0xd334e2){const _0x7c3f93=a208_0x5df3b4,_0x26ad58=await apiRequest(_0x7c3f93(0xf5),{'method':_0x7c3f93(0x1c9),'body':_0xd334e2,'allowNonJsonSuccess':!![]});return _0x26ad58[_0x7c3f93(0x1b0)];}export async function deleteErRelation(_0x1af225){const _0x136293=a208_0x5df3b4,_0x59cf0d=await apiRequest(_0x136293(0x110),{'method':_0x136293(0x1c9),'body':_0x1af225,'allowNonJsonSuccess':!![]});return _0x59cf0d[_0x136293(0x1b0)];}export async function updateErBusinessGroup(_0x161e62){const _0x45c897=a208_0x5df3b4,_0x6b459b=await apiRequest(_0x45c897(0x1cd),{'method':_0x45c897(0x1c9),'body':_0x161e62,'allowNonJsonSuccess':!![]});return _0x6b459b['data'];}function buildQuery(_0x1e0e13){const _0x71545a=a208_0x5df3b4,_0x8e55b2=new URLSearchParams();for(const [_0x5e0f1e,_0x2097a6]of Object[_0x71545a(0x150)](_0x1e0e13)){if(_0x2097a6===undefined||_0x2097a6==='')continue;_0x8e55b2[_0x71545a(0x1a8)](_0x5e0f1e,String(_0x2097a6));}const _0x217d50=_0x8e55b2[_0x71545a(0x124)]();return _0x217d50?'?'+_0x217d50:'';}export async function listNotificationChannelConfigs(_0x391059,_0x10c223){const _0x52e9f0=a208_0x5df3b4,_0x4495ee=await apiRequest(_0x52e9f0(0x173)+buildQuery({'appCode':_0x391059,'channelType':_0x10c223}));return Array[_0x52e9f0(0x16c)](_0x4495ee[_0x52e9f0(0x1b0)])?_0x4495ee[_0x52e9f0(0x1b0)]:[];}export async function listAppConfigs(_0x4e9326,_0x48bc97){const _0x21c209=a208_0x5df3b4,_0xbdb8f1=await apiRequest('/smartapi/app-config/list',{'method':_0x21c209(0x1c9),'body':{'appCode':_0x4e9326,..._0x48bc97?.[_0x21c209(0x185)]?{'key':_0x48bc97[_0x21c209(0x185)]}:{},..._0x48bc97?.[_0x21c209(0x172)]?{'tags':_0x48bc97[_0x21c209(0x172)]}:{}}});return extractAppConfigList(_0xbdb8f1[_0x21c209(0x1b0)]);}export async function getAppConfigByKey(_0x4e22d4,_0x170f0f){const _0x305f2f=a208_0x5df3b4,_0x4b5973=await apiRequest(_0x305f2f(0x157)+buildQuery({'appCode':_0x4e22d4,'key':_0x170f0f}));return _0x4b5973[_0x305f2f(0x1b0)]??null;}export async function createAppConfig(_0x270c9c){const _0x181ba7=a208_0x5df3b4,_0x4a3571=await apiRequest(_0x181ba7(0x132),{'method':_0x181ba7(0x1c9),'body':{'appCode':_0x270c9c[_0x181ba7(0xf4)],'key':_0x270c9c[_0x181ba7(0x185)],'value':_0x270c9c[_0x181ba7(0x143)],..._0x270c9c['tags']?{'tags':_0x270c9c[_0x181ba7(0x172)]}:{}}});return _0x4a3571['data'];}export async function updateAppConfig(_0x263769){const _0x5c0cbf=a208_0x5df3b4;await apiRequest('/smartapi/app-config/update',{'method':_0x5c0cbf(0x1c9),'body':{'id':_0x263769['id'],'appCode':_0x263769[_0x5c0cbf(0xf4)],'key':_0x263769[_0x5c0cbf(0x185)],'value':_0x263769[_0x5c0cbf(0x143)],..._0x263769[_0x5c0cbf(0x172)]?{'tags':_0x263769['tags']}:{}}});}export async function deleteAppConfig(_0x3761e5){const _0x24432c=a208_0x5df3b4;await apiRequest('/smartapi/app-config/delete',{'method':_0x24432c(0x1c9),'body':_0x3761e5});}function extractAppConfigList(_0x400365){const _0x3d83e2=a208_0x5df3b4;if(Array[_0x3d83e2(0x16c)](_0x400365))return _0x400365;if(_0x400365&&typeof _0x400365===_0x3d83e2(0x104)&&Array[_0x3d83e2(0x16c)](_0x400365[_0x3d83e2(0x188)]))return _0x400365['list'];return extractList(_0x400365);}export async function listDbLinks(_0x364a29,_0x1b1b73){const _0x561c74=a208_0x5df3b4,_0xf0feec=await apiRequest(_0x561c74(0x14b),{'method':_0x561c74(0x1c9),'body':{'appCode':_0x364a29,'currentPage':_0x1b1b73?.[_0x561c74(0x195)]??0x1,'pageSize':_0x1b1b73?.['pageSize']??0x64}});return{'items':extractList(_0xf0feec[_0x561c74(0x1b0)]),'paging':extractPaging(_0xf0feec[_0x561c74(0x1b0)])};}export async function getDbLinkInfo(_0x4e955e){const _0x20df6d=a208_0x5df3b4,_0x15e246=await apiRequest(_0x20df6d(0x107)+buildQuery({'id':_0x4e955e}));return _0x15e246[_0x20df6d(0x1b0)];}export async function createDbLink(_0xa764e7){const _0x13c827=a208_0x5df3b4,_0x41aa96=await apiRequest(_0x13c827(0xee),{'method':_0x13c827(0x1c9),'body':_0xa764e7});return _0x41aa96[_0x13c827(0x1b0)];}export async function updateDbLink(_0x3e8225){const _0x5e4313=a208_0x5df3b4,_0x4d7070=await apiRequest(_0x5e4313(0x1a0),{'method':_0x5e4313(0x1c9),'body':_0x3e8225});return _0x4d7070[_0x5e4313(0x1b0)];}export async function deleteDbLink(_0x27c0d3){const _0x54bd1b=a208_0x5df3b4;await apiRequest(_0x54bd1b(0x121),{'method':_0x54bd1b(0x1c9),'body':{'id':_0x27c0d3}});}export async function testDbLinkConnect(_0x56b97d){const _0x3d9f14=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x56b97d}));return _0x3d9f14['data'];}export async function startDbAnalysis(_0x1d4145,_0x582974){const _0xdb5be6=a208_0x5df3b4,_0x45054b=await apiRequest(_0xdb5be6(0x1e4),{'method':'POST','body':{'dbLinkId':_0x1d4145,..._0x582974&&_0x582974[_0xdb5be6(0x1ea)]>0x0?{'tableNames':_0x582974}:{}}});return _0x45054b['data'];}export async function cancelDbAnalysis(_0x54aeb8){const _0x3aa4eb=a208_0x5df3b4;await apiRequest(_0x3aa4eb(0x131)+buildQuery({'planId':_0x54aeb8}),{'method':_0x3aa4eb(0x1c9)});}export async function getDbAnalysisStatus(_0x17da41){const _0x19631f=a208_0x5df3b4,_0x1beb13=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x17da41));return _0x1beb13[_0x19631f(0x1b0)];}export async function getDbAllTableList(_0x1eb5da,_0xabdd27){const _0x33ed3d=a208_0x5df3b4,_0x484b69=await apiRequest('/smartapi/dblink/getAllTableList'+buildQuery({'appCode':_0x1eb5da,'dbLinkId':_0xabdd27})),_0x5e4678=_0x484b69[_0x33ed3d(0x1b0)];if(Array[_0x33ed3d(0x16c)](_0x5e4678))return _0x5e4678;return extractList(_0x5e4678);}export async function getDbTableDiff(_0x5e33ba,_0x36b2fb,_0x3ee7d6){const _0x2051f7=a208_0x5df3b4,_0x1f2ca2=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x5e33ba,'dbLinkId':_0x36b2fb,'pageIndex':_0x3ee7d6?.[_0x2051f7(0x119)]??0x1,'pageSize':_0x3ee7d6?.['pageSize']??0x14,'tableName':_0x3ee7d6?.['tableName']})),_0x94cc82=_0x1f2ca2['data'];return{'totalCount':_0x94cc82?.[_0x2051f7(0x122)]??0x0,'physicalTableCount':_0x94cc82?.[_0x2051f7(0x175)]??0x0,'datasetTableCount':_0x94cc82?.[_0x2051f7(0x198)]??0x0,..._0x94cc82?.[_0x2051f7(0x158)]?{'summary':_0x94cc82['summary']}:{},'tableList':Array[_0x2051f7(0x16c)](_0x94cc82?.['tableList'])?_0x94cc82[_0x2051f7(0x14f)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0xe0d7a3=a208_0x5df3b4,_0x5cd4fd=await apiRequest('/smartapi/app/getList',{'method':_0xe0d7a3(0x1c9),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x3d78b2=extractList(_0x5cd4fd['data']),_0x4d2b19=extractPaging(_0x5cd4fd[_0xe0d7a3(0x1b0)]);return _0x4d2b19&&_0x4d2b19[_0xe0d7a3(0x122)]>REMOTE_APP_PAGE_SIZE&&console[_0xe0d7a3(0x11a)](_0xe0d7a3(0x194)+REMOTE_APP_PAGE_SIZE+_0xe0d7a3(0x1b5)+_0x4d2b19[_0xe0d7a3(0x122)]+'\x20apps.\x20'+_0xe0d7a3(0x1d3)),_0x3d78b2;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x4aabf0,_0x251415){const _0x463d92=a208_0x5df3b4,_0x1f8f0c=Math[_0x463d92(0xeb)](Math[_0x463d92(0x196)](_0x251415?.[_0x463d92(0xf7)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x587bd1=await apiRequest('/smartapi/permit/role/get-list',{'method':_0x463d92(0x1c9),'body':{'appCode':_0x4aabf0,'currentPage':_0x251415?.[_0x463d92(0x195)]??0x1,'pageSize':_0x1f8f0c}});return{'items':extractList(_0x587bd1[_0x463d92(0x1b0)]),'paging':extractPaging(_0x587bd1[_0x463d92(0x1b0)])};}export async function getAppRole(_0x28d338){const _0x16fd9f=a208_0x5df3b4,_0x5b2551=await apiRequest('/smartapi/permit/role/get-one'+buildQuery({'id':_0x28d338}));return _0x5b2551[_0x16fd9f(0x1b0)];}export async function createAppRole(_0x5e444b){const _0x62295e=a208_0x5df3b4,_0x281627=await apiRequest(_0x62295e(0x113),{'method':'POST','body':{'appCode':_0x5e444b[_0x62295e(0xf4)],'roleName':_0x5e444b['roleName'],'roleType':_0x62295e(0x1ad),..._0x5e444b[_0x62295e(0xf3)]?{'remark':_0x5e444b[_0x62295e(0xf3)]}:{}}});return _0x281627['data'];}export async function updateAppRole(_0x821247){const _0x21292c=a208_0x5df3b4,_0x1613cd=await apiRequest(_0x21292c(0x17a),{'method':_0x21292c(0x1c9),'body':{'id':_0x821247['id'],'appCode':_0x821247[_0x21292c(0xf4)],..._0x821247[_0x21292c(0x1dc)]?{'roleType':_0x821247[_0x21292c(0x1dc)]}:{},..._0x821247['roleName']!==undefined?{'roleName':_0x821247[_0x21292c(0x1df)]}:{},..._0x821247[_0x21292c(0xf3)]!==undefined?{'remark':_0x821247[_0x21292c(0xf3)]}:{},..._0x821247['permits']?{'permits':_0x821247[_0x21292c(0x109)]}:{}}});return _0x1613cd['data'];}export async function deleteAppRole(_0x1f0ff4){const _0x15a00f=a208_0x5df3b4;await apiRequest(_0x15a00f(0xf8),{'method':_0x15a00f(0x1c9),'body':{'id':_0x1f0ff4}});}export async function listPermitRoles(_0x411e98,_0x7125d7){const _0x7a06f4=a208_0x5df3b4,_0x31b4ff=await apiRequest('/smartapi/permit/role/get-permit-list',{'method':_0x7a06f4(0x1c9),'body':{'appCode':_0x411e98,..._0x7125d7?.[_0x7a06f4(0x139)]!==undefined?{'needSelf':_0x7125d7['needSelf']}:{},..._0x7125d7?.[_0x7a06f4(0x11b)]!==undefined?{'needPublic':_0x7125d7[_0x7a06f4(0x11b)]}:{}}});return extractList(_0x31b4ff['data']);}export async function getRoleMenuResources(_0x2b6e0e,_0x28e59){const _0x2f0c0c=a208_0x5df3b4,_0x57a050=await apiRequest(_0x2f0c0c(0x179),{'method':'POST','body':{'appCode':_0x2b6e0e,'roleId':_0x28e59}});return extractList(_0x57a050[_0x2f0c0c(0x1b0)]);}export async function getRoleApiResources(_0x1e5adf,_0x152402){const _0x2e69de=a208_0x5df3b4,_0x972a38=await apiRequest('/smartapi/permit/resource/get-api-list',{'method':_0x2e69de(0x1c9),'body':{'appCode':_0x1e5adf,'roleId':_0x152402}});return extractList(_0x972a38[_0x2e69de(0x1b0)]);}export async function listRoleUsers(_0x24d058){const _0x317189=a208_0x5df3b4,_0x2a8c98=await apiRequest(_0x317189(0x1b7),{'method':_0x317189(0x1c9),'body':{'appCode':_0x24d058}});return extractList(_0x2a8c98[_0x317189(0x1b0)])[_0x317189(0x1de)](({id:_0x2d5680,userList:_0x4e7e1e,applyUserList:_0x384b38,..._0xd61e7d})=>({..._0xd61e7d,'id':Number(_0x2d5680),'userList':_0x4e7e1e[_0x317189(0x1de)](_0x23acfe=>({..._0x23acfe,'userId':Number(_0x23acfe[_0x317189(0xe8)])})),..._0x384b38?{'applyUserList':_0x384b38[_0x317189(0x1de)](_0x165439=>({..._0x165439,'userId':Number(_0x165439[_0x317189(0xe8)])}))}:{}}));}export async function updateRoleUsers(_0x30f5c7,_0x170e49){const _0xb88200=a208_0x5df3b4;await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':_0xb88200(0x1c9),'body':{'appCode':_0x30f5c7,'roleList':_0x170e49}});}export async function getPagePermit(_0x5644aa){const _0x3357d7=a208_0x5df3b4,_0x383d3c=await apiRequest(_0x3357d7(0x186)+buildQuery({'menuId':_0x5644aa}));return _0x383d3c[_0x3357d7(0x1b0)];}export async function savePagePermit(_0x4f882d){const _0x892106=a208_0x5df3b4,_0x4b709a=await apiRequest(_0x892106(0x1b1),{'method':_0x892106(0x1c9),'body':_0x4f882d});return _0x4b709a[_0x892106(0x1b0)];}export async function listCurrentUserTenantMemberships(){const _0x5a02d3=a208_0x5df3b4,_0x429d48=await apiRequest(_0x5a02d3(0x103));return extractList(_0x429d48[_0x5a02d3(0x1b0)]);}export async function listTenantDirectoryMembers(_0x3a072f){const _0x21e957=a208_0x5df3b4,_0x470fb2=await apiRequest(_0x21e957(0x1c1)+buildQuery({'code':_0x3a072f})),_0x1bf2a5=_0x470fb2[_0x21e957(0x1b0)]?.[_0x21e957(0xe5)];return Array[_0x21e957(0x16c)](_0x1bf2a5)?_0x1bf2a5:[];}export async function getTenantMembers(_0x1b7173){const _0x424eec=a208_0x5df3b4,_0x19cf4a=await listTenantDirectoryMembers(_0x1b7173);return _0x19cf4a[_0x424eec(0x16d)](_0x140560=>_0x140560['status']==='ENABLE'||_0x140560['status']===undefined)[_0x424eec(0x1de)](_0x9dbd9e=>({'userId':Number(_0x9dbd9e['userId']??_0x9dbd9e['id']),'username':_0x9dbd9e[_0x424eec(0x147)],'nickname':_0x9dbd9e[_0x424eec(0xec)],'status':_0x9dbd9e[_0x424eec(0x10f)],'email':_0x9dbd9e[_0x424eec(0x12d)],'mobile':_0x9dbd9e[_0x424eec(0x16b)],'avatar':_0x9dbd9e[_0x424eec(0x178)]}))['filter'](_0x326952=>Number[_0x424eec(0xf0)](_0x326952[_0x424eec(0xe8)])&&_0x326952['userId']>0x0);}
|
|
1
|
+
const a218_0x3b8605=a218_0x127f;(function(_0x56d763,_0x366a7c){const _0x992b32=a218_0x127f,_0x33c37e=_0x56d763();while(!![]){try{const _0x336f7c=parseInt(_0x992b32(0x10c))/0x1*(parseInt(_0x992b32(0x17a))/0x2)+-parseInt(_0x992b32(0x1d2))/0x3*(-parseInt(_0x992b32(0x177))/0x4)+-parseInt(_0x992b32(0x142))/0x5+parseInt(_0x992b32(0xfc))/0x6+parseInt(_0x992b32(0x1c3))/0x7*(-parseInt(_0x992b32(0x13a))/0x8)+-parseInt(_0x992b32(0x15f))/0x9*(parseInt(_0x992b32(0x11b))/0xa)+-parseInt(_0x992b32(0x1d3))/0xb*(parseInt(_0x992b32(0xff))/0xc);if(_0x336f7c===_0x366a7c)break;else _0x33c37e['push'](_0x33c37e['shift']());}catch(_0x34097c){_0x33c37e['push'](_0x33c37e['shift']());}}}(a218_0x12a1,0xea537));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x5bc1c9){_activeCookie=_0x5bc1c9||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x57e40,PLATFORM_TRANSPORT_FAILURE=Symbol(a218_0x3b8605(0x119)),PLATFORM_ERROR_CODE=Symbol('platform-error-code');export function isPlatformTransportFailure(_0x163f27){return Boolean(_0x163f27&&typeof _0x163f27==='object'&&_0x163f27[PLATFORM_TRANSPORT_FAILURE]===!![]);}export function getPlatformErrorCode(_0x4d79bf){const _0x1aeec1=a218_0x3b8605;if(!_0x4d79bf||typeof _0x4d79bf!==_0x1aeec1(0x166))return undefined;const _0x122768=_0x4d79bf[PLATFORM_ERROR_CODE];return typeof _0x122768==='string'&&_0x122768?_0x122768:undefined;}function createPlatformApiError(_0x247801,_0x4dfe2c){const _0xf0b92b=a218_0x3b8605,_0x1d8bf8=typeof _0x4dfe2c===_0xf0b92b(0x19a)?_0x4dfe2c[_0xf0b92b(0xe1)]():typeof _0x4dfe2c===_0xf0b92b(0x1a5)?String(_0x4dfe2c):'',_0x5f1765=CliErrors[_0xf0b92b(0x163)](_0x247801,_0x1d8bf8?'API\x20error\x20code:\x20'+_0x1d8bf8:undefined);return _0x1d8bf8&&(Object[_0xf0b92b(0x13f)](_0x5f1765,PLATFORM_ERROR_CODE,{'value':_0x1d8bf8}),Object['defineProperty'](_0x5f1765,_0xf0b92b(0x181),{'value':{'remoteErrorCode':_0x1d8bf8},'enumerable':![]})),_0x5f1765;}function createFetchFailureError(_0x4906d6,_0x2448eb){const _0x3663ae=a218_0x3b8605,_0x1b805d=_0x2448eb instanceof Error?_0x2448eb[_0x3663ae(0x172)]:String(_0x2448eb),_0x6e3e53=CliErrors['apiError'](_0x3663ae(0x12f)+_0x4906d6+(_0x1b805d?'\x20('+_0x1b805d+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');return Object[_0x3663ae(0x13f)](_0x6e3e53,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x6e3e53;}function createIndeterminateResponseError(_0x632d49){const _0x26f58a=a218_0x3b8605,_0x68c9f2=CliErrors[_0x26f58a(0x163)](_0x632d49+_0x26f58a(0x1d4),'The\x20server\x20outcome\x20is\x20indeterminate.\x20Verify\x20current\x20state\x20before\x20retrying\x20any\x20mutation.');return Object[_0x26f58a(0x13f)](_0x68c9f2,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x68c9f2;}async function apiRequest(_0x423268,_0x449d53={}){const _0x54a5b0=a218_0x3b8605,{method:method='GET',body:_0x55de5d,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x449d53,_0xd15fdc=useRuntime?getRuntimeDomain():getApiDomain(),_0x11c588=_activeCookie||getCookie(),_0x851eda=''+_0xd15fdc+_0x423268,_0xcb0c11=new AbortController(),_0x3b863f=setTimeout(()=>_0xcb0c11['abort'](),timeout);try{const _0x4cff01=await fetch(_0x851eda,{'method':method,'headers':{'Content-Type':_0x54a5b0(0x153),'Cookie':_0x11c588,'X-Invoke-Source':_0x54a5b0(0x100),...headers},'body':_0x55de5d?JSON[_0x54a5b0(0x1c6)](_0x55de5d):undefined,'signal':_0xcb0c11['signal']});let _0x5d9138;try{_0x5d9138=await _0x4cff01[_0x54a5b0(0x178)]();}catch(_0x5a904f){if(_0x5a904f instanceof Error&&_0x5a904f[_0x54a5b0(0x174)]===_0x54a5b0(0x1bf))throw CliErrors[_0x54a5b0(0x163)](_0x54a5b0(0x1e4)+_0x851eda);if(_0x4cff01['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x4cff01['status']+')',_0x4cff01[_0x54a5b0(0x18e)]>=0x190?_0x54a5b0(0xfe):undefined);}if(!_0x4cff01['ok']||_0x5d9138[_0x54a5b0(0x1d9)]===![])throw CliErrors[_0x54a5b0(0x163)](_0x5d9138[_0x54a5b0(0xf4)]||_0x5d9138[_0x54a5b0(0x172)]||'API\x20error:\x20'+_0x4cff01[_0x54a5b0(0x18e)],_0x5d9138[_0x54a5b0(0x117)]?'API\x20error\x20code:\x20'+_0x5d9138[_0x54a5b0(0x117)]:undefined);return _0x5d9138;}catch(_0x188022){if(_0x188022 instanceof CliError)throw _0x188022;if(_0x188022 instanceof Error&&_0x188022['name']===_0x54a5b0(0x1bf))throw CliErrors[_0x54a5b0(0x163)]('Request\x20timeout:\x20'+_0x851eda);throw createFetchFailureError(_0x851eda,_0x188022);}finally{clearTimeout(_0x3b863f);}}async function apiFormRequest(_0x226002,_0x104a93,_0x32d3ba={}){const _0x786a76=a218_0x3b8605,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x32d3ba,_0x411435=_activeCookie||getCookie(),_0x34ef90=''+getApiDomain()+_0x226002,_0x49fa6a=new AbortController(),_0x50174b=setTimeout(()=>_0x49fa6a['abort'](),timeout);try{const _0x4e5ad2=await fetch(_0x34ef90,{'method':_0x786a76(0xdb),'headers':{'Cookie':_0x411435,'X-Invoke-Source':'cli:rabetbase'},'body':_0x104a93,'signal':_0x49fa6a[_0x786a76(0xe2)]});let _0x171255;try{_0x171255=await _0x4e5ad2[_0x786a76(0x178)]();}catch(_0x2a2184){if(_0x2a2184 instanceof Error&&_0x2a2184[_0x786a76(0x174)]===_0x786a76(0x1bf))throw CliErrors[_0x786a76(0x163)]('Request\x20timeout:\x20'+_0x34ef90);throw CliErrors['apiError'](_0x786a76(0xfb)+_0x4e5ad2[_0x786a76(0x18e)]+')',_0x4e5ad2[_0x786a76(0x18e)]>=0x190?'Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.':undefined);}if(!_0x4e5ad2['ok']||_0x171255['success']===![])throw CliErrors[_0x786a76(0x163)](_0x171255[_0x786a76(0xf4)]||_0x171255['message']||_0x786a76(0x16e)+_0x4e5ad2[_0x786a76(0x18e)],_0x171255['errorCode']?_0x786a76(0x108)+_0x171255[_0x786a76(0x117)]:undefined);return _0x171255;}catch(_0x598e06){if(_0x598e06 instanceof CliError)throw _0x598e06;if(_0x598e06 instanceof Error&&_0x598e06[_0x786a76(0x174)]===_0x786a76(0x1bf))throw CliErrors[_0x786a76(0x163)](_0x786a76(0x1e4)+_0x34ef90);throw createFetchFailureError(_0x34ef90,_0x598e06);}finally{clearTimeout(_0x50174b);}}export async function uploadDevelopmentFile(_0x4de916,_0x1e9e8a){const _0x479393=a218_0x3b8605,_0x2447d5=await readFile(_0x1e9e8a),_0x53dd63=new FormData();_0x53dd63[_0x479393(0x103)](_0x479393(0x12a),_0x4de916),_0x53dd63[_0x479393(0x103)](_0x479393(0x1c7),new Blob([new Uint8Array(_0x2447d5)]),basename(_0x1e9e8a));const _0x4ec383=await apiFormRequest('/smartapi/common/uploadFile',_0x53dd63);return _0x4ec383['data'];}export async function queryDevelopmentFileUrl(_0x457b88,_0x5bd40e={}){const _0x2c2998=a218_0x3b8605,_0x4d4757=await apiRequest(_0x2c2998(0x128),{'method':_0x2c2998(0xdb),'body':{'filePath':_0x457b88,'downloadFlag':_0x5bd40e[_0x2c2998(0x147)]??![],..._0x5bd40e['longTerm']?{'longTerm':!![]}:{}}});return _0x4d4757[_0x2c2998(0x181)];}export async function recognizeDevelopmentOcr(_0x283ec7,_0xd0dff5){const _0x1fb8ad=a218_0x3b8605,_0x1c06fa=new URLSearchParams({'url':_0xd0dff5[_0x1fb8ad(0x10e)],'type':_0xd0dff5[_0x1fb8ad(0x1ca)],'appCode':_0x283ec7}),_0x53a52e=await apiRequest(_0x1fb8ad(0x11a)+_0x1c06fa[_0x1fb8ad(0xd5)](),{'method':_0x1fb8ad(0x194)});return _0x53a52e[_0x1fb8ad(0x181)];}export const DING_TALK_SANDBOX_BIND_PATH=a218_0x3b8605(0xe9);export async function bindDingTalkSandboxAccount(_0x2a560e){const _0x364b17=a218_0x3b8605,_0x2d47ae=await apiRequest(DING_TALK_SANDBOX_BIND_PATH,{'method':_0x364b17(0xdb),'body':{'dingTalkUserId':_0x2a560e}});return _0x2d47ae[_0x364b17(0x181)];}function isAuthFailure(_0x48cfd1){const _0xc073f0=a218_0x3b8605,_0x29dd28=_0x48cfd1[_0xc073f0(0xf4)]||_0x48cfd1[_0xc073f0(0x172)]||_0x48cfd1[_0xc073f0(0x181)]?.['message']||_0x48cfd1['errorMessage']||_0x48cfd1[_0xc073f0(0xe8)]||'';return _0x48cfd1[_0xc073f0(0x117)]===_0xc073f0(0x131)||_0x48cfd1[_0xc073f0(0xf5)]===0x191||_0x48cfd1['code']===_0xc073f0(0x1db)||_0x29dd28['includes'](_0xc073f0(0x1db))||_0x29dd28[_0xc073f0(0x154)](_0xc073f0(0x1e8))||_0x29dd28['includes']('登录')||_0x29dd28[_0xc073f0(0x154)]('认证');}export async function platformFetch(_0x305ae4,_0x36fff8){const _0x7438c8=a218_0x3b8605;let _0x3cdedb;try{_0x3cdedb=await fetch(_0x305ae4,{'method':_0x36fff8[_0x7438c8(0x10b)]??_0x7438c8(0x194),'headers':{'Content-Type':_0x7438c8(0x153),'Cookie':_0x36fff8[_0x7438c8(0x197)],'X-Invoke-Source':'cli:rabetbase'},..._0x36fff8[_0x7438c8(0x170)]&&{'body':JSON[_0x7438c8(0x1c6)](_0x36fff8[_0x7438c8(0x170)])}});}catch(_0x3afdd2){throw createFetchFailureError(_0x305ae4,_0x3afdd2);}let _0xcba092;try{_0xcba092=await _0x3cdedb['json']();}catch(_0x31b1a4){if(!_0x3cdedb['ok']){if(_0x3cdedb[_0x7438c8(0x18e)]===0x191)throw CliErrors[_0x7438c8(0x1ba)]();throw CliErrors[_0x7438c8(0x163)](_0x36fff8[_0x7438c8(0x15a)]+_0x7438c8(0x1cf)+_0x3cdedb['status']);}throw createFetchFailureError(_0x305ae4,_0x31b1a4);}if(_0xcba092===null||typeof _0xcba092!==_0x7438c8(0x166)||Array[_0x7438c8(0x1c8)](_0xcba092)){if(_0x3cdedb['status']===0x191)throw CliErrors[_0x7438c8(0x1ba)]();if(_0x3cdedb['ok'])throw createIndeterminateResponseError(_0x36fff8[_0x7438c8(0x15a)]);throw CliErrors['apiError'](_0x36fff8[_0x7438c8(0x15a)]+_0x7438c8(0x141)+(!_0x3cdedb['ok']?',\x20HTTP\x20'+_0x3cdedb['status']:'')+_0x7438c8(0x1ae));}const _0x534577=typeof _0xcba092[_0x7438c8(0x117)]===_0x7438c8(0x19a)||typeof _0xcba092[_0x7438c8(0x117)]===_0x7438c8(0x1a5),_0x113467=_0x534577?String(_0xcba092[_0x7438c8(0x117)])[_0x7438c8(0xe1)]():'',_0x10930b=_0xcba092['success']===![]||_0x534577&&_0x113467!==_0x7438c8(0x15e);if(!_0x3cdedb['ok']||_0x10930b){if(_0x3cdedb['status']===0x191||isAuthFailure(_0xcba092))throw CliErrors[_0x7438c8(0x1ba)]();throw createPlatformApiError(_0xcba092[_0x7438c8(0xf4)]||_0xcba092[_0x7438c8(0x172)]||_0x36fff8['label']+_0x7438c8(0x141)+(!_0x3cdedb['ok']?',\x20HTTP\x20'+_0x3cdedb[_0x7438c8(0x18e)]:''),_0xcba092[_0x7438c8(0x117)]??_0xcba092[_0x7438c8(0xf5)]);}if(_0xcba092[_0x7438c8(0x1d9)]!==!![]||_0xcba092[_0x7438c8(0x117)]!=='0000')throw createIndeterminateResponseError(_0x36fff8[_0x7438c8(0x15a)]);return _0xcba092[_0x7438c8(0x181)];}export async function platformRequest(_0x2ff275,_0x3df51c){const _0x506524=a218_0x3b8605;if(/^https?:\/\//i[_0x506524(0x198)](_0x2ff275))throw CliErrors['validation'](_0x506524(0x116)+_0x2ff275,'Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.');const _0x83b245=_0x2ff275[_0x506524(0x113)]('/')?_0x2ff275:'/'+_0x2ff275;return platformFetch(''+getApiDomain()+_0x83b245,_0x3df51c);}const MAX_KNOWLEDGE_BASE_PAGE_SIZE=0x64;function parseKnowledgeBaseInteger(_0x1b9ca3,_0x211c12){const _0x271fc9=a218_0x3b8605,_0x4fa8b7=typeof _0x1b9ca3==='number'?_0x1b9ca3:typeof _0x1b9ca3==='string'&&/^(0|[1-9]\d*)$/['test'](_0x1b9ca3)?Number(_0x1b9ca3):Number['NaN'],_0x3eb1b3=Number[_0x271fc9(0x1b4)](_0x4fa8b7)&&(_0x211c12==='id'?_0x4fa8b7>0x0:_0x4fa8b7>=0x0);if(!_0x3eb1b3)throw CliErrors[_0x271fc9(0x163)](_0x271fc9(0xd4)+_0x211c12+'.');return _0x4fa8b7;}function parseKnowledgeBaseText(_0x97855e,_0xca6733){const _0x281b55=a218_0x3b8605;if(typeof _0x97855e==='string'&&(_0xca6733===_0x281b55(0x1ac)||_0x97855e[_0x281b55(0xe1)]()))return _0x97855e;throw CliErrors['apiError'](_0x281b55(0x11d)+_0xca6733+'.');}function parseKnowledgeBaseRecord(_0x44d845){const _0x4a9082=a218_0x3b8605;if(!_0x44d845||typeof _0x44d845!=='object'||Array[_0x4a9082(0x1c8)](_0x44d845))throw CliErrors[_0x4a9082(0x163)](_0x4a9082(0x125));const _0x5e7f94=_0x44d845;if(_0x5e7f94['scope']!==_0x4a9082(0x121)&&_0x5e7f94['scope']!==_0x4a9082(0x1b2))throw CliErrors[_0x4a9082(0x163)](_0x4a9082(0xf7));const _0x33e321={'id':parseKnowledgeBaseInteger(_0x5e7f94['id'],'id'),'scope':_0x5e7f94[_0x4a9082(0x191)],'appCode':parseKnowledgeBaseText(_0x5e7f94['appCode'],_0x4a9082(0x12a)),'title':parseKnowledgeBaseText(_0x5e7f94[_0x4a9082(0x17e)],_0x4a9082(0x17e)),'version':parseKnowledgeBaseInteger(_0x5e7f94[_0x4a9082(0x13c)],_0x4a9082(0x13c)),'content':parseKnowledgeBaseText(_0x5e7f94[_0x4a9082(0x1ac)],_0x4a9082(0x1ac))};return(_0x5e7f94[_0x4a9082(0xef)]===null||typeof _0x5e7f94[_0x4a9082(0xef)]===_0x4a9082(0x19a)||typeof _0x5e7f94['createTime']===_0x4a9082(0x1a5))&&(_0x33e321['createTime']=_0x5e7f94[_0x4a9082(0xef)]),(_0x5e7f94['updateTime']===null||typeof _0x5e7f94[_0x4a9082(0x1e1)]===_0x4a9082(0x19a)||typeof _0x5e7f94[_0x4a9082(0x1e1)]===_0x4a9082(0x1a5))&&(_0x33e321['updateTime']=_0x5e7f94['updateTime']),_0x33e321;}export async function listEnterpriseKnowledgeBases(_0x4165e7,_0x4607ce={}){const _0x4624e7=a218_0x3b8605,_0x2405ee=_0x4607ce[_0x4624e7(0xeb)]??0x32;if(!Number[_0x4624e7(0x1b4)](_0x2405ee)||_0x2405ee<0x1||_0x2405ee>MAX_KNOWLEDGE_BASE_PAGE_SIZE)throw CliErrors[_0x4624e7(0x199)](_0x4624e7(0x1e2)+MAX_KNOWLEDGE_BASE_PAGE_SIZE+'.');const _0x43aeec=await platformRequest('/admin/knowledge-base/get-list',{'method':_0x4624e7(0xdb),'cookie':_0x4165e7,'label':_0x4624e7(0x123),'body':{'currentPage':_0x4607ce[_0x4624e7(0x1ad)]??0x1,'pageSize':_0x2405ee,'scope':_0x4624e7(0x121),..._0x4607ce[_0x4624e7(0x12a)]?{'appCode':_0x4607ce[_0x4624e7(0x12a)]}:{},..._0x4607ce[_0x4624e7(0x17e)]?{'title':_0x4607ce['title']}:{}}});if(!_0x43aeec||typeof _0x43aeec!=='object'||Array[_0x4624e7(0x1c8)](_0x43aeec)||!Array[_0x4624e7(0x1c8)](_0x43aeec['tableData']))throw CliErrors[_0x4624e7(0x163)](_0x4624e7(0x17d));const _0x5c0bde=extractPaging(_0x43aeec);if(!_0x5c0bde||!Number[_0x4624e7(0x1a3)](_0x5c0bde[_0x4624e7(0x1ad)])||!Number['isInteger'](_0x5c0bde[_0x4624e7(0xeb)])||!Number['isInteger'](_0x5c0bde['totalCount'])||_0x5c0bde[_0x4624e7(0x1ad)]<0x1||_0x5c0bde[_0x4624e7(0xeb)]<0x1||_0x5c0bde[_0x4624e7(0xeb)]>MAX_KNOWLEDGE_BASE_PAGE_SIZE||_0x5c0bde[_0x4624e7(0x155)]<0x0)throw CliErrors['apiError'](_0x4624e7(0x196));return{'items':extractList(_0x43aeec)[_0x4624e7(0x10a)](parseKnowledgeBaseRecord),'paging':_0x5c0bde};}export async function getEnterpriseKnowledgeBase(_0x2c80bd,_0x428e01){const _0x4edee2=a218_0x3b8605,_0x1cb704=await platformRequest(_0x4edee2(0x151)+buildQuery({'id':_0x428e01}),{'cookie':_0x2c80bd,'label':_0x4edee2(0x1b9)});return parseKnowledgeBaseRecord(_0x1cb704);}export async function createEnterpriseKnowledgeBase(_0x2293aa,_0x159f21){const _0x854a2d=a218_0x3b8605,_0x15c502=await platformRequest(_0x854a2d(0x137),{'method':'POST','cookie':_0x2293aa,'label':_0x854a2d(0x1b7),'body':{'scope':'company',..._0x159f21}});return parseKnowledgeBaseRecord(_0x15c502);}export async function updateEnterpriseKnowledgeBase(_0x571b31,_0x53c226){const _0x495789=a218_0x3b8605;if(_0x53c226['title']===undefined&&_0x53c226[_0x495789(0x1ac)]===undefined)throw CliErrors['validation'](_0x495789(0x1bb));const _0x2a6308=await platformRequest('/admin/knowledge-base/update',{'method':_0x495789(0xdb),'cookie':_0x571b31,'label':'Update\x20enterprise\x20knowledge\x20base','body':{'id':_0x53c226['id'],..._0x53c226[_0x495789(0x17e)]!==undefined?{'title':_0x53c226[_0x495789(0x17e)]}:{},..._0x53c226[_0x495789(0x1ac)]!==undefined?{'content':_0x53c226[_0x495789(0x1ac)]}:{}}});return parseKnowledgeBaseRecord(_0x2a6308);}export async function deleteEnterpriseKnowledgeBase(_0x1b4ed7,_0x1c020b){const _0x54ce46=a218_0x3b8605;await platformRequest('/admin/knowledge-base/delete',{'method':'POST','cookie':_0x1b4ed7,'label':_0x54ce46(0x17c),'body':{'id':_0x1c020b}});}function cleanNewlines(_0x3d3bac){const _0x1d0d10=a218_0x3b8605;return _0x3d3bac[_0x1d0d10(0x14a)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x225744){const _0x159fea=a218_0x3b8605;if(!_0x225744['name'])return _0x225744;return{..._0x225744,'name':cleanNewlines(_0x225744[_0x159fea(0x174)])};}export async function fetchModelList(_0x34831f,_0x527651){const _0xa8e442=a218_0x3b8605,_0xcc86f6=getEnv(),_0x2bbaf2=new URLSearchParams({'appcode':_0x34831f,'otype':_0xa8e442(0xe0)}),_0x528707='/api/node-toolbox/dataset/model-list?'+_0x2bbaf2['toString']();logger[_0xa8e442(0x1e5)]('fetch-model-list',_0xa8e442(0x180)+_0xcc86f6+')',{'apiPath':_0x528707});const _0x27c141=await platformRequest(_0x528707,{'cookie':_0x527651,'label':_0xa8e442(0x1cc)}),_0x5cd6b6=(_0x27c141[_0xa8e442(0x16c)]??[])[_0xa8e442(0x10a)](cleanDatasetName);return{'configArray':_0x5cd6b6,'count':_0x5cd6b6['length']};}export async function fetchDatasetDoc(_0x55bbed){const _0x5e3870=a218_0x3b8605,{appCode:_0x5bbe8e,cookie:_0x532b3c,datasetCode:_0x185541,datasetId:_0x4c7b3b,extraParams:_0x4f9c9d}=_0x55bbed,_0x4434f5=await platformRequest(_0x5e3870(0x1b5),{'method':_0x5e3870(0xdb),'body':{'appCode':_0x5bbe8e,'datasetCode':_0x185541,'datasetId':_0x4c7b3b,..._0x4f9c9d||{}},'cookie':_0x532b3c,'label':'Fetch\x20doc\x20('+_0x185541+')'});if(!_0x4434f5||typeof _0x4434f5[_0x5e3870(0x162)]!==_0x5e3870(0x19a))throw new Error(_0x5e3870(0x16b)+_0x185541+_0x5e3870(0xfd));return _0x4434f5[_0x5e3870(0x162)];}export async function getMenuTree(_0x3adf13,_0xcdd449){const _0x2e1883=a218_0x3b8605,_0x2db3c0=new URLSearchParams({'appCode':_0x3adf13});return platformRequest(_0x2e1883(0xed)+_0x2db3c0['toString'](),{'cookie':_0xcdd449,'label':_0x2e1883(0x1bd)});}export async function createMenuRecord(_0x522d21,_0x3a57cb,_0x3d79e8){const _0x1a022f=a218_0x3b8605;return platformRequest('/smartapi/menu/create',{'method':_0x1a022f(0xdb),'body':_0x522d21,'cookie':_0x3a57cb,'label':_0x3d79e8});}function a218_0x127f(_0x18a133,_0x460825){_0x18a133=_0x18a133-0xd4;const _0x12a14e=a218_0x12a1();let _0x127f0d=_0x12a14e[_0x18a133];return _0x127f0d;}export async function updateMenuRecord(_0x5aa9ea,_0x4876e4,_0x16b0a6){const _0x509e8f=a218_0x3b8605;return platformRequest(_0x509e8f(0x1d6),{'method':_0x509e8f(0xdb),'body':_0x5aa9ea,'cookie':_0x4876e4,'label':_0x16b0a6});}export async function deleteMenuRecord(_0x2ece5c,_0x13111b,_0x48e901){const _0x3d8eb7=a218_0x3b8605;return platformRequest('/smartapi/menu/delete',{'method':_0x3d8eb7(0xdb),'body':{'id':_0x2ece5c},'cookie':_0x13111b,'label':_0x48e901});}export async function batchDeleteMenuRecords(_0x2730c0,_0xab1658,_0x305d4d){const _0x16df9e=a218_0x3b8605;return platformRequest(_0x16df9e(0x19c),{'method':_0x16df9e(0xdb),'body':{'idList':_0x2730c0},'cookie':_0xab1658,'label':_0x305d4d});}export async function startMenuRegroup(_0x525dd4,_0x5e7c46,_0x5a47e2){const _0x4b54c5=a218_0x3b8605;return platformRequest(_0x4b54c5(0x152),{'method':'POST','body':_0x525dd4,'cookie':_0x5e7c46,'label':_0x5a47e2});}export async function getAsyncTaskStatus(_0x25cbeb,_0x42182d,_0x17e824){const _0x9716ab=a218_0x3b8605,_0x3d34eb=new URLSearchParams({'appCode':_0x42182d});return platformRequest(_0x9716ab(0x16f)+encodeURIComponent(_0x25cbeb)+'?'+_0x3d34eb[_0x9716ab(0xd5)](),{'cookie':_0x17e824,'label':'Fetch\x20async\x20task\x20'+_0x25cbeb});}export async function listBffScripts(_0x55d81f,_0x33bfa3,_0x230686){const _0x3d3011=a218_0x3b8605;let _0x8e6d1c=_0x3d3011(0x171)+_0x55d81f;if(_0x33bfa3)_0x8e6d1c+=_0x3d3011(0x18d)+_0x33bfa3;const _0x294dba=await apiRequest(_0x8e6d1c);let _0x3c9911=extractList(_0x294dba[_0x3d3011(0x181)]);if(_0x230686?.[_0x3d3011(0xf2)]){const _0x3bc409=_0x230686[_0x3d3011(0xf2)][_0x3d3011(0x187)]();_0x3c9911=_0x3c9911[_0x3d3011(0x1a2)](_0x2717ee=>_0x2717ee[_0x3d3011(0x1c4)]?.[_0x3d3011(0x187)]()[_0x3d3011(0x154)](_0x3bc409)||_0x2717ee[_0x3d3011(0xd6)]?.[_0x3d3011(0x187)]()['includes'](_0x3bc409));}return _0x3c9911;}export async function getBffScriptInfo(_0x4ed6ff){const _0x3068cf=a218_0x3b8605,_0x26db4b=await apiRequest(_0x3068cf(0x192)+_0x4ed6ff);if(!_0x26db4b[_0x3068cf(0x181)])throw CliErrors[_0x3068cf(0x199)]('BFF\x20script\x20not\x20found:\x20id='+_0x4ed6ff);return _0x26db4b[_0x3068cf(0x181)];}export async function saveBffScript(_0x35d10a){const _0x55dbeb=a218_0x3b8605,_0xc5474b=await apiRequest('/api/management/library/scripts/save',{'method':'POST','body':_0x35d10a}),{id:_0x1fc782,entity:_0x2b1e0c}=normalizeEntityWithIdResponse(_0xc5474b[_0x55dbeb(0x181)]);if(_0x1fc782!==undefined){const _0x415812=typeof _0x2b1e0c[_0x55dbeb(0x1c4)]===_0x55dbeb(0x19a)||typeof _0x2b1e0c['scriptType']===_0x55dbeb(0x19a)?_0x2b1e0c:undefined;return{'id':_0x1fc782,'script':_0x415812};}throw CliErrors[_0x55dbeb(0x163)]('BFF\x20save\x20returned\x20no\x20valid\x20id');}export async function deleteBffScript(_0x40ab85){const _0xad1a91=a218_0x3b8605;await apiRequest('/api/management/library/scripts/delete',{'method':_0xad1a91(0xdb),'body':{'id':_0x40ab85}});}export async function getBffScriptStatistics(_0x3d46a9){const _0x4fbd22=a218_0x3b8605,_0x53e599=await apiRequest(_0x4fbd22(0xd8)+_0x3d46a9);return extractList(_0x53e599['data']);}export async function clearBffScriptCache(){const _0x482306=a218_0x3b8605,_0x501187=await apiRequest(_0x482306(0x190),{'method':_0x482306(0xdb),'useRuntime':!![]});return typeof _0x501187['data']===_0x482306(0x19a)?_0x501187['data']:'';}export async function listBffDatasetOperations(_0x50b92c,_0x45ab86){const _0x349816=a218_0x3b8605,_0x188d45=await apiRequest(_0x349816(0x10f),{'method':_0x349816(0xdb),'body':{'appCode':_0x50b92c,'datasetId':_0x45ab86}});return _0x188d45[_0x349816(0x181)];}export async function listSqlQueries(_0x544252,_0x430a9f){const _0x255651=a218_0x3b8605,_0x22622f=await apiRequest(_0x255651(0x148),{'method':'POST','body':{'appCode':_0x544252,'currentPage':_0x430a9f?.[_0x255651(0x1ad)]??0x1,'pageSize':_0x430a9f?.[_0x255651(0xeb)]??0x32,'sqlCode':_0x430a9f?.[_0x255651(0x1a9)],'sqlName':_0x430a9f?.[_0x255651(0x149)]}});return _0x22622f[_0x255651(0x181)];}export async function getSqlQueryInfo(_0x5d68d3,_0x5f561f){const _0x58c871=a218_0x3b8605,_0x435639=await listSqlQueries(_0x5d68d3,{'sqlCode':_0x5f561f}),_0x2099da=_0x435639[_0x58c871(0x1a6)]?.[0x0];if(!_0x2099da)throw CliErrors['validation'](_0x58c871(0x19d)+_0x5f561f);return _0x2099da;}export async function getSqlQueryDetail(_0x1d7608){const _0x251380=a218_0x3b8605,_0x3ff5bf=await apiRequest(_0x251380(0x134)+(_0x251380(0x138)+encodeURIComponent(_0x1d7608)));if(!_0x3ff5bf[_0x251380(0x181)])throw CliErrors[_0x251380(0x199)](_0x251380(0x19d)+_0x1d7608);return _0x3ff5bf[_0x251380(0x181)];}export async function getSqlQueryDetailById(_0xd963f5){const _0x5b50f4=a218_0x3b8605,_0x52eb3d=await apiRequest(_0x5b50f4(0x1c9)+_0xd963f5);if(!_0x52eb3d[_0x5b50f4(0x181)])throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20id='+_0xd963f5);return _0x52eb3d[_0x5b50f4(0x181)];}export async function createSqlQuery(_0x181c9c){const _0x2dcdb6=a218_0x3b8605,_0x5caf06=await apiRequest(_0x2dcdb6(0xf0),{'method':_0x2dcdb6(0xdb),'body':_0x181c9c}),{id:_0x5bf062,entity:_0x3bd3e4}=normalizeEntityWithIdResponse(_0x5caf06[_0x2dcdb6(0x181)]);if(!(_0x2dcdb6(0x1a9)in _0x3bd3e4)&&_0x5bf062)return getSqlQueryDetailById(_0x5bf062);return normalizeSqlQueryEntity(_0x3bd3e4);}export async function updateSqlQuery(_0x59fdf0){const _0x221d43=a218_0x3b8605,_0xbba543=await apiRequest(_0x221d43(0x175),{'method':_0x221d43(0xdb),'body':_0x59fdf0}),{id:_0x21aa8f,entity:_0x20ba62}=normalizeEntityWithIdResponse(_0xbba543[_0x221d43(0x181)]);if(!(_0x221d43(0x1a9)in _0x20ba62)){if(_0x59fdf0['sqlCode'])return getSqlQueryDetail(_0x59fdf0[_0x221d43(0x1a9)]);if(_0x21aa8f)return getSqlQueryDetailById(_0x21aa8f);}return normalizeSqlQueryEntity(_0x20ba62);}export async function deleteSqlQuery(_0x22d297){const _0x27258a=a218_0x3b8605;await apiRequest(_0x27258a(0x1da),{'method':_0x27258a(0xdb),'body':_0x22d297});}export async function saveSqlQuery(_0x4252fd){const _0x2c0e48=a218_0x3b8605,_0x2775ac=await apiRequest(_0x2c0e48(0x182),{'method':_0x2c0e48(0xdb),'body':_0x4252fd});return _0x2775ac[_0x2c0e48(0x181)];}function normalizeSqlQueryEntity(_0x2966c4){const _0x5f55d4=a218_0x3b8605;return{..._0x2966c4,'id':Number(_0x2966c4['id']),'dbId':_0x2966c4[_0x5f55d4(0x1df)]==null?undefined:Number(_0x2966c4['dbId']),'version':_0x2966c4['version']==null?undefined:Number(_0x2966c4[_0x5f55d4(0x13c)])};}export async function executeSql(_0x5058fb,_0x14a342,_0x17658e){const _0x388633=a218_0x3b8605,_0x2b3c57=await apiRequest(_0x388633(0x130),{'method':_0x388633(0xdb),'body':{'appCode':_0x5058fb,'sqlCode':_0x14a342,..._0x17658e&&{'params':_0x17658e}},'useRuntime':!![]});return _0x2b3c57[_0x388633(0x181)];}export async function executeDatasetDataOperation(_0x22b75e,_0x353301,_0x36c675,_0x486fde={}){const _0x524daf=a218_0x3b8605;try{const _0x5f0be8=await apiRequest('/api/'+_0x22b75e+'/'+_0x353301+'/'+_0x36c675,{'method':_0x524daf(0xdb),'body':_0x486fde,'useRuntime':!![]});return _0x5f0be8[_0x524daf(0x181)];}catch(_0x41b5c7){if(_0x36c675===_0x524daf(0xe3)&&_0x41b5c7 instanceof CliError&&_0x41b5c7['code']===_0x524daf(0xde)&&_0x486fde['id']!==undefined&&_0x486fde['id']!==null&&_0x486fde['id']!==''){const _0x21035f=await apiRequest('/api/'+_0x22b75e+'/'+_0x353301+_0x524daf(0xe7),{'method':_0x524daf(0xdb),'body':{'where':{'id':{'$eq':_0x486fde['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x966211=Array[_0x524daf(0x1c8)](_0x21035f[_0x524daf(0x181)]?.[_0x524daf(0x1a6)])?_0x21035f[_0x524daf(0x181)][_0x524daf(0x1a6)]:[];return _0x966211[0x0]??null;}throw _0x41b5c7;}}export async function listDatasets(_0x2bbae3,_0xc91e5){const _0x53eafd=a218_0x3b8605,_0xb50f21={'appCode':_0x2bbae3,'deleted':_0xc91e5?.[_0x53eafd(0x1b0)]??![]};if(_0xc91e5?.[_0x53eafd(0xf5)])_0xb50f21['code']=_0xc91e5[_0x53eafd(0xf5)];if(_0xc91e5?.[_0x53eafd(0x174)])_0xb50f21[_0x53eafd(0x174)]=_0xc91e5[_0x53eafd(0x174)];const _0x470867=await apiRequest('/smartapi/dataset/get-dataset-list',{'method':_0x53eafd(0xdb),'body':_0xb50f21});return extractList(_0x470867[_0x53eafd(0x181)]);}export async function deleteDataset(_0x3a6ac2,_0xe836bc){const _0x15cfd7=a218_0x3b8605;await apiRequest(_0x15cfd7(0x15b),{'method':_0x15cfd7(0xdb),'body':{'appCode':_0x3a6ac2,'datasetId':_0xe836bc}});}export async function restoreDataset(_0x3a3c6f,_0x49954d){const _0x20a8fd=a218_0x3b8605;await apiRequest(_0x20a8fd(0x1d0),{'method':_0x20a8fd(0xdb),'body':{'appCode':_0x3a3c6f,'datasetId':_0x49954d}});}export async function previewTextGeneratedDataset(_0x51cbbf,_0x5b54ab){const _0x14f680=a218_0x3b8605,_0x252488=await apiRequest(_0x14f680(0x11e),{'method':_0x14f680(0xdb),'body':{'appCode':_0x51cbbf,'datasetName':_0x5b54ab['datasetName'],'requirementDescription':_0x5b54ab[_0x14f680(0x118)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x252488[_0x14f680(0x181)];}export async function startTextGeneratedDataset(_0x2cd5eb,_0x165700,_0x38f5b0){const _0x182cc8=a218_0x3b8605,_0x14b9d9=await apiRequest('/smartapi/dataset/text-generate/start',{'method':_0x182cc8(0xdb),'body':{'appCode':_0x2cd5eb,..._0x38f5b0?.[_0x182cc8(0x157)]?{'clientOperationId':_0x38f5b0['clientOperationId']}:{},'design':_0x165700},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x14b9d9[_0x182cc8(0x181)];}export async function getTextGeneratedDatasetStatus(_0x3fa4e8,_0xf1ce7a){const _0x3847f6=a218_0x3b8605,_0x2c8cd5=new URLSearchParams({'appCode':_0x3fa4e8});if(_0xf1ce7a[_0x3847f6(0x167)])_0x2c8cd5[_0x3847f6(0xf9)](_0x3847f6(0x1c2),_0xf1ce7a[_0x3847f6(0x167)]);else{if(_0xf1ce7a[_0x3847f6(0x1c2)])_0x2c8cd5[_0x3847f6(0xf9)](_0x3847f6(0x1c2),_0xf1ce7a[_0x3847f6(0x1c2)]);else _0xf1ce7a[_0x3847f6(0x157)]&&_0x2c8cd5[_0x3847f6(0xf9)](_0x3847f6(0x157),_0xf1ce7a[_0x3847f6(0x157)]);}const _0x2708eb=await apiRequest(_0x3847f6(0x111)+_0x2c8cd5[_0x3847f6(0xd5)]());return _0x2708eb[_0x3847f6(0x181)];}export async function searchDatasets(_0x40769d,_0x10cd7b){const _0x5a3255=a218_0x3b8605,_0x44844a=await listDatasets(_0x40769d,{'name':_0x10cd7b}),_0x163401=_0x10cd7b[_0x5a3255(0x187)](),_0x22b4cb=new Set(_0x44844a[_0x5a3255(0x10a)](_0x3a1b79=>_0x3a1b79['id'])),_0x126b25=_0x44844a[_0x5a3255(0x1a2)](_0x4ef566=>_0x4ef566[_0x5a3255(0x1aa)]?.['tableName']?.[_0x5a3255(0x187)]()[_0x5a3255(0x154)](_0x163401)||_0x4ef566[_0x5a3255(0xd6)]?.[_0x5a3255(0x187)]()[_0x5a3255(0x154)](_0x163401)),_0x10a8ee=await listDatasets(_0x40769d,{'code':_0x10cd7b});for(const _0x2e3a5c of _0x10a8ee){!_0x22b4cb[_0x5a3255(0x169)](_0x2e3a5c['id'])&&(_0x44844a['push'](_0x2e3a5c),_0x22b4cb['add'](_0x2e3a5c['id']));}return _0x44844a;}export function normalizeDatasetOperations(_0x3cc05d){const _0x650e66=a218_0x3b8605;if(Array[_0x650e66(0x1c8)](_0x3cc05d))return _0x3cc05d[_0x650e66(0x1a2)](_0x40800d=>_0x40800d!=null&&typeof _0x40800d===_0x650e66(0x166));if(_0x3cc05d&&typeof _0x3cc05d==='object')return Object[_0x650e66(0x1a1)](_0x3cc05d)['filter'](([,_0x248eac])=>_0x248eac!=null&&typeof _0x248eac==='object')[_0x650e66(0x10a)](([_0x5e2865,_0x68d748])=>({..._0x68d748,'name':_0x68d748[_0x650e66(0x174)]??_0x68d748['operationName']??_0x5e2865}));return[];}export async function getDatasetDetail(_0x3339f9){const _0x4afa3b=a218_0x3b8605,_0x5e33cf=/^\d+$/['test'](_0x3339f9)?'id':_0x4afa3b(0xf5),_0x2cc602=await apiRequest(_0x4afa3b(0x1e6)+_0x5e33cf+'='+_0x3339f9);return _0x2cc602['data'];}export async function updateDrivenData(_0x40eb67){const _0x533cc6=a218_0x3b8605,_0x5a2ab2=await apiRequest(_0x533cc6(0x1d1),{'method':'POST','body':_0x40eb67});return _0x5a2ab2[_0x533cc6(0x181)];}export async function getDatasetOperations(_0x37a877){const _0x4b2f66=a218_0x3b8605,_0x58cb49=await getDatasetDetail(_0x37a877),_0x209659=normalizeDatasetOperations(_0x58cb49[_0x4b2f66(0x1bc)])[_0x4b2f66(0x10a)](_0x4503cf=>({'name':_0x4503cf[_0x4b2f66(0x174)]||_0x4503cf[_0x4b2f66(0x1a4)],'displayName':_0x4503cf[_0x4b2f66(0x1b8)]||_0x4503cf[_0x4b2f66(0x174)],'type':_0x4503cf[_0x4b2f66(0x1ca)],'method':_0x4503cf[_0x4b2f66(0x10b)],'path':_0x4503cf[_0x4b2f66(0xf6)],'enabled':_0x4503cf[_0x4b2f66(0x143)]??!![],'requestFields':_0x4503cf[_0x4b2f66(0x168)],'responseFields':_0x4503cf[_0x4b2f66(0xfa)]}));return{'dataset':{'id':_0x58cb49['id']??_0x58cb49[_0x4b2f66(0x1dc)],'name':_0x58cb49[_0x4b2f66(0x174)],'code':_0x58cb49[_0x4b2f66(0xf5)]||_0x58cb49[_0x4b2f66(0xd9)],'tableName':_0x58cb49[_0x4b2f66(0x12d)]||_0x58cb49[_0x4b2f66(0x1aa)]?.['tableName']},'operations':_0x209659};}export async function getOperationDetail(_0x165f4f,_0x430bbe,_0x568b15){const _0xd7b398=a218_0x3b8605;let _0x2046db=_0x430bbe;if(!/^\d+$/[_0xd7b398(0x198)](_0x430bbe)){const _0x2b6fd8=await listDatasets(_0x165f4f,{'code':_0x430bbe}),_0x4f8df0=_0x2b6fd8[_0xd7b398(0x1d7)](_0x3d416c=>_0x3d416c[_0xd7b398(0xf5)]===_0x430bbe||String(_0x3d416c['id'])===_0x430bbe);if(!_0x4f8df0)throw CliErrors['validation']('Dataset\x20not\x20found:\x20'+_0x430bbe);_0x2046db=String(_0x4f8df0['id']);}const _0xc983be=await getDatasetDetail(_0x2046db),_0x326f32=normalizeDatasetOperations(_0xc983be['operations'])[_0xd7b398(0x1d7)](_0x1434c2=>(_0x1434c2[_0xd7b398(0x174)]||_0x1434c2[_0xd7b398(0x1a4)])===_0x568b15);if(!_0x326f32)throw CliErrors[_0xd7b398(0x199)]('Operation\x20\x22'+_0x568b15+_0xd7b398(0xe5)+_0x430bbe);return{'dataset':{'id':_0xc983be['id']??_0xc983be['modelId'],'name':_0xc983be[_0xd7b398(0x174)],'code':_0xc983be[_0xd7b398(0xf5)]||_0xc983be[_0xd7b398(0xd9)],'tableName':_0xc983be[_0xd7b398(0x12d)]||_0xc983be[_0xd7b398(0x1aa)]?.[_0xd7b398(0x12d)]},'operation':_0x326f32};}export async function getAppInfo(_0x1b3bb0){const _0x220a93=a218_0x3b8605,_0x5a7a1=await apiRequest(_0x220a93(0x139)+buildQuery({'appCode':_0x1b3bb0}));return _0x5a7a1[_0x220a93(0x181)];}export async function getI18nInfo(_0x1bb585){const _0x2fbda1=a218_0x3b8605,_0x56e8fd=await getAppInfo(_0x1bb585);return{'enableI18n':_0x56e8fd['enableI18n'],..._0x56e8fd[_0x2fbda1(0x136)]};}export async function createReactPage(_0x212126){const _0x4e647e=a218_0x3b8605,_0x1025bd=await apiRequest(_0x4e647e(0x1e3),{'method':_0x4e647e(0xdb),'body':{'appCode':_0x212126['appCode'],'pageName':_0x212126['pageName'],..._0x212126[_0x4e647e(0x1e7)]!=null?{'parentMenuId':_0x212126[_0x4e647e(0x1e7)]}:{},'createMenu':_0x212126[_0x4e647e(0x18a)],'codeContent':_0x212126[_0x4e647e(0x146)]}});return{'pageId':_0x1025bd[_0x4e647e(0x181)][_0x4e647e(0x14d)],'pageName':_0x1025bd[_0x4e647e(0x181)][_0x4e647e(0xd7)]??_0x212126[_0x4e647e(0x183)],'appCode':_0x212126[_0x4e647e(0x12a)],'version':_0x1025bd[_0x4e647e(0x181)]['draftVersion']??0x0,'menuId':_0x1025bd['data'][_0x4e647e(0x12e)]?.['id']??null,'menuPath':_0x1025bd[_0x4e647e(0x181)][_0x4e647e(0x12e)]?.[_0x4e647e(0xf6)]??null,'files':_0x1025bd[_0x4e647e(0x181)][_0x4e647e(0x146)]};}export async function updateReactPageContent(_0x14b9ac){const _0x126d05=a218_0x3b8605,_0x57333=await apiRequest('/smartapi/webcode/page/update/content',{'method':_0x126d05(0xdb),'body':{'id':_0x14b9ac[_0x126d05(0x14d)],'codeContent':_0x14b9ac['pageContent']}});return{'pageId':_0x14b9ac[_0x126d05(0x14d)],'newVersion':_0x57333[_0x126d05(0x181)]};}export async function publishReactPage(_0x2a8a53){const _0x1a25fb=a218_0x3b8605,_0x5dce11=await apiRequest(_0x1a25fb(0x161),{'method':'POST','body':{'id':_0x2a8a53[_0x1a25fb(0x14d)],..._0x2a8a53[_0x1a25fb(0x115)]?{'remark':_0x2a8a53['remark']}:{}}});return _0x5dce11[_0x1a25fb(0x181)];}export async function getReactPageSource(_0x8c653d){const _0x561671=a218_0x3b8605,_0x1829a7=await apiRequest(_0x561671(0x12c)+buildQuery({'id':_0x8c653d}));if(!_0x1829a7[_0x561671(0x181)])throw CliErrors[_0x561671(0x199)](_0x561671(0x1b1)+_0x8c653d);return _0x1829a7[_0x561671(0x181)];}export async function startGenerateStandardPages(_0x2102db,_0x249c88,_0x1daf4b){const _0x154536=a218_0x3b8605,_0x410fd5=await apiRequest(_0x154536(0x179)+_0x249c88+'/generate-standard-pages/start',{'method':'POST','body':{'appCode':_0x2102db,..._0x1daf4b?.[_0x154536(0x157)]?{'clientOperationId':_0x1daf4b[_0x154536(0x157)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x410fd5['data'];}export async function getGenerateStandardPagesStatus(_0x14d01f,_0x457b34,_0x50c270){const _0x176387=a218_0x3b8605,_0x2e48ef=new URLSearchParams({'appCode':_0x14d01f});_0x50c270[_0x176387(0x167)]&&_0x2e48ef[_0x176387(0xf9)](_0x176387(0x167),_0x50c270[_0x176387(0x167)]);_0x50c270[_0x176387(0x1c2)]&&_0x2e48ef[_0x176387(0xf9)]('operationId',_0x50c270['operationId']);_0x50c270['clientOperationId']&&_0x2e48ef[_0x176387(0xf9)](_0x176387(0x157),_0x50c270['clientOperationId']);const _0x411b5e=await apiRequest(_0x176387(0x179)+_0x457b34+_0x176387(0x106)+_0x2e48ef[_0x176387(0xd5)]());return _0x411b5e[_0x176387(0x181)];}export async function getStandardPageStatus(_0x471177,_0x73abb5){const _0x35a758=a218_0x3b8605,_0x4731f8=await apiRequest(_0x35a758(0x179)+_0x73abb5+_0x35a758(0x122)+encodeURIComponent(_0x471177));return _0x4731f8[_0x35a758(0x181)];}export async function tryGetStandardPageStatus(_0x28a3ce,_0x34ecbe){const _0x3a238b=a218_0x3b8605;try{return await getStandardPageStatus(_0x28a3ce,_0x34ecbe);}catch(_0x38744c){if(_0x38744c instanceof CliError&&_0x38744c[_0x3a238b(0xf5)]===_0x3a238b(0xde)&&/404|not found|non-json response/i['test'](_0x38744c[_0x3a238b(0x172)]))return null;throw _0x38744c;}}export async function syncStandardPages(_0x12d720,_0x274d3b){const _0x13f1d5=a218_0x3b8605,_0x41b7d2=await apiRequest('/smartapi/lovrabet/dataset/'+_0x274d3b+_0x13f1d5(0x16a),{'method':_0x13f1d5(0xdb),'body':{'appCode':_0x12d720}});return _0x41b7d2['data'];}export async function getPageDetail(_0x4c9456){const _0x2030e6=a218_0x3b8605,_0x4f9bf8=await apiRequest(_0x2030e6(0xf8)+_0x4c9456);if(!_0x4f9bf8[_0x2030e6(0x181)])throw CliErrors[_0x2030e6(0x199)](_0x2030e6(0x129)+_0x4c9456);return _0x4f9bf8[_0x2030e6(0x181)];}export async function listDeletedPages(_0x1226cc,_0x402804,_0x5b8f95){const _0x1189e9=a218_0x3b8605,_0x4479a1=new URLSearchParams({'appCode':_0x1226cc,'type':_0x402804,'currentPage':String(_0x5b8f95[_0x1189e9(0x1ad)]),'pageSize':String(_0x5b8f95[_0x1189e9(0xeb)])}),_0x51e678=await apiRequest('/smartapi/page/getDeletedPageList?'+_0x4479a1[_0x1189e9(0xd5)]());return _0x51e678['data'];}export async function restoreStandardPage(_0x1cb87c){const _0x40f361=a218_0x3b8605;await apiRequest('/smartapi/page/restore',{'method':_0x40f361(0xdb),'body':{'id':_0x1cb87c}});}export async function restoreJsxPage(_0x1dd837,_0x322a40){const _0x1e5cbd=a218_0x3b8605,_0x48a719=await apiRequest(_0x1e5cbd(0x164),{'method':_0x1e5cbd(0xdb),'body':{'appCode':_0x1dd837,'id':_0x322a40}});return _0x48a719[_0x1e5cbd(0x181)];}export async function updatePage(_0x57471b,_0x5390d2,_0x17bebc,_0x5c4dd9){const _0x2b6be0=a218_0x3b8605,_0x4a8dd0=await apiRequest(_0x2b6be0(0xf3),{'method':_0x2b6be0(0xdb),'body':{'appCode':_0x57471b,'pageId':_0x5390d2,'code':_0x17bebc,'datasetIds':_0x5c4dd9}});return _0x4a8dd0['data'];}export function generateSdkCode(_0x56a35e,_0x39a37e,_0x5d5d00){const _0x433717=a218_0x3b8605,_0x1fb369=_0x5d5d00?.['includeImports']??!![],_0x2f7ddb=_0x433717(0x109)+_0x56a35e['code']?.[_0x433717(0x14a)](/-/g,'_'),_0x8c2ed2=_0x39a37e[_0x433717(0x174)]||_0x39a37e[_0x433717(0x1a4)]||_0x433717(0x1a2),_0x6f1140=[];_0x1fb369&&_0x6f1140['push'](_0x433717(0x133),'',_0x433717(0x1c0),'');_0x6f1140[_0x433717(0x15c)](_0x433717(0x1c5)+_0x56a35e[_0x433717(0x174)]+'\x20('+(_0x56a35e[_0x433717(0x12d)]||'table')+')');if(_0x8c2ed2===_0x433717(0x1a2))_0x6f1140[_0x433717(0x15c)](_0x433717(0x127)+_0x2f7ddb+'.filter({',_0x433717(0x195),_0x433717(0x1b6),_0x433717(0x19b),_0x433717(0x14c));else{if(_0x8c2ed2===_0x433717(0xe3))_0x6f1140[_0x433717(0x15c)](_0x433717(0x127)+_0x2f7ddb+'.getOne(id);');else{if(_0x8c2ed2===_0x433717(0x12b))_0x6f1140[_0x433717(0x15c)](_0x433717(0x127)+_0x2f7ddb+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x8c2ed2===_0x433717(0x105))_0x6f1140[_0x433717(0x15c)]('const\x20result\x20=\x20await\x20client.models.'+_0x2f7ddb+_0x433717(0x18c));else _0x8c2ed2===_0x433717(0x1a0)||_0x8c2ed2==='remove'?_0x6f1140[_0x433717(0x15c)](_0x433717(0x127)+_0x2f7ddb+_0x433717(0x1e0)):_0x6f1140[_0x433717(0x15c)](_0x433717(0x127)+_0x2f7ddb+'.'+_0x8c2ed2+_0x433717(0xea));}}}return _0x6f1140[_0x433717(0x1af)]('\x0a');}export function generateSqlCodeTemplate(_0x20a616,_0x4bc691){const _0x4d5f9d=a218_0x3b8605,_0x3bdc51=_0x4bc691?.[_0x4d5f9d(0x144)]??_0x4d5f9d(0x104),_0x1a5c6c=_0x4bc691?.[_0x4d5f9d(0x15d)]??!![],_0x44c501=[];return _0x44c501[_0x4d5f9d(0x15c)](_0x4d5f9d(0xdc)+_0x20a616[_0x4d5f9d(0x149)]+'\x20('+_0x20a616[_0x4d5f9d(0x1a9)]+')'),_0x3bdc51===_0x4d5f9d(0x104)?(_0x1a5c6c&&_0x44c501['push']('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x4d5f9d(0x1c0),''),_0x44c501[_0x4d5f9d(0x15c)](_0x4d5f9d(0x150),_0x4d5f9d(0x186)+_0x20a616[_0x4d5f9d(0x1a9)]+'\x27,',_0x4d5f9d(0x19f),_0x4d5f9d(0x14c),_0x4d5f9d(0x1c1),_0x4d5f9d(0x156))):_0x44c501[_0x4d5f9d(0x15c)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly',_0x4d5f9d(0x1ce),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x4d5f9d(0x165)+_0x20a616[_0x4d5f9d(0x1a9)]+'\x27,',_0x4d5f9d(0x188),_0x4d5f9d(0x19e),_0x4d5f9d(0x14b),'}'),_0x44c501['join']('\x0a');}export async function getErConfig(_0x3a6632,_0x175ba0){const _0x3c6a42=a218_0x3b8605,_0x5e0e8a=await apiRequest(_0x3c6a42(0x124),{'method':_0x3c6a42(0xdb),'body':{'appCode':_0x3a6632,'dblinkId':_0x175ba0},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x5e0e8a[_0x3c6a42(0x181)];}export async function getErRelationDetail(_0x3e1fa2,_0x5c7cf5){const _0x846d67=a218_0x3b8605,_0x58ff23=new URLSearchParams({'appCode':_0x3e1fa2,'relationId':String(_0x5c7cf5)});try{const _0x3dc309=await apiRequest(_0x846d67(0xda)+_0x58ff23[_0x846d67(0xd5)]());return _0x3dc309[_0x846d67(0x181)]?.['relation']??null;}catch(_0x2a3d3b){if(_0x2a3d3b instanceof CliError&&_0x2a3d3b['code']===_0x846d67(0xde)&&(_0x2a3d3b[_0x846d67(0x13d)]?.[_0x846d67(0x154)](_0x846d67(0x10d))||_0x2a3d3b['hint']===_0x846d67(0x1dd)&&_0x2a3d3b[_0x846d67(0x172)]===_0x846d67(0x107)))return null;throw _0x2a3d3b;}}export async function createErRelation(_0x42da5c){const _0x4a1a08=a218_0x3b8605,_0x281b5d=await apiRequest('/smartapi/question/er-config/cli/erCreate',{'method':_0x4a1a08(0xdb),'body':_0x42da5c,'allowNonJsonSuccess':!![]});return _0x281b5d[_0x4a1a08(0x181)];}export async function updateErRelation(_0x2388a5){const _0x37b2a3=a218_0x3b8605,_0x2cb836=await apiRequest(_0x37b2a3(0x193),{'method':'POST','body':_0x2388a5,'allowNonJsonSuccess':!![]});return _0x2cb836[_0x37b2a3(0x181)];}export async function deleteErRelation(_0x3080ed){const _0xd8dedb=a218_0x3b8605,_0x1b2c29=await apiRequest(_0xd8dedb(0x126),{'method':_0xd8dedb(0xdb),'body':_0x3080ed,'allowNonJsonSuccess':!![]});return _0x1b2c29[_0xd8dedb(0x181)];}function a218_0x12a1(){const _0x57ac77=['\x20\x20});','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','delete','entries','filter','isInteger','operationName','number','tableData','/smartapi/permit/page/save','datasetTableCount','sqlCode','dbtableConfig','/smartapi/dblink/getAllTableList','content','currentPage',':\x20invalid\x20JSON\x20response\x20envelope','join','deleted','React\x20custom\x20page\x20not\x20found:\x20','personal','needSelf','isSafeInteger','/api/node-toolbox/api-doc-generator','\x20\x20pageSize:\x2020,','Create\x20enterprise\x20knowledge\x20base','displayName','Get\x20enterprise\x20knowledge\x20base','authRequired','Knowledge-base\x20update\x20requires\x20title\x20or\x20content.','operations','Fetch\x20menu\x20list','isFinite','AbortError','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','operationId','63399jjYZnQ','functionName','//\x20','stringify','file','isArray','/smartapi/custom/getUserCustomSql?id=','type','/smartapi/dblink/getList','Fetch\x20datasets','needPublic','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','\x20failed,\x20HTTP\x20','/smartapi/dataset/restore-dataset','/smartapi/dataset/update-driven-data','1904253GOUwpT','88NeyReu','\x20returned\x20an\x20invalid\x20JSON\x20response\x20envelope\x20after\x20HTTP\x20success.','/smartapi/permit/resource/get-menu-list','/smartapi/menu/update','find','value','success','/smartapi/custom/deleteUserCustomSql','401','modelId','API\x20error\x20code:\x20306','/smartapi/app-config/list','dbId','.remove(id);','updateTime','Knowledge-base\x20pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20','/smartapi/webcode/page/create','Request\x20timeout:\x20','info','/smartapi/dataset/get-driven-data?','parentMenuId','Unauthorized','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20','toString','description','materialName','/api/management/library/scripts/statistics?appCode=','modelCode','/smartapi/question/er-config/cli/detail?','POST','//\x20SQL:\x20','mobile','api_error','Warning:\x20showing\x20first\x20','array','trim','signal','getOne','/userTenant/queryBelongsTenants','\x22\x20not\x20found\x20in\x20dataset\x20','/smartapi/db-analysis/jobs/cancel','/filter','error','/smartapi/user-accounts/cli/dingding-sandbox/bind','(/*\x20params\x20*/);','pageSize','CUSTOM','/smartapi/menu/find?','/smartapi/permit/role/delete','createTime','/smartapi/custom/saveUserCustomSql','/smartapi/db-analysis/start','scriptName','/smartapi/lovrabet/update-page','errorMsg','code','path','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20scope.','/smartapi/lovrabet/detail?pageId=','set','responseFields','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','4442574tPTecd','):\x20missing\x20data.markdown\x20field','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','691032NXYTbn','cli:rabetbase','userId','/smartapi/question/er-config/business-group/edit','append','sdk','update','/generate-standard-pages/status?','ER\x20relation\x20does\x20not\x20exist','API\x20error\x20code:\x20','dataset_','map','method','219FrGFvg','DATA_NOT_EXIST','url','/smartapi/dataset/get-dataset-operation','/smartapi/permit/role/get-list','/smartapi/dataset/text-generate/status?','/smartapi/permit/page/get-one','startsWith','min','remark','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','errorCode','requirementDescription','platform-transport-failure','/smartapi/ocr/recognize-text?','10SeKyxW','/smartapi/app/getList','Knowledge-base\x20response\x20is\x20missing\x20a\x20valid\x20','/smartapi/dataset/text-generate/preview','/smartapi/permit/user-role/get-user-list','/smartapi/app-config/getByKey','company','/standard-page-status?appCode=','List\x20enterprise\x20knowledge\x20bases','/smartapi/question/er-config','Knowledge-base\x20API\x20returned\x20an\x20invalid\x20record\x20contract.','/smartapi/question/er-config/cli/delete-single','const\x20result\x20=\x20await\x20client.models.','/smartapi/common/queryFileUrl','Page\x20not\x20found:\x20','appCode','create','/smartapi/webcode/page/detail','tableName','menu','Request\x20failed:\x20','/api/custom/executeSql','UNAUTHORIZED','summary','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/custom/getUserCustomSql','/smartapi/app-config/update','i18nInfo','/admin/knowledge-base/create','?sqlCode=','/smartapi/app/getOne','96AhKICn','pageIndex','version','hint','/smartapi/app-config/create','defineProperty','tableList','\x20failed','6458455ZThbSY','enabled','target','roleName','files','download','/smartapi/custom/queryUserCustomSqlList','sqlName','replace','\x20\x20return\x20rows;','});','pageId','username','/smartapi/db-analysis/status/','const\x20data\x20=\x20await\x20client.sql.execute({','/admin/knowledge-base/get-one','/smartapi/menu/regroup','application/json','includes','totalCount','const\x20results\x20=\x20data.execResult\x20||\x20[];','clientOperationId','\x20apps.\x20','\x20of\x20','label','/smartapi/dataset/delete-dataset','push','includeImports','0000','3329253zCUKZe','/smartapi/permit/role/get-permit-list','/smartapi/webcode/file/publish','markdown','apiError','/smartapi/webcode/page/restore','\x20\x20\x20\x20sqlCode:\x20\x27','object','taskId','requestFields','has','/sync-to-pages','Invalid\x20response\x20format\x20(','configArray','permits','API\x20error:\x20','/smartapi/tasks/','body','/api/management/library/scripts/list?appCode=','message','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','name','/smartapi/custom/updateUserCustomSql','key','8nvRyfP','json','/smartapi/lovrabet/dataset/','10784lVPhmW','tags','Delete\x20enterprise\x20knowledge\x20base','List\x20enterprise\x20knowledge\x20bases\x20returned\x20an\x20invalid\x20response\x20contract.','title','max','正在从服务器拉取模型列表...\x20(环境:\x20','data','/api/node-toolbox/sql/save','pageName','list','nickname','\x20\x20sqlCode:\x20\x27','toLowerCase','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/permit/role/create','createMenu','roleType','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','&type=','status','/smartapi/permit/user-role/update-user-list','/api/management/script/cache/clear','scope','/api/management/library/scripts/info?id=','/smartapi/question/er-config/cli/update-single','GET','\x20\x20where:\x20{},','List\x20enterprise\x20knowledge\x20bases\x20returned\x20invalid\x20paging\x20metadata.','cookie','test','validation','string','\x20\x20currentPage:\x201,','/smartapi/menu/batchDelete','SQL\x20query\x20not\x20found:\x20'];a218_0x12a1=function(){return _0x57ac77;};return a218_0x12a1();}export async function updateErBusinessGroup(_0x1e3fc8){const _0x1c4fb7=a218_0x3b8605,_0x133255=await apiRequest(_0x1c4fb7(0x102),{'method':_0x1c4fb7(0xdb),'body':_0x1e3fc8,'allowNonJsonSuccess':!![]});return _0x133255['data'];}function buildQuery(_0x12bea5){const _0x18834e=a218_0x3b8605,_0x4ad0f9=new URLSearchParams();for(const [_0x2f12bb,_0x5f33b9]of Object['entries'](_0x12bea5)){if(_0x5f33b9===undefined||_0x5f33b9==='')continue;_0x4ad0f9[_0x18834e(0xf9)](_0x2f12bb,String(_0x5f33b9));}const _0x3f8562=_0x4ad0f9[_0x18834e(0xd5)]();return _0x3f8562?'?'+_0x3f8562:'';}export async function listNotificationChannelConfigs(_0x5c31a4,_0x16327e){const _0x2eae05=a218_0x3b8605,_0x5bbd0e=await apiRequest('/notification/channel-config/list'+buildQuery({'appCode':_0x5c31a4,'channelType':_0x16327e}));return Array['isArray'](_0x5bbd0e['data'])?_0x5bbd0e[_0x2eae05(0x181)]:[];}export async function listAppConfigs(_0x86e283,_0x5234a8){const _0x58bf63=a218_0x3b8605,_0x3c9746=await apiRequest(_0x58bf63(0x1de),{'method':_0x58bf63(0xdb),'body':{'appCode':_0x86e283,..._0x5234a8?.[_0x58bf63(0x176)]?{'key':_0x5234a8[_0x58bf63(0x176)]}:{},..._0x5234a8?.[_0x58bf63(0x17b)]?{'tags':_0x5234a8[_0x58bf63(0x17b)]}:{}}});return extractAppConfigList(_0x3c9746[_0x58bf63(0x181)]);}export async function getAppConfigByKey(_0x2441dc,_0x57cb85){const _0x52b8f7=a218_0x3b8605,_0x465f46=await apiRequest(_0x52b8f7(0x120)+buildQuery({'appCode':_0x2441dc,'key':_0x57cb85}));return _0x465f46[_0x52b8f7(0x181)]??null;}export async function createAppConfig(_0x2845ae){const _0x59b181=a218_0x3b8605,_0x110467=await apiRequest(_0x59b181(0x13e),{'method':_0x59b181(0xdb),'body':{'appCode':_0x2845ae['appCode'],'key':_0x2845ae[_0x59b181(0x176)],'value':_0x2845ae[_0x59b181(0x1d8)],..._0x2845ae[_0x59b181(0x17b)]?{'tags':_0x2845ae[_0x59b181(0x17b)]}:{}}});return _0x110467[_0x59b181(0x181)];}export async function updateAppConfig(_0x182774){const _0x51c663=a218_0x3b8605;await apiRequest(_0x51c663(0x135),{'method':_0x51c663(0xdb),'body':{'id':_0x182774['id'],'appCode':_0x182774[_0x51c663(0x12a)],'key':_0x182774[_0x51c663(0x176)],'value':_0x182774[_0x51c663(0x1d8)],..._0x182774[_0x51c663(0x17b)]?{'tags':_0x182774[_0x51c663(0x17b)]}:{}}});}export async function deleteAppConfig(_0x2028f0){const _0x1e4b77=a218_0x3b8605;await apiRequest('/smartapi/app-config/delete',{'method':_0x1e4b77(0xdb),'body':_0x2028f0});}function extractAppConfigList(_0xed6135){const _0x108038=a218_0x3b8605;if(Array['isArray'](_0xed6135))return _0xed6135;if(_0xed6135&&typeof _0xed6135==='object'&&Array['isArray'](_0xed6135[_0x108038(0x184)]))return _0xed6135[_0x108038(0x184)];return extractList(_0xed6135);}export async function listDbLinks(_0x4d1350,_0x1cb7e8){const _0x4a6799=a218_0x3b8605,_0x28ea35=await apiRequest(_0x4a6799(0x1cb),{'method':_0x4a6799(0xdb),'body':{'appCode':_0x4d1350,'currentPage':_0x1cb7e8?.['currentPage']??0x1,'pageSize':_0x1cb7e8?.[_0x4a6799(0xeb)]??0x64}});return{'items':extractList(_0x28ea35[_0x4a6799(0x181)]),'paging':extractPaging(_0x28ea35[_0x4a6799(0x181)])};}export async function getDbLinkInfo(_0x538571){const _0x28e944=a218_0x3b8605,_0x17a643=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0x538571}));return _0x17a643[_0x28e944(0x181)];}export async function createDbLink(_0x3ded79){const _0x1af7a2=a218_0x3b8605,_0x3516ec=await apiRequest('/smartapi/dblink/create',{'method':'POST','body':_0x3ded79});return _0x3516ec[_0x1af7a2(0x181)];}export async function updateDbLink(_0x3ae792){const _0x23822d=a218_0x3b8605,_0x1f68c9=await apiRequest('/smartapi/dblink/update',{'method':_0x23822d(0xdb),'body':_0x3ae792});return _0x1f68c9[_0x23822d(0x181)];}export async function deleteDbLink(_0x4b42d9){const _0x5c9a33=a218_0x3b8605;await apiRequest('/smartapi/dblink/delete',{'method':_0x5c9a33(0xdb),'body':{'id':_0x4b42d9}});}export async function testDbLinkConnect(_0x15b298){const _0x4f9369=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x15b298}));return _0x4f9369['data'];}export async function startDbAnalysis(_0xa9b279,_0x2bc580){const _0x1422d6=a218_0x3b8605,_0x2a2719=await apiRequest(_0x1422d6(0xf1),{'method':_0x1422d6(0xdb),'body':{'dbLinkId':_0xa9b279,..._0x2bc580&&_0x2bc580['length']>0x0?{'tableNames':_0x2bc580}:{}}});return _0x2a2719[_0x1422d6(0x181)];}export async function cancelDbAnalysis(_0x7f225b){const _0x5c7be2=a218_0x3b8605;await apiRequest(_0x5c7be2(0xe6)+buildQuery({'planId':_0x7f225b}),{'method':_0x5c7be2(0xdb)});}export async function getDbAnalysisStatus(_0x4dc274){const _0x110d63=a218_0x3b8605,_0x22c0c1=await apiRequest(_0x110d63(0x14f)+encodeURIComponent(_0x4dc274));return _0x22c0c1['data'];}export async function getDbAllTableList(_0x529386,_0x437abc){const _0x409cea=a218_0x3b8605,_0x59f2cb=await apiRequest(_0x409cea(0x1ab)+buildQuery({'appCode':_0x529386,'dbLinkId':_0x437abc})),_0x15b5e1=_0x59f2cb[_0x409cea(0x181)];if(Array['isArray'](_0x15b5e1))return _0x15b5e1;return extractList(_0x15b5e1);}export async function getDbTableDiff(_0x555049,_0x35516f,_0x1dbdfc){const _0x19d222=a218_0x3b8605,_0x252123=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x555049,'dbLinkId':_0x35516f,'pageIndex':_0x1dbdfc?.[_0x19d222(0x13b)]??0x1,'pageSize':_0x1dbdfc?.[_0x19d222(0xeb)]??0x14,'tableName':_0x1dbdfc?.[_0x19d222(0x12d)]})),_0x537605=_0x252123[_0x19d222(0x181)];return{'totalCount':_0x537605?.[_0x19d222(0x155)]??0x0,'physicalTableCount':_0x537605?.['physicalTableCount']??0x0,'datasetTableCount':_0x537605?.[_0x19d222(0x1a8)]??0x0,..._0x537605?.[_0x19d222(0x132)]?{'summary':_0x537605[_0x19d222(0x132)]}:{},'tableList':Array['isArray'](_0x537605?.[_0x19d222(0x140)])?_0x537605['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x31c56c=a218_0x3b8605,_0x51ea08=await apiRequest(_0x31c56c(0x11c),{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x46e17d=extractList(_0x51ea08[_0x31c56c(0x181)]),_0x15f13a=extractPaging(_0x51ea08[_0x31c56c(0x181)]);return _0x15f13a&&_0x15f13a['totalCount']>REMOTE_APP_PAGE_SIZE&&console['warn'](_0x31c56c(0xdf)+REMOTE_APP_PAGE_SIZE+_0x31c56c(0x159)+_0x15f13a['totalCount']+_0x31c56c(0x158)+_0x31c56c(0x173)),_0x46e17d;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x57a118,_0x350131){const _0x49000c=a218_0x3b8605,_0x218152=Math[_0x49000c(0x114)](Math[_0x49000c(0x17f)](_0x350131?.[_0x49000c(0xeb)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x18c825=await apiRequest(_0x49000c(0x110),{'method':_0x49000c(0xdb),'body':{'appCode':_0x57a118,'currentPage':_0x350131?.['currentPage']??0x1,'pageSize':_0x218152}});return{'items':extractList(_0x18c825[_0x49000c(0x181)]),'paging':extractPaging(_0x18c825['data'])};}export async function getAppRole(_0x10948d){const _0x196c76=a218_0x3b8605,_0x58e3f7=await apiRequest('/smartapi/permit/role/get-one'+buildQuery({'id':_0x10948d}));return _0x58e3f7[_0x196c76(0x181)];}export async function createAppRole(_0x34671e){const _0x571ae1=a218_0x3b8605,_0x3fba7a=await apiRequest(_0x571ae1(0x189),{'method':_0x571ae1(0xdb),'body':{'appCode':_0x34671e[_0x571ae1(0x12a)],'roleName':_0x34671e[_0x571ae1(0x145)],'roleType':_0x571ae1(0xec),..._0x34671e[_0x571ae1(0x115)]?{'remark':_0x34671e[_0x571ae1(0x115)]}:{}}});return _0x3fba7a[_0x571ae1(0x181)];}export async function updateAppRole(_0x2b35f0){const _0x3d2b4e=a218_0x3b8605,_0x3144f6=await apiRequest('/smartapi/permit/role/update',{'method':_0x3d2b4e(0xdb),'body':{'id':_0x2b35f0['id'],'appCode':_0x2b35f0[_0x3d2b4e(0x12a)],..._0x2b35f0[_0x3d2b4e(0x18b)]?{'roleType':_0x2b35f0[_0x3d2b4e(0x18b)]}:{},..._0x2b35f0[_0x3d2b4e(0x145)]!==undefined?{'roleName':_0x2b35f0[_0x3d2b4e(0x145)]}:{},..._0x2b35f0[_0x3d2b4e(0x115)]!==undefined?{'remark':_0x2b35f0[_0x3d2b4e(0x115)]}:{},..._0x2b35f0[_0x3d2b4e(0x16d)]?{'permits':_0x2b35f0[_0x3d2b4e(0x16d)]}:{}}});return _0x3144f6[_0x3d2b4e(0x181)];}export async function deleteAppRole(_0xb55ebf){const _0x104154=a218_0x3b8605;await apiRequest(_0x104154(0xee),{'method':'POST','body':{'id':_0xb55ebf}});}export async function listPermitRoles(_0x3906c8,_0x1dde55){const _0x21e5bd=a218_0x3b8605,_0x3e2f6b=await apiRequest(_0x21e5bd(0x160),{'method':_0x21e5bd(0xdb),'body':{'appCode':_0x3906c8,..._0x1dde55?.[_0x21e5bd(0x1b3)]!==undefined?{'needSelf':_0x1dde55[_0x21e5bd(0x1b3)]}:{},..._0x1dde55?.['needPublic']!==undefined?{'needPublic':_0x1dde55[_0x21e5bd(0x1cd)]}:{}}});return extractList(_0x3e2f6b[_0x21e5bd(0x181)]);}export async function getRoleMenuResources(_0x168bf6,_0x159827){const _0x15f3c6=a218_0x3b8605,_0x329c06=await apiRequest(_0x15f3c6(0x1d5),{'method':_0x15f3c6(0xdb),'body':{'appCode':_0x168bf6,'roleId':_0x159827}});return extractList(_0x329c06[_0x15f3c6(0x181)]);}export async function getRoleApiResources(_0x5a26e3,_0x12d1a0){const _0x3cf5c7=a218_0x3b8605,_0x114f4b=await apiRequest('/smartapi/permit/resource/get-api-list',{'method':'POST','body':{'appCode':_0x5a26e3,'roleId':_0x12d1a0}});return extractList(_0x114f4b[_0x3cf5c7(0x181)]);}export async function listRoleUsers(_0x3386f7){const _0x3aa63a=a218_0x3b8605,_0x1a7382=await apiRequest(_0x3aa63a(0x11f),{'method':'POST','body':{'appCode':_0x3386f7}});return extractList(_0x1a7382[_0x3aa63a(0x181)])[_0x3aa63a(0x10a)](({id:_0x30bea9,userList:_0x27e9f6,applyUserList:_0xe56864,..._0x4f3110})=>({..._0x4f3110,'id':Number(_0x30bea9),'userList':_0x27e9f6[_0x3aa63a(0x10a)](_0x56601a=>({..._0x56601a,'userId':Number(_0x56601a[_0x3aa63a(0x101)])})),..._0xe56864?{'applyUserList':_0xe56864['map'](_0x2eb4fe=>({..._0x2eb4fe,'userId':Number(_0x2eb4fe[_0x3aa63a(0x101)])}))}:{}}));}export async function updateRoleUsers(_0x2aefaa,_0x2d02f4){const _0x5efcee=a218_0x3b8605;await apiRequest(_0x5efcee(0x18f),{'method':'POST','body':{'appCode':_0x2aefaa,'roleList':_0x2d02f4}});}export async function getPagePermit(_0x4e16c3){const _0x4f700c=a218_0x3b8605,_0x2e161c=await apiRequest(_0x4f700c(0x112)+buildQuery({'menuId':_0x4e16c3}));return _0x2e161c[_0x4f700c(0x181)];}export async function savePagePermit(_0xb7a0a5){const _0x493069=a218_0x3b8605,_0x55f812=await apiRequest(_0x493069(0x1a7),{'method':_0x493069(0xdb),'body':_0xb7a0a5});return _0x55f812['data'];}export async function listCurrentUserTenantMemberships(){const _0x1ee6b8=a218_0x3b8605,_0x3ec902=await apiRequest(_0x1ee6b8(0xe4));return extractList(_0x3ec902[_0x1ee6b8(0x181)]);}export async function listTenantDirectoryMembers(_0x10c065){const _0x5f0131=a218_0x3b8605,_0x5682c4=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x10c065})),_0x543097=_0x5682c4[_0x5f0131(0x181)]?.['userTenantRelationList'];return Array[_0x5f0131(0x1c8)](_0x543097)?_0x543097:[];}export async function getTenantMembers(_0x51db53){const _0x4b6ff8=a218_0x3b8605,_0x43d0cb=await listTenantDirectoryMembers(_0x51db53);return _0x43d0cb['filter'](_0x57bb9a=>_0x57bb9a['status']==='ENABLE'||_0x57bb9a[_0x4b6ff8(0x18e)]===undefined)['map'](_0x235288=>({'userId':Number(_0x235288['userId']??_0x235288['id']),'username':_0x235288[_0x4b6ff8(0x14e)],'nickname':_0x235288[_0x4b6ff8(0x185)],'status':_0x235288[_0x4b6ff8(0x18e)],'email':_0x235288['email'],'mobile':_0x235288[_0x4b6ff8(0xdd)],'avatar':_0x235288['avatar']}))[_0x4b6ff8(0x1a2)](_0x2a5f1e=>Number[_0x4b6ff8(0x1be)](_0x2a5f1e['userId'])&&_0x2a5f1e[_0x4b6ff8(0x101)]>0x0);}
|
package/lib/core/bff/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a219_0x2cad(_0xeec2eb,_0x10d3ac){_0xeec2eb=_0xeec2eb-0x1c4;const _0x5339f7=a219_0x5339();let _0x2cadd6=_0x5339f7[_0xeec2eb];return _0x2cadd6;}const a219_0x517cfa=a219_0x2cad;(function(_0xd4e6b3,_0x55d220){const _0x5d1084=a219_0x2cad,_0x2238fc=_0xd4e6b3();while(!![]){try{const _0x39861e=-parseInt(_0x5d1084(0x1cd))/0x1*(parseInt(_0x5d1084(0x1cf))/0x2)+parseInt(_0x5d1084(0x1c7))/0x3+parseInt(_0x5d1084(0x1d1))/0x4+parseInt(_0x5d1084(0x1ce))/0x5+-parseInt(_0x5d1084(0x1d0))/0x6+-parseInt(_0x5d1084(0x1c8))/0x7*(parseInt(_0x5d1084(0x1ca))/0x8)+-parseInt(_0x5d1084(0x1cb))/0x9*(-parseInt(_0x5d1084(0x1c5))/0xa);if(_0x39861e===_0x55d220)break;else _0x2238fc['push'](_0x2238fc['shift']());}catch(_0x33302d){_0x2238fc['push'](_0x2238fc['shift']());}}}(a219_0x5339,0x28626));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a219_0x517cfa(0x1c9),LOCK_FILE_NAME=a219_0x517cfa(0x1d2),TRASH_DIR_NAME=a219_0x517cfa(0x1c6);function a219_0x5339(){const _0x15962e=['62311erozzD','1433580yiyAnS','2RLxhEd','1298310SkoRMd','478664Wfbnuc','bff.lock.json','/bff','6530YcsvGu','bff-trash','240045apdCEj','49uBBKEp','.rabetbase','184152FPvcns','1638VyNwja','bff'];a219_0x5339=function(){return _0x15962e;};return a219_0x5339();}export function loadBffProjectConfig(_0x2bfa6f,_0x35d9fd){const _0x35bcdb=a219_0x517cfa,_0x4c4ef8=resolve(_0x35d9fd??findProjectRootDirectory()),_0x498259=DOT_DIR+_0x35bcdb(0x1c4),_0x15261c=_0x498259+'/'+_0x2bfa6f;return{'projectRoot':_0x4c4ef8,'appCode':_0x2bfa6f,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x498259,'scriptsRoot':_0x15261c,'scriptsRootDir':resolve(_0x4c4ef8,DOT_DIR,_0x35bcdb(0x1cc),_0x2bfa6f),'lockFilePath':resolve(_0x4c4ef8,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4c4ef8,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a220_0x1d7dab=a220_0x3ff1;(function(_0x16e3a1,_0x3fadb2){const _0x53e133=a220_0x3ff1,_0x10e66e=_0x16e3a1();while(!![]){try{const _0x91edfa=-parseInt(_0x53e133(0xed))/0x1*(parseInt(_0x53e133(0xd3))/0x2)+parseInt(_0x53e133(0xdd))/0x3*(-parseInt(_0x53e133(0xe6))/0x4)+-parseInt(_0x53e133(0xdf))/0x5*(parseInt(_0x53e133(0xef))/0x6)+-parseInt(_0x53e133(0xd1))/0x7+parseInt(_0x53e133(0xd4))/0x8*(parseInt(_0x53e133(0xd7))/0x9)+-parseInt(_0x53e133(0xe3))/0xa*(parseInt(_0x53e133(0xe0))/0xb)+parseInt(_0x53e133(0xee))/0xc;if(_0x91edfa===_0x3fadb2)break;else _0x10e66e['push'](_0x10e66e['shift']());}catch(_0x4e6e0c){_0x10e66e['push'](_0x10e66e['shift']());}}}(a220_0x50c9,0xc2745));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';function a220_0x3ff1(_0x5c9242,_0x335677){_0x5c9242=_0x5c9242-0xd0;const _0x50c9e5=a220_0x50c9();let _0x3ff1d1=_0x50c9e5[_0x5c9242];return _0x3ff1d1;}import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=['COMMON',a220_0x1d7dab(0xe9),'HOOK'];export function normalizeBffType(_0x1dc532){const _0x5eb052=a220_0x1d7dab;if(!_0x1dc532)return undefined;const _0x488ade=_0x1dc532[_0x5eb052(0xf2)]()[_0x5eb052(0xd9)]();return SUPPORTED_BFF_TYPES['includes'](_0x488ade)?_0x488ade:undefined;}async function scanJsFilesRecursively(_0xc4cbf3,_0x432bf4){const _0x4e9b2b=a220_0x1d7dab,_0xef1dc0=[];try{const _0x5a1b63=await readdir(_0xc4cbf3,{'withFileTypes':!![]});for(const _0x933e15 of _0x5a1b63){const _0x5b26ae=join(_0xc4cbf3,_0x933e15['name']);if(_0x933e15['isDirectory']())_0xef1dc0['push'](...await scanJsFilesRecursively(_0x5b26ae,_0x432bf4+'/'+_0x933e15[_0x4e9b2b(0xdb)]));else _0x933e15[_0x4e9b2b(0xd0)]()&&_0x933e15['name'][_0x4e9b2b(0xe2)](_0x4e9b2b(0xf6))&&_0xef1dc0[_0x4e9b2b(0xeb)]({'lockKey':_0x432bf4+'/'+_0x933e15[_0x4e9b2b(0xdb)][_0x4e9b2b(0xf0)](/\.js$/,''),'filePath':_0x5b26ae});}}catch(_0x30d6aa){if(_0x30d6aa[_0x4e9b2b(0xe1)]!==_0x4e9b2b(0xdc))throw _0x30d6aa;}return _0xef1dc0;}async function scanFlatFunctions(_0x1688b3,_0x2863e2){const _0x2648fe=a220_0x1d7dab,_0x5ccd57=join(_0x1688b3[_0x2648fe(0xf5)],_0x2863e2),_0x3116de=await scanJsFilesRecursively(_0x5ccd57,_0x2863e2);return _0x3116de[_0x2648fe(0xf4)](({lockKey:_0x2265cd,filePath:_0xaf25})=>({'type':_0x2863e2,'name':_0x2265cd['split']('/')['at'](-0x1)??'','filePath':_0xaf25,'lockKey':_0x2265cd}));}async function scanHookFunctions(_0x5d3f72){const _0x3e586a=a220_0x1d7dab,_0x3cd5b4=join(_0x5d3f72['scriptsRootDir'],_0x3e586a(0xd6)),_0x1e1ae7=[];try{const _0x2f5f80=await readdir(_0x3cd5b4,{'withFileTypes':!![]});for(const _0xfe4158 of _0x2f5f80){if(!_0xfe4158[_0x3e586a(0xe7)]())continue;const _0x299e8f=_0xfe4158[_0x3e586a(0xdb)],_0x1f3829=join(_0x3cd5b4,_0x299e8f),_0x1a0eda=await readdir(_0x1f3829,{'withFileTypes':!![]});for(const _0x41cccd of _0x1a0eda){if(!_0x41cccd['isDirectory']())continue;const _0x30e0ed=_0x41cccd['name'],_0x25b09a=join(_0x1f3829,_0x30e0ed),_0x1ffa01=await readdir(_0x25b09a,{'withFileTypes':!![]});for(const _0x2ad9e9 of _0x1ffa01){if(!_0x2ad9e9[_0x3e586a(0xe7)]())continue;const _0xb29c81=_0x2ad9e9[_0x3e586a(0xdb)],_0x3e3644=join(_0x25b09a,_0xb29c81),_0x4b5000=await readdir(_0x3e3644,{'withFileTypes':!![]});for(const _0x165b65 of _0x4b5000){if(!_0x165b65[_0x3e586a(0xd0)]()||!_0x165b65[_0x3e586a(0xdb)][_0x3e586a(0xe2)](_0x3e586a(0xf6)))continue;const _0x540679=_0x165b65[_0x3e586a(0xdb)][_0x3e586a(0xf0)](/\.js$/,'');_0x1e1ae7[_0x3e586a(0xeb)]({'type':'HOOK','name':_0x540679,'filePath':join(_0x3e3644,_0x165b65[_0x3e586a(0xdb)]),'lockKey':_0x3e586a(0xe4)+_0x299e8f+'/'+_0x30e0ed+'/'+_0xb29c81+'/'+_0x540679,'alias':_0x299e8f,'operationType':_0x30e0ed,'functionNode':_0xb29c81});}}}}}catch(_0x4e4696){if(_0x4e4696[_0x3e586a(0xe1)]!=='ENOENT')throw _0x4e4696;}return _0x1e1ae7;}export async function scanLocalBffFunctions(_0x382035,_0x245219){const _0x8d923=a220_0x1d7dab;if(_0x245219===_0x8d923(0xd2)||_0x245219===_0x8d923(0xe9))return scanFlatFunctions(_0x382035,_0x245219);if(_0x245219===_0x8d923(0xd6))return scanHookFunctions(_0x382035);const [_0x2d42a,_0x11d57b,_0x5d0111]=await Promise[_0x8d923(0xd5)]([scanFlatFunctions(_0x382035,_0x8d923(0xd2)),scanFlatFunctions(_0x382035,_0x8d923(0xe9)),scanHookFunctions(_0x382035)]);return[..._0x2d42a,..._0x11d57b,..._0x5d0111];}export function resolveLocalFilePathFromLockKey(_0x146e9c,_0x243506){const _0x40b21b=a220_0x1d7dab;return join(_0x146e9c['scriptsRootDir'],..._0x243506[_0x40b21b(0xda)]('/'))+_0x40b21b(0xf6);}function a220_0x50c9(){const _0x20caee=['alias','ENDPOINT','functionName','push','F_OK','41ApqxTo','67023528CIHIzr','8442570PBPJiD','replace','datasetCode','trim','operationType','map','scriptsRootDir','.js','before','set','beforeScriptId','isFile','9506315zpjeIj','COMMON','50590pONyBr','4680YCnWlg','all','HOOK','4050ogRiXB','functionNode','toUpperCase','split','name','ENOENT','69798pzwekO','afterScriptId','5NpWooI','110GQPMwC','code','endsWith','807770MqKdpQ','HOOK/','get','76Kuvjqm','isDirectory'];a220_0x50c9=function(){return _0x20caee;};return a220_0x50c9();}export function createHookLocationMap(_0x34a6b1){const _0x1cd110=a220_0x1d7dab,_0xb986a3=new Map();for(const _0x38969e of _0x34a6b1){_0x38969e['beforeScriptId']&&_0xb986a3['set'](_0x38969e[_0x1cd110(0xf9)],{'datasetCode':_0x38969e[_0x1cd110(0xf1)],'operationType':snakeToCamel(_0x38969e[_0x1cd110(0xf3)]),'functionNode':_0x1cd110(0xf7)}),_0x38969e[_0x1cd110(0xde)]&&_0xb986a3[_0x1cd110(0xf8)](_0x38969e[_0x1cd110(0xde)],{'datasetCode':_0x38969e[_0x1cd110(0xf1)],'operationType':snakeToCamel(_0x38969e[_0x1cd110(0xf3)]),'functionNode':'after'});}return _0xb986a3;}export function resolveRemoteScriptTarget(_0x312a53,_0x36e7c2,_0x4a372f,_0x537270,_0x19ce19){const _0x1a614f=a220_0x1d7dab,_0x43e515=normalizeBffType(_0x36e7c2['scriptType']);if(!_0x43e515||!_0x36e7c2[_0x1a614f(0xea)])return null;if(_0x43e515===_0x1a614f(0xd6)){const _0x3832bf=(_0x36e7c2['id']?_0x4a372f[_0x1a614f(0xe5)](_0x36e7c2['id']):undefined)??findHookLocationByRemoteId(_0x537270,_0x36e7c2['id']);if(!_0x3832bf)return null;const _0xb7242=_0x3832bf[_0x1a614f(0xe8)]||_0x19ce19[_0x1a614f(0xe5)](_0x3832bf[_0x1a614f(0xf1)]),_0x3a22dc=_0xb7242??_0x3832bf[_0x1a614f(0xf1)],_0x1bae40={..._0x3832bf,'alias':_0xb7242},_0x1b0d60=_0x1a614f(0xe4)+_0x3a22dc+'/'+_0x1bae40[_0x1a614f(0xf3)]+'/'+_0x1bae40[_0x1a614f(0xd8)]+'/'+_0x36e7c2['functionName'];return{'lockKey':_0x1b0d60,'filePath':resolveLocalFilePathFromLockKey(_0x312a53,_0x1b0d60),'type':_0x1a614f(0xd6),'hookLocation':_0x1bae40};}const _0x197a33=_0x43e515+'/'+_0x36e7c2[_0x1a614f(0xea)];return{'lockKey':_0x197a33,'filePath':resolveLocalFilePathFromLockKey(_0x312a53,_0x197a33),'type':_0x43e515};}export async function ensureParentDirectory(_0x3de419){await mkdir(dirname(_0x3de419),{'recursive':!![]});}export async function fileExists(_0x50e8cb){const _0xe1c802=a220_0x1d7dab;try{return await access(_0x50e8cb,constants[_0xe1c802(0xec)]),!![];}catch{return![];}}export async function directoryExists(_0x3b8cbe){const _0x2464bb=a220_0x1d7dab;try{const _0x4ef384=await stat(_0x3b8cbe);return _0x4ef384[_0x2464bb(0xe7)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a221_0x2658(){const _0x31829d=['24CSDubB','md5','27HihxfT','hex','5607870ciXTsX','2180344PEksqn','digest','1336101XpPbVg','1422112QBxxjW','utf8','14UgPmMi','createHash','673945GQpfWx','80486lgsymT','2242688sNaVdu','update'];a221_0x2658=function(){return _0x31829d;};return a221_0x2658();}(function(_0x481c6b,_0x574915){const _0x13856a=a221_0x2541,_0x52d3d5=_0x481c6b();while(!![]){try{const _0xd2b6d=-parseInt(_0x13856a(0x16b))/0x1*(parseInt(_0x13856a(0x16e))/0x2)+parseInt(_0x13856a(0x168))/0x3+-parseInt(_0x13856a(0x166))/0x4+-parseInt(_0x13856a(0x16d))/0x5*(parseInt(_0x13856a(0x171))/0x6)+-parseInt(_0x13856a(0x16f))/0x7+parseInt(_0x13856a(0x169))/0x8+-parseInt(_0x13856a(0x163))/0x9*(-parseInt(_0x13856a(0x165))/0xa);if(_0xd2b6d===_0x574915)break;else _0x52d3d5['push'](_0x52d3d5['shift']());}catch(_0x49cd90){_0x52d3d5['push'](_0x52d3d5['shift']());}}}(a221_0x2658,0x52638));import{readFile}from'node:fs/promises';import a221_0x1fc520 from'node:crypto';function a221_0x2541(_0x241eb4,_0x33b474){_0x241eb4=_0x241eb4-0x163;const _0x26589b=a221_0x2658();let _0x2541ca=_0x26589b[_0x241eb4];return _0x2541ca;}export function computeContentHash(_0x5887e3){const _0x59499b=a221_0x2541;return a221_0x1fc520[_0x59499b(0x16c)](_0x59499b(0x172))[_0x59499b(0x170)](_0x5887e3)[_0x59499b(0x167)](_0x59499b(0x164));}export async function computeFileHash(_0x2cd249){const _0xd7fb19=a221_0x2541,_0x21faed=await readFile(_0x2cd249,_0xd7fb19(0x16a));return computeContentHash(_0x21faed);}
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9594da,_0x46438c){const _0x2b73b9=a222_0x1b3a,_0x322d02=_0x9594da();while(!![]){try{const _0x199135=-parseInt(_0x2b73b9(0x1d7))/0x1+-parseInt(_0x2b73b9(0x1e5))/0x2+-parseInt(_0x2b73b9(0x1dc))/0x3+-parseInt(_0x2b73b9(0x1d2))/0x4+parseInt(_0x2b73b9(0x1d3))/0x5*(parseInt(_0x2b73b9(0x1d5))/0x6)+-parseInt(_0x2b73b9(0x1e6))/0x7+parseInt(_0x2b73b9(0x1d8))/0x8*(parseInt(_0x2b73b9(0x1d6))/0x9);if(_0x199135===_0x46438c)break;else _0x322d02['push'](_0x322d02['shift']());}catch(_0x3f9ae){_0x322d02['push'](_0x322d02['shift']());}}}(a222_0x158a,0x575ea));function a222_0x158a(){const _0x232c03=['1648HPBZSI','functions','current\x20\x22','parse','1705734fepXot','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','stringify','apps','ENOENT','code','lastSync','object','scriptsRoot','1386374LSjFHI','2848776sWkLGv','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','1894348LWFFed','125415btdkfH','\x22\x20vs\x20lock\x20\x22','138WfqGnF','97299xGpdIT','303789cnRqNl'];a222_0x158a=function(){return _0x232c03;};return a222_0x158a();}import{mkdir,readFile,writeFile}from'node:fs/promises';function a222_0x1b3a(_0x39b8c4,_0x3fc0d9){_0x39b8c4=_0x39b8c4-0x1d2;const _0x158a3b=a222_0x158a();let _0x1b3a75=_0x158a3b[_0x39b8c4];return _0x1b3a75;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x232800,_0x217a3e,_0x745c88,_0x4c6e2b){const _0x1d6cfd=a222_0x1b3a,_0x193380={'apps':_0x232800['apps']&&typeof _0x232800[_0x1d6cfd(0x1df)]===_0x1d6cfd(0x1e3)?_0x232800['apps']:{}};let _0xfe4d63=_0x193380[_0x1d6cfd(0x1df)][_0x217a3e];if(!_0xfe4d63)return _0xfe4d63={'scriptsRoot':_0x745c88,'lastSync':'','functions':{}},_0x193380[_0x1d6cfd(0x1df)][_0x217a3e]=_0xfe4d63,{'lockData':_0x193380,'appLock':_0xfe4d63};if(!_0xfe4d63[_0x1d6cfd(0x1e4)])_0xfe4d63[_0x1d6cfd(0x1e4)]=_0x745c88;else{if(_0xfe4d63[_0x1d6cfd(0x1e4)]!==_0x745c88)throw new Error(_0x4c6e2b+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0x1d6cfd(0x1da)+_0x745c88+_0x1d6cfd(0x1d4)+_0xfe4d63[_0x1d6cfd(0x1e4)]+'\x22.\x20')+_0x1d6cfd(0x1dd));}return!_0xfe4d63[_0x1d6cfd(0x1d9)]&&(_0xfe4d63[_0x1d6cfd(0x1d9)]={}),!_0xfe4d63[_0x1d6cfd(0x1e2)]&&(_0xfe4d63[_0x1d6cfd(0x1e2)]=''),{'lockData':_0x193380,'appLock':_0xfe4d63};}export async function readBffLockFile(_0x2a3eb1){const _0x4d081f=a222_0x1b3a;try{const _0x12b1b6=await readFile(_0x2a3eb1,'utf8'),_0x1da6d7=JSON[_0x4d081f(0x1db)](_0x12b1b6);return{'apps':_0x1da6d7['apps']&&typeof _0x1da6d7['apps']==='object'?_0x1da6d7[_0x4d081f(0x1df)]:{}};}catch(_0x32f71c){if(_0x32f71c[_0x4d081f(0x1e1)]===_0x4d081f(0x1e0))return null;throw new Error(_0x4d081f(0x1e7)+String(_0x32f71c));}}export async function writeBffLockFile(_0x94668f,_0x101dd8){const _0x14be20=a222_0x1b3a;await mkdir(dirname(_0x94668f),{'recursive':!![]}),await writeFile(_0x94668f,JSON[_0x14be20(0x1de)](_0x101dd8,null,0x2),'utf8');}
|