weaver-work-cli 0.1.49 → 0.1.52
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/README.md +1 -1
- package/dist/chunks/{attachment-content-MU2LPI5P.js → attachment-content-MBYYSQIX.js} +3 -3
- package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-7UOXOGFL.js} +4 -4
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-3NV2ETZR.js → chunk-D3TDNRFE.js} +8 -8
- package/dist/chunks/{chunk-6GWU63YF.js → chunk-DZOC77ZD.js} +1 -1
- package/dist/chunks/{chunk-K3BT54CU.js → chunk-IRMA3GVP.js} +1 -1
- package/dist/chunks/{chunk-3X7VOSBA.js → chunk-KLZ3ULQQ.js} +1 -1
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-LALWNK6M.js} +167 -44
- package/dist/chunks/{chunk-BRRW7CWA.js → chunk-LM2H7SZI.js} +26 -26
- package/dist/chunks/{chunk-KV5SOWMS.js → chunk-LTRLF6MM.js} +4 -4
- package/dist/chunks/{chunk-D2QRZUW4.js → chunk-RPRFIG6I.js} +35 -28
- package/dist/chunks/{chunk-GEOMANP7.js → chunk-RWFRZSIP.js} +2 -2
- package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-ZRHKGQRQ.js} +2 -2
- package/dist/chunks/{conflict-6347A7YK.js → conflict-D2HYKBMH.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-MFOFMM2J.js} +4284 -254
- package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-7ZATJVTM.js} +6 -6
- package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
- package/dist/chunks/{env-LHRKSLG6.js → env-5DO4YENS.js} +2 -2
- package/dist/chunks/{factory-2H7Z4RWJ.js → factory-3M7D7WJC.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-B2HT5NEO.js} +3 -3
- package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
- package/dist/chunks/{invoice-FXWH5GPO.js → invoice-V7ZTITUO.js} +726 -206
- package/dist/chunks/{meeting-N2FQBHXI.js → meeting-HZOX3CBB.js} +10 -10
- package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
- package/dist/chunks/{reception-MYOKJULO.js → reception-QGPNTGHG.js} +98 -82
- package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
- package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
- package/dist/chunks/{registry-7VZ6YJUF.js → registry-KYPFFQIH.js} +1 -1
- package/dist/chunks/{registry-CKUVBS53.js → registry-SJHSBO5G.js} +10 -10
- package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-5AHR4YQV.js} +4 -4
- package/dist/chunks/{schedule-5IFMCXME.js → schedule-KZPJUPC2.js} +4 -4
- package/dist/chunks/smart-extract-IXHCZE4R.js +2846 -0
- package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-UHKCZJMY.js} +1 -1
- package/dist/index.js +14 -9
- package/dist/shortcuts/contract/host.js +11 -0
- package/dist/shortcuts/contract/index.js +13 -0
- package/dist/shortcuts/contract/manifest.js +204 -0
- package/dist/shortcuts/contract/operations/card-action.js +585 -0
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +315 -0
- package/dist/shortcuts/contract/operations/card-plan.js +327 -0
- package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
- package/dist/shortcuts/contract/operations/elements-build.js +714 -0
- package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
- package/dist/shortcuts/contract/operations/first-screen.js +563 -0
- package/dist/shortcuts/contract/operations/flow.js +81 -25
- package/dist/shortcuts/contract/operations/modeltext.js +132 -0
- package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
- package/dist/shortcuts/contract/operations/performance.js +58 -7
- package/dist/shortcuts/contract/operations/quote.js +410 -22
- package/dist/shortcuts/contract/operations/registry.js +22 -0
- package/dist/shortcuts/contract/operations/review.js +73 -58
- package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
- package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
- package/dist/shortcuts/contract/operations/summary.js +4 -2
- package/dist/shortcuts/contract/operations/upload.js +48 -7
- package/dist/shortcuts/contract/prewarm-cache.js +90 -0
- package/dist/shortcuts/contract/prewarm.js +88 -0
- package/dist/shortcuts/contract/upload-cache.js +49 -4
- package/dist/shortcuts/data/index.js +1 -6
- package/dist/shortcuts/data/manifest.js +2 -2
- package/dist/shortcuts/data/operations/index.js +1 -1
- package/dist/shortcuts/data/operations/query.js +23 -46
- package/dist/shortcuts/fna/host.js +4 -2
- package/dist/shortcuts/fna/manifest.js +14 -5
- package/dist/shortcuts/fna/operations/audit.js +334 -0
- package/dist/shortcuts/fna/operations/registry.js +2 -0
- package/dist/shortcuts/im/operations/at-mention.js +6 -3
- package/dist/shortcuts/im/operations/msg-parse.js +35 -5
- package/dist/shortcuts/im/operations/msg-sync.js +3 -1
- package/dist/shortcuts/im/operations/msg-write.js +57 -9
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/index.js +0 -12
- package/dist/shortcuts/invoice/manifest.js +201 -50
- package/dist/shortcuts/invoice/operations/registry.js +4 -2
- package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
- package/dist/shortcuts/invoice/operations/shared.js +3 -19
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
- package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
- package/dist/shortcuts/reception/constants.js +3 -7
- package/dist/shortcuts/reception/operations/leads.js +30 -6
- package/dist/shortcuts/reception/operations/panels.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
- package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
- package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
- package/dist/shortcuts/recruit-stage/shared.js +5 -0
- package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
- package/dist/shortcuts/smart-extract/constants.js +79 -0
- package/dist/shortcuts/smart-extract/continuation.js +71 -0
- package/dist/shortcuts/smart-extract/errors.js +68 -0
- package/dist/shortcuts/smart-extract/host.js +191 -0
- package/dist/shortcuts/smart-extract/index.js +105 -0
- package/dist/shortcuts/smart-extract/ledger.js +70 -0
- package/dist/shortcuts/smart-extract/manifest.js +35 -0
- package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
- package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
- package/dist/shortcuts/smart-extract/operations/config.js +118 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +489 -0
- package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
- package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
- package/dist/shortcuts/smart-extract/operations/save.js +355 -0
- package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
- package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
- package/dist/shortcuts/smart-extract/operations/target.js +167 -0
- package/dist/shortcuts/smart-extract/operations/types.js +22 -0
- package/dist/shortcuts/smart-extract/operations/validate.js +408 -0
- package/dist/shortcuts/workflow/operations/read.js +77 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +140 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +42 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -6
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +4 -1
- package/docs/agent-invoice.md +5 -7
- package/docs/data.md +5 -1
- package/docs/fna.md +24 -4
- package/docs/invoice.md +7 -5
- package/docs/smart-extract.md +156 -0
- package/package.json +1 -1
- package/skill-template/business-info.json +21 -1
- package/skill-template/domains/qiyecheng.md +6 -2
- package/skill-template/domains/smart-extract.md +16 -0
- package/skill-template/domains/yepiaotong.md +2 -2
- package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +159 -11
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +13 -8
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +44 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +220 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +68 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +26 -15
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +90 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +167 -5
- package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +200 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +572 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
- package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +560 -0
- package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +894 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +93 -0
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +58 -7
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +118 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +42 -3
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +153 -40
- package/skills/weaver-e10-reception-flow/SKILL.md +43 -6
- package/skills/weaver-e10-reception-flow/references/guide.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -40
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
- package/skills/weaver-e10-smart-extract/SKILL.md +169 -0
- package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
- package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +105 -0
- package/skills/weaver-e10-workflow/SKILL.md +2 -1
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +29 -6
- package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +162 -10
- package/skills/weaver-e10-yepiaotong/SKILL.md +53 -35
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +18 -53
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +96 -7
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +5 -38
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +14 -14
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +139 -94
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +131 -58
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
- package/skills/weaver-e10-yimiaoban/SKILL.md +8 -6
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +20 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +7 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +18 -15
- package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
|
@@ -219,18 +219,6 @@ export const invoiceShortcut = {
|
|
|
219
219
|
url: opts.url,
|
|
220
220
|
}), projectionFrom(options));
|
|
221
221
|
}));
|
|
222
|
-
const validate = invoice.command('validate').description('Invoice validation commands');
|
|
223
|
-
withInvoiceOptions(validate.command('preview')
|
|
224
|
-
.description('Validate an existing invoice without saving validation result')
|
|
225
|
-
.option('--fid <fid>', 'invoice fid')
|
|
226
|
-
.option('--scope <scope>', 'personal or enterprise'))
|
|
227
|
-
.action(action(async (ctx, options) => {
|
|
228
|
-
const opts = asOptions(options);
|
|
229
|
-
await executeAndPrint(ctx, 'invoice.validate.preview', await inputFrom(options, {
|
|
230
|
-
fid: opts.fid,
|
|
231
|
-
scope: opts.scope,
|
|
232
|
-
}), projectionFrom(options));
|
|
233
|
-
}));
|
|
234
222
|
const importCommand = invoice.command('import').description('Invoice file import commands');
|
|
235
223
|
withInvoiceOptions(importCommand.command('prepare')
|
|
236
224
|
.description('Prepare a confirmed invoice file import')
|
|
@@ -304,39 +304,37 @@ const ocrPreviewOutputSchema = objectSchema({
|
|
|
304
304
|
results: rawArray,
|
|
305
305
|
workflow: workflowSchema,
|
|
306
306
|
}, ['saved', 'verified', 'upload', 'invoices', 'results', 'workflow']);
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}, ['fid', '
|
|
307
|
+
const uploadAndValidateItemSchema = objectSchema({
|
|
308
|
+
fid: { type: 'string', description: '为空表示这张没进票夹;非空即已进个人票夹(含查验没通过的)。' },
|
|
309
|
+
code: { type: 'string', description: '发票代码,全电发票为空串。' },
|
|
310
|
+
number: { type: 'string', description: '发票号码。' },
|
|
311
|
+
cname: { type: 'string', description: '票种名称(comm_info.pro.cname)。' },
|
|
312
|
+
type: { type: 'integer', description: '票种代码(comm_info.pro.type)。17/18/57/58 是相关凭证(小票/水单、滴滴等行程单、支付凭证、其他票据凭证),报销时不单独成行;16/48 是航空运输电子客票行程单,算发票。' },
|
|
313
|
+
kind: { type: 'string', description: '消费类别(comm_info.pro.kind),空值省键。' },
|
|
314
|
+
date: { type: 'string', description: '开票日期 YYYY-MM-DD。' },
|
|
315
|
+
amount: { type: 'string', description: '不含税金额。' },
|
|
316
|
+
total: { type: 'string', description: '价税合计。' },
|
|
317
|
+
dtax: { type: 'string', description: '税额。' },
|
|
318
|
+
buyer: invoicePartySchema,
|
|
319
|
+
payer: invoicePartySchema,
|
|
320
|
+
ext: {
|
|
321
|
+
...jsonObject,
|
|
322
|
+
description: '已解析的票面 ext,去掉 null / 空值和印章、大写金额等版式标记;常见键:ttax 税额、trate 税率、content 消费内容、comment 备注、city / province、issuer 开票人、service_name 服务类型、products[](name 名称、smodel 规格、muint 单位、qty 数量、price 单价、amount 金额、trate 税率、tprice 税额)。',
|
|
323
|
+
},
|
|
324
|
+
ret: objectSchema({
|
|
325
|
+
ret: { type: 'integer', description: '0=识别并查验成功;非 0 见 message。' },
|
|
326
|
+
message: { type: 'string' },
|
|
327
|
+
}, ['ret']),
|
|
328
|
+
validated: { type: 'boolean', description: 'ret.ret === 0。' },
|
|
329
|
+
detailUrl: { type: 'string', description: '发票详情页链接,fid 为空时省键。' },
|
|
330
|
+
}, ['fid', 'code', 'number', 'cname', 'type', 'date', 'amount', 'total', 'dtax', 'buyer', 'payer', 'ext', 'ret', 'validated']);
|
|
331
331
|
const uploadAndValidateOutputSchema = objectSchema({
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
validationErrors: arrayOf(objectSchema({ fid: { type: ['string', 'null'] }, error: { type: 'string' } }, ['error'])),
|
|
337
|
-
results: rawArray,
|
|
332
|
+
fileName: { type: 'string', description: '本次上传的文件名(url 来源时为 url)。' },
|
|
333
|
+
count: { type: 'integer', minimum: 1, description: '识别出的票据张数,发票和行程单都算。' },
|
|
334
|
+
validatedCount: { type: 'integer', minimum: 0, description: '识别并查验成功(ret.ret=0)的张数。' },
|
|
335
|
+
invoices: arrayOf(uploadAndValidateItemSchema),
|
|
338
336
|
workflow: workflowSchema,
|
|
339
|
-
}, ['
|
|
337
|
+
}, ['fileName', 'count', 'validatedCount', 'invoices', 'workflow']);
|
|
340
338
|
const importPreviewSchema = objectSchema({
|
|
341
339
|
source: { type: 'string', enum: ['file', 'url'] },
|
|
342
340
|
name: { type: 'string' },
|
|
@@ -481,6 +479,88 @@ const reimCandidatesOutputSchema = objectSchema({
|
|
|
481
479
|
workflow: workflowSchema,
|
|
482
480
|
}, ['total', 'fetched', 'hasMore', 'available', 'assigned', 'summary', 'warnings', 'workflow']);
|
|
483
481
|
const nullableText = { type: ['string', 'null'] };
|
|
482
|
+
const relationIdNameSchema = {
|
|
483
|
+
type: ['object', 'null'],
|
|
484
|
+
additionalProperties: false,
|
|
485
|
+
required: ['id', 'name', 'value'],
|
|
486
|
+
properties: {
|
|
487
|
+
id: { type: 'string' },
|
|
488
|
+
name: { type: 'string' },
|
|
489
|
+
value: { type: 'string', description: '名称(ID),写报销单浏览按钮时原样使用' },
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
const relationPreApprovalSchema = {
|
|
493
|
+
type: ['object', 'null'],
|
|
494
|
+
additionalProperties: false,
|
|
495
|
+
required: ['requestId', 'requestName', 'value', 'displayName', 'createTime'],
|
|
496
|
+
properties: {
|
|
497
|
+
requestId: { type: 'string', description: '事前申请流程 requestid' },
|
|
498
|
+
requestName: { type: 'string', description: '事前申请流程标题(已去掉浏览按钮末尾的「 (相关客户:…)」摘要)' },
|
|
499
|
+
value: { type: 'string', description: '{requestName}({requestId}),写明细「相关流程」时原样使用' },
|
|
500
|
+
displayName: { type: 'string', description: '浏览按钮原始展示名' },
|
|
501
|
+
createTime: nullableText,
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
const relationGroupsSchema = arrayOf(objectSchema({
|
|
505
|
+
value: { type: 'string' },
|
|
506
|
+
fids: arrayOf({ type: 'string' }),
|
|
507
|
+
}, ['value', 'fids']));
|
|
508
|
+
const relationSearchItemSchema = objectSchema({
|
|
509
|
+
id: { type: 'string', description: '相关客户 / 相关项目 ID,登记时传 customerId / projectId' },
|
|
510
|
+
name: { type: 'string', description: '相关客户 / 相关项目名称,登记时传 customerName / projectName' },
|
|
511
|
+
}, ['id', 'name']);
|
|
512
|
+
const relationSearchOutputSchema = objectSchema({
|
|
513
|
+
target: { type: 'string', enum: ['customer', 'project'] },
|
|
514
|
+
keywords: { type: 'string' },
|
|
515
|
+
match: { type: 'string', enum: ['unique', 'multiple', 'none'] },
|
|
516
|
+
items: arrayOf(relationSearchItemSchema),
|
|
517
|
+
selected: {
|
|
518
|
+
anyOf: [relationSearchItemSchema, { type: 'null' }],
|
|
519
|
+
description: '只搜到一条,或有一条名称与 keywords 完全一致时给出;否则为 null,让用户从 items 里选',
|
|
520
|
+
},
|
|
521
|
+
workflow: workflowSchema,
|
|
522
|
+
}, ['target', 'keywords', 'match', 'items', 'selected', 'workflow']);
|
|
523
|
+
const relationSaveOutputSchema = objectSchema({
|
|
524
|
+
saved: { type: 'boolean', description: '全部发票都返回「关联成功」时为 true' },
|
|
525
|
+
savedCount: { type: 'integer' },
|
|
526
|
+
failedCount: { type: 'integer' },
|
|
527
|
+
results: arrayOf(objectSchema({
|
|
528
|
+
fid: { type: 'string' },
|
|
529
|
+
saved: { type: 'boolean' },
|
|
530
|
+
message: { type: 'string', description: '动作流返回的 msg,或失败原因' },
|
|
531
|
+
}, ['fid', 'saved', 'message'])),
|
|
532
|
+
relation: objectSchema({
|
|
533
|
+
customerId: { type: 'string' },
|
|
534
|
+
customerName: { type: 'string' },
|
|
535
|
+
projectId: { type: 'string' },
|
|
536
|
+
projectName: { type: 'string' },
|
|
537
|
+
flowId: { type: 'string' },
|
|
538
|
+
}, ['customerId', 'customerName', 'projectId', 'projectName', 'flowId']),
|
|
539
|
+
workflow: workflowSchema,
|
|
540
|
+
}, ['saved', 'savedCount', 'failedCount', 'results', 'relation', 'workflow']);
|
|
541
|
+
const relationListOutputSchema = objectSchema({
|
|
542
|
+
items: arrayOf(objectSchema({
|
|
543
|
+
fid: { type: 'string' },
|
|
544
|
+
found: { type: 'boolean', description: '上传时登记过关联信息为 true;为 true 但 project 为 null 表示当时没填项目' },
|
|
545
|
+
customer: relationIdNameSchema,
|
|
546
|
+
project: relationIdNameSchema,
|
|
547
|
+
preApproval: relationPreApprovalSchema,
|
|
548
|
+
recordedAt: { ...nullableText, description: '登记时间' },
|
|
549
|
+
}, ['fid', 'found', 'customer', 'project', 'preApproval', 'recordedAt'])),
|
|
550
|
+
groups: objectSchema({
|
|
551
|
+
customers: relationGroupsSchema,
|
|
552
|
+
projects: relationGroupsSchema,
|
|
553
|
+
preApprovals: relationGroupsSchema,
|
|
554
|
+
}, ['customers', 'projects', 'preApprovals']),
|
|
555
|
+
failed: arrayOf(objectSchema({ fid: { type: 'string' }, error: { type: 'string' } }, ['fid', 'error'])),
|
|
556
|
+
summary: objectSchema({
|
|
557
|
+
requested: { type: 'integer' },
|
|
558
|
+
found: { type: 'integer' },
|
|
559
|
+
notFound: { type: 'integer' },
|
|
560
|
+
failed: { type: 'integer' },
|
|
561
|
+
}, ['requested', 'found', 'notFound', 'failed']),
|
|
562
|
+
workflow: workflowSchema,
|
|
563
|
+
}, ['items', 'groups', 'failed', 'summary', 'workflow']);
|
|
484
564
|
const issuingContractsOutputSchema = objectSchema({
|
|
485
565
|
cards: arrayOf(objectSchema({
|
|
486
566
|
requestId: { type: 'string', description: '合同审批流程的 requestId' },
|
|
@@ -588,34 +668,16 @@ export const invoiceOperations = [
|
|
|
588
668
|
},
|
|
589
669
|
outputSchema: ocrPreviewOutputSchema,
|
|
590
670
|
},
|
|
591
|
-
{
|
|
592
|
-
name: 'invoice.validate.preview',
|
|
593
|
-
risk: 'external-read',
|
|
594
|
-
fixed: { flag: 100, is_save: 1, needLog: true },
|
|
595
|
-
inputSchema: {
|
|
596
|
-
type: 'object',
|
|
597
|
-
additionalProperties: false,
|
|
598
|
-
properties: {
|
|
599
|
-
fid: { type: 'string', pattern: '^[1-9]\\d*$' },
|
|
600
|
-
scope: { type: 'string', enum: ['personal', 'enterprise'] },
|
|
601
|
-
},
|
|
602
|
-
required: ['fid', 'scope'],
|
|
603
|
-
},
|
|
604
|
-
outputSchema: validationPreviewOutputSchema,
|
|
605
|
-
},
|
|
606
671
|
{
|
|
607
672
|
name: 'invoice.upload-and-validate',
|
|
608
673
|
risk: 'read-with-upload',
|
|
609
|
-
fixed: { ocr: 1, flag: 100, is_save: 1, needLog: true },
|
|
610
674
|
inputSchema: {
|
|
611
675
|
type: 'object',
|
|
612
676
|
additionalProperties: false,
|
|
613
677
|
properties: {
|
|
614
678
|
file: { type: 'string', minLength: 1 },
|
|
615
679
|
url: { type: 'string', format: 'uri' },
|
|
616
|
-
scope: { type: 'string', enum: ['personal', 'enterprise'] },
|
|
617
680
|
},
|
|
618
|
-
required: ['scope'],
|
|
619
681
|
oneOf: [{ required: ['file'] }, { required: ['url'] }],
|
|
620
682
|
},
|
|
621
683
|
outputSchema: uploadAndValidateOutputSchema,
|
|
@@ -913,6 +975,89 @@ export const invoiceOperations = [
|
|
|
913
975
|
workflow: workflowSchema,
|
|
914
976
|
}, ['result', 'data', 'keywords', 'match', 'items', 'workflow']),
|
|
915
977
|
},
|
|
978
|
+
{
|
|
979
|
+
name: 'invoice.reim.relation.search',
|
|
980
|
+
risk: 'read',
|
|
981
|
+
fixed: {
|
|
982
|
+
customer: {
|
|
983
|
+
path: '/api/ebuilder/coms/nlist/getData',
|
|
984
|
+
headers: { ebbusinessid: '1218181956452048911' },
|
|
985
|
+
pageId: '1218181956452048911',
|
|
986
|
+
compId: 'c39b9e14c0034336adf9e9bc39aeed75',
|
|
987
|
+
workflowId: '100003460000000060',
|
|
988
|
+
isCreate: '1',
|
|
989
|
+
filter: '客户表「名称」字段 field_1173221220888062665 模糊匹配 keywords',
|
|
990
|
+
output: 'data.list[]:id → id,1173221220888062665 → name',
|
|
991
|
+
},
|
|
992
|
+
project: {
|
|
993
|
+
path: '/api/ebuilder/form/common/browser/data/ebuilder',
|
|
994
|
+
quickSearchDatas: 'field_1020275734718578690(项目名称)= keywords',
|
|
995
|
+
formParam: { formId: '100003660000000007', layoutId: '925333107626672135', fieldId: '100003720000006720', module: 'workflow' },
|
|
996
|
+
output: 'data.data[]:id → id,content → name;disabled=true 的不返回',
|
|
997
|
+
},
|
|
998
|
+
pageSize: 20,
|
|
999
|
+
note: '上传发票登记关联信息时用,不需要报销表单;只保留每条的 id 和名称',
|
|
1000
|
+
},
|
|
1001
|
+
inputSchema: {
|
|
1002
|
+
type: 'object',
|
|
1003
|
+
additionalProperties: false,
|
|
1004
|
+
properties: {
|
|
1005
|
+
target: { type: 'string', enum: ['customer', 'project'], description: 'customer=相关客户,project=相关项目' },
|
|
1006
|
+
keywords: { type: 'string', minLength: 1, description: '用户说的客户 / 项目名称原话,可以是模糊名称' },
|
|
1007
|
+
},
|
|
1008
|
+
required: ['target', 'keywords'],
|
|
1009
|
+
},
|
|
1010
|
+
outputSchema: relationSearchOutputSchema,
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
name: 'invoice.reim.relation.save',
|
|
1014
|
+
risk: 'write',
|
|
1015
|
+
fixed: {
|
|
1016
|
+
path: '/api/esb/server/event/triggerActionFlow',
|
|
1017
|
+
esbFlowId: '908258457763844096',
|
|
1018
|
+
moduleSource: '-1',
|
|
1019
|
+
customParams: 'mainTable = {customerId, customerName, invoiceId(=fid), projectName, projectId, flowId},没提供的项传空字符串;每张发票触发一次',
|
|
1020
|
+
note: '尽力而为:失败不抛错、不重试,只在 results[].saved=false 里说明;动作流返回 msg「关联成功」才算保存成功',
|
|
1021
|
+
},
|
|
1022
|
+
inputSchema: {
|
|
1023
|
+
type: 'object',
|
|
1024
|
+
additionalProperties: false,
|
|
1025
|
+
properties: {
|
|
1026
|
+
fid: { ...positiveId, description: '单张发票 fid;与 fids 二选一' },
|
|
1027
|
+
fids: { ...positiveIdArray, description: '同一批上传成功的发票 fid;与 fid 二选一' },
|
|
1028
|
+
customerId: { ...positiveId, description: '相关客户 ID(invoice.reim.relation.search target=customer 选定那条的 id),与 customerName 同时提供' },
|
|
1029
|
+
customerName: { type: 'string', minLength: 1, description: '相关客户名称,与 customerId 同时提供' },
|
|
1030
|
+
projectId: { ...positiveId, description: '相关项目 ID(invoice.reim.relation.search target=project 选定那条的 id),与 projectName 同时提供' },
|
|
1031
|
+
projectName: { type: 'string', minLength: 1, description: '相关项目名称,与 projectId 同时提供' },
|
|
1032
|
+
flowId: { ...positiveId, description: '事前申请流程的 requestid(invoice.reim.requests.list 返回)' },
|
|
1033
|
+
},
|
|
1034
|
+
oneOf: [{ required: ['fid'] }, { required: ['fids'] }],
|
|
1035
|
+
},
|
|
1036
|
+
outputSchema: relationSaveOutputSchema,
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
name: 'invoice.reim.relation.list',
|
|
1040
|
+
risk: 'read',
|
|
1041
|
+
fixed: {
|
|
1042
|
+
path: '/api/ebuilder/form/eblist/getData',
|
|
1043
|
+
source: '发票附加信息表(按「单子发票ID」过滤,每张发票查一次)',
|
|
1044
|
+
headers: { ebbusinessid: '1336156118298222893' },
|
|
1045
|
+
pageId: '1336156118298222893',
|
|
1046
|
+
compId: 'deb95f0098754d498843187dcbe50093',
|
|
1047
|
+
tableuid: 'ef3603435af34e8aa635374c6610d8ab',
|
|
1048
|
+
note: '同一张发票登记过多次取 create_time 最新的一条;单张查询失败记在 failed 里,不抛错',
|
|
1049
|
+
},
|
|
1050
|
+
inputSchema: {
|
|
1051
|
+
type: 'object',
|
|
1052
|
+
additionalProperties: false,
|
|
1053
|
+
properties: {
|
|
1054
|
+
fid: positiveId,
|
|
1055
|
+
fids: { ...positiveIdArray, description: '本次报销已确认的发票 fid' },
|
|
1056
|
+
},
|
|
1057
|
+
oneOf: [{ required: ['fid'] }, { required: ['fids'] }],
|
|
1058
|
+
},
|
|
1059
|
+
outputSchema: relationListOutputSchema,
|
|
1060
|
+
},
|
|
916
1061
|
{
|
|
917
1062
|
name: 'invoice.reim.candidates.list',
|
|
918
1063
|
risk: 'read',
|
|
@@ -946,7 +1091,7 @@ export const invoiceOperations = [
|
|
|
946
1091
|
required: ['processTitle', 'reason', 'relatedProcessId', 'invoices'],
|
|
947
1092
|
properties: {
|
|
948
1093
|
processTitle: { type: 'string', minLength: 1, description: '报销流程标题,如「龚为明10月话费报销」' },
|
|
949
|
-
reason: { type: 'string', minLength: 1, description: '
|
|
1094
|
+
reason: { type: 'string', minLength: 1, description: '报销事由:话费固定「话费报销」,油费固定「油费报销」' },
|
|
950
1095
|
relatedProcessId: { ...positiveId, description: '话费 / 油费事前申请的 requestId' },
|
|
951
1096
|
invoices: {
|
|
952
1097
|
type: 'array',
|
|
@@ -1040,6 +1185,7 @@ export const invoiceOperations = [
|
|
|
1040
1185
|
];
|
|
1041
1186
|
const REIM_REFERENCE = 'references/invoice-reim.md';
|
|
1042
1187
|
const ISSUING_REFERENCE = 'references/invoice-issuing-workflow.md';
|
|
1188
|
+
const UPLOAD_AND_VALIDATE_REFERENCE = 'references/invoice-upload-and-validate.md';
|
|
1043
1189
|
/**
|
|
1044
1190
|
* 已下线的 operation:不可执行,也不在 operations 里。注册表按名字返回 operation_retired 和替代链路,
|
|
1045
1191
|
* 照旧 skill 调用的 Agent / 脚本才知道怎么改,而不是只拿到 operation_unknown。
|
|
@@ -1095,6 +1241,11 @@ export const invoiceRetiredOperations = [
|
|
|
1095
1241
|
replacement: '改为 workflow.search 查合同审批流程 → 把 data.cards 传给 invoice.issuing.contracts.list 列出待开票合同 → 选定后用 invoice.issuing.contract.detail 取客户和合同文档',
|
|
1096
1242
|
reference: ISSUING_REFERENCE,
|
|
1097
1243
|
},
|
|
1244
|
+
{
|
|
1245
|
+
name: 'invoice.validate.preview',
|
|
1246
|
+
replacement: '发票文件改用 invoice.upload-and-validate,一次完成上传、识别、查验;票夹里已有的发票不再单独查验',
|
|
1247
|
+
reference: UPLOAD_AND_VALIDATE_REFERENCE,
|
|
1248
|
+
},
|
|
1098
1249
|
];
|
|
1099
1250
|
export const invoiceManifest = {
|
|
1100
1251
|
schemaVersion: 1,
|
|
@@ -12,11 +12,11 @@ import { InvoiceListOperation } from './list.js';
|
|
|
12
12
|
import { InvoiceOcrPreviewOperation } from './ocr-preview.js';
|
|
13
13
|
import { InvoiceReimEmployeeSuperiorsOperation, InvoiceReimFieldSearchOperation, InvoiceReimFileOcrPreviewOperation, InvoiceReimRequestsListOperation, InvoiceReimWorkflowResolveOperation, } from './reim.js';
|
|
14
14
|
import { InvoiceReimCandidatesListOperation } from './reim-auto.js';
|
|
15
|
+
import { InvoiceReimRelationListOperation, InvoiceReimRelationSaveOperation, InvoiceReimRelationSearchOperation, } from './reim-relation.js';
|
|
15
16
|
import { InvoiceReimSubsidySubmitOperation } from './reim-subsidy.js';
|
|
16
17
|
import { InvoiceUpdateApplyOperation, InvoiceUpdatePrepareOperation } from './update.js';
|
|
17
18
|
import { InvoiceUploadOperation } from './upload.js';
|
|
18
19
|
import { InvoiceUploadAndValidateOperation } from './upload-and-validate.js';
|
|
19
|
-
import { InvoiceValidatePreviewOperation } from './validate-preview.js';
|
|
20
20
|
function buildRegistry() {
|
|
21
21
|
const registry = new Map();
|
|
22
22
|
const handlers = [
|
|
@@ -25,7 +25,6 @@ function buildRegistry() {
|
|
|
25
25
|
new InvoiceGetOperation(),
|
|
26
26
|
new InvoiceUploadOperation(),
|
|
27
27
|
new InvoiceOcrPreviewOperation(),
|
|
28
|
-
new InvoiceValidatePreviewOperation(),
|
|
29
28
|
new InvoiceUploadAndValidateOperation(),
|
|
30
29
|
new InvoiceImportPrepareOperation(),
|
|
31
30
|
new InvoiceImportApplyOperation(),
|
|
@@ -43,6 +42,9 @@ function buildRegistry() {
|
|
|
43
42
|
new InvoiceReimCandidatesListOperation(),
|
|
44
43
|
new InvoiceReimEmployeeSuperiorsOperation(),
|
|
45
44
|
new InvoiceReimFieldSearchOperation(),
|
|
45
|
+
new InvoiceReimRelationSearchOperation(),
|
|
46
|
+
new InvoiceReimRelationSaveOperation(),
|
|
47
|
+
new InvoiceReimRelationListOperation(),
|
|
46
48
|
new InvoiceReimSubsidySubmitOperation(),
|
|
47
49
|
new InvoiceIssuingContractsListOperation(),
|
|
48
50
|
new InvoiceIssuingContractDetailOperation(),
|