weaver-work-cli 0.1.29 → 0.1.31

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 (185) hide show
  1. package/dist/chunks/archive-U766FTFH.js +2537 -0
  2. package/dist/chunks/archive-oa-DMWEKX3L.js +1317 -0
  3. package/dist/chunks/asset-TCR7VDEV.js +2109 -0
  4. package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
  5. package/dist/chunks/blog-EVZWGDVM.js +2157 -0
  6. package/dist/chunks/caizhilian-JOWS6SL5.js +10087 -0
  7. package/dist/chunks/calendar-5WNCV66Q.js +1195 -0
  8. package/dist/chunks/chunk-2DUV44UX.js +15606 -0
  9. package/dist/chunks/chunk-324YPTC2.js +1607 -0
  10. package/dist/chunks/chunk-65QMVWHS.js +231 -0
  11. package/dist/chunks/chunk-6V7ZLF34.js +387 -0
  12. package/dist/chunks/chunk-AC7KJWC5.js +358 -0
  13. package/dist/chunks/chunk-AJ62BGAW.js +29 -0
  14. package/dist/chunks/chunk-BUSC6UAE.js +43 -0
  15. package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
  16. package/dist/chunks/chunk-D4LTJSJD.js +477 -0
  17. package/dist/chunks/chunk-EG6ZU444.js +654 -0
  18. package/dist/chunks/chunk-EZALDOQH.js +383 -0
  19. package/dist/chunks/chunk-FMPJJYYI.js +106 -0
  20. package/dist/chunks/chunk-G2JSIUWF.js +769 -0
  21. package/dist/chunks/chunk-GCG2NMWR.js +703 -0
  22. package/dist/chunks/chunk-GPMFD4RD.js +75 -0
  23. package/dist/chunks/chunk-H3WDBYJW.js +508 -0
  24. package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
  25. package/dist/chunks/chunk-J7RJTZSV.js +5556 -0
  26. package/dist/chunks/chunk-LUSPKZKY.js +53 -0
  27. package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
  28. package/dist/chunks/chunk-NOODWMCL.js +584 -0
  29. package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
  30. package/dist/chunks/chunk-P26ZWSKU.js +73 -0
  31. package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
  32. package/dist/chunks/chunk-R2IJAK7T.js +464 -0
  33. package/dist/chunks/chunk-R7O5PUWO.js +205 -0
  34. package/dist/chunks/chunk-RCGYCOMG.js +6962 -0
  35. package/dist/chunks/chunk-VZTXRG6X.js +403 -0
  36. package/dist/chunks/chunk-WHD4XMRP.js +161 -0
  37. package/dist/chunks/chunk-YLCYX7LE.js +371 -0
  38. package/dist/chunks/chunk-ZEDWSH32.js +68 -0
  39. package/dist/chunks/continuation-2CKSBLA6.js +11 -0
  40. package/dist/chunks/continuation-HZIZRZBX.js +13 -0
  41. package/dist/chunks/continuation-NLECEJPX.js +11 -0
  42. package/dist/chunks/ebuilder-form-NJ4YK6CC.js +2276 -0
  43. package/dist/chunks/ehr-MMYN36VA.js +5241 -0
  44. package/dist/chunks/employee-SAK2QYXX.js +11 -0
  45. package/dist/chunks/esb-HIWHOU7Q.js +141 -0
  46. package/dist/chunks/fna-KBACQTA5.js +1444 -0
  47. package/dist/chunks/host-3OHS5QUX.js +21 -0
  48. package/dist/chunks/host-IG6KEH5Q.js +19 -0
  49. package/dist/chunks/host-KQL5N4HO.js +23 -0
  50. package/dist/chunks/host-LLSZQCWR.js +17 -0
  51. package/dist/chunks/hrm-LYEC67ZQ.js +244 -0
  52. package/dist/chunks/im-RN2UKAEU.js +252 -0
  53. package/dist/chunks/invoice-EEPHLAF6.js +5179 -0
  54. package/dist/chunks/jiuchuanhui-WVVZYSJE.js +1940 -0
  55. package/dist/chunks/lazy-dispatch-MDOFFL2S.js +28 -0
  56. package/dist/chunks/mail-LNQLTF6L.js +2695 -0
  57. package/dist/chunks/meeting-XSD3BDVQ.js +504 -0
  58. package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
  59. package/dist/chunks/okr-TMWTIU2K.js +2482 -0
  60. package/dist/chunks/plan-A2FSFA7T.js +2025 -0
  61. package/dist/chunks/project-T26QLBQF.js +1361 -0
  62. package/dist/chunks/registry-2VLUAESA.js +14 -0
  63. package/dist/chunks/registry-JCFEYXOE.js +18 -0
  64. package/dist/chunks/registry-NYPYMZXG.js +16 -0
  65. package/dist/chunks/registry-Q7OQJ3SU.js +19 -0
  66. package/dist/chunks/registry-ZJMJVWFA.js +19 -0
  67. package/dist/chunks/room-recommend-UR4ZDZS6.js +20 -0
  68. package/dist/chunks/schedule-5L2PM4M6.js +24 -0
  69. package/dist/chunks/state-Y2XBP6YE.js +15 -0
  70. package/dist/chunks/workflow-TR6PG2SL.js +245 -0
  71. package/dist/cmd/argv.js +45 -0
  72. package/dist/cmd/docs/index.js +3 -3
  73. package/dist/cmd/lazy-dispatch.js +20 -0
  74. package/dist/cmd/root.js +2 -4
  75. package/dist/cmd/setup/index.js +2 -2
  76. package/dist/cmd/skills/index.js +2 -2
  77. package/dist/core/package-paths.js +47 -0
  78. package/dist/index.js +163 -7
  79. package/dist/internal/e10/auth/xiaoe.js +3 -3
  80. package/dist/internal/e10/request-runtime.js +18 -62
  81. package/dist/internal/skills/detector.js +2 -2
  82. package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
  83. package/dist/shortcuts/contract/host.js +91 -35
  84. package/dist/shortcuts/contract/index.js +213 -0
  85. package/dist/shortcuts/contract/manifest.js +928 -0
  86. package/dist/shortcuts/contract/ooxml/docx.js +295 -0
  87. package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
  88. package/dist/shortcuts/contract/ooxml/zip.js +158 -0
  89. package/dist/shortcuts/contract/operations/assistant.js +1156 -0
  90. package/dist/shortcuts/contract/operations/clause-library.js +522 -0
  91. package/dist/shortcuts/contract/operations/compare.js +193 -0
  92. package/dist/shortcuts/contract/operations/credit-page.js +34 -0
  93. package/dist/shortcuts/contract/operations/flow.js +98 -0
  94. package/dist/shortcuts/contract/operations/page.js +66 -0
  95. package/dist/shortcuts/contract/operations/performance.js +733 -0
  96. package/dist/shortcuts/contract/operations/quote.js +557 -0
  97. package/dist/shortcuts/contract/operations/recommend.js +78 -0
  98. package/dist/shortcuts/contract/operations/registry.js +18 -0
  99. package/dist/shortcuts/contract/operations/review.js +83 -0
  100. package/dist/shortcuts/contract/operations/shared.js +37 -0
  101. package/dist/shortcuts/contract/operations/upload.js +108 -0
  102. package/dist/shortcuts/contract/operations/write.js +3 -2
  103. package/dist/shortcuts/index.js +140 -40
  104. package/dist/shortcuts/invoice/manifest.js +34 -11
  105. package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
  106. package/dist/shortcuts/invoice/operations/reim.js +81 -5
  107. package/dist/shortcuts/invoice/operations/shared.js +12 -5
  108. package/dist/shortcuts/meeting/host.js +45 -3
  109. package/dist/shortcuts/meeting/invitation/docx.js +442 -0
  110. package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
  111. package/dist/shortcuts/meeting/operations/attachment.js +442 -0
  112. package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
  113. package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
  114. package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
  115. package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
  116. package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
  117. package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
  118. package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
  119. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
  120. package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
  121. package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
  122. package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
  123. package/dist/shortcuts/meeting/operations/invitation.js +458 -0
  124. package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
  125. package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
  126. package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
  127. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  128. package/dist/shortcuts/meeting/operations/registry.js +18 -0
  129. package/dist/shortcuts/meeting/operations/summary.js +276 -0
  130. package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
  131. package/dist/shortcuts/meeting/operations.js +42 -1
  132. package/dist/shortcuts/meeting/qr/encoder.js +427 -0
  133. package/dist/shortcuts/meeting/qr/render.js +103 -0
  134. package/dist/shortcuts/workflow/operations/form.js +17 -5
  135. package/docs/contract.md +39 -4
  136. package/docs/invoice.md +5 -5
  137. package/package.json +3 -2
  138. package/scripts/bundle.mjs +63 -0
  139. package/skill-template/business-info.json +25 -4
  140. package/skill-template/domains/jinchengda.md +16 -3
  141. package/skill-template/domains/yepiaotong.md +1 -1
  142. package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
  143. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
  144. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
  148. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
  152. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
  153. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
  154. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
  155. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
  156. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
  157. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
  158. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
  159. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
  160. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
  161. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
  162. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
  163. package/skills/weaver-e10-meeting/SKILL.md +493 -17
  164. package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
  165. package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
  166. package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
  167. package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
  168. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
  169. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
  170. package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
  171. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
  172. package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
  173. package/skills/weaver-e10-meeting.zip +0 -0
  174. package/skills/weaver-e10-yepiaotong/SKILL.md +9 -5
  175. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
  176. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
  177. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
  178. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
  179. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
  180. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
  181. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
  182. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
  183. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
  184. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +6 -0
  185. package/templates/meeting/invitation.docx +0 -0
@@ -17,6 +17,453 @@ const pageNumSize = {
17
17
  };
18
18
  const idString = { type: 'string', pattern: '^[1-9]\\d*$', minLength: 1 };
19
19
  const SUBJECT_FORM_TAGS = ['我方签约主体库', '客户签约主体库', '供应商签约主体库'];
20
+ // ---------------------------------------------------------------- 智能助手(今承达合同 AI 助手)manifest 生成器
21
+ const jsonStringish = {
22
+ description: 'JSON 对象/数组,或其可解析的 JSON 字符串(服务端要求字符串字段的自动转换)',
23
+ anyOf: [{ type: 'string' }, { type: 'object' }, { type: 'array' }],
24
+ };
25
+ function assistantRead(name, fixed, properties = {}, required = []) {
26
+ return { name, risk: 'read', auth: AUTH, fixed, inputSchema: readSchema(properties, required) };
27
+ }
28
+ function assistantWrite(name, fixed, properties, required) {
29
+ return [
30
+ {
31
+ name: `${name}.prepare`,
32
+ risk: 'read-before-write',
33
+ auth: AUTH,
34
+ fixed,
35
+ inputSchema: readSchema(properties, required),
36
+ },
37
+ {
38
+ name: `${name}.apply`,
39
+ risk: 'high-risk-write',
40
+ auth: AUTH,
41
+ fixed,
42
+ inputSchema: readSchema({ ...properties, continuation: { type: 'string', minLength: 1 }, confirm: { type: 'boolean', enum: [true] } }, [...required, 'continuation', 'confirm']),
43
+ },
44
+ ];
45
+ }
46
+ const idsField = {
47
+ description: 'id 数组或逗号分隔字符串',
48
+ anyOf: [
49
+ { type: 'string', minLength: 1 },
50
+ { type: 'array', minItems: 1, items: idString },
51
+ ],
52
+ };
53
+ const contractAssistantOperationContracts = ([
54
+ assistantRead('contract.assistant.init', {
55
+ method: 'GET',
56
+ path: '/api/ebd/contract/audit/getAllEbConfig',
57
+ pollPath: '/api/ebd/contract/audit/getInitStatus',
58
+ }),
59
+ assistantRead('contract.assistant.meta', {
60
+ method: 'GET',
61
+ path: '/api/ebd/contract/ai/getEbData',
62
+ type: 'ai_background_config',
63
+ blockedTypes: ['ai_component_config(组件配置,合法但答非所问)', 'ai_compenent_config(错拼,不存在)'],
64
+ }),
65
+ assistantRead('contract.assistant.list', {
66
+ method: 'POST',
67
+ path: '/api/ebuilder/form/list/getListDatas',
68
+ metaPath: '/api/ebd/contract/ai/getEbData',
69
+ note: 'total 恒为 0(服务端行为),以返回行数为准',
70
+ }, {
71
+ name: { type: 'string', maxLength: 200, description: '按助手名称过滤(可选)' },
72
+ }),
73
+ assistantRead('contract.assistant.doc.query', {
74
+ method: 'POST',
75
+ path: '/api/ebd/contract/ai/config/queryAiDoc',
76
+ }, { ai_id: idString }, ['ai_id']),
77
+ assistantRead('contract.assistant.config.query', {
78
+ method: 'POST',
79
+ path: '/api/ebd/contract/ai/config/queryAiConfig',
80
+ }, {
81
+ ai_id: idString,
82
+ aiMark: { type: 'string', enum: ['Chat', 'Summary', 'ProcurementRisk', 'Control', 'Review', 'Correct', 'Extract', 'Credit', 'Signature', 'Compare', 'Desensitization', 'RiskReview', 'riskRuleComponent', 'consultComponent', 'termComponent', 'keywordComponent'] },
83
+ }, ['ai_id']),
84
+ assistantRead('contract.assistant.tips.query', {
85
+ method: 'POST',
86
+ path: '/api/ebd/contract/ai/tip/queryTips',
87
+ }, { ai_id: idString }, ['ai_id']),
88
+ assistantRead('contract.assistant.doc.folder.search', {
89
+ method: 'POST',
90
+ path: '/api/doc/common/browser/data/folder',
91
+ }, { name: { type: 'string', maxLength: 200 } }),
92
+ assistantRead('contract.assistant.keygroup.search', {
93
+ method: 'POST',
94
+ path: '/api/ebd/contract/common/browser/data/ebContractKeyGroupBrowser',
95
+ }, { name: { type: 'string', maxLength: 200 } }),
96
+ assistantRead('contract.assistant.rule.classification.list', {
97
+ method: 'POST',
98
+ path: '/api/ebd/contract/ai/queryList',
99
+ type: 'contract_classification',
100
+ }),
101
+ assistantRead('contract.assistant.rule.list', {
102
+ method: 'POST',
103
+ path: '/api/ebd/contract/ai/queryList',
104
+ type: 'contract_rule_datasource',
105
+ }, {
106
+ flid: idString,
107
+ pageNo: { type: 'integer', minimum: 1 },
108
+ pageSize: { type: 'integer', minimum: 1, maximum: 200 },
109
+ }),
110
+ assistantRead('contract.assistant.rule.group.query', {
111
+ method: 'POST',
112
+ path: '/api/ebd/contract/ai/config/queryCustomConfigRules',
113
+ }, { config_id: idString, configId: idString }, []),
114
+ assistantRead('contract.assistant.element.query', {
115
+ method: 'POST',
116
+ path: '/api/ebd/contract/ai/config/queryElementConfigRules',
117
+ }, { config_id: idString, configId: idString }, []),
118
+ assistantRead('contract.assistant.flow.list', {
119
+ method: 'POST',
120
+ path: '/api/ebd/contract/tool/permission/list/page',
121
+ componentId: '803297036482249914',
122
+ }, {
123
+ ai_id: idString,
124
+ rule_config_id: idString,
125
+ pageIndex: { type: 'integer', minimum: 1 },
126
+ pageSize: { type: 'integer', minimum: 1, maximum: 200 },
127
+ }, ['ai_id', 'rule_config_id']),
128
+ ...assistantWrite('contract.assistant.create', {
129
+ method: 'POST',
130
+ path: '/api/ebd/contract/ai/config/saveAiInfo',
131
+ }, {
132
+ ai_name: { type: 'string', minLength: 1, maxLength: 200 },
133
+ ai_desc: { type: 'string', maxLength: 500 },
134
+ type: idString,
135
+ type_name: { type: 'string', maxLength: 200 },
136
+ contract_stand: { type: 'string', enum: ['0', '1'] },
137
+ stand_name: { type: 'string', maxLength: 50 },
138
+ }, ['ai_name']),
139
+ ...assistantWrite('contract.assistant.delete', {
140
+ method: 'POST',
141
+ path: '/api/ebd/contract/ai/config/deleteAiInfo',
142
+ note: '对不存在的 id 也返回 success(假成功),apply 强制列表回读复核',
143
+ }, { ids: idsField }, ['ids']),
144
+ ...assistantWrite('contract.assistant.doc.save', {
145
+ method: 'POST',
146
+ path: '/api/ebd/contract/ai/config/saveAiDoc',
147
+ note: '同表按 id 覆盖;传 id 前 CLI 先经 queryAiDoc 校验记录类型,防跨类污染',
148
+ }, {
149
+ kind: { type: 'string', enum: ['storage', 'execute'] },
150
+ ai_id: idString,
151
+ id: idString,
152
+ doc_id: idString,
153
+ doc_name: { type: 'string', maxLength: 200 },
154
+ execute_type: { type: 'string', enum: ['1', '2'] },
155
+ }, ['kind', 'ai_id']),
156
+ ...assistantWrite('contract.assistant.agent.update', {
157
+ method: 'POST',
158
+ path: '/api/ebd/contract/ai/config/updateAiConfig',
159
+ note: 'display 为平台保留字段,输入包含 display 会被直接拒绝;ruleData 附加字段自动剔除',
160
+ }, {
161
+ id: idString,
162
+ ai_id: idString,
163
+ ai_mark: { type: 'string' },
164
+ ai_name: { type: 'string', maxLength: 200 },
165
+ status_info: { type: 'string', enum: ['0', '1'] },
166
+ headline: { type: 'string', maxLength: 200 },
167
+ prompt: { type: 'string', maxLength: 2000 },
168
+ ai_desc: { type: 'string', maxLength: 2000 },
169
+ iorder: { type: 'integer' },
170
+ pzxx: jsonStringish,
171
+ }, ['id', 'ai_id']),
172
+ ...assistantWrite('contract.assistant.tips.create', {
173
+ method: 'POST',
174
+ path: '/api/ebd/contract/ai/tip/save',
175
+ note: 'aizjid 服务端不补;未传时 CLI 按当前最大序号 + 1 自动计算',
176
+ }, {
177
+ tsynr: { type: 'string', minLength: 1, maxLength: 2000 },
178
+ ai_id: idString,
179
+ aizjid: { type: 'integer', minimum: 1 },
180
+ }, ['tsynr', 'ai_id']),
181
+ ...assistantWrite('contract.assistant.tips.delete', {
182
+ method: 'POST',
183
+ path: '/api/ebd/contract/ai/tip/batchDelete',
184
+ }, { ids: idsField, ai_id: idString }, ['ids', 'ai_id']),
185
+ ...assistantWrite('contract.assistant.rule.classification.create', {
186
+ method: 'POST',
187
+ path: '/api/ebd/contract/ai/save',
188
+ type: 'contract_classification',
189
+ }, {
190
+ htlx: { type: 'string', minLength: 1, maxLength: 200 },
191
+ htlxlabelid: { type: 'string' },
192
+ }, ['htlx']),
193
+ ...assistantWrite('contract.assistant.rule.classification.update', {
194
+ method: 'POST',
195
+ path: '/api/ebd/contract/ai/update',
196
+ }, {
197
+ id: idString,
198
+ htlx: { type: 'string', minLength: 1, maxLength: 200 },
199
+ }, ['id', 'htlx']),
200
+ ...assistantWrite('contract.assistant.rule.classification.delete', {
201
+ method: 'POST',
202
+ path: '/api/ebd/contract/ai/delete',
203
+ note: '分类下仍有规则时 CLI 拒绝删除(先删规则再删分类)',
204
+ }, { id: idString }, ['id']),
205
+ ...assistantWrite('contract.assistant.rule.create', {
206
+ method: 'POST',
207
+ path: '/api/ebd/contract/ai/save',
208
+ type: 'contract_rule_datasource',
209
+ note: '只建规则助手里看不到,必须再建规则组关联 Control 智能体',
210
+ }, {
211
+ gzmc: { type: 'string', minLength: 1, maxLength: 200 },
212
+ rule_content: { type: 'string', minLength: 1, maxLength: 8000 },
213
+ flid: idString,
214
+ enable_info: { type: 'string', enum: ['0', '1'] },
215
+ }, ['gzmc', 'rule_content', 'flid']),
216
+ ...assistantWrite('contract.assistant.rule.update', {
217
+ method: 'POST',
218
+ path: '/api/ebd/contract/ai/update',
219
+ }, {
220
+ id: idString,
221
+ gzmc: { type: 'string', maxLength: 200 },
222
+ rule_content: { type: 'string', maxLength: 8000 },
223
+ flid: idString,
224
+ enable_info: { type: 'string', enum: ['0', '1'] },
225
+ }, ['id']),
226
+ ...assistantWrite('contract.assistant.rule.delete', {
227
+ method: 'POST',
228
+ path: '/api/ebd/contract/ai/delete',
229
+ }, { ids: idsField }, ['ids']),
230
+ ...assistantWrite('contract.assistant.rule.group.create', {
231
+ method: 'POST',
232
+ path: '/api/ebd/contract/ai/saveCustomRules',
233
+ note: 'default_type 服务端互斥:一个助手只能有一个默认组,后写覆盖先写',
234
+ }, {
235
+ rule_flag: { type: 'string', minLength: 1, maxLength: 200 },
236
+ default_type: { type: 'integer', minimum: 0, maximum: 1 },
237
+ contract_rule_source: jsonStringish,
238
+ config_id: idString,
239
+ configId: idString,
240
+ }, ['rule_flag', 'contract_rule_source']),
241
+ ...assistantWrite('contract.assistant.rule.group.update', {
242
+ method: 'POST',
243
+ path: '/api/ebd/contract/ai/updateCustomRules',
244
+ }, {
245
+ id: idString,
246
+ rule_flag: { type: 'string', maxLength: 200 },
247
+ default_type: { type: 'integer', minimum: 0, maximum: 1 },
248
+ config_id: idString,
249
+ configId: idString,
250
+ }, ['id']),
251
+ ...assistantWrite('contract.assistant.rule.group.delete', {
252
+ method: 'POST',
253
+ path: '/api/ebd/contract/ai/config/batchDeleteCustomRules',
254
+ }, { ids: idsField, config_id: idString, configId: idString }, ['ids']),
255
+ ...assistantWrite('contract.assistant.element.create', {
256
+ method: 'POST',
257
+ path: '/api/ebd/contract/ai/element/saveElementRules',
258
+ note: 'element_content 与 element_mxb 两份重复数据必须都传(content 缺省时 CLI 按 mxb name 自动生成);无更新接口',
259
+ }, {
260
+ element_name: { type: 'string', minLength: 1, maxLength: 200 },
261
+ element_content: { type: 'string', maxLength: 8000 },
262
+ element_mxb: jsonStringish,
263
+ default_type: { type: 'integer', minimum: 0, maximum: 1 },
264
+ config_id: idString,
265
+ configId: idString,
266
+ }, ['element_name', 'element_mxb']),
267
+ ...assistantWrite('contract.assistant.element.delete', {
268
+ method: 'POST',
269
+ path: '/api/ebd/contract/ai/config/batchDeleteElementRules',
270
+ }, { ids: idsField, config_id: idString, configId: idString }, ['ids']),
271
+ ...assistantWrite('contract.assistant.flow.save', {
272
+ method: 'POST',
273
+ path: '/api/ebd/contract/tool/permission/save',
274
+ toolId: '803297036482249914',
275
+ note: '一个流程全局只能绑定一次;showPosition=3 需 fieldId,term_config 需 contractTypeField,key_config 不能为空,customRules type=0 不支持',
276
+ }, {
277
+ ai_id: idString,
278
+ aiId: idString,
279
+ flowId: idString,
280
+ rule_config_id: idString,
281
+ ruleConfigId: idString,
282
+ showPosition: { type: 'string', enum: ['1', '2', '3'] },
283
+ openMode: { type: 'integer' },
284
+ config: jsonStringish,
285
+ risk_review: jsonStringish,
286
+ customRules: jsonStringish,
287
+ key_config: jsonStringish,
288
+ consult_config: jsonStringish,
289
+ term_config: jsonStringish,
290
+ fieldMapping: jsonStringish,
291
+ elementExtractConfig: { type: 'integer', minimum: 0, maximum: 1 },
292
+ fieldId: idString,
293
+ fieldName: { type: 'string', maxLength: 200 },
294
+ }, ['flowId']),
295
+ ...assistantWrite('contract.assistant.flow.update', {
296
+ method: 'POST',
297
+ path: '/api/ebd/contract/tool/permission/modify/<记录id>',
298
+ }, {
299
+ id: idString,
300
+ ai_id: idString,
301
+ aiId: idString,
302
+ flowId: idString,
303
+ rule_config_id: idString,
304
+ ruleConfigId: idString,
305
+ showPosition: { type: 'string', enum: ['1', '2', '3'] },
306
+ openMode: { type: 'integer' },
307
+ config: jsonStringish,
308
+ risk_review: jsonStringish,
309
+ customRules: jsonStringish,
310
+ key_config: jsonStringish,
311
+ consult_config: jsonStringish,
312
+ term_config: jsonStringish,
313
+ fieldMapping: jsonStringish,
314
+ elementExtractConfig: { type: 'integer', minimum: 0, maximum: 1 },
315
+ fieldId: idString,
316
+ fieldName: { type: 'string', maxLength: 200 },
317
+ }, ['id', 'flowId']),
318
+ ...assistantWrite('contract.assistant.flow.delete', {
319
+ method: 'POST',
320
+ path: '/api/ebd/contract/tool/permission/delete',
321
+ note: 'CLI 强制携带 type=contract_ai_workflow_data(缺失会返回 success 但实际不删除)',
322
+ }, {
323
+ ids: idsField,
324
+ ai_id: idString,
325
+ aiId: idString,
326
+ rule_config_id: idString,
327
+ ruleConfigId: idString,
328
+ }, ['ids', 'ai_id']),
329
+ ].flatMap((entry) => (Array.isArray(entry) ? entry : [entry])));
330
+ export // ---------------------------------------------------------------- ⑨ 业绩核算(原六菜单链接 + 来源台账只读查询)
331
+ const performanceOrigin = { type: 'string', minLength: 8, description: '业务域名 baseUrl,如 https://xxx.cn' };
332
+ const apiPrefixField = { type: 'string', description: '/api/ebuilder 或 /api/ebuilder{appId}' };
333
+ const performanceCondition = {
334
+ type: 'object',
335
+ additionalProperties: false,
336
+ properties: { field: { type: 'string' }, operator: { type: 'string' }, value: {} },
337
+ required: ['field'],
338
+ };
339
+ const performanceContracts = [
340
+ {
341
+ name: 'contract.performance.link',
342
+ risk: 'read',
343
+ fixed: { local: true, kind: 'performance-link' },
344
+ inputSchema: readSchema({
345
+ menu: { type: 'string', minLength: 1 },
346
+ origin: performanceOrigin,
347
+ period: { type: 'string', description: 'YYYY 或 YYYY-MM' },
348
+ 'time-field': { type: 'string' },
349
+ conditions: { type: 'array', items: performanceCondition },
350
+ }, ['menu', 'origin']),
351
+ },
352
+ {
353
+ name: 'contract.performance.fields',
354
+ risk: 'read',
355
+ fixed: { local: true, kind: 'performance-fields' },
356
+ inputSchema: readSchema({ menu: { type: 'string', minLength: 1 } }, ['menu']),
357
+ },
358
+ {
359
+ name: 'contract.performance.source.entry',
360
+ risk: 'read',
361
+ fixed: { local: true, kind: 'performance-source-entry' },
362
+ inputSchema: readSchema({ source: { type: 'string' }, origin: performanceOrigin }, ['origin']),
363
+ },
364
+ {
365
+ name: 'contract.performance.menu.search',
366
+ risk: 'read',
367
+ auth: AUTH,
368
+ fixed: { method: 'POST', path: '/api/ebuilder/form/viewlist/searchPermittedEbMenus', bodyIsArray: true },
369
+ inputSchema: readSchema({ keywords: { type: 'array', minItems: 1, items: { type: 'string', minLength: 1 } } }, ['keywords']),
370
+ },
371
+ {
372
+ name: 'contract.performance.list.init',
373
+ risk: 'read',
374
+ auth: AUTH,
375
+ fixed: { method: 'POST', path: '/api/ebuilder/form/list/listInit' },
376
+ inputSchema: readSchema({
377
+ apiPrefix: apiPrefixField,
378
+ listId: idString,
379
+ expectedObjId: { type: 'string' },
380
+ }, ['apiPrefix', 'listId']),
381
+ },
382
+ {
383
+ name: 'contract.performance.list.filters',
384
+ risk: 'read',
385
+ auth: AUTH,
386
+ fixed: { method: 'GET', path: '/api/ebuilder/form/listFilter/getSearchFilters/{listId}' },
387
+ inputSchema: readSchema({
388
+ apiPrefix: apiPrefixField,
389
+ listId: idString,
390
+ appId: { type: 'string' },
391
+ objId: { type: 'string' },
392
+ includeFields: { type: 'boolean' },
393
+ }, ['apiPrefix', 'listId', 'appId', 'objId']),
394
+ },
395
+ {
396
+ name: 'contract.performance.list.query',
397
+ risk: 'read',
398
+ auth: AUTH,
399
+ fixed: { method: 'POST', path: '/api/ebuilder/form/list/getListDatas' },
400
+ inputSchema: readSchema({
401
+ apiPrefix: apiPrefixField,
402
+ listId: idString,
403
+ appId: { type: 'string' },
404
+ objId: { type: 'string' },
405
+ searchFieldId: { type: 'string' },
406
+ searchOperator: { type: 'string', enum: ['eq', 'like', 'startWith'] },
407
+ searchValue: { type: 'string' },
408
+ searchParamJson: { type: 'string' },
409
+ pageSize: { type: 'integer', minimum: 1, maximum: 1000 },
410
+ maxPages: { type: 'integer', minimum: 1, maximum: 100 },
411
+ }, ['apiPrefix', 'listId', 'appId', 'objId']),
412
+ },
413
+ {
414
+ name: 'contract.performance.receipt.query',
415
+ risk: 'read',
416
+ auth: AUTH,
417
+ fixed: { method: 'POST', path: '/api/ebuilder/form/list/getListDatas', ledger: 'contract-receipt' },
418
+ inputSchema: readSchema({
419
+ origin: performanceOrigin,
420
+ listId: { type: 'string' },
421
+ apiPrefix: apiPrefixField,
422
+ appId: { type: 'string' },
423
+ objId: { type: 'string' },
424
+ contractNumbers: { type: 'array', minItems: 1, items: { type: 'string', minLength: 1 } },
425
+ pageSize: { type: 'integer', minimum: 1, maximum: 1000 },
426
+ }, ['origin', 'contractNumbers']),
427
+ },
428
+ ];
429
+ // ---------------------------------------------------------------- ⑧ 报价单生成合同(本地 xlsx/docx 处理)
430
+ const quoteContracts = [
431
+ {
432
+ name: 'contract.quote.rmb',
433
+ risk: 'read',
434
+ fixed: { local: true, kind: 'rmb-upper' },
435
+ inputSchema: readSchema({ num: { type: 'string', minLength: 1 } }, ['num']),
436
+ },
437
+ {
438
+ name: 'contract.quote.sheets',
439
+ risk: 'read-with-upload',
440
+ fixed: { local: true, kind: 'xlsx-sheets' },
441
+ inputSchema: readSchema({ path: { type: 'string', minLength: 1 } }, ['path']),
442
+ },
443
+ {
444
+ name: 'contract.quote.parse',
445
+ risk: 'read-with-upload',
446
+ fixed: { local: true, kind: 'quote-parse' },
447
+ inputSchema: readSchema({
448
+ path: { type: 'string', minLength: 1 },
449
+ sheet: { type: 'string' },
450
+ keepRemark: { type: 'boolean' },
451
+ includeZero: { type: 'boolean' },
452
+ }, ['path']),
453
+ },
454
+ {
455
+ name: 'contract.quote.fill',
456
+ risk: 'read-with-upload',
457
+ fixed: { local: true, kind: 'docx-fill' },
458
+ inputSchema: readSchema({
459
+ template: { type: 'string', minLength: 1 },
460
+ data: { type: 'string', minLength: 1 },
461
+ out: { type: 'string', minLength: 1 },
462
+ detail: { type: 'string', enum: ['append', 'none'] },
463
+ mapOut: { type: 'string' },
464
+ }, ['template', 'data', 'out']),
465
+ },
466
+ ];
20
467
  export const contractOperations = [
21
468
  {
22
469
  name: 'contract.type.tree',
@@ -562,6 +1009,487 @@ export const contractOperations = [
562
1009
  otherParams: { type: 'string' },
563
1010
  }, ['requestId']),
564
1011
  },
1012
+ {
1013
+ name: 'contract.review.upload',
1014
+ risk: 'read-with-upload',
1015
+ auth: AUTH,
1016
+ fixed: {
1017
+ method: 'POST',
1018
+ path: '/api/file/preUploadCheck',
1019
+ followUpPath: '/api/file/module/upload',
1020
+ module: 'ebContract',
1021
+ createDoc: true,
1022
+ pagePath: '/sp/contract/business/ai-contract',
1023
+ },
1024
+ inputSchema: readSchema({
1025
+ paths: {
1026
+ type: 'array',
1027
+ minItems: 1,
1028
+ maxItems: 10,
1029
+ items: { type: 'string', minLength: 1, maxLength: 1000 },
1030
+ },
1031
+ }, ['paths']),
1032
+ },
1033
+ {
1034
+ name: 'contract.review.export',
1035
+ risk: 'read',
1036
+ auth: AUTH,
1037
+ fixed: {
1038
+ method: 'POST',
1039
+ path: '/api/ebd/contract/ai/getAiReviewRecord',
1040
+ aiId: '1326842382967570463',
1041
+ defaults: { sclx: '1,2,3' },
1042
+ },
1043
+ inputSchema: readSchema({
1044
+ fileId: { type: 'string', minLength: 1, maxLength: 64 },
1045
+ sclx: { type: 'string', pattern: '^[1-3](,[1-3]){0,2}$' },
1046
+ }, ['fileId']),
1047
+ },
1048
+ {
1049
+ name: 'contract.flow.page',
1050
+ risk: 'read',
1051
+ auth: AUTH,
1052
+ fixed: { pagePath: '/sp/workflow/flowpage/create/{workflowId}' },
1053
+ inputSchema: readSchema({
1054
+ flow: { type: 'string', enum: ['契约锁', '新客户', '老客户增值', '常规二次销售'] },
1055
+ }, ['flow']),
1056
+ },
1057
+ {
1058
+ name: 'contract.flow.launch',
1059
+ risk: 'read-with-upload',
1060
+ auth: AUTH,
1061
+ fixed: {
1062
+ method: 'POST',
1063
+ path: '/api/workflow/core/flowPage/loadBaseParam',
1064
+ followUpPath: '/api/file/module/upload',
1065
+ module: 'workflow',
1066
+ automaticFormFilling: true,
1067
+ },
1068
+ inputSchema: readSchema({
1069
+ flow: { type: 'string', enum: ['契约锁', '新客户', '老客户增值', '常规二次销售'] },
1070
+ path: { type: 'string', minLength: 1, maxLength: 1000 },
1071
+ }, ['flow', 'path']),
1072
+ },
1073
+ {
1074
+ name: 'contract.recommend.doc',
1075
+ risk: 'read',
1076
+ auth: AUTH,
1077
+ fixed: {
1078
+ method: 'POST',
1079
+ path: '/api/ebd/contract/file/recommendContractDoc',
1080
+ textObjId: '1290191829260230657',
1081
+ pagePath: '/sp/contract/business/template-list',
1082
+ },
1083
+ inputSchema: readSchema({
1084
+ content: { type: 'string', minLength: 1, maxLength: 4000 },
1085
+ }, ['content']),
1086
+ },
1087
+ {
1088
+ name: 'contract.compare.upload',
1089
+ risk: 'read-with-upload',
1090
+ auth: AUTH,
1091
+ fixed: {
1092
+ method: 'POST',
1093
+ path: '/api/file/preUploadCheck',
1094
+ followUpPath: '/api/file/module/upload',
1095
+ module: 'docCompared',
1096
+ },
1097
+ inputSchema: readSchema({
1098
+ paths: {
1099
+ type: 'array',
1100
+ minItems: 1,
1101
+ maxItems: 2,
1102
+ items: { type: 'string', minLength: 1, maxLength: 1000 },
1103
+ },
1104
+ }, ['paths']),
1105
+ },
1106
+ {
1107
+ name: 'contract.compare.search',
1108
+ risk: 'read',
1109
+ auth: AUTH,
1110
+ fixed: { method: 'POST', path: '/api/doc/documents/list', defaults: { pageNo: 1, pageSize: 20 } },
1111
+ inputSchema: readSchema({
1112
+ keyword: { type: 'string', minLength: 1, maxLength: 200 },
1113
+ pageNo: { type: 'integer', minimum: 1 },
1114
+ pageSize: { type: 'integer', minimum: 1, maximum: 100 },
1115
+ }, ['keyword']),
1116
+ },
1117
+ {
1118
+ name: 'contract.compare.versions',
1119
+ risk: 'read',
1120
+ auth: AUTH,
1121
+ fixed: { method: 'POST', path: '/api/file/base/upload/findVersionList', pageSize: 100 },
1122
+ inputSchema: readSchema({
1123
+ fileId: { type: 'string', minLength: 1, maxLength: 64 },
1124
+ docId: { type: 'string', minLength: 1, maxLength: 64 },
1125
+ pageNo: { type: 'integer', minimum: 1 },
1126
+ }, ['fileId']),
1127
+ },
1128
+ {
1129
+ name: 'contract.compare.page',
1130
+ risk: 'read',
1131
+ auth: AUTH,
1132
+ fixed: { pagePath: '/sp/contract/business/doc-compare' },
1133
+ inputSchema: readSchema({
1134
+ baseFileId: { type: 'string', minLength: 1, maxLength: 64 },
1135
+ baseFileName: { type: 'string', minLength: 1, maxLength: 300 },
1136
+ compareFileId: { type: 'string', minLength: 1, maxLength: 64 },
1137
+ compareFileName: { type: 'string', minLength: 1, maxLength: 300 },
1138
+ }, ['baseFileId', 'baseFileName', 'compareFileId', 'compareFileName']),
1139
+ },
1140
+ {
1141
+ name: 'contract.compare.diff',
1142
+ risk: 'read',
1143
+ auth: AUTH,
1144
+ fixed: { method: 'POST', path: '/api/ebd/contract/ai/getCompareRes', arrayFields: ['baseFileIds', 'compareFileIds'] },
1145
+ inputSchema: readSchema({
1146
+ baseFileId: { type: 'string', minLength: 1, maxLength: 64 },
1147
+ compareFileId: { type: 'string', minLength: 1, maxLength: 64 },
1148
+ }, ['baseFileId', 'compareFileId']),
1149
+ },
1150
+ {
1151
+ name: 'contract.credit.page',
1152
+ risk: 'read',
1153
+ auth: AUTH,
1154
+ fixed: { pagePath: '/sp/contract/business/credit', pageTitle: '资信查询', activate: true, width: 1000 },
1155
+ inputSchema: readSchema({
1156
+ names: {
1157
+ type: 'array',
1158
+ minItems: 1,
1159
+ maxItems: 20,
1160
+ items: { type: 'string', minLength: 4, maxLength: 200 },
1161
+ },
1162
+ }, ['names']),
1163
+ },
1164
+ {
1165
+ name: 'contract.clause.permission',
1166
+ risk: 'read',
1167
+ auth: AUTH,
1168
+ fixed: {
1169
+ method: 'GET',
1170
+ path: '/api/ebd/contract/component/checkPermissionV2',
1171
+ query: { moduleFlag: 'termComponent' },
1172
+ headers: { ebbusinessid: '10000000000000000' },
1173
+ },
1174
+ inputSchema: readSchema({}),
1175
+ },
1176
+ {
1177
+ name: 'contract.clause.types',
1178
+ risk: 'read',
1179
+ auth: AUTH,
1180
+ fixed: { method: 'GET', path: '/api/ebd/contract/tree/queryAllCluseType' },
1181
+ inputSchema: readSchema({}),
1182
+ },
1183
+ {
1184
+ name: 'contract.clause.check',
1185
+ risk: 'read',
1186
+ auth: AUTH,
1187
+ fixed: {
1188
+ method: 'GET',
1189
+ path: '/api/ebd/contract/clauseinfo/checkData',
1190
+ queryOnly: ['clauseName', 'belongId'],
1191
+ note: '判重只允许传 clauseName + belongId;缺 belongId 会静默返回“不存在”',
1192
+ },
1193
+ inputSchema: readSchema({
1194
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1195
+ belongId: idString,
1196
+ }, ['clauseName', 'belongId']),
1197
+ },
1198
+ {
1199
+ name: 'contract.clause.browser',
1200
+ risk: 'read',
1201
+ auth: AUTH,
1202
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/common/browser/data/clauseInfoBrowser' },
1203
+ inputSchema: readSchema({
1204
+ name: { type: 'string', minLength: 1, maxLength: 200 },
1205
+ }, ['name']),
1206
+ },
1207
+ {
1208
+ name: 'contract.clause.subcompany',
1209
+ risk: 'read',
1210
+ auth: AUTH,
1211
+ fixed: {
1212
+ method: 'POST',
1213
+ path: '/api/hrm/common/browser/data/subcompany',
1214
+ fallback: { method: 'GET', path: '/api/hrm/common/getOrgTree' },
1215
+ },
1216
+ inputSchema: readSchema({
1217
+ name: { type: 'string', maxLength: 200 },
1218
+ }),
1219
+ },
1220
+ {
1221
+ name: 'contract.clause.category.create.prepare',
1222
+ risk: 'read-before-write',
1223
+ auth: AUTH,
1224
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/save', requiresPermission: 'termComponent' },
1225
+ inputSchema: readSchema({
1226
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1227
+ parentId: { type: 'string', pattern: '^\\d+$' },
1228
+ orderNum: { type: 'string' },
1229
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1230
+ levelNum: { type: 'string', pattern: '^\\d+$' },
1231
+ }, ['clauseName']),
1232
+ },
1233
+ {
1234
+ name: 'contract.clause.category.create.apply',
1235
+ risk: 'high-risk-write',
1236
+ auth: AUTH,
1237
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/save', requiresPermission: 'termComponent' },
1238
+ inputSchema: readSchema({
1239
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1240
+ parentId: { type: 'string', pattern: '^\\d+$' },
1241
+ orderNum: { type: 'string' },
1242
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1243
+ levelNum: { type: 'string', pattern: '^\\d+$' },
1244
+ continuation: { type: 'string', minLength: 1 },
1245
+ confirm: { type: 'boolean', enum: [true] },
1246
+ }, ['clauseName', 'continuation', 'confirm']),
1247
+ },
1248
+ {
1249
+ name: 'contract.clause.category.update.prepare',
1250
+ risk: 'read-before-write',
1251
+ auth: AUTH,
1252
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/update', requiresPermission: 'termComponent' },
1253
+ inputSchema: readSchema({
1254
+ id: idString,
1255
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1256
+ parentId: { type: 'string', pattern: '^\\d+$' },
1257
+ orderNum: { type: 'string' },
1258
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1259
+ levelNum: { type: 'string', pattern: '^\\d+$' },
1260
+ }, ['id', 'clauseName']),
1261
+ },
1262
+ {
1263
+ name: 'contract.clause.category.update.apply',
1264
+ risk: 'high-risk-write',
1265
+ auth: AUTH,
1266
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/update', requiresPermission: 'termComponent' },
1267
+ inputSchema: readSchema({
1268
+ id: idString,
1269
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1270
+ parentId: { type: 'string', pattern: '^\\d+$' },
1271
+ orderNum: { type: 'string' },
1272
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1273
+ levelNum: { type: 'string', pattern: '^\\d+$' },
1274
+ continuation: { type: 'string', minLength: 1 },
1275
+ confirm: { type: 'boolean', enum: [true] },
1276
+ }, ['id', 'clauseName', 'continuation', 'confirm']),
1277
+ },
1278
+ {
1279
+ name: 'contract.clause.category.delete.prepare',
1280
+ risk: 'read-before-write',
1281
+ auth: AUTH,
1282
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/deletebyid', requiresPermission: 'termComponent', cascade: true },
1283
+ inputSchema: readSchema({ id: idString }, ['id']),
1284
+ },
1285
+ {
1286
+ name: 'contract.clause.category.delete.apply',
1287
+ risk: 'high-risk-write',
1288
+ auth: AUTH,
1289
+ fixed: { method: 'POST', path: '/api/ebd/contract/tree/deletebyid', requiresPermission: 'termComponent', cascade: true },
1290
+ inputSchema: readSchema({
1291
+ id: idString,
1292
+ continuation: { type: 'string', minLength: 1 },
1293
+ confirm: { type: 'boolean', enum: [true] },
1294
+ }, ['id', 'continuation', 'confirm']),
1295
+ },
1296
+ {
1297
+ name: 'contract.clause.create.prepare',
1298
+ risk: 'read-before-write',
1299
+ auth: AUTH,
1300
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/save', requiresPermission: 'termComponent' },
1301
+ inputSchema: readSchema({
1302
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1303
+ clauseNum: { type: 'string', minLength: 1, maxLength: 64 },
1304
+ clauseContent: { type: 'string', maxLength: 20000 },
1305
+ belongId: idString,
1306
+ clauseVersion: { type: 'string', minLength: 1, maxLength: 32 },
1307
+ clauseGroup: { type: 'string', minLength: 1 },
1308
+ contractType: idString,
1309
+ contractTypeName: { type: 'string' },
1310
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1311
+ clauseForm: { type: 'string' },
1312
+ isSmartCombination: { type: 'string' },
1313
+ }, ['clauseName', 'clauseNum', 'belongId', 'clauseVersion', 'clauseGroup']),
1314
+ },
1315
+ {
1316
+ name: 'contract.clause.create.apply',
1317
+ risk: 'high-risk-write',
1318
+ auth: AUTH,
1319
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/save', requiresPermission: 'termComponent' },
1320
+ inputSchema: readSchema({
1321
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1322
+ clauseNum: { type: 'string', minLength: 1, maxLength: 64 },
1323
+ clauseContent: { type: 'string', maxLength: 20000 },
1324
+ belongId: idString,
1325
+ clauseVersion: { type: 'string', minLength: 1, maxLength: 32 },
1326
+ clauseGroup: { type: 'string', minLength: 1 },
1327
+ contractType: idString,
1328
+ contractTypeName: { type: 'string' },
1329
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1330
+ clauseForm: { type: 'string' },
1331
+ isSmartCombination: { type: 'string' },
1332
+ continuation: { type: 'string', minLength: 1 },
1333
+ confirm: { type: 'boolean', enum: [true] },
1334
+ }, ['clauseName', 'clauseNum', 'belongId', 'clauseVersion', 'clauseGroup', 'continuation', 'confirm']),
1335
+ },
1336
+ {
1337
+ name: 'contract.clause.update.prepare',
1338
+ risk: 'read-before-write',
1339
+ auth: AUTH,
1340
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/update', requiresPermission: 'termComponent' },
1341
+ inputSchema: readSchema({
1342
+ id: idString,
1343
+ clauseName: { type: 'string', maxLength: 200 },
1344
+ clauseNum: { type: 'string', maxLength: 64 },
1345
+ clauseContent: { type: 'string', maxLength: 20000 },
1346
+ belongId: idString,
1347
+ clauseVersion: { type: 'string' },
1348
+ clauseGroup: { type: 'string' },
1349
+ contractType: idString,
1350
+ contractTypeName: { type: 'string' },
1351
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1352
+ }, ['id']),
1353
+ },
1354
+ {
1355
+ name: 'contract.clause.update.apply',
1356
+ risk: 'high-risk-write',
1357
+ auth: AUTH,
1358
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/update', requiresPermission: 'termComponent' },
1359
+ inputSchema: readSchema({
1360
+ id: idString,
1361
+ clauseName: { type: 'string', maxLength: 200 },
1362
+ clauseNum: { type: 'string', maxLength: 64 },
1363
+ clauseContent: { type: 'string', maxLength: 20000 },
1364
+ belongId: idString,
1365
+ clauseVersion: { type: 'string' },
1366
+ clauseGroup: { type: 'string' },
1367
+ contractType: idString,
1368
+ contractTypeName: { type: 'string' },
1369
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1370
+ continuation: { type: 'string', minLength: 1 },
1371
+ confirm: { type: 'boolean', enum: [true] },
1372
+ }, ['id', 'continuation', 'confirm']),
1373
+ },
1374
+ {
1375
+ name: 'contract.clause.delete.prepare',
1376
+ risk: 'read-before-write',
1377
+ auth: AUTH,
1378
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/deletebyid', requiresPermission: 'termComponent' },
1379
+ inputSchema: readSchema({
1380
+ id: idString,
1381
+ clauseName: { type: 'string', maxLength: 200 },
1382
+ belongId: idString,
1383
+ }, ['id']),
1384
+ },
1385
+ {
1386
+ name: 'contract.clause.delete.apply',
1387
+ risk: 'high-risk-write',
1388
+ auth: AUTH,
1389
+ fixed: { method: 'POST', path: '/api/ebd/contract/clauseinfo/deletebyid', requiresPermission: 'termComponent' },
1390
+ inputSchema: readSchema({
1391
+ id: idString,
1392
+ clauseName: { type: 'string', maxLength: 200 },
1393
+ belongId: idString,
1394
+ continuation: { type: 'string', minLength: 1 },
1395
+ confirm: { type: 'boolean', enum: [true] },
1396
+ }, ['id', 'continuation', 'confirm']),
1397
+ },
1398
+ {
1399
+ name: 'contract.clause.group.create.prepare',
1400
+ risk: 'read-before-write',
1401
+ auth: AUTH,
1402
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/save', requiresPermission: 'termComponent' },
1403
+ inputSchema: readSchema({
1404
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1405
+ clauseNum: { type: 'string', maxLength: 64 },
1406
+ clauseContent: { type: 'string', pattern: '^\\d+(,\\d+)*$' },
1407
+ belongId: idString,
1408
+ belongSub: { type: 'string' },
1409
+ contractType: idString,
1410
+ contractTypeName: { type: 'string' },
1411
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1412
+ }, ['clauseName', 'clauseContent', 'belongSub']),
1413
+ },
1414
+ {
1415
+ name: 'contract.clause.group.create.apply',
1416
+ risk: 'high-risk-write',
1417
+ auth: AUTH,
1418
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/save', requiresPermission: 'termComponent' },
1419
+ inputSchema: readSchema({
1420
+ clauseName: { type: 'string', minLength: 1, maxLength: 200 },
1421
+ clauseNum: { type: 'string', maxLength: 64 },
1422
+ clauseContent: { type: 'string', pattern: '^\\d+(,\\d+)*$' },
1423
+ belongId: idString,
1424
+ belongSub: { type: 'string' },
1425
+ contractType: idString,
1426
+ contractTypeName: { type: 'string' },
1427
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1428
+ continuation: { type: 'string', minLength: 1 },
1429
+ confirm: { type: 'boolean', enum: [true] },
1430
+ }, ['clauseName', 'clauseContent', 'belongSub', 'continuation', 'confirm']),
1431
+ },
1432
+ {
1433
+ name: 'contract.clause.group.update.prepare',
1434
+ risk: 'read-before-write',
1435
+ auth: AUTH,
1436
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/update', requiresPermission: 'termComponent' },
1437
+ inputSchema: readSchema({
1438
+ id: idString,
1439
+ clauseName: { type: 'string', maxLength: 200 },
1440
+ clauseNum: { type: 'string', maxLength: 64 },
1441
+ clauseContent: { type: 'string', pattern: '^\\d+(,\\d+)*$' },
1442
+ belongId: idString,
1443
+ belongSub: { type: 'string' },
1444
+ contractType: idString,
1445
+ contractTypeName: { type: 'string' },
1446
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1447
+ }, ['id', 'clauseContent']),
1448
+ },
1449
+ {
1450
+ name: 'contract.clause.group.update.apply',
1451
+ risk: 'high-risk-write',
1452
+ auth: AUTH,
1453
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/update', requiresPermission: 'termComponent' },
1454
+ inputSchema: readSchema({
1455
+ id: idString,
1456
+ clauseName: { type: 'string', maxLength: 200 },
1457
+ clauseNum: { type: 'string', maxLength: 64 },
1458
+ clauseContent: { type: 'string', pattern: '^\\d+(,\\d+)*$' },
1459
+ belongId: idString,
1460
+ belongSub: { type: 'string' },
1461
+ contractType: idString,
1462
+ contractTypeName: { type: 'string' },
1463
+ clauseStatus: { type: 'string', enum: ['0', '1'] },
1464
+ continuation: { type: 'string', minLength: 1 },
1465
+ confirm: { type: 'boolean', enum: [true] },
1466
+ }, ['id', 'clauseContent', 'continuation', 'confirm']),
1467
+ },
1468
+ {
1469
+ name: 'contract.clause.group.delete.prepare',
1470
+ risk: 'read-before-write',
1471
+ auth: AUTH,
1472
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/deletebyid', requiresPermission: 'termComponent' },
1473
+ inputSchema: readSchema({
1474
+ id: idString,
1475
+ clauseName: { type: 'string', maxLength: 200 },
1476
+ }, ['id']),
1477
+ },
1478
+ {
1479
+ name: 'contract.clause.group.delete.apply',
1480
+ risk: 'high-risk-write',
1481
+ auth: AUTH,
1482
+ fixed: { method: 'POST', path: '/api/ebd/contract/clausegroup/deletebyid', requiresPermission: 'termComponent' },
1483
+ inputSchema: readSchema({
1484
+ id: idString,
1485
+ clauseName: { type: 'string', maxLength: 200 },
1486
+ continuation: { type: 'string', minLength: 1 },
1487
+ confirm: { type: 'boolean', enum: [true] },
1488
+ }, ['id', 'continuation', 'confirm']),
1489
+ },
1490
+ ...contractAssistantOperationContracts,
1491
+ ...performanceContracts,
1492
+ ...quoteContracts,
565
1493
  ];
566
1494
  export const contractManifest = {
567
1495
  schemaVersion: 1,