@microi.net/cli 5.7.7 → 5.7.9

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 (191) hide show
  1. package/.codebuddy-plugin/marketplace.json +2 -2
  2. package/.codebuddy-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.workbuddy-plugin/marketplace.json +2 -2
  5. package/.workbuddy-plugin/plugin.json +1 -1
  6. package/LICENSE +21 -21
  7. package/README.md +71 -71
  8. package/assets/build-meta.json +6 -6
  9. package/assets/feature-matrix.json +138 -138
  10. package/assets/logo.svg +4 -4
  11. package/cordis.patch.yml +1 -1
  12. package/package.json +1 -1
  13. package/scripts/mcp-codex-stdio-adapter.js +0 -0
  14. package/scripts/mcp-server.js +102 -101
  15. package/scripts/microi-cli.js +57 -57
  16. package/scripts/microi-codex-broker.js +450 -450
  17. package/scripts/microi-codex-router.js +0 -0
  18. package/scripts/microi-skills.meta.json +366 -366
  19. package/skills/.microi-skills-version.json +2 -2
  20. package/skills/.progressive-disclosure-manifest.json +27 -27
  21. package/skills/README.md +286 -286
  22. package/skills/ai-engine/SKILL.md +265 -265
  23. package/skills/ai-engine/agents/openai.yaml +4 -4
  24. package/skills/ai-platform-governance/SKILL.md +177 -177
  25. package/skills/ai-platform-governance/references/progressive-01-/345/212/237/350/203/275/345/274/200/345/205/263.md +190 -190
  26. package/skills/app-store/SKILL.md +392 -396
  27. package/skills/app-store/agents/openai.yaml +4 -4
  28. package/skills/business-blueprint/SKILL.md +193 -193
  29. package/skills/datasource-engine/SKILL.md +90 -90
  30. package/skills/datasource-engine/agents/openai.yaml +4 -4
  31. package/skills/dos-orm/references/api-reference.md +229 -229
  32. package/skills/email-engine/SKILL.md +78 -78
  33. package/skills/email-engine/references/v8-email.md +34 -34
  34. package/skills/job-engine/SKILL.md +171 -172
  35. package/skills/job-engine/agents/openai.yaml +4 -4
  36. package/skills/message-notification/SKILL.md +155 -156
  37. package/skills/message-notification/agents/openai.yaml +5 -5
  38. package/skills/message-notification/references/contracts.md +102 -102
  39. package/skills/microi-ai-app-auth.js +652 -652
  40. package/skills/microi-ai-application/SKILL.md +102 -106
  41. package/skills/microi-ai-application/agents/openai.yaml +4 -4
  42. package/skills/microi-ai-application/references/frontend-baseline.md +164 -164
  43. package/skills/microi-client-frontend/SKILL.md +235 -240
  44. package/skills/microi-client-frontend/references/progressive-01-3-/345/212/250/346/200/201/346/214/211/351/222/256/347/263/273/347/273/237.md +144 -144
  45. package/skills/microi-client-frontend/references/progressive-02-8-/350/277/220/350/241/214/346/227/266/351/253/230/351/242/221/345/235/221/345/244/215/347/233/230.md +196 -196
  46. package/skills/microi-client-frontend/references/progressive-03-vue3-/345/211/215/347/253/257/345/276/256/346/234/215/345/212/241/345/256/277/344/270/273/350/247/204/345/210/231.md +167 -167
  47. package/skills/microi-codex/SKILL.md +75 -75
  48. package/skills/microi-codex-installer/SKILL.md +225 -223
  49. package/skills/microi-codex-installer/agents/openai.yaml +7 -7
  50. package/skills/microi-datasource-mapping/SKILL.md +107 -111
  51. package/skills/microi-db-schema/SKILL.md +175 -175
  52. package/skills/microi-db-schema/agents/openai.yaml +4 -4
  53. package/skills/microi-db-schema/references/core-tables.md +695 -695
  54. package/skills/microi-db-schema/references/form-component-options.md +256 -256
  55. package/skills/microi-db-schema/references/schema-overview.md +202 -202
  56. package/skills/microi-db-schema/references/schema.md +646 -646
  57. package/skills/microi-db-schema/references/table-catalog.md +1599 -1599
  58. package/skills/microi-deployment/references/deployment-matrix.md +101 -101
  59. package/skills/microi-docs-coverage/references/capability-map.md +0 -1
  60. package/skills/microi-docs-coverage/scripts/audit-doc-skill-coverage.mjs +894 -894
  61. package/skills/microi-form-engine/SKILL.md +226 -226
  62. package/skills/microi-form-engine/references/component-catalog.md +216 -216
  63. package/skills/microi-form-engine/references/data-source-events.md +124 -124
  64. package/skills/microi-form-layout/SKILL.md +205 -205
  65. package/skills/microi-form-layout/references/progressive-01-3-/344/270/211/347/247/215/345/210/206/347/273/204/347/232/204/345/255/230/345/202/250/344/270/216/351/205/215/347/275/256.md +235 -235
  66. package/skills/microi-frontend-sdk/SKILL.md +188 -188
  67. package/skills/microi-frontend-sdk/references/progressive-01-token-/345/275/223/345/211/215/347/231/273/345/275/225/347/224/250/346/210/267/344/270/216/345/275/223/345/211/215/347/273/210/347/253/257/347/231/273/345/275/225/345/215/217/350/256/256.md +176 -176
  68. package/skills/microi-left-right-layout/SKILL.md +141 -141
  69. package/skills/microi-microservice/SKILL.md +322 -323
  70. package/skills/microi-microservice/references/runtime-delivery.md +278 -278
  71. package/skills/microi-mobile-app-quality/SKILL.md +181 -181
  72. package/skills/microi-mobile-app-quality/references/progressive-01-4-/351/207/215/350/246/201/346/214/211/351/222/256/345/277/205/351/241/273/345/270/246/345/233/276/346/240/207.md +213 -213
  73. package/skills/microi-mobile-app-quality/references/progressive-02-9-/344/270/273/351/242/230/345/210/207/346/215/242/345/277/205/351/241/273/347/234/237/345/256/236/344/270/224/345/205/250/345/261/200/347/224/237/346/225/210.md +128 -128
  74. package/skills/microi-solution-quotation/SKILL.md +78 -78
  75. package/skills/microi-solution-quotation/agents/openai.yaml +4 -4
  76. package/skills/microi-solution-quotation/scripts/build_solution_quote.py +296 -296
  77. package/skills/microi-sso/references/acceptance.md +49 -49
  78. package/skills/microi-sso/references/configuration-and-security.md +53 -53
  79. package/skills/microi-sso/references/inbound.md +53 -53
  80. package/skills/microi-sso/references/outbound.md +39 -39
  81. package/skills/microi-system-delivery/SKILL.md +134 -134
  82. package/skills/microi-system-delivery/references/progressive-01-/346/240/207/345/207/206/345/267/245/344/275/234/346/265/201.md +193 -193
  83. package/skills/microi-system-delivery/references/progressive-02-/350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/345/277/205/351/241/273/350/246/206/347/233/226/347/232/204/345/235/221.md +189 -189
  84. package/skills/microi-ui/SKILL.md +174 -174
  85. package/skills/microi-ui/references/progressive-01-/347/247/273/345/212/250/347/253/257/345/234/272/346/231/257/350/223/235/345/233/276.md +183 -183
  86. package/skills/microi-uniapp-frontend/SKILL.md +193 -193
  87. package/skills/microi-uniapp-frontend/references/progressive-01-/347/247/273/345/212/250/347/253/257/345/210/206/347/261/273-/345/217/214/346/240/217/345/210/227/350/241/250/347/213/254/347/253/213/346/273/232/345/212/250.md +225 -225
  88. package/skills/microi-uniapp-frontend/references/progressive-02-/345/205/263/351/224/256/344/270/232/345/212/241/350/265/204/344/272/247/344/270/215/345/276/227/351/273/230/350/256/244/351/200/211/344/270/255.md +154 -154
  89. package/skills/microi.v8.js +1921 -1921
  90. package/skills/module-engine/SKILL.md +237 -250
  91. package/skills/module-engine/references/module-config.md +204 -204
  92. package/skills/ocr-engine/SKILL.md +113 -113
  93. package/skills/ocr-engine/agents/openai.yaml +4 -4
  94. package/skills/page-engine/SKILL.md +180 -191
  95. package/skills/page-engine/references/progressive-01-/346/211/200/346/234/211/347/273/204/344/273/266/347/261/273/345/236/213.md +234 -234
  96. package/skills/page-engine/references/progressive-02-/347/211/210/346/234/254/345/216/206/345/217/262-/345/271/266/345/217/221/344/277/235/345/255/230/344/270/216/345/233/236/346/273/232.md +60 -60
  97. package/skills/performance-testing/SKILL.md +221 -221
  98. package/skills/playwright-e2e/SKILL.md +197 -197
  99. package/skills/playwright-e2e/references/progressive-01-/345/205/250/350/207/252/345/212/250/347/231/273/345/275/225-/345/205/215/351/252/214/350/257/201/347/240/201-/344/275/206/344/270/215/345/205/215/345/257/206/347/240/201-/345/277/205/350/257/273.md +173 -173
  100. package/skills/playwright-e2e/references/progressive-02-/346/226/207/345/255/227/345/257/271/346/257/224/345/272/246/344/270/216/345/217/257/350/257/273/346/200/247/350/207/252/345/212/250/345/214/226/346/243/200/346/237/245-/345/277/205/345/201/232.md +183 -183
  101. package/skills/playwright-e2e/references/progressive-03-microi-helper-/346/250/241/346/235/277.md +221 -221
  102. package/skills/playwright-e2e/references/progressive-04-ci-/345/273/272/350/256/256.md +115 -115
  103. package/skills/print-engine/SKILL.md +259 -259
  104. package/skills/production-readonly-audit/SKILL.md +41 -41
  105. package/skills/report-engine/SKILL.md +71 -71
  106. package/skills/report-engine/agents/openai.yaml +4 -4
  107. package/skills/scripts/optimize-progressive-disclosure.mjs +204 -204
  108. package/skills/scripts/refresh-progressive-disclosure.mjs +64 -64
  109. package/skills/search-engine/SKILL.md +75 -75
  110. package/skills/search-engine/agents/openai.yaml +4 -4
  111. package/skills/spider-engine/SKILL.md +190 -190
  112. package/skills/system-observability/SKILL.md +238 -238
  113. package/skills/system-observability/references/memory-incident-triage.md +70 -70
  114. package/skills/translate-engine/SKILL.md +140 -140
  115. package/skills/translate-engine/agents/openai.yaml +4 -4
  116. package/skills/ui-design/SKILL.md +191 -191
  117. package/skills/ui-design/assets/templates/MCI-DESIGN.md +198 -198
  118. package/skills/ui-design/references/design-pattern-library.md +184 -184
  119. package/skills/ui-design/references/mci-design-contract.md +163 -163
  120. package/skills/ui-design/references/progressive-01-/351/242/234/350/211/262/344/275/223/347/263/273-css-variables-/346/224/257/346/214/201/344/270/273/351/242/230/345/210/207/346/215/242.md +218 -218
  121. package/skills/ui-design/references/progressive-02-/345/255/227/344/275/223.md +137 -137
  122. package/skills/ui-design/references/progressive-03-/345/212/250/346/225/210/350/247/204/350/214/203-/344/270/260/345/257/214/344/275/206/344/270/215/345/215/241.md +235 -235
  123. package/skills/ui-design/references/progressive-04-/347/273/204/344/273/266/351/243/216/346/240/274/351/200/237/346/237/245.md +152 -152
  124. package/skills/ui-design/references/progressive-05-/347/247/273/345/212/250/347/253/257/344/270/223/347/224/250/350/247/204/350/214/203.md +238 -238
  125. package/skills/ui-design/references/progressive-06-/344/270/273/351/242/230/345/210/207/346/215/242/345/256/236/347/216/260.md +194 -194
  126. package/skills/ui-design/references/progressive-07-/351/200/237/346/237/245-/344/273/216/345/244/264/346/220/255/345/273/272/344/270/200/344/270/252/347/247/273/345/212/250/347/253/257/351/241/265/351/235/242.md +207 -207
  127. package/skills/ui-design/references/progressive-08-/350/241/250/345/215/225/345/210/206/347/273/204/350/247/204/350/214/203-tabs-vs-collapsegroup-/345/274/272/345/210/266.md +117 -117
  128. package/skills/uniapp-mall-assets/SKILL.md +176 -176
  129. package/skills/unity-integration/SKILL.md +155 -155
  130. package/skills/unity-integration/agents/openai.yaml +4 -4
  131. package/skills/unity-integration/references/ai-app-delivery.md +103 -103
  132. package/skills/unity-integration/references/sdk-api.md +82 -82
  133. package/skills/unity-integration/references/toolbox-migration.md +66 -66
  134. package/skills/unity-integration/references/webgl-hosting.md +57 -57
  135. package/skills/v8-cache-pattern/SKILL.md +306 -306
  136. package/skills/v8-crud-api/SKILL.md +175 -175
  137. package/skills/v8-crud-api/references/progressive-01-/346/237/245/350/257/242/345/210/227/350/241/250-/345/210/206/351/241/265.md +226 -226
  138. package/skills/v8-crud-api/references/progressive-02-where-/346/235/241/344/273/266/350/257/255/346/263/225/351/200/237/346/237/245.md +49 -49
  139. package/skills/v8-debugging/SKILL.md +284 -284
  140. package/skills/v8-explorer-tree/SKILL.md +228 -228
  141. package/skills/v8-export-import/SKILL.md +209 -209
  142. package/skills/v8-export-import/references/progressive-01-excellayout-/351/253/230/347/272/247/350/207/252/347/224/261/345/270/203/345/261/200.md +211 -211
  143. package/skills/v8-export-import/references/progressive-02-powerpoint-/345/257/274/345/207/272.md +202 -202
  144. package/skills/v8-export-import/references/progressive-03-/345/256/211/345/205/250-/346/200/247/350/203/275/346/263/250/346/204/217.md +42 -42
  145. package/skills/v8-file-upload/SKILL.md +256 -263
  146. package/skills/v8-file-upload/references/progressive-01-/345/205/254/346/234/211/346/241/266-vs-/347/247/201/346/234/211/346/241/266.md +101 -101
  147. package/skills/v8-file-upload/references/progressive-02-office-/346/226/207/344/273/266/345/234/250/347/272/277/347/274/226/350/276/221/347/211/210/346/234/254/345/217/267/350/247/204/345/210/231.md +150 -150
  148. package/skills/v8-formengine-http/SKILL.md +219 -219
  149. package/skills/v8-frontend-events/SKILL.md +178 -178
  150. package/skills/v8-frontend-events/references/bluetooth-print-api.md +135 -135
  151. package/skills/v8-frontend-events/references/bluetooth-print.md +246 -246
  152. package/skills/v8-frontend-events/references/progressive-01-/345/210/227/350/241/250/344/272/213/344/273/266.md +219 -219
  153. package/skills/v8-http-integration/SKILL.md +182 -182
  154. package/skills/v8-http-integration/references/progressive-01-get-/350/257/267/346/261/202.md +220 -220
  155. package/skills/v8-http-integration/references/progressive-02-/351/224/231/350/257/257/345/244/204/347/220/206/346/250/241/345/274/217.md +44 -44
  156. package/skills/v8-image-processing/SKILL.md +190 -190
  157. package/skills/v8-image-processing/agents/openai.yaml +4 -4
  158. package/skills/v8-image-processing/references/api-reference.md +623 -623
  159. package/skills/v8-menu-buttons/SKILL.md +180 -180
  160. package/skills/v8-menu-buttons/references/progressive-01-2-/346/214/211/351/222/256/345/257/271/350/261/241-schema.md +222 -222
  161. package/skills/v8-menu-buttons/references/progressive-02-8-/346/250/241/345/274/217-f-/345/220/216/345/217/260/344/273/273/345/212/241/346/214/211/351/222/256-/351/225/277/344/273/273/345/212/241.md +228 -228
  162. package/skills/v8-menu-buttons/references/progressive-03-10-/345/217/215/346/250/241/345/274/217-/351/201/277/345/205/215.md +104 -104
  163. package/skills/v8-mongodb/SKILL.md +192 -192
  164. package/skills/v8-mq-mqtt/SKILL.md +175 -176
  165. package/skills/v8-mq-mqtt/references/mqtt-production.md +342 -342
  166. package/skills/v8-mq-mqtt/references/progressive-01-v8-mqtt-iot-/347/211/251/350/201/224/347/275/221.md +181 -181
  167. package/skills/v8-mq-mqtt/scripts/check-mqtt-skill-coverage.mjs +203 -203
  168. package/skills/v8-saas-multi-tenant/SKILL.md +219 -219
  169. package/skills/v8-security/SKILL.md +168 -168
  170. package/skills/v8-security/references/progressive-01-2-/346/235/203/351/231/220/346/240/241/351/252/214.md +198 -198
  171. package/skills/v8-security/references/progressive-02-7-/346/227/245/345/277/227/350/256/260/345/275/225.md +158 -158
  172. package/skills/v8-sql-query/SKILL.md +302 -302
  173. package/skills/v8-table-event/SKILL.md +144 -144
  174. package/skills/v8-table-event/references/progressive-01-informv8-js-/350/241/250/345/215/225/346/211/223/345/274/200/344/272/213/344/273/266.md +197 -197
  175. package/skills/v8-table-event/references/progressive-02-/345/211/215/347/253/257/344/272/213/344/273/266/345/220/215-v8-eventname-/345/217/257/350/203/275/347/232/204/345/200/274.md +46 -46
  176. package/skills/v8-tcp-integration/SKILL.md +147 -147
  177. package/skills/v8-tcp-integration/agents/openai.yaml +4 -4
  178. package/skills/v8-template-engine/SKILL.md +167 -167
  179. package/skills/v8-utilities/SKILL.md +90 -90
  180. package/skills/v8-utilities/references/client-api-index.md +143 -143
  181. package/skills/v8-utilities/references/platform-http-routes.md +83 -83
  182. package/skills/v8-utilities/references/server-api-index.md +188 -188
  183. package/skills/v8-workflow/SKILL.md +216 -243
  184. package/skills/v8-workflow/references/progressive-01-/350/212/202/347/202/271/345/274/200/345/247/213-v8-/344/272/213/344/273/266.md +180 -180
  185. package/skills/vision-engine/SKILL.md +159 -159
  186. package/skills/vision-engine/agents/openai.yaml +4 -4
  187. package/skills/vision-engine/references/architecture-and-acceptance.md +194 -194
  188. package/skills/workspace-conventions/SKILL.md +261 -261
  189. package/skills/workspace-conventions/references/progressive-01-/347/211/210/346/234/254/346/233/264/346/226/260/346/227/245/345/277/227/344/277/235/346/212/244/350/247/204/345/210/231-/345/274/272/345/210/266.md +208 -208
  190. package/skills/workspace-conventions/references/progressive-02-microi-net-api-/346/234/254/345/234/260/345/220/257/345/212/250/347/272/246/345/256/232.md +216 -216
  191. package/skills/workspace-conventions/references/progressive-03-cli-/344/270/216-ide-/346/217/222/344/273/266/351/224/231/347/211/210/345/205/261/345/255/230/347/272/246/345/256/232.md +27 -27
@@ -1,96 +1,96 @@
1
- ---
2
- name: v8-utilities
3
- description: Microi V8 全局对象、上下文变量和通用函数索引。用于查询某个 V8 函数是否存在、区分前端与后端 API,或使用 V8.Method、Base64、EncryptHelper、V8.WeChat、Action、CurrentUser、SysConfig、OsClient、扫码和客户端导航工具。
4
- ---
5
-
6
- > **Codex 非阻塞自动更新:** 当前宿主为 Codex 时,吾码 CLI、Codex 插件与工作区 AI/MCP 由后台自动更新;需要诊断时读取 `../microi-codex-installer/SKILL.md`。更新失败、等待空闲或尚未重载均不得阻断当前、正在进行或新建任务。非 Codex 宿主跳过此项。
7
-
8
- # Microi V8 通用能力与函数索引
9
-
10
- 本 Skill 是 V8 能力的路由入口,不替代 CRUD、HTTP、缓存、文件、图片、Office、
11
- 工作流等专项 Skill。遇到“吾码有没有某个函数”“这个 API 在前端还是后端”
12
- 或官网函数列表同步任务时,先在这里确定运行端和正式名称,再读取专项 Skill。
13
-
14
- ## 先判断运行端
15
-
16
- | 运行端 | 典型位置 | API 特征 |
17
- |---|---|---|
18
- | 前端 | 字段事件、按钮、列表、InFormV8、SubmitFormV8、OutFormV8 | 浏览器 Promise/回调、弹窗、路由、`V8.Print`、扫码 |
19
- | 后端 | 接口引擎、SubmitBeforeServerV8、SubmitAfterServerV8、DataFilterV8 | `V8.Db`、事务、缓存、Office、加密、服务端 HTTP |
20
-
21
- 同名对象不保证两端方法一致。例如前端 `V8.Base64.encode/decode` 与后端
22
- `V8.Base64.StringToBase64/Base64ToString` 不同;前端标准运行时没有公开
23
- `V8.ModuleEngine`,后端才有模块引擎对象。
24
-
25
- ## 必读索引
26
-
27
- - 前端全部上下文、表单/列表、导航、网络、引擎和工具:
28
- `references/client-api-index.md`
29
- - 后端上下文、`V8.Method`、Base64、加密、异步与扩展对象:
30
- `references/server-api-index.md`
31
- - 平台 HTTP 路由、动态路由与管理接口边界:
32
- `references/platform-http-routes.md`
33
- - 蓝牙标签/小票打印:
34
- `../v8-frontend-events/references/bluetooth-print.md`
35
-
36
- 若函数未出现在上述索引或当前源码定义中,不得按名字猜测。先搜索
37
- `Microi.Client/src/views/form-engine/diy-components/v8-api-definitions.js`、
38
- `v8-api-server-definitions.js`、V8 宿主接口和官网中文函数列表。
39
-
40
- 邮箱相关能力读取 [email-engine](../email-engine/SKILL.md):`V8.Email` 包含
41
- `ProtectCredential / TestConnection / ListFolders / Fetch / Inspect / GetMessage /
42
- GetAttachment / SetFlags / Move / Send / StoreSent`。
43
- 业务使用 `mci-email` 接口引擎,MCP 使用 `microi_email_query / microi_email_manage / microi_email_send`。
44
-
45
- ## 常用通用写法
46
-
47
- ```javascript
48
- // 两端通用的租户/用户上下文,具体字段按当前上下文判空
49
- var osClient = V8.OsClient;
50
- var userId = V8.CurrentUser && V8.CurrentUser.Id;
51
-
52
- // 后端稳定标识与时间
53
- var id = V8.Method.NewUlid();
54
- var now = DateNow('yyyy-MM-dd HH:mm:ss');
55
- var timestamp = V8.Method.GetTimestamp();
56
-
57
- // 后端 Base64
58
- var encoded = V8.Base64.StringToBase64('吾码');
59
- var decoded = V8.Base64.Base64ToString(encoded);
60
-
61
- // 前端 Base64
62
- var clientEncoded = V8.Base64.encode('吾码');
63
- var clientDecoded = V8.Base64.decode(clientEncoded);
64
- ```
65
-
1
+ ---
2
+ name: v8-utilities
3
+ description: Microi V8 全局对象、上下文变量和通用函数索引。用于查询某个 V8 函数是否存在、区分前端与后端 API,或使用 V8.Method、Base64、EncryptHelper、V8.WeChat、Action、CurrentUser、SysConfig、OsClient、扫码和客户端导航工具。
4
+ ---
5
+
6
+ > **Codex 非阻塞自动更新:** 当前宿主为 Codex 时,吾码 CLI、Codex 插件与工作区 AI/MCP 由后台自动更新;需要诊断时读取 `../microi-codex-installer/SKILL.md`。更新失败、等待空闲或尚未重载均不得阻断当前、正在进行或新建任务。非 Codex 宿主跳过此项。
7
+
8
+ # Microi V8 通用能力与函数索引
9
+
10
+ 本 Skill 是 V8 能力的路由入口,不替代 CRUD、HTTP、缓存、文件、图片、Office、
11
+ 工作流等专项 Skill。遇到“吾码有没有某个函数”“这个 API 在前端还是后端”
12
+ 或官网函数列表同步任务时,先在这里确定运行端和正式名称,再读取专项 Skill。
13
+
14
+ ## 先判断运行端
15
+
16
+ | 运行端 | 典型位置 | API 特征 |
17
+ |---|---|---|
18
+ | 前端 | 字段事件、按钮、列表、InFormV8、SubmitFormV8、OutFormV8 | 浏览器 Promise/回调、弹窗、路由、`V8.Print`、扫码 |
19
+ | 后端 | 接口引擎、SubmitBeforeServerV8、SubmitAfterServerV8、DataFilterV8 | `V8.Db`、事务、缓存、Office、加密、服务端 HTTP |
20
+
21
+ 同名对象不保证两端方法一致。例如前端 `V8.Base64.encode/decode` 与后端
22
+ `V8.Base64.StringToBase64/Base64ToString` 不同;前端标准运行时没有公开
23
+ `V8.ModuleEngine`,后端才有模块引擎对象。
24
+
25
+ ## 必读索引
26
+
27
+ - 前端全部上下文、表单/列表、导航、网络、引擎和工具:
28
+ `references/client-api-index.md`
29
+ - 后端上下文、`V8.Method`、Base64、加密、异步与扩展对象:
30
+ `references/server-api-index.md`
31
+ - 平台 HTTP 路由、动态路由与管理接口边界:
32
+ `references/platform-http-routes.md`
33
+ - 蓝牙标签/小票打印:
34
+ `../v8-frontend-events/references/bluetooth-print.md`
35
+
36
+ 若函数未出现在上述索引或当前源码定义中,不得按名字猜测。先搜索
37
+ `Microi.Client/src/views/form-engine/diy-components/v8-api-definitions.js`、
38
+ `v8-api-server-definitions.js`、V8 宿主接口和官网中文函数列表。
39
+
40
+ 邮箱相关能力读取 [email-engine](../email-engine/SKILL.md):`V8.Email` 包含
41
+ `ProtectCredential / TestConnection / ListFolders / Fetch / Inspect / GetMessage /
42
+ GetAttachment / SetFlags / Move / Send / StoreSent`。
43
+ 业务使用 `mci-email` 接口引擎,MCP 使用 `microi_email_query / microi_email_manage / microi_email_send`。
44
+
45
+ ## 常用通用写法
46
+
47
+ ```javascript
48
+ // 两端通用的租户/用户上下文,具体字段按当前上下文判空
49
+ var osClient = V8.OsClient;
50
+ var userId = V8.CurrentUser && V8.CurrentUser.Id;
51
+
52
+ // 后端稳定标识与时间
53
+ var id = V8.Method.NewUlid();
54
+ var now = DateNow('yyyy-MM-dd HH:mm:ss');
55
+ var timestamp = V8.Method.GetTimestamp();
56
+
57
+ // 后端 Base64
58
+ var encoded = V8.Base64.StringToBase64('吾码');
59
+ var decoded = V8.Base64.Base64ToString(encoded);
60
+
61
+ // 前端 Base64
62
+ var clientEncoded = V8.Base64.encode('吾码');
63
+ var clientDecoded = V8.Base64.decode(clientEncoded);
64
+ ```
65
+
66
66
  ## 能力选择
67
-
68
- - 日期基础函数由新版后端运行时自举,不能要求租户先配置 DateNow 才能安装应用。全局函数管理使用系统设置子表 `mci_global_function`,按 `SysConfigId + Runtime(Client/Server) + FunctionName` 隔离,一行一个同名 function 声明;用 `V8.Method.ValidateGlobalFunction` 只解析验证,不执行源码。
69
- - 原有前后端全局 V8 必须保留,合并顺序为内置日期、函数库、租户原有代码;同名原有函数优先。不得用官方全局脚本整段覆盖客户脚本。函数库种子 `InsertIfMissing`,不得升级覆盖客户已改源码。
67
+
68
+ - 日期基础函数由新版后端运行时自举,不能要求租户先配置 DateNow 才能安装应用。全局函数管理使用系统设置子表 `mci_global_function`,按 `SysConfigId + Runtime(Client/Server) + FunctionName` 隔离,一行一个同名 function 声明;用 `V8.Method.ValidateGlobalFunction` 只解析验证,不执行源码。
69
+ - 原有前后端全局 V8 必须保留,合并顺序为内置日期、函数库、租户原有代码;同名原有函数优先。不得用官方全局脚本整段覆盖客户脚本。函数库种子 `InsertIfMissing`,不得升级覆盖客户已改源码。
70
70
  - 列表和合并代码走 L1/Redis,表单引擎真实提交后更新租户版本并通知其它节点;回滚不变更版本。禁止通过直接 SQL 修改函数库规避失效。前端已打开页面需要刷新。
71
71
 
72
72
  ## 平台兼容入口索引
73
73
 
74
74
  下列旧 HTTP 地址仍由受控兼容链路识别,不能据此绕过 DiyToken、租户或权限校验:`/api/FormEngine/GetSysConfig`、`/api/Os/GetDateTimeNow`、`/api/SysLog/AddSysLog`、`/api/SysUser/`。畅捷通 V2 回调在接口引擎中编排,可信后端只提供当前租户绑定的 `V8.Method.DecodeChanjetCallbackV2` 原子。
75
-
76
- | 需求 | 专项 Skill |
77
- |---|---|
78
- | 表单 CRUD、`_Where` | `v8-crud-api`、`v8-sql-query` |
79
- | HTTP/第三方接口 | `v8-http-integration` |
80
- | TCP 原始字节/网络小票机/设备 | `v8-tcp-integration` |
81
- | Redis/Hash | `v8-cache-pattern` |
82
- | 文件/HDFS | `v8-file-upload` |
83
- | 图片 | `v8-image-processing` |
84
- | Excel/Word/PPT/邮件 | `v8-export-import` |
85
- | 微信支付签名、授权头、API v3 AES-GCM 解密 | `references/server-api-index.md`;安全边界见 `v8-security` |
86
- | 前端事件/打印/扫码 | `v8-frontend-events` |
87
- | 后端表单事件 | `v8-table-event` |
88
- | 接口配置/流式响应/异步/后台任务 | `v8-api-config` |
89
-
90
- ## 不可越过的边界
91
-
92
- - 平台能力优先使用 `V8.*`,不要假设全局 `System` 可访问任意 CLR 类型。
93
- - `V8.SysConfig`、`V8.OsClientModel`、`V8.ClientModel` 可能含连接串、密钥和供应商配置,不直接返回前端或写日志。
94
- - 摘要算法不是密码存储。新密码不使用 MD5/SHA1/SHA256 直接保存。
95
- - `setTimeout`、`Task.Run` 不能承担请求返回后的可靠后台执行。
96
- - 前端值只可用于交互;权限、事务和最终业务校验必须在可信后端执行。
75
+
76
+ | 需求 | 专项 Skill |
77
+ |---|---|
78
+ | 表单 CRUD、`_Where` | `v8-crud-api`、`v8-sql-query` |
79
+ | HTTP/第三方接口 | `v8-http-integration` |
80
+ | TCP 原始字节/网络小票机/设备 | `v8-tcp-integration` |
81
+ | Redis/Hash | `v8-cache-pattern` |
82
+ | 文件/HDFS | `v8-file-upload` |
83
+ | 图片 | `v8-image-processing` |
84
+ | Excel/Word/PPT/邮件 | `v8-export-import` |
85
+ | 微信支付签名、授权头、API v3 AES-GCM 解密 | `references/server-api-index.md`;安全边界见 `v8-security` |
86
+ | 前端事件/打印/扫码 | `v8-frontend-events` |
87
+ | 后端表单事件 | `v8-table-event` |
88
+ | 接口配置/流式响应/异步/后台任务 | `v8-api-config` |
89
+
90
+ ## 不可越过的边界
91
+
92
+ - 平台能力优先使用 `V8.*`,不要假设全局 `System` 可访问任意 CLR 类型。
93
+ - `V8.SysConfig`、`V8.OsClientModel`、`V8.ClientModel` 可能含连接串、密钥和供应商配置,不直接返回前端或写日志。
94
+ - 摘要算法不是密码存储。新密码不使用 MD5/SHA1/SHA256 直接保存。
95
+ - `setTimeout`、`Task.Run` 不能承担请求返回后的可靠后台执行。
96
+ - 前端值只可用于交互;权限、事务和最终业务校验必须在可信后端执行。
@@ -1,143 +1,143 @@
1
- # 前端 V8 API 索引
2
-
3
- 本索引对应 `microi.doc/docs/doc/v8-engine/v8-client.md` 和当前
4
- `Microi.Client` V8 定义。业务表字段如 `V8.Form.OrderNo` 不属于平台函数,
5
- 应按实际表结构理解。
6
-
7
- ## 上下文与状态
8
-
9
- | API/变量 | 说明 |
10
- |---|---|
11
- | `V8.Form`、`V8.OldForm` | 当前表单与已加载旧值 |
12
- | `V8.FormMode` | `Add`、`Edit`、`View` |
13
- | `V8.FormSubmitAction` | 提交动作 |
14
- | `V8.FormOutAction`、`V8.FormOutAfterAction` | 表单关闭/保存后的动作状态 |
15
- | `V8.LoadMode` | `Design` 或真实运行模式 |
16
- | `V8.EventName`、`V8.Event`、`V8.KeyCode` | 当前事件、原生事件和键码 |
17
- | `V8.ThisValue`、`V8.OldValue` | 当前字段值;`OldValue` 主要用于表格行内事件 |
18
- | `V8.TableId`、`V8.TableName`、`V8.TableModel` | 当前表/表单元数据 |
19
- | `V8.Row`、`V8.Rows`、`V8.RowIndex`、`V8.TableRowId` | 行事件上下文 |
20
- | `V8.TableRowSelected`、`V8.SelectedData` | 批量选中行,兼容别名 |
21
- | `V8.CurrentTableData` | 当前页表格数据 |
22
- | `V8.SearchParam` | 当前搜索快照 |
23
- | `V8.SysMenuId`、`V8.SysMenuModel` | 当前授权菜单 |
24
- | `V8.CurrentUser`、`V8.CurrentToken` | 当前用户和 Token;不得输出到日志/URL |
25
- | `V8.OsClient`、`V8.SysConfig`、`V8.ClientType` | 租户、客户端配置和终端类型 |
26
- | `V8.DataAppend` | 打开表单、列表或弹窗时传入的附加数据 |
27
- | `V8.ParentV8`、`V8.ParentForm` | 子表/弹窗访问父上下文 |
28
- | `V8.ParentV8.Form` | 读取父级表单数据 |
29
- | `V8.ParentV8.FormSet(field,value)` | 从子表调用父表字段赋值与联动 |
30
- | `V8.ApiReplace` | 当前表单/列表接口替换配置,只读使用 |
31
- | `V8.Result` | 模板或事件输出槽 |
32
-
33
- ## 表单与字段
34
-
35
- | API | 说明 |
36
- |---|---|
37
- | `V8.FormSet(field,value)` | 设置字段值并触发相应联动 |
38
- | `V8.Field` | 当前字段模型集合 |
39
- | `V8.FieldSet(field,prop,value)` | 修改 `Visible/Required/Readonly/Data` 等属性 |
40
- | `V8.FormSubmit(options)` | 提交表单;SubmitFormV8 内不得再次调用 |
41
- | `V8.FormClose()` | 强制关闭表单 |
42
- | `V8.CloseThisDialog()` | 关闭当前宿主弹窗/微应用弹窗 |
43
- | `V8.ReloadForm()` | 重新加载当前表单 |
44
- | `V8.HideFormBtn(...)` | 隐藏表单按钮 |
45
- | `V8.HideFormTab(name)`、`V8.ShowFormTab(name)`、`V8.ClickFormTab(name)` | 页签显隐与切换 |
46
- | `V8.GetFormTabs()` | 获取当前表单页签 |
47
- | `V8.ShowTableChildHideField(child,fields)` | 强制显示子表隐藏列并刷新 |
48
- | `V8.GetChildTableData(fieldName)` | 获取指定子表数据 |
49
- | `V8.RefreshChildTable(field,row?)` | 刷新子表 |
50
-
51
- ## 列表与搜索
52
-
53
- | API | 说明 |
54
- |---|---|
55
- | `V8.RefreshTable({_PageIndex})` | 刷新当前列表 |
56
- | `V8.SearchSet(value)` | 替换当前模块搜索条件 |
57
- | `V8.SearchAppend(value)` | 追加当前模块搜索条件 |
58
- | `V8.OpenTableSetWhere(field,where)` | 设置弹出表格不可被临时搜索覆盖的固定范围 |
59
- | `V8.AppendSearchChildTable(field,value)` | 历史兼容;新代码优先 `OpenTableSetWhere` |
60
- | `V8.TableSearchSet(field,value)` | 替换指定子表/表格搜索 |
61
- | `V8.TableSearchAppend(field,value)` | 追加指定子表/表格搜索 |
62
- | `V8.TableRefresh(field,param)` | 刷新指定子表/表格 |
63
- | `V8.ClearTableSelection()` | 清空当前列表勾选 |
64
-
65
- ## 交互与导航
66
-
67
- | API | 说明 |
68
- |---|---|
69
- | `V8.Tips(msg,ok?)` | 消息提示 |
70
- | `V8.ConfirmTips(content,callback,options?)` | HTML 模式确认框,只传可信/转义内容 |
71
- | `V8.Router.Push(...)` | 站内路由 |
72
- | `V8.Window.Open(...)` | 打开窗口 |
73
- | `V8.OpenForm(...)`、`V8.OpenFormWF(...)` | 历史表单/工作流打开入口 |
74
- | `V8.OpenAnyForm(options)` | 打开任意表单 |
75
- | `V8.OpenAnyTable(options)` | 打开任意列表 |
76
- | `V8.OpenDialog(options)` | 打开主前端已注册 Vue 组件 |
77
- | `V8.OpenAppDialog(options)` | 打开已发布 MicroService 页面 |
78
- | `V8.WF.StartWork(...)`、`V8.FormWF` | 前端工作流入口/当前工作流数据 |
79
-
80
- 三个以上输入、上传、表格、步骤条、Tab 或代码编辑器使用
81
- `V8.OpenAppDialog`,不要在 V8 代码中拼大段 HTML。
82
-
83
- ## 网络与引擎
84
-
85
- | API | 说明 |
86
- |---|---|
87
- | `V8.Http.Get(options)`、`V8.Http.Post(options)`、`V8.Http.PatchResponse(options)` | 推荐前端 HTTP Promise API |
88
- | `V8.Post(...)`、`V8.Get(...)` | 历史回调 API,兼容保留 |
89
- | `V8.ApiEngine.Run(...)` | 调用接口引擎,支持 Promise/回调 |
90
- | `V8.ApiEngine.RunBackground(...)` | 提交持久后台任务 |
91
- | `V8.DataSourceEngine` | 前端数据源引擎对象 |
92
- | `V8.DataSourceEngine.Run(...)` | 运行数据源引擎;旧 `GetData` 已弃用 |
93
- | `V8.FormEngine.GetTableData(...)` | 查询列表 |
94
- | `V8.FormEngine.GetFormData(...)` | 查询单条 |
95
- | `V8.FormEngine.DelFormData(...)` | 删除;权限仍由服务端校验 |
96
-
97
- 前端 `V8.FormEngine` 真实方法以当前客户端定义为准,均可按 Promise 使用;
98
- 不要给前端方法虚构后端专用的 `GetTableDataAsync` 名称。标准前端运行时没有公开
99
- `V8.ModuleEngine`,模块关联查询使用接口引擎、数据源引擎或受控 FormEngine。
100
-
101
- ## 工具能力
102
-
103
- | API | 说明 |
104
- |---|---|
105
- | `V8.IsNull(value)` | 兼容判断 `null/undefined/''/'null'/'undefined'` |
106
- | `V8.ChineseToPinyin(text,fullPyLen,type)` | 中文转拼音 |
107
- | `V8.NewGuid()` | 前端生成 GUID |
108
- | `await V8.NewServerGuid()` | 请求服务端生成 GUID |
109
- | `V8.Base64.encode(value)` | 前端 Base64 编码 |
110
- | `V8.Base64.decode(value)` | 前端 Base64 解码 |
111
- | `V8.Base64.isValid(value)` | 判断字符串是否为有效 Base64 |
112
- | `V8._` | Underscore 实例,如 `V8._.where(...)` |
113
- | `V8.Action.GetDateTimeNow()` | 兼容的前端全局时间函数 |
114
- | `V8.AddSysLog(...)` | 前端发起系统日志记录;不得含秘密 |
115
- | `V8.SendSystemMessage(...)` | 发送站内系统消息 |
116
- | `await V8.Method.ScanCode()` | 扫码;成功值同时写入 `V8.ScanCodeRes` |
117
- | `V8.Print.*` | TSPL/CPCL/ESC-POS 蓝牙标签与小票打印,兼容 GP-M322、CC4,见蓝牙打印参考 |
118
- | `V8.Identity.GetCapabilities()` | 读取当前租户强身份能力和本人登记状态 |
119
- | `V8.Identity.CreateActionHash(value)` | 为稳定业务命令生成 SHA-256 摘要 |
120
- | `V8.Identity.RegisterPasskey(options?)` | 登记当前用户 Passkey |
121
- | `V8.Identity.Verify({Purpose,ActionHash,Method,Code?})` | 完成 Passkey、Authenticator TOTP 或严格人脸验证并取得一次性后端票据;Totp 需 6 位 Code |
122
-
123
- 扫码应优先接收 Promise 返回值;兼容代码可在调用后读取 `V8.ScanCodeRes`。
124
- `V8.Identity` 是强身份验证模块。`V8.Identity.Verify` 的成功结果不能直接授权业务;后端必须重读权威数据、重算摘要并调用 `V8.Method.ConsumeIdentityVerificationTicket`。
125
- 蓝牙打印完整 API 包含 `V8.Print.createNew`、`V8.Print.createNewESC`、
126
- `V8.Print.OpenBluetoothPage`、`V8.Print.isConnected`、
127
- `V8.Print.reconnect`、`V8.Print.getConnectionState`、`V8.Print.subscribeConnection`、
128
- `V8.Print.getPrinterProfile`、`V8.Print.setPrinterProfile`、
129
- `V8.Print.prepareSend`、`V8.Print.Send`、`V8.Print.setOneTimeData`、
130
- `V8.Print.setPrinterNum`、`V8.Print.disconnect` 和
131
- `V8.Print.BLEInformation`。其中 `Send` 依赖 `prepareSend` 设置的共享分包游标,
132
- 只作内部状态机入口;业务代码必须调用并 `await prepareSend`。当前挂载范围、连接
133
- 真实性、佳博原 TSPL 回归、CC4 CPCL 适配、Android SPP 与串行约束见
134
- [`bluetooth-print.md`](../../v8-frontend-events/references/bluetooth-print.md),TSC/ESC
135
- 完整方法见
136
- [`bluetooth-print-api.md`](../../v8-frontend-events/references/bluetooth-print-api.md)。
137
-
138
- ## 主前端源码帮助对象
139
-
140
- `DiyCommon.GetApiBase()` 是 `Microi.Client` 主前端源码内部取得 API 根地址的帮助
141
- 方法,不属于租户前端 V8 的稳定公开对象。V8 代码优先使用受控 `V8.Http` 和
142
- `V8.SysConfig.ApiBase`;MicroService 从宿主数据读取 `apiBase`,不要假设子应用
143
- 全局存在 `DiyCommon`。
1
+ # 前端 V8 API 索引
2
+
3
+ 本索引对应 `microi.doc/docs/doc/v8-engine/v8-client.md` 和当前
4
+ `Microi.Client` V8 定义。业务表字段如 `V8.Form.OrderNo` 不属于平台函数,
5
+ 应按实际表结构理解。
6
+
7
+ ## 上下文与状态
8
+
9
+ | API/变量 | 说明 |
10
+ |---|---|
11
+ | `V8.Form`、`V8.OldForm` | 当前表单与已加载旧值 |
12
+ | `V8.FormMode` | `Add`、`Edit`、`View` |
13
+ | `V8.FormSubmitAction` | 提交动作 |
14
+ | `V8.FormOutAction`、`V8.FormOutAfterAction` | 表单关闭/保存后的动作状态 |
15
+ | `V8.LoadMode` | `Design` 或真实运行模式 |
16
+ | `V8.EventName`、`V8.Event`、`V8.KeyCode` | 当前事件、原生事件和键码 |
17
+ | `V8.ThisValue`、`V8.OldValue` | 当前字段值;`OldValue` 主要用于表格行内事件 |
18
+ | `V8.TableId`、`V8.TableName`、`V8.TableModel` | 当前表/表单元数据 |
19
+ | `V8.Row`、`V8.Rows`、`V8.RowIndex`、`V8.TableRowId` | 行事件上下文 |
20
+ | `V8.TableRowSelected`、`V8.SelectedData` | 批量选中行,兼容别名 |
21
+ | `V8.CurrentTableData` | 当前页表格数据 |
22
+ | `V8.SearchParam` | 当前搜索快照 |
23
+ | `V8.SysMenuId`、`V8.SysMenuModel` | 当前授权菜单 |
24
+ | `V8.CurrentUser`、`V8.CurrentToken` | 当前用户和 Token;不得输出到日志/URL |
25
+ | `V8.OsClient`、`V8.SysConfig`、`V8.ClientType` | 租户、客户端配置和终端类型 |
26
+ | `V8.DataAppend` | 打开表单、列表或弹窗时传入的附加数据 |
27
+ | `V8.ParentV8`、`V8.ParentForm` | 子表/弹窗访问父上下文 |
28
+ | `V8.ParentV8.Form` | 读取父级表单数据 |
29
+ | `V8.ParentV8.FormSet(field,value)` | 从子表调用父表字段赋值与联动 |
30
+ | `V8.ApiReplace` | 当前表单/列表接口替换配置,只读使用 |
31
+ | `V8.Result` | 模板或事件输出槽 |
32
+
33
+ ## 表单与字段
34
+
35
+ | API | 说明 |
36
+ |---|---|
37
+ | `V8.FormSet(field,value)` | 设置字段值并触发相应联动 |
38
+ | `V8.Field` | 当前字段模型集合 |
39
+ | `V8.FieldSet(field,prop,value)` | 修改 `Visible/Required/Readonly/Data` 等属性 |
40
+ | `V8.FormSubmit(options)` | 提交表单;SubmitFormV8 内不得再次调用 |
41
+ | `V8.FormClose()` | 强制关闭表单 |
42
+ | `V8.CloseThisDialog()` | 关闭当前宿主弹窗/微应用弹窗 |
43
+ | `V8.ReloadForm()` | 重新加载当前表单 |
44
+ | `V8.HideFormBtn(...)` | 隐藏表单按钮 |
45
+ | `V8.HideFormTab(name)`、`V8.ShowFormTab(name)`、`V8.ClickFormTab(name)` | 页签显隐与切换 |
46
+ | `V8.GetFormTabs()` | 获取当前表单页签 |
47
+ | `V8.ShowTableChildHideField(child,fields)` | 强制显示子表隐藏列并刷新 |
48
+ | `V8.GetChildTableData(fieldName)` | 获取指定子表数据 |
49
+ | `V8.RefreshChildTable(field,row?)` | 刷新子表 |
50
+
51
+ ## 列表与搜索
52
+
53
+ | API | 说明 |
54
+ |---|---|
55
+ | `V8.RefreshTable({_PageIndex})` | 刷新当前列表 |
56
+ | `V8.SearchSet(value)` | 替换当前模块搜索条件 |
57
+ | `V8.SearchAppend(value)` | 追加当前模块搜索条件 |
58
+ | `V8.OpenTableSetWhere(field,where)` | 设置弹出表格不可被临时搜索覆盖的固定范围 |
59
+ | `V8.AppendSearchChildTable(field,value)` | 历史兼容;新代码优先 `OpenTableSetWhere` |
60
+ | `V8.TableSearchSet(field,value)` | 替换指定子表/表格搜索 |
61
+ | `V8.TableSearchAppend(field,value)` | 追加指定子表/表格搜索 |
62
+ | `V8.TableRefresh(field,param)` | 刷新指定子表/表格 |
63
+ | `V8.ClearTableSelection()` | 清空当前列表勾选 |
64
+
65
+ ## 交互与导航
66
+
67
+ | API | 说明 |
68
+ |---|---|
69
+ | `V8.Tips(msg,ok?)` | 消息提示 |
70
+ | `V8.ConfirmTips(content,callback,options?)` | HTML 模式确认框,只传可信/转义内容 |
71
+ | `V8.Router.Push(...)` | 站内路由 |
72
+ | `V8.Window.Open(...)` | 打开窗口 |
73
+ | `V8.OpenForm(...)`、`V8.OpenFormWF(...)` | 历史表单/工作流打开入口 |
74
+ | `V8.OpenAnyForm(options)` | 打开任意表单 |
75
+ | `V8.OpenAnyTable(options)` | 打开任意列表 |
76
+ | `V8.OpenDialog(options)` | 打开主前端已注册 Vue 组件 |
77
+ | `V8.OpenAppDialog(options)` | 打开已发布 MicroService 页面 |
78
+ | `V8.WF.StartWork(...)`、`V8.FormWF` | 前端工作流入口/当前工作流数据 |
79
+
80
+ 三个以上输入、上传、表格、步骤条、Tab 或代码编辑器使用
81
+ `V8.OpenAppDialog`,不要在 V8 代码中拼大段 HTML。
82
+
83
+ ## 网络与引擎
84
+
85
+ | API | 说明 |
86
+ |---|---|
87
+ | `V8.Http.Get(options)`、`V8.Http.Post(options)`、`V8.Http.PatchResponse(options)` | 推荐前端 HTTP Promise API |
88
+ | `V8.Post(...)`、`V8.Get(...)` | 历史回调 API,兼容保留 |
89
+ | `V8.ApiEngine.Run(...)` | 调用接口引擎,支持 Promise/回调 |
90
+ | `V8.ApiEngine.RunBackground(...)` | 提交持久后台任务 |
91
+ | `V8.DataSourceEngine` | 前端数据源引擎对象 |
92
+ | `V8.DataSourceEngine.Run(...)` | 运行数据源引擎;旧 `GetData` 已弃用 |
93
+ | `V8.FormEngine.GetTableData(...)` | 查询列表 |
94
+ | `V8.FormEngine.GetFormData(...)` | 查询单条 |
95
+ | `V8.FormEngine.DelFormData(...)` | 删除;权限仍由服务端校验 |
96
+
97
+ 前端 `V8.FormEngine` 真实方法以当前客户端定义为准,均可按 Promise 使用;
98
+ 不要给前端方法虚构后端专用的 `GetTableDataAsync` 名称。标准前端运行时没有公开
99
+ `V8.ModuleEngine`,模块关联查询使用接口引擎、数据源引擎或受控 FormEngine。
100
+
101
+ ## 工具能力
102
+
103
+ | API | 说明 |
104
+ |---|---|
105
+ | `V8.IsNull(value)` | 兼容判断 `null/undefined/''/'null'/'undefined'` |
106
+ | `V8.ChineseToPinyin(text,fullPyLen,type)` | 中文转拼音 |
107
+ | `V8.NewGuid()` | 前端生成 GUID |
108
+ | `await V8.NewServerGuid()` | 请求服务端生成 GUID |
109
+ | `V8.Base64.encode(value)` | 前端 Base64 编码 |
110
+ | `V8.Base64.decode(value)` | 前端 Base64 解码 |
111
+ | `V8.Base64.isValid(value)` | 判断字符串是否为有效 Base64 |
112
+ | `V8._` | Underscore 实例,如 `V8._.where(...)` |
113
+ | `V8.Action.GetDateTimeNow()` | 兼容的前端全局时间函数 |
114
+ | `V8.AddSysLog(...)` | 前端发起系统日志记录;不得含秘密 |
115
+ | `V8.SendSystemMessage(...)` | 发送站内系统消息 |
116
+ | `await V8.Method.ScanCode()` | 扫码;成功值同时写入 `V8.ScanCodeRes` |
117
+ | `V8.Print.*` | TSPL/CPCL/ESC-POS 蓝牙标签与小票打印,兼容 GP-M322、CC4,见蓝牙打印参考 |
118
+ | `V8.Identity.GetCapabilities()` | 读取当前租户强身份能力和本人登记状态 |
119
+ | `V8.Identity.CreateActionHash(value)` | 为稳定业务命令生成 SHA-256 摘要 |
120
+ | `V8.Identity.RegisterPasskey(options?)` | 登记当前用户 Passkey |
121
+ | `V8.Identity.Verify({Purpose,ActionHash,Method,Code?})` | 完成 Passkey、Authenticator TOTP 或严格人脸验证并取得一次性后端票据;Totp 需 6 位 Code |
122
+
123
+ 扫码应优先接收 Promise 返回值;兼容代码可在调用后读取 `V8.ScanCodeRes`。
124
+ `V8.Identity` 是强身份验证模块。`V8.Identity.Verify` 的成功结果不能直接授权业务;后端必须重读权威数据、重算摘要并调用 `V8.Method.ConsumeIdentityVerificationTicket`。
125
+ 蓝牙打印完整 API 包含 `V8.Print.createNew`、`V8.Print.createNewESC`、
126
+ `V8.Print.OpenBluetoothPage`、`V8.Print.isConnected`、
127
+ `V8.Print.reconnect`、`V8.Print.getConnectionState`、`V8.Print.subscribeConnection`、
128
+ `V8.Print.getPrinterProfile`、`V8.Print.setPrinterProfile`、
129
+ `V8.Print.prepareSend`、`V8.Print.Send`、`V8.Print.setOneTimeData`、
130
+ `V8.Print.setPrinterNum`、`V8.Print.disconnect` 和
131
+ `V8.Print.BLEInformation`。其中 `Send` 依赖 `prepareSend` 设置的共享分包游标,
132
+ 只作内部状态机入口;业务代码必须调用并 `await prepareSend`。当前挂载范围、连接
133
+ 真实性、佳博原 TSPL 回归、CC4 CPCL 适配、Android SPP 与串行约束见
134
+ [`bluetooth-print.md`](../../v8-frontend-events/references/bluetooth-print.md),TSC/ESC
135
+ 完整方法见
136
+ [`bluetooth-print-api.md`](../../v8-frontend-events/references/bluetooth-print-api.md)。
137
+
138
+ ## 主前端源码帮助对象
139
+
140
+ `DiyCommon.GetApiBase()` 是 `Microi.Client` 主前端源码内部取得 API 根地址的帮助
141
+ 方法,不属于租户前端 V8 的稳定公开对象。V8 代码优先使用受控 `V8.Http` 和
142
+ `V8.SysConfig.ApiBase`;MicroService 从宿主数据读取 `apiBase`,不要假设子应用
143
+ 全局存在 `DiyCommon`。