weaver-work-cli 0.1.53 → 0.1.56
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.
- package/dist/chunks/{archive-ZQ4A4TV6.js → archive-4SQAVTIB.js} +3 -2
- package/dist/chunks/{archive-oa-57R2FYHV.js → archive-oa-W2UEJ67L.js} +137 -8
- package/dist/chunks/{asset-ZOJVBWZH.js → asset-EGZEABBI.js} +3 -2
- package/dist/chunks/{asset-idle-XGB5IPGT.js → asset-idle-EBUZBB6M.js} +3 -2
- package/dist/chunks/{attachment-content-W3TSJC3Y.js → attachment-content-QGM5MLQE.js} +4 -3
- package/dist/chunks/{blog-QSHLZSFW.js → blog-2YKMWOWI.js} +3 -2
- package/dist/chunks/{caizhilian-KCQYFH72.js → caizhilian-QJ4FLSQJ.js} +5 -4
- package/dist/chunks/{calendar-DLGMRJQA.js → calendar-H4QTJCUY.js} +3 -2
- package/dist/chunks/{chunk-XPQN4E5O.js → chunk-44KJ7WFA.js} +300 -55
- package/dist/chunks/{chunk-CZNZKOHR.js → chunk-4GG72JAT.js} +2 -2
- package/dist/chunks/{chunk-YIKSL36S.js → chunk-5N222HK6.js} +2 -2
- package/dist/chunks/{chunk-6GCXWKG6.js → chunk-6DVL5IN5.js} +4 -1
- package/dist/chunks/{chunk-WTLQGS6D.js → chunk-6MS3RLPO.js} +5 -334
- package/dist/chunks/{chunk-Z4G7LLDD.js → chunk-7EBV7Q3R.js} +124 -27
- package/dist/chunks/{chunk-76PRVYH4.js → chunk-AHJZIMCX.js} +1 -1
- package/dist/chunks/{chunk-TGAGQV4I.js → chunk-CQ4OVCKG.js} +2 -2
- package/dist/chunks/{chunk-2BQESR2U.js → chunk-DVR2EDUU.js} +99 -34
- package/dist/chunks/{chunk-QQXMHM3J.js → chunk-FDAJC7R4.js} +4 -4
- package/dist/chunks/{chunk-GR76ZDDX.js → chunk-FMNCSYIG.js} +2 -2
- package/dist/chunks/{chunk-IF33CG4V.js → chunk-L2LMBFG5.js} +1 -1
- package/dist/chunks/{chunk-DLY5GUXX.js → chunk-PH7N4UFT.js} +1 -1
- package/dist/chunks/{chunk-U6R6FZHD.js → chunk-SFM3M2L3.js} +286 -93
- package/dist/chunks/chunk-SHYQUBY3.js +48 -0
- package/dist/chunks/{chunk-HFXK54M4.js → chunk-TGM7BWEH.js} +2 -2
- package/dist/chunks/{chunk-2J3XY4ED.js → chunk-TJUAGZU7.js} +11 -11
- package/dist/chunks/{chunk-PE334WL3.js → chunk-UI66EMOR.js} +4 -4
- package/dist/chunks/{chunk-762M5XJS.js → chunk-VMCCRWFO.js} +2 -2
- package/dist/chunks/{chunk-U7ROML5E.js → chunk-WHJIUKJW.js} +681 -48
- package/dist/chunks/{chunk-PGO4ILMQ.js → chunk-WMB3SMXI.js} +1 -1
- package/dist/chunks/chunk-WMRNO6IU.js +337 -0
- package/dist/chunks/{chunk-6NXT4ICB.js → chunk-WVH5ESDA.js} +1 -1
- package/dist/chunks/{chunk-DEHJ7PMA.js → chunk-XU3FL3AW.js} +4 -4
- package/dist/chunks/{chunk-Z6UUBY37.js → chunk-Z4IPY5GV.js} +2 -2
- package/dist/chunks/{conflict-57WDJWL7.js → conflict-VAFFPUY3.js} +2 -2
- package/dist/chunks/{contract-LJRAXVZU.js → contract-LLRKMLQQ.js} +2655 -1319
- package/dist/chunks/{cowork-3ACICHDQ.js → cowork-2RDFBZWB.js} +3 -2
- package/dist/chunks/{create-flow-3FMMZBCA.js → create-flow-TVYE3IOH.js} +6 -6
- package/dist/chunks/{data-WK5CQXNF.js → data-WVICO3DT.js} +57 -11
- package/dist/chunks/{ebuilder-form-CBYI6CQ6.js → ebuilder-form-TWSXS5NA.js} +7 -6
- package/dist/chunks/{ehr-XI4BIVR2.js → ehr-52GBKNJR.js} +3 -2
- package/dist/chunks/{env-JYZE3BZB.js → env-BVVFIN4P.js} +2 -2
- package/dist/chunks/{esb-4BQHNP5C.js → esb-HJSXCEOM.js} +5 -4
- package/dist/chunks/{factory-66SCIKW3.js → factory-RCQ36LLE.js} +1 -1
- package/dist/chunks/{fna-ECOYBQYL.js → fna-OBACRT3J.js} +72 -3
- package/dist/chunks/{group-chat-MNRYMLNG.js → group-chat-YFZDUUY3.js} +3 -3
- package/dist/chunks/{host-TUOIOEMC.js → host-2BKMPWDH.js} +4 -3
- package/dist/chunks/{host-3TNBMDTR.js → host-KJT3G5D2.js} +4 -3
- package/dist/chunks/{host-7OWWPLM4.js → host-KOWUMNAY.js} +4 -3
- package/dist/chunks/{host-M4XP5URR.js → host-MFXRA2MY.js} +4 -3
- package/dist/chunks/{host-7NTIBSPK.js → host-TTSGY5NZ.js} +4 -3
- package/dist/chunks/{host-G3VU7SDW.js → host-W4JCNRFS.js} +4 -3
- package/dist/chunks/{hrm-YGIR3HGF.js → hrm-AK3WGBMN.js} +4 -3
- package/dist/chunks/{im-TN2JYVGJ.js → im-JZSBPO4Z.js} +4 -3
- package/dist/chunks/{invoice-V7ZTITUO.js → invoice-V6KD4TZE.js} +4 -3
- package/dist/chunks/{jiuchuanhui-ASFZBMPU.js → jiuchuanhui-K4EQU6GK.js} +3 -2
- package/dist/chunks/{lazy-dispatch-XSAHDK6Z.js → lazy-dispatch-JHGFCKJN.js} +5 -4
- package/dist/chunks/{mail-M3HJF5ER.js → mail-IKVCQCVZ.js} +3 -2
- package/dist/chunks/{meeting-IIY4UAJL.js → meeting-JOHV4RH3.js} +14 -12
- package/dist/chunks/minute-doc-JLS4KMFZ.js +156 -0
- package/dist/chunks/{okr-EVX7FB5G.js → okr-KV43FPPX.js} +3 -2
- package/dist/chunks/{operations-J7PUIVWZ.js → operations-ZPWBMYKE.js} +5 -4
- package/dist/chunks/{plan-2QJQEPBO.js → plan-WOYR4WEG.js} +3 -2
- package/dist/chunks/{project-XELELW2T.js → project-CQJKBUIL.js} +3 -2
- package/dist/chunks/{reception-QGPNTGHG.js → reception-MPBU3JXC.js} +3 -2
- package/dist/chunks/{recruit-stage-XCMVEQA2.js → recruit-stage-USTTRHOX.js} +3 -2
- package/dist/chunks/{registry-CJOVECZD.js → registry-GURQG4ZV.js} +3 -2
- package/dist/chunks/{registry-METZ2LWE.js → registry-LITYOH2W.js} +12 -10
- package/dist/chunks/{registry-QJCZ2GVG.js → registry-SS5J2FZQ.js} +5 -4
- package/dist/chunks/{room-recommend-YFY7HTOF.js → room-recommend-62MECG4J.js} +4 -4
- package/dist/chunks/{schedule-6I63TERA.js → schedule-6QRXIBGU.js} +4 -4
- package/dist/chunks/{smart-extract-FOUYNIG3.js → smart-extract-APX2PNIN.js} +3 -2
- package/dist/chunks/{workflow-YHXFIU63.js → workflow-WMPW3WSB.js} +5 -4
- package/dist/index.js +33 -32
- package/dist/internal/e10/auth/agent-host-key.js +68 -0
- package/dist/internal/e10/auth/agent-hosts.js +250 -0
- package/dist/internal/e10/auth/commands.js +99 -30
- package/dist/internal/e10/auth/paths.js +9 -0
- package/dist/internal/e10/auth/session.js +17 -0
- package/dist/internal/e10/auth/xiaoe.js +37 -3
- package/dist/shortcuts/archive-oa/operations/contract-modules.js +106 -0
- package/dist/shortcuts/archive-oa/operations/contract.js +38 -4
- package/dist/shortcuts/archive-oa/operations/registry.js +2 -1
- package/dist/shortcuts/contract/index.js +6 -7
- package/dist/shortcuts/contract/manifest.js +101 -24
- package/dist/shortcuts/contract/ooxml/docx-table.js +75 -3
- package/dist/shortcuts/contract/ooxml/xlsx.js +49 -13
- package/dist/shortcuts/contract/operations/card-action.js +113 -12
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +29 -7
- package/dist/shortcuts/contract/operations/card-plan.js +75 -9
- package/dist/shortcuts/contract/operations/card-risk-report.js +2 -2
- package/dist/shortcuts/contract/operations/card.js +1 -1
- package/dist/shortcuts/contract/operations/clause-library.js +88 -16
- package/dist/shortcuts/contract/operations/compare-screen.js +378 -0
- package/dist/shortcuts/contract/operations/compare.js +1 -1
- package/dist/shortcuts/contract/operations/credit-page.js +1 -1
- package/dist/shortcuts/contract/operations/docx-slots.js +1000 -0
- package/dist/shortcuts/contract/operations/flow.js +2 -2
- package/dist/shortcuts/contract/operations/quote-to-contract.js +495 -0
- package/dist/shortcuts/contract/operations/quote.js +2 -229
- package/dist/shortcuts/contract/operations/recommend.js +1 -1
- package/dist/shortcuts/contract/operations/registry.js +6 -2
- package/dist/shortcuts/contract/operations/review.js +230 -4
- package/dist/shortcuts/contract/operations/save-recognize.js +122 -3
- package/dist/shortcuts/contract/operations/template.js +11 -10
- package/dist/shortcuts/data/operations/ds.js +5 -5
- package/dist/shortcuts/data/operations/shared.js +76 -4
- package/dist/shortcuts/fna/manifest.js +7 -2
- package/dist/shortcuts/fna/operations/budget.js +68 -0
- package/dist/shortcuts/meeting/minute-doc.js +153 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +176 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +47 -0
- package/dist/shortcuts/meeting/operations/eb/decision-task-batch.js +144 -0
- package/dist/shortcuts/meeting/operations/eb/decision.js +92 -4
- package/dist/shortcuts/meeting/operations/eb/index.js +133 -4
- package/dist/shortcuts/meeting/operations/eb/meeting-link.js +90 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +46 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +61 -0
- package/dist/shortcuts/meeting/operations/registry.js +14 -1
- package/dist/shortcuts/meeting/operations/self-check.js +49 -0
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/read.js +114 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +72 -46
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +41 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +46 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +18 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroupAdd.js +51 -0
- package/docs/e10-auth.md +78 -0
- package/docs/fna.md +8 -3
- package/package.json +4 -2
- package/scripts/pack-offline.mjs +228 -0
- package/scripts/package-skill.mjs +14 -5
- package/skill-template/business-info.json +3 -0
- package/skill-template/domains/qiyecheng.md +4 -3
- package/skills/weaver-e10-archive-oa/SKILL.md +6 -1
- package/skills/weaver-e10-archive-oa/references/contract-search.md +91 -4
- package/skills/weaver-e10-jinchengda/SKILL.md +100 -81
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +11 -6
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +38 -12
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +20 -6
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +8 -3
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +56 -13
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +11 -5
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +38 -7
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +13 -25
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +8 -6
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +10 -7
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +3 -1
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +26 -18
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +18 -13
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +5 -3
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +105 -49
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +3 -6
- package/skills/weaver-e10-meeting/SKILL.md +48 -9
- package/skills/weaver-e10-qiyecheng/SKILL.md +16 -7
- package/skills/weaver-e10-qiyecheng/references/budget.md +77 -3
- package/skills/weaver-e10-qiyecheng/references/catalog.md +6 -4
- package/skills/weaver-e10-qiyecheng/references/getEnabledTemplate-api.md +255 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +70 -25
- package/skills/weaver-e10-workflow/SKILL.md +54 -40
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +134 -0
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +102 -80
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +23 -13
- package/skills/weaver-e10-workflow/references/workflow-query.md +68 -46
- package/skills/weaver-e10-workflow/references/workflow-view.md +21 -13
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +317 -332
- package/dist/shortcuts/contract/ooxml/docx.js +0 -295
- package/dist/shortcuts/contract/operations/docx-fillfromquote.js +0 -532
- package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +0 -178
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +0 -1270
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +0 -998
- package/skills/weaver-e10-workflow/tools/todo-serve.cjs +0 -327
|
@@ -14,13 +14,14 @@ import {
|
|
|
14
14
|
createE10RequestRuntime,
|
|
15
15
|
isE10SessionExpiredResponse,
|
|
16
16
|
requireE10Session
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WVH5ESDA.js";
|
|
18
18
|
import {
|
|
19
19
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
20
20
|
getActiveProfile,
|
|
21
21
|
hasXiaoEEnv,
|
|
22
22
|
writeWithRetry
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SFM3M2L3.js";
|
|
24
|
+
import "./chunk-SHYQUBY3.js";
|
|
24
25
|
import {
|
|
25
26
|
CliError,
|
|
26
27
|
isCliError,
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WVH5ESDA.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
17
17
|
getActiveProfile
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SFM3M2L3.js";
|
|
19
|
+
import "./chunk-SHYQUBY3.js";
|
|
19
20
|
import {
|
|
20
21
|
CliError,
|
|
21
22
|
isCliError,
|
|
@@ -1101,11 +1102,19 @@ function makeFieldsOperation(profile) {
|
|
|
1101
1102
|
resource: "contract",
|
|
1102
1103
|
method: "fields",
|
|
1103
1104
|
action: name,
|
|
1104
|
-
summary: `\u67E5\u8BE2${profile.source === "qys" ? "\u5951\u7EA6\u9501" : "\u6CDB\u5FAE"}\u5546\u52A1\u5408\u540C\u53EF\u641C\u7D22\u5B57\u6BB5\u914D\u7F6E\uFF08\u6784\u9020 commonSearchFields \u7528\uFF09`,
|
|
1105
|
+
summary: `\u67E5\u8BE2${profile.source === "qys" ? "\u5951\u7EA6\u9501" : "\u6CDB\u5FAE"}\u5546\u52A1\u5408\u540C\u53EF\u641C\u7D22\u5B57\u6BB5\u914D\u7F6E\uFF08\u542B\u4E0B\u62C9\u5B57\u6BB5\u7684\u53EF\u9009\u503C\uFF0C\u6784\u9020 commonSearchFields \u7528\uFF09`,
|
|
1105
1106
|
capability: "contract-search",
|
|
1106
1107
|
risk: READ,
|
|
1107
|
-
inputSchema: schemaOf(
|
|
1108
|
-
|
|
1108
|
+
inputSchema: schemaOf(
|
|
1109
|
+
{
|
|
1110
|
+
field: {
|
|
1111
|
+
type: "string",
|
|
1112
|
+
description: "\u53EA\u770B\u67D0\u4E2A\u5B57\u6BB5\uFF08\u5982 khxznew\uFF09\uFF0C\u7528\u4E8E\u53D6\u8BE5\u4E0B\u62C9\u5B57\u6BB5\u7684\u53EF\u9009\u503C\uFF1B\u7F3A\u7701\u8FD4\u56DE\u5168\u90E8\u5B57\u6BB5"
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
{ description: "\u67E5\u8BE2\u5408\u540C\u641C\u7D22\u5B57\u6BB5\u914D\u7F6E\uFF0C\u65E0\u9700\u5FC5\u586B\u5165\u53C2" }
|
|
1116
|
+
),
|
|
1117
|
+
handler: async (args, env) => {
|
|
1109
1118
|
const response = await env.host.request({
|
|
1110
1119
|
method: "GET",
|
|
1111
1120
|
path: searchFieldsPath(profile),
|
|
@@ -1115,24 +1124,47 @@ function makeFieldsOperation(profile) {
|
|
|
1115
1124
|
const data = unwrapData(response) ?? {};
|
|
1116
1125
|
const layout = Array.isArray(data.layout) ? data.layout : [];
|
|
1117
1126
|
const groups = Array.isArray(data.groups) ? data.groups : [];
|
|
1127
|
+
const items = data.items ?? {};
|
|
1118
1128
|
const groupTitle = new Map(
|
|
1119
1129
|
groups.map((group) => [String(group.id), String(group.title ?? "")])
|
|
1120
1130
|
);
|
|
1121
1131
|
const fields = layout.flat().map((item) => {
|
|
1122
1132
|
const id = String(item?.id ?? "");
|
|
1123
1133
|
const groupId = String(item?.groupId ?? "");
|
|
1134
|
+
const config = items[id] ?? {};
|
|
1135
|
+
const itemType = typeof config.itemType === "string" ? config.itemType : "";
|
|
1136
|
+
const options = Array.isArray(config.options) ? config.options.map((option) => ({
|
|
1137
|
+
id: String(option?.id ?? ""),
|
|
1138
|
+
name: String(option?.content ?? "")
|
|
1139
|
+
})).filter((option) => option.id.length > 0 && option.name.length > 0) : [];
|
|
1124
1140
|
return {
|
|
1125
1141
|
fieldName: id,
|
|
1126
1142
|
showName: String(item?.label ?? ""),
|
|
1127
1143
|
groupId,
|
|
1128
1144
|
groupName: groupTitle.get(groupId) ?? "",
|
|
1129
|
-
hidden: item?.hide === true
|
|
1145
|
+
hidden: item?.hide === true,
|
|
1146
|
+
...itemType ? { itemType } : {},
|
|
1147
|
+
...config.multiple === true ? { multiple: true } : {},
|
|
1148
|
+
...options.length > 0 ? { options } : {}
|
|
1130
1149
|
};
|
|
1131
1150
|
}).filter((item) => item.fieldName.length > 0);
|
|
1151
|
+
const wanted = typeof args.field === "string" ? args.field.trim() : "";
|
|
1152
|
+
const picked = wanted ? fields.filter((item) => item.fieldName === wanted) : fields;
|
|
1153
|
+
if (wanted && picked.length === 0) {
|
|
1154
|
+
throw archiveOaValidationError(
|
|
1155
|
+
"field_unknown",
|
|
1156
|
+
`\u5B57\u6BB5 ${wanted} \u4E0D\u5728${profile.source === "qys" ? "\u5951\u7EA6\u9501" : "\u6CDB\u5FAE"}\u5546\u52A1\u5408\u540C\u7684\u641C\u7D22\u5B57\u6BB5\u4E2D`
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1132
1159
|
return archiveOaSuccess(
|
|
1133
1160
|
name,
|
|
1134
|
-
{ fields },
|
|
1135
|
-
{
|
|
1161
|
+
{ fields: picked },
|
|
1162
|
+
{
|
|
1163
|
+
source: profile.source,
|
|
1164
|
+
listId: profile.listId,
|
|
1165
|
+
count: picked.length,
|
|
1166
|
+
...wanted ? { field: wanted } : {}
|
|
1167
|
+
}
|
|
1136
1168
|
);
|
|
1137
1169
|
}
|
|
1138
1170
|
};
|
|
@@ -1302,6 +1334,102 @@ var contractModuleOptionsOperation = {
|
|
|
1302
1334
|
});
|
|
1303
1335
|
}
|
|
1304
1336
|
};
|
|
1337
|
+
var INDUSTRY_BROWSER_PATH = "/api/bcw/common/browser/complete/customBrowser_industrybrowser";
|
|
1338
|
+
var INDUSTRY_CONTROL_ID = "-1904370529";
|
|
1339
|
+
function flattenIndustryTree(nodes, parentPath = "", depth = 0) {
|
|
1340
|
+
if (!Array.isArray(nodes)) return [];
|
|
1341
|
+
const out = [];
|
|
1342
|
+
for (const raw of nodes) {
|
|
1343
|
+
if (!raw || typeof raw !== "object") continue;
|
|
1344
|
+
const node = raw;
|
|
1345
|
+
const name = String(node.content ?? "");
|
|
1346
|
+
const id = String(node.dataId ?? node.id ?? "");
|
|
1347
|
+
if (id.length === 0) continue;
|
|
1348
|
+
const path = parentPath ? `${parentPath}/${name}` : name;
|
|
1349
|
+
out.push({
|
|
1350
|
+
id,
|
|
1351
|
+
name,
|
|
1352
|
+
path,
|
|
1353
|
+
level: Number(node.level ?? depth + 1),
|
|
1354
|
+
leaf: node.isLeaf === true || !Array.isArray(node.children) || node.children.length === 0
|
|
1355
|
+
});
|
|
1356
|
+
if (Array.isArray(node.children) && node.children.length > 0) {
|
|
1357
|
+
out.push(...flattenIndustryTree(node.children, path, depth + 1));
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
return out;
|
|
1361
|
+
}
|
|
1362
|
+
function dedupeIndustryNodes(list) {
|
|
1363
|
+
const byId = /* @__PURE__ */ new Map();
|
|
1364
|
+
for (const item of list) {
|
|
1365
|
+
const prev = byId.get(item.id);
|
|
1366
|
+
if (!prev || item.path.length > prev.path.length) byId.set(item.id, item);
|
|
1367
|
+
}
|
|
1368
|
+
return [...byId.values()];
|
|
1369
|
+
}
|
|
1370
|
+
var contractIndustryOptionsOperation = {
|
|
1371
|
+
name: "archive-oa.contract.industry-options",
|
|
1372
|
+
resource: "contract",
|
|
1373
|
+
method: "industry-options",
|
|
1374
|
+
action: "archive-oa.contract.industry-options",
|
|
1375
|
+
summary: "\u67E5\u8BE2\u6240\u5C5E\u884C\u4E1A\uFF08ssxynew\uFF09\uFF1A\u9ED8\u8BA4\u62C9\u5168\u91CF\u884C\u4E1A\u6811\uFF0C\u6309\u5173\u952E\u5B57\u672C\u5730\u8FC7\u6EE4\u540E\u8FD4\u56DE\u547D\u4E2D\u8282\u70B9\u53CA\u5176\u5168\u90E8\u4E0B\u7EA7\u8282\u70B9\uFF0C\u53EF\u76F4\u63A5\u7528\u4E8E in \u6761\u4EF6",
|
|
1376
|
+
capability: "contract",
|
|
1377
|
+
risk: READ,
|
|
1378
|
+
inputSchema: schemaOf(
|
|
1379
|
+
{
|
|
1380
|
+
keyword: { type: "string", description: "\u5173\u952E\u5B57\uFF0C\u5982\u300C\u91C7\u77FF\u300D\u300C\u91D1\u878D\u300D\uFF1B\u7F3A\u7701\u8FD4\u56DE\u6574\u68F5\u6811\uFF08\u4E0D\u5206\u9875\u5C55\u793A\u65F6\u614E\u7528\uFF09" },
|
|
1381
|
+
pageSize: { type: "integer", minimum: 1, maximum: 200, description: "options \u8FD4\u56DE\u6761\u6570\uFF0C\u7F3A\u7701 50" }
|
|
1382
|
+
},
|
|
1383
|
+
{ description: "\u67E5\u8BE2\u6240\u5C5E\u884C\u4E1A\u6811\u8282\u70B9\uFF08\u542B\u5168\u90E8\u4E0B\u7EA7\u884C\u4E1A\uFF09" }
|
|
1384
|
+
),
|
|
1385
|
+
handler: async (args, env) => {
|
|
1386
|
+
const keyword = typeof args.keyword === "string" ? args.keyword.trim() : "";
|
|
1387
|
+
const pageSize = positiveInt(args.pageSize, "pageSize", 50);
|
|
1388
|
+
if (pageSize > 200) {
|
|
1389
|
+
throw archiveOaValidationError("number_invalid", "pageSize \u6700\u591A 200");
|
|
1390
|
+
}
|
|
1391
|
+
const response = await env.host.request({
|
|
1392
|
+
method: "POST",
|
|
1393
|
+
path: INDUSTRY_BROWSER_PATH,
|
|
1394
|
+
operation: "archive-oa.contract.industry-options",
|
|
1395
|
+
body: {
|
|
1396
|
+
browserMultiple: true,
|
|
1397
|
+
fromSearch: "1",
|
|
1398
|
+
controlId: INDUSTRY_CONTROL_ID,
|
|
1399
|
+
formParam: JSON.stringify({ filterItems: [], module: "ebuilderform", dataDetails: [] }),
|
|
1400
|
+
notFromLayout: true,
|
|
1401
|
+
/**
|
|
1402
|
+
* 固定按「首次加载」形态拉**全量**行业树(`newly:1` + 空 `searchValue`),
|
|
1403
|
+
* 关键字在本地过滤:服务端按 searchValue 过滤时会按命中节点返回森林,
|
|
1404
|
+
* 同一行业出现多条、且子节点缺上级路径前缀,不如全量树干净。
|
|
1405
|
+
*/
|
|
1406
|
+
newly: 1,
|
|
1407
|
+
searchValue: ""
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
const data = unwrapData(response);
|
|
1411
|
+
const tree = data?.data;
|
|
1412
|
+
const all = dedupeIndustryNodes(flattenIndustryTree(tree));
|
|
1413
|
+
const matched = keyword ? all.filter((item) => item.name.includes(keyword) || item.path.includes(keyword)) : all;
|
|
1414
|
+
const options = matched.slice(0, pageSize).map((item) => ({
|
|
1415
|
+
...item,
|
|
1416
|
+
subtreeCount: all.filter(
|
|
1417
|
+
(other) => other.id === item.id || other.path.startsWith(`${item.path}/`)
|
|
1418
|
+
).length
|
|
1419
|
+
}));
|
|
1420
|
+
const nodes = all.filter((item) => matched.some(
|
|
1421
|
+
(hit) => item.id === hit.id || item.path.startsWith(`${hit.path}/`)
|
|
1422
|
+
));
|
|
1423
|
+
return archiveOaSuccess("archive-oa.contract.industry-options", {
|
|
1424
|
+
keyword,
|
|
1425
|
+
treeTotal: all.length,
|
|
1426
|
+
total: matched.length,
|
|
1427
|
+
descendantTotal: nodes.length,
|
|
1428
|
+
options,
|
|
1429
|
+
nodes
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1305
1433
|
|
|
1306
1434
|
// src/shortcuts/archive-oa/operations/my-borrow-contract.ts
|
|
1307
1435
|
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
@@ -1567,6 +1695,7 @@ function buildRegistry() {
|
|
|
1567
1695
|
archiveLocateOperation,
|
|
1568
1696
|
myBorrowListOperation,
|
|
1569
1697
|
contractModuleOptionsOperation,
|
|
1698
|
+
contractIndustryOptionsOperation,
|
|
1570
1699
|
weaverContractFieldsOperation,
|
|
1571
1700
|
qysContractFieldsOperation,
|
|
1572
1701
|
weaverContractListOperation,
|
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
createE10RequestRuntime,
|
|
11
11
|
isE10SessionExpiredResponse,
|
|
12
12
|
requireE10Session
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WVH5ESDA.js";
|
|
14
14
|
import {
|
|
15
15
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
16
16
|
getActiveProfile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SFM3M2L3.js";
|
|
18
|
+
import "./chunk-SHYQUBY3.js";
|
|
18
19
|
import {
|
|
19
20
|
CliError,
|
|
20
21
|
isCliError,
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
createE10RequestRuntime,
|
|
9
9
|
isE10SessionExpiredResponse,
|
|
10
10
|
requireE10Session
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WVH5ESDA.js";
|
|
12
12
|
import {
|
|
13
13
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
14
14
|
getActiveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SFM3M2L3.js";
|
|
16
|
+
import "./chunk-SHYQUBY3.js";
|
|
16
17
|
import {
|
|
17
18
|
CliError,
|
|
18
19
|
isCliError,
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
looksLikeFileId,
|
|
9
9
|
meetingAttachmentContentOperations,
|
|
10
10
|
parseFileIdList
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-6MS3RLPO.js";
|
|
12
|
+
import "./chunk-WMRNO6IU.js";
|
|
13
|
+
import "./chunk-L2LMBFG5.js";
|
|
14
|
+
import "./chunk-6DVL5IN5.js";
|
|
14
15
|
import "./chunk-7BDPM5ST.js";
|
|
15
16
|
import "./chunk-UG5G54VL.js";
|
|
16
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
createE10RequestRuntime,
|
|
11
11
|
isE10SessionExpiredResponse,
|
|
12
12
|
requireE10Session
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WVH5ESDA.js";
|
|
14
14
|
import {
|
|
15
15
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
16
16
|
getActiveProfile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SFM3M2L3.js";
|
|
18
|
+
import "./chunk-SHYQUBY3.js";
|
|
18
19
|
import {
|
|
19
20
|
CliError,
|
|
20
21
|
isCliError,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
caizhilianManifest,
|
|
5
5
|
caizhilianOperationDefinitions,
|
|
6
6
|
executeCaizhilianOperation
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WMB3SMXI.js";
|
|
8
8
|
import {
|
|
9
9
|
createCaizhilianHost
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VMCCRWFO.js";
|
|
11
11
|
import {
|
|
12
12
|
createCaizhilianContinuationSigner
|
|
13
13
|
} from "./chunk-VRPH24IC.js";
|
|
@@ -18,8 +18,9 @@ import {
|
|
|
18
18
|
reportPlatformError
|
|
19
19
|
} from "./chunk-6N4JPNFL.js";
|
|
20
20
|
import "./chunk-7BDPM5ST.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WVH5ESDA.js";
|
|
22
|
+
import "./chunk-SFM3M2L3.js";
|
|
23
|
+
import "./chunk-SHYQUBY3.js";
|
|
23
24
|
import {
|
|
24
25
|
isCliError,
|
|
25
26
|
toErrorEnvelope
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
createE10RequestRuntime,
|
|
13
13
|
isE10SessionExpiredResponse,
|
|
14
14
|
requireE10Session
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WVH5ESDA.js";
|
|
16
16
|
import {
|
|
17
17
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
18
18
|
getActiveProfile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SFM3M2L3.js";
|
|
20
|
+
import "./chunk-SHYQUBY3.js";
|
|
20
21
|
import {
|
|
21
22
|
CliError,
|
|
22
23
|
isCliError,
|