hap-cli 0.9.18__tar.gz → 0.9.20__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.
Files changed (270) hide show
  1. {hap_cli-0.9.18 → hap_cli-0.9.20}/PKG-INFO +8 -5
  2. {hap_cli-0.9.18/hap_cli → hap_cli-0.9.20}/README.md +7 -4
  3. {hap_cli-0.9.18 → hap_cli-0.9.20/hap_cli}/README.md +7 -4
  4. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/README_CN.md +7 -4
  5. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/__init__.py +1 -1
  6. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/v3_registry.py +386 -5
  7. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/worksheet_cmd.py +6 -4
  8. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/filter_v3.py +63 -0
  9. hap_cli-0.9.20/hap_cli/core/print_template.py +42 -0
  10. hap_cli-0.9.20/hap_cli/core/rule_spec_adapter.py +309 -0
  11. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/session.py +11 -1
  12. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/v3/dispatcher.py +87 -10
  13. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/v3/schema.py +2 -0
  14. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/worksheet.py +51 -1
  15. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/worksheet.md +25 -5
  16. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/worksheet.md +24 -4
  17. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/locale/messages.json +1349 -73
  18. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/PKG-INFO +8 -5
  19. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/SOURCES.txt +55 -1
  20. hap_cli-0.9.20/sources/v3-api-schema/INDEX.json +845 -0
  21. hap_cli-0.9.20/sources/v3-api-schema/create_app_backup.yaml +38 -0
  22. hap_cli-0.9.20/sources/v3-api-schema/create_print_template.yaml +135 -0
  23. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/create_role.yaml +7 -0
  24. hap_cli-0.9.20/sources/v3-api-schema/create_worksheet_index.yaml +69 -0
  25. hap_cli-0.9.20/sources/v3-api-schema/delete_app_backup.yaml +23 -0
  26. hap_cli-0.9.20/sources/v3-api-schema/delete_print_template.yaml +30 -0
  27. hap_cli-0.9.20/sources/v3-api-schema/delete_worksheet_filter.yaml +30 -0
  28. hap_cli-0.9.20/sources/v3-api-schema/delete_worksheet_index.yaml +30 -0
  29. hap_cli-0.9.20/sources/v3-api-schema/get_app_ai_models.yaml +18 -0
  30. hap_cli-0.9.20/sources/v3-api-schema/get_app_backup_download_url.yaml +23 -0
  31. hap_cli-0.9.20/sources/v3-api-schema/get_app_backup_list.yaml +33 -0
  32. hap_cli-0.9.20/sources/v3-api-schema/get_app_restore_status.yaml +23 -0
  33. hap_cli-0.9.20/sources/v3-api-schema/get_approval_list_by_row.yaml +45 -0
  34. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_component.yaml +36 -0
  35. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_settings.yaml +25 -0
  36. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_structure.yaml +50 -0
  37. hap_cli-0.9.20/sources/v3-api-schema/get_portal_config.yaml +56 -0
  38. hap_cli-0.9.20/sources/v3-api-schema/get_portal_status.yaml +23 -0
  39. hap_cli-0.9.20/sources/v3-api-schema/get_print_template_details.yaml +30 -0
  40. hap_cli-0.9.20/sources/v3-api-schema/get_print_template_list.yaml +25 -0
  41. hap_cli-0.9.20/sources/v3-api-schema/get_public_form_config.yaml +25 -0
  42. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_role_list.yaml +10 -0
  43. hap_cli-0.9.20/sources/v3-api-schema/get_share_card_setting.yaml +33 -0
  44. hap_cli-0.9.20/sources/v3-api-schema/get_sms_signatures.yaml +18 -0
  45. hap_cli-0.9.20/sources/v3-api-schema/get_user_details.yaml +31 -0
  46. hap_cli-0.9.20/sources/v3-api-schema/get_workflow_sms_templates.yaml +64 -0
  47. hap_cli-0.9.20/sources/v3-api-schema/get_workflow_variables.yaml +33 -0
  48. hap_cli-0.9.20/sources/v3-api-schema/get_worksheet_index_list.yaml +25 -0
  49. hap_cli-0.9.20/sources/v3-api-schema/move_chart.yaml +61 -0
  50. hap_cli-0.9.20/sources/v3-api-schema/patch_custom_page_components.yaml +4183 -0
  51. hap_cli-0.9.20/sources/v3-api-schema/patch_portal_config.yaml +389 -0
  52. hap_cli-0.9.20/sources/v3-api-schema/refresh_public_form_url.yaml +23 -0
  53. hap_cli-0.9.20/sources/v3-api-schema/rename_app_backup.yaml +35 -0
  54. hap_cli-0.9.20/sources/v3-api-schema/rename_worksheet_index.yaml +44 -0
  55. hap_cli-0.9.20/sources/v3-api-schema/replace_print_template_file.yaml +78 -0
  56. hap_cli-0.9.20/sources/v3-api-schema/reset_public_form_fields.yaml +23 -0
  57. hap_cli-0.9.20/sources/v3-api-schema/restore_app_backup.yaml +48 -0
  58. hap_cli-0.9.20/sources/v3-api-schema/save_worksheet_filter.yaml +229 -0
  59. hap_cli-0.9.20/sources/v3-api-schema/sort_charts.yaml +35 -0
  60. hap_cli-0.9.20/sources/v3-api-schema/sort_roles.yaml +32 -0
  61. hap_cli-0.9.20/sources/v3-api-schema/switch_portal.yaml +30 -0
  62. hap_cli-0.9.20/sources/v3-api-schema/switch_public_form.yaml +33 -0
  63. hap_cli-0.9.20/sources/v3-api-schema/update_app_maintenance.yaml +36 -0
  64. hap_cli-0.9.20/sources/v3-api-schema/update_chart_owner.yaml +44 -0
  65. hap_cli-0.9.20/sources/v3-api-schema/update_custom_page_config.yaml +69 -0
  66. hap_cli-0.9.20/sources/v3-api-schema/update_custom_page_settings.yaml +289 -0
  67. hap_cli-0.9.20/sources/v3-api-schema/update_portal_config.yaml +280 -0
  68. hap_cli-0.9.20/sources/v3-api-schema/update_print_template.yaml +79 -0
  69. hap_cli-0.9.20/sources/v3-api-schema/update_public_form.yaml +101 -0
  70. hap_cli-0.9.20/sources/v3-api-schema/update_public_form_settings.yaml +379 -0
  71. hap_cli-0.9.20/sources/v3-api-schema/update_role.yaml +395 -0
  72. hap_cli-0.9.20/sources/v3-api-schema/update_share_card_setting.yaml +52 -0
  73. hap_cli-0.9.20/sources/v3-api-schema/update_workflow_variables.yaml +124 -0
  74. hap_cli-0.9.20/sources/v3-api-schema/update_worksheet_index.yaml +73 -0
  75. hap_cli-0.9.20/sources/v3-api-schema/validate_process.yaml +24 -0
  76. hap_cli-0.9.18/hap_cli/core/rule_spec_adapter.py +0 -116
  77. hap_cli-0.9.18/sources/v3-api-schema/INDEX.json +0 -262
  78. {hap_cli-0.9.18 → hap_cli-0.9.20}/MANIFEST.in +0 -0
  79. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/__main__.py +0 -0
  80. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/_entry.py +0 -0
  81. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/__init__.py +0 -0
  82. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/app_cmd.py +0 -0
  83. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/app_creator_cmd.py +0 -0
  84. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/app_editor_cmd.py +0 -0
  85. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/attachment_cmd.py +0 -0
  86. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/auth_cmd.py +0 -0
  87. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/calendar_cmd.py +0 -0
  88. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/chart_cmd.py +0 -0
  89. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/chat_cmd.py +0 -0
  90. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/chatbot_cmd.py +0 -0
  91. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/config_cmd.py +0 -0
  92. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/contact_cmd.py +0 -0
  93. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/department_cmd.py +0 -0
  94. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/group_cmd.py +0 -0
  95. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/guide_cmd.py +0 -0
  96. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/icon_cmd.py +0 -0
  97. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/instance_cmd.py +0 -0
  98. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/node_cmd.py +0 -0
  99. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/optionset_cmd.py +0 -0
  100. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/page_cmd.py +0 -0
  101. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/post_cmd.py +0 -0
  102. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/record_cmd.py +0 -0
  103. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/region_cmd.py +0 -0
  104. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/role_cmd.py +0 -0
  105. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/update_cmd.py +0 -0
  106. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/upload_cmd.py +0 -0
  107. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/commands/workflow_cmd.py +0 -0
  108. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/context.py +0 -0
  109. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/__init__.py +0 -0
  110. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/action_spec_adapter.py +0 -0
  111. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app.py +0 -0
  112. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/__init__.py +0 -0
  113. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/__init__.py +0 -0
  114. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/control_type_codes.py +0 -0
  115. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/worksheet_templates.py +0 -0
  116. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/charts.py +0 -0
  117. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/cleanup.py +0 -0
  118. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/compiler.py +0 -0
  119. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/config.py +0 -0
  120. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/design/design.schema.json +0 -0
  121. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/errors.py +0 -0
  122. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/examples/minimal.design.json +0 -0
  123. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/executor.py +0 -0
  124. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/fields.py +0 -0
  125. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/hap.py +0 -0
  126. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/merge.py +0 -0
  127. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/__init__.py +0 -0
  128. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/console.py +0 -0
  129. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/jsonl.py +0 -0
  130. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/mirror.py +0 -0
  131. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/report.py +0 -0
  132. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/schema.py +0 -0
  133. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/INSTRUCTIONS.md +0 -0
  134. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/__init__.py +0 -0
  135. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/cli.py +0 -0
  136. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/executor.py +0 -0
  137. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/attachments.json +0 -0
  138. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample.docx +0 -0
  139. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample.pdf +0 -0
  140. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample_images.json +0 -0
  141. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/template.py +0 -0
  142. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/selftest.py +0 -0
  143. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/smoke.py +0 -0
  144. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/steps.py +0 -0
  145. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/store.py +0 -0
  146. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/validate.py +0 -0
  147. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/app_creator/workflow_dsl.py +0 -0
  148. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/attachment.py +0 -0
  149. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/auth.py +0 -0
  150. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/calendar_mod.py +0 -0
  151. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/chart.py +0 -0
  152. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/chat.py +0 -0
  153. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/chatbot.py +0 -0
  154. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/cli_access.py +0 -0
  155. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/condition_dsl.py +0 -0
  156. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/contact.py +0 -0
  157. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/control_type_codes.py +0 -0
  158. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/department.py +0 -0
  159. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/__init__.py +0 -0
  160. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/_hapmeta/__init__.py +0 -0
  161. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/_hapmeta/control_type_codes.py +0 -0
  162. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/apply.py +0 -0
  163. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/componentlower.py +0 -0
  164. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/component.schema.json +0 -0
  165. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/custom-action.schema.json +0 -0
  166. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/envelope.schema.json +0 -0
  167. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/field.schema.json +0 -0
  168. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/editspec.py +0 -0
  169. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/errors.py +0 -0
  170. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/fieldlower.py +0 -0
  171. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/jsonschema_mini.py +0 -0
  172. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/models.py +0 -0
  173. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/ops.py +0 -0
  174. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/planner.py +0 -0
  175. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/editor/reader.py +0 -0
  176. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/field_normalizer.py +0 -0
  177. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/field_spec_adapter.py +0 -0
  178. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/filter_translator.py +0 -0
  179. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/flow_node.py +0 -0
  180. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/global_meta.py +0 -0
  181. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/group.py +0 -0
  182. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/guide.py +0 -0
  183. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/icon_index.py +0 -0
  184. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/instance.py +0 -0
  185. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/layout_check.py +0 -0
  186. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/logger.py +0 -0
  187. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/money_currency.py +0 -0
  188. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/optionset.py +0 -0
  189. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/page.py +0 -0
  190. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/post.py +0 -0
  191. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record.py +0 -0
  192. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record_defaults.py +0 -0
  193. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record_discussions.py +0 -0
  194. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record_form_checks.py +0 -0
  195. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record_lookups.py +0 -0
  196. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/record_rules.py +0 -0
  197. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/relation_scope.py +0 -0
  198. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/relogin.py +0 -0
  199. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/response_crypto.py +0 -0
  200. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/role.py +0 -0
  201. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/role_perm_builder.py +0 -0
  202. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/token_crypto.py +0 -0
  203. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/update.py +0 -0
  204. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/upload.py +0 -0
  205. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/v3/__init__.py +0 -0
  206. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/v3/render.py +0 -0
  207. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/view_spec_adapter.py +0 -0
  208. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/workflow.py +0 -0
  209. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/workflow_node_dsl.py +0 -0
  210. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/worksheet_form.py +0 -0
  211. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/worksheet_reference.py +0 -0
  212. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/core/worksheet_templates.py +0 -0
  213. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/approval.md +0 -0
  214. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/chart.md +0 -0
  215. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/messages.md +0 -0
  216. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/overview.md +0 -0
  217. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/post.md +0 -0
  218. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/record.md +0 -0
  219. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/setup.md +0 -0
  220. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/skills.md +0 -0
  221. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/en/workflow.md +0 -0
  222. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/index.json +0 -0
  223. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/approval.md +0 -0
  224. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/chart.md +0 -0
  225. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/messages.md +0 -0
  226. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/overview.md +0 -0
  227. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/post.md +0 -0
  228. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/record.md +0 -0
  229. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/setup.md +0 -0
  230. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/skills.md +0 -0
  231. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/workflow.md +0 -0
  232. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/i18n.py +0 -0
  233. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/locale/__init__.py +0 -0
  234. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/locale/messages.schema.json +0 -0
  235. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/__init__.py +0 -0
  236. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/atomic_write.py +0 -0
  237. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/confirm.py +0 -0
  238. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/formatting.py +0 -0
  239. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/options.py +0 -0
  240. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli/utils/parameter_mapping.py +0 -0
  241. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/dependency_links.txt +0 -0
  242. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/entry_points.txt +0 -0
  243. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/requires.txt +0 -0
  244. {hap_cli-0.9.18 → hap_cli-0.9.20}/hap_cli.egg-info/top_level.txt +0 -0
  245. {hap_cli-0.9.18 → hap_cli-0.9.20}/setup.cfg +0 -0
  246. {hap_cli-0.9.18 → hap_cli-0.9.20}/setup.py +0 -0
  247. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/add_member_to_role.yaml +0 -0
  248. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/batch_delete_records.yaml +0 -0
  249. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/create_optionset.yaml +0 -0
  250. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/delete_optionset.yaml +0 -0
  251. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/delete_record.yaml +0 -0
  252. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/delete_role.yaml +0 -0
  253. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/delete_worksheet.yaml +0 -0
  254. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_info.yaml +0 -0
  255. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_knowledge_list.yaml +0 -0
  256. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_worksheets_list.yaml +0 -0
  257. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_optionset_list.yaml +0 -0
  258. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_details.yaml +0 -0
  259. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_discussions.yaml +0 -0
  260. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_list.yaml +0 -0
  261. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_logs.yaml +0 -0
  262. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_pivot_data.yaml +0 -0
  263. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_relations.yaml +0 -0
  264. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_share_link.yaml +0 -0
  265. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_regions.yaml +0 -0
  266. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/get_role_details.yaml +0 -0
  267. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/knowledge_search.yaml +0 -0
  268. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/leave_all_roles.yaml +0 -0
  269. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/remove_member_from_role.yaml +0 -0
  270. {hap_cli-0.9.18 → hap_cli-0.9.20}/sources/v3-api-schema/update_optionset.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hap-cli
3
- Version: 0.9.18
3
+ Version: 0.9.20
4
4
  Summary: CLI harness for Mingdao HAP - Enterprise no-code platform
5
5
  Author: hap-cli
6
6
  License: Apache-2.0
@@ -167,6 +167,9 @@ discover every subcommand.
167
167
  | `app create-section / edit-section / delete-section` | Section management |
168
168
  | `app sort-sections / sort-worksheets` | Reorder sections / a section's worksheets |
169
169
  | `app backup / export / exports / backup-logs` | Backup & export |
170
+ | `app backups …` | List, create, restore, rename, download and delete backups |
171
+ | `app portal …` | External portal switch and settings |
172
+ | `app maintenance / ai-models / sms-signatures` | Maintenance mode, available AI models and SMS signatures |
170
173
  | `app usage / logs / log-archives` | Statistics, operation logs and their archives |
171
174
  | `app trash` | What was deleted from an application, and by whom |
172
175
  | `app role …` | Role CRUD, permissions, members, leave-all, applications |
@@ -188,7 +191,7 @@ discover every subcommand.
188
191
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
189
192
  | `worksheet form-settings / save-form-settings` | Form submission settings |
190
193
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
191
- | `worksheet chart list / get / create / update / delete` | Statistics charts on a worksheet |
194
+ | `worksheet chart list / get / create / update / delete / sort / copy / move / set-owner` | Statistics charts on a worksheet |
192
195
  | `worksheet view list / info / create / copy / delete / sort` | View management (`list --deleted` is the recycle bin; a spec can group a table, restrict its columns, or name a plugin) |
193
196
 
194
197
  ### worksheet record — record CRUD
@@ -224,7 +227,7 @@ discover every subcommand.
224
227
  | Command | Description |
225
228
  |---|---|
226
229
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
227
- | `approval get / work-item / operations / op-history / history / history-detail` | Read instance state |
230
+ | `approval list-by-record / get / work-item / operations / op-history / history / history-detail` | Read instance state |
228
231
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
229
232
  | `approval revoke / terminate / restart / retry` | Lifecycle |
230
233
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -235,7 +238,7 @@ discover every subcommand.
235
238
 
236
239
  | Command | Description |
237
240
  |---|---|
238
- | `custom-page info / save / update-config` | Read and write the layout |
241
+ | `custom-page info / save / update-config / patch / structure / component / settings / update-settings / update-info` | Read and write the layout |
239
242
  | `custom-page create / rename / copy / delete` | Lifecycle |
240
243
  | `custom-page component-types` | Component reference |
241
244
 
@@ -243,7 +246,7 @@ discover every subcommand.
243
246
 
244
247
  | Command | Description |
245
248
  |---|---|
246
- | `contact search / resolve` | Find members by keyword / name / email / phone |
249
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
247
250
  | `contact friends / friend-requests` | Address book |
248
251
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
249
252
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -138,6 +138,9 @@ discover every subcommand.
138
138
  | `app create-section / edit-section / delete-section` | Section management |
139
139
  | `app sort-sections / sort-worksheets` | Reorder sections / a section's worksheets |
140
140
  | `app backup / export / exports / backup-logs` | Backup & export |
141
+ | `app backups …` | List, create, restore, rename, download and delete backups |
142
+ | `app portal …` | External portal switch and settings |
143
+ | `app maintenance / ai-models / sms-signatures` | Maintenance mode, available AI models and SMS signatures |
141
144
  | `app usage / logs / log-archives` | Statistics, operation logs and their archives |
142
145
  | `app trash` | What was deleted from an application, and by whom |
143
146
  | `app role …` | Role CRUD, permissions, members, leave-all, applications |
@@ -159,7 +162,7 @@ discover every subcommand.
159
162
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
160
163
  | `worksheet form-settings / save-form-settings` | Form submission settings |
161
164
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
162
- | `worksheet chart list / get / create / update / delete` | Statistics charts on a worksheet |
165
+ | `worksheet chart list / get / create / update / delete / sort / copy / move / set-owner` | Statistics charts on a worksheet |
163
166
  | `worksheet view list / info / create / copy / delete / sort` | View management (`list --deleted` is the recycle bin; a spec can group a table, restrict its columns, or name a plugin) |
164
167
 
165
168
  ### worksheet record — record CRUD
@@ -195,7 +198,7 @@ discover every subcommand.
195
198
  | Command | Description |
196
199
  |---|---|
197
200
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
198
- | `approval get / work-item / operations / op-history / history / history-detail` | Read instance state |
201
+ | `approval list-by-record / get / work-item / operations / op-history / history / history-detail` | Read instance state |
199
202
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
200
203
  | `approval revoke / terminate / restart / retry` | Lifecycle |
201
204
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -206,7 +209,7 @@ discover every subcommand.
206
209
 
207
210
  | Command | Description |
208
211
  |---|---|
209
- | `custom-page info / save / update-config` | Read and write the layout |
212
+ | `custom-page info / save / update-config / patch / structure / component / settings / update-settings / update-info` | Read and write the layout |
210
213
  | `custom-page create / rename / copy / delete` | Lifecycle |
211
214
  | `custom-page component-types` | Component reference |
212
215
 
@@ -214,7 +217,7 @@ discover every subcommand.
214
217
 
215
218
  | Command | Description |
216
219
  |---|---|
217
- | `contact search / resolve` | Find members by keyword / name / email / phone |
220
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
218
221
  | `contact friends / friend-requests` | Address book |
219
222
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
220
223
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -138,6 +138,9 @@ discover every subcommand.
138
138
  | `app create-section / edit-section / delete-section` | Section management |
139
139
  | `app sort-sections / sort-worksheets` | Reorder sections / a section's worksheets |
140
140
  | `app backup / export / exports / backup-logs` | Backup & export |
141
+ | `app backups …` | List, create, restore, rename, download and delete backups |
142
+ | `app portal …` | External portal switch and settings |
143
+ | `app maintenance / ai-models / sms-signatures` | Maintenance mode, available AI models and SMS signatures |
141
144
  | `app usage / logs / log-archives` | Statistics, operation logs and their archives |
142
145
  | `app trash` | What was deleted from an application, and by whom |
143
146
  | `app role …` | Role CRUD, permissions, members, leave-all, applications |
@@ -159,7 +162,7 @@ discover every subcommand.
159
162
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
160
163
  | `worksheet form-settings / save-form-settings` | Form submission settings |
161
164
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
162
- | `worksheet chart list / get / create / update / delete` | Statistics charts on a worksheet |
165
+ | `worksheet chart list / get / create / update / delete / sort / copy / move / set-owner` | Statistics charts on a worksheet |
163
166
  | `worksheet view list / info / create / copy / delete / sort` | View management (`list --deleted` is the recycle bin; a spec can group a table, restrict its columns, or name a plugin) |
164
167
 
165
168
  ### worksheet record — record CRUD
@@ -195,7 +198,7 @@ discover every subcommand.
195
198
  | Command | Description |
196
199
  |---|---|
197
200
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
198
- | `approval get / work-item / operations / op-history / history / history-detail` | Read instance state |
201
+ | `approval list-by-record / get / work-item / operations / op-history / history / history-detail` | Read instance state |
199
202
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
200
203
  | `approval revoke / terminate / restart / retry` | Lifecycle |
201
204
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -206,7 +209,7 @@ discover every subcommand.
206
209
 
207
210
  | Command | Description |
208
211
  |---|---|
209
- | `custom-page info / save / update-config` | Read and write the layout |
212
+ | `custom-page info / save / update-config / patch / structure / component / settings / update-settings / update-info` | Read and write the layout |
210
213
  | `custom-page create / rename / copy / delete` | Lifecycle |
211
214
  | `custom-page component-types` | Component reference |
212
215
 
@@ -214,7 +217,7 @@ discover every subcommand.
214
217
 
215
218
  | Command | Description |
216
219
  |---|---|
217
- | `contact search / resolve` | Find members by keyword / name / email / phone |
220
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
218
221
  | `contact friends / friend-requests` | Address book |
219
222
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
220
223
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -122,6 +122,9 @@ hap --json worksheet record list WORKSHEET_ID
122
122
  | `app create-section / edit-section / delete-section` | 分组管理 |
123
123
  | `app sort-sections / sort-worksheets` | 重排分组 / 分组内工作表顺序 |
124
124
  | `app backup / export / exports / backup-logs` | 备份与导出 |
125
+ | `app backups …` | 备份列表、创建、还原、重命名、下载、删除 |
126
+ | `app portal …` | 外部门户开关与设置 |
127
+ | `app maintenance / ai-models / sms-signatures` | 维护模式、可用 AI 模型与短信签名 |
125
128
  | `app usage / logs / log-archives` | 使用统计、操作日志与日志归档 |
126
129
  | `app trash` | 应用回收站:谁在什么时候删了什么 |
127
130
  | `app role …` | 角色 CRUD、权限、成员、leave-all、申请 |
@@ -143,7 +146,7 @@ hap --json worksheet record list WORKSHEET_ID
143
146
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | 功能开关 |
144
147
  | `worksheet form-settings / save-form-settings` | 表单提交/高级设置 |
145
148
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | 自定义动作按钮 |
146
- | `worksheet chart list / get / create / update / delete` | 工作表统计图 |
149
+ | `worksheet chart list / get / create / update / delete / sort / copy / move / set-owner` | 工作表统计图 |
147
150
  | `worksheet view list / info / create / copy / delete / sort` | 视图管理(`list --deleted` 看回收站;视图规格可给表格分组、限定列、指定插件) |
148
151
 
149
152
  ### worksheet record — 记录 CRUD
@@ -177,7 +180,7 @@ hap --json worksheet record list WORKSHEET_ID
177
180
  | 命令 | 说明 |
178
181
  |---|---|
179
182
  | `approval todo / todo-count / done-count / todo-filters / archived` | 待办、已办与归档 |
180
- | `approval get / work-item / operations / op-history / history / history-detail` | 实例状态 |
183
+ | `approval list-by-record / get / work-item / operations / op-history / history / history-detail` | 实例状态 |
181
184
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | 审批动作(含签名、附件、指定下一步审批人)|
182
185
  | `approval revoke / terminate / restart / retry` | 实例生命周期 |
183
186
  | `approval batch / retry-batch / end-batch` | 批量动作 |
@@ -188,7 +191,7 @@ hap --json worksheet record list WORKSHEET_ID
188
191
 
189
192
  | 命令 | 说明 |
190
193
  |---|---|
191
- | `custom-page info / save / update-config` | 读写布局 |
194
+ | `custom-page info / save / update-config / patch / structure / component / settings / update-settings / update-info` | 读写布局 |
192
195
  | `custom-page create / rename / copy / delete` | 生命周期 |
193
196
  | `custom-page component-types` | 组件参考 |
194
197
 
@@ -196,7 +199,7 @@ hap --json worksheet record list WORKSHEET_ID
196
199
 
197
200
  | 命令 | 说明 |
198
201
  |---|---|
199
- | `contact search / resolve` | 关键词搜索 / 解析 accountId |
202
+ | `contact search / resolve / info` | 关键词搜索 / 解析 accountId |
200
203
  | `contact friends / friend-requests` | 通讯录 |
201
204
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | 好友管理 |
202
205
  | `contact org-roles / org-role-members` | 组织角色及其成员 |
@@ -3,7 +3,7 @@
3
3
  import sys as _sys
4
4
  import types as _types
5
5
 
6
- __version__ = "0.9.18"
6
+ __version__ = "0.9.20"
7
7
 
8
8
  # The command tree used to live in hap_cli/hap_cli.py. A module named
9
9
  # after the package it sits in shadows that package: run python with the
@@ -26,11 +26,17 @@ import logging
26
26
  import click
27
27
 
28
28
  from hap_cli.commands.app_cmd import app
29
+ from hap_cli.commands.chart_cmd import chart
30
+ from hap_cli.commands.contact_cmd import contact
31
+ from hap_cli.commands.instance_cmd import instance
29
32
  from hap_cli.commands.optionset_cmd import optionset
30
33
  from hap_cli.commands.record_cmd import record
31
34
  from hap_cli.commands.role_cmd import role
32
35
  from hap_cli.commands.workflow_cmd import workflow
33
- from hap_cli.commands.worksheet_cmd import worksheet
36
+ from hap_cli.commands.worksheet_cmd import worksheet, worksheet_filter
37
+ from hap_cli.commands.page_cmd import page
38
+ from hap_cli.core import print_template as _print
39
+ from hap_cli.core.filter_v3 import to_saved_filter
34
40
  from hap_cli.core.v3 import register_v3
35
41
  from hap_cli.core.v3.render import render_v3_response
36
42
  from hap_cli.core import worksheet as _ws_mod
@@ -38,6 +44,7 @@ from hap_cli.core import workflow as _wf_mod
38
44
  from hap_cli.core import record_lookups as _lookups
39
45
  from hap_cli.core import record_discussions as _discussions
40
46
  from hap_cli.i18n import t
47
+ from hap_cli.utils.confirm import confirm_or_abort
41
48
 
42
49
  _logger = logging.getLogger("hap_cli.record")
43
50
 
@@ -376,7 +383,7 @@ register_v3(record, "share-link", tool="get_record_share_link")
376
383
 
377
384
 
378
385
  # All triggerable-workflow tools (get_workflow_list / get_workflow_details
379
- # / trigger_workflow / get_approval_list_by_row) carry the ``ex`` tag in
386
+ # / trigger_workflow) carry the ``ex`` tag in
380
387
  # the apifox catalog — handled by the legacy implementations in
381
388
  # workflow_cmd.py and instance_cmd.py.
382
389
 
@@ -384,6 +391,380 @@ register_v3(record, "share-link", tool="get_record_share_link")
384
391
  # ── approval (workflow instance) ────────────────────────────────────────────
385
392
 
386
393
 
387
- # get_approval_list_by_row is tag-excluded; ``hap approval list-by-row``
388
- # is currently unavailable (no legacy implementation yet — tracked in
389
- # docs/v3-legacy-fallback.md).
394
+ # ``approval list-by-record`` is registered at the end of this file.
395
+
396
+
397
+ # ── Endpoints the public V3 docs do not list yet ────────────────────────────
398
+ #
399
+ # Schemas come from scripts/update_v3_mcp_schema.py, which also records how
400
+ # each route was confirmed.
401
+
402
+ # The server answers only when the backup or restore has finished, unless
403
+ # told not to wait; a small application already takes about 30 seconds.
404
+ _BACKUP_TIMEOUT = 600
405
+
406
+
407
+ @click.group("backups", help=t(
408
+ "Application backups — create, list, restore, rename, download, delete."))
409
+ def backups_group():
410
+ pass
411
+
412
+
413
+ @click.group("portal", help=t(
414
+ "External portal — turn it on or off and change its settings."))
415
+ def portal_group():
416
+ pass
417
+
418
+
419
+ @click.group("index", help=t(
420
+ "Worksheet indexes — speed up queries, or enforce unique values."))
421
+ def index_group():
422
+ pass
423
+
424
+
425
+ @click.group("print-template", help=t(
426
+ "Print templates — system, Word, Excel, QR code and barcode."))
427
+ def print_template_group():
428
+ pass
429
+
430
+
431
+ @click.group("public-form", help=t(
432
+ "Public form — let anyone with the link add records."))
433
+ def public_form_group():
434
+ pass
435
+
436
+
437
+ @click.group("share-card", help=t(
438
+ "The title, description and icon shown when a link is shared."))
439
+ def share_card_group():
440
+ pass
441
+
442
+
443
+ app.add_command(backups_group)
444
+ app.add_command(portal_group)
445
+ worksheet.add_command(index_group)
446
+ worksheet.add_command(print_template_group)
447
+ worksheet.add_command(public_form_group)
448
+ worksheet.add_command(share_card_group)
449
+
450
+ register_v3(backups_group, "list", tool="get_app_backup_list")
451
+ register_v3(backups_group, "create", tool="create_app_backup",
452
+ timeout=_BACKUP_TIMEOUT)
453
+ register_v3(backups_group, "rename", tool="rename_app_backup")
454
+ register_v3(backups_group, "download-url", tool="get_app_backup_download_url")
455
+ register_v3(backups_group, "restore", tool="restore_app_backup",
456
+ confirm="Restore backup {backup_id}? Unless it is restored as a "
457
+ "new application, this overwrites the current one.",
458
+ timeout=_BACKUP_TIMEOUT)
459
+ register_v3(backups_group, "restore-status", tool="get_app_restore_status")
460
+ register_v3(backups_group, "delete", tool="delete_app_backup",
461
+ confirm="Delete backup {backup_id}?")
462
+
463
+ register_v3(app, "maintenance", tool="update_app_maintenance")
464
+ register_v3(app, "ai-models", tool="get_app_ai_models")
465
+ register_v3(app, "sms-signatures", tool="get_sms_signatures")
466
+
467
+ register_v3(role, "sort", tool="sort_roles")
468
+
469
+
470
+ def _prepare_role_update(ctx, body, options, controls):
471
+ # The endpoint's own default is a full replacement, which clears every
472
+ # permission the call does not repeat.
473
+ body.setdefault("isIncremental", True)
474
+
475
+
476
+ # `roleScope` has no effect on an update: a role cannot change category.
477
+ register_v3(role, "update", tool="update_role", role_app_guard=True,
478
+ omit=("roleScope",), prepare=_prepare_role_update)
479
+
480
+
481
+ def _need_body(ctx, body, options, controls):
482
+ """An update that names nothing to change is a typing mistake."""
483
+ if not body:
484
+ raise click.UsageError("Nothing to change — pass at least one setting.")
485
+
486
+
487
+ register_v3(portal_group, "status", tool="get_portal_status")
488
+ register_v3(portal_group, "info", tool="get_portal_config")
489
+ register_v3(portal_group, "enable", tool="switch_portal",
490
+ constants={"enabled": True})
491
+ register_v3(portal_group, "disable", tool="switch_portal",
492
+ constants={"enabled": False},
493
+ confirm="Turn the external portal off? External users will no "
494
+ "longer be able to sign in.")
495
+ register_v3(portal_group, "patch", tool="patch_portal_config",
496
+ prepare=_need_body)
497
+ register_v3(portal_group, "update", tool="update_portal_config",
498
+ prepare=_need_body)
499
+
500
+ register_v3(index_group, "list", tool="get_worksheet_index_list")
501
+ register_v3(index_group, "create", tool="create_worksheet_index")
502
+ register_v3(index_group, "update", tool="update_worksheet_index",
503
+ prepare=_need_body)
504
+ register_v3(index_group, "rename", tool="rename_worksheet_index")
505
+ register_v3(index_group, "delete", tool="delete_worksheet_index",
506
+ confirm="Delete index {index_id}?")
507
+
508
+
509
+ def _prepare_saved_filter(ctx, body, options, controls):
510
+ # Measured 2026-12-01: created without `module`, a filter lands in
511
+ # module 2 (report) and never shows in the worksheet's filter list —
512
+ # the schema says the default is 1. An update keeps what it has.
513
+ if not body.get("filterId"):
514
+ body.setdefault("module", 1)
515
+ tree = body.get("filter")
516
+ # Left out, the endpoint clears every condition.
517
+ if not tree:
518
+ raise click.UsageError("--filter-json must hold at least one condition.")
519
+ try:
520
+ body["filter"] = to_saved_filter(
521
+ tree, controls() if controls else None)
522
+ except ValueError as exc:
523
+ raise click.BadParameter(str(exc), param_hint="--filter-json")
524
+
525
+
526
+ register_v3(worksheet_filter, "save", tool="save_worksheet_filter",
527
+ prepare=_prepare_saved_filter)
528
+ register_v3(worksheet_filter, "delete", tool="delete_worksheet_filter",
529
+ confirm="Delete saved filter {filter_id}?")
530
+
531
+
532
+ _FILE_OPTIONS = [
533
+ click.option("--file", "file", default="",
534
+ help=t("Template file on this computer (.docx or .xlsx, "
535
+ "3 MB at most).")),
536
+ click.option("--url", "url", default="",
537
+ help=t("Public address of the template file "
538
+ "(10 MB at most).")),
539
+ ]
540
+
541
+
542
+ def _prepare_print_create(ctx, body, options, controls):
543
+ kind = body.get("templateType")
544
+ has_file = bool(options.get("file") or options.get("url"))
545
+ if kind not in ("word", "excel"):
546
+ if has_file:
547
+ raise click.UsageError(
548
+ "A template file only goes with --template-type word or excel.")
549
+ if kind != "system" and "config" not in body:
550
+ raise click.UsageError(
551
+ f"--template-type {kind} needs --config-json.")
552
+ return
553
+ body["source"], file_kind = _print.build_source(
554
+ options.get("file") or "", options.get("url") or "")
555
+ if file_kind != kind:
556
+ raise click.UsageError(
557
+ f"--template-type {kind} does not match the file, which is a "
558
+ f"{file_kind} file.")
559
+
560
+
561
+ def _prepare_print_file(ctx, body, options, controls):
562
+ body["source"], _ = _print.build_source(
563
+ options.get("file") or "", options.get("url") or "")
564
+
565
+
566
+ register_v3(print_template_group, "list", tool="get_print_template_list")
567
+ register_v3(print_template_group, "info", tool="get_print_template_details")
568
+ register_v3(print_template_group, "create", tool="create_print_template",
569
+ omit=("source",), extra_decorators=_FILE_OPTIONS,
570
+ prepare=_prepare_print_create, prepare_options=("file", "url"),
571
+ timeout=120)
572
+ register_v3(print_template_group, "update", tool="update_print_template",
573
+ prepare=_need_body)
574
+ register_v3(print_template_group, "replace-file",
575
+ tool="replace_print_template_file",
576
+ omit=("source",), extra_decorators=_FILE_OPTIONS,
577
+ prepare=_prepare_print_file, prepare_options=("file", "url"),
578
+ timeout=120)
579
+ register_v3(print_template_group, "delete", tool="delete_print_template",
580
+ confirm="Delete print template {template_id}?")
581
+
582
+ register_v3(public_form_group, "info", tool="get_public_form_config")
583
+ register_v3(public_form_group, "enable", tool="switch_public_form",
584
+ constants={"enabled": True})
585
+ register_v3(public_form_group, "disable", tool="switch_public_form",
586
+ constants={"enabled": False},
587
+ confirm="Turn off the public form of worksheet {worksheet_id}?")
588
+ register_v3(public_form_group, "update", tool="update_public_form",
589
+ prepare=_need_body)
590
+ register_v3(public_form_group, "update-settings",
591
+ tool="update_public_form_settings")
592
+ register_v3(public_form_group, "refresh-url", tool="refresh_public_form_url",
593
+ confirm="Replace the public link? The current one stops working.")
594
+ register_v3(public_form_group, "reset-fields",
595
+ tool="reset_public_form_fields",
596
+ confirm="Reset the public form's layout? Custom order, width and "
597
+ "visibility are lost.")
598
+
599
+ # An empty string clears a share-card text, and empty options are not sent,
600
+ # so clearing has its own switch.
601
+ _CLEARABLE = {"title": "title", "description": "description",
602
+ "icon": "iconImagePath"}
603
+
604
+
605
+ def _prepare_share_card(ctx, body, options, controls):
606
+ for name in options.get("clear") or ():
607
+ body.setdefault(_CLEARABLE[name], "")
608
+ _need_body(ctx, body, options, controls)
609
+
610
+
611
+ register_v3(share_card_group, "info", tool="get_share_card_setting")
612
+ register_v3(share_card_group, "update", tool="update_share_card_setting",
613
+ extra_decorators=[click.option(
614
+ "--clear", "clear", multiple=True,
615
+ type=click.Choice(sorted(_CLEARABLE)),
616
+ help=t("Empty this setting. Repeatable."))],
617
+ prepare=_prepare_share_card, prepare_options=("clear",))
618
+
619
+ register_v3(workflow, "sms-templates", tool="get_workflow_sms_templates")
620
+ register_v3(workflow, "validate", tool="validate_process")
621
+ register_v3(page, "patch", tool="patch_custom_page_components")
622
+
623
+ # ── charts ──
624
+
625
+
626
+ def _prepare_chart_move(ctx, body, options, controls):
627
+ if not body.get("sourcePageId") or not body.get("targetPageId"):
628
+ raise click.UsageError(
629
+ "Moving a chart needs --source-page-id and --target-page-id.")
630
+
631
+
632
+ def _prepare_chart_owner(ctx, body, options, controls):
633
+ if options["public"] is None:
634
+ raise click.UsageError("Pass --public or --personal.")
635
+ body["isPublic"] = options["public"]
636
+
637
+
638
+ # One endpoint copies and moves; the two take different options.
639
+ register_v3(chart, "sort", tool="sort_charts")
640
+ register_v3(chart, "copy", tool="move_chart", constants={"isCopy": True},
641
+ omit=("sourcePageId",))
642
+ register_v3(chart, "move", tool="move_chart", constants={"isCopy": False},
643
+ omit=("chartName",), prepare=_prepare_chart_move)
644
+ register_v3(chart, "set-owner", tool="update_chart_owner",
645
+ omit=("isPublic",),
646
+ extra_decorators=[click.option(
647
+ "--public/--personal", "public", default=None,
648
+ help=t("Make it public, or personal to whoever created "
649
+ "it."))],
650
+ prepare=_prepare_chart_owner, prepare_options=("public",))
651
+
652
+ # ── custom page settings ──
653
+
654
+ register_v3(page, "structure", tool="get_custom_page_structure")
655
+ register_v3(page, "component", tool="get_custom_page_component")
656
+ register_v3(page, "settings", tool="get_custom_page_settings")
657
+
658
+ # option -> (object, key) in the settings body
659
+ _PAGE_SWITCHES = {
660
+ "header_visible": ("header", "visible"),
661
+ "page_share": ("header", "share"),
662
+ "page_download": ("header", "download"),
663
+ "page_full_screen": ("header", "fullScreen"),
664
+ "chart_share": ("chartPermissions", "share"),
665
+ "chart_export": ("chartPermissions", "export"),
666
+ "pivot_print": ("chartPermissions", "pivotTablePrint"),
667
+ }
668
+ _PAGE_SWITCH_HELP = {
669
+ "header_visible": "Show the page header.",
670
+ "page_share": "Offer sharing the page. Turning it off revokes the share "
671
+ "links already handed out.",
672
+ "page_download": "Offer downloading the page.",
673
+ "page_full_screen": "Offer full screen.",
674
+ "chart_share": "Offer sharing charts. Turning it off revokes the share "
675
+ "links already handed out.",
676
+ "chart_export": "Offer exporting chart data to Excel.",
677
+ "pivot_print": "Offer printing pivot tables.",
678
+ }
679
+ _PAGE_STYLES = {"background_color": "backgroundColor",
680
+ "title_bar_style": "titleBarStyle"}
681
+ _PAGE_SETTING_OPTIONS = [
682
+ click.option(f"--{n.replace('_', '-')}/--no-{n.replace('_', '-')}", n,
683
+ default=None, help=t(_PAGE_SWITCH_HELP[n]))
684
+ for n in _PAGE_SWITCHES
685
+ ] + [
686
+ click.option("--background-color", default=None,
687
+ type=click.Choice(["theme", "themeLight", "themeDark",
688
+ "#ffffff", "#f5f6f7", "#1b2025"]),
689
+ help=t("Page background. Which ones a page accepts is in "
690
+ "`custom-page settings`, allowedBackgroundColors.")),
691
+ click.option("--title-bar-style", default=None,
692
+ type=click.Choice(["none", "theme", "gradient", "line"]),
693
+ help=t("Title bar of the chart cards.")),
694
+ click.option("--clear-url-params", is_flag=True, default=False,
695
+ help=t("Remove every URL parameter name.")),
696
+ click.option("--yes", "-y", is_flag=True, default=False,
697
+ help=t("Skip confirmation")),
698
+ ]
699
+
700
+
701
+ def _prepare_page_settings(ctx, body, options, controls):
702
+ for name, (group, key) in _PAGE_SWITCHES.items():
703
+ if options.get(name) is not None:
704
+ body.setdefault(group, {})[key] = options[name]
705
+ for name, key in _PAGE_STYLES.items():
706
+ if options.get(name) is not None:
707
+ style = body.setdefault("style", {})
708
+ if not isinstance(style, dict):
709
+ raise click.UsageError("--style-json must be a JSON object.")
710
+ style[key] = options[name]
711
+ if options.get("clear_url_params"):
712
+ if body.get("urlParams"):
713
+ raise click.UsageError(
714
+ "Pass --url-params or --clear-url-params, not both.")
715
+ body["urlParams"] = []
716
+ _need_body(ctx, body, options, controls)
717
+ revoked = [what for name, what in (("page_share", "page"),
718
+ ("chart_share", "chart"))
719
+ if options.get(name) is False]
720
+ if revoked and not options.get("yes"):
721
+ confirm_or_abort(
722
+ f"Turn {' and '.join(revoked)} sharing off? Share links already "
723
+ f"handed out stop working for good.")
724
+
725
+
726
+ register_v3(page, "update-settings", tool="update_custom_page_settings",
727
+ omit=("header", "chartPermissions"),
728
+ extra_decorators=_PAGE_SETTING_OPTIONS,
729
+ prepare=_prepare_page_settings,
730
+ prepare_options=(*_PAGE_SWITCHES, *_PAGE_STYLES,
731
+ "clear_url_params", "yes"))
732
+
733
+ # Same words as `worksheet update --visibility`.
734
+ _PAGE_VISIBILITY = {"visible": 1, "hidden": 2, "pc-hidden": 3,
735
+ "mobile-hidden": 4}
736
+
737
+
738
+ def _prepare_page_info(ctx, body, options, controls):
739
+ for name in options.get("clear") or ():
740
+ if name in body:
741
+ raise click.UsageError(
742
+ f"Pass --{name} or --clear {name}, not both.")
743
+ body[name] = ""
744
+ if options.get("visibility"):
745
+ body["displayType"] = _PAGE_VISIBILITY[options["visibility"]]
746
+ _need_body(ctx, body, options, controls)
747
+
748
+
749
+ register_v3(page, "update-info", tool="update_custom_page_config",
750
+ omit=("displayType",),
751
+ extra_decorators=[
752
+ click.option("--visibility",
753
+ type=click.Choice(list(_PAGE_VISIBILITY)),
754
+ help=t("Where the page shows in the application's "
755
+ "navigation.")),
756
+ click.option("--clear", multiple=True,
757
+ type=click.Choice(["remark", "desc"]),
758
+ help=t("Empty this setting. Repeatable.")),
759
+ ],
760
+ prepare=_prepare_page_info,
761
+ prepare_options=("visibility", "clear"))
762
+
763
+ # ── workflow parameters, people, approvals ──
764
+
765
+ register_v3(workflow, "variables", tool="get_workflow_variables")
766
+ register_v3(workflow, "save-variables", tool="update_workflow_variables",
767
+ confirm="Replace this workflow's parameters? Any that are not "
768
+ "listed are deleted.")
769
+ register_v3(contact, "info", tool="get_user_details", app_id_required=False)
770
+ register_v3(instance, "list-by-record", tool="get_approval_list_by_row")
@@ -1081,8 +1081,9 @@ def worksheet_rules(ctx, worksheet_id, rule_id, instance_id, work_id):
1081
1081
  '{\"action\": \"show|hide|editable|readonly|required|error|'
1082
1082
  'readonly_all\", \"fields\": [\"<column id>\"], \"message\": '
1083
1083
  '\"...\"}. An error action needs a message; readonly_all takes no '
1084
- "fields. Setting a field value is only expressible in the stored "
1085
- "shape, which is accepted as well. See "
1084
+ "fields. set_value takes \"assignments\" instead: {\"field\": ..., "
1085
+ "then one of \"value\", \"from\" or \"clear\": true}. The stored "
1086
+ "shape is accepted as well. See "
1086
1087
  "`hap guide worksheet rule-items`.")
1087
1088
  @click.option(
1088
1089
  "--edit-attrs", default="",
@@ -1121,13 +1122,14 @@ def worksheet_save_rule(
1121
1122
  # ones are kept and then never match. Only read when a filter was
1122
1123
  # actually written in the form that needs placing.
1123
1124
  controls = None
1124
- if _cd.detect_shape(filter_spec) == _cd.SHAPE_CANONICAL:
1125
+ if (_cd.detect_shape(filter_spec) == _cd.SHAPE_CANONICAL
1126
+ or rule_spec.needs_columns(item_spec)):
1125
1127
  controls = _worksheet_form.load_form_controls(
1126
1128
  session, worksheet_id)
1127
1129
  try:
1128
1130
  wire_filters = (_cd.to_rule_filter(filter_spec, controls=controls)
1129
1131
  if filter_spec is not None else None)
1130
- wire_items = (rule_spec.translate_rule_items(item_spec)
1132
+ wire_items = (rule_spec.translate_rule_items(item_spec, controls)
1131
1133
  if item_spec is not None else None)
1132
1134
  except ValueError as exc:
1133
1135
  raise click.UsageError(str(exc))