hap-cli 0.9.12__tar.gz → 0.9.14__tar.gz
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.
- {hap_cli-0.9.12 → hap_cli-0.9.14}/PKG-INFO +1 -1
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/__init__.py +1 -1
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/auth_cmd.py +2 -1
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/context.py +4 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/charts.py +11 -5
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/steps.py +3 -2
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/workflow_dsl.py +24 -15
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/chart.py +18 -4
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record_defaults.py +7 -1
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/relogin.py +4 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/session.py +34 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/workflow_node_dsl.py +56 -14
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/worksheet_templates.py +37 -13
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/i18n.py +186 -4
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/PKG-INFO +1 -1
- {hap_cli-0.9.12 → hap_cli-0.9.14}/MANIFEST.in +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/README.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/README.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/README_CN.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/__main__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/_entry.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/app_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/app_creator_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/app_editor_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/attachment_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/calendar_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/chart_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/chat_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/chatbot_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/config_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/contact_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/department_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/group_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/guide_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/icon_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/instance_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/node_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/optionset_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/page_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/post_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/record_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/region_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/role_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/update_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/upload_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/v3_registry.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/workflow_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/commands/worksheet_cmd.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/action_spec_adapter.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/control_type_codes.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/worksheet_templates.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/cleanup.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/compiler.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/config.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/design/design.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/errors.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/examples/minimal.design.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/executor.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/fields.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/hap.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/merge.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/console.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/jsonl.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/mirror.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/report.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/schema.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/INSTRUCTIONS.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/cli.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/executor.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/attachments.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample.docx +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample.pdf +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample_images.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/template.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/selftest.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/smoke.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/store.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/app_creator/validate.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/attachment.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/auth.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/calendar_mod.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/chat.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/chatbot.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/cli_access.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/condition_dsl.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/contact.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/control_type_codes.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/department.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/_hapmeta/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/_hapmeta/control_type_codes.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/apply.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/componentlower.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/component.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/custom-action.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/envelope.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/field.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/editspec.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/errors.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/fieldlower.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/jsonschema_mini.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/models.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/ops.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/planner.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/editor/reader.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/field_normalizer.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/field_spec_adapter.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/filter_translator.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/filter_v3.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/flow_node.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/global_meta.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/group.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/guide.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/icon_index.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/instance.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/layout_check.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/logger.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/optionset.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/page.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/post.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record_discussions.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record_form_checks.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record_lookups.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/record_rules.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/relation_scope.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/response_crypto.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/role.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/role_perm_builder.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/rule_spec_adapter.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/token_crypto.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/update.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/upload.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/v3/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/v3/dispatcher.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/v3/render.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/v3/schema.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/view_spec_adapter.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/workflow.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/worksheet.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/worksheet_form.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/core/worksheet_reference.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/approval.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/chart.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/messages.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/overview.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/post.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/record.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/setup.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/skills.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/workflow.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/en/worksheet.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/index.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/approval.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/chart.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/messages.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/overview.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/post.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/record.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/setup.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/skills.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/workflow.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/worksheet.md +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/locale/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/locale/messages.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/locale/messages.schema.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/__init__.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/atomic_write.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/confirm.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/formatting.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/options.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli/utils/parameter_mapping.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/SOURCES.txt +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/dependency_links.txt +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/entry_points.txt +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/requires.txt +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/hap_cli.egg-info/top_level.txt +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/setup.cfg +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/setup.py +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/INDEX.json +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/add_member_to_role.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/batch_delete_records.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/create_optionset.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/create_role.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/delete_optionset.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/delete_record.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/delete_role.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/delete_worksheet.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_info.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_knowledge_list.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_worksheets_list.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_optionset_list.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_details.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_discussions.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_list.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_logs.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_pivot_data.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_relations.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_share_link.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_regions.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_role_details.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/get_role_list.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/knowledge_search.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/leave_all_roles.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/remove_member_from_role.yaml +0 -0
- {hap_cli-0.9.12 → hap_cli-0.9.14}/sources/v3-api-schema/update_optionset.yaml +0 -0
|
@@ -21,7 +21,7 @@ from hap_cli.core.session import (
|
|
|
21
21
|
from hap_cli.core import auth as auth_mod
|
|
22
22
|
from hap_cli.core import global_meta as gm
|
|
23
23
|
from hap_cli.utils.formatting import output_json, output_kv
|
|
24
|
-
from hap_cli.i18n import t
|
|
24
|
+
from hap_cli.i18n import lang_from_hap_account, t
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
SERVER_HELP = (
|
|
@@ -85,6 +85,7 @@ def _save_and_report(ctx, token, webui, user_info, meta, profile_name):
|
|
|
85
85
|
session.server_url = webui
|
|
86
86
|
session.auth_token = token
|
|
87
87
|
session.account_id = str(user_info.get("id") or "")
|
|
88
|
+
session.account_lang = lang_from_hap_account(str(user_info.get("lang") or ""))
|
|
88
89
|
session.default_app_id = ""
|
|
89
90
|
session.default_project_id = ""
|
|
90
91
|
session.default_project_name = ""
|
|
@@ -65,6 +65,10 @@ class Context:
|
|
|
65
65
|
if self.session is None:
|
|
66
66
|
self.session = Session.load(self.profile)
|
|
67
67
|
self.session.relogin_notice = _relogin_notice
|
|
68
|
+
# Defaults written into an application follow this account's
|
|
69
|
+
# language, not the display language every profile shares.
|
|
70
|
+
from hap_cli.i18n import set_content_language_resolver
|
|
71
|
+
set_content_language_resolver(self.session.account_language)
|
|
68
72
|
# One-time migration for sessions logged in before account_id
|
|
69
73
|
# was persisted. Some HAP controllers (notably
|
|
70
74
|
# Invitation/InviteUser) silently degrade when the AccountId
|
|
@@ -64,8 +64,12 @@ _DISPLAY_SETUP = {
|
|
|
64
64
|
# render (WO-1) lives in core. This module used to hold its own copy —
|
|
65
65
|
# identical apart from `ignoreToday`, which core now carries too (WO-5).
|
|
66
66
|
from hap_cli.core.chart import DEFAULT_CHART_FILTER as _FILTER
|
|
67
|
+
from hap_cli.core.chart import default_chart_filter
|
|
68
|
+
from hap_cli.i18n import content_default
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
# ``name`` is left empty: saving the chart fills in the total's label in
|
|
71
|
+
# the CLI's language (core.chart._fill_summary_name).
|
|
72
|
+
_SUMMARY = {"controlId": "", "type": 1, "name": "", "number": True,
|
|
69
73
|
"percent": False, "sum": 0, "contrastSum": 0, "contrastMapSum": 0, "rename": ""}
|
|
70
74
|
|
|
71
75
|
_EMPTY_XAXES = {
|
|
@@ -82,7 +86,8 @@ def _yaxis(metric: dict[str, Any], resolve: Callable[[str], dict[str, Any]]) ->
|
|
|
82
86
|
field == 'count' -> the special record-count pseudo column."""
|
|
83
87
|
agg = metric.get("aggregate", "sum")
|
|
84
88
|
if metric["field"] == "count":
|
|
85
|
-
cid, cname, ctype = "record_count", "
|
|
89
|
+
cid, cname, ctype = ("record_count", content_default("chart.recordCount"),
|
|
90
|
+
10000000)
|
|
86
91
|
norm = NORM_TYPE.get(agg, 5)
|
|
87
92
|
else:
|
|
88
93
|
c = resolve(metric["field"])
|
|
@@ -183,7 +188,7 @@ def _right_y(metrics: list[dict[str, Any]], report_type_int: int,
|
|
|
183
188
|
title = ""
|
|
184
189
|
if metrics:
|
|
185
190
|
m0 = metrics[0]
|
|
186
|
-
title = ("
|
|
191
|
+
title = (content_default("chart.recordCount") if m0["field"] == "count"
|
|
187
192
|
else resolve(m0["field"]).get("controlName") or m0["field"])
|
|
188
193
|
return {
|
|
189
194
|
"reportType": report_type_int,
|
|
@@ -238,7 +243,7 @@ def chart_spec(
|
|
|
238
243
|
# ``limit`` on the chart maps straight to it.
|
|
239
244
|
if chart.get("limit") is not None:
|
|
240
245
|
display["showXAxisCount"] = int(chart["limit"])
|
|
241
|
-
filt =
|
|
246
|
+
filt = default_chart_filter()
|
|
242
247
|
if filters:
|
|
243
248
|
filt["filter"] = None # filters supplied via items below
|
|
244
249
|
spec: dict[str, Any] = {
|
|
@@ -250,7 +255,8 @@ def chart_spec(
|
|
|
250
255
|
"filter": filt,
|
|
251
256
|
"sorts": [], "formulas": [], "summary": dict(_SUMMARY), "style": {},
|
|
252
257
|
"split": {}, "splitId": None, "sourceType": 1, "auth": 1, "isPublic": True,
|
|
253
|
-
"views": [{"viewId": view_id, "name": "
|
|
258
|
+
"views": [{"viewId": view_id, "name": content_default("view.all"),
|
|
259
|
+
"viewType": 0}],
|
|
254
260
|
"desc": "",
|
|
255
261
|
}
|
|
256
262
|
if is_pivot:
|
|
@@ -27,6 +27,7 @@ from hap_cli.core.app_creator import hap
|
|
|
27
27
|
from hap_cli.core.app_creator import workflow_dsl as WD
|
|
28
28
|
from hap_cli.core.app_creator.errors import PartialStepFailure, ResolveError
|
|
29
29
|
from hap_cli.core.app_creator.store import Store
|
|
30
|
+
from hap_cli.i18n import DEFAULT_VIEW_NAMES
|
|
30
31
|
|
|
31
32
|
logger = logging.getLogger("hap_app_creator.steps")
|
|
32
33
|
|
|
@@ -822,7 +823,7 @@ def _builtin_all_view_id(wsid: str) -> str:
|
|
|
822
823
|
views = data if isinstance(data, list) else (
|
|
823
824
|
(data or {}).get("views") or (data or {}).get("data") or [])
|
|
824
825
|
for v in views:
|
|
825
|
-
if v.get("name") in
|
|
826
|
+
if v.get("name") in DEFAULT_VIEW_NAMES and v.get("viewType", 0) == 0:
|
|
826
827
|
return v.get("viewId") or v.get("id") or ""
|
|
827
828
|
return ""
|
|
828
829
|
|
|
@@ -1393,7 +1394,7 @@ def _default_view_id(wsid: str) -> str:
|
|
|
1393
1394
|
if not views:
|
|
1394
1395
|
return ""
|
|
1395
1396
|
for v in views:
|
|
1396
|
-
if v.get("name")
|
|
1397
|
+
if v.get("name") in DEFAULT_VIEW_NAMES:
|
|
1397
1398
|
return v.get("viewId") or v.get("id") or ""
|
|
1398
1399
|
return views[0].get("viewId") or views[0].get("id") or ""
|
|
1399
1400
|
|
|
@@ -24,6 +24,8 @@ from __future__ import annotations
|
|
|
24
24
|
import re
|
|
25
25
|
from typing import Any
|
|
26
26
|
|
|
27
|
+
from hap_cli.i18n import DEFAULT_VIEW_NAMES, content_default
|
|
28
|
+
|
|
27
29
|
# Field-ref string convention: "工作表名/字段名". System columns and ids pass
|
|
28
30
|
# through verbatim.
|
|
29
31
|
_SYSTEM_FIELDS = {"rowid", "ownerid", "caid", "ctime", "utime", "uaid"}
|
|
@@ -249,12 +251,20 @@ def _option_object(control: dict[str, Any], value: Any):
|
|
|
249
251
|
return [_one(v) for v in value] if isinstance(value, list) else _one(value)
|
|
250
252
|
|
|
251
253
|
|
|
252
|
-
# Approval-outcome keys (审批结果) for an approval_block result branch
|
|
254
|
+
# Approval-outcome keys (审批结果) for an approval_block result branch:
|
|
255
|
+
# what an author may write (key or Chinese label) → the outcome key.
|
|
253
256
|
_APPROVAL_RESULTS = {
|
|
254
|
-
"PASS": "
|
|
255
|
-
"OVERRULE": "
|
|
256
|
-
"REVOKE": "
|
|
257
|
-
"SUSPEND": "
|
|
257
|
+
"PASS": "PASS", "通过": "PASS",
|
|
258
|
+
"OVERRULE": "OVERRULE", "否决": "OVERRULE",
|
|
259
|
+
"REVOKE": "REVOKE", "撤回": "REVOKE",
|
|
260
|
+
"SUSPEND": "SUSPEND", "中止": "SUSPEND", "已取消": "SUSPEND",
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
# The label stored beside each key and shown in the branch condition; in
|
|
264
|
+
# the CLI's language, as the editor writes it (ticket 47173).
|
|
265
|
+
_APPROVAL_RESULT_LABELS = {
|
|
266
|
+
"PASS": "approval.pass", "OVERRULE": "approval.overrule",
|
|
267
|
+
"REVOKE": "approval.revoke", "SUSPEND": "approval.suspend",
|
|
258
268
|
}
|
|
259
269
|
|
|
260
270
|
|
|
@@ -262,13 +272,12 @@ def _approval_result_object(value: Any):
|
|
|
262
272
|
"""Map an approval outcome (key or label) to the fixed conditionValues
|
|
263
273
|
option object the result-branch wire wants."""
|
|
264
274
|
def _one(v):
|
|
265
|
-
|
|
266
|
-
if
|
|
275
|
+
key = _APPROVAL_RESULTS.get(v)
|
|
276
|
+
if key is None:
|
|
267
277
|
return v
|
|
268
|
-
key
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
"score": None, "index": None}
|
|
278
|
+
return {"key": key,
|
|
279
|
+
"value": content_default(_APPROVAL_RESULT_LABELS[key]),
|
|
280
|
+
"isDeleted": False, "score": None, "index": None}
|
|
272
281
|
return [_one(v) for v in value] if isinstance(value, list) else _one(value)
|
|
273
282
|
|
|
274
283
|
|
|
@@ -292,14 +301,14 @@ def _condition_item(d: dict[str, Any], r: _Resolver) -> dict[str, Any]:
|
|
|
292
301
|
if left_ref == "result":
|
|
293
302
|
new_left = dict(out.get("left") or {})
|
|
294
303
|
new_left["_filedTypeId"] = 11
|
|
295
|
-
new_left["_filedValue"] = "
|
|
304
|
+
new_left["_filedValue"] = content_default("approval.result")
|
|
296
305
|
new_left["_enumDefault"] = 0
|
|
297
306
|
# The source-node metadata the wire expects (审批结果 lives on the
|
|
298
307
|
# approval_block: nodeType 26, appType 10) rides on left.node.
|
|
299
308
|
node_meta = dict(new_left.get("node") or {})
|
|
300
309
|
node_meta["_nodeType"] = 26
|
|
301
310
|
node_meta["_appType"] = 10
|
|
302
|
-
node_meta["_nodeName"] = "
|
|
311
|
+
node_meta["_nodeName"] = content_default("approval.node")
|
|
303
312
|
new_left["node"] = node_meta
|
|
304
313
|
out["left"] = new_left
|
|
305
314
|
right = d.get("right")
|
|
@@ -321,7 +330,7 @@ def _condition_item(d: dict[str, Any], r: _Resolver) -> dict[str, Any]:
|
|
|
321
330
|
type_code = r.formula_types.get(left_node_alias, 6)
|
|
322
331
|
new_left["fieldId"] = _fx_field_for_code(type_code)
|
|
323
332
|
new_left["_filedTypeId"] = type_code
|
|
324
|
-
new_left["_filedValue"] = "
|
|
333
|
+
new_left["_filedValue"] = content_default("formula.result")
|
|
325
334
|
new_left["_enumDefault"] = 0
|
|
326
335
|
node_meta = dict(new_left.get("node") or {})
|
|
327
336
|
node_meta["_nodeType"] = 9
|
|
@@ -546,7 +555,7 @@ def _default_view_id(wsid: str) -> str:
|
|
|
546
555
|
vid = ""
|
|
547
556
|
if isinstance(views, list) and views:
|
|
548
557
|
vid = next((v.get("viewId") or v.get("id") for v in views
|
|
549
|
-
if v.get("name")
|
|
558
|
+
if v.get("name") in DEFAULT_VIEW_NAMES), None) or \
|
|
550
559
|
views[0].get("viewId") or views[0].get("id") or ""
|
|
551
560
|
_VIEW_CACHE[wsid] = vid
|
|
552
561
|
return vid
|
|
@@ -58,7 +58,10 @@ logger = logging.getLogger("hap_cli.chart")
|
|
|
58
58
|
# (any non-empty dict) keep it untouched.
|
|
59
59
|
DEFAULT_CHART_FILTER: dict[str, Any] = {
|
|
60
60
|
"filterRangeId": "ctime",
|
|
61
|
-
|
|
61
|
+
# The label of filterRangeId. The server re-derives it in the account's
|
|
62
|
+
# language on save (measured 2026-10-27: a sent value is not kept);
|
|
63
|
+
# default_chart_filter() still sends one, in the CLI's language.
|
|
64
|
+
"filterRangeName": "",
|
|
62
65
|
"rangeType": 0,
|
|
63
66
|
"rangeValue": None,
|
|
64
67
|
"today": False,
|
|
@@ -114,13 +117,24 @@ _ID_VALUED_CONTROL_TYPES = frozenset({26, 27, 19, 23, 24, 29, 35, 48})
|
|
|
114
117
|
_VALUELESS_FILTER_TYPES = frozenset({7, 8, 41, 42})
|
|
115
118
|
|
|
116
119
|
|
|
120
|
+
def default_chart_filter() -> dict[str, Any]:
|
|
121
|
+
"""A fresh copy of DEFAULT_CHART_FILTER, its range labelled in the
|
|
122
|
+
account's language rather than always in Chinese."""
|
|
123
|
+
from hap_cli.i18n import content_default
|
|
124
|
+
|
|
125
|
+
filter_block = dict(DEFAULT_CHART_FILTER)
|
|
126
|
+
filter_block["dynamicFilter"] = dict(DEFAULT_CHART_FILTER["dynamicFilter"])
|
|
127
|
+
filter_block["filterRangeName"] = content_default("chart.createdTime")
|
|
128
|
+
return filter_block
|
|
129
|
+
|
|
130
|
+
|
|
117
131
|
def _summary_label(summary_type: Any) -> str:
|
|
118
132
|
entry = _SUMMARY_TYPE_NAMES.get(summary_type)
|
|
119
133
|
if not entry:
|
|
120
134
|
return ""
|
|
121
|
-
from hap_cli.i18n import
|
|
135
|
+
from hap_cli.i18n import content_language
|
|
122
136
|
|
|
123
|
-
return entry.get(
|
|
137
|
+
return entry.get(content_language()) or entry["en"]
|
|
124
138
|
|
|
125
139
|
|
|
126
140
|
def _fill_summary_name(block: Any) -> None:
|
|
@@ -502,7 +516,7 @@ def save_chart(
|
|
|
502
516
|
# caller is expected to carry the current filter forward (which
|
|
503
517
|
# :func:`update_chart` does by reading it back).
|
|
504
518
|
if not body.get("filter") and not report_id:
|
|
505
|
-
body["filter"] =
|
|
519
|
+
body["filter"] = default_chart_filter()
|
|
506
520
|
# A chart made from inside a view is scoped to it, so it counts the
|
|
507
521
|
# rows that view shows rather than the whole worksheet (MDPublic
|
|
508
522
|
# src/pages/Statistics/redux/actions.js:74-76). An explicit viewId in
|
|
@@ -438,7 +438,13 @@ def as_text(source: Optional[dict[str, Any]], value: Any,
|
|
|
438
438
|
return ""
|
|
439
439
|
named = " ".join(p for p in (spot.get("title"), spot.get("address"))
|
|
440
440
|
if p)
|
|
441
|
-
|
|
441
|
+
if named:
|
|
442
|
+
return named
|
|
443
|
+
from hap_cli.i18n import content_default
|
|
444
|
+
return " ".join(
|
|
445
|
+
content_default(key).replace("%0", str(spot.get(axis)))
|
|
446
|
+
for key, axis in (("location.longitude", "x"),
|
|
447
|
+
("location.latitude", "y")))
|
|
442
448
|
if kind == 46:
|
|
443
449
|
when = str(value)
|
|
444
450
|
return when[:8] if source.get("unit") == "6" else when[:5]
|
|
@@ -199,6 +199,10 @@ def _apply_login(session: Any, token: str, meta: dict, user_info: dict) -> None:
|
|
|
199
199
|
session.auth_token = token
|
|
200
200
|
if new_account:
|
|
201
201
|
session.account_id = new_account
|
|
202
|
+
if user_info.get("lang"):
|
|
203
|
+
from hap_cli.i18n import lang_from_hap_account
|
|
204
|
+
|
|
205
|
+
session.account_lang = lang_from_hap_account(str(user_info["lang"]))
|
|
202
206
|
endpoints = gm.extract_service_endpoints(meta)
|
|
203
207
|
if endpoints:
|
|
204
208
|
session.service_endpoints = endpoints
|
|
@@ -267,6 +267,10 @@ class Session:
|
|
|
267
267
|
# Cached routing table from Global/GetGlobalMeta. See DEFAULT_CONFIG.
|
|
268
268
|
self.service_endpoints: dict[str, Any] = {}
|
|
269
269
|
self._global_meta_cache: Optional[dict[str, Any]] = None
|
|
270
|
+
# The account's own language (a CLI language code), saved per
|
|
271
|
+
# profile at login. Defaults written into an application use it;
|
|
272
|
+
# see hap_cli.i18n.content_language.
|
|
273
|
+
self.account_lang = ""
|
|
270
274
|
# Which named profile this session loads from / saves back to.
|
|
271
275
|
# Empty until load()/save() binds it.
|
|
272
276
|
self._profile_name: str = ""
|
|
@@ -966,6 +970,33 @@ class Session:
|
|
|
966
970
|
except Exception as exc:
|
|
967
971
|
logger.debug("Failed to backfill account_id lazily: %s", exc)
|
|
968
972
|
|
|
973
|
+
def account_language(self) -> str:
|
|
974
|
+
"""The language of the account this session writes as.
|
|
975
|
+
|
|
976
|
+
Profiles saved before it was recorded learn it from the account
|
|
977
|
+
once and keep it. Empty when the account cannot be read.
|
|
978
|
+
"""
|
|
979
|
+
if self.account_lang:
|
|
980
|
+
return self.account_lang
|
|
981
|
+
try:
|
|
982
|
+
meta = self.get_global_meta()
|
|
983
|
+
account = (meta.get("md.global") or {}).get("Account") or {}
|
|
984
|
+
except Exception as exc:
|
|
985
|
+
logger.warning("Could not read the account language: %s", exc)
|
|
986
|
+
return ""
|
|
987
|
+
if not account:
|
|
988
|
+
return ""
|
|
989
|
+
from hap_cli.i18n import lang_from_hap_account
|
|
990
|
+
|
|
991
|
+
self.account_lang = lang_from_hap_account(str(account.get("lang") or ""))
|
|
992
|
+
if self._profile_name:
|
|
993
|
+
try:
|
|
994
|
+
save_profile(self._profile_name,
|
|
995
|
+
{"account_lang": self.account_lang})
|
|
996
|
+
except Exception as exc:
|
|
997
|
+
logger.warning("Could not save the account language: %s", exc)
|
|
998
|
+
return self.account_lang
|
|
999
|
+
|
|
969
1000
|
def get_global_meta(self, refresh: bool = False) -> dict[str, Any]:
|
|
970
1001
|
"""Return cached Global/GetGlobalMeta data for service routing."""
|
|
971
1002
|
if refresh or self._global_meta_cache is None:
|
|
@@ -1052,6 +1083,7 @@ class Session:
|
|
|
1052
1083
|
auth_token=auth_token,
|
|
1053
1084
|
)
|
|
1054
1085
|
session.account_id = config.get("account_id", "")
|
|
1086
|
+
session.account_lang = config.get("account_lang", "")
|
|
1055
1087
|
session.default_app_id = config.get("default_app_id", "")
|
|
1056
1088
|
# Read new keys, fall back to legacy ``default_project_id`` /
|
|
1057
1089
|
# ``default_project_name`` so configs written before the rename
|
|
@@ -1085,6 +1117,7 @@ class Session:
|
|
|
1085
1117
|
"login_url": self._login_url,
|
|
1086
1118
|
"auth_token": encrypted,
|
|
1087
1119
|
"account_id": self.account_id,
|
|
1120
|
+
"account_lang": self.account_lang,
|
|
1088
1121
|
"default_app_id": self.default_app_id,
|
|
1089
1122
|
"default_org_id": self.default_project_id,
|
|
1090
1123
|
"default_org_name": self.default_project_name,
|
|
@@ -1174,6 +1207,7 @@ PROFILE_FIELDS = (
|
|
|
1174
1207
|
"login_url",
|
|
1175
1208
|
"auth_token",
|
|
1176
1209
|
"account_id",
|
|
1210
|
+
"account_lang",
|
|
1177
1211
|
"default_app_id",
|
|
1178
1212
|
"default_org_id",
|
|
1179
1213
|
"default_org_name",
|
|
@@ -29,6 +29,8 @@ import logging
|
|
|
29
29
|
import re
|
|
30
30
|
from typing import Any, Callable, Optional
|
|
31
31
|
|
|
32
|
+
from hap_cli.i18n import content_default
|
|
33
|
+
|
|
32
34
|
logger = logging.getLogger("hap_cli.workflow.node_dsl")
|
|
33
35
|
|
|
34
36
|
|
|
@@ -506,9 +508,10 @@ def _condition_value_entries(
|
|
|
506
508
|
"actionId": "",
|
|
507
509
|
"appType": 100,
|
|
508
510
|
"controlId": sys_field,
|
|
509
|
-
"controlName": _SYSTEM_VALUE_NAMES.get(
|
|
511
|
+
"controlName": content_default(_SYSTEM_VALUE_NAMES.get(
|
|
512
|
+
sys_field, "workflow.system.nowTime")),
|
|
510
513
|
"nodeId": SYSTEM_NODE_ID,
|
|
511
|
-
"nodeName": "
|
|
514
|
+
"nodeName": content_default("workflow.system"),
|
|
512
515
|
"nodeType": 100,
|
|
513
516
|
"sourceType": 0,
|
|
514
517
|
}]
|
|
@@ -1156,13 +1159,15 @@ def translate_accounts(
|
|
|
1156
1159
|
# node (default the trigger) with the special "uaid" roleId.
|
|
1157
1160
|
node_id = _resolve_node_id(acc.get("node") or {"nodeAlias": "trigger"}, a2i)
|
|
1158
1161
|
out.append({"type": 6, "entityId": node_id, "entityName": "",
|
|
1159
|
-
"roleId": "uaid", "roleTypeId": 0,
|
|
1162
|
+
"roleId": "uaid", "roleTypeId": 0,
|
|
1163
|
+
"roleName": content_default("workflow.system.trigger"),
|
|
1160
1164
|
"controlType": 26})
|
|
1161
1165
|
elif kind == "supervisor":
|
|
1162
1166
|
# Direct supervisor of the trigger user (roleTypeId 11).
|
|
1163
1167
|
node_id = _resolve_node_id(acc.get("node") or {"nodeAlias": "trigger"}, a2i)
|
|
1164
1168
|
out.append({"type": 6, "entityId": node_id, "entityName": "",
|
|
1165
|
-
"roleId": "uaid", "roleTypeId": 11,
|
|
1169
|
+
"roleId": "uaid", "roleTypeId": 11,
|
|
1170
|
+
"roleName": content_default("workflow.system.trigger"),
|
|
1166
1171
|
"controlType": 26})
|
|
1167
1172
|
elif kind == "field":
|
|
1168
1173
|
# Recipient = a member/dept/email FIELD on a record. Ground truth
|
|
@@ -1321,10 +1326,36 @@ def configure_worksheet_trigger(
|
|
|
1321
1326
|
}
|
|
1322
1327
|
return _fn.save_node(
|
|
1323
1328
|
session, process_id, trigger_node_id, 0, config,
|
|
1324
|
-
name="
|
|
1329
|
+
name=_trigger_name(session, process_id, trigger_node_id, "worksheet"),
|
|
1325
1330
|
)
|
|
1326
1331
|
|
|
1327
1332
|
|
|
1333
|
+
def _trigger_name(session, process_id: str, trigger_node_id: str,
|
|
1334
|
+
kind: str) -> str:
|
|
1335
|
+
"""The name to save a trigger under: the one it already has.
|
|
1336
|
+
|
|
1337
|
+
saveNode stores whatever ``name`` it is sent and blanks the node when
|
|
1338
|
+
there is none (measured live 2026-10-27), and the editor always sends
|
|
1339
|
+
the node's current name back (MDPublic WorkflowSettings/Detail/Start/
|
|
1340
|
+
index.jsx:277). The server names a new trigger in the account's
|
|
1341
|
+
language, so writing a fixed Chinese name here turned it Chinese in
|
|
1342
|
+
English workspaces (ticket 47173) and undid any rename.
|
|
1343
|
+
"""
|
|
1344
|
+
from hap_cli.core import flow_node as _fn
|
|
1345
|
+
try:
|
|
1346
|
+
detail = _fn.get_node_detail(session, process_id, trigger_node_id,
|
|
1347
|
+
flow_node_type=0) or {}
|
|
1348
|
+
if isinstance(detail, dict) and isinstance(detail.get("data"), dict):
|
|
1349
|
+
detail = detail["data"]
|
|
1350
|
+
name = (detail.get("name") or "").strip() if isinstance(detail, dict) else ""
|
|
1351
|
+
if name:
|
|
1352
|
+
return name
|
|
1353
|
+
except Exception as exc: # noqa: BLE001
|
|
1354
|
+
logger.warning("could not read the name of the trigger of %s; "
|
|
1355
|
+
"saving it under the default name: %s", process_id, exc)
|
|
1356
|
+
return content_default(f"workflow.trigger.{kind}")
|
|
1357
|
+
|
|
1358
|
+
|
|
1328
1359
|
def _stored_trigger_config(session, process_id: str,
|
|
1329
1360
|
trigger_node_id: str) -> dict[str, Any]:
|
|
1330
1361
|
"""What the trigger already carries, for the keys this call may keep.
|
|
@@ -1387,7 +1418,6 @@ def configure_scheduled_trigger(
|
|
|
1387
1418
|
frequency = 2 if repeat_type == 5 else repeat_type # workday → weekly
|
|
1388
1419
|
cfg = {
|
|
1389
1420
|
"appType": 5,
|
|
1390
|
-
"name": "定时触发",
|
|
1391
1421
|
"executeTime": start_time,
|
|
1392
1422
|
"executeEndTime": end_time,
|
|
1393
1423
|
"repeatType": repeat_type,
|
|
@@ -1400,7 +1430,8 @@ def configure_scheduled_trigger(
|
|
|
1400
1430
|
"returns": [],
|
|
1401
1431
|
}
|
|
1402
1432
|
return _fn.save_node(
|
|
1403
|
-
session, process_id, trigger_node_id, 0, cfg,
|
|
1433
|
+
session, process_id, trigger_node_id, 0, cfg,
|
|
1434
|
+
name=_trigger_name(session, process_id, trigger_node_id, "scheduled"),
|
|
1404
1435
|
)
|
|
1405
1436
|
|
|
1406
1437
|
|
|
@@ -1444,12 +1475,12 @@ def configure_date_trigger(
|
|
|
1444
1475
|
"frequency": _DATE_REPEAT.get(repeat, 0),
|
|
1445
1476
|
"operateCondition": [],
|
|
1446
1477
|
"triggerId": "2",
|
|
1447
|
-
"name": "按日期字段触发",
|
|
1448
1478
|
"controls": [],
|
|
1449
1479
|
"returns": [],
|
|
1450
1480
|
}
|
|
1451
1481
|
return _fn.save_node(
|
|
1452
|
-
session, process_id, trigger_node_id, 0, cfg,
|
|
1482
|
+
session, process_id, trigger_node_id, 0, cfg,
|
|
1483
|
+
name=_trigger_name(session, process_id, trigger_node_id, "date"),
|
|
1453
1484
|
)
|
|
1454
1485
|
|
|
1455
1486
|
|
|
@@ -1545,7 +1576,8 @@ def configure_pbp_trigger(
|
|
|
1545
1576
|
"returns": [],
|
|
1546
1577
|
}
|
|
1547
1578
|
return _fn.save_node(
|
|
1548
|
-
session, process_id, trigger_node_id, 0, cfg,
|
|
1579
|
+
session, process_id, trigger_node_id, 0, cfg,
|
|
1580
|
+
name=_trigger_name(session, process_id, trigger_node_id, "pbp"),
|
|
1549
1581
|
)
|
|
1550
1582
|
|
|
1551
1583
|
|
|
@@ -1662,13 +1694,17 @@ def configure_webhook_trigger(
|
|
|
1662
1694
|
detail = detail.get("data", detail)
|
|
1663
1695
|
return detail.get("controls", []) if isinstance(detail, dict) else []
|
|
1664
1696
|
|
|
1697
|
+
# Read once: every save below must carry the trigger's own name.
|
|
1698
|
+
trigger_name = _trigger_name(session, process_id, trigger_node_id,
|
|
1699
|
+
"webhook")
|
|
1700
|
+
|
|
1665
1701
|
def _save(controls: list[dict[str, Any]]) -> None:
|
|
1666
1702
|
_fn.save_node(
|
|
1667
1703
|
session, process_id, trigger_node_id, 0,
|
|
1668
1704
|
{"appType": 7, "assignFieldIds": [], "operateCondition": [],
|
|
1669
1705
|
"isUpdate": False, "controls": controls, "returnJson": "",
|
|
1670
1706
|
"returns": [], "hooksBody": False},
|
|
1671
|
-
name=
|
|
1707
|
+
name=trigger_name,
|
|
1672
1708
|
)
|
|
1673
1709
|
|
|
1674
1710
|
hook_url = get_webhook_url(session, process_id, trigger_node_id)
|
|
@@ -4387,9 +4423,14 @@ _SYSTEM_VALUE_FIELDS = {
|
|
|
4387
4423
|
}
|
|
4388
4424
|
|
|
4389
4425
|
# 系统 node field id → its display name (controlName on a conditionValues entry).
|
|
4426
|
+
# Written into the step and shown in the editor, so it is localised
|
|
4427
|
+
# (hap_cli.i18n.CONTENT_DEFAULTS).
|
|
4390
4428
|
_SYSTEM_VALUE_NAMES = {
|
|
4391
|
-
"nowTime": "
|
|
4392
|
-
"
|
|
4429
|
+
"nowTime": "workflow.system.nowTime",
|
|
4430
|
+
"triggertime": "workflow.system.triggerTime",
|
|
4431
|
+
"triggeraid": "workflow.system.trigger",
|
|
4432
|
+
"timestamp": "workflow.system.timestamp",
|
|
4433
|
+
"timestampSeconds": "workflow.system.timestamp",
|
|
4393
4434
|
}
|
|
4394
4435
|
|
|
4395
4436
|
|
|
@@ -4808,7 +4849,8 @@ def _save_approval_block(session, process_id, node, prev_id, parent_id,
|
|
|
4808
4849
|
|
|
4809
4850
|
extra = {"parentId": parent_id} if parent_id else None
|
|
4810
4851
|
add_resp = _fn.add_node(session, process_id, 26, prev_id,
|
|
4811
|
-
name=node.get("name"
|
|
4852
|
+
name=node.get("name") or content_default(
|
|
4853
|
+
"workflow.unnamedApproval"),
|
|
4812
4854
|
app_type=10, extra=extra)
|
|
4813
4855
|
apr = _added_nodes(add_resp)
|
|
4814
4856
|
apr_node = apr[0] if apr else {}
|
|
@@ -21,6 +21,8 @@ import json
|
|
|
21
21
|
import uuid
|
|
22
22
|
from typing import Any, Iterable, Optional
|
|
23
23
|
|
|
24
|
+
from hap_cli.i18n import content_default
|
|
25
|
+
|
|
24
26
|
# ── Field type enum (mirror of pd-openweb WIDGETS_TO_API_TYPE_ENUM) ──────
|
|
25
27
|
|
|
26
28
|
TYPE = {
|
|
@@ -121,21 +123,20 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
121
123
|
"advancedSetting": {"analysislink": "1", "sorttype": "en"},
|
|
122
124
|
},
|
|
123
125
|
"MOBILE_PHONE": {
|
|
124
|
-
"size": 6,
|
|
126
|
+
"size": 6,
|
|
125
127
|
# The product seeds a 13-country shortlist for the picker; it has no
|
|
126
128
|
# `defaultarea` key.
|
|
127
129
|
"enumDefault": 0,
|
|
128
130
|
"advancedSetting": {"commcountries": '[{"name":"China (中国)","iso2":"cn","dialCode":"86"},{"name":"Hong Kong (香港)","iso2":"hk","dialCode":"852"},{"name":"Taiwan (台灣)","iso2":"tw","dialCode":"886"},{"name":"Macau (澳門)","iso2":"mo","dialCode":"853"},{"name":"Singapore","iso2":"sg","dialCode":"65"},{"name":"Malaysia","iso2":"my","dialCode":"60"},{"name":"Japan (日本)","iso2":"jp","dialCode":"81"},{"name":"South Korea (대한민국)","iso2":"kr","dialCode":"82"},{"name":"United States","iso2":"us","dialCode":"1"},{"name":"United Kingdom","iso2":"gb","dialCode":"44"},{"name":"France","iso2":"fr","dialCode":"33"},{"name":"Germany (Deutschland)","iso2":"de","dialCode":"49"},{"name":"Russia (Россия)","iso2":"ru","dialCode":"7"}]'},
|
|
129
131
|
},
|
|
130
|
-
"TELEPHONE": {"size": 6
|
|
131
|
-
"EMAIL": {"size": 6
|
|
132
|
+
"TELEPHONE": {"size": 6},
|
|
133
|
+
"EMAIL": {"size": 6},
|
|
132
134
|
"NUMBER": {
|
|
133
|
-
"size": 6, "dot": 0,
|
|
135
|
+
"size": 6, "dot": 0,
|
|
134
136
|
"advancedSetting": {"showtype": "0", "roundtype": "2", "thousandth": "0"},
|
|
135
137
|
},
|
|
136
138
|
"MONEY": {
|
|
137
139
|
"size": 6, "dot": 2, "enumDefault": 0, "enumDefault2": 2,
|
|
138
|
-
"hint": "请填写金额",
|
|
139
140
|
"advancedSetting": {
|
|
140
141
|
"currency": '{"currencycode":"CNY","symbol":"¥"}',
|
|
141
142
|
"roundtype": "2", "showformat": "1",
|
|
@@ -149,11 +150,11 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
149
150
|
},
|
|
150
151
|
},
|
|
151
152
|
"DROP_DOWN": {
|
|
152
|
-
"size": 6, "enumDefault2": 0,
|
|
153
|
+
"size": 6, "enumDefault2": 0,
|
|
153
154
|
"advancedSetting": {"showtype": "0"},
|
|
154
155
|
},
|
|
155
156
|
"ATTACHMENT": {
|
|
156
|
-
"size": 12, "enumDefault": 3,
|
|
157
|
+
"size": 12, "enumDefault": 3,
|
|
157
158
|
"advancedSetting": {
|
|
158
159
|
"showtype": "1", "covertype": "0", "alldownload": "1",
|
|
159
160
|
"webcompress": "1", "allowupload": "1", "allowdelete": "1",
|
|
@@ -161,11 +162,11 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
161
162
|
},
|
|
162
163
|
},
|
|
163
164
|
"DATE": {
|
|
164
|
-
"size": 6,
|
|
165
|
+
"size": 6,
|
|
165
166
|
"advancedSetting": {"showtype": "3", "allowtime": ""},
|
|
166
167
|
},
|
|
167
168
|
"DATE_TIME": {
|
|
168
|
-
"size": 6,
|
|
169
|
+
"size": 6,
|
|
169
170
|
"advancedSetting": {"showtype": "1"},
|
|
170
171
|
},
|
|
171
172
|
"AREA_PROVINCE": {"size": 6, "enumDefault": 0},
|
|
@@ -176,7 +177,7 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
176
177
|
},
|
|
177
178
|
"USER_PICKER": {
|
|
178
179
|
"size": 6, "enumDefault": 0, "enumDefault2": 0, "userPermission": 1,
|
|
179
|
-
"noticeItem": 0,
|
|
180
|
+
"noticeItem": 0,
|
|
180
181
|
"advancedSetting": {"checkusertype": "1", "usertype": "1"},
|
|
181
182
|
},
|
|
182
183
|
# userPermission 0 = "无" (store data only). MDPublic ae228624ca4
|
|
@@ -286,11 +287,10 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
286
287
|
"OCR": {"size": 6},
|
|
287
288
|
"EMBED": {
|
|
288
289
|
"size": 12, "enumDefault": 1,
|
|
289
|
-
"hint": "编辑状态下不支持查看",
|
|
290
290
|
"advancedSetting": {"height": "400"},
|
|
291
291
|
},
|
|
292
292
|
"SEARCH_BTN": {
|
|
293
|
-
"size": 6, "enumDefault": 0, "enumDefault2": 0,
|
|
293
|
+
"size": 6, "enumDefault": 0, "enumDefault2": 0,
|
|
294
294
|
},
|
|
295
295
|
"SEARCH": {"size": 6},
|
|
296
296
|
"RELATION_SEARCH": {
|
|
@@ -307,7 +307,7 @@ _DEFAULTS: dict[str, dict[str, Any]] = {
|
|
|
307
307
|
},
|
|
308
308
|
"RELATION": {"size": 12, "enumDefault": 0},
|
|
309
309
|
"MONEY_CN": {"size": 6},
|
|
310
|
-
"CRED": {"size": 6, "enumDefault": 1
|
|
310
|
+
"CRED": {"size": 6, "enumDefault": 1},
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
|
|
@@ -326,6 +326,28 @@ _USES_SOURCE_CONTROL = frozenset({
|
|
|
326
326
|
})
|
|
327
327
|
|
|
328
328
|
|
|
329
|
+
# Placeholder text the product gives a new field (DEFAULT_DATA, MDPublic
|
|
330
|
+
# src/utils/domain/control/widget.js), written through ``_l()`` so it is
|
|
331
|
+
# in the editor's language. Kept out of _DEFAULTS and localised per build
|
|
332
|
+
# (hap_cli.i18n.CONTENT_DEFAULTS): a Chinese literal showed as Chinese
|
|
333
|
+
# placeholder text in English workspaces (ticket 47173).
|
|
334
|
+
_HINT_KEYS: dict[str, str] = {
|
|
335
|
+
"MOBILE_PHONE": "field.hint.mobilePhone",
|
|
336
|
+
"TELEPHONE": "field.hint.telephone",
|
|
337
|
+
"EMAIL": "field.hint.email",
|
|
338
|
+
"NUMBER": "field.hint.number",
|
|
339
|
+
"MONEY": "field.hint.money",
|
|
340
|
+
"DROP_DOWN": "field.hint.select",
|
|
341
|
+
"ATTACHMENT": "field.hint.attachment",
|
|
342
|
+
"DATE": "field.hint.date",
|
|
343
|
+
"DATE_TIME": "field.hint.date",
|
|
344
|
+
"USER_PICKER": "field.hint.member",
|
|
345
|
+
"EMBED": "field.hint.embed",
|
|
346
|
+
"SEARCH_BTN": "field.hint.searchButton",
|
|
347
|
+
"CRED": "field.hint.idCard",
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
329
351
|
def build_control(
|
|
330
352
|
field_type: str | int,
|
|
331
353
|
name: str,
|
|
@@ -444,6 +466,8 @@ def build_control(
|
|
|
444
466
|
if k == "advancedSetting":
|
|
445
467
|
continue
|
|
446
468
|
ctrl.setdefault(k, v)
|
|
469
|
+
if type_name in _HINT_KEYS:
|
|
470
|
+
ctrl["hint"] = content_default(_HINT_KEYS[type_name])
|
|
447
471
|
# advancedSetting merge
|
|
448
472
|
adv = dict(defaults.get("advancedSetting", {}))
|
|
449
473
|
if advanced_setting:
|