hap-cli 0.9.19__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 (269) hide show
  1. {hap_cli-0.9.19 → hap_cli-0.9.20}/PKG-INFO +5 -5
  2. {hap_cli-0.9.19/hap_cli → hap_cli-0.9.20}/README.md +4 -4
  3. {hap_cli-0.9.19 → hap_cli-0.9.20/hap_cli}/README.md +4 -4
  4. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/README_CN.md +4 -4
  5. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/__init__.py +1 -1
  6. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/v3_registry.py +155 -4
  7. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/worksheet_cmd.py +6 -4
  8. hap_cli-0.9.20/hap_cli/core/rule_spec_adapter.py +309 -0
  9. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/worksheet.py +51 -1
  10. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/worksheet.md +25 -5
  11. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/worksheet.md +24 -4
  12. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/locale/messages.json +326 -4
  13. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/PKG-INFO +5 -5
  14. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/SOURCES.txt +12 -0
  15. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/INDEX.json +132 -0
  16. hap_cli-0.9.20/sources/v3-api-schema/get_approval_list_by_row.yaml +45 -0
  17. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_component.yaml +36 -0
  18. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_settings.yaml +25 -0
  19. hap_cli-0.9.20/sources/v3-api-schema/get_custom_page_structure.yaml +50 -0
  20. hap_cli-0.9.20/sources/v3-api-schema/get_user_details.yaml +31 -0
  21. hap_cli-0.9.20/sources/v3-api-schema/get_workflow_variables.yaml +33 -0
  22. hap_cli-0.9.20/sources/v3-api-schema/move_chart.yaml +61 -0
  23. hap_cli-0.9.20/sources/v3-api-schema/sort_charts.yaml +35 -0
  24. hap_cli-0.9.20/sources/v3-api-schema/update_chart_owner.yaml +44 -0
  25. hap_cli-0.9.20/sources/v3-api-schema/update_custom_page_config.yaml +69 -0
  26. hap_cli-0.9.20/sources/v3-api-schema/update_custom_page_settings.yaml +289 -0
  27. hap_cli-0.9.20/sources/v3-api-schema/update_workflow_variables.yaml +124 -0
  28. hap_cli-0.9.19/hap_cli/core/rule_spec_adapter.py +0 -116
  29. {hap_cli-0.9.19 → hap_cli-0.9.20}/MANIFEST.in +0 -0
  30. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/__main__.py +0 -0
  31. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/_entry.py +0 -0
  32. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/__init__.py +0 -0
  33. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/app_cmd.py +0 -0
  34. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/app_creator_cmd.py +0 -0
  35. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/app_editor_cmd.py +0 -0
  36. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/attachment_cmd.py +0 -0
  37. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/auth_cmd.py +0 -0
  38. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/calendar_cmd.py +0 -0
  39. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/chart_cmd.py +0 -0
  40. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/chat_cmd.py +0 -0
  41. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/chatbot_cmd.py +0 -0
  42. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/config_cmd.py +0 -0
  43. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/contact_cmd.py +0 -0
  44. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/department_cmd.py +0 -0
  45. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/group_cmd.py +0 -0
  46. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/guide_cmd.py +0 -0
  47. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/icon_cmd.py +0 -0
  48. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/instance_cmd.py +0 -0
  49. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/node_cmd.py +0 -0
  50. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/optionset_cmd.py +0 -0
  51. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/page_cmd.py +0 -0
  52. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/post_cmd.py +0 -0
  53. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/record_cmd.py +0 -0
  54. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/region_cmd.py +0 -0
  55. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/role_cmd.py +0 -0
  56. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/update_cmd.py +0 -0
  57. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/upload_cmd.py +0 -0
  58. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/commands/workflow_cmd.py +0 -0
  59. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/context.py +0 -0
  60. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/__init__.py +0 -0
  61. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/action_spec_adapter.py +0 -0
  62. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app.py +0 -0
  63. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/__init__.py +0 -0
  64. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/__init__.py +0 -0
  65. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/control_type_codes.py +0 -0
  66. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/_hapmeta/worksheet_templates.py +0 -0
  67. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/charts.py +0 -0
  68. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/cleanup.py +0 -0
  69. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/compiler.py +0 -0
  70. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/config.py +0 -0
  71. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/design/design.schema.json +0 -0
  72. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/errors.py +0 -0
  73. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/examples/minimal.design.json +0 -0
  74. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/executor.py +0 -0
  75. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/fields.py +0 -0
  76. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/hap.py +0 -0
  77. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/merge.py +0 -0
  78. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/__init__.py +0 -0
  79. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/console.py +0 -0
  80. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/jsonl.py +0 -0
  81. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/mirror.py +0 -0
  82. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/recording/report.py +0 -0
  83. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/schema.py +0 -0
  84. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/INSTRUCTIONS.md +0 -0
  85. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/__init__.py +0 -0
  86. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/cli.py +0 -0
  87. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/executor.py +0 -0
  88. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/attachments.json +0 -0
  89. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample.docx +0 -0
  90. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample.pdf +0 -0
  91. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/resources/sample_images.json +0 -0
  92. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/seed/template.py +0 -0
  93. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/selftest.py +0 -0
  94. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/smoke.py +0 -0
  95. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/steps.py +0 -0
  96. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/store.py +0 -0
  97. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/validate.py +0 -0
  98. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/app_creator/workflow_dsl.py +0 -0
  99. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/attachment.py +0 -0
  100. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/auth.py +0 -0
  101. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/calendar_mod.py +0 -0
  102. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/chart.py +0 -0
  103. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/chat.py +0 -0
  104. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/chatbot.py +0 -0
  105. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/cli_access.py +0 -0
  106. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/condition_dsl.py +0 -0
  107. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/contact.py +0 -0
  108. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/control_type_codes.py +0 -0
  109. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/department.py +0 -0
  110. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/__init__.py +0 -0
  111. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/_hapmeta/__init__.py +0 -0
  112. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/_hapmeta/control_type_codes.py +0 -0
  113. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/apply.py +0 -0
  114. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/componentlower.py +0 -0
  115. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/component.schema.json +0 -0
  116. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/custom-action.schema.json +0 -0
  117. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/envelope.schema.json +0 -0
  118. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/editspec/field.schema.json +0 -0
  119. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/editspec.py +0 -0
  120. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/errors.py +0 -0
  121. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/fieldlower.py +0 -0
  122. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/jsonschema_mini.py +0 -0
  123. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/models.py +0 -0
  124. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/ops.py +0 -0
  125. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/planner.py +0 -0
  126. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/editor/reader.py +0 -0
  127. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/field_normalizer.py +0 -0
  128. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/field_spec_adapter.py +0 -0
  129. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/filter_translator.py +0 -0
  130. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/filter_v3.py +0 -0
  131. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/flow_node.py +0 -0
  132. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/global_meta.py +0 -0
  133. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/group.py +0 -0
  134. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/guide.py +0 -0
  135. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/icon_index.py +0 -0
  136. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/instance.py +0 -0
  137. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/layout_check.py +0 -0
  138. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/logger.py +0 -0
  139. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/money_currency.py +0 -0
  140. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/optionset.py +0 -0
  141. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/page.py +0 -0
  142. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/post.py +0 -0
  143. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/print_template.py +0 -0
  144. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record.py +0 -0
  145. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record_defaults.py +0 -0
  146. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record_discussions.py +0 -0
  147. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record_form_checks.py +0 -0
  148. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record_lookups.py +0 -0
  149. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/record_rules.py +0 -0
  150. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/relation_scope.py +0 -0
  151. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/relogin.py +0 -0
  152. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/response_crypto.py +0 -0
  153. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/role.py +0 -0
  154. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/role_perm_builder.py +0 -0
  155. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/session.py +0 -0
  156. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/token_crypto.py +0 -0
  157. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/update.py +0 -0
  158. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/upload.py +0 -0
  159. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/v3/__init__.py +0 -0
  160. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/v3/dispatcher.py +0 -0
  161. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/v3/render.py +0 -0
  162. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/v3/schema.py +0 -0
  163. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/view_spec_adapter.py +0 -0
  164. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/workflow.py +0 -0
  165. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/workflow_node_dsl.py +0 -0
  166. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/worksheet_form.py +0 -0
  167. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/worksheet_reference.py +0 -0
  168. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/core/worksheet_templates.py +0 -0
  169. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/approval.md +0 -0
  170. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/chart.md +0 -0
  171. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/messages.md +0 -0
  172. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/overview.md +0 -0
  173. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/post.md +0 -0
  174. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/record.md +0 -0
  175. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/setup.md +0 -0
  176. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/skills.md +0 -0
  177. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/en/workflow.md +0 -0
  178. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/index.json +0 -0
  179. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/approval.md +0 -0
  180. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/chart.md +0 -0
  181. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/messages.md +0 -0
  182. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/overview.md +0 -0
  183. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/post.md +0 -0
  184. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/record.md +0 -0
  185. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/setup.md +0 -0
  186. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/skills.md +0 -0
  187. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/guide/zh-Hans/workflow.md +0 -0
  188. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/i18n.py +0 -0
  189. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/locale/__init__.py +0 -0
  190. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/locale/messages.schema.json +0 -0
  191. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/__init__.py +0 -0
  192. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/atomic_write.py +0 -0
  193. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/confirm.py +0 -0
  194. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/formatting.py +0 -0
  195. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/options.py +0 -0
  196. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli/utils/parameter_mapping.py +0 -0
  197. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/dependency_links.txt +0 -0
  198. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/entry_points.txt +0 -0
  199. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/requires.txt +0 -0
  200. {hap_cli-0.9.19 → hap_cli-0.9.20}/hap_cli.egg-info/top_level.txt +0 -0
  201. {hap_cli-0.9.19 → hap_cli-0.9.20}/setup.cfg +0 -0
  202. {hap_cli-0.9.19 → hap_cli-0.9.20}/setup.py +0 -0
  203. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/add_member_to_role.yaml +0 -0
  204. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/batch_delete_records.yaml +0 -0
  205. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/create_app_backup.yaml +0 -0
  206. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/create_optionset.yaml +0 -0
  207. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/create_print_template.yaml +0 -0
  208. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/create_role.yaml +0 -0
  209. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/create_worksheet_index.yaml +0 -0
  210. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_app_backup.yaml +0 -0
  211. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_optionset.yaml +0 -0
  212. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_print_template.yaml +0 -0
  213. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_record.yaml +0 -0
  214. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_role.yaml +0 -0
  215. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_worksheet.yaml +0 -0
  216. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_worksheet_filter.yaml +0 -0
  217. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/delete_worksheet_index.yaml +0 -0
  218. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_ai_models.yaml +0 -0
  219. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_backup_download_url.yaml +0 -0
  220. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_backup_list.yaml +0 -0
  221. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_info.yaml +0 -0
  222. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_knowledge_list.yaml +0 -0
  223. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_restore_status.yaml +0 -0
  224. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_app_worksheets_list.yaml +0 -0
  225. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_optionset_list.yaml +0 -0
  226. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_portal_config.yaml +0 -0
  227. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_portal_status.yaml +0 -0
  228. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_print_template_details.yaml +0 -0
  229. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_print_template_list.yaml +0 -0
  230. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_public_form_config.yaml +0 -0
  231. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_details.yaml +0 -0
  232. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_discussions.yaml +0 -0
  233. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_list.yaml +0 -0
  234. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_logs.yaml +0 -0
  235. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_pivot_data.yaml +0 -0
  236. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_relations.yaml +0 -0
  237. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_record_share_link.yaml +0 -0
  238. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_regions.yaml +0 -0
  239. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_role_details.yaml +0 -0
  240. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_role_list.yaml +0 -0
  241. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_share_card_setting.yaml +0 -0
  242. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_sms_signatures.yaml +0 -0
  243. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_workflow_sms_templates.yaml +0 -0
  244. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/get_worksheet_index_list.yaml +0 -0
  245. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/knowledge_search.yaml +0 -0
  246. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/leave_all_roles.yaml +0 -0
  247. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/patch_custom_page_components.yaml +0 -0
  248. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/patch_portal_config.yaml +0 -0
  249. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/refresh_public_form_url.yaml +0 -0
  250. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/remove_member_from_role.yaml +0 -0
  251. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/rename_app_backup.yaml +0 -0
  252. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/rename_worksheet_index.yaml +0 -0
  253. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/replace_print_template_file.yaml +0 -0
  254. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/reset_public_form_fields.yaml +0 -0
  255. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/restore_app_backup.yaml +0 -0
  256. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/save_worksheet_filter.yaml +0 -0
  257. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/sort_roles.yaml +0 -0
  258. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/switch_portal.yaml +0 -0
  259. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/switch_public_form.yaml +0 -0
  260. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_app_maintenance.yaml +0 -0
  261. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_optionset.yaml +0 -0
  262. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_portal_config.yaml +0 -0
  263. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_print_template.yaml +0 -0
  264. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_public_form.yaml +0 -0
  265. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_public_form_settings.yaml +0 -0
  266. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_role.yaml +0 -0
  267. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_share_card_setting.yaml +0 -0
  268. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/update_worksheet_index.yaml +0 -0
  269. {hap_cli-0.9.19 → hap_cli-0.9.20}/sources/v3-api-schema/validate_process.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hap-cli
3
- Version: 0.9.19
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
@@ -191,7 +191,7 @@ discover every subcommand.
191
191
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
192
192
  | `worksheet form-settings / save-form-settings` | Form submission settings |
193
193
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
194
- | `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 |
195
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) |
196
196
 
197
197
  ### worksheet record — record CRUD
@@ -227,7 +227,7 @@ discover every subcommand.
227
227
  | Command | Description |
228
228
  |---|---|
229
229
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
230
- | `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 |
231
231
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
232
232
  | `approval revoke / terminate / restart / retry` | Lifecycle |
233
233
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -238,7 +238,7 @@ discover every subcommand.
238
238
 
239
239
  | Command | Description |
240
240
  |---|---|
241
- | `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 |
242
242
  | `custom-page create / rename / copy / delete` | Lifecycle |
243
243
  | `custom-page component-types` | Component reference |
244
244
 
@@ -246,7 +246,7 @@ discover every subcommand.
246
246
 
247
247
  | Command | Description |
248
248
  |---|---|
249
- | `contact search / resolve` | Find members by keyword / name / email / phone |
249
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
250
250
  | `contact friends / friend-requests` | Address book |
251
251
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
252
252
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -162,7 +162,7 @@ discover every subcommand.
162
162
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
163
163
  | `worksheet form-settings / save-form-settings` | Form submission settings |
164
164
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
165
- | `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 |
166
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) |
167
167
 
168
168
  ### worksheet record — record CRUD
@@ -198,7 +198,7 @@ discover every subcommand.
198
198
  | Command | Description |
199
199
  |---|---|
200
200
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
201
- | `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 |
202
202
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
203
203
  | `approval revoke / terminate / restart / retry` | Lifecycle |
204
204
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -209,7 +209,7 @@ discover every subcommand.
209
209
 
210
210
  | Command | Description |
211
211
  |---|---|
212
- | `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 |
213
213
  | `custom-page create / rename / copy / delete` | Lifecycle |
214
214
  | `custom-page component-types` | Component reference |
215
215
 
@@ -217,7 +217,7 @@ discover every subcommand.
217
217
 
218
218
  | Command | Description |
219
219
  |---|---|
220
- | `contact search / resolve` | Find members by keyword / name / email / phone |
220
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
221
221
  | `contact friends / friend-requests` | Address book |
222
222
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
223
223
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -162,7 +162,7 @@ discover every subcommand.
162
162
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | Feature switches |
163
163
  | `worksheet form-settings / save-form-settings` | Form submission settings |
164
164
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | Custom action buttons |
165
- | `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 |
166
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) |
167
167
 
168
168
  ### worksheet record — record CRUD
@@ -198,7 +198,7 @@ discover every subcommand.
198
198
  | Command | Description |
199
199
  |---|---|
200
200
  | `approval todo / todo-count / done-count / todo-filters / archived` | Pending, finished and archived |
201
- | `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 |
202
202
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | Act on a task (signature, attachments and the next step's approvers included) |
203
203
  | `approval revoke / terminate / restart / retry` | Lifecycle |
204
204
  | `approval batch / retry-batch / end-batch` | Bulk variants |
@@ -209,7 +209,7 @@ discover every subcommand.
209
209
 
210
210
  | Command | Description |
211
211
  |---|---|
212
- | `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 |
213
213
  | `custom-page create / rename / copy / delete` | Lifecycle |
214
214
  | `custom-page component-types` | Component reference |
215
215
 
@@ -217,7 +217,7 @@ discover every subcommand.
217
217
 
218
218
  | Command | Description |
219
219
  |---|---|
220
- | `contact search / resolve` | Find members by keyword / name / email / phone |
220
+ | `contact search / resolve / info` | Find members by keyword / name / email / phone |
221
221
  | `contact friends / friend-requests` | Address book |
222
222
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | Friend management |
223
223
  | `contact org-roles / org-role-members` | Organization roles and who holds them |
@@ -146,7 +146,7 @@ hap --json worksheet record list WORKSHEET_ID
146
146
  | `worksheet switches / switch-types / edit-switch / batch-edit-switch` | 功能开关 |
147
147
  | `worksheet form-settings / save-form-settings` | 表单提交/高级设置 |
148
148
  | `worksheet custom-actions / create-custom-action / delete-custom-action` | 自定义动作按钮 |
149
- | `worksheet chart list / get / create / update / delete` | 工作表统计图 |
149
+ | `worksheet chart list / get / create / update / delete / sort / copy / move / set-owner` | 工作表统计图 |
150
150
  | `worksheet view list / info / create / copy / delete / sort` | 视图管理(`list --deleted` 看回收站;视图规格可给表格分组、限定列、指定插件) |
151
151
 
152
152
  ### worksheet record — 记录 CRUD
@@ -180,7 +180,7 @@ hap --json worksheet record list WORKSHEET_ID
180
180
  | 命令 | 说明 |
181
181
  |---|---|
182
182
  | `approval todo / todo-count / done-count / todo-filters / archived` | 待办、已办与归档 |
183
- | `approval get / work-item / operations / op-history / history / history-detail` | 实例状态 |
183
+ | `approval list-by-record / get / work-item / operations / op-history / history / history-detail` | 实例状态 |
184
184
  | `approval approve / reject / submit / sign / forward / transfer / undo-approval / urge` | 审批动作(含签名、附件、指定下一步审批人)|
185
185
  | `approval revoke / terminate / restart / retry` | 实例生命周期 |
186
186
  | `approval batch / retry-batch / end-batch` | 批量动作 |
@@ -191,7 +191,7 @@ hap --json worksheet record list WORKSHEET_ID
191
191
 
192
192
  | 命令 | 说明 |
193
193
  |---|---|
194
- | `custom-page info / save / update-config` | 读写布局 |
194
+ | `custom-page info / save / update-config / patch / structure / component / settings / update-settings / update-info` | 读写布局 |
195
195
  | `custom-page create / rename / copy / delete` | 生命周期 |
196
196
  | `custom-page component-types` | 组件参考 |
197
197
 
@@ -199,7 +199,7 @@ hap --json worksheet record list WORKSHEET_ID
199
199
 
200
200
  | 命令 | 说明 |
201
201
  |---|---|
202
- | `contact search / resolve` | 关键词搜索 / 解析 accountId |
202
+ | `contact search / resolve / info` | 关键词搜索 / 解析 accountId |
203
203
  | `contact friends / friend-requests` | 通讯录 |
204
204
  | `contact add-friend / accept-friend / reject-friend / ignore-friend / remove-friend` | 好友管理 |
205
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.19"
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,6 +26,9 @@ 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
@@ -41,6 +44,7 @@ from hap_cli.core import workflow as _wf_mod
41
44
  from hap_cli.core import record_lookups as _lookups
42
45
  from hap_cli.core import record_discussions as _discussions
43
46
  from hap_cli.i18n import t
47
+ from hap_cli.utils.confirm import confirm_or_abort
44
48
 
45
49
  _logger = logging.getLogger("hap_cli.record")
46
50
 
@@ -379,7 +383,7 @@ register_v3(record, "share-link", tool="get_record_share_link")
379
383
 
380
384
 
381
385
  # All triggerable-workflow tools (get_workflow_list / get_workflow_details
382
- # / trigger_workflow / get_approval_list_by_row) carry the ``ex`` tag in
386
+ # / trigger_workflow) carry the ``ex`` tag in
383
387
  # the apifox catalog — handled by the legacy implementations in
384
388
  # workflow_cmd.py and instance_cmd.py.
385
389
 
@@ -387,9 +391,7 @@ register_v3(record, "share-link", tool="get_record_share_link")
387
391
  # ── approval (workflow instance) ────────────────────────────────────────────
388
392
 
389
393
 
390
- # get_approval_list_by_row is tag-excluded; ``hap approval list-by-row``
391
- # is currently unavailable (no legacy implementation yet — tracked in
392
- # docs/v3-legacy-fallback.md).
394
+ # ``approval list-by-record`` is registered at the end of this file.
393
395
 
394
396
 
395
397
  # ── Endpoints the public V3 docs do not list yet ────────────────────────────
@@ -617,3 +619,152 @@ register_v3(share_card_group, "update", tool="update_share_card_setting",
617
619
  register_v3(workflow, "sms-templates", tool="get_workflow_sms_templates")
618
620
  register_v3(workflow, "validate", tool="validate_process")
619
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))