@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a208_0x361d2c=a208_0x5343;(function(_0x1ec851,_0x48e8af){const _0x1d507c=a208_0x5343,_0x5a1fc6=_0x1ec851();while(!![]){try{const _0x9bcf6=-parseInt(_0x1d507c(0x143))/0x1*(parseInt(_0x1d507c(0x17c))/0x2)+parseInt(_0x1d507c(0x1a1))/0x3*(-parseInt(_0x1d507c(0x24e))/0x4)+-parseInt(_0x1d507c(0x146))/0x5*(parseInt(_0x1d507c(0x177))/0x6)+parseInt(_0x1d507c(0x1ce))/0x7+-parseInt(_0x1d507c(0x236))/0x8*(-parseInt(_0x1d507c(0x142))/0x9)+-parseInt(_0x1d507c(0x1b8))/0xa*(-parseInt(_0x1d507c(0x18c))/0xb)+parseInt(_0x1d507c(0x240))/0xc;if(_0x9bcf6===_0x48e8af)break;else _0x5a1fc6['push'](_0x5a1fc6['shift']());}catch(_0xf0914f){_0x5a1fc6['push'](_0x5a1fc6['shift']());}}}(a208_0x2380,0xf3af9));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(_0xded6b9){_activeCookie=_0xded6b9||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(a208_0x361d2c(0x1f8)),PLATFORM_ERROR_CODE=Symbol(a208_0x361d2c(0x1b6));export function isPlatformTransportFailure(_0x629691){const _0x3d9174=a208_0x361d2c;return Boolean(_0x629691&&typeof _0x629691===_0x3d9174(0x13d)&&_0x629691[PLATFORM_TRANSPORT_FAILURE]===!![]);}export function getPlatformErrorCode(_0x38f7f7){const _0x59250f=a208_0x361d2c;if(!_0x38f7f7||typeof _0x38f7f7!==_0x59250f(0x13d))return undefined;const _0x4acc1b=_0x38f7f7[PLATFORM_ERROR_CODE];return typeof _0x4acc1b===_0x59250f(0x15f)&&_0x4acc1b?_0x4acc1b:undefined;}function createPlatformApiError(_0x40a282,_0x532996){const _0x5e35e7=a208_0x361d2c,_0x180a92=typeof _0x532996===_0x5e35e7(0x15f)?_0x532996[_0x5e35e7(0x170)]():typeof _0x532996===_0x5e35e7(0x194)?String(_0x532996):'',_0x2df6e6=CliErrors[_0x5e35e7(0x1d2)](_0x40a282,_0x180a92?_0x5e35e7(0x1fc)+_0x180a92:undefined);return _0x180a92&&(Object['defineProperty'](_0x2df6e6,PLATFORM_ERROR_CODE,{'value':_0x180a92}),Object[_0x5e35e7(0x1e5)](_0x2df6e6,_0x5e35e7(0x237),{'value':{'remoteErrorCode':_0x180a92},'enumerable':![]})),_0x2df6e6;}function createFetchFailureError(_0x3ab6c0,_0x15bec4){const _0x4ac17f=a208_0x361d2c,_0x17f866=_0x15bec4 instanceof Error?_0x15bec4[_0x4ac17f(0x229)]:String(_0x15bec4),_0x2eb22e=CliErrors[_0x4ac17f(0x1d2)](_0x4ac17f(0x1f1)+_0x3ab6c0+(_0x17f866?'\x20('+_0x17f866+')':''),_0x4ac17f(0x179));return Object[_0x4ac17f(0x1e5)](_0x2eb22e,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x2eb22e;}function createIndeterminateResponseError(_0x5901dc){const _0x27b75f=a208_0x361d2c,_0x184334=CliErrors[_0x27b75f(0x1d2)](_0x5901dc+_0x27b75f(0x211),_0x27b75f(0x228));return Object[_0x27b75f(0x1e5)](_0x184334,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x184334;}async function apiRequest(_0x18902a,_0xe31fe2={}){const _0x6ee044=a208_0x361d2c,{method:method='GET',body:_0x356a2e,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0xe31fe2,_0x57b6fe=useRuntime?getRuntimeDomain():getApiDomain(),_0x4d5ab5=_activeCookie||getCookie(),_0x1030bf=''+_0x57b6fe+_0x18902a,_0xbe7066=new AbortController(),_0x21d3e9=setTimeout(()=>_0xbe7066['abort'](),timeout);try{const _0x2cedbe=await fetch(_0x1030bf,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x4d5ab5,'X-Invoke-Source':_0x6ee044(0x193),...headers},'body':_0x356a2e?JSON[_0x6ee044(0x1a8)](_0x356a2e):undefined,'signal':_0xbe7066[_0x6ee044(0x1cd)]});let _0x599c97;try{_0x599c97=await _0x2cedbe[_0x6ee044(0x22e)]();}catch(_0x5c4bbc){if(_0x5c4bbc instanceof Error&&_0x5c4bbc[_0x6ee044(0x250)]===_0x6ee044(0x1a4))throw CliErrors[_0x6ee044(0x1d2)]('Request\x20timeout:\x20'+_0x1030bf);if(_0x2cedbe['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x6ee044(0x1d2)](_0x6ee044(0x157)+_0x2cedbe[_0x6ee044(0x1f6)]+')',_0x2cedbe['status']>=0x190?_0x6ee044(0x168):undefined);}if(!_0x2cedbe['ok']||_0x599c97[_0x6ee044(0x1e3)]===![])throw CliErrors[_0x6ee044(0x1d2)](_0x599c97['errorMsg']||_0x599c97[_0x6ee044(0x229)]||_0x6ee044(0x16b)+_0x2cedbe['status'],_0x599c97[_0x6ee044(0x22d)]?'API\x20error\x20code:\x20'+_0x599c97['errorCode']:undefined);return _0x599c97;}catch(_0x13ab52){if(_0x13ab52 instanceof CliError)throw _0x13ab52;if(_0x13ab52 instanceof Error&&_0x13ab52['name']==='AbortError')throw CliErrors[_0x6ee044(0x1d2)](_0x6ee044(0x1ac)+_0x1030bf);throw createFetchFailureError(_0x1030bf,_0x13ab52);}finally{clearTimeout(_0x21d3e9);}}function a208_0x2380(){const _0x498fe2=['/smartapi/db-analysis/jobs/cancel','/generate-standard-pages/status?','1518lxHSPU','POST','isInteger','pageSize','operationId','authRequired','Knowledge-base\x20update\x20requires\x20title\x20or\x20content.','body','version','/notification/channel-config/list','GET','userId','\x20failed,\x20HTTP\x20','replace','api_error','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','99DronXE','email','currentPage','displayName','error','/smartapi/dblink/create','needSelf','cli:rabetbase','number','const\x20data\x20=\x20await\x20client.sql.execute({','totalCount','dbtableConfig','target','key',':\x20invalid\x20JSON\x20response\x20envelope','/smartapi/permit/role/get-one','DATA_NOT_EXIST','datasetTableCount','ER\x20relation\x20does\x20not\x20exist','roleType','.create({\x20/*\x20fields\x20*/\x20});','61881NCdNqi','\x20apps.\x20','url','AbortError','});','/admin/knowledge-base/update','sqlCode','stringify','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','/smartapi/permit/role/create','set','Request\x20timeout:\x20','/smartapi/permit/user-role/get-user-list','createTime','\x20failed','/admin/knowledge-base/get-one','/smartapi/question/er-config/cli/detail?','nickname','/smartapi/dblink/delete','/api/node-toolbox/dataset/model-list?','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20','platform-error-code','/admin/knowledge-base/delete','667130dYlKxl','summary','/smartapi/question/er-config/cli/erCreate','value','type','API\x20error\x20code:\x20306','/smartapi/custom/getUserCustomSql?id=','/api/management/library/scripts/save','/smartapi/custom/updateUserCustomSql','application/json','/smartapi/dataset/get-dataset-list','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/webcode/page/restore','add','dataset_','operations','hint','\x20\x20sqlCode:\x20\x27','includes','code','push','signal','12913089GBNieV','Update\x20enterprise\x20knowledge\x20base','array','length','apiError','requirementDescription','warn','min','tableName','tags','):\x20missing\x20data.markdown\x20field','\x20\x20return\x20rows;','deleted','physicalTableCount','Fetch\x20datasets','/smartapi/dataset/get-driven-data?','Knowledge-base\x20pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20','/smartapi/dblink/testConnect','functionName','getOne','clientOperationId','success','Operation\x20\x22','defineProperty','remark','append','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/api/node-toolbox/api-doc-generator','/smartapi/common/queryFileUrl','scriptName','/smartapi/page/restore','create','/smartapi/app-config/create','isArray','/smartapi/permit/page/get-one','Request\x20failed:\x20','company','\x20\x20currentPage:\x201,','const\x20results\x20=\x20data.execResult\x20||\x20[];','personal','status','appCode','platform-transport-failure','/filter','BFF\x20save\x20returned\x20no\x20valid\x20id','isSafeInteger','API\x20error\x20code:\x20','/smartapi/dataset/get-dataset-operation','datasetName','remove','/smartapi/permit/role/get-list','join','responseFields','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','Fetch\x20doc\x20(','sdk','content','(/*\x20params\x20*/);','description','max','/api/management/library/scripts/delete','/smartapi/dblink/getOne','/smartapi/dataset/restore-dataset','/smartapi/permit/resource/get-menu-list','/smartapi/app/getList','List\x20enterprise\x20knowledge\x20bases','Invalid\x20response\x20format\x20(','\x20returned\x20an\x20invalid\x20JSON\x20response\x20envelope\x20after\x20HTTP\x20success.','markdown','file','download','dbId','/generate-standard-pages/start','path','needPublic','modelId','avatar','.filter({','CUSTOM','SQL\x20query\x20not\x20found:\x20id=','/smartapi/page/getDeletedPageList?','roleName','/smartapi/custom/queryUserCustomSqlList','map','modelCode','List\x20enterprise\x20knowledge\x20bases\x20returned\x20invalid\x20paging\x20metadata.','/smartapi/menu/find?','/smartapi/dblink/getAllTableList','operationName','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20scope.','The\x20server\x20outcome\x20is\x20indeterminate.\x20Verify\x20current\x20state\x20before\x20retrying\x20any\x20mutation.','message','/smartapi/menu/regroup','Page\x20not\x20found:\x20','toString','errorCode','json',',\x20HTTP\x20','info','List\x20enterprise\x20knowledge\x20bases\x20returned\x20an\x20invalid\x20response\x20contract.','includeImports','/admin/knowledge-base/create','.getOne(id);','/userTenant/getByTenantCode','16vgaRuY','data','/smartapi/app-config/update','/api/management/library/scripts/statistics?appCode=','method','/api/custom/executeSql','scope','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','title','mobile','4629768tTWLaB','update','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','test','Unauthorized','/smartapi/lovrabet/update-page','/smartapi/permit/role/delete','requestFields','list','permits','/smartapi/dblink/getTableDiffV2ByPage','/smartapi/common/uploadFile','\x20\x20pageSize:\x2020,','/admin/knowledge-base/get-list','40jAqoTs','\x20\x20where:\x20{},','name','/smartapi/dataset/update-driven-data','/api/','toLowerCase','const\x20result\x20=\x20await\x20client.models.','object','0000','//\x20SQL:\x20','filter','/smartapi/dataset/text-generate/start','1140354yjeOJw','1229NWQsZH','/smartapi/tasks/','\x20\x20});','1183940wNFNGv','/smartapi/dblink/getList','enabled','/smartapi/dataset/text-generate/preview','updateTime','validation','Get\x20enterprise\x20knowledge\x20base','/smartapi/permit/page/save','entries','UNAUTHORIZED','/smartapi/ocr/recognize-text?','/api/management/library/scripts/list?appCode=','abort','SQL\x20query\x20not\x20found:\x20','\x20\x20\x20\x20sqlCode:\x20\x27','Fetch\x20menu\x20list','longTerm','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','delete','/api/management/script/cache/clear','正在从服务器拉取模型列表...\x20(环境:\x20','\x22\x20not\x20found\x20in\x20dataset\x20','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','tableList','/smartapi/app-config/delete','string','sqlName','401','/smartapi/dataset/delete-dataset','label','Fetch\x20async\x20task\x20','cookie','/api/management/library/scripts/info?id=','/smartapi/question/er-config','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/app-config/list','has','API\x20error:\x20','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','/smartapi/app-config/getByKey','Dataset\x20not\x20found:\x20','/smartapi/lovrabet/dataset/','trim','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','\x20of\x20','/smartapi/custom/getUserCustomSql','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','/smartapi/question/er-config/cli/delete-single','/smartapi/question/er-config/business-group/edit','24xOeXEy','tableData','Check\x20network\x20connectivity\x20and\x20try\x20again.'];a208_0x2380=function(){return _0x498fe2;};return a208_0x2380();}async function apiFormRequest(_0x1ef789,_0x386a3a,_0x25587d={}){const _0x39f915=a208_0x361d2c,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x25587d,_0x188049=_activeCookie||getCookie(),_0x3f0cae=''+getApiDomain()+_0x1ef789,_0x26c079=new AbortController(),_0x4be4e9=setTimeout(()=>_0x26c079[_0x39f915(0x152)](),timeout);try{const _0x5daf26=await fetch(_0x3f0cae,{'method':_0x39f915(0x17d),'headers':{'Cookie':_0x188049,'X-Invoke-Source':'cli:rabetbase'},'body':_0x386a3a,'signal':_0x26c079[_0x39f915(0x1cd)]});let _0xd4f194;try{_0xd4f194=await _0x5daf26[_0x39f915(0x22e)]();}catch(_0x2dcbbe){if(_0x2dcbbe instanceof Error&&_0x2dcbbe[_0x39f915(0x250)]===_0x39f915(0x1a4))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x3f0cae);throw CliErrors[_0x39f915(0x1d2)](_0x39f915(0x157)+_0x5daf26[_0x39f915(0x1f6)]+')',_0x5daf26['status']>=0x190?_0x39f915(0x168):undefined);}if(!_0x5daf26['ok']||_0xd4f194['success']===![])throw CliErrors[_0x39f915(0x1d2)](_0xd4f194['errorMsg']||_0xd4f194[_0x39f915(0x229)]||_0x39f915(0x16b)+_0x5daf26[_0x39f915(0x1f6)],_0xd4f194['errorCode']?'API\x20error\x20code:\x20'+_0xd4f194[_0x39f915(0x22d)]:undefined);return _0xd4f194;}catch(_0x3e5222){if(_0x3e5222 instanceof CliError)throw _0x3e5222;if(_0x3e5222 instanceof Error&&_0x3e5222['name']===_0x39f915(0x1a4))throw CliErrors[_0x39f915(0x1d2)](_0x39f915(0x1ac)+_0x3f0cae);throw createFetchFailureError(_0x3f0cae,_0x3e5222);}finally{clearTimeout(_0x4be4e9);}}export async function uploadDevelopmentFile(_0x476317,_0x23b198){const _0x4c74e5=a208_0x361d2c,_0x3bc964=await readFile(_0x23b198),_0x3f4e3a=new FormData();_0x3f4e3a[_0x4c74e5(0x1e7)](_0x4c74e5(0x1f7),_0x476317),_0x3f4e3a[_0x4c74e5(0x1e7)](_0x4c74e5(0x213),new Blob([new Uint8Array(_0x3bc964)]),basename(_0x23b198));const _0x4162e5=await apiFormRequest(_0x4c74e5(0x24b),_0x3f4e3a);return _0x4162e5[_0x4c74e5(0x237)];}export async function queryDevelopmentFileUrl(_0x418f56,_0xcb050f={}){const _0xabf0f9=a208_0x361d2c,_0x171c56=await apiRequest(_0xabf0f9(0x1ea),{'method':_0xabf0f9(0x17d),'body':{'filePath':_0x418f56,'downloadFlag':_0xcb050f[_0xabf0f9(0x214)]??![],..._0xcb050f[_0xabf0f9(0x156)]?{'longTerm':!![]}:{}}});return _0x171c56[_0xabf0f9(0x237)];}export async function recognizeDevelopmentOcr(_0x4c79b6,_0x270874){const _0x30be8c=a208_0x361d2c,_0x44b18e=new URLSearchParams({'url':_0x270874[_0x30be8c(0x1a3)],'type':_0x270874[_0x30be8c(0x1bc)],'appCode':_0x4c79b6}),_0x502c31=await apiRequest(_0x30be8c(0x150)+_0x44b18e[_0x30be8c(0x22c)](),{'method':_0x30be8c(0x186)});return _0x502c31['data'];}function isAuthFailure(_0xae8c){const _0x56f01e=a208_0x361d2c,_0x14c2fc=_0xae8c['errorMsg']||_0xae8c['message']||_0xae8c['data']?.[_0x56f01e(0x229)]||_0xae8c['errorMessage']||_0xae8c[_0x56f01e(0x190)]||'';return _0xae8c[_0x56f01e(0x22d)]===_0x56f01e(0x14f)||_0xae8c[_0x56f01e(0x1cb)]===0x191||_0xae8c['code']===_0x56f01e(0x161)||_0x14c2fc[_0x56f01e(0x1ca)](_0x56f01e(0x161))||_0x14c2fc[_0x56f01e(0x1ca)](_0x56f01e(0x244))||_0x14c2fc[_0x56f01e(0x1ca)]('登录')||_0x14c2fc[_0x56f01e(0x1ca)]('认证');}export async function platformFetch(_0x5dfa42,_0xec8e77){const _0x385658=a208_0x361d2c;let _0x554ba6;try{_0x554ba6=await fetch(_0x5dfa42,{'method':_0xec8e77[_0x385658(0x23a)]??_0x385658(0x186),'headers':{'Content-Type':_0x385658(0x1c1),'Cookie':_0xec8e77[_0x385658(0x165)],'X-Invoke-Source':_0x385658(0x193)},..._0xec8e77[_0x385658(0x183)]&&{'body':JSON[_0x385658(0x1a8)](_0xec8e77[_0x385658(0x183)])}});}catch(_0x23d5a5){throw createFetchFailureError(_0x5dfa42,_0x23d5a5);}let _0x33f361;try{_0x33f361=await _0x554ba6[_0x385658(0x22e)]();}catch(_0x26c868){if(!_0x554ba6['ok']){if(_0x554ba6['status']===0x191)throw CliErrors[_0x385658(0x181)]();throw CliErrors['apiError'](_0xec8e77[_0x385658(0x163)]+_0x385658(0x188)+_0x554ba6['status']);}throw createFetchFailureError(_0x5dfa42,_0x26c868);}if(_0x33f361===null||typeof _0x33f361!==_0x385658(0x13d)||Array[_0x385658(0x1ef)](_0x33f361)){if(_0x554ba6[_0x385658(0x1f6)]===0x191)throw CliErrors['authRequired']();if(_0x554ba6['ok'])throw createIndeterminateResponseError(_0xec8e77[_0x385658(0x163)]);throw CliErrors[_0x385658(0x1d2)](_0xec8e77[_0x385658(0x163)]+_0x385658(0x1af)+(!_0x554ba6['ok']?_0x385658(0x22f)+_0x554ba6[_0x385658(0x1f6)]:'')+_0x385658(0x19a));}const _0x51b6bc=typeof _0x33f361[_0x385658(0x22d)]===_0x385658(0x15f)||typeof _0x33f361[_0x385658(0x22d)]===_0x385658(0x194),_0x1f3549=_0x51b6bc?String(_0x33f361[_0x385658(0x22d)])[_0x385658(0x170)]():'',_0x201982=_0x33f361['success']===![]||_0x51b6bc&&_0x1f3549!==_0x385658(0x13e);if(!_0x554ba6['ok']||_0x201982){if(_0x554ba6['status']===0x191||isAuthFailure(_0x33f361))throw CliErrors['authRequired']();throw createPlatformApiError(_0x33f361['errorMsg']||_0x33f361[_0x385658(0x229)]||_0xec8e77[_0x385658(0x163)]+'\x20failed'+(!_0x554ba6['ok']?',\x20HTTP\x20'+_0x554ba6[_0x385658(0x1f6)]:''),_0x33f361['errorCode']??_0x33f361[_0x385658(0x1cb)]);}if(_0x33f361[_0x385658(0x1e3)]!==!![]||_0x33f361[_0x385658(0x22d)]!==_0x385658(0x13e))throw createIndeterminateResponseError(_0xec8e77[_0x385658(0x163)]);return _0x33f361['data'];}export async function platformRequest(_0x4c681d,_0x447ce3){const _0x521b4b=a208_0x361d2c;if(/^https?:\/\//i[_0x521b4b(0x243)](_0x4c681d))throw CliErrors[_0x521b4b(0x14b)](_0x521b4b(0x15c)+_0x4c681d,_0x521b4b(0x174));const _0x4e5183=_0x4c681d['startsWith']('/')?_0x4c681d:'/'+_0x4c681d;return platformFetch(''+getApiDomain()+_0x4e5183,_0x447ce3);}const MAX_KNOWLEDGE_BASE_PAGE_SIZE=0x64;function parseKnowledgeBaseInteger(_0x40f433,_0x5093c1){const _0x33d7c5=a208_0x361d2c,_0xfe222a=typeof _0x40f433===_0x33d7c5(0x194)?_0x40f433:typeof _0x40f433===_0x33d7c5(0x15f)&&/^(0|[1-9]\d*)$/['test'](_0x40f433)?Number(_0x40f433):Number['NaN'],_0x3d1f67=Number[_0x33d7c5(0x1fb)](_0xfe222a)&&(_0x5093c1==='id'?_0xfe222a>0x0:_0xfe222a>=0x0);if(!_0x3d1f67)throw CliErrors[_0x33d7c5(0x1d2)](_0x33d7c5(0x1b5)+_0x5093c1+'.');return _0xfe222a;}function parseKnowledgeBaseText(_0x2507f2,_0x4a39c5){const _0x508e10=a208_0x361d2c;if(typeof _0x2507f2==='string'&&(_0x4a39c5===_0x508e10(0x206)||_0x2507f2[_0x508e10(0x170)]()))return _0x2507f2;throw CliErrors[_0x508e10(0x1d2)]('Knowledge-base\x20response\x20is\x20missing\x20a\x20valid\x20'+_0x4a39c5+'.');}function parseKnowledgeBaseRecord(_0x7fc638){const _0x5b27c2=a208_0x361d2c;if(!_0x7fc638||typeof _0x7fc638!==_0x5b27c2(0x13d)||Array[_0x5b27c2(0x1ef)](_0x7fc638))throw CliErrors[_0x5b27c2(0x1d2)]('Knowledge-base\x20API\x20returned\x20an\x20invalid\x20record\x20contract.');const _0x313d47=_0x7fc638;if(_0x313d47[_0x5b27c2(0x23c)]!==_0x5b27c2(0x1f2)&&_0x313d47[_0x5b27c2(0x23c)]!==_0x5b27c2(0x1f5))throw CliErrors[_0x5b27c2(0x1d2)](_0x5b27c2(0x227));const _0x395288={'id':parseKnowledgeBaseInteger(_0x313d47['id'],'id'),'scope':_0x313d47[_0x5b27c2(0x23c)],'appCode':parseKnowledgeBaseText(_0x313d47[_0x5b27c2(0x1f7)],_0x5b27c2(0x1f7)),'title':parseKnowledgeBaseText(_0x313d47[_0x5b27c2(0x23e)],'title'),'version':parseKnowledgeBaseInteger(_0x313d47['version'],'version'),'content':parseKnowledgeBaseText(_0x313d47['content'],_0x5b27c2(0x206))};return(_0x313d47[_0x5b27c2(0x1ae)]===null||typeof _0x313d47[_0x5b27c2(0x1ae)]===_0x5b27c2(0x15f)||typeof _0x313d47[_0x5b27c2(0x1ae)]===_0x5b27c2(0x194))&&(_0x395288['createTime']=_0x313d47[_0x5b27c2(0x1ae)]),(_0x313d47[_0x5b27c2(0x14a)]===null||typeof _0x313d47[_0x5b27c2(0x14a)]==='string'||typeof _0x313d47[_0x5b27c2(0x14a)]===_0x5b27c2(0x194))&&(_0x395288[_0x5b27c2(0x14a)]=_0x313d47['updateTime']),_0x395288;}export async function listEnterpriseKnowledgeBases(_0x1b382a,_0x5d16ab={}){const _0x4d3e01=a208_0x361d2c,_0x5cfc2e=_0x5d16ab[_0x4d3e01(0x17f)]??0x32;if(!Number[_0x4d3e01(0x1fb)](_0x5cfc2e)||_0x5cfc2e<0x1||_0x5cfc2e>MAX_KNOWLEDGE_BASE_PAGE_SIZE)throw CliErrors['validation'](_0x4d3e01(0x1de)+MAX_KNOWLEDGE_BASE_PAGE_SIZE+'.');const _0x39f40c=await platformRequest(_0x4d3e01(0x24d),{'method':_0x4d3e01(0x17d),'cookie':_0x1b382a,'label':_0x4d3e01(0x20f),'body':{'currentPage':_0x5d16ab[_0x4d3e01(0x18e)]??0x1,'pageSize':_0x5cfc2e,'scope':_0x4d3e01(0x1f2),..._0x5d16ab['appCode']?{'appCode':_0x5d16ab[_0x4d3e01(0x1f7)]}:{},..._0x5d16ab[_0x4d3e01(0x23e)]?{'title':_0x5d16ab[_0x4d3e01(0x23e)]}:{}}});if(!_0x39f40c||typeof _0x39f40c!=='object'||Array[_0x4d3e01(0x1ef)](_0x39f40c)||!Array['isArray'](_0x39f40c[_0x4d3e01(0x178)]))throw CliErrors[_0x4d3e01(0x1d2)](_0x4d3e01(0x231));const _0x14b602=extractPaging(_0x39f40c);if(!_0x14b602||!Number[_0x4d3e01(0x17e)](_0x14b602[_0x4d3e01(0x18e)])||!Number['isInteger'](_0x14b602['pageSize'])||!Number[_0x4d3e01(0x17e)](_0x14b602[_0x4d3e01(0x196)])||_0x14b602['currentPage']<0x1||_0x14b602[_0x4d3e01(0x17f)]<0x1||_0x14b602[_0x4d3e01(0x17f)]>MAX_KNOWLEDGE_BASE_PAGE_SIZE||_0x14b602[_0x4d3e01(0x196)]<0x0)throw CliErrors['apiError'](_0x4d3e01(0x223));return{'items':extractList(_0x39f40c)[_0x4d3e01(0x221)](parseKnowledgeBaseRecord),'paging':_0x14b602};}export async function getEnterpriseKnowledgeBase(_0xce6311,_0x47a12d){const _0x4254b7=a208_0x361d2c,_0x30a3c4=await platformRequest(_0x4254b7(0x1b0)+buildQuery({'id':_0x47a12d}),{'cookie':_0xce6311,'label':_0x4254b7(0x14c)});return parseKnowledgeBaseRecord(_0x30a3c4);}export async function createEnterpriseKnowledgeBase(_0x359abb,_0xbfca6c){const _0x55615b=a208_0x361d2c,_0x4ff3e3=await platformRequest(_0x55615b(0x233),{'method':_0x55615b(0x17d),'cookie':_0x359abb,'label':'Create\x20enterprise\x20knowledge\x20base','body':{'scope':_0x55615b(0x1f2),..._0xbfca6c}});return parseKnowledgeBaseRecord(_0x4ff3e3);}export async function updateEnterpriseKnowledgeBase(_0x21724a,_0x100785){const _0x3a7fb4=a208_0x361d2c;if(_0x100785[_0x3a7fb4(0x23e)]===undefined&&_0x100785[_0x3a7fb4(0x206)]===undefined)throw CliErrors[_0x3a7fb4(0x14b)](_0x3a7fb4(0x182));const _0x1b8229=await platformRequest(_0x3a7fb4(0x1a6),{'method':_0x3a7fb4(0x17d),'cookie':_0x21724a,'label':_0x3a7fb4(0x1cf),'body':{'id':_0x100785['id'],..._0x100785[_0x3a7fb4(0x23e)]!==undefined?{'title':_0x100785[_0x3a7fb4(0x23e)]}:{},..._0x100785[_0x3a7fb4(0x206)]!==undefined?{'content':_0x100785[_0x3a7fb4(0x206)]}:{}}});return parseKnowledgeBaseRecord(_0x1b8229);}export async function deleteEnterpriseKnowledgeBase(_0x153305,_0x2219d8){const _0x2b58d7=a208_0x361d2c;await platformRequest(_0x2b58d7(0x1b7),{'method':_0x2b58d7(0x17d),'cookie':_0x153305,'label':'Delete\x20enterprise\x20knowledge\x20base','body':{'id':_0x2219d8}});}function cleanNewlines(_0xf2afe8){return _0xf2afe8['replace'](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x52c40e){const _0x4a35fe=a208_0x361d2c;if(!_0x52c40e[_0x4a35fe(0x250)])return _0x52c40e;return{..._0x52c40e,'name':cleanNewlines(_0x52c40e[_0x4a35fe(0x250)])};}export async function fetchModelList(_0x4a89cd,_0x59aeb5){const _0x402fe6=a208_0x361d2c,_0x27d64f=getEnv(),_0x1a5b54=new URLSearchParams({'appcode':_0x4a89cd,'otype':_0x402fe6(0x1d0)}),_0x49770d=_0x402fe6(0x1b4)+_0x1a5b54[_0x402fe6(0x22c)]();logger[_0x402fe6(0x230)]('fetch-model-list',_0x402fe6(0x15a)+_0x27d64f+')',{'apiPath':_0x49770d});const _0x17a076=await platformRequest(_0x49770d,{'cookie':_0x59aeb5,'label':_0x402fe6(0x1dc)}),_0x5eb608=(_0x17a076['configArray']??[])[_0x402fe6(0x221)](cleanDatasetName);return{'configArray':_0x5eb608,'count':_0x5eb608[_0x402fe6(0x1d1)]};}export async function fetchDatasetDoc(_0x4f5cfb){const _0x428d8c=a208_0x361d2c,{appCode:_0x264d6a,cookie:_0x3b838d,datasetCode:_0x2cd669,datasetId:_0x57f767,extraParams:_0x2d367d}=_0x4f5cfb,_0x3844c7=await platformRequest(_0x428d8c(0x1e9),{'method':_0x428d8c(0x17d),'body':{'appCode':_0x264d6a,'datasetCode':_0x2cd669,'datasetId':_0x57f767,..._0x2d367d||{}},'cookie':_0x3b838d,'label':_0x428d8c(0x204)+_0x2cd669+')'});if(!_0x3844c7||typeof _0x3844c7[_0x428d8c(0x212)]!=='string')throw new Error(_0x428d8c(0x210)+_0x2cd669+_0x428d8c(0x1d8));return _0x3844c7[_0x428d8c(0x212)];}export async function getMenuTree(_0x4b8686,_0x2f949e){const _0x3f595c=a208_0x361d2c,_0x50dc29=new URLSearchParams({'appCode':_0x4b8686});return platformRequest(_0x3f595c(0x224)+_0x50dc29[_0x3f595c(0x22c)](),{'cookie':_0x2f949e,'label':_0x3f595c(0x155)});}export async function createMenuRecord(_0x115963,_0x87da5,_0x1a7552){const _0x1a766f=a208_0x361d2c;return platformRequest('/smartapi/menu/create',{'method':_0x1a766f(0x17d),'body':_0x115963,'cookie':_0x87da5,'label':_0x1a7552});}export async function updateMenuRecord(_0x50c84a,_0x195286,_0x665df7){const _0xb306ea=a208_0x361d2c;return platformRequest('/smartapi/menu/update',{'method':_0xb306ea(0x17d),'body':_0x50c84a,'cookie':_0x195286,'label':_0x665df7});}export async function deleteMenuRecord(_0x10f3ac,_0x3a03bd,_0x143c19){const _0x572330=a208_0x361d2c;return platformRequest('/smartapi/menu/delete',{'method':_0x572330(0x17d),'body':{'id':_0x10f3ac},'cookie':_0x3a03bd,'label':_0x143c19});}export async function batchDeleteMenuRecords(_0x26f785,_0x280fa1,_0x1a5b13){return platformRequest('/smartapi/menu/batchDelete',{'method':'POST','body':{'idList':_0x26f785},'cookie':_0x280fa1,'label':_0x1a5b13});}export async function startMenuRegroup(_0x564438,_0xa8577c,_0x31b3bd){const _0x32de0d=a208_0x361d2c;return platformRequest(_0x32de0d(0x22a),{'method':'POST','body':_0x564438,'cookie':_0xa8577c,'label':_0x31b3bd});}export async function getAsyncTaskStatus(_0x2cff63,_0x23a2fe,_0x4b7378){const _0x8c9034=a208_0x361d2c,_0x56d34d=new URLSearchParams({'appCode':_0x23a2fe});return platformRequest(_0x8c9034(0x144)+encodeURIComponent(_0x2cff63)+'?'+_0x56d34d['toString'](),{'cookie':_0x4b7378,'label':_0x8c9034(0x164)+_0x2cff63});}export async function listBffScripts(_0x120d03,_0x44f35c,_0x30e38d){const _0x1b4f10=a208_0x361d2c;let _0x45c62a=_0x1b4f10(0x151)+_0x120d03;if(_0x44f35c)_0x45c62a+='&type='+_0x44f35c;const _0x3daca4=await apiRequest(_0x45c62a);let _0x9b8142=extractList(_0x3daca4['data']);if(_0x30e38d?.[_0x1b4f10(0x1eb)]){const _0x346c46=_0x30e38d['scriptName'][_0x1b4f10(0x13b)]();_0x9b8142=_0x9b8142[_0x1b4f10(0x140)](_0x3c425b=>_0x3c425b[_0x1b4f10(0x1e0)]?.['toLowerCase']()[_0x1b4f10(0x1ca)](_0x346c46)||_0x3c425b[_0x1b4f10(0x208)]?.[_0x1b4f10(0x13b)]()[_0x1b4f10(0x1ca)](_0x346c46));}return _0x9b8142;}export async function getBffScriptInfo(_0x1beb59){const _0x25eeca=a208_0x361d2c,_0xe808c9=await apiRequest(_0x25eeca(0x166)+_0x1beb59);if(!_0xe808c9[_0x25eeca(0x237)])throw CliErrors[_0x25eeca(0x14b)]('BFF\x20script\x20not\x20found:\x20id='+_0x1beb59);return _0xe808c9[_0x25eeca(0x237)];}export async function saveBffScript(_0x3de55b){const _0x260b7d=a208_0x361d2c,_0x2bddea=await apiRequest(_0x260b7d(0x1bf),{'method':_0x260b7d(0x17d),'body':_0x3de55b}),{id:_0x318d95,entity:_0x380152}=normalizeEntityWithIdResponse(_0x2bddea[_0x260b7d(0x237)]);if(_0x318d95!==undefined){const _0x11fd4e=typeof _0x380152[_0x260b7d(0x1e0)]==='string'||typeof _0x380152['scriptType']===_0x260b7d(0x15f)?_0x380152:undefined;return{'id':_0x318d95,'script':_0x11fd4e};}throw CliErrors[_0x260b7d(0x1d2)](_0x260b7d(0x1fa));}export async function deleteBffScript(_0x1fc2b6){const _0x5d050b=a208_0x361d2c;await apiRequest(_0x5d050b(0x20a),{'method':_0x5d050b(0x17d),'body':{'id':_0x1fc2b6}});}export async function getBffScriptStatistics(_0x2c1bfb){const _0x1f89d8=a208_0x361d2c,_0x4e8f25=await apiRequest(_0x1f89d8(0x239)+_0x2c1bfb);return extractList(_0x4e8f25['data']);}export async function clearBffScriptCache(){const _0x59c39f=a208_0x361d2c,_0x509c6a=await apiRequest(_0x59c39f(0x159),{'method':_0x59c39f(0x17d),'useRuntime':!![]});return typeof _0x509c6a[_0x59c39f(0x237)]===_0x59c39f(0x15f)?_0x509c6a[_0x59c39f(0x237)]:'';}export async function listBffDatasetOperations(_0x22f270,_0x3bd124){const _0x59ba56=a208_0x361d2c,_0x2a3424=await apiRequest(_0x59ba56(0x1fd),{'method':_0x59ba56(0x17d),'body':{'appCode':_0x22f270,'datasetId':_0x3bd124}});return _0x2a3424[_0x59ba56(0x237)];}export async function listSqlQueries(_0x5122c8,_0x589773){const _0xc4b65=a208_0x361d2c,_0x417fe2=await apiRequest(_0xc4b65(0x220),{'method':'POST','body':{'appCode':_0x5122c8,'currentPage':_0x589773?.['currentPage']??0x1,'pageSize':_0x589773?.['pageSize']??0x32,'sqlCode':_0x589773?.['sqlCode'],'sqlName':_0x589773?.[_0xc4b65(0x160)]}});return _0x417fe2['data'];}export async function getSqlQueryInfo(_0xee2e37,_0x35f30e){const _0x4c5aa3=a208_0x361d2c,_0x383a67=await listSqlQueries(_0xee2e37,{'sqlCode':_0x35f30e}),_0x3626db=_0x383a67['tableData']?.[0x0];if(!_0x3626db)throw CliErrors[_0x4c5aa3(0x14b)](_0x4c5aa3(0x153)+_0x35f30e);return _0x3626db;}export async function getSqlQueryDetail(_0x368ec3){const _0x2e69df=a208_0x361d2c,_0x547cf8=await apiRequest(_0x2e69df(0x173)+('?sqlCode='+encodeURIComponent(_0x368ec3)));if(!_0x547cf8[_0x2e69df(0x237)])throw CliErrors[_0x2e69df(0x14b)]('SQL\x20query\x20not\x20found:\x20'+_0x368ec3);return _0x547cf8['data'];}export async function getSqlQueryDetailById(_0x391ffa){const _0x27f10f=a208_0x361d2c,_0x1eda89=await apiRequest(_0x27f10f(0x1be)+_0x391ffa);if(!_0x1eda89['data'])throw CliErrors['validation'](_0x27f10f(0x21d)+_0x391ffa);return _0x1eda89['data'];}export async function createSqlQuery(_0x5a779c){const _0x313e92=a208_0x361d2c,_0x1e3693=await apiRequest('/smartapi/custom/saveUserCustomSql',{'method':_0x313e92(0x17d),'body':_0x5a779c}),{id:_0x575426,entity:_0x158dcb}=normalizeEntityWithIdResponse(_0x1e3693[_0x313e92(0x237)]);if(!(_0x313e92(0x1a7)in _0x158dcb)&&_0x575426)return getSqlQueryDetailById(_0x575426);return normalizeSqlQueryEntity(_0x158dcb);}export async function updateSqlQuery(_0x12ba27){const _0x58e7fe=a208_0x361d2c,_0x1f102d=await apiRequest(_0x58e7fe(0x1c0),{'method':_0x58e7fe(0x17d),'body':_0x12ba27}),{id:_0x16485b,entity:_0x350de2}=normalizeEntityWithIdResponse(_0x1f102d[_0x58e7fe(0x237)]);if(!('sqlCode'in _0x350de2)){if(_0x12ba27['sqlCode'])return getSqlQueryDetail(_0x12ba27[_0x58e7fe(0x1a7)]);if(_0x16485b)return getSqlQueryDetailById(_0x16485b);}return normalizeSqlQueryEntity(_0x350de2);}export async function deleteSqlQuery(_0x59e3f0){const _0x4d9b8e=a208_0x361d2c;await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':_0x4d9b8e(0x17d),'body':_0x59e3f0});}export async function saveSqlQuery(_0x52a3c8){const _0x4c13d2=a208_0x361d2c,_0x478f0b=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x4c13d2(0x17d),'body':_0x52a3c8});return _0x478f0b[_0x4c13d2(0x237)];}function normalizeSqlQueryEntity(_0x4510d5){const _0x4806c7=a208_0x361d2c;return{..._0x4510d5,'id':Number(_0x4510d5['id']),'dbId':_0x4510d5[_0x4806c7(0x215)]==null?undefined:Number(_0x4510d5[_0x4806c7(0x215)]),'version':_0x4510d5[_0x4806c7(0x184)]==null?undefined:Number(_0x4510d5['version'])};}export async function executeSql(_0x45e7e3,_0x420d6c,_0x2f46b5){const _0x396558=a208_0x361d2c,_0x1e65c5=await apiRequest(_0x396558(0x23b),{'method':_0x396558(0x17d),'body':{'appCode':_0x45e7e3,'sqlCode':_0x420d6c,..._0x2f46b5&&{'params':_0x2f46b5}},'useRuntime':!![]});return _0x1e65c5[_0x396558(0x237)];}export async function executeDatasetDataOperation(_0x3eadd8,_0x25bd0f,_0x5ae08e,_0x4fbfa5={}){const _0x586658=a208_0x361d2c;try{const _0x4472e8=await apiRequest(_0x586658(0x13a)+_0x3eadd8+'/'+_0x25bd0f+'/'+_0x5ae08e,{'method':'POST','body':_0x4fbfa5,'useRuntime':!![]});return _0x4472e8[_0x586658(0x237)];}catch(_0x502635){if(_0x5ae08e===_0x586658(0x1e1)&&_0x502635 instanceof CliError&&_0x502635['code']===_0x586658(0x18a)&&_0x4fbfa5['id']!==undefined&&_0x4fbfa5['id']!==null&&_0x4fbfa5['id']!==''){const _0x33898d=await apiRequest(_0x586658(0x13a)+_0x3eadd8+'/'+_0x25bd0f+_0x586658(0x1f9),{'method':_0x586658(0x17d),'body':{'where':{'id':{'$eq':_0x4fbfa5['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x43dfc5=Array[_0x586658(0x1ef)](_0x33898d[_0x586658(0x237)]?.[_0x586658(0x178)])?_0x33898d[_0x586658(0x237)][_0x586658(0x178)]:[];return _0x43dfc5[0x0]??null;}throw _0x502635;}}export async function listDatasets(_0x4dbb9b,_0x267117){const _0x263c88=a208_0x361d2c,_0x4be78d={'appCode':_0x4dbb9b,'deleted':_0x267117?.[_0x263c88(0x1da)]??![]};if(_0x267117?.['code'])_0x4be78d['code']=_0x267117[_0x263c88(0x1cb)];if(_0x267117?.[_0x263c88(0x250)])_0x4be78d['name']=_0x267117[_0x263c88(0x250)];const _0x38fdb5=await apiRequest(_0x263c88(0x1c2),{'method':_0x263c88(0x17d),'body':_0x4be78d});return extractList(_0x38fdb5[_0x263c88(0x237)]);}export async function deleteDataset(_0x30890e,_0x20e416){const _0x24250d=a208_0x361d2c;await apiRequest(_0x24250d(0x162),{'method':_0x24250d(0x17d),'body':{'appCode':_0x30890e,'datasetId':_0x20e416}});}export async function restoreDataset(_0x13b502,_0x3190f4){const _0x46ca83=a208_0x361d2c;await apiRequest(_0x46ca83(0x20c),{'method':_0x46ca83(0x17d),'body':{'appCode':_0x13b502,'datasetId':_0x3190f4}});}export async function previewTextGeneratedDataset(_0x96807d,_0x104639){const _0x32c13d=a208_0x361d2c,_0x484f8b=await apiRequest(_0x32c13d(0x149),{'method':_0x32c13d(0x17d),'body':{'appCode':_0x96807d,'datasetName':_0x104639[_0x32c13d(0x1fe)],'requirementDescription':_0x104639[_0x32c13d(0x1d3)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x484f8b['data'];}export async function startTextGeneratedDataset(_0x399396,_0x22202c,_0x214cc8){const _0x5dcfe2=a208_0x361d2c,_0xeaf39f=await apiRequest(_0x5dcfe2(0x141),{'method':_0x5dcfe2(0x17d),'body':{'appCode':_0x399396,..._0x214cc8?.['clientOperationId']?{'clientOperationId':_0x214cc8['clientOperationId']}:{},'design':_0x22202c},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0xeaf39f[_0x5dcfe2(0x237)];}export async function getTextGeneratedDatasetStatus(_0xb51576,_0x2e9ace){const _0x24ab34=a208_0x361d2c,_0x38bb71=new URLSearchParams({'appCode':_0xb51576});_0x2e9ace[_0x24ab34(0x180)]&&_0x38bb71[_0x24ab34(0x1ab)](_0x24ab34(0x180),_0x2e9ace[_0x24ab34(0x180)]);_0x2e9ace[_0x24ab34(0x1e2)]&&_0x38bb71['set'](_0x24ab34(0x1e2),_0x2e9ace[_0x24ab34(0x1e2)]);const _0x4da373=await apiRequest('/smartapi/dataset/text-generate/status?'+_0x38bb71[_0x24ab34(0x22c)]());return _0x4da373['data'];}export async function searchDatasets(_0x1777dd,_0x3edda8){const _0x1ef66f=a208_0x361d2c,_0x7823de=await listDatasets(_0x1777dd,{'name':_0x3edda8}),_0x3a45d2=_0x3edda8[_0x1ef66f(0x13b)](),_0x5e975e=new Set(_0x7823de[_0x1ef66f(0x221)](_0x49e7a3=>_0x49e7a3['id'])),_0x175053=_0x7823de[_0x1ef66f(0x140)](_0x1c71c4=>_0x1c71c4[_0x1ef66f(0x197)]?.[_0x1ef66f(0x1d6)]?.[_0x1ef66f(0x13b)]()['includes'](_0x3a45d2)||_0x1c71c4[_0x1ef66f(0x208)]?.['toLowerCase']()['includes'](_0x3a45d2)),_0x57cf55=await listDatasets(_0x1777dd,{'code':_0x3edda8});for(const _0x5d8973 of _0x57cf55){!_0x5e975e[_0x1ef66f(0x16a)](_0x5d8973['id'])&&(_0x7823de[_0x1ef66f(0x1cc)](_0x5d8973),_0x5e975e[_0x1ef66f(0x1c5)](_0x5d8973['id']));}return _0x7823de;}export function normalizeDatasetOperations(_0x6fd9b9){const _0x259b6d=a208_0x361d2c;if(Array[_0x259b6d(0x1ef)](_0x6fd9b9))return _0x6fd9b9[_0x259b6d(0x140)](_0x285e60=>_0x285e60!=null&&typeof _0x285e60===_0x259b6d(0x13d));if(_0x6fd9b9&&typeof _0x6fd9b9===_0x259b6d(0x13d))return Object['entries'](_0x6fd9b9)[_0x259b6d(0x140)](([,_0x8b528])=>_0x8b528!=null&&typeof _0x8b528===_0x259b6d(0x13d))[_0x259b6d(0x221)](([_0x56b238,_0x576a21])=>({..._0x576a21,'name':_0x576a21[_0x259b6d(0x250)]??_0x576a21[_0x259b6d(0x226)]??_0x56b238}));return[];}export async function getDatasetDetail(_0x47ca5c){const _0x327691=a208_0x361d2c,_0x1f176c=/^\d+$/['test'](_0x47ca5c)?'id':'code',_0x3d5368=await apiRequest(_0x327691(0x1dd)+_0x1f176c+'='+_0x47ca5c);return _0x3d5368[_0x327691(0x237)];}export async function updateDrivenData(_0x568631){const _0x52b72f=a208_0x361d2c,_0x536ee0=await apiRequest(_0x52b72f(0x139),{'method':'POST','body':_0x568631});return _0x536ee0[_0x52b72f(0x237)];}export async function getDatasetOperations(_0x12afb2){const _0x42aa22=a208_0x361d2c,_0xe8a7c1=await getDatasetDetail(_0x12afb2),_0xae76fc=normalizeDatasetOperations(_0xe8a7c1[_0x42aa22(0x1c7)])['map'](_0x51af8e=>({'name':_0x51af8e['name']||_0x51af8e['operationName'],'displayName':_0x51af8e[_0x42aa22(0x18f)]||_0x51af8e[_0x42aa22(0x250)],'type':_0x51af8e[_0x42aa22(0x1bc)],'method':_0x51af8e[_0x42aa22(0x23a)],'path':_0x51af8e[_0x42aa22(0x217)],'enabled':_0x51af8e[_0x42aa22(0x148)]??!![],'requestFields':_0x51af8e[_0x42aa22(0x247)],'responseFields':_0x51af8e[_0x42aa22(0x202)]}));return{'dataset':{'id':_0xe8a7c1['id']??_0xe8a7c1[_0x42aa22(0x219)],'name':_0xe8a7c1[_0x42aa22(0x250)],'code':_0xe8a7c1[_0x42aa22(0x1cb)]||_0xe8a7c1[_0x42aa22(0x222)],'tableName':_0xe8a7c1[_0x42aa22(0x1d6)]||_0xe8a7c1[_0x42aa22(0x197)]?.['tableName']},'operations':_0xae76fc};}export async function getOperationDetail(_0x335578,_0x243069,_0x528cdc){const _0x5e47de=a208_0x361d2c;let _0x79a9a3=_0x243069;if(!/^\d+$/[_0x5e47de(0x243)](_0x243069)){const _0x515488=await listDatasets(_0x335578,{'code':_0x243069}),_0x3313f1=_0x515488['find'](_0xb6b93=>_0xb6b93['code']===_0x243069||String(_0xb6b93['id'])===_0x243069);if(!_0x3313f1)throw CliErrors[_0x5e47de(0x14b)](_0x5e47de(0x16e)+_0x243069);_0x79a9a3=String(_0x3313f1['id']);}const _0x8cef64=await getDatasetDetail(_0x79a9a3),_0x35be1c=normalizeDatasetOperations(_0x8cef64['operations'])['find'](_0x23aa78=>(_0x23aa78['name']||_0x23aa78[_0x5e47de(0x226)])===_0x528cdc);if(!_0x35be1c)throw CliErrors[_0x5e47de(0x14b)](_0x5e47de(0x1e4)+_0x528cdc+_0x5e47de(0x15b)+_0x243069);return{'dataset':{'id':_0x8cef64['id']??_0x8cef64[_0x5e47de(0x219)],'name':_0x8cef64[_0x5e47de(0x250)],'code':_0x8cef64[_0x5e47de(0x1cb)]||_0x8cef64[_0x5e47de(0x222)],'tableName':_0x8cef64[_0x5e47de(0x1d6)]||_0x8cef64[_0x5e47de(0x197)]?.[_0x5e47de(0x1d6)]},'operation':_0x35be1c};}export async function startGenerateStandardPages(_0x173749,_0x535ed6,_0x5a8db9){const _0x25f706=a208_0x361d2c,_0x2315fa=await apiRequest(_0x25f706(0x16f)+_0x535ed6+_0x25f706(0x216),{'method':'POST','body':{'appCode':_0x173749,..._0x5a8db9?.[_0x25f706(0x1e2)]?{'clientOperationId':_0x5a8db9[_0x25f706(0x1e2)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2315fa['data'];}export async function getGenerateStandardPagesStatus(_0x3a9fae,_0x287ff5,_0x3511f4){const _0x52ca00=a208_0x361d2c,_0x3b10bb=new URLSearchParams({'appCode':_0x3a9fae});_0x3511f4[_0x52ca00(0x180)]&&_0x3b10bb['set'](_0x52ca00(0x180),_0x3511f4[_0x52ca00(0x180)]);_0x3511f4[_0x52ca00(0x1e2)]&&_0x3b10bb['set'](_0x52ca00(0x1e2),_0x3511f4['clientOperationId']);const _0x6e7c7c=await apiRequest(_0x52ca00(0x16f)+_0x287ff5+_0x52ca00(0x17b)+_0x3b10bb[_0x52ca00(0x22c)]());return _0x6e7c7c[_0x52ca00(0x237)];}export async function getStandardPageStatus(_0x17b920,_0x45ad4d){const _0x295a39=a208_0x361d2c,_0xc92ce=await apiRequest('/smartapi/lovrabet/dataset/'+_0x45ad4d+'/standard-page-status?appCode='+encodeURIComponent(_0x17b920));return _0xc92ce[_0x295a39(0x237)];}export async function tryGetStandardPageStatus(_0x428e73,_0x42e7e4){const _0x443345=a208_0x361d2c;try{return await getStandardPageStatus(_0x428e73,_0x42e7e4);}catch(_0x2341d3){if(_0x2341d3 instanceof CliError&&_0x2341d3[_0x443345(0x1cb)]==='api_error'&&/404|not found|non-json response/i[_0x443345(0x243)](_0x2341d3[_0x443345(0x229)]))return null;throw _0x2341d3;}}export async function syncStandardPages(_0x12dc42,_0x2348ec){const _0x3be658=a208_0x361d2c,_0x1792b9=await apiRequest(_0x3be658(0x16f)+_0x2348ec+'/sync-to-pages',{'method':'POST','body':{'appCode':_0x12dc42}});return _0x1792b9[_0x3be658(0x237)];}export async function getPageDetail(_0x22b59){const _0x2ea902=a208_0x361d2c,_0x35efa3=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x22b59);if(!_0x35efa3['data'])throw CliErrors[_0x2ea902(0x14b)](_0x2ea902(0x22b)+_0x22b59);return _0x35efa3[_0x2ea902(0x237)];}export async function listDeletedPages(_0x493450,_0x16949e,_0x3ba68e){const _0x4fa2a0=a208_0x361d2c,_0x44fbd7=new URLSearchParams({'appCode':_0x493450,'type':_0x16949e,'currentPage':String(_0x3ba68e[_0x4fa2a0(0x18e)]),'pageSize':String(_0x3ba68e['pageSize'])}),_0x2a6b4c=await apiRequest(_0x4fa2a0(0x21e)+_0x44fbd7[_0x4fa2a0(0x22c)]());return _0x2a6b4c[_0x4fa2a0(0x237)];}export async function restoreStandardPage(_0x3bf89c){const _0x2b483a=a208_0x361d2c;await apiRequest(_0x2b483a(0x1ec),{'method':'POST','body':{'id':_0x3bf89c}});}export async function restoreJsxPage(_0xc9a06,_0x2c576e){const _0x2341e0=a208_0x361d2c,_0x2a358b=await apiRequest(_0x2341e0(0x1c4),{'method':_0x2341e0(0x17d),'body':{'appCode':_0xc9a06,'id':_0x2c576e}});return _0x2a358b[_0x2341e0(0x237)];}function a208_0x5343(_0x40d8a1,_0x7211a0){_0x40d8a1=_0x40d8a1-0x139;const _0x238070=a208_0x2380();let _0x53439d=_0x238070[_0x40d8a1];return _0x53439d;}export async function updatePage(_0x2f7165,_0x3a8efc,_0x47a219,_0x27441e){const _0x551800=a208_0x361d2c,_0x12acd7=await apiRequest(_0x551800(0x245),{'method':_0x551800(0x17d),'body':{'appCode':_0x2f7165,'pageId':_0x3a8efc,'code':_0x47a219,'datasetIds':_0x27441e}});return _0x12acd7[_0x551800(0x237)];}export function generateSdkCode(_0xab93ec,_0x24df26,_0x1921bf){const _0x38a009=a208_0x361d2c,_0x29813a=_0x1921bf?.[_0x38a009(0x232)]??!![],_0x21477a=_0x38a009(0x1c6)+_0xab93ec['code']?.[_0x38a009(0x189)](/-/g,'_'),_0x3d5ca0=_0x24df26['name']||_0x24df26[_0x38a009(0x226)]||_0x38a009(0x140),_0x4e8e58=[];_0x29813a&&_0x4e8e58[_0x38a009(0x1cc)](_0x38a009(0x23d),'',_0x38a009(0x16c),'');_0x4e8e58[_0x38a009(0x1cc)]('//\x20'+_0xab93ec['name']+'\x20('+(_0xab93ec[_0x38a009(0x1d6)]||'table')+')');if(_0x3d5ca0==='filter')_0x4e8e58[_0x38a009(0x1cc)](_0x38a009(0x13c)+_0x21477a+_0x38a009(0x21b),_0x38a009(0x24f),_0x38a009(0x24c),_0x38a009(0x1f3),'});');else{if(_0x3d5ca0===_0x38a009(0x1e1))_0x4e8e58[_0x38a009(0x1cc)](_0x38a009(0x13c)+_0x21477a+_0x38a009(0x234));else{if(_0x3d5ca0===_0x38a009(0x1ed))_0x4e8e58['push']('const\x20result\x20=\x20await\x20client.models.'+_0x21477a+_0x38a009(0x1a0));else{if(_0x3d5ca0===_0x38a009(0x241))_0x4e8e58[_0x38a009(0x1cc)](_0x38a009(0x13c)+_0x21477a+_0x38a009(0x18b));else _0x3d5ca0===_0x38a009(0x158)||_0x3d5ca0===_0x38a009(0x1ff)?_0x4e8e58['push'](_0x38a009(0x13c)+_0x21477a+'.remove(id);'):_0x4e8e58[_0x38a009(0x1cc)](_0x38a009(0x13c)+_0x21477a+'.'+_0x3d5ca0+_0x38a009(0x207));}}}return _0x4e8e58[_0x38a009(0x201)]('\x0a');}export function generateSqlCodeTemplate(_0x1cd699,_0x435336){const _0x1d179a=a208_0x361d2c,_0x5c9054=_0x435336?.[_0x1d179a(0x198)]??_0x1d179a(0x205),_0x3edf36=_0x435336?.[_0x1d179a(0x232)]??!![],_0x457dc1=[];return _0x457dc1[_0x1d179a(0x1cc)](_0x1d179a(0x13f)+_0x1cd699['sqlName']+'\x20('+_0x1cd699[_0x1d179a(0x1a7)]+')'),_0x5c9054===_0x1d179a(0x205)?(_0x3edf36&&_0x457dc1[_0x1d179a(0x1cc)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});',''),_0x457dc1['push'](_0x1d179a(0x195),_0x1d179a(0x1c9)+_0x1cd699[_0x1d179a(0x1a7)]+'\x27,',_0x1d179a(0x203),_0x1d179a(0x1a5),_0x1d179a(0x171),_0x1d179a(0x1f4))):_0x457dc1['push'](_0x1d179a(0x1a9),_0x1d179a(0x242),_0x1d179a(0x1e8),_0x1d179a(0x154)+_0x1cd699[_0x1d179a(0x1a7)]+'\x27,',_0x1d179a(0x1c3),_0x1d179a(0x145),_0x1d179a(0x1d9),'}'),_0x457dc1[_0x1d179a(0x201)]('\x0a');}export async function getErConfig(_0xf6012f,_0xc35ec){const _0x441f6b=a208_0x361d2c,_0x2896f4=await apiRequest(_0x441f6b(0x167),{'method':'POST','body':{'appCode':_0xf6012f,'dblinkId':_0xc35ec},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x2896f4['data'];}export async function getErRelationDetail(_0x55a541,_0x35142c){const _0x4aef0f=a208_0x361d2c,_0x104379=new URLSearchParams({'appCode':_0x55a541,'relationId':String(_0x35142c)});try{const _0x5f1de2=await apiRequest(_0x4aef0f(0x1b1)+_0x104379['toString']());return _0x5f1de2[_0x4aef0f(0x237)]?.['relation']??null;}catch(_0x254bf9){if(_0x254bf9 instanceof CliError&&_0x254bf9[_0x4aef0f(0x1cb)]==='api_error'&&(_0x254bf9[_0x4aef0f(0x1c8)]?.['includes'](_0x4aef0f(0x19c))||_0x254bf9[_0x4aef0f(0x1c8)]===_0x4aef0f(0x1bd)&&_0x254bf9[_0x4aef0f(0x229)]===_0x4aef0f(0x19e)))return null;throw _0x254bf9;}}export async function createErRelation(_0x4d40c4){const _0x2f847b=a208_0x361d2c,_0x18bb90=await apiRequest(_0x2f847b(0x1ba),{'method':'POST','body':_0x4d40c4,'allowNonJsonSuccess':!![]});return _0x18bb90[_0x2f847b(0x237)];}export async function updateErRelation(_0x29e1fe){const _0x239119=a208_0x361d2c,_0x1a3507=await apiRequest('/smartapi/question/er-config/cli/update-single',{'method':_0x239119(0x17d),'body':_0x29e1fe,'allowNonJsonSuccess':!![]});return _0x1a3507[_0x239119(0x237)];}export async function deleteErRelation(_0x1eb15e){const _0x3d46b2=a208_0x361d2c,_0x14f488=await apiRequest(_0x3d46b2(0x175),{'method':_0x3d46b2(0x17d),'body':_0x1eb15e,'allowNonJsonSuccess':!![]});return _0x14f488[_0x3d46b2(0x237)];}export async function updateErBusinessGroup(_0x324fef){const _0x3cf5aa=a208_0x361d2c,_0x1fa302=await apiRequest(_0x3cf5aa(0x176),{'method':_0x3cf5aa(0x17d),'body':_0x324fef,'allowNonJsonSuccess':!![]});return _0x1fa302[_0x3cf5aa(0x237)];}function buildQuery(_0x53064f){const _0x4cdb22=a208_0x361d2c,_0x7fba39=new URLSearchParams();for(const [_0x23383c,_0x123dc5]of Object[_0x4cdb22(0x14e)](_0x53064f)){if(_0x123dc5===undefined||_0x123dc5==='')continue;_0x7fba39[_0x4cdb22(0x1ab)](_0x23383c,String(_0x123dc5));}const _0x5a08c=_0x7fba39[_0x4cdb22(0x22c)]();return _0x5a08c?'?'+_0x5a08c:'';}export async function listNotificationChannelConfigs(_0x765e62,_0x6ac624){const _0x431563=a208_0x361d2c,_0x588abc=await apiRequest(_0x431563(0x185)+buildQuery({'appCode':_0x765e62,'channelType':_0x6ac624}));return Array[_0x431563(0x1ef)](_0x588abc['data'])?_0x588abc[_0x431563(0x237)]:[];}export async function listAppConfigs(_0x431748,_0x41a8d7){const _0x4b4a32=a208_0x361d2c,_0x12d5cd=await apiRequest(_0x4b4a32(0x169),{'method':_0x4b4a32(0x17d),'body':{'appCode':_0x431748,..._0x41a8d7?.[_0x4b4a32(0x199)]?{'key':_0x41a8d7[_0x4b4a32(0x199)]}:{},..._0x41a8d7?.['tags']?{'tags':_0x41a8d7[_0x4b4a32(0x1d7)]}:{}}});return extractAppConfigList(_0x12d5cd['data']);}export async function getAppConfigByKey(_0x14258d,_0x1bdba8){const _0x24bb9d=a208_0x361d2c,_0x15e188=await apiRequest(_0x24bb9d(0x16d)+buildQuery({'appCode':_0x14258d,'key':_0x1bdba8}));return _0x15e188[_0x24bb9d(0x237)]??null;}export async function createAppConfig(_0x1fdc41){const _0x151e3d=a208_0x361d2c,_0x132a7c=await apiRequest(_0x151e3d(0x1ee),{'method':_0x151e3d(0x17d),'body':{'appCode':_0x1fdc41[_0x151e3d(0x1f7)],'key':_0x1fdc41['key'],'value':_0x1fdc41[_0x151e3d(0x1bb)],..._0x1fdc41[_0x151e3d(0x1d7)]?{'tags':_0x1fdc41[_0x151e3d(0x1d7)]}:{}}});return _0x132a7c[_0x151e3d(0x237)];}export async function updateAppConfig(_0x1567ec){const _0x20f234=a208_0x361d2c;await apiRequest(_0x20f234(0x238),{'method':'POST','body':{'id':_0x1567ec['id'],'appCode':_0x1567ec[_0x20f234(0x1f7)],'key':_0x1567ec[_0x20f234(0x199)],'value':_0x1567ec[_0x20f234(0x1bb)],..._0x1567ec[_0x20f234(0x1d7)]?{'tags':_0x1567ec['tags']}:{}}});}export async function deleteAppConfig(_0x3dbbab){const _0x3b92f7=a208_0x361d2c;await apiRequest(_0x3b92f7(0x15e),{'method':_0x3b92f7(0x17d),'body':_0x3dbbab});}function extractAppConfigList(_0x287c52){const _0x574523=a208_0x361d2c;if(Array[_0x574523(0x1ef)](_0x287c52))return _0x287c52;if(_0x287c52&&typeof _0x287c52==='object'&&Array['isArray'](_0x287c52['list']))return _0x287c52[_0x574523(0x248)];return extractList(_0x287c52);}export async function listDbLinks(_0x38870f,_0xa6ddcf){const _0x1cd71a=a208_0x361d2c,_0x2f3990=await apiRequest(_0x1cd71a(0x147),{'method':'POST','body':{'appCode':_0x38870f,'currentPage':_0xa6ddcf?.[_0x1cd71a(0x18e)]??0x1,'pageSize':_0xa6ddcf?.[_0x1cd71a(0x17f)]??0x64}});return{'items':extractList(_0x2f3990[_0x1cd71a(0x237)]),'paging':extractPaging(_0x2f3990['data'])};}export async function getDbLinkInfo(_0x176b00){const _0x222976=a208_0x361d2c,_0x6ff10b=await apiRequest(_0x222976(0x20b)+buildQuery({'id':_0x176b00}));return _0x6ff10b[_0x222976(0x237)];}export async function createDbLink(_0x12cd9c){const _0x1c3a29=a208_0x361d2c,_0x376daf=await apiRequest(_0x1c3a29(0x191),{'method':_0x1c3a29(0x17d),'body':_0x12cd9c});return _0x376daf[_0x1c3a29(0x237)];}export async function updateDbLink(_0x397789){const _0x45146a=a208_0x361d2c,_0x408d5b=await apiRequest('/smartapi/dblink/update',{'method':_0x45146a(0x17d),'body':_0x397789});return _0x408d5b[_0x45146a(0x237)];}export async function deleteDbLink(_0x10adda){const _0x49519d=a208_0x361d2c;await apiRequest(_0x49519d(0x1b3),{'method':_0x49519d(0x17d),'body':{'id':_0x10adda}});}export async function testDbLinkConnect(_0x2d5478){const _0x4016f3=a208_0x361d2c,_0x520e4b=await apiRequest(_0x4016f3(0x1df)+buildQuery({'id':_0x2d5478}));return _0x520e4b[_0x4016f3(0x237)];}export async function startDbAnalysis(_0x43eac3,_0x37a56d){const _0x1951f3=a208_0x361d2c,_0x4b081e=await apiRequest('/smartapi/db-analysis/start',{'method':'POST','body':{'dbLinkId':_0x43eac3,..._0x37a56d&&_0x37a56d[_0x1951f3(0x1d1)]>0x0?{'tableNames':_0x37a56d}:{}}});return _0x4b081e[_0x1951f3(0x237)];}export async function cancelDbAnalysis(_0x3c6bd4){const _0x4dc03b=a208_0x361d2c;await apiRequest(_0x4dc03b(0x17a)+buildQuery({'planId':_0x3c6bd4}),{'method':_0x4dc03b(0x17d)});}export async function getDbAnalysisStatus(_0x487072){const _0x5c9179=a208_0x361d2c,_0x1846e1=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x487072));return _0x1846e1[_0x5c9179(0x237)];}export async function getDbAllTableList(_0x595746,_0x133206){const _0xa3bc5f=a208_0x361d2c,_0x1b5b79=await apiRequest(_0xa3bc5f(0x225)+buildQuery({'appCode':_0x595746,'dbLinkId':_0x133206})),_0x486e2a=_0x1b5b79[_0xa3bc5f(0x237)];if(Array[_0xa3bc5f(0x1ef)](_0x486e2a))return _0x486e2a;return extractList(_0x486e2a);}export async function getDbTableDiff(_0x1a1ab9,_0x12f6e2,_0x28e9d5){const _0x48d2de=a208_0x361d2c,_0x46ed89=await apiRequest(_0x48d2de(0x24a)+buildQuery({'appCode':_0x1a1ab9,'dbLinkId':_0x12f6e2,'pageIndex':_0x28e9d5?.['pageIndex']??0x1,'pageSize':_0x28e9d5?.[_0x48d2de(0x17f)]??0x14,'tableName':_0x28e9d5?.[_0x48d2de(0x1d6)]})),_0x288645=_0x46ed89[_0x48d2de(0x237)];return{'totalCount':_0x288645?.[_0x48d2de(0x196)]??0x0,'physicalTableCount':_0x288645?.[_0x48d2de(0x1db)]??0x0,'datasetTableCount':_0x288645?.[_0x48d2de(0x19d)]??0x0,..._0x288645?.[_0x48d2de(0x1b9)]?{'summary':_0x288645[_0x48d2de(0x1b9)]}:{},'tableList':Array[_0x48d2de(0x1ef)](_0x288645?.[_0x48d2de(0x15d)])?_0x288645[_0x48d2de(0x15d)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x7c76dc=a208_0x361d2c,_0x585d21=await apiRequest(_0x7c76dc(0x20e),{'method':_0x7c76dc(0x17d),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x5ccdc8=extractList(_0x585d21['data']),_0x118e92=extractPaging(_0x585d21[_0x7c76dc(0x237)]);return _0x118e92&&_0x118e92[_0x7c76dc(0x196)]>REMOTE_APP_PAGE_SIZE&&console[_0x7c76dc(0x1d4)]('Warning:\x20showing\x20first\x20'+REMOTE_APP_PAGE_SIZE+_0x7c76dc(0x172)+_0x118e92['totalCount']+_0x7c76dc(0x1a2)+'Use\x20the\x20platform\x20console\x20to\x20see\x20all.'),_0x5ccdc8;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x987de4,_0x576664){const _0x355f46=a208_0x361d2c,_0x1b3aba=Math[_0x355f46(0x1d5)](Math[_0x355f46(0x209)](_0x576664?.['pageSize']??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x381373=await apiRequest(_0x355f46(0x200),{'method':_0x355f46(0x17d),'body':{'appCode':_0x987de4,'currentPage':_0x576664?.[_0x355f46(0x18e)]??0x1,'pageSize':_0x1b3aba}});return{'items':extractList(_0x381373[_0x355f46(0x237)]),'paging':extractPaging(_0x381373[_0x355f46(0x237)])};}export async function getAppRole(_0x29fe45){const _0x491c44=a208_0x361d2c,_0x49059c=await apiRequest(_0x491c44(0x19b)+buildQuery({'id':_0x29fe45}));return _0x49059c[_0x491c44(0x237)];}export async function createAppRole(_0x4eed1e){const _0x460d3e=a208_0x361d2c,_0x25bf68=await apiRequest(_0x460d3e(0x1aa),{'method':_0x460d3e(0x17d),'body':{'appCode':_0x4eed1e[_0x460d3e(0x1f7)],'roleName':_0x4eed1e[_0x460d3e(0x21f)],'roleType':_0x460d3e(0x21c),..._0x4eed1e[_0x460d3e(0x1e6)]?{'remark':_0x4eed1e['remark']}:{}}});return _0x25bf68[_0x460d3e(0x237)];}export async function updateAppRole(_0x4d3d04){const _0x513a23=a208_0x361d2c,_0x3e8187=await apiRequest('/smartapi/permit/role/update',{'method':_0x513a23(0x17d),'body':{'id':_0x4d3d04['id'],'appCode':_0x4d3d04['appCode'],..._0x4d3d04[_0x513a23(0x19f)]?{'roleType':_0x4d3d04[_0x513a23(0x19f)]}:{},..._0x4d3d04['roleName']!==undefined?{'roleName':_0x4d3d04[_0x513a23(0x21f)]}:{},..._0x4d3d04[_0x513a23(0x1e6)]!==undefined?{'remark':_0x4d3d04[_0x513a23(0x1e6)]}:{},..._0x4d3d04['permits']?{'permits':_0x4d3d04[_0x513a23(0x249)]}:{}}});return _0x3e8187[_0x513a23(0x237)];}export async function deleteAppRole(_0x47f113){const _0xa89d9d=a208_0x361d2c;await apiRequest(_0xa89d9d(0x246),{'method':_0xa89d9d(0x17d),'body':{'id':_0x47f113}});}export async function listPermitRoles(_0x47f3be,_0x43beb3){const _0x19512d=a208_0x361d2c,_0x2edabb=await apiRequest('/smartapi/permit/role/get-permit-list',{'method':_0x19512d(0x17d),'body':{'appCode':_0x47f3be,..._0x43beb3?.[_0x19512d(0x192)]!==undefined?{'needSelf':_0x43beb3[_0x19512d(0x192)]}:{},..._0x43beb3?.[_0x19512d(0x218)]!==undefined?{'needPublic':_0x43beb3[_0x19512d(0x218)]}:{}}});return extractList(_0x2edabb[_0x19512d(0x237)]);}export async function getRoleMenuResources(_0xb656ab,_0x8f5c64){const _0x3e55e3=a208_0x361d2c,_0x4e7592=await apiRequest(_0x3e55e3(0x20d),{'method':_0x3e55e3(0x17d),'body':{'appCode':_0xb656ab,'roleId':_0x8f5c64}});return extractList(_0x4e7592[_0x3e55e3(0x237)]);}export async function getRoleApiResources(_0x31998b,_0xd527c0){const _0x3bb1d=a208_0x361d2c,_0x434425=await apiRequest('/smartapi/permit/resource/get-api-list',{'method':'POST','body':{'appCode':_0x31998b,'roleId':_0xd527c0}});return extractList(_0x434425[_0x3bb1d(0x237)]);}export async function listRoleUsers(_0x30ae9a){const _0x3e1b1e=a208_0x361d2c,_0x196504=await apiRequest(_0x3e1b1e(0x1ad),{'method':_0x3e1b1e(0x17d),'body':{'appCode':_0x30ae9a}});return extractList(_0x196504[_0x3e1b1e(0x237)])[_0x3e1b1e(0x221)](({id:_0x13e2fa,userList:_0x29f66c,applyUserList:_0x24b73f,..._0x4091f2})=>({..._0x4091f2,'id':Number(_0x13e2fa),'userList':_0x29f66c['map'](_0x9803bd=>({..._0x9803bd,'userId':Number(_0x9803bd[_0x3e1b1e(0x187)])})),..._0x24b73f?{'applyUserList':_0x24b73f['map'](_0x51a49a=>({..._0x51a49a,'userId':Number(_0x51a49a[_0x3e1b1e(0x187)])}))}:{}}));}export async function updateRoleUsers(_0x7727e2,_0x218eba){const _0x365069=a208_0x361d2c;await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':_0x365069(0x17d),'body':{'appCode':_0x7727e2,'roleList':_0x218eba}});}export async function getPagePermit(_0x58536d){const _0x19d870=a208_0x361d2c,_0x417953=await apiRequest(_0x19d870(0x1f0)+buildQuery({'menuId':_0x58536d}));return _0x417953['data'];}export async function savePagePermit(_0x573bdf){const _0x95d00f=a208_0x361d2c,_0x5aa9e4=await apiRequest(_0x95d00f(0x14d),{'method':_0x95d00f(0x17d),'body':_0x573bdf});return _0x5aa9e4['data'];}export async function listCurrentUserTenantMemberships(){const _0x4aa363=a208_0x361d2c,_0x4041dd=await apiRequest('/userTenant/queryBelongsTenants');return extractList(_0x4041dd[_0x4aa363(0x237)]);}export async function listTenantDirectoryMembers(_0x20a4b7){const _0xbe62f9=a208_0x361d2c,_0x56e12e=await apiRequest(_0xbe62f9(0x235)+buildQuery({'code':_0x20a4b7})),_0x4517a9=_0x56e12e['data']?.['userTenantRelationList'];return Array['isArray'](_0x4517a9)?_0x4517a9:[];}export async function getTenantMembers(_0x53c3e0){const _0x495a27=a208_0x361d2c,_0x4f101c=await listTenantDirectoryMembers(_0x53c3e0);return _0x4f101c[_0x495a27(0x140)](_0x516a58=>_0x516a58[_0x495a27(0x1f6)]==='ENABLE'||_0x516a58[_0x495a27(0x1f6)]===undefined)['map'](_0x1af5dc=>({'userId':Number(_0x1af5dc[_0x495a27(0x187)]??_0x1af5dc['id']),'username':_0x1af5dc['username'],'nickname':_0x1af5dc[_0x495a27(0x1b2)],'status':_0x1af5dc['status'],'email':_0x1af5dc[_0x495a27(0x18d)],'mobile':_0x1af5dc[_0x495a27(0x23f)],'avatar':_0x1af5dc[_0x495a27(0x21a)]}))[_0x495a27(0x140)](_0x1f9f72=>Number['isFinite'](_0x1f9f72['userId'])&&_0x1f9f72['userId']>0x0);}
|
|
1
|
+
const a208_0x532215=a208_0x7059;(function(_0x4af32c,_0x5f57ec){const _0x4872a=a208_0x7059,_0x4abb13=_0x4af32c();while(!![]){try{const _0x344906=parseInt(_0x4872a(0x247))/0x1*(parseInt(_0x4872a(0x207))/0x2)+parseInt(_0x4872a(0x1c5))/0x3*(-parseInt(_0x4872a(0x212))/0x4)+parseInt(_0x4872a(0x20d))/0x5*(parseInt(_0x4872a(0x18a))/0x6)+parseInt(_0x4872a(0x230))/0x7*(-parseInt(_0x4872a(0x223))/0x8)+-parseInt(_0x4872a(0x157))/0x9+parseInt(_0x4872a(0x211))/0xa*(parseInt(_0x4872a(0x206))/0xb)+parseInt(_0x4872a(0x13d))/0xc;if(_0x344906===_0x5f57ec)break;else _0x4abb13['push'](_0x4abb13['shift']());}catch(_0x12653b){_0x4abb13['push'](_0x4abb13['shift']());}}}(a208_0x2347,0x58cf1));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(_0x27e7ef){_activeCookie=_0x27e7ef||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(a208_0x532215(0x1cb)),PLATFORM_ERROR_CODE=Symbol(a208_0x532215(0x1b2));export function isPlatformTransportFailure(_0x398709){return Boolean(_0x398709&&typeof _0x398709==='object'&&_0x398709[PLATFORM_TRANSPORT_FAILURE]===!![]);}export function getPlatformErrorCode(_0x1491f5){const _0x2e7b19=a208_0x532215;if(!_0x1491f5||typeof _0x1491f5!==_0x2e7b19(0x21d))return undefined;const _0x27446c=_0x1491f5[PLATFORM_ERROR_CODE];return typeof _0x27446c===_0x2e7b19(0x178)&&_0x27446c?_0x27446c:undefined;}function createPlatformApiError(_0x3baaa1,_0x1ac132){const _0x31a1e9=a208_0x532215,_0x477b9b=typeof _0x1ac132==='string'?_0x1ac132[_0x31a1e9(0x197)]():typeof _0x1ac132===_0x31a1e9(0x208)?String(_0x1ac132):'',_0x131ad5=CliErrors[_0x31a1e9(0x228)](_0x3baaa1,_0x477b9b?'API\x20error\x20code:\x20'+_0x477b9b:undefined);return _0x477b9b&&(Object[_0x31a1e9(0x176)](_0x131ad5,PLATFORM_ERROR_CODE,{'value':_0x477b9b}),Object['defineProperty'](_0x131ad5,_0x31a1e9(0x17a),{'value':{'remoteErrorCode':_0x477b9b},'enumerable':![]})),_0x131ad5;}function createFetchFailureError(_0x18dca1,_0x569404){const _0x31b1f9=a208_0x532215,_0x116215=_0x569404 instanceof Error?_0x569404[_0x31b1f9(0x1ac)]:String(_0x569404),_0x404c85=CliErrors[_0x31b1f9(0x228)](_0x31b1f9(0x21b)+_0x18dca1+(_0x116215?'\x20('+_0x116215+')':''),_0x31b1f9(0x147));return Object[_0x31b1f9(0x176)](_0x404c85,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x404c85;}function createIndeterminateResponseError(_0x1cb325){const _0x2225da=a208_0x532215,_0x5efa98=CliErrors[_0x2225da(0x228)](_0x1cb325+_0x2225da(0x169),_0x2225da(0x166));return Object[_0x2225da(0x176)](_0x5efa98,PLATFORM_TRANSPORT_FAILURE,{'value':!![]}),_0x5efa98;}async function apiRequest(_0x32d29e,_0x47e9ba={}){const _0x5c6e98=a208_0x532215,{method:method=_0x5c6e98(0x1c2),body:_0xa6006c,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x47e9ba,_0x24a7e4=useRuntime?getRuntimeDomain():getApiDomain(),_0x5165b8=_activeCookie||getCookie(),_0x436e4c=''+_0x24a7e4+_0x32d29e,_0x5e1e2a=new AbortController(),_0x1d520f=setTimeout(()=>_0x5e1e2a[_0x5c6e98(0x180)](),timeout);try{const _0x967307=await fetch(_0x436e4c,{'method':method,'headers':{'Content-Type':_0x5c6e98(0x22d),'Cookie':_0x5165b8,'X-Invoke-Source':_0x5c6e98(0x1a1),...headers},'body':_0xa6006c?JSON[_0x5c6e98(0x214)](_0xa6006c):undefined,'signal':_0x5e1e2a[_0x5c6e98(0x1fb)]});let _0x470670;try{_0x470670=await _0x967307[_0x5c6e98(0x227)]();}catch(_0x54974b){if(_0x54974b instanceof Error&&_0x54974b['name']===_0x5c6e98(0x200))throw CliErrors[_0x5c6e98(0x228)](_0x5c6e98(0x14b)+_0x436e4c);if(_0x967307['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x5c6e98(0x228)](_0x5c6e98(0x232)+_0x967307[_0x5c6e98(0x17f)]+')',_0x967307[_0x5c6e98(0x17f)]>=0x190?_0x5c6e98(0x23c):undefined);}if(!_0x967307['ok']||_0x470670[_0x5c6e98(0x14a)]===![])throw CliErrors[_0x5c6e98(0x228)](_0x470670[_0x5c6e98(0x1bf)]||_0x470670[_0x5c6e98(0x1ac)]||_0x5c6e98(0x1d9)+_0x967307['status'],_0x470670[_0x5c6e98(0x235)]?_0x5c6e98(0x19c)+_0x470670[_0x5c6e98(0x235)]:undefined);return _0x470670;}catch(_0x3d596a){if(_0x3d596a instanceof CliError)throw _0x3d596a;if(_0x3d596a instanceof Error&&_0x3d596a['name']==='AbortError')throw CliErrors[_0x5c6e98(0x228)](_0x5c6e98(0x14b)+_0x436e4c);throw createFetchFailureError(_0x436e4c,_0x3d596a);}finally{clearTimeout(_0x1d520f);}}function a208_0x7059(_0xf4c161,_0x19030f){_0xf4c161=_0xf4c161-0x131;const _0x2347e2=a208_0x2347();let _0x7059d8=_0x2347e2[_0xf4c161];return _0x7059d8;}async function apiFormRequest(_0x2dffda,_0x5e48bc,_0x3c2f42={}){const _0x43f3fd=a208_0x532215,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x3c2f42,_0x582b34=_activeCookie||getCookie(),_0x3189be=''+getApiDomain()+_0x2dffda,_0x1e9a84=new AbortController(),_0x4b9c46=setTimeout(()=>_0x1e9a84[_0x43f3fd(0x180)](),timeout);try{const _0x320931=await fetch(_0x3189be,{'method':_0x43f3fd(0x136),'headers':{'Cookie':_0x582b34,'X-Invoke-Source':_0x43f3fd(0x1a1)},'body':_0x5e48bc,'signal':_0x1e9a84[_0x43f3fd(0x1fb)]});let _0x2ef060;try{_0x2ef060=await _0x320931['json']();}catch(_0xdf0ccf){if(_0xdf0ccf instanceof Error&&_0xdf0ccf[_0x43f3fd(0x21a)]===_0x43f3fd(0x200))throw CliErrors['apiError'](_0x43f3fd(0x14b)+_0x3189be);throw CliErrors[_0x43f3fd(0x228)](_0x43f3fd(0x232)+_0x320931[_0x43f3fd(0x17f)]+')',_0x320931[_0x43f3fd(0x17f)]>=0x190?'Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.':undefined);}if(!_0x320931['ok']||_0x2ef060[_0x43f3fd(0x14a)]===![])throw CliErrors[_0x43f3fd(0x228)](_0x2ef060[_0x43f3fd(0x1bf)]||_0x2ef060[_0x43f3fd(0x1ac)]||_0x43f3fd(0x1d9)+_0x320931[_0x43f3fd(0x17f)],_0x2ef060[_0x43f3fd(0x235)]?_0x43f3fd(0x19c)+_0x2ef060[_0x43f3fd(0x235)]:undefined);return _0x2ef060;}catch(_0x247824){if(_0x247824 instanceof CliError)throw _0x247824;if(_0x247824 instanceof Error&&_0x247824[_0x43f3fd(0x21a)]===_0x43f3fd(0x200))throw CliErrors[_0x43f3fd(0x228)]('Request\x20timeout:\x20'+_0x3189be);throw createFetchFailureError(_0x3189be,_0x247824);}finally{clearTimeout(_0x4b9c46);}}export async function uploadDevelopmentFile(_0x5f21ca,_0x540ff8){const _0x470105=a208_0x532215,_0x27ee05=await readFile(_0x540ff8),_0x5dee8d=new FormData();_0x5dee8d['append'](_0x470105(0x1ef),_0x5f21ca),_0x5dee8d[_0x470105(0x220)](_0x470105(0x233),new Blob([new Uint8Array(_0x27ee05)]),basename(_0x540ff8));const _0x47d019=await apiFormRequest(_0x470105(0x199),_0x5dee8d);return _0x47d019[_0x470105(0x17a)];}export async function queryDevelopmentFileUrl(_0x1b0d8f,_0x14b715={}){const _0x453f02=a208_0x532215,_0x5495e1=await apiRequest(_0x453f02(0x1c4),{'method':_0x453f02(0x136),'body':{'filePath':_0x1b0d8f,'downloadFlag':_0x14b715['download']??![],..._0x14b715['longTerm']?{'longTerm':!![]}:{}}});return _0x5495e1[_0x453f02(0x17a)];}export async function recognizeDevelopmentOcr(_0x356934,_0x1f2d26){const _0x29ceb3=a208_0x532215,_0x3ab59e=new URLSearchParams({'url':_0x1f2d26[_0x29ceb3(0x13e)],'type':_0x1f2d26[_0x29ceb3(0x167)],'appCode':_0x356934}),_0x3cc108=await apiRequest(_0x29ceb3(0x23f)+_0x3ab59e[_0x29ceb3(0x174)](),{'method':_0x29ceb3(0x1c2)});return _0x3cc108[_0x29ceb3(0x17a)];}function isAuthFailure(_0x1343a0){const _0x36edf5=a208_0x532215,_0x3a637d=_0x1343a0[_0x36edf5(0x1bf)]||_0x1343a0[_0x36edf5(0x1ac)]||_0x1343a0['data']?.[_0x36edf5(0x1ac)]||_0x1343a0[_0x36edf5(0x1be)]||_0x1343a0['error']||'';return _0x1343a0['errorCode']===_0x36edf5(0x172)||_0x1343a0['code']===0x191||_0x1343a0[_0x36edf5(0x20b)]==='401'||_0x3a637d[_0x36edf5(0x175)](_0x36edf5(0x142))||_0x3a637d['includes'](_0x36edf5(0x22e))||_0x3a637d[_0x36edf5(0x175)]('登录')||_0x3a637d[_0x36edf5(0x175)]('认证');}export async function platformFetch(_0x1638ac,_0x5f4f5b){const _0x276205=a208_0x532215;let _0x592b9f;try{_0x592b9f=await fetch(_0x1638ac,{'method':_0x5f4f5b[_0x276205(0x226)]??_0x276205(0x1c2),'headers':{'Content-Type':_0x276205(0x22d),'Cookie':_0x5f4f5b['cookie'],'X-Invoke-Source':'cli:rabetbase'},..._0x5f4f5b['body']&&{'body':JSON[_0x276205(0x214)](_0x5f4f5b[_0x276205(0x22f)])}});}catch(_0x4e0b7c){throw createFetchFailureError(_0x1638ac,_0x4e0b7c);}let _0x4eac50;try{_0x4eac50=await _0x592b9f[_0x276205(0x227)]();}catch(_0x39cc66){if(!_0x592b9f['ok']){if(_0x592b9f[_0x276205(0x17f)]===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x276205(0x228)](_0x5f4f5b[_0x276205(0x1f2)]+_0x276205(0x20f)+_0x592b9f['status']);}throw createFetchFailureError(_0x1638ac,_0x39cc66);}if(_0x4eac50===null||typeof _0x4eac50!=='object'||Array[_0x276205(0x184)](_0x4eac50)){if(_0x592b9f[_0x276205(0x17f)]===0x191)throw CliErrors['authRequired']();if(_0x592b9f['ok'])throw createIndeterminateResponseError(_0x5f4f5b[_0x276205(0x1f2)]);throw CliErrors[_0x276205(0x228)](_0x5f4f5b[_0x276205(0x1f2)]+_0x276205(0x139)+(!_0x592b9f['ok']?_0x276205(0x1fc)+_0x592b9f['status']:'')+_0x276205(0x1cd));}const _0x24cfa6=typeof _0x4eac50['errorCode']===_0x276205(0x178)||typeof _0x4eac50[_0x276205(0x235)]===_0x276205(0x208),_0x39740f=_0x24cfa6?String(_0x4eac50[_0x276205(0x235)])[_0x276205(0x197)]():'',_0x141426=_0x4eac50[_0x276205(0x14a)]===![]||_0x24cfa6&&_0x39740f!==_0x276205(0x1af);if(!_0x592b9f['ok']||_0x141426){if(_0x592b9f['status']===0x191||isAuthFailure(_0x4eac50))throw CliErrors[_0x276205(0x133)]();throw createPlatformApiError(_0x4eac50[_0x276205(0x1bf)]||_0x4eac50[_0x276205(0x1ac)]||_0x5f4f5b['label']+_0x276205(0x139)+(!_0x592b9f['ok']?',\x20HTTP\x20'+_0x592b9f[_0x276205(0x17f)]:''),_0x4eac50['errorCode']??_0x4eac50[_0x276205(0x20b)]);}if(_0x4eac50['success']!==!![]||_0x4eac50['errorCode']!==_0x276205(0x1af))throw createIndeterminateResponseError(_0x5f4f5b[_0x276205(0x1f2)]);return _0x4eac50[_0x276205(0x17a)];}export async function platformRequest(_0x38300e,_0x4e25e8){const _0x373840=a208_0x532215;if(/^https?:\/\//i[_0x373840(0x1fa)](_0x38300e))throw CliErrors[_0x373840(0x156)](_0x373840(0x194)+_0x38300e,'Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.');const _0x25f041=_0x38300e[_0x373840(0x18c)]('/')?_0x38300e:'/'+_0x38300e;return platformFetch(''+getApiDomain()+_0x25f041,_0x4e25e8);}const MAX_KNOWLEDGE_BASE_PAGE_SIZE=0x64;function parseKnowledgeBaseInteger(_0x122063,_0x597a70){const _0x531f9e=a208_0x532215,_0x6e6716=typeof _0x122063==='number'?_0x122063:typeof _0x122063===_0x531f9e(0x178)&&/^(0|[1-9]\d*)$/['test'](_0x122063)?Number(_0x122063):Number[_0x531f9e(0x1c6)],_0x4b478d=Number['isSafeInteger'](_0x6e6716)&&(_0x597a70==='id'?_0x6e6716>0x0:_0x6e6716>=0x0);if(!_0x4b478d)throw CliErrors[_0x531f9e(0x228)](_0x531f9e(0x15a)+_0x597a70+'.');return _0x6e6716;}function parseKnowledgeBaseText(_0x433387,_0x2b3369){const _0xa50991=a208_0x532215;if(typeof _0x433387===_0xa50991(0x178)&&(_0x2b3369===_0xa50991(0x1ea)||_0x433387['trim']()))return _0x433387;throw CliErrors[_0xa50991(0x228)](_0xa50991(0x1fe)+_0x2b3369+'.');}function parseKnowledgeBaseRecord(_0x5d1ad4){const _0x2b8aaa=a208_0x532215;if(!_0x5d1ad4||typeof _0x5d1ad4!==_0x2b8aaa(0x21d)||Array[_0x2b8aaa(0x184)](_0x5d1ad4))throw CliErrors[_0x2b8aaa(0x228)](_0x2b8aaa(0x16c));const _0x1fac99=_0x5d1ad4;if(_0x1fac99[_0x2b8aaa(0x1b7)]!=='company'&&_0x1fac99[_0x2b8aaa(0x1b7)]!=='personal')throw CliErrors[_0x2b8aaa(0x228)]('Knowledge-base\x20response\x20contains\x20an\x20invalid\x20scope.');const _0x5f1643={'id':parseKnowledgeBaseInteger(_0x1fac99['id'],'id'),'scope':_0x1fac99[_0x2b8aaa(0x1b7)],'appCode':parseKnowledgeBaseText(_0x1fac99[_0x2b8aaa(0x1ef)],_0x2b8aaa(0x1ef)),'title':parseKnowledgeBaseText(_0x1fac99[_0x2b8aaa(0x222)],_0x2b8aaa(0x222)),'version':parseKnowledgeBaseInteger(_0x1fac99[_0x2b8aaa(0x234)],_0x2b8aaa(0x234)),'content':parseKnowledgeBaseText(_0x1fac99[_0x2b8aaa(0x1ea)],_0x2b8aaa(0x1ea))};return(_0x1fac99['createTime']===null||typeof _0x1fac99[_0x2b8aaa(0x23b)]===_0x2b8aaa(0x178)||typeof _0x1fac99['createTime']===_0x2b8aaa(0x208))&&(_0x5f1643[_0x2b8aaa(0x23b)]=_0x1fac99[_0x2b8aaa(0x23b)]),(_0x1fac99[_0x2b8aaa(0x132)]===null||typeof _0x1fac99[_0x2b8aaa(0x132)]===_0x2b8aaa(0x178)||typeof _0x1fac99['updateTime']===_0x2b8aaa(0x208))&&(_0x5f1643[_0x2b8aaa(0x132)]=_0x1fac99[_0x2b8aaa(0x132)]),_0x5f1643;}export async function listEnterpriseKnowledgeBases(_0x3e340d,_0x32476b={}){const _0x3e38cb=a208_0x532215,_0x4d05ec=_0x32476b['pageSize']??0x32;if(!Number[_0x3e38cb(0x187)](_0x4d05ec)||_0x4d05ec<0x1||_0x4d05ec>MAX_KNOWLEDGE_BASE_PAGE_SIZE)throw CliErrors[_0x3e38cb(0x156)](_0x3e38cb(0x177)+MAX_KNOWLEDGE_BASE_PAGE_SIZE+'.');const _0x1085ff=await platformRequest('/admin/knowledge-base/get-list',{'method':'POST','cookie':_0x3e340d,'label':_0x3e38cb(0x1b4),'body':{'currentPage':_0x32476b[_0x3e38cb(0x1a5)]??0x1,'pageSize':_0x4d05ec,'scope':_0x3e38cb(0x1ce),..._0x32476b[_0x3e38cb(0x1ef)]?{'appCode':_0x32476b[_0x3e38cb(0x1ef)]}:{},..._0x32476b['title']?{'title':_0x32476b['title']}:{}}});if(!_0x1085ff||typeof _0x1085ff!==_0x3e38cb(0x21d)||Array[_0x3e38cb(0x184)](_0x1085ff)||!Array[_0x3e38cb(0x184)](_0x1085ff['tableData']))throw CliErrors[_0x3e38cb(0x228)](_0x3e38cb(0x168));const _0x57f985=extractPaging(_0x1085ff);if(!_0x57f985||!Number[_0x3e38cb(0x1b6)](_0x57f985[_0x3e38cb(0x1a5)])||!Number[_0x3e38cb(0x1b6)](_0x57f985['pageSize'])||!Number['isInteger'](_0x57f985[_0x3e38cb(0x218)])||_0x57f985[_0x3e38cb(0x1a5)]<0x1||_0x57f985[_0x3e38cb(0x165)]<0x1||_0x57f985[_0x3e38cb(0x165)]>MAX_KNOWLEDGE_BASE_PAGE_SIZE||_0x57f985['totalCount']<0x0)throw CliErrors[_0x3e38cb(0x228)](_0x3e38cb(0x170));return{'items':extractList(_0x1085ff)['map'](parseKnowledgeBaseRecord),'paging':_0x57f985};}export async function getEnterpriseKnowledgeBase(_0x470688,_0x38ba1d){const _0x7f85fe=a208_0x532215,_0x30845b=await platformRequest(_0x7f85fe(0x1e1)+buildQuery({'id':_0x38ba1d}),{'cookie':_0x470688,'label':_0x7f85fe(0x1ff)});return parseKnowledgeBaseRecord(_0x30845b);}export async function createEnterpriseKnowledgeBase(_0x2a4fbc,_0x72b6c4){const _0x16397c=a208_0x532215,_0x2a3da1=await platformRequest(_0x16397c(0x146),{'method':_0x16397c(0x136),'cookie':_0x2a4fbc,'label':'Create\x20enterprise\x20knowledge\x20base','body':{'scope':'company',..._0x72b6c4}});return parseKnowledgeBaseRecord(_0x2a3da1);}export async function updateEnterpriseKnowledgeBase(_0x952ef7,_0x3f8d26){const _0x5500e0=a208_0x532215;if(_0x3f8d26[_0x5500e0(0x222)]===undefined&&_0x3f8d26[_0x5500e0(0x1ea)]===undefined)throw CliErrors['validation']('Knowledge-base\x20update\x20requires\x20title\x20or\x20content.');const _0x44d51c=await platformRequest(_0x5500e0(0x14e),{'method':_0x5500e0(0x136),'cookie':_0x952ef7,'label':_0x5500e0(0x1e7),'body':{'id':_0x3f8d26['id'],..._0x3f8d26[_0x5500e0(0x222)]!==undefined?{'title':_0x3f8d26['title']}:{},..._0x3f8d26[_0x5500e0(0x1ea)]!==undefined?{'content':_0x3f8d26['content']}:{}}});return parseKnowledgeBaseRecord(_0x44d51c);}export async function deleteEnterpriseKnowledgeBase(_0x83b761,_0x45519f){const _0x256c83=a208_0x532215;await platformRequest('/admin/knowledge-base/delete',{'method':_0x256c83(0x136),'cookie':_0x83b761,'label':'Delete\x20enterprise\x20knowledge\x20base','body':{'id':_0x45519f}});}function cleanNewlines(_0x238902){const _0x43700a=a208_0x532215;return _0x238902[_0x43700a(0x162)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x1eb289){const _0x432dfa=a208_0x532215;if(!_0x1eb289[_0x432dfa(0x21a)])return _0x1eb289;return{..._0x1eb289,'name':cleanNewlines(_0x1eb289[_0x432dfa(0x21a)])};}export async function fetchModelList(_0xe2b1d6,_0x579133){const _0x5bb208=a208_0x532215,_0x313448=getEnv(),_0x54aa38=new URLSearchParams({'appcode':_0xe2b1d6,'otype':'array'}),_0x1c3beb='/api/node-toolbox/dataset/model-list?'+_0x54aa38[_0x5bb208(0x174)]();logger[_0x5bb208(0x225)](_0x5bb208(0x18f),_0x5bb208(0x210)+_0x313448+')',{'apiPath':_0x1c3beb});const _0x3650c7=await platformRequest(_0x1c3beb,{'cookie':_0x579133,'label':'Fetch\x20datasets'}),_0x2b71d2=(_0x3650c7['configArray']??[])[_0x5bb208(0x1bb)](cleanDatasetName);return{'configArray':_0x2b71d2,'count':_0x2b71d2[_0x5bb208(0x1cc)]};}export async function fetchDatasetDoc(_0x2b07e4){const _0x446207=a208_0x532215,{appCode:_0x5f55e3,cookie:_0x57a478,datasetCode:_0x2332fe,datasetId:_0x19d586,extraParams:_0x39b061}=_0x2b07e4,_0x37cba5=await platformRequest(_0x446207(0x181),{'method':'POST','body':{'appCode':_0x5f55e3,'datasetCode':_0x2332fe,'datasetId':_0x19d586,..._0x39b061||{}},'cookie':_0x57a478,'label':_0x446207(0x209)+_0x2332fe+')'});if(!_0x37cba5||typeof _0x37cba5['markdown']!=='string')throw new Error(_0x446207(0x1a6)+_0x2332fe+_0x446207(0x13a));return _0x37cba5[_0x446207(0x182)];}export async function getMenuTree(_0x49fb5b,_0x2ec910){const _0x31e3f8=a208_0x532215,_0x4f7854=new URLSearchParams({'appCode':_0x49fb5b});return platformRequest(_0x31e3f8(0x1e0)+_0x4f7854['toString'](),{'cookie':_0x2ec910,'label':_0x31e3f8(0x149)});}export async function createMenuRecord(_0x34cb3f,_0x3fb171,_0x561f9a){const _0x4afdf6=a208_0x532215;return platformRequest(_0x4afdf6(0x18b),{'method':_0x4afdf6(0x136),'body':_0x34cb3f,'cookie':_0x3fb171,'label':_0x561f9a});}export async function updateMenuRecord(_0x48d5d3,_0xc77899,_0x35e031){const _0xc0c1f3=a208_0x532215;return platformRequest(_0xc0c1f3(0x1d7),{'method':_0xc0c1f3(0x136),'body':_0x48d5d3,'cookie':_0xc77899,'label':_0x35e031});}export async function deleteMenuRecord(_0x4e1f75,_0x5dd14d,_0xa5a03d){const _0x73b2e4=a208_0x532215;return platformRequest(_0x73b2e4(0x205),{'method':'POST','body':{'id':_0x4e1f75},'cookie':_0x5dd14d,'label':_0xa5a03d});}export async function batchDeleteMenuRecords(_0x203fa7,_0x139b84,_0x248711){const _0x231115=a208_0x532215;return platformRequest(_0x231115(0x1d5),{'method':_0x231115(0x136),'body':{'idList':_0x203fa7},'cookie':_0x139b84,'label':_0x248711});}export async function startMenuRegroup(_0x4bbfb5,_0x42bb26,_0x30a893){const _0xc4692a=a208_0x532215;return platformRequest(_0xc4692a(0x1de),{'method':_0xc4692a(0x136),'body':_0x4bbfb5,'cookie':_0x42bb26,'label':_0x30a893});}export async function getAsyncTaskStatus(_0x2e4d29,_0x2697b0,_0x219b52){const _0x3e4e90=a208_0x532215,_0x31ddc6=new URLSearchParams({'appCode':_0x2697b0});return platformRequest(_0x3e4e90(0x202)+encodeURIComponent(_0x2e4d29)+'?'+_0x31ddc6['toString'](),{'cookie':_0x219b52,'label':_0x3e4e90(0x192)+_0x2e4d29});}export async function listBffScripts(_0x4e7c65,_0x18321b,_0x22b3c2){const _0x151974=a208_0x532215;let _0x483efd=_0x151974(0x242)+_0x4e7c65;if(_0x18321b)_0x483efd+=_0x151974(0x1f3)+_0x18321b;const _0x5f3670=await apiRequest(_0x483efd);let _0x4457d1=extractList(_0x5f3670[_0x151974(0x17a)]);if(_0x22b3c2?.[_0x151974(0x191)]){const _0x28fbe8=_0x22b3c2['scriptName'][_0x151974(0x19d)]();_0x4457d1=_0x4457d1[_0x151974(0x1d3)](_0x11571c=>_0x11571c[_0x151974(0x188)]?.[_0x151974(0x19d)]()[_0x151974(0x175)](_0x28fbe8)||_0x11571c['description']?.[_0x151974(0x19d)]()[_0x151974(0x175)](_0x28fbe8));}return _0x4457d1;}export async function getBffScriptInfo(_0x14d95d){const _0x10584c=a208_0x532215,_0x4b7696=await apiRequest(_0x10584c(0x1b9)+_0x14d95d);if(!_0x4b7696['data'])throw CliErrors[_0x10584c(0x156)](_0x10584c(0x1ab)+_0x14d95d);return _0x4b7696['data'];}export async function saveBffScript(_0x36c8f6){const _0x22a359=a208_0x532215,_0x3681af=await apiRequest('/api/management/library/scripts/save',{'method':_0x22a359(0x136),'body':_0x36c8f6}),{id:_0x376ee1,entity:_0x5e51ef}=normalizeEntityWithIdResponse(_0x3681af[_0x22a359(0x17a)]);if(_0x376ee1!==undefined){const _0x3fc9c2=typeof _0x5e51ef[_0x22a359(0x188)]===_0x22a359(0x178)||typeof _0x5e51ef[_0x22a359(0x1c3)]==='string'?_0x5e51ef:undefined;return{'id':_0x376ee1,'script':_0x3fc9c2};}throw CliErrors[_0x22a359(0x228)](_0x22a359(0x17b));}export async function deleteBffScript(_0x3615b3){const _0x1752a8=a208_0x532215;await apiRequest(_0x1752a8(0x1fd),{'method':_0x1752a8(0x136),'body':{'id':_0x3615b3}});}export async function getBffScriptStatistics(_0x3c6e44){const _0x5f5017=a208_0x532215,_0x14fe8a=await apiRequest(_0x5f5017(0x22b)+_0x3c6e44);return extractList(_0x14fe8a[_0x5f5017(0x17a)]);}export async function clearBffScriptCache(){const _0x2b876d=a208_0x532215,_0x560c30=await apiRequest(_0x2b876d(0x245),{'method':_0x2b876d(0x136),'useRuntime':!![]});return typeof _0x560c30['data']===_0x2b876d(0x178)?_0x560c30[_0x2b876d(0x17a)]:'';}export async function listBffDatasetOperations(_0x480789,_0x5c16c9){const _0x2bd7dd=a208_0x532215,_0x72688a=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':_0x2bd7dd(0x136),'body':{'appCode':_0x480789,'datasetId':_0x5c16c9}});return _0x72688a[_0x2bd7dd(0x17a)];}export async function listSqlQueries(_0x1ac8cf,_0x5c2ca1){const _0x34e481=a208_0x532215,_0x2ebacb=await apiRequest(_0x34e481(0x204),{'method':'POST','body':{'appCode':_0x1ac8cf,'currentPage':_0x5c2ca1?.[_0x34e481(0x1a5)]??0x1,'pageSize':_0x5c2ca1?.[_0x34e481(0x165)]??0x32,'sqlCode':_0x5c2ca1?.[_0x34e481(0x193)],'sqlName':_0x5c2ca1?.[_0x34e481(0x1e2)]}});return _0x2ebacb['data'];}export async function getSqlQueryInfo(_0x35dc10,_0x4b373c){const _0x5b638a=a208_0x532215,_0x48bcd7=await listSqlQueries(_0x35dc10,{'sqlCode':_0x4b373c}),_0x44a053=_0x48bcd7['tableData']?.[0x0];if(!_0x44a053)throw CliErrors[_0x5b638a(0x156)](_0x5b638a(0x240)+_0x4b373c);return _0x44a053;}export async function getSqlQueryDetail(_0x5cf862){const _0x506e34=a208_0x532215,_0x2c4a01=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x506e34(0x236)+encodeURIComponent(_0x5cf862)));if(!_0x2c4a01['data'])throw CliErrors[_0x506e34(0x156)](_0x506e34(0x240)+_0x5cf862);return _0x2c4a01[_0x506e34(0x17a)];}export async function getSqlQueryDetailById(_0x1e65f3){const _0x560bef=a208_0x532215,_0xe6ea21=await apiRequest(_0x560bef(0x16e)+_0x1e65f3);if(!_0xe6ea21[_0x560bef(0x17a)])throw CliErrors['validation'](_0x560bef(0x1a3)+_0x1e65f3);return _0xe6ea21[_0x560bef(0x17a)];}export async function createSqlQuery(_0x414f6b){const _0xc2abc8=a208_0x532215,_0x48f8d0=await apiRequest(_0xc2abc8(0x13b),{'method':_0xc2abc8(0x136),'body':_0x414f6b}),{id:_0x3117f2,entity:_0x1d5414}=normalizeEntityWithIdResponse(_0x48f8d0['data']);if(!(_0xc2abc8(0x193)in _0x1d5414)&&_0x3117f2)return getSqlQueryDetailById(_0x3117f2);return normalizeSqlQueryEntity(_0x1d5414);}export async function updateSqlQuery(_0x2ef988){const _0x5452a2=a208_0x532215,_0x1fc7ac=await apiRequest(_0x5452a2(0x14f),{'method':_0x5452a2(0x136),'body':_0x2ef988}),{id:_0x40a80a,entity:_0x146369}=normalizeEntityWithIdResponse(_0x1fc7ac[_0x5452a2(0x17a)]);if(!('sqlCode'in _0x146369)){if(_0x2ef988[_0x5452a2(0x193)])return getSqlQueryDetail(_0x2ef988['sqlCode']);if(_0x40a80a)return getSqlQueryDetailById(_0x40a80a);}return normalizeSqlQueryEntity(_0x146369);}export async function deleteSqlQuery(_0x543d74){const _0x52b909=a208_0x532215;await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':_0x52b909(0x136),'body':_0x543d74});}export async function saveSqlQuery(_0x431e71){const _0x1815c3=a208_0x532215,_0x22afe6=await apiRequest(_0x1815c3(0x137),{'method':_0x1815c3(0x136),'body':_0x431e71});return _0x22afe6[_0x1815c3(0x17a)];}function normalizeSqlQueryEntity(_0x35a9c1){const _0x1dedbb=a208_0x532215;return{..._0x35a9c1,'id':Number(_0x35a9c1['id']),'dbId':_0x35a9c1[_0x1dedbb(0x161)]==null?undefined:Number(_0x35a9c1[_0x1dedbb(0x161)]),'version':_0x35a9c1[_0x1dedbb(0x234)]==null?undefined:Number(_0x35a9c1['version'])};}export async function executeSql(_0x21cbdc,_0x158ae4,_0x299255){const _0x521f21=a208_0x532215,_0x5c0f21=await apiRequest(_0x521f21(0x140),{'method':_0x521f21(0x136),'body':{'appCode':_0x21cbdc,'sqlCode':_0x158ae4,..._0x299255&&{'params':_0x299255}},'useRuntime':!![]});return _0x5c0f21['data'];}export async function executeDatasetDataOperation(_0x37b19a,_0x2ba953,_0x5607ca,_0x34f14d={}){const _0x20421f=a208_0x532215;try{const _0x12c7e9=await apiRequest('/api/'+_0x37b19a+'/'+_0x2ba953+'/'+_0x5607ca,{'method':_0x20421f(0x136),'body':_0x34f14d,'useRuntime':!![]});return _0x12c7e9[_0x20421f(0x17a)];}catch(_0x5e649f){if(_0x5607ca===_0x20421f(0x21c)&&_0x5e649f instanceof CliError&&_0x5e649f['code']===_0x20421f(0x186)&&_0x34f14d['id']!==undefined&&_0x34f14d['id']!==null&&_0x34f14d['id']!==''){const _0x134904=await apiRequest('/api/'+_0x37b19a+'/'+_0x2ba953+_0x20421f(0x1a0),{'method':'POST','body':{'where':{'id':{'$eq':_0x34f14d['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x5d767f=Array[_0x20421f(0x184)](_0x134904[_0x20421f(0x17a)]?.[_0x20421f(0x189)])?_0x134904['data'][_0x20421f(0x189)]:[];return _0x5d767f[0x0]??null;}throw _0x5e649f;}}export async function listDatasets(_0x1a0959,_0x2c1fed){const _0x591340=a208_0x532215,_0x1ebfd7={'appCode':_0x1a0959,'deleted':_0x2c1fed?.[_0x591340(0x1c8)]??![]};if(_0x2c1fed?.[_0x591340(0x20b)])_0x1ebfd7[_0x591340(0x20b)]=_0x2c1fed['code'];if(_0x2c1fed?.[_0x591340(0x21a)])_0x1ebfd7[_0x591340(0x21a)]=_0x2c1fed[_0x591340(0x21a)];const _0x920a30=await apiRequest(_0x591340(0x229),{'method':_0x591340(0x136),'body':_0x1ebfd7});return extractList(_0x920a30[_0x591340(0x17a)]);}export async function deleteDataset(_0x578e99,_0x1d00e4){const _0x484fcb=a208_0x532215;await apiRequest(_0x484fcb(0x19f),{'method':_0x484fcb(0x136),'body':{'appCode':_0x578e99,'datasetId':_0x1d00e4}});}export async function restoreDataset(_0x98a10f,_0x499113){const _0x1fd5c8=a208_0x532215;await apiRequest(_0x1fd5c8(0x15f),{'method':_0x1fd5c8(0x136),'body':{'appCode':_0x98a10f,'datasetId':_0x499113}});}export async function previewTextGeneratedDataset(_0x265215,_0xedbf9){const _0x2eb23d=a208_0x532215,_0x15b404=await apiRequest(_0x2eb23d(0x1a9),{'method':_0x2eb23d(0x136),'body':{'appCode':_0x265215,'datasetName':_0xedbf9['datasetName'],'requirementDescription':_0xedbf9['requirementDescription']},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x15b404[_0x2eb23d(0x17a)];}export async function startTextGeneratedDataset(_0x23f6c4,_0x1f7e94,_0x31bbee){const _0x593af3=a208_0x532215,_0x2e103b=await apiRequest(_0x593af3(0x217),{'method':_0x593af3(0x136),'body':{'appCode':_0x23f6c4,..._0x31bbee?.[_0x593af3(0x159)]?{'clientOperationId':_0x31bbee['clientOperationId']}:{},'design':_0x1f7e94},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2e103b[_0x593af3(0x17a)];}export async function getTextGeneratedDatasetStatus(_0x286dff,_0x4d574f){const _0x3ee4ad=a208_0x532215,_0x37f5c8=new URLSearchParams({'appCode':_0x286dff});_0x4d574f[_0x3ee4ad(0x16b)]&&_0x37f5c8[_0x3ee4ad(0x1ed)](_0x3ee4ad(0x16b),_0x4d574f[_0x3ee4ad(0x16b)]);_0x4d574f[_0x3ee4ad(0x159)]&&_0x37f5c8['set']('clientOperationId',_0x4d574f['clientOperationId']);const _0x5a5c7c=await apiRequest(_0x3ee4ad(0x173)+_0x37f5c8[_0x3ee4ad(0x174)]());return _0x5a5c7c[_0x3ee4ad(0x17a)];}export async function searchDatasets(_0x15d350,_0x53bce9){const _0x39fcd7=a208_0x532215,_0xabe041=await listDatasets(_0x15d350,{'name':_0x53bce9}),_0x157d92=_0x53bce9[_0x39fcd7(0x19d)](),_0x2b4b47=new Set(_0xabe041['map'](_0x43f5f0=>_0x43f5f0['id'])),_0x3e50d9=_0xabe041[_0x39fcd7(0x1d3)](_0x9b93f3=>_0x9b93f3[_0x39fcd7(0x1e4)]?.['tableName']?.[_0x39fcd7(0x19d)]()[_0x39fcd7(0x175)](_0x157d92)||_0x9b93f3[_0x39fcd7(0x1ad)]?.['toLowerCase']()[_0x39fcd7(0x175)](_0x157d92)),_0xd0fe33=await listDatasets(_0x15d350,{'code':_0x53bce9});for(const _0x481690 of _0xd0fe33){!_0x2b4b47[_0x39fcd7(0x1d2)](_0x481690['id'])&&(_0xabe041[_0x39fcd7(0x15c)](_0x481690),_0x2b4b47[_0x39fcd7(0x1b8)](_0x481690['id']));}return _0xabe041;}export function normalizeDatasetOperations(_0x330bad){const _0x2bdb00=a208_0x532215;if(Array[_0x2bdb00(0x184)](_0x330bad))return _0x330bad[_0x2bdb00(0x1d3)](_0x593b61=>_0x593b61!=null&&typeof _0x593b61===_0x2bdb00(0x21d));if(_0x330bad&&typeof _0x330bad===_0x2bdb00(0x21d))return Object[_0x2bdb00(0x1c0)](_0x330bad)['filter'](([,_0x337e30])=>_0x337e30!=null&&typeof _0x337e30===_0x2bdb00(0x21d))[_0x2bdb00(0x1bb)](([_0x5922a8,_0x162f5b])=>({..._0x162f5b,'name':_0x162f5b[_0x2bdb00(0x21a)]??_0x162f5b[_0x2bdb00(0x241)]??_0x5922a8}));return[];}export async function getDatasetDetail(_0x578d25){const _0xf2adb8=/^\d+$/['test'](_0x578d25)?'id':'code',_0x237ef1=await apiRequest('/smartapi/dataset/get-driven-data?'+_0xf2adb8+'='+_0x578d25);return _0x237ef1['data'];}export async function updateDrivenData(_0x15c983){const _0xc0b17f=a208_0x532215,_0x1fac90=await apiRequest(_0xc0b17f(0x196),{'method':_0xc0b17f(0x136),'body':_0x15c983});return _0x1fac90[_0xc0b17f(0x17a)];}export async function getDatasetOperations(_0x2348e6){const _0x330fde=a208_0x532215,_0x37b4ca=await getDatasetDetail(_0x2348e6),_0x2b3272=normalizeDatasetOperations(_0x37b4ca[_0x330fde(0x1f5)])[_0x330fde(0x1bb)](_0x5d8407=>({'name':_0x5d8407[_0x330fde(0x21a)]||_0x5d8407[_0x330fde(0x241)],'displayName':_0x5d8407[_0x330fde(0x20a)]||_0x5d8407[_0x330fde(0x21a)],'type':_0x5d8407['type'],'method':_0x5d8407['method'],'path':_0x5d8407[_0x330fde(0x238)],'enabled':_0x5d8407[_0x330fde(0x1eb)]??!![],'requestFields':_0x5d8407[_0x330fde(0x15b)],'responseFields':_0x5d8407[_0x330fde(0x163)]}));return{'dataset':{'id':_0x37b4ca['id']??_0x37b4ca[_0x330fde(0x19a)],'name':_0x37b4ca['name'],'code':_0x37b4ca[_0x330fde(0x20b)]||_0x37b4ca[_0x330fde(0x16a)],'tableName':_0x37b4ca['tableName']||_0x37b4ca[_0x330fde(0x1e4)]?.[_0x330fde(0x18e)]},'operations':_0x2b3272};}export async function getOperationDetail(_0x154f45,_0x36d041,_0x3bd6ca){const _0x2b2637=a208_0x532215;let _0xf394f9=_0x36d041;if(!/^\d+$/[_0x2b2637(0x1fa)](_0x36d041)){const _0x1ae75c=await listDatasets(_0x154f45,{'code':_0x36d041}),_0x18dac1=_0x1ae75c[_0x2b2637(0x1c1)](_0x4eae9f=>_0x4eae9f[_0x2b2637(0x20b)]===_0x36d041||String(_0x4eae9f['id'])===_0x36d041);if(!_0x18dac1)throw CliErrors[_0x2b2637(0x156)](_0x2b2637(0x1a2)+_0x36d041);_0xf394f9=String(_0x18dac1['id']);}const _0x30df6c=await getDatasetDetail(_0xf394f9),_0x2965d1=normalizeDatasetOperations(_0x30df6c[_0x2b2637(0x1f5)])[_0x2b2637(0x1c1)](_0x5b5760=>(_0x5b5760[_0x2b2637(0x21a)]||_0x5b5760[_0x2b2637(0x241)])===_0x3bd6ca);if(!_0x2965d1)throw CliErrors[_0x2b2637(0x156)](_0x2b2637(0x1df)+_0x3bd6ca+'\x22\x20not\x20found\x20in\x20dataset\x20'+_0x36d041);return{'dataset':{'id':_0x30df6c['id']??_0x30df6c[_0x2b2637(0x19a)],'name':_0x30df6c[_0x2b2637(0x21a)],'code':_0x30df6c[_0x2b2637(0x20b)]||_0x30df6c['modelCode'],'tableName':_0x30df6c['tableName']||_0x30df6c[_0x2b2637(0x1e4)]?.[_0x2b2637(0x18e)]},'operation':_0x2965d1};}export async function startGenerateStandardPages(_0x226679,_0x284a71,_0x4194e2){const _0x57dafd=a208_0x532215,_0x501144=await apiRequest(_0x57dafd(0x18d)+_0x284a71+_0x57dafd(0x195),{'method':_0x57dafd(0x136),'body':{'appCode':_0x226679,..._0x4194e2?.[_0x57dafd(0x159)]?{'clientOperationId':_0x4194e2[_0x57dafd(0x159)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x501144['data'];}export async function getGenerateStandardPagesStatus(_0x15733f,_0x35045e,_0x46d8e3){const _0x2241bd=a208_0x532215,_0x368897=new URLSearchParams({'appCode':_0x15733f});_0x46d8e3['operationId']&&_0x368897['set'](_0x2241bd(0x16b),_0x46d8e3['operationId']);_0x46d8e3[_0x2241bd(0x159)]&&_0x368897[_0x2241bd(0x1ed)](_0x2241bd(0x159),_0x46d8e3[_0x2241bd(0x159)]);const _0x3fbd64=await apiRequest(_0x2241bd(0x18d)+_0x35045e+_0x2241bd(0x1f8)+_0x368897[_0x2241bd(0x174)]());return _0x3fbd64[_0x2241bd(0x17a)];}export async function getStandardPageStatus(_0x4d7b9d,_0x2905b4){const _0x49300d=a208_0x532215,_0x2b0001=await apiRequest(_0x49300d(0x18d)+_0x2905b4+'/standard-page-status?appCode='+encodeURIComponent(_0x4d7b9d));return _0x2b0001[_0x49300d(0x17a)];}export async function tryGetStandardPageStatus(_0x5a1d93,_0x49864a){const _0x752057=a208_0x532215;try{return await getStandardPageStatus(_0x5a1d93,_0x49864a);}catch(_0x3133c9){if(_0x3133c9 instanceof CliError&&_0x3133c9[_0x752057(0x20b)]===_0x752057(0x186)&&/404|not found|non-json response/i[_0x752057(0x1fa)](_0x3133c9[_0x752057(0x1ac)]))return null;throw _0x3133c9;}}export async function syncStandardPages(_0x48d277,_0x2f6fdd){const _0x251203=a208_0x532215,_0x243f31=await apiRequest('/smartapi/lovrabet/dataset/'+_0x2f6fdd+'/sync-to-pages',{'method':'POST','body':{'appCode':_0x48d277}});return _0x243f31[_0x251203(0x17a)];}export async function getPageDetail(_0x5a8666){const _0x488980=a208_0x532215,_0x5eb8a8=await apiRequest(_0x488980(0x1f9)+_0x5a8666);if(!_0x5eb8a8[_0x488980(0x17a)])throw CliErrors[_0x488980(0x156)](_0x488980(0x1f6)+_0x5a8666);return _0x5eb8a8[_0x488980(0x17a)];}export async function listDeletedPages(_0x40d58a,_0x57d686,_0x2c4b75){const _0x171109=a208_0x532215,_0x57e2b9=new URLSearchParams({'appCode':_0x40d58a,'type':_0x57d686,'currentPage':String(_0x2c4b75[_0x171109(0x1a5)]),'pageSize':String(_0x2c4b75['pageSize'])}),_0x931b9f=await apiRequest(_0x171109(0x219)+_0x57e2b9[_0x171109(0x174)]());return _0x931b9f[_0x171109(0x17a)];}export async function restoreStandardPage(_0x23a904){const _0x3590ef=a208_0x532215;await apiRequest(_0x3590ef(0x23d),{'method':'POST','body':{'id':_0x23a904}});}export async function restoreJsxPage(_0x47f7a6,_0x3b55c7){const _0x298936=await apiRequest('/smartapi/webcode/page/restore',{'method':'POST','body':{'appCode':_0x47f7a6,'id':_0x3b55c7}});return _0x298936['data'];}export async function updatePage(_0x52b346,_0x26e51c,_0x3aef27,_0x19263b){const _0x468988=a208_0x532215,_0x458dd8=await apiRequest(_0x468988(0x198),{'method':_0x468988(0x136),'body':{'appCode':_0x52b346,'pageId':_0x26e51c,'code':_0x3aef27,'datasetIds':_0x19263b}});return _0x458dd8[_0x468988(0x17a)];}export function generateSdkCode(_0x10a92c,_0x12651e,_0x185421){const _0x3067e4=a208_0x532215,_0x26c320=_0x185421?.[_0x3067e4(0x135)]??!![],_0x1d6c9c=_0x3067e4(0x1b3)+_0x10a92c[_0x3067e4(0x20b)]?.[_0x3067e4(0x162)](/-/g,'_'),_0x482f4e=_0x12651e['name']||_0x12651e[_0x3067e4(0x241)]||'filter',_0x5224e0=[];_0x26c320&&_0x5224e0[_0x3067e4(0x15c)](_0x3067e4(0x17e),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x5224e0[_0x3067e4(0x15c)](_0x3067e4(0x1b5)+_0x10a92c['name']+'\x20('+(_0x10a92c[_0x3067e4(0x18e)]||_0x3067e4(0x150))+')');if(_0x482f4e===_0x3067e4(0x1d3))_0x5224e0['push'](_0x3067e4(0x23e)+_0x1d6c9c+_0x3067e4(0x158),_0x3067e4(0x155),_0x3067e4(0x17d),_0x3067e4(0x1da),_0x3067e4(0x1a4));else{if(_0x482f4e===_0x3067e4(0x21c))_0x5224e0['push'](_0x3067e4(0x23e)+_0x1d6c9c+_0x3067e4(0x1b1));else{if(_0x482f4e==='create')_0x5224e0[_0x3067e4(0x15c)]('const\x20result\x20=\x20await\x20client.models.'+_0x1d6c9c+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x482f4e===_0x3067e4(0x143))_0x5224e0[_0x3067e4(0x15c)](_0x3067e4(0x23e)+_0x1d6c9c+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x482f4e==='delete'||_0x482f4e===_0x3067e4(0x1bd)?_0x5224e0['push'](_0x3067e4(0x23e)+_0x1d6c9c+_0x3067e4(0x213)):_0x5224e0['push'](_0x3067e4(0x23e)+_0x1d6c9c+'.'+_0x482f4e+_0x3067e4(0x134));}}}return _0x5224e0[_0x3067e4(0x1f1)]('\x0a');}export function generateSqlCodeTemplate(_0x2cd598,_0x192f73){const _0x2ccc48=a208_0x532215,_0x3f6eda=_0x192f73?.[_0x2ccc48(0x20e)]??_0x2ccc48(0x22c),_0xe92390=_0x192f73?.[_0x2ccc48(0x135)]??!![],_0x6892f1=[];return _0x6892f1[_0x2ccc48(0x15c)](_0x2ccc48(0x201)+_0x2cd598[_0x2ccc48(0x1e2)]+'\x20('+_0x2cd598[_0x2ccc48(0x193)]+')'),_0x3f6eda==='sdk'?(_0xe92390&&_0x6892f1[_0x2ccc48(0x15c)](_0x2ccc48(0x17e),'',_0x2ccc48(0x131),''),_0x6892f1[_0x2ccc48(0x15c)]('const\x20data\x20=\x20await\x20client.sql.execute({','\x20\x20sqlCode:\x20\x27'+_0x2cd598[_0x2ccc48(0x193)]+'\x27,',_0x2ccc48(0x1ec),_0x2ccc48(0x1a4),_0x2ccc48(0x160),_0x2ccc48(0x190))):_0x6892f1[_0x2ccc48(0x15c)](_0x2ccc48(0x20c),_0x2ccc48(0x1d4),_0x2ccc48(0x171),_0x2ccc48(0x239)+_0x2cd598['sqlCode']+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x2ccc48(0x1d1),_0x2ccc48(0x231),'}'),_0x6892f1[_0x2ccc48(0x1f1)]('\x0a');}export async function getErConfig(_0x3fe9bb,_0x3bc763){const _0x580465=await apiRequest('/smartapi/question/er-config',{'method':'POST','body':{'appCode':_0x3fe9bb,'dblinkId':_0x3bc763},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x580465['data'];}export async function getErRelationDetail(_0x5d8d45,_0x53e44a){const _0x208c76=a208_0x532215,_0x148570=new URLSearchParams({'appCode':_0x5d8d45,'relationId':String(_0x53e44a)});try{const _0x35a440=await apiRequest(_0x208c76(0x1e5)+_0x148570[_0x208c76(0x174)]());return _0x35a440[_0x208c76(0x17a)]?.['relation']??null;}catch(_0x418d2a){if(_0x418d2a instanceof CliError&&_0x418d2a[_0x208c76(0x20b)]===_0x208c76(0x186)&&(_0x418d2a[_0x208c76(0x1d8)]?.[_0x208c76(0x175)]('DATA_NOT_EXIST')||_0x418d2a[_0x208c76(0x1d8)]===_0x208c76(0x1aa)&&_0x418d2a[_0x208c76(0x1ac)]===_0x208c76(0x1e3)))return null;throw _0x418d2a;}}export async function createErRelation(_0x2eb79d){const _0x54780d=a208_0x532215,_0x4d1582=await apiRequest(_0x54780d(0x23a),{'method':'POST','body':_0x2eb79d,'allowNonJsonSuccess':!![]});return _0x4d1582['data'];}export async function updateErRelation(_0x142bb0){const _0x570e8c=a208_0x532215,_0x4d5849=await apiRequest(_0x570e8c(0x224),{'method':_0x570e8c(0x136),'body':_0x142bb0,'allowNonJsonSuccess':!![]});return _0x4d5849[_0x570e8c(0x17a)];}export async function deleteErRelation(_0x4c2611){const _0x41ce8d=a208_0x532215,_0x2a05ef=await apiRequest(_0x41ce8d(0x216),{'method':_0x41ce8d(0x136),'body':_0x4c2611,'allowNonJsonSuccess':!![]});return _0x2a05ef[_0x41ce8d(0x17a)];}export async function updateErBusinessGroup(_0x30525f){const _0x5b31e0=a208_0x532215,_0x2d2a02=await apiRequest(_0x5b31e0(0x145),{'method':_0x5b31e0(0x136),'body':_0x30525f,'allowNonJsonSuccess':!![]});return _0x2d2a02[_0x5b31e0(0x17a)];}function buildQuery(_0x1ebe1d){const _0x232ff3=a208_0x532215,_0x1e6912=new URLSearchParams();for(const [_0x5ce8cc,_0x403d33]of Object[_0x232ff3(0x1c0)](_0x1ebe1d)){if(_0x403d33===undefined||_0x403d33==='')continue;_0x1e6912[_0x232ff3(0x1ed)](_0x5ce8cc,String(_0x403d33));}const _0x28d576=_0x1e6912[_0x232ff3(0x174)]();return _0x28d576?'?'+_0x28d576:'';}export async function listNotificationChannelConfigs(_0x4df70b,_0x21fa96){const _0x309829=a208_0x532215,_0x4ee716=await apiRequest(_0x309829(0x21e)+buildQuery({'appCode':_0x4df70b,'channelType':_0x21fa96}));return Array[_0x309829(0x184)](_0x4ee716['data'])?_0x4ee716[_0x309829(0x17a)]:[];}export async function listAppConfigs(_0x3f83a6,_0x5ece9e){const _0x8207b0=a208_0x532215,_0x6a0c2c=await apiRequest(_0x8207b0(0x15e),{'method':_0x8207b0(0x136),'body':{'appCode':_0x3f83a6,..._0x5ece9e?.[_0x8207b0(0x246)]?{'key':_0x5ece9e[_0x8207b0(0x246)]}:{},..._0x5ece9e?.[_0x8207b0(0x1e8)]?{'tags':_0x5ece9e['tags']}:{}}});return extractAppConfigList(_0x6a0c2c['data']);}function a208_0x2347(){const _0x908abc=['requestFields','push','/smartapi/permit/user-role/get-user-list','/smartapi/app-config/list','/smartapi/dataset/restore-dataset','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','dbId','replace','responseFields','/smartapi/dblink/getList','pageSize','The\x20server\x20outcome\x20is\x20indeterminate.\x20Verify\x20current\x20state\x20before\x20retrying\x20any\x20mutation.','type','List\x20enterprise\x20knowledge\x20bases\x20returned\x20an\x20invalid\x20response\x20contract.','\x20returned\x20an\x20invalid\x20JSON\x20response\x20envelope\x20after\x20HTTP\x20success.','modelCode','operationId','Knowledge-base\x20API\x20returned\x20an\x20invalid\x20record\x20contract.','remark','/smartapi/custom/getUserCustomSql?id=','/smartapi/dblink/testConnect','List\x20enterprise\x20knowledge\x20bases\x20returned\x20invalid\x20paging\x20metadata.','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','UNAUTHORIZED','/smartapi/dataset/text-generate/status?','toString','includes','defineProperty','Knowledge-base\x20pageSize\x20must\x20be\x20an\x20integer\x20between\x201\x20and\x20','string','/smartapi/db-analysis/status/','data','BFF\x20save\x20returned\x20no\x20valid\x20id','/smartapi/permit/role/create','\x20\x20pageSize:\x2020,','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','status','abort','/api/node-toolbox/api-doc-generator','markdown','/smartapi/app-config/delete','isArray','datasetTableCount','api_error','isSafeInteger','functionName','tableData','120VjTrKR','/smartapi/menu/create','startsWith','/smartapi/lovrabet/dataset/','tableName','fetch-model-list','const\x20results\x20=\x20data.execResult\x20||\x20[];','scriptName','Fetch\x20async\x20task\x20','sqlCode','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','/generate-standard-pages/start','/smartapi/dataset/update-driven-data','trim','/smartapi/lovrabet/update-page','/smartapi/common/uploadFile','modelId','userId','API\x20error\x20code:\x20','toLowerCase','/smartapi/dblink/getAllTableList','/smartapi/dataset/delete-dataset','/filter','cli:rabetbase','Dataset\x20not\x20found:\x20','SQL\x20query\x20not\x20found:\x20id=','});','currentPage','Invalid\x20response\x20format\x20(','permits','tableList','/smartapi/dataset/text-generate/preview','API\x20error\x20code:\x20306','BFF\x20script\x20not\x20found:\x20id=','message','description','\x20of\x20','0000','needPublic','.getOne(id);','platform-error-code','dataset_','List\x20enterprise\x20knowledge\x20bases','//\x20','isInteger','scope','add','/api/management/library/scripts/info?id=','summary','map','min','remove','errorMessage','errorMsg','entries','find','GET','scriptType','/smartapi/common/queryFileUrl','78oQIzkA','NaN','CUSTOM','deleted','needSelf','userTenantRelationList','platform-transport-failure','length',':\x20invalid\x20JSON\x20response\x20envelope','company','/smartapi/dblink/getTableDiffV2ByPage','list','\x20\x20});','has','filter','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','/smartapi/menu/batchDelete','roleName','/smartapi/menu/update','hint','API\x20error:\x20','\x20\x20currentPage:\x201,','Warning:\x20showing\x20first\x20','/smartapi/permit/user-role/update-user-list','pageIndex','/smartapi/menu/regroup','Operation\x20\x22','/smartapi/menu/find?','/admin/knowledge-base/get-one','sqlName','ER\x20relation\x20does\x20not\x20exist','dbtableConfig','/smartapi/question/er-config/cli/detail?','/smartapi/dblink/getOne','Update\x20enterprise\x20knowledge\x20base','tags','/smartapi/dblink/update','content','enabled','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','set','/smartapi/permit/role/get-permit-list','appCode','\x20apps.\x20','join','label','&type=','isFinite','operations','Page\x20not\x20found:\x20','username','/generate-standard-pages/status?','/smartapi/lovrabet/detail?pageId=','test','signal',',\x20HTTP\x20','/api/management/library/scripts/delete','Knowledge-base\x20response\x20is\x20missing\x20a\x20valid\x20','Get\x20enterprise\x20knowledge\x20base','AbortError','//\x20SQL:\x20','/smartapi/tasks/','/smartapi/permit/role/get-one','/smartapi/custom/queryUserCustomSqlList','/smartapi/menu/delete','121ZyiQen','2yNMyGZ','number','Fetch\x20doc\x20(','displayName','code','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','19275VuzZzW','target','\x20failed,\x20HTTP\x20','正在从服务器拉取模型列表...\x20(环境:\x20','234480oZunso','40716DBtJDU','.remove(id);','stringify','/smartapi/permit/role/get-list','/smartapi/question/er-config/cli/delete-single','/smartapi/dataset/text-generate/start','totalCount','/smartapi/page/getDeletedPageList?','name','Request\x20failed:\x20','getOne','object','/notification/channel-config/list','/smartapi/dblink/delete','append','/smartapi/db-analysis/start','title','332824WPQato','/smartapi/question/er-config/cli/update-single','info','method','json','apiError','/smartapi/dataset/get-dataset-list','max','/api/management/library/scripts/statistics?appCode=','sdk','application/json','Unauthorized','body','7YGtamz','\x20\x20return\x20rows;','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','file','version','errorCode','?sqlCode=','warn','path','\x20\x20\x20\x20sqlCode:\x20\x27','/smartapi/question/er-config/cli/erCreate','createTime','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/page/restore','const\x20result\x20=\x20await\x20client.models.','/smartapi/ocr/recognize-text?','SQL\x20query\x20not\x20found:\x20','operationName','/api/management/library/scripts/list?appCode=','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','value','/api/management/script/cache/clear','key','304091gzOKEi','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','updateTime','authRequired','(/*\x20params\x20*/);','includeImports','POST','/api/node-toolbox/sql/save','/smartapi/permit/page/save','\x20failed','):\x20missing\x20data.markdown\x20field','/smartapi/custom/saveUserCustomSql','/smartapi/permit/resource/get-menu-list','1696464tcecKi','url','/smartapi/app-config/create','/api/custom/executeSql','ENABLE','401','update','/smartapi/permit/role/update','/smartapi/question/er-config/business-group/edit','/admin/knowledge-base/create','Check\x20network\x20connectivity\x20and\x20try\x20again.','/smartapi/permit/role/delete','Fetch\x20menu\x20list','success','Request\x20timeout:\x20','physicalTableCount','/smartapi/app/getList','/admin/knowledge-base/update','/smartapi/custom/updateUserCustomSql','table','/smartapi/permit/page/get-one','/smartapi/app-config/getByKey','nickname','/smartapi/permit/resource/get-api-list','\x20\x20where:\x20{},','validation','994257ZRnlny','.filter({','clientOperationId','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20'];a208_0x2347=function(){return _0x908abc;};return a208_0x2347();}export async function getAppConfigByKey(_0x5a6ec9,_0x41b902){const _0x58961a=a208_0x532215,_0x4f193d=await apiRequest(_0x58961a(0x152)+buildQuery({'appCode':_0x5a6ec9,'key':_0x41b902}));return _0x4f193d[_0x58961a(0x17a)]??null;}export async function createAppConfig(_0x6a2c3){const _0x5173bc=a208_0x532215,_0x1c4325=await apiRequest(_0x5173bc(0x13f),{'method':_0x5173bc(0x136),'body':{'appCode':_0x6a2c3[_0x5173bc(0x1ef)],'key':_0x6a2c3['key'],'value':_0x6a2c3[_0x5173bc(0x244)],..._0x6a2c3[_0x5173bc(0x1e8)]?{'tags':_0x6a2c3[_0x5173bc(0x1e8)]}:{}}});return _0x1c4325['data'];}export async function updateAppConfig(_0x59f5c1){const _0x7d344c=a208_0x532215;await apiRequest('/smartapi/app-config/update',{'method':_0x7d344c(0x136),'body':{'id':_0x59f5c1['id'],'appCode':_0x59f5c1['appCode'],'key':_0x59f5c1['key'],'value':_0x59f5c1[_0x7d344c(0x244)],..._0x59f5c1['tags']?{'tags':_0x59f5c1[_0x7d344c(0x1e8)]}:{}}});}export async function deleteAppConfig(_0x50b8bf){const _0x5e8e81=a208_0x532215;await apiRequest(_0x5e8e81(0x183),{'method':_0x5e8e81(0x136),'body':_0x50b8bf});}function extractAppConfigList(_0x16f63f){const _0x146af5=a208_0x532215;if(Array[_0x146af5(0x184)](_0x16f63f))return _0x16f63f;if(_0x16f63f&&typeof _0x16f63f==='object'&&Array[_0x146af5(0x184)](_0x16f63f[_0x146af5(0x1d0)]))return _0x16f63f['list'];return extractList(_0x16f63f);}export async function listDbLinks(_0x5abede,_0x48cdb4){const _0x5a8d35=a208_0x532215,_0x223de6=await apiRequest(_0x5a8d35(0x164),{'method':'POST','body':{'appCode':_0x5abede,'currentPage':_0x48cdb4?.[_0x5a8d35(0x1a5)]??0x1,'pageSize':_0x48cdb4?.[_0x5a8d35(0x165)]??0x64}});return{'items':extractList(_0x223de6['data']),'paging':extractPaging(_0x223de6['data'])};}export async function getDbLinkInfo(_0x52bf2b){const _0x34bc1f=a208_0x532215,_0x3a2fc9=await apiRequest(_0x34bc1f(0x1e6)+buildQuery({'id':_0x52bf2b}));return _0x3a2fc9[_0x34bc1f(0x17a)];}export async function createDbLink(_0x1f99ae){const _0x26426c=a208_0x532215,_0xe22962=await apiRequest('/smartapi/dblink/create',{'method':_0x26426c(0x136),'body':_0x1f99ae});return _0xe22962[_0x26426c(0x17a)];}export async function updateDbLink(_0x2c7cd6){const _0x4799df=a208_0x532215,_0x132178=await apiRequest(_0x4799df(0x1e9),{'method':'POST','body':_0x2c7cd6});return _0x132178[_0x4799df(0x17a)];}export async function deleteDbLink(_0x4bc182){const _0x4ae334=a208_0x532215;await apiRequest(_0x4ae334(0x21f),{'method':_0x4ae334(0x136),'body':{'id':_0x4bc182}});}export async function testDbLinkConnect(_0x5bcc4c){const _0x37f3f9=a208_0x532215,_0x2e9bbf=await apiRequest(_0x37f3f9(0x16f)+buildQuery({'id':_0x5bcc4c}));return _0x2e9bbf[_0x37f3f9(0x17a)];}export async function startDbAnalysis(_0x228459,_0x43dae1){const _0x61ba4c=a208_0x532215,_0x5ec8f4=await apiRequest(_0x61ba4c(0x221),{'method':_0x61ba4c(0x136),'body':{'dbLinkId':_0x228459,..._0x43dae1&&_0x43dae1[_0x61ba4c(0x1cc)]>0x0?{'tableNames':_0x43dae1}:{}}});return _0x5ec8f4[_0x61ba4c(0x17a)];}export async function cancelDbAnalysis(_0x4a4ca4){const _0x43cd32=a208_0x532215;await apiRequest('/smartapi/db-analysis/jobs/cancel'+buildQuery({'planId':_0x4a4ca4}),{'method':_0x43cd32(0x136)});}export async function getDbAnalysisStatus(_0x35d7b1){const _0x887af7=a208_0x532215,_0x340d1c=await apiRequest(_0x887af7(0x179)+encodeURIComponent(_0x35d7b1));return _0x340d1c['data'];}export async function getDbAllTableList(_0x55cd71,_0x200670){const _0x1e0bfb=a208_0x532215,_0x4a0ae4=await apiRequest(_0x1e0bfb(0x19e)+buildQuery({'appCode':_0x55cd71,'dbLinkId':_0x200670})),_0x54db35=_0x4a0ae4[_0x1e0bfb(0x17a)];if(Array[_0x1e0bfb(0x184)](_0x54db35))return _0x54db35;return extractList(_0x54db35);}export async function getDbTableDiff(_0x4effb9,_0x1abd2d,_0x4fc72d){const _0x3c3c60=a208_0x532215,_0x2738a1=await apiRequest(_0x3c3c60(0x1cf)+buildQuery({'appCode':_0x4effb9,'dbLinkId':_0x1abd2d,'pageIndex':_0x4fc72d?.[_0x3c3c60(0x1dd)]??0x1,'pageSize':_0x4fc72d?.[_0x3c3c60(0x165)]??0x14,'tableName':_0x4fc72d?.[_0x3c3c60(0x18e)]})),_0x4af442=_0x2738a1[_0x3c3c60(0x17a)];return{'totalCount':_0x4af442?.[_0x3c3c60(0x218)]??0x0,'physicalTableCount':_0x4af442?.[_0x3c3c60(0x14c)]??0x0,'datasetTableCount':_0x4af442?.[_0x3c3c60(0x185)]??0x0,..._0x4af442?.[_0x3c3c60(0x1ba)]?{'summary':_0x4af442['summary']}:{},'tableList':Array[_0x3c3c60(0x184)](_0x4af442?.['tableList'])?_0x4af442[_0x3c3c60(0x1a8)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x410dcb=a208_0x532215,_0x4e5599=await apiRequest(_0x410dcb(0x14d),{'method':_0x410dcb(0x136),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x37a113=extractList(_0x4e5599['data']),_0x4bd19c=extractPaging(_0x4e5599[_0x410dcb(0x17a)]);return _0x4bd19c&&_0x4bd19c['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x410dcb(0x237)](_0x410dcb(0x1db)+REMOTE_APP_PAGE_SIZE+_0x410dcb(0x1ae)+_0x4bd19c['totalCount']+_0x410dcb(0x1f0)+_0x410dcb(0x243)),_0x37a113;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x27ab43,_0x268a32){const _0x4ae705=a208_0x532215,_0x2af171=Math[_0x4ae705(0x1bc)](Math[_0x4ae705(0x22a)](_0x268a32?.['pageSize']??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x157c1a=await apiRequest(_0x4ae705(0x215),{'method':'POST','body':{'appCode':_0x27ab43,'currentPage':_0x268a32?.['currentPage']??0x1,'pageSize':_0x2af171}});return{'items':extractList(_0x157c1a['data']),'paging':extractPaging(_0x157c1a['data'])};}export async function getAppRole(_0x1b3989){const _0x3296a9=a208_0x532215,_0x101237=await apiRequest(_0x3296a9(0x203)+buildQuery({'id':_0x1b3989}));return _0x101237[_0x3296a9(0x17a)];}export async function createAppRole(_0x2ace80){const _0x5053e7=a208_0x532215,_0xb541ff=await apiRequest(_0x5053e7(0x17c),{'method':_0x5053e7(0x136),'body':{'appCode':_0x2ace80['appCode'],'roleName':_0x2ace80[_0x5053e7(0x1d6)],'roleType':_0x5053e7(0x1c7),..._0x2ace80[_0x5053e7(0x16d)]?{'remark':_0x2ace80[_0x5053e7(0x16d)]}:{}}});return _0xb541ff[_0x5053e7(0x17a)];}export async function updateAppRole(_0x5cee0c){const _0xf33286=a208_0x532215,_0x17a6e4=await apiRequest(_0xf33286(0x144),{'method':_0xf33286(0x136),'body':{'id':_0x5cee0c['id'],'appCode':_0x5cee0c[_0xf33286(0x1ef)],..._0x5cee0c['roleType']?{'roleType':_0x5cee0c['roleType']}:{},..._0x5cee0c[_0xf33286(0x1d6)]!==undefined?{'roleName':_0x5cee0c[_0xf33286(0x1d6)]}:{},..._0x5cee0c[_0xf33286(0x16d)]!==undefined?{'remark':_0x5cee0c[_0xf33286(0x16d)]}:{},..._0x5cee0c[_0xf33286(0x1a7)]?{'permits':_0x5cee0c[_0xf33286(0x1a7)]}:{}}});return _0x17a6e4[_0xf33286(0x17a)];}export async function deleteAppRole(_0x3bb560){const _0x5b24b9=a208_0x532215;await apiRequest(_0x5b24b9(0x148),{'method':_0x5b24b9(0x136),'body':{'id':_0x3bb560}});}export async function listPermitRoles(_0x213cbf,_0x23ac8f){const _0x136325=a208_0x532215,_0x57218b=await apiRequest(_0x136325(0x1ee),{'method':_0x136325(0x136),'body':{'appCode':_0x213cbf,..._0x23ac8f?.[_0x136325(0x1c9)]!==undefined?{'needSelf':_0x23ac8f[_0x136325(0x1c9)]}:{},..._0x23ac8f?.['needPublic']!==undefined?{'needPublic':_0x23ac8f[_0x136325(0x1b0)]}:{}}});return extractList(_0x57218b['data']);}export async function getRoleMenuResources(_0x34616a,_0x593ca4){const _0xc139a6=a208_0x532215,_0x5286e5=await apiRequest(_0xc139a6(0x13c),{'method':_0xc139a6(0x136),'body':{'appCode':_0x34616a,'roleId':_0x593ca4}});return extractList(_0x5286e5[_0xc139a6(0x17a)]);}export async function getRoleApiResources(_0x4f7b23,_0x14542c){const _0x2a9c72=a208_0x532215,_0xed2fc0=await apiRequest(_0x2a9c72(0x154),{'method':_0x2a9c72(0x136),'body':{'appCode':_0x4f7b23,'roleId':_0x14542c}});return extractList(_0xed2fc0[_0x2a9c72(0x17a)]);}export async function listRoleUsers(_0x15188c){const _0x5d1553=a208_0x532215,_0x34e4b9=await apiRequest(_0x5d1553(0x15d),{'method':_0x5d1553(0x136),'body':{'appCode':_0x15188c}});return extractList(_0x34e4b9[_0x5d1553(0x17a)])[_0x5d1553(0x1bb)](({id:_0xb364c,userList:_0x41548c,applyUserList:_0x1e8f11,..._0x11aabb})=>({..._0x11aabb,'id':Number(_0xb364c),'userList':_0x41548c[_0x5d1553(0x1bb)](_0x2de261=>({..._0x2de261,'userId':Number(_0x2de261[_0x5d1553(0x19b)])})),..._0x1e8f11?{'applyUserList':_0x1e8f11['map'](_0x428d3a=>({..._0x428d3a,'userId':Number(_0x428d3a['userId'])}))}:{}}));}export async function updateRoleUsers(_0x4f23e9,_0x1596b8){const _0x27b37e=a208_0x532215;await apiRequest(_0x27b37e(0x1dc),{'method':'POST','body':{'appCode':_0x4f23e9,'roleList':_0x1596b8}});}export async function getPagePermit(_0x709acf){const _0x4db025=a208_0x532215,_0x34dacc=await apiRequest(_0x4db025(0x151)+buildQuery({'menuId':_0x709acf}));return _0x34dacc[_0x4db025(0x17a)];}export async function savePagePermit(_0x4f58d9){const _0x30402d=a208_0x532215,_0x1bea33=await apiRequest(_0x30402d(0x138),{'method':_0x30402d(0x136),'body':_0x4f58d9});return _0x1bea33[_0x30402d(0x17a)];}export async function listCurrentUserTenantMemberships(){const _0x31d2f0=a208_0x532215,_0x5b2115=await apiRequest('/userTenant/queryBelongsTenants');return extractList(_0x5b2115[_0x31d2f0(0x17a)]);}export async function listTenantDirectoryMembers(_0x36e69f){const _0x16016c=a208_0x532215,_0x2be86a=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x36e69f})),_0x13b37f=_0x2be86a[_0x16016c(0x17a)]?.[_0x16016c(0x1ca)];return Array[_0x16016c(0x184)](_0x13b37f)?_0x13b37f:[];}export async function getTenantMembers(_0x2d7e5a){const _0x157b02=a208_0x532215,_0x405f65=await listTenantDirectoryMembers(_0x2d7e5a);return _0x405f65[_0x157b02(0x1d3)](_0x2b0cf0=>_0x2b0cf0[_0x157b02(0x17f)]===_0x157b02(0x141)||_0x2b0cf0['status']===undefined)[_0x157b02(0x1bb)](_0xe1231d=>({'userId':Number(_0xe1231d[_0x157b02(0x19b)]??_0xe1231d['id']),'username':_0xe1231d[_0x157b02(0x1f7)],'nickname':_0xe1231d[_0x157b02(0x153)],'status':_0xe1231d[_0x157b02(0x17f)],'email':_0xe1231d['email'],'mobile':_0xe1231d['mobile'],'avatar':_0xe1231d['avatar']}))['filter'](_0x3d6d6f=>Number[_0x157b02(0x1f4)](_0x3d6d6f['userId'])&&_0x3d6d6f[_0x157b02(0x19b)]>0x0);}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BFF 同步体系 —— 项目配置
|
|
3
|
+
*
|
|
4
|
+
* 纯路径计算:接收已解析的 appCode,返回 scriptsRoot / lockFilePath 等派生路径。
|
|
5
|
+
* 不读取 .rabetbase.json —— 配置由框架管线提供。
|
|
6
|
+
*/
|
|
7
|
+
import type { BffProjectConfig } from "../../core/bff/types.js";
|
|
8
|
+
export declare function loadBffProjectConfig(appCode: string, projectRoot?: string): BffProjectConfig;
|
package/lib/core/bff/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a209_0x30293b=a209_0x34e7;(function(_0x8c9da2,_0xadfb30){const _0x192427=a209_0x34e7,_0x4cbe5b=_0x8c9da2();while(!![]){try{const _0x277dee=-parseInt(_0x192427(0x16a))/0x1+parseInt(_0x192427(0x16d))/0x2*(-parseInt(_0x192427(0x16f))/0x3)+parseInt(_0x192427(0x170))/0x4+-parseInt(_0x192427(0x164))/0x5*(-parseInt(_0x192427(0x16b))/0x6)+parseInt(_0x192427(0x171))/0x7*(-parseInt(_0x192427(0x166))/0x8)+parseInt(_0x192427(0x172))/0x9*(parseInt(_0x192427(0x165))/0xa)+-parseInt(_0x192427(0x16c))/0xb;if(_0x277dee===_0xadfb30)break;else _0x4cbe5b['push'](_0x4cbe5b['shift']());}catch(_0x2d9536){_0x4cbe5b['push'](_0x4cbe5b['shift']());}}}(a209_0x5611,0x3f95e));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a209_0x30293b(0x16e),LOCK_FILE_NAME=a209_0x30293b(0x169),TRASH_DIR_NAME=a209_0x30293b(0x168);function a209_0x34e7(_0x5e22c8,_0x410e59){_0x5e22c8=_0x5e22c8-0x163;const _0x5611ba=a209_0x5611();let _0x34e78f=_0x5611ba[_0x5e22c8];return _0x34e78f;}function a209_0x5611(){const _0x510c8a=['116655BrCWgO','2655xlWLof','bff','490AsMAIR','16900wOWiKO','136gHnQHy','/bff','bff-trash','bff.lock.json','143113FOZgVP','6198rZZeQg','3215113wDIRsQ','2MCIQXH','.rabetbase','213090OJSSWU','1801572gtNOXF'];a209_0x5611=function(){return _0x510c8a;};return a209_0x5611();}export function loadBffProjectConfig(_0x5a1b03,_0x25fda4){const _0x25441c=a209_0x30293b,_0x2be265=resolve(_0x25fda4??findProjectRootDirectory()),_0x7c6650=DOT_DIR+_0x25441c(0x167),_0x2fe2f9=_0x7c6650+'/'+_0x5a1b03;return{'projectRoot':_0x2be265,'appCode':_0x5a1b03,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x7c6650,'scriptsRoot':_0x2fe2f9,'scriptsRootDir':resolve(_0x2be265,DOT_DIR,_0x25441c(0x163),_0x5a1b03),'lockFilePath':resolve(_0x2be265,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2be265,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BFF 同步体系 —— 本地文件扫描与路径解析
|
|
3
|
+
*
|
|
4
|
+
* 负责:
|
|
5
|
+
* - 扫描 COMMON / ENDPOINT / HOOK 目录下的 .js 脚本文件
|
|
6
|
+
* - 根据远端脚本信息 + HOOK 统计解析本地落盘目标
|
|
7
|
+
* - lockKey ↔ filePath 双向映射
|
|
8
|
+
*/
|
|
9
|
+
import type { BffLockEntry, BffProjectConfig, BffScriptType, HookLocation, LocalBffFunction, RemoteBffScript, ResolvedRemoteScriptTarget, ScriptStatistics } from "../../core/bff/types.js";
|
|
10
|
+
export declare const SUPPORTED_BFF_TYPES: BffScriptType[];
|
|
11
|
+
export declare function normalizeBffType(rawType?: string): BffScriptType | undefined;
|
|
12
|
+
export declare function scanLocalBffFunctions(config: BffProjectConfig, filterType?: BffScriptType): Promise<LocalBffFunction[]>;
|
|
13
|
+
export declare function resolveLocalFilePathFromLockKey(config: BffProjectConfig, lockKey: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Build a map from remote script ID to its HOOK location using statistics data.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createHookLocationMap(statistics: ScriptStatistics[]): Map<number, HookLocation>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a remote script to its local file target (lockKey + filePath).
|
|
20
|
+
* HOOK scripts use alias (from api.ts) for local directory naming.
|
|
21
|
+
* Returns null if the script type is unknown or a HOOK location cannot be determined.
|
|
22
|
+
*
|
|
23
|
+
* @param datasetCodeToAlias - Map from datasetCode → alias (from alias-resolver)
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveRemoteScriptTarget(config: BffProjectConfig, script: RemoteBffScript, hookLocationMap: Map<number, HookLocation>, lockFunctions: Record<string, BffLockEntry>, datasetCodeToAlias: Map<string, string>): ResolvedRemoteScriptTarget | null;
|
|
26
|
+
export declare function ensureParentDirectory(filePath: string): Promise<void>;
|
|
27
|
+
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
28
|
+
export declare function directoryExists(dirPath: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a210_0x5126f3=a210_0x28e0;(function(_0x57be52,_0x3bbf9d){const _0x3276bb=a210_0x28e0,_0x1a262e=_0x57be52();while(!![]){try{const _0x19dda6=parseInt(_0x3276bb(0x107))/0x1*(-parseInt(_0x3276bb(0x10a))/0x2)+-parseInt(_0x3276bb(0x104))/0x3+parseInt(_0x3276bb(0xfa))/0x4*(parseInt(_0x3276bb(0x106))/0x5)+parseInt(_0x3276bb(0xed))/0x6*(parseInt(_0x3276bb(0xf3))/0x7)+parseInt(_0x3276bb(0xf8))/0x8+parseInt(_0x3276bb(0xea))/0x9+parseInt(_0x3276bb(0xef))/0xa*(-parseInt(_0x3276bb(0x10d))/0xb);if(_0x19dda6===_0x3bbf9d)break;else _0x1a262e['push'](_0x1a262e['shift']());}catch(_0x5ce50c){_0x1a262e['push'](_0x1a262e['shift']());}}}(a210_0x40f8,0x43f49));import{access,mkdir,readdir,stat}from'node:fs/promises';function a210_0x28e0(_0x5312d2,_0x53c835){_0x5312d2=_0x5312d2-0xe8;const _0x40f803=a210_0x40f8();let _0x28e070=_0x40f803[_0x5312d2];return _0x28e070;}import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a210_0x5126f3(0xe8),a210_0x5126f3(0xf6),'HOOK'];export function normalizeBffType(_0x3afdc4){const _0x43e81c=a210_0x5126f3;if(!_0x3afdc4)return undefined;const _0x2574f9=_0x3afdc4[_0x43e81c(0xf1)]()[_0x43e81c(0xfe)]();return SUPPORTED_BFF_TYPES[_0x43e81c(0xf9)](_0x2574f9)?_0x2574f9:undefined;}async function scanJsFilesRecursively(_0x3e9351,_0x46bad1){const _0x28e418=a210_0x5126f3,_0x3d89b0=[];try{const _0x4de359=await readdir(_0x3e9351,{'withFileTypes':!![]});for(const _0x44b720 of _0x4de359){const _0x177940=join(_0x3e9351,_0x44b720[_0x28e418(0xee)]);if(_0x44b720['isDirectory']())_0x3d89b0[_0x28e418(0xff)](...await scanJsFilesRecursively(_0x177940,_0x46bad1+'/'+_0x44b720[_0x28e418(0xee)]));else _0x44b720[_0x28e418(0x10c)]()&&_0x44b720[_0x28e418(0xee)][_0x28e418(0x10b)](_0x28e418(0xf2))&&_0x3d89b0[_0x28e418(0xff)]({'lockKey':_0x46bad1+'/'+_0x44b720['name']['replace'](/\.js$/,''),'filePath':_0x177940});}}catch(_0x189abe){if(_0x189abe[_0x28e418(0xfc)]!==_0x28e418(0x101))throw _0x189abe;}return _0x3d89b0;}async function scanFlatFunctions(_0x4392ab,_0x255431){const _0x1568d4=a210_0x5126f3,_0x55335b=join(_0x4392ab[_0x1568d4(0x105)],_0x255431),_0x3ae485=await scanJsFilesRecursively(_0x55335b,_0x255431);return _0x3ae485[_0x1568d4(0x110)](({lockKey:_0x5db61d,filePath:_0xc0f267})=>({'type':_0x255431,'name':_0x5db61d[_0x1568d4(0xe9)]('/')['at'](-0x1)??'','filePath':_0xc0f267,'lockKey':_0x5db61d}));}function a210_0x40f8(){const _0x589d12=['scriptsRootDir','2900NgLRJi','6709LTYcYv','functionName','isDirectory','146Vtrnih','endsWith','isFile','30690CNHqmJ','before','all','map','beforeScriptId','COMMON','split','2561616MjObro','scriptType','alias','650718rNGxyV','name','1130qdfDrT','operationType','trim','.js','28pCjgWY','set','HOOK','ENDPOINT','datasetCode','1910592DLvZSG','includes','908jJKkgk','replace','code','get','toUpperCase','push','F_OK','ENOENT','HOOK/','afterScriptId','16644jAqnNc'];a210_0x40f8=function(){return _0x589d12;};return a210_0x40f8();}async function scanHookFunctions(_0x288e62){const _0x59bb9a=a210_0x5126f3,_0x50905d=join(_0x288e62[_0x59bb9a(0x105)],_0x59bb9a(0xf5)),_0x1261da=[];try{const _0x179bf7=await readdir(_0x50905d,{'withFileTypes':!![]});for(const _0x130d6d of _0x179bf7){if(!_0x130d6d[_0x59bb9a(0x109)]())continue;const _0x1efffe=_0x130d6d[_0x59bb9a(0xee)],_0x1b1f08=join(_0x50905d,_0x1efffe),_0x596084=await readdir(_0x1b1f08,{'withFileTypes':!![]});for(const _0x56ed3f of _0x596084){if(!_0x56ed3f[_0x59bb9a(0x109)]())continue;const _0x43ff1d=_0x56ed3f[_0x59bb9a(0xee)],_0x288e36=join(_0x1b1f08,_0x43ff1d),_0x2092de=await readdir(_0x288e36,{'withFileTypes':!![]});for(const _0x335372 of _0x2092de){if(!_0x335372[_0x59bb9a(0x109)]())continue;const _0x4f8760=_0x335372[_0x59bb9a(0xee)],_0x2e9917=join(_0x288e36,_0x4f8760),_0x5d4737=await readdir(_0x2e9917,{'withFileTypes':!![]});for(const _0x22e44d of _0x5d4737){if(!_0x22e44d['isFile']()||!_0x22e44d[_0x59bb9a(0xee)][_0x59bb9a(0x10b)](_0x59bb9a(0xf2)))continue;const _0x3f7649=_0x22e44d[_0x59bb9a(0xee)][_0x59bb9a(0xfb)](/\.js$/,'');_0x1261da[_0x59bb9a(0xff)]({'type':'HOOK','name':_0x3f7649,'filePath':join(_0x2e9917,_0x22e44d['name']),'lockKey':_0x59bb9a(0x102)+_0x1efffe+'/'+_0x43ff1d+'/'+_0x4f8760+'/'+_0x3f7649,'alias':_0x1efffe,'operationType':_0x43ff1d,'functionNode':_0x4f8760});}}}}}catch(_0x237979){if(_0x237979[_0x59bb9a(0xfc)]!==_0x59bb9a(0x101))throw _0x237979;}return _0x1261da;}export async function scanLocalBffFunctions(_0x4c7e01,_0x2b8b6d){const _0x7da7b3=a210_0x5126f3;if(_0x2b8b6d==='COMMON'||_0x2b8b6d===_0x7da7b3(0xf6))return scanFlatFunctions(_0x4c7e01,_0x2b8b6d);if(_0x2b8b6d===_0x7da7b3(0xf5))return scanHookFunctions(_0x4c7e01);const [_0x9e8e88,_0x1a0c5c,_0x4b0364]=await Promise[_0x7da7b3(0x10f)]([scanFlatFunctions(_0x4c7e01,_0x7da7b3(0xe8)),scanFlatFunctions(_0x4c7e01,'ENDPOINT'),scanHookFunctions(_0x4c7e01)]);return[..._0x9e8e88,..._0x1a0c5c,..._0x4b0364];}export function resolveLocalFilePathFromLockKey(_0x4bba57,_0x42265b){const _0x57374a=a210_0x5126f3;return join(_0x4bba57[_0x57374a(0x105)],..._0x42265b['split']('/'))+'.js';}export function createHookLocationMap(_0x400544){const _0x79dcdb=a210_0x5126f3,_0x31fa3a=new Map();for(const _0x39f312 of _0x400544){_0x39f312['beforeScriptId']&&_0x31fa3a[_0x79dcdb(0xf4)](_0x39f312[_0x79dcdb(0x111)],{'datasetCode':_0x39f312['datasetCode'],'operationType':snakeToCamel(_0x39f312[_0x79dcdb(0xf0)]),'functionNode':_0x79dcdb(0x10e)}),_0x39f312[_0x79dcdb(0x103)]&&_0x31fa3a[_0x79dcdb(0xf4)](_0x39f312[_0x79dcdb(0x103)],{'datasetCode':_0x39f312[_0x79dcdb(0xf7)],'operationType':snakeToCamel(_0x39f312[_0x79dcdb(0xf0)]),'functionNode':'after'});}return _0x31fa3a;}export function resolveRemoteScriptTarget(_0x360635,_0x4297a5,_0x352c6c,_0x229da7,_0x37dfc5){const _0x43f80a=a210_0x5126f3,_0x43e39f=normalizeBffType(_0x4297a5[_0x43f80a(0xeb)]);if(!_0x43e39f||!_0x4297a5[_0x43f80a(0x108)])return null;if(_0x43e39f===_0x43f80a(0xf5)){const _0x20083a=(_0x4297a5['id']?_0x352c6c[_0x43f80a(0xfd)](_0x4297a5['id']):undefined)??findHookLocationByRemoteId(_0x229da7,_0x4297a5['id']);if(!_0x20083a)return null;const _0x570745=_0x20083a[_0x43f80a(0xec)]||_0x37dfc5[_0x43f80a(0xfd)](_0x20083a[_0x43f80a(0xf7)]),_0x37a55f=_0x570745??_0x20083a[_0x43f80a(0xf7)],_0x50e2c8={..._0x20083a,'alias':_0x570745},_0x306968=_0x43f80a(0x102)+_0x37a55f+'/'+_0x50e2c8['operationType']+'/'+_0x50e2c8['functionNode']+'/'+_0x4297a5[_0x43f80a(0x108)];return{'lockKey':_0x306968,'filePath':resolveLocalFilePathFromLockKey(_0x360635,_0x306968),'type':_0x43f80a(0xf5),'hookLocation':_0x50e2c8};}const _0x4c1553=_0x43e39f+'/'+_0x4297a5[_0x43f80a(0x108)];return{'lockKey':_0x4c1553,'filePath':resolveLocalFilePathFromLockKey(_0x360635,_0x4c1553),'type':_0x43e39f};}export async function ensureParentDirectory(_0x4edcfa){await mkdir(dirname(_0x4edcfa),{'recursive':!![]});}export async function fileExists(_0x390cc7){const _0x4692ee=a210_0x5126f3;try{return await access(_0x390cc7,constants[_0x4692ee(0x100)]),!![];}catch{return![];}}export async function directoryExists(_0x141d5f){const _0x313fed=a210_0x5126f3;try{const _0x88b90=await stat(_0x141d5f);return _0x88b90[_0x313fed(0x109)]();}catch{return![];}}
|
package/lib/core/bff/hash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12ffcd,_0x52c48e){const _0x19104b=a211_0x2c46,_0x2703eb=_0x12ffcd();while(!![]){try{const _0x541e7d=-parseInt(_0x19104b(0x15c))/0x1*(-parseInt(_0x19104b(0x15a))/0x2)+parseInt(_0x19104b(0x154))/0x3*(parseInt(_0x19104b(0x157))/0x4)+-parseInt(_0x19104b(0x159))/0x5+-parseInt(_0x19104b(0x160))/0x6*(parseInt(_0x19104b(0x15e))/0x7)+parseInt(_0x19104b(0x152))/0x8*(-parseInt(_0x19104b(0x155))/0x9)+-parseInt(_0x19104b(0x153))/0xa*(parseInt(_0x19104b(0x158))/0xb)+parseInt(_0x19104b(0x15d))/0xc;if(_0x541e7d===_0x52c48e)break;else _0x2703eb['push'](_0x2703eb['shift']());}catch(_0x1d32cb){_0x2703eb['push'](_0x2703eb['shift']());}}}(a211_0x2d2b,0xa0e64));function a211_0x2c46(_0x46e5d9,_0x4e08f2){_0x46e5d9=_0x46e5d9-0x151;const _0x2d2b73=a211_0x2d2b();let _0x2c4670=_0x2d2b73[_0x46e5d9];return _0x2c4670;}function a211_0x2d2b(){const _0x45a677=['utf8','1yMCiAM','13735344cLAWEE','2732674BrQFwK','update','6YiAezZ','digest','24uAVVTh','3584590QMazMO','573522ATRMRy','26541iXRvox','createHash','4xjcRol','11bZrtzw','6035455RSoVum','2576074mMaHLh'];a211_0x2d2b=function(){return _0x45a677;};return a211_0x2d2b();}import{readFile}from'node:fs/promises';import a211_0x590420 from'node:crypto';export function computeContentHash(_0x5493e7){const _0x16b9a9=a211_0x2c46;return a211_0x590420[_0x16b9a9(0x156)]('md5')[_0x16b9a9(0x15f)](_0x5493e7)[_0x16b9a9(0x151)]('hex');}export async function computeFileHash(_0x483eb5){const _0xeafcf4=a211_0x2c46,_0x8c3cae=await readFile(_0x483eb5,_0xeafcf4(0x15b));return computeContentHash(_0x8c3cae);}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BFF 同步体系 —— Lock 文件管理
|
|
3
|
+
*
|
|
4
|
+
* .rabetbase/bff.lock.json 记录每个 appCode 下脚本的 hash / remoteId / version,
|
|
5
|
+
* 用于 push/pull 的变更检测与冲突保护。
|
|
6
|
+
*
|
|
7
|
+
* 多 appCode 共享同一 lock 文件,各自拥有独立的 BffLockScope。
|
|
8
|
+
*/
|
|
9
|
+
import type { BffLockFile, BffLockScope } from "../../core/bff/types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Create an empty multi-app BFF lock file.
|
|
12
|
+
*
|
|
13
|
+
* @returns New lock object with no app scopes.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createEmptyBffLock(): BffLockFile;
|
|
16
|
+
/**
|
|
17
|
+
* Get (or create) the lock scope for the given appCode.
|
|
18
|
+
* Blocks execution if scriptsRoot has changed unexpectedly.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ensureLockScope(lockData: BffLockFile, currentAppCode: string, currentScriptsRoot: string, commandName: string): {
|
|
21
|
+
lockData: BffLockFile;
|
|
22
|
+
appLock: BffLockScope;
|
|
23
|
+
};
|
|
24
|
+
export declare function readBffLockFile(lockFilePath: string): Promise<BffLockFile | null>;
|
|
25
|
+
export declare function writeBffLockFile(lockFilePath: string, lockData: BffLockFile): Promise<void>;
|
package/lib/core/bff/lock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6ccfc7,_0x4ca132){const _0x50961d=a212_0x210a,_0x175382=_0x6ccfc7();while(!![]){try{const _0xe2915f=-parseInt(_0x50961d(0x9c))/0x1*(-parseInt(_0x50961d(0xa1))/0x2)+-parseInt(_0x50961d(0x90))/0x3+parseInt(_0x50961d(0xa2))/0x4+-parseInt(_0x50961d(0x8e))/0x5+parseInt(_0x50961d(0x9a))/0x6+parseInt(_0x50961d(0x98))/0x7+-parseInt(_0x50961d(0x9f))/0x8*(parseInt(_0x50961d(0x99))/0x9);if(_0xe2915f===_0x4ca132)break;else _0x175382['push'](_0x175382['shift']());}catch(_0x1408ae){_0x175382['push'](_0x175382['shift']());}}}(a212_0x4724,0xee431));import{mkdir,readFile,writeFile}from'node:fs/promises';function a212_0x210a(_0x48e20c,_0x1e4fee){_0x48e20c=_0x48e20c-0x8d;const _0x472461=a212_0x4724();let _0x210a2a=_0x472461[_0x48e20c];return _0x210a2a;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x37500b,_0x1832be,_0x346c3b,_0x1cf031){const _0x1313e0=a212_0x210a,_0x2905ac={'apps':_0x37500b[_0x1313e0(0xa0)]&&typeof _0x37500b['apps']==='object'?_0x37500b[_0x1313e0(0xa0)]:{}};let _0x5a95ac=_0x2905ac['apps'][_0x1832be];if(!_0x5a95ac)return _0x5a95ac={'scriptsRoot':_0x346c3b,'lastSync':'','functions':{}},_0x2905ac['apps'][_0x1832be]=_0x5a95ac,{'lockData':_0x2905ac,'appLock':_0x5a95ac};if(!_0x5a95ac['scriptsRoot'])_0x5a95ac[_0x1313e0(0x9b)]=_0x346c3b;else{if(_0x5a95ac[_0x1313e0(0x9b)]!==_0x346c3b)throw new Error(_0x1cf031+_0x1313e0(0x93)+('current\x20\x22'+_0x346c3b+'\x22\x20vs\x20lock\x20\x22'+_0x5a95ac['scriptsRoot']+_0x1313e0(0x8f))+_0x1313e0(0x95));}return!_0x5a95ac[_0x1313e0(0x97)]&&(_0x5a95ac['functions']={}),!_0x5a95ac['lastSync']&&(_0x5a95ac[_0x1313e0(0x96)]=''),{'lockData':_0x2905ac,'appLock':_0x5a95ac};}function a212_0x4724(){const _0x4254f2=['scriptsRoot','857437RnokHA','utf8','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','6652360TillLz','apps','4bGFoud','7457216jfmAqz','parse','9693455MCratW','\x22.\x20','4093452fXJbdn','stringify','object',':\x20scriptsRoot\x20mismatch\x20—\x20','code','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','lastSync','functions','2932664HyFBWq','9CMUoGt','6675066XnKKzk'];a212_0x4724=function(){return _0x4254f2;};return a212_0x4724();}export async function readBffLockFile(_0x38e99a){const _0x13657b=a212_0x210a;try{const _0x1047af=await readFile(_0x38e99a,_0x13657b(0x9d)),_0x59977e=JSON[_0x13657b(0x8d)](_0x1047af);return{'apps':_0x59977e[_0x13657b(0xa0)]&&typeof _0x59977e[_0x13657b(0xa0)]===_0x13657b(0x92)?_0x59977e['apps']:{}};}catch(_0xa59d09){if(_0xa59d09[_0x13657b(0x94)]==='ENOENT')return null;throw new Error(_0x13657b(0x9e)+String(_0xa59d09));}}export async function writeBffLockFile(_0x562ade,_0x267fde){const _0x55bb18=a212_0x210a;await mkdir(dirname(_0x562ade),{'recursive':!![]}),await writeFile(_0x562ade,JSON[_0x55bb18(0x91)](_0x267fde,null,0x2),'utf8');}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BFF 同步体系 —— 类型定义
|
|
3
|
+
*
|
|
4
|
+
* 覆盖 lock 文件结构、本地函数描述、远端脚本模型、项目配置等。
|
|
5
|
+
* 仅类型,不含运行时逻辑。
|
|
6
|
+
*/
|
|
7
|
+
export type BffScriptType = "COMMON" | "ENDPOINT" | "HOOK";
|
|
8
|
+
export interface HookLocation {
|
|
9
|
+
/** api.ts 中定义的别名,用于本地目录命名和 lockKey。从 statistics 构建时可能缺失,由命令层补充。 */
|
|
10
|
+
alias?: string;
|
|
11
|
+
/** 32 位数据集编码,用于 API 通信 */
|
|
12
|
+
datasetCode: string;
|
|
13
|
+
operationType: string;
|
|
14
|
+
functionNode: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BffProjectConfig {
|
|
17
|
+
projectRoot: string;
|
|
18
|
+
appCode: string;
|
|
19
|
+
scriptsBaseDir: string;
|
|
20
|
+
scriptsWorkspaceRoot: string;
|
|
21
|
+
scriptsRoot: string;
|
|
22
|
+
scriptsRootDir: string;
|
|
23
|
+
lockFilePath: string;
|
|
24
|
+
trashDir: string;
|
|
25
|
+
}
|
|
26
|
+
export interface LocalBffFunction extends Partial<HookLocation> {
|
|
27
|
+
type: BffScriptType;
|
|
28
|
+
name: string;
|
|
29
|
+
filePath: string;
|
|
30
|
+
lockKey: string;
|
|
31
|
+
}
|
|
32
|
+
export interface BffLockEntry extends Partial<HookLocation> {
|
|
33
|
+
hash: string;
|
|
34
|
+
remoteId: number;
|
|
35
|
+
version?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface BffLockScope {
|
|
38
|
+
scriptsRoot: string;
|
|
39
|
+
lastSync: string;
|
|
40
|
+
functions: Record<string, BffLockEntry>;
|
|
41
|
+
}
|
|
42
|
+
export interface BffLockFile {
|
|
43
|
+
apps: Record<string, BffLockScope>;
|
|
44
|
+
}
|
|
45
|
+
export interface ScriptStatistics {
|
|
46
|
+
datasetCode: string;
|
|
47
|
+
operationType: string;
|
|
48
|
+
beforeScriptId: number | null;
|
|
49
|
+
afterScriptId: number | null;
|
|
50
|
+
}
|
|
51
|
+
export interface DatasetInfo {
|
|
52
|
+
id: number;
|
|
53
|
+
name: string;
|
|
54
|
+
code: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DatasetOperation {
|
|
57
|
+
operationType: string;
|
|
58
|
+
operationName: string;
|
|
59
|
+
}
|
|
60
|
+
export interface RemoteBffScript {
|
|
61
|
+
id?: number;
|
|
62
|
+
appCode: string;
|
|
63
|
+
functionName?: string;
|
|
64
|
+
functionNode?: string;
|
|
65
|
+
scriptType: string;
|
|
66
|
+
scriptContent?: string;
|
|
67
|
+
version?: number;
|
|
68
|
+
description?: string;
|
|
69
|
+
datasetId?: number | null;
|
|
70
|
+
operationType?: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface SaveBffScriptPayload {
|
|
73
|
+
id?: number;
|
|
74
|
+
appCode: string;
|
|
75
|
+
functionName: string;
|
|
76
|
+
functionNode?: string;
|
|
77
|
+
scriptType: string;
|
|
78
|
+
scriptContent: string;
|
|
79
|
+
version?: number;
|
|
80
|
+
description?: string;
|
|
81
|
+
datasetId?: number;
|
|
82
|
+
operationType?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ResolvedRemoteScriptTarget {
|
|
85
|
+
lockKey: string;
|
|
86
|
+
filePath: string;
|
|
87
|
+
type: BffScriptType;
|
|
88
|
+
hookLocation?: HookLocation;
|
|
89
|
+
}
|
|
90
|
+
export interface HookCreationOptions extends HookLocation {
|
|
91
|
+
datasetId: number;
|
|
92
|
+
}
|