weaver-work-cli 0.1.75 → 0.1.78
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 +3 -1
- package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
- package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
- package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
- package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
- package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-TFOC3Y3X.js} +3 -3
- package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
- package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
- package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
- package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
- package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
- package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
- package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-5VQ7JHV4.js} +134 -49
- package/dist/chunks/{chunk-I6NOHKEK.js → chunk-7SQN5IZR.js} +1 -1
- package/dist/chunks/{chunk-4FCBEWNB.js → chunk-BP7BONZO.js} +675 -86
- package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
- package/dist/chunks/{chunk-PG5YSNYY.js → chunk-DACQKJ6O.js} +3 -3
- package/dist/chunks/{chunk-KWJEICD4.js → chunk-E2EY3DMS.js} +2 -2
- package/dist/chunks/{chunk-KEA4XQPO.js → chunk-FAC4IFGQ.js} +4 -4
- package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
- package/dist/chunks/{minute-doc-OQUMDTKG.js → chunk-IBTGXLOT.js} +101 -18
- package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
- package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
- package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
- package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
- package/dist/chunks/{chunk-2AUFKU2D.js → chunk-SWFTWNWL.js} +11 -11
- package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
- package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
- package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
- package/dist/chunks/{chunk-BSR5TM7U.js → chunk-USYFVIUR.js} +22 -7
- package/dist/chunks/{chunk-ERZY6GYL.js → chunk-UZ2E3VNI.js} +1 -1
- package/dist/chunks/{chunk-NWYHCZTY.js → chunk-VNEU7OUN.js} +1 -1
- package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
- package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/{chunk-QJWVYOOV.js → chunk-Z44YFIN6.js} +2 -2
- package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-ZOTXXGUM.js} +7 -7
- package/dist/chunks/{cli-FULPXIKJ.js → cli-WA7FOQKC.js} +35 -35
- package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
- package/dist/chunks/{conflict-5BKCDV2F.js → conflict-D4GVAURN.js} +2 -2
- package/dist/chunks/{contract-WI23OXVC.js → contract-GW7US3UF.js} +4400 -3548
- package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
- package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-ERDGW3FZ.js} +10 -6
- package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
- package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
- package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-P6T7OAAV.js} +2 -2
- package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-SQU5WTX6.js} +3 -3
- package/dist/chunks/{env-ZAQZ7EHN.js → env-DASBNSEM.js} +2 -2
- package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
- package/dist/chunks/{factory-XRI6KZ7H.js → factory-A3NAKZAA.js} +1 -1
- package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
- package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-7SEAVAJR.js} +3 -3
- package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
- package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
- package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
- package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
- package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
- package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
- package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
- package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
- package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
- package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
- package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-ZDKLS5MR.js} +6 -6
- package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
- package/dist/chunks/{meeting-WC5LD3IO.js → meeting-7AEQGBAT.js} +19 -13
- package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
- package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
- package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
- package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
- package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
- package/dist/chunks/{project-4XVBQ3HX.js → project-6PRGBLO2.js} +39 -15
- package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
- package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TLZJUFHD.js} +544 -464
- package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
- package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
- package/dist/chunks/{registry-NBTBXR4L.js → registry-UVTI323K.js} +12 -11
- package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-ELEJUYBN.js} +4 -4
- package/dist/chunks/{schedule-XOISYUPB.js → schedule-XBKY7VEA.js} +4 -4
- package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
- package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
- package/dist/chunks/{workflow-V54LJPXL.js → workflow-SYCBS5XD.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/internal/update/service.js +9 -8
- package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
- package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
- package/dist/shortcuts/contract/data/report-renderers.js +75 -31
- package/dist/shortcuts/contract/data/report-spec.js +17 -3
- package/dist/shortcuts/contract/manifest.js +20 -3
- package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
- package/dist/shortcuts/contract/operations/collection-node.js +116 -1
- package/dist/shortcuts/contract/operations/compare-report.js +27 -5
- package/dist/shortcuts/contract/operations/credit-page.js +11 -2
- package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
- package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
- package/dist/shortcuts/contract/operations/elements-build.js +162 -30
- package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
- package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
- package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
- package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
- package/dist/shortcuts/contract/operations/ledger.js +88 -16
- package/dist/shortcuts/contract/operations/metrics.js +16 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
- package/dist/shortcuts/contract/operations/page.js +23 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
- package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
- package/dist/shortcuts/contract/operations/review-report.js +11 -3
- package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
- package/dist/shortcuts/contract/operations/triage.js +18 -3
- package/dist/shortcuts/contract/operations/viewlink.js +17 -1
- package/dist/shortcuts/ehr/operations/recruit.js +255 -90
- package/dist/shortcuts/invoice/business-response.js +13 -0
- package/dist/shortcuts/invoice/calendar.js +24 -0
- package/dist/shortcuts/invoice/host.js +26 -15
- package/dist/shortcuts/invoice/index.js +2 -2
- package/dist/shortcuts/invoice/invoice-record.js +7 -2
- package/dist/shortcuts/invoice/manifest.js +179 -155
- package/dist/shortcuts/invoice/operations/get.js +9 -3
- package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
- package/dist/shortcuts/invoice/operations/registry.js +4 -5
- package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
- package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
- package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
- package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
- package/dist/shortcuts/invoice/operations/reim.js +2 -126
- package/dist/shortcuts/invoice/operations/shared.js +15 -17
- package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
- package/dist/shortcuts/invoice/projection.js +14 -0
- package/dist/shortcuts/invoice/read-enrichment.js +123 -0
- package/dist/shortcuts/meeting/confirm-gate.js +42 -0
- package/dist/shortcuts/meeting/continuation.js +6 -2
- package/dist/shortcuts/meeting/minute-doc.js +119 -12
- package/dist/shortcuts/meeting/operations/attachment.js +19 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
- package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
- package/dist/shortcuts/meeting/operations/group-share.js +268 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
- package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
- package/dist/shortcuts/meeting/operations/registry.js +4 -0
- package/dist/shortcuts/project/operations/read.js +40 -15
- package/dist/shortcuts/recruit-stage/context.js +16 -81
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
- package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
- package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
- package/dist/shortcuts/recruit-stage/shared.js +153 -4
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +11 -0
- package/dist/shortcuts/workflow/operations/read.js +24 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
- package/docs/agent-invoice.md +28 -2
- package/docs/invoice.md +60 -9
- package/docs/project.md +1 -1
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
- package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
- package/skills/weaver-e10-meeting/SKILL.md +203 -80
- package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
- package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
- package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
- package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +158 -146
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +64 -51
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +56 -18
- package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +217 -30
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +18 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -20
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +21 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +31 -58
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +2 -2
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +25 -15
- package/skills/weaver-e10-shijingran/SKILL.md +2 -2
- package/skills/weaver-e10-shijingran/references/operations.md +5 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
- package/skills/weaver-e10-workflow/SKILL.md +13 -9
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
- package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
- package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
- package/templates/meeting/minute.docx +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
|
@@ -110,7 +110,7 @@ function successEnvelope(operation, result, meta) {
|
|
|
110
110
|
operation,
|
|
111
111
|
data: result.data,
|
|
112
112
|
meta: { status: result.status, ...(meta ?? {}) },
|
|
113
|
-
warnings: [],
|
|
113
|
+
warnings: result.warnings ?? [],
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
function failureEnvelope(error) {
|
|
@@ -130,7 +130,7 @@ async function executeAndPrint(ctx, operation, input, projection = {}) {
|
|
|
130
130
|
continuation: createInvoiceContinuationSigner(ctx),
|
|
131
131
|
});
|
|
132
132
|
const projected = applyInvoiceProjection(operation, result.data, projection);
|
|
133
|
-
ctx.output.write(successEnvelope(operation, { status: result.status, data: projected.data }, projected.meta), { json: true });
|
|
133
|
+
ctx.output.write(successEnvelope(operation, { status: result.status, data: projected.data, warnings: result.warnings }, projected.meta), { json: true });
|
|
134
134
|
}
|
|
135
135
|
catch (error) {
|
|
136
136
|
reportPlatformError(error);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 发票记录与票面扩展信息 `ext` 的语义提取。
|
|
3
3
|
*
|
|
4
4
|
* `ext` 是**字符串化的 JSON**。费用说明、城市、备注(常写出差地、订单行程)、起止地、上下车站点
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* 及乘车人身份信息在这里提取。列表 / 详情的完整输出(`extInfo`)、summary / detail 视图
|
|
6
|
+
* 共用这一份口径,避免同一业务概念在不同出口换名。
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* `/api/inc/sync` 的 `mext` 按位选择返回哪些 ext 字段(1=trate、2=ttax …),不传就不返回 ext。
|
|
@@ -21,6 +21,8 @@ export const EXT_INFO_FIELDS = [
|
|
|
21
21
|
'to',
|
|
22
22
|
'stationGetOn',
|
|
23
23
|
'stationGetOff',
|
|
24
|
+
'userId',
|
|
25
|
+
'passengerName',
|
|
24
26
|
];
|
|
25
27
|
function asRecord(value) {
|
|
26
28
|
return value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
@@ -84,6 +86,9 @@ export function invoiceExtInfo(invoice) {
|
|
|
84
86
|
to: firstText(ext.to, invoice.to, passenger.to),
|
|
85
87
|
stationGetOn: firstText(ext.station_geton, invoice.station_geton, passenger.station_geton),
|
|
86
88
|
stationGetOff: firstText(ext.station_getoff, invoice.station_getoff, passenger.station_getoff),
|
|
89
|
+
// ext.userId 是乘车人身份证号,不是票夹用户 / 登录用户的 ID;保留字符串及末尾 X。
|
|
90
|
+
userId: text(ext.userId),
|
|
91
|
+
passengerName: text(ext.passengerName),
|
|
87
92
|
};
|
|
88
93
|
for (const [key, value] of Object.entries(info)) {
|
|
89
94
|
if (!value)
|
|
@@ -33,7 +33,13 @@ function epochEndDateProperty(label) {
|
|
|
33
33
|
description: `${label}。可传 YYYY-MM-DD(按东八区当天 23:59:59 换算)或秒级时间戳。`,
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
const includePreApprovalsProperty = {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: true,
|
|
39
|
+
description: '同时读取最近一个日历月的普通事前申请候选,供 AI 按用途匹配;话费 / 油费专项及已取得候选池后的补充查票传 false。仅控制本地聚合,不透传给发票接口。',
|
|
40
|
+
};
|
|
36
41
|
const listProperties = {
|
|
42
|
+
includePreApprovals: includePreApprovalsProperty,
|
|
37
43
|
page_size: { type: 'integer', minimum: 1, maximum: 200 },
|
|
38
44
|
start_pos: { type: 'integer', minimum: 0, description: '服务端分页偏移。翻页时按 page_size 递增,不要按返回的 items 条数递增(items 已剔除全额红冲票,可能不满一页)。' },
|
|
39
45
|
req_type: { type: 'integer', enum: [0, 1, 7, 8] },
|
|
@@ -119,6 +125,30 @@ const invoicePartySchema = objectSchema({
|
|
|
119
125
|
company: { type: 'string' },
|
|
120
126
|
tcode: { type: 'string' },
|
|
121
127
|
}, [], true);
|
|
128
|
+
const invoiceTravelIdsSchema = arrayOf(objectSchema({
|
|
129
|
+
deleteType: { type: 'integer' },
|
|
130
|
+
fid: { type: 'string' },
|
|
131
|
+
fileId: { type: 'string' },
|
|
132
|
+
fileName: { type: 'string' },
|
|
133
|
+
fileType: { type: 'string' },
|
|
134
|
+
name: { type: 'string' },
|
|
135
|
+
total: { type: 'string' },
|
|
136
|
+
date: { type: 'string' },
|
|
137
|
+
type: { type: 'integer' },
|
|
138
|
+
}, [], true), { description: '本张发票已关联的凭证列表,原样保留 fid、文件、金额、日期及状态;无关联为 [],不逐个补查凭证详情。' });
|
|
139
|
+
const extInfoSchema = objectSchema({
|
|
140
|
+
expenseNote: { type: 'string', description: '费用说明(ext.expenseDesc),如「上海-武汉」' },
|
|
141
|
+
content: { type: 'string', description: '消费内容(ext.content;为空时取 ext.products[].name)' },
|
|
142
|
+
city: { type: 'string', description: '城市(ext.city)' },
|
|
143
|
+
province: { type: 'string', description: '省份(ext.province,为空时取票面 province)' },
|
|
144
|
+
comment: { type: 'string', description: '备注(ext.comment),常写出差地、订单号和行程' },
|
|
145
|
+
from: { type: 'string', description: '出发地(ext.from → 票面 from → ext.passengersService[0].from)' },
|
|
146
|
+
to: { type: 'string', description: '到达地(ext.to → 票面 to → ext.passengersService[0].to)' },
|
|
147
|
+
stationGetOn: { type: 'string', description: '上车站(ext.station_geton)' },
|
|
148
|
+
stationGetOff: { type: 'string', description: '下车站(ext.station_getoff)' },
|
|
149
|
+
userId: { type: 'string', description: '滴滴乘车人身份证号(ext.userId),按字符串保留;不是登录用户 ID。' },
|
|
150
|
+
passengerName: { type: 'string', description: '滴滴乘车人姓名(ext.passengerName)。' },
|
|
151
|
+
});
|
|
122
152
|
const invoiceInfoSchema = objectSchema({
|
|
123
153
|
id: { type: 'string', description: '发票业务 ID;列表和详情返回时与 fid 保持一致。' },
|
|
124
154
|
fid: { type: 'string' },
|
|
@@ -160,18 +190,53 @@ const invoiceInfoSchema = objectSchema({
|
|
|
160
190
|
type: 'string',
|
|
161
191
|
description: 'JSON 字符串形式的票种扩展信息;解析后可包含 ttax、products 等字段。',
|
|
162
192
|
},
|
|
193
|
+
extInfo: { ...extInfoSchema, description: '已解析的 ext 语义字段,空值省键;原始 ext 字符串仍保留' },
|
|
163
194
|
currency: { type: 'string' },
|
|
164
195
|
currencyName: { type: 'string' },
|
|
165
|
-
fylx: { type: 'string' },
|
|
196
|
+
fylx: { type: 'string', description: '原始费用类型 ID,保留兼容;读取中文名称使用 fyn。' },
|
|
197
|
+
fyn: { type: ['string', 'null'], description: '按 /api/inc/syncFylx 的 fyid → fyn 映射得到的费用类型中文名称;无法映射为 null 并附 warnings,不用票面 kind 猜测。' },
|
|
198
|
+
travel_ids: invoiceTravelIdsSchema,
|
|
166
199
|
}, [], true);
|
|
167
200
|
const invoiceResultItemSchema = objectSchema({
|
|
168
201
|
info: invoiceInfoSchema,
|
|
169
202
|
ret: retSchema,
|
|
170
203
|
}, ['info', 'ret'], true);
|
|
204
|
+
const employeeInfoSchema = {
|
|
205
|
+
...objectSchema({
|
|
206
|
+
department: arrayOf(objectSchema({ id: { type: 'string' }, name: { type: 'string' } }, ['id', 'name'])),
|
|
207
|
+
mobile: { type: ['string', 'null'] },
|
|
208
|
+
location: arrayOf(objectSchema({ id: { type: 'string' }, name: { type: 'string' } }, ['id', 'name'])),
|
|
209
|
+
}, ['department', 'mobile', 'location']),
|
|
210
|
+
type: ['object', 'null'],
|
|
211
|
+
description: '当前登录人员信息,独立于发票明细;department=部门,mobile=手机号,location=办公所在地。实体仅保留 id/name;接口不可用时为 null,并附 warnings。每批只查询一次人员卡片。',
|
|
212
|
+
};
|
|
213
|
+
const preApprovalCandidateSchema = objectSchema({
|
|
214
|
+
requestid: { type: 'string' },
|
|
215
|
+
workflowid: { type: 'string' },
|
|
216
|
+
requestname: { type: 'string' },
|
|
217
|
+
flowStatus: { type: ['integer', 'string', 'null'], description: '服务端原始状态。已明确审批中或审批完成的申请均满足已提交状态要求,无须等待审批通过;6 仅是已知完成代码,不是唯一有效状态。草稿/未提交不可用;含义不明或缺失的状态按真实申请 ID 定向核验,不自行映射,也不直接当作无效申请。状态仍不能替代本人归属、流程类型及用途校验。' },
|
|
218
|
+
creatorId: { type: ['string', 'integer', 'null'] },
|
|
219
|
+
creatorName: { type: ['string', 'null'] },
|
|
220
|
+
createTime: { type: ['string', 'integer', 'null'] },
|
|
221
|
+
}, ['requestid', 'workflowid', 'requestname']);
|
|
222
|
+
const preApprovalsSchema = objectSchema({
|
|
223
|
+
status: { type: 'string', enum: ['complete', 'partial', 'unavailable', 'skipped'], description: '仅表示候选读取完整性,不表示申请已通过业务校验。' },
|
|
224
|
+
items: { anyOf: [arrayOf(preApprovalCandidateSchema), { type: 'null' }] },
|
|
225
|
+
query: objectSchema({
|
|
226
|
+
cusCreateDateStart: { type: 'string' },
|
|
227
|
+
cusCreateDateEnd: { type: 'string', description: '北京时间业务结束日,对外不加一天。' },
|
|
228
|
+
workflowIds: arrayOf({ type: 'string', enum: ['100003460000000746', '100003460000000046', '100003460000000418', '100003460000000045'] }),
|
|
229
|
+
currentUserId: { type: 'string', description: '仅真实会话提供人员 ID 时返回,用于与申请 creatorId 核验归属;不传给申请接口。' },
|
|
230
|
+
}, ['cusCreateDateStart', 'cusCreateDateEnd', 'workflowIds']),
|
|
231
|
+
hasMore: { type: ['boolean', 'null'] },
|
|
232
|
+
reason: { type: 'string' },
|
|
233
|
+
}, ['status', 'items', 'hasMore']);
|
|
171
234
|
const invoiceDetailOutputSchema = objectSchema({
|
|
235
|
+
employeeInfo: employeeInfoSchema,
|
|
236
|
+
preApprovals: preApprovalsSchema,
|
|
172
237
|
infos: arrayOf(invoiceResultItemSchema),
|
|
173
238
|
res_base: responseBaseSchema,
|
|
174
|
-
}, ['infos', 'res_base'], true);
|
|
239
|
+
}, ['employeeInfo', 'preApprovals', 'infos', 'res_base'], true);
|
|
175
240
|
const invoicePreviewSchema = objectSchema({
|
|
176
241
|
fid: { type: 'string' },
|
|
177
242
|
code: { type: 'string' },
|
|
@@ -212,44 +277,28 @@ const resultEnvelopeOutput = (dataSchema = rawValue) => objectSchema({
|
|
|
212
277
|
data: dataSchema,
|
|
213
278
|
workflow: workflowSchema,
|
|
214
279
|
}, ['result', 'data', 'workflow']);
|
|
215
|
-
const extInfoSchema = objectSchema({
|
|
216
|
-
expenseNote: { type: 'string', description: '费用说明(ext.expenseDesc),如「上海-武汉」' },
|
|
217
|
-
content: { type: 'string', description: '消费内容(ext.content;为空时取 ext.products[].name)' },
|
|
218
|
-
city: { type: 'string', description: '城市(ext.city)' },
|
|
219
|
-
province: { type: 'string', description: '省份(ext.province,为空时取票面 province)' },
|
|
220
|
-
comment: { type: 'string', description: '备注(ext.comment),常写出差地、订单号和行程' },
|
|
221
|
-
from: { type: 'string', description: '出发地(ext.from → 票面 from → ext.passengersService[0].from)' },
|
|
222
|
-
to: { type: 'string', description: '到达地(ext.to → 票面 to → ext.passengersService[0].to)' },
|
|
223
|
-
stationGetOn: { type: 'string', description: '上车站(ext.station_geton)' },
|
|
224
|
-
stationGetOff: { type: 'string', description: '下车站(ext.station_getoff)' },
|
|
225
|
-
});
|
|
226
|
-
const listInvoiceItemSchema = {
|
|
227
|
-
...invoiceInfoSchema,
|
|
228
|
-
properties: {
|
|
229
|
-
...invoiceInfoSchema.properties,
|
|
230
|
-
extInfo: { ...extInfoSchema, description: '已解析的 ext 语义字段,空值省键;原始 ext 字符串仍保留' },
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
280
|
const listOutputSchema = objectSchema({
|
|
234
|
-
|
|
281
|
+
employeeInfo: employeeInfoSchema,
|
|
282
|
+
preApprovals: preApprovalsSchema,
|
|
283
|
+
items: arrayOf(invoiceInfoSchema, { description: '本页发票,已剔除全额红冲票(comm_info.pro.status=8),条数可能少于 page_size。' }),
|
|
235
284
|
total: { type: 'integer', description: '服务端汇总的总张数,含 items 里已剔除的全额红冲票。' },
|
|
236
285
|
totalAmount: { type: 'string', description: '服务端汇总的价税合计,含已剔除的全额红冲票。' },
|
|
237
286
|
totalAmountExcludingTax: { type: 'string', description: '服务端汇总的不含税合计,含已剔除的全额红冲票。' },
|
|
238
287
|
hasMore: { type: 'boolean', description: '是否还有下一页。判断是否翻页只看它,不要用 items 条数是否等于 page_size 推断。' },
|
|
239
288
|
scope: { type: 'string', enum: ['personal', 'enterprise'] },
|
|
240
|
-
}, ['items', 'total', 'totalAmount', 'totalAmountExcludingTax', 'hasMore', 'scope']);
|
|
289
|
+
}, ['employeeInfo', 'preApprovals', 'items', 'total', 'totalAmount', 'totalAmountExcludingTax', 'hasMore', 'scope']);
|
|
241
290
|
/**
|
|
242
291
|
* 列表类 operation 支持 `--view summary`:把 40+ 字段的原始发票裁成语义平表,
|
|
243
292
|
* 调用方一次调用就能读到清单,不必再写脚本解析完整 envelope。
|
|
244
293
|
*/
|
|
245
294
|
const summaryOutputView = {
|
|
246
295
|
name: 'summary',
|
|
247
|
-
description: '
|
|
296
|
+
description: '语义化平表,省略常规空值字段;列表级汇总在前、items 在后,并附 itemCount。含 fyn(费用类型中文名)、travel_ids(相关凭证,无关联为 [])及 ext 的费用说明、城市、备注、起止地、乘车人 userId / passengerName 等。费用类型无法映射时保留 fyn:null,说明见 warnings。顶层保留 employeeInfo 当前人员信息及 preApprovals 普通事前申请候选,不放入明细。用 CLI 的 --view summary 启用。',
|
|
248
297
|
itemFields: SUMMARY_ITEM_FIELDS,
|
|
249
298
|
};
|
|
250
299
|
const detailOutputView = {
|
|
251
300
|
name: 'detail',
|
|
252
|
-
description: '单张发票的语义详情:summary 字段(含 ext
|
|
301
|
+
description: '单张发票的语义详情:summary 字段(含 fyn 中文费用类型、travel_ids 相关凭证、ext 费用说明、行程及乘车人 userId / passengerName),外加 attachments(发票自身附件)、issuer(开票人)、checkState(查验标记,0=未查验,与票面 valid 不是一个口径)。顶层保留 employeeInfo 当前人员信息及 preApprovals 普通事前申请候选。用 CLI 的 --view detail 启用。',
|
|
253
302
|
itemFields: DETAIL_ITEM_FIELDS,
|
|
254
303
|
};
|
|
255
304
|
const uploadOutputSchema = objectSchema({
|
|
@@ -397,20 +446,6 @@ const workflowResolveDataSchema = objectSchema({
|
|
|
397
446
|
workFlowName: { type: 'string' },
|
|
398
447
|
}, ['workFlowId', 'workFlowName'])),
|
|
399
448
|
}, [], true);
|
|
400
|
-
const employeeSchema = objectSchema({
|
|
401
|
-
id: { type: 'string' },
|
|
402
|
-
name: { type: 'string' },
|
|
403
|
-
}, ['id', 'name'], true);
|
|
404
|
-
const employeeSuperiorsDataSchema = objectSchema({
|
|
405
|
-
currentEmployee: employeeSchema,
|
|
406
|
-
allSuperiors: arrayOf(employeeSchema),
|
|
407
|
-
}, ['currentEmployee', 'allSuperiors'], true);
|
|
408
|
-
const fieldSearchItemSchema = objectSchema({
|
|
409
|
-
id: { type: 'string' },
|
|
410
|
-
name: { type: 'string' },
|
|
411
|
-
value: { type: 'string' },
|
|
412
|
-
}, ['id', 'name'], true);
|
|
413
|
-
const fieldSearchItemsSchema = arrayOf(fieldSearchItemSchema);
|
|
414
449
|
const reimCandidateItemSchema = objectSchema({
|
|
415
450
|
fid: { type: 'string' },
|
|
416
451
|
number: { type: 'string' },
|
|
@@ -419,11 +454,17 @@ const reimCandidateItemSchema = objectSchema({
|
|
|
419
454
|
buyer: { type: 'string' },
|
|
420
455
|
payer: { type: 'string' },
|
|
421
456
|
typeName: { type: 'string' },
|
|
457
|
+
content: { type: 'string', description: '消费内容,取票面 pro.content,缺失时从 ext.content / ext.products 提取。' },
|
|
458
|
+
extInfo: { ...extInfoSchema, description: '已解析的城市、起止地点、站点、行程说明等;供出差目的地及办公起点交通候选筛选复用,空值省键。' },
|
|
459
|
+
consumptionTime: { type: ['number', 'string'], description: '原始消费时间 modify_info.cstm,秒级时间戳;仅真实值存在时返回,不以开票日代替。' },
|
|
460
|
+
travel_ids: invoiceTravelIdsSchema,
|
|
422
461
|
status: { type: 'integer' },
|
|
423
462
|
valid: { type: 'integer' },
|
|
424
463
|
reimRequests: arrayOf({ type: 'string' }),
|
|
425
464
|
}, ['fid', 'number', 'total'], true);
|
|
426
465
|
const reimCandidatesOutputSchema = objectSchema({
|
|
466
|
+
employeeInfo: employeeInfoSchema,
|
|
467
|
+
preApprovals: preApprovalsSchema,
|
|
427
468
|
total: { type: 'integer' },
|
|
428
469
|
fetched: { type: 'integer' },
|
|
429
470
|
hasMore: { type: 'boolean' },
|
|
@@ -437,7 +478,7 @@ const reimCandidatesOutputSchema = objectSchema({
|
|
|
437
478
|
}, ['availableCount', 'assignedCount', 'availableAmount', 'assignedAmount']),
|
|
438
479
|
warnings: arrayOf({ type: 'string' }),
|
|
439
480
|
workflow: workflowSchema,
|
|
440
|
-
}, ['total', 'fetched', 'hasMore', 'available', 'assigned', 'summary', 'warnings', 'workflow']);
|
|
481
|
+
}, ['employeeInfo', 'preApprovals', 'total', 'fetched', 'hasMore', 'available', 'assigned', 'summary', 'warnings', 'workflow']);
|
|
441
482
|
const nullableText = { type: ['string', 'null'] };
|
|
442
483
|
const relationIdNameSchema = {
|
|
443
484
|
type: ['object', 'null'],
|
|
@@ -446,7 +487,7 @@ const relationIdNameSchema = {
|
|
|
446
487
|
properties: {
|
|
447
488
|
id: { type: 'string' },
|
|
448
489
|
name: { type: 'string' },
|
|
449
|
-
value: { type: 'string', description: '名称(ID)
|
|
490
|
+
value: { type: 'string', description: '名称(ID) 形式的登记展示值。AI 报销页面浏览字段只取同对象的真实 id,编码为 ##ID;不原样填写 value,不拼接名称。查询返回值本身保持不变。' },
|
|
450
491
|
},
|
|
451
492
|
};
|
|
452
493
|
const relationPreApprovalSchema = {
|
|
@@ -456,7 +497,7 @@ const relationPreApprovalSchema = {
|
|
|
456
497
|
properties: {
|
|
457
498
|
requestId: { type: 'string', description: '事前申请流程 requestid' },
|
|
458
499
|
requestName: { type: 'string', description: '事前申请流程标题(已去掉浏览按钮末尾的「 (相关客户:…)」摘要)' },
|
|
459
|
-
value: { type: 'string', description: '{requestName}({requestId})
|
|
500
|
+
value: { type: 'string', description: '{requestName}({requestId}) 形式的申请展示值。AI 报销明细「相关流程」仅以真实 requestId 编码为 ##requestId,按已核验申请逐发票行重复;不直接填写 value 或附带标题。' },
|
|
460
501
|
displayName: { type: 'string', description: '浏览按钮原始展示名' },
|
|
461
502
|
createTime: nullableText,
|
|
462
503
|
},
|
|
@@ -465,21 +506,6 @@ const relationGroupsSchema = arrayOf(objectSchema({
|
|
|
465
506
|
value: { type: 'string' },
|
|
466
507
|
fids: arrayOf({ type: 'string' }),
|
|
467
508
|
}, ['value', 'fids']));
|
|
468
|
-
const relationSearchItemSchema = objectSchema({
|
|
469
|
-
id: { type: 'string', description: '相关客户 / 相关项目 ID,登记时传 customerId / projectId' },
|
|
470
|
-
name: { type: 'string', description: '相关客户 / 相关项目名称,登记时传 customerName / projectName' },
|
|
471
|
-
}, ['id', 'name']);
|
|
472
|
-
const relationSearchOutputSchema = objectSchema({
|
|
473
|
-
target: { type: 'string', enum: ['customer', 'project'] },
|
|
474
|
-
keywords: { type: 'string' },
|
|
475
|
-
match: { type: 'string', enum: ['unique', 'multiple', 'none'] },
|
|
476
|
-
items: arrayOf(relationSearchItemSchema),
|
|
477
|
-
selected: {
|
|
478
|
-
anyOf: [relationSearchItemSchema, { type: 'null' }],
|
|
479
|
-
description: '只搜到一条,或有一条名称与 keywords 完全一致时给出;否则为 null,让用户从 items 里选',
|
|
480
|
-
},
|
|
481
|
-
workflow: workflowSchema,
|
|
482
|
-
}, ['target', 'keywords', 'match', 'items', 'selected', 'workflow']);
|
|
483
509
|
const relationSaveOutputSchema = objectSchema({
|
|
484
510
|
saved: { type: 'boolean', description: '全部发票都返回「关联成功」时为 true' },
|
|
485
511
|
savedCount: { type: 'integer' },
|
|
@@ -562,6 +588,28 @@ const issuingContractDetailOutputSchema = objectSchema({
|
|
|
562
588
|
}, ['docId', 'fileId', 'name'])),
|
|
563
589
|
contractDocIds: { ...nullableText, description: '全部文档 id,英文逗号分隔。开票申请「合同文本」不要填这个字符串' },
|
|
564
590
|
}, ['requestId', 'requestName', 'workflowName', 'customer', 'customerSource', 'contractDocuments', 'contractDocIds']);
|
|
591
|
+
const issuingRedRequestsOutputSchema = objectSchema({
|
|
592
|
+
items: arrayOf(objectSchema({
|
|
593
|
+
requestId: { type: 'string', description: '蓝字开票申请流程 ID,用于红冲表单「蓝字发票开票流程」;不是合同审批流程 ID' },
|
|
594
|
+
requestName: nullableText,
|
|
595
|
+
title: nullableText,
|
|
596
|
+
name: nullableText,
|
|
597
|
+
requestMark: nullableText,
|
|
598
|
+
workflowId: nullableText,
|
|
599
|
+
workflowName: nullableText,
|
|
600
|
+
flowStatus: nullableText,
|
|
601
|
+
flowStatusCode: nullableText,
|
|
602
|
+
creator: nullableText,
|
|
603
|
+
creatorId: nullableText,
|
|
604
|
+
createTime: nullableText,
|
|
605
|
+
finished: { type: ['boolean', 'null'], description: '仅取接口明确的完成标识,不据此筛除候选或判断可否红冲' },
|
|
606
|
+
}, ['requestId', 'requestName', 'title', 'name', 'requestMark', 'workflowId', 'workflowName', 'flowStatus', 'flowStatusCode', 'creator', 'creatorId', 'createTime', 'finished'])),
|
|
607
|
+
count: { type: 'integer', description: '本页候选条数' },
|
|
608
|
+
current: { type: 'integer' },
|
|
609
|
+
pageSize: { type: 'integer' },
|
|
610
|
+
hasMore: { type: 'boolean', description: '优先按明确分页元数据;接口未返回时满页视为可能还有下一页' },
|
|
611
|
+
total: { type: 'integer', description: '仅在接口明确返回总数时提供' },
|
|
612
|
+
}, ['items', 'count', 'current', 'pageSize', 'hasMore']);
|
|
565
613
|
/**
|
|
566
614
|
* 每条 operation 的一句话用途,写入 schema 的 summary。
|
|
567
615
|
*
|
|
@@ -569,9 +617,9 @@ const issuingContractDetailOutputSchema = objectSchema({
|
|
|
569
617
|
* prepare/apply 成对出现时,prepare 标注「只出预览,不写入」,apply 标注「落库前需确认」。
|
|
570
618
|
*/
|
|
571
619
|
const OPERATION_SUMMARIES = {
|
|
572
|
-
'invoice.list': '
|
|
573
|
-
'invoice.enterprise.list': '
|
|
574
|
-
'invoice.get': '按 fid
|
|
620
|
+
'invoice.list': '分页查询本人票夹发票,同时返回普通事前申请候选供 AI 匹配;话费/油费专项可关闭申请查询',
|
|
621
|
+
'invoice.enterprise.list': '分页查询企业票夹发票,同时返回普通事前申请候选供 AI 匹配;过滤条件同票夹列表',
|
|
622
|
+
'invoice.get': '按 fid 或票号取发票详情,同时返回普通事前申请候选供 AI 匹配',
|
|
575
623
|
'invoice.upload': '上传本地文件或 URL 到发票系统(产出 fileId,尚不入票夹);入参 file/url',
|
|
576
624
|
'invoice.ocr.preview': '对上传的文件做 OCR 预览(不落库);入参 file/url,可指定 upload/is_save',
|
|
577
625
|
'invoice.upload-and-validate': '上传并做发票查验(真假校验),返回查验结果',
|
|
@@ -588,15 +636,14 @@ const OPERATION_SUMMARIES = {
|
|
|
588
636
|
'invoice.reim.requests.list': '分页查询可报销的流程单(报销申请列表);可按时间与场景过滤',
|
|
589
637
|
'invoice.reim.workflow.resolve': '按流程单 ID 批量解析对应的报销流程定义',
|
|
590
638
|
'invoice.reim.employee-superiors': '取当前员工的上级链(报销审批人候选,无入参)',
|
|
591
|
-
'invoice.reim.
|
|
592
|
-
'invoice.reim.customer.search': '按关键词检索客户(报销关联客户候选)',
|
|
593
|
-
'invoice.reim.relation.search': '按目标与关键词检索报销关联关系(客户/项目)',
|
|
639
|
+
'invoice.reim.customer.search': '按客户名称模糊查询客户、承担主体及各客户自己的相关项目,统一用于报销、补贴、上传登记和独立客户查询',
|
|
594
640
|
'invoice.reim.relation.save': '保存发票与客户/项目的关联关系(写操作,经动作流)',
|
|
595
641
|
'invoice.reim.relation.list': '按发票 fid/fids 查已建立的报销关联关系',
|
|
596
|
-
'invoice.reim.candidates.list': '
|
|
642
|
+
'invoice.reim.candidates.list': '按消费日期区间查询报销发票候选,并批量返回普通事前申请供 AI 匹配',
|
|
597
643
|
'invoice.reim.subsidy.submit': '提交报销补贴申请并创建报销流程(高风险写操作,会落库发起流程)',
|
|
598
644
|
'invoice.issuing.contracts.list': '按合同卡片/流程 ID 查可开票的合同列表',
|
|
599
645
|
'invoice.issuing.contract.detail': '按 requestId 查开票对应合同的流程明细',
|
|
646
|
+
'invoice.issuing.red.requests.list': '按客户名称查询红冲所关联的蓝字开票申请流程候选(只读、不筛除审批中申请)',
|
|
600
647
|
};
|
|
601
648
|
function withSummaries(operations) {
|
|
602
649
|
return operations.map((item) => ({
|
|
@@ -632,6 +679,7 @@ export const invoiceOperations = [
|
|
|
632
679
|
properties: {
|
|
633
680
|
fid: { type: 'string', pattern: '^[1-9]\\d*$' },
|
|
634
681
|
number: { type: 'string', minLength: 1 },
|
|
682
|
+
includePreApprovals: includePreApprovalsProperty,
|
|
635
683
|
},
|
|
636
684
|
oneOf: [{ required: ['fid'] }, { required: ['number'] }],
|
|
637
685
|
},
|
|
@@ -934,42 +982,6 @@ export const invoiceOperations = [
|
|
|
934
982
|
},
|
|
935
983
|
outputSchema: resultEnvelopeOutput(workflowResolveDataSchema),
|
|
936
984
|
},
|
|
937
|
-
{
|
|
938
|
-
name: 'invoice.reim.employee-superiors',
|
|
939
|
-
risk: 'read',
|
|
940
|
-
fixed: { path: '/api/inc/book/getEmployeeSuperiors' },
|
|
941
|
-
inputSchema: {
|
|
942
|
-
type: 'object',
|
|
943
|
-
additionalProperties: false,
|
|
944
|
-
properties: {},
|
|
945
|
-
},
|
|
946
|
-
outputSchema: resultEnvelopeOutput(employeeSuperiorsDataSchema),
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
name: 'invoice.reim.field.search',
|
|
950
|
-
risk: 'read',
|
|
951
|
-
fixed: { path: '/api/government/formStructure/fieldRelateSearch', method: 'GET', formModeType: 'wf', defaultNodeId: '100004140000000271' },
|
|
952
|
-
inputSchema: {
|
|
953
|
-
type: 'object',
|
|
954
|
-
additionalProperties: false,
|
|
955
|
-
properties: {
|
|
956
|
-
keywords: { type: 'string', minLength: 1 },
|
|
957
|
-
fieldId: positiveId,
|
|
958
|
-
workflowId: positiveId,
|
|
959
|
-
nodeId: { type: 'string', minLength: 1, default: '100004140000000271' },
|
|
960
|
-
},
|
|
961
|
-
required: ['keywords', 'fieldId', 'workflowId'],
|
|
962
|
-
},
|
|
963
|
-
outputSchema: objectSchema({
|
|
964
|
-
result: rawObject,
|
|
965
|
-
data: fieldSearchItemsSchema,
|
|
966
|
-
keywords: { type: 'string' },
|
|
967
|
-
match: { type: 'string', enum: ['unique', 'multiple', 'none'] },
|
|
968
|
-
items: fieldSearchItemsSchema,
|
|
969
|
-
selected: { anyOf: [fieldSearchItemSchema, { type: 'null' }] },
|
|
970
|
-
workflow: workflowSchema,
|
|
971
|
-
}, ['result', 'data', 'keywords', 'match', 'items', 'workflow']),
|
|
972
|
-
},
|
|
973
985
|
{
|
|
974
986
|
name: 'invoice.reim.customer.search',
|
|
975
987
|
risk: 'read',
|
|
@@ -980,58 +992,39 @@ export const invoiceOperations = [
|
|
|
980
992
|
compId: 'c39b9e14c0034336adf9e9bc39aeed75',
|
|
981
993
|
pageId: '1218181956452048911',
|
|
982
994
|
pageNo: '1',
|
|
983
|
-
|
|
984
|
-
|
|
995
|
+
pageSize: '10',
|
|
996
|
+
maxPages: 20,
|
|
997
|
+
filter: '仅客户表「名称」字段 field_1173221220888062665 模糊匹配 keywords;满页续查,按客户 ID 去重,不依赖 count',
|
|
998
|
+
projects: {
|
|
999
|
+
path: '/api/ebuilder/form/eblist/getData', method: 'POST',
|
|
1000
|
+
pageId: '1144658644836794483', appId: '1136121637129502949', compId: 'f5b2b31aeb2e4e46956464bba7d2e52c',
|
|
1001
|
+
customerFieldId: '1149506138249011280', projectNameFieldId: '1020275734718578690',
|
|
1002
|
+
pageSize: 10, maxPagesPerCustomer: 20, customerConcurrency: 4,
|
|
1003
|
+
note: '每个去重客户用自己的 customerId 直接查项目,不读历史报销;每客户独立分页并去重,挂到本行 relatedProject,不混合候选。失败时 relatedProject=null 并附 projectsError,不伪装成空项目;认证错误传播。',
|
|
1004
|
+
},
|
|
985
1005
|
},
|
|
986
1006
|
inputSchema: objectSchema({
|
|
987
1007
|
keywords: { type: 'string', minLength: 1, description: '用户输入的客户名称,支持模糊名称;不需要报销表单或字段 ID' },
|
|
988
1008
|
}, ['keywords']),
|
|
989
1009
|
outputSchema: objectSchema({
|
|
990
1010
|
list: arrayOf(objectSchema({
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1011
|
+
customerId: { type: 'string', description: '客户业务 ID,源自 form_data_id;旧接口响应缺失该键时兼容 id,长 ID 保持字符串' },
|
|
1012
|
+
customerName: { type: 'string', description: '相关客户名称' },
|
|
1013
|
+
expenseBearer: arrayOf(objectSchema({
|
|
1014
|
+
expenseBearerName: { type: 'string', description: '承担主体名称' },
|
|
1015
|
+
expenseBearerId: { type: 'string', description: '承担主体 ID' },
|
|
1016
|
+
}, ['expenseBearerName', 'expenseBearerId'])),
|
|
1017
|
+
relatedProject: {
|
|
1018
|
+
anyOf: [arrayOf(objectSchema({
|
|
1019
|
+
relatedProjectName: { type: 'string', description: '该客户的相关项目名称' },
|
|
1020
|
+
relatedProjectId: { type: 'string', description: '该客户的相关项目 ID,保持字符串' },
|
|
1021
|
+
}, ['relatedProjectName', 'relatedProjectId'])), { type: 'null' }],
|
|
1022
|
+
description: '只属于本行客户的完整项目列表;[] 为确认无项目,null 为查询失败或不完整',
|
|
1023
|
+
},
|
|
1024
|
+
projectsError: { type: 'string', description: '仅 relatedProject=null 时提供的失败原因,不得当作没有项目' },
|
|
1025
|
+
}, ['customerId', 'customerName', 'expenseBearer', 'relatedProject'])),
|
|
999
1026
|
}, ['list']),
|
|
1000
1027
|
},
|
|
1001
|
-
{
|
|
1002
|
-
name: 'invoice.reim.relation.search',
|
|
1003
|
-
risk: 'read',
|
|
1004
|
-
fixed: {
|
|
1005
|
-
customer: {
|
|
1006
|
-
path: '/api/ebuilder/coms/nlist/getData',
|
|
1007
|
-
headers: { ebbusinessid: '1218181956452048911' },
|
|
1008
|
-
pageId: '1218181956452048911',
|
|
1009
|
-
compId: 'c39b9e14c0034336adf9e9bc39aeed75',
|
|
1010
|
-
workflowId: '100003460000000060',
|
|
1011
|
-
isCreate: '1',
|
|
1012
|
-
filter: '客户表「名称」字段 field_1173221220888062665 模糊匹配 keywords',
|
|
1013
|
-
output: 'data.list[]:id → id,1173221220888062665 → name',
|
|
1014
|
-
},
|
|
1015
|
-
project: {
|
|
1016
|
-
path: '/api/ebuilder/form/common/browser/data/ebuilder',
|
|
1017
|
-
quickSearchDatas: 'field_1020275734718578690(项目名称)= keywords',
|
|
1018
|
-
formParam: { formId: '100003660000000007', layoutId: '925333107626672135', fieldId: '100003720000006720', module: 'workflow' },
|
|
1019
|
-
output: 'data.data[]:id → id,content → name;disabled=true 的不返回',
|
|
1020
|
-
},
|
|
1021
|
-
pageSize: 20,
|
|
1022
|
-
note: '上传发票登记关联信息时用,不需要报销表单;只保留每条的 id 和名称',
|
|
1023
|
-
},
|
|
1024
|
-
inputSchema: {
|
|
1025
|
-
type: 'object',
|
|
1026
|
-
additionalProperties: false,
|
|
1027
|
-
properties: {
|
|
1028
|
-
target: { type: 'string', enum: ['customer', 'project'], description: 'customer=相关客户,project=相关项目' },
|
|
1029
|
-
keywords: { type: 'string', minLength: 1, description: '用户说的客户 / 项目名称原话,可以是模糊名称' },
|
|
1030
|
-
},
|
|
1031
|
-
required: ['target', 'keywords'],
|
|
1032
|
-
},
|
|
1033
|
-
outputSchema: relationSearchOutputSchema,
|
|
1034
|
-
},
|
|
1035
1028
|
{
|
|
1036
1029
|
name: 'invoice.reim.relation.save',
|
|
1037
1030
|
risk: 'write',
|
|
@@ -1048,10 +1041,10 @@ export const invoiceOperations = [
|
|
|
1048
1041
|
properties: {
|
|
1049
1042
|
fid: { ...positiveId, description: '单张发票 fid;与 fids 二选一' },
|
|
1050
1043
|
fids: { ...positiveIdArray, description: '同一批上传成功的发票 fid;与 fid 二选一' },
|
|
1051
|
-
customerId: { ...positiveId, description: '相关客户 ID(invoice.reim.
|
|
1044
|
+
customerId: { ...positiveId, description: '相关客户 ID(invoice.reim.customer.search 选定行的 customerId),与 customerName 同时提供' },
|
|
1052
1045
|
customerName: { type: 'string', minLength: 1, description: '相关客户名称,与 customerId 同时提供' },
|
|
1053
|
-
projectId: { ...positiveId, description: '相关项目 ID(invoice.reim.
|
|
1054
|
-
projectName: { type: 'string', minLength: 1, description: '
|
|
1046
|
+
projectId: { ...positiveId, description: '相关项目 ID(invoice.reim.customer.search 选定客户本行 relatedProject 的 relatedProjectId),与 projectName 同时提供' },
|
|
1047
|
+
projectName: { type: 'string', minLength: 1, description: '相关项目名称(invoice.reim.customer.search 选定客户本行 relatedProject 的 relatedProjectName),与 projectId 同时提供' },
|
|
1055
1048
|
flowId: { ...positiveId, description: '事前申请流程的 requestid(invoice.reim.requests.list 返回)' },
|
|
1056
1049
|
},
|
|
1057
1050
|
oneOf: [{ required: ['fid'] }, { required: ['fids'] }],
|
|
@@ -1084,7 +1077,7 @@ export const invoiceOperations = [
|
|
|
1084
1077
|
{
|
|
1085
1078
|
name: 'invoice.reim.candidates.list',
|
|
1086
1079
|
risk: 'read',
|
|
1087
|
-
fixed: { path: '/api/inc/sync', sreim: '3', billType: 0, excludeProStatus: 8 },
|
|
1080
|
+
fixed: { path: '/api/inc/sync', sreim: '3', billType: 0, mext: FULL_EXT_MASK, excludeProStatus: 8 },
|
|
1088
1081
|
inputSchema: {
|
|
1089
1082
|
type: 'object',
|
|
1090
1083
|
additionalProperties: false,
|
|
@@ -1095,6 +1088,7 @@ export const invoiceOperations = [
|
|
|
1095
1088
|
consumption_tm_end: epochEndDateProperty('消费日期止(含)'),
|
|
1096
1089
|
page_size: { type: 'integer', minimum: 10, maximum: 200, default: 50, description: '单页条数。' },
|
|
1097
1090
|
max_items: { type: 'integer', minimum: 1, maximum: 500, default: 200, description: '最多拉取条数,超出截断并产生 warning。' },
|
|
1091
|
+
includePreApprovals: includePreApprovalsProperty,
|
|
1098
1092
|
},
|
|
1099
1093
|
},
|
|
1100
1094
|
outputSchema: reimCandidatesOutputSchema,
|
|
@@ -1208,8 +1202,28 @@ export const invoiceOperations = [
|
|
|
1208
1202
|
},
|
|
1209
1203
|
outputSchema: issuingContractDetailOutputSchema,
|
|
1210
1204
|
},
|
|
1205
|
+
{
|
|
1206
|
+
name: 'invoice.issuing.red.requests.list',
|
|
1207
|
+
risk: 'read',
|
|
1208
|
+
fixed: {
|
|
1209
|
+
path: '/api/workflow/core/common/browser/data/wfcRequest',
|
|
1210
|
+
workflowId: '100003460000000214',
|
|
1211
|
+
source: '蓝字开票申请流程浏览器;查询结果用于红冲流程「蓝字发票开票流程」',
|
|
1212
|
+
},
|
|
1213
|
+
inputSchema: {
|
|
1214
|
+
type: 'object',
|
|
1215
|
+
additionalProperties: false,
|
|
1216
|
+
required: ['customerName'],
|
|
1217
|
+
properties: {
|
|
1218
|
+
customerName: { type: 'string', minLength: 1, description: '用户明确的客户名称,同时用于申请标题和流程编号快捷搜索' },
|
|
1219
|
+
current: { type: 'integer', minimum: 1, default: 1 },
|
|
1220
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
|
1221
|
+
},
|
|
1222
|
+
},
|
|
1223
|
+
outputSchema: issuingRedRequestsOutputSchema,
|
|
1224
|
+
},
|
|
1211
1225
|
];
|
|
1212
|
-
const REIM_REFERENCE = 'references/
|
|
1226
|
+
const REIM_REFERENCE = 'references/reim-workflow.md';
|
|
1213
1227
|
const ISSUING_REFERENCE = 'references/invoice-issuing-workflow.md';
|
|
1214
1228
|
const UPLOAD_AND_VALIDATE_REFERENCE = 'references/invoice-upload-and-validate.md';
|
|
1215
1229
|
/**
|
|
@@ -1217,29 +1231,39 @@ const UPLOAD_AND_VALIDATE_REFERENCE = 'references/invoice-upload-and-validate.md
|
|
|
1217
1231
|
* 照旧 skill 调用的 Agent / 脚本才知道怎么改,而不是只拿到 operation_unknown。
|
|
1218
1232
|
*/
|
|
1219
1233
|
export const invoiceRetiredOperations = [
|
|
1234
|
+
...['invoice.reim.field.search', 'invoice.reim.project.list', 'invoice.reim.relation.search'].map((name) => ({
|
|
1235
|
+
name,
|
|
1236
|
+
replacement: '客户、相关项目及承担主体统一使用 invoice.reim.customer.search,只传客户名称 keywords;先选客户,再从该客户本行 relatedProject 选择项目。缺少客户名称时先补充客户,不再按项目名称查询或读取历史归档关联',
|
|
1237
|
+
reference: 'references/reim-customer-search.md',
|
|
1238
|
+
})),
|
|
1239
|
+
{
|
|
1240
|
+
name: 'invoice.reim.employee-superiors',
|
|
1241
|
+
replacement: '人员及上级字段保留页面默认值;报销标题复用已确认的当前用户姓名或本人事前申请创建人,缺少姓名时仅向用户补问,不再查询人员或上级接口',
|
|
1242
|
+
reference: REIM_REFERENCE,
|
|
1243
|
+
},
|
|
1220
1244
|
{
|
|
1221
1245
|
name: 'invoice.reim.form.structure',
|
|
1222
|
-
replacement: '
|
|
1246
|
+
replacement: '载入报销字段改用 weaver-e10-workflow 的 workflow.createRequestDirect(只传 workflow 字符串数组),由页面预填后用户核对保存',
|
|
1223
1247
|
reference: REIM_REFERENCE,
|
|
1224
1248
|
},
|
|
1225
1249
|
{
|
|
1226
1250
|
name: 'invoice.reim.row-info',
|
|
1227
|
-
replacement: '
|
|
1251
|
+
replacement: '明细每行只写已选发票业务 fid 和已绑定的相关流程,其余列由页面联动带出,不再查询或转换发票对象',
|
|
1228
1252
|
reference: REIM_REFERENCE,
|
|
1229
1253
|
},
|
|
1230
1254
|
{
|
|
1231
1255
|
name: 'invoice.reim.row-info-batch',
|
|
1232
|
-
replacement: '
|
|
1256
|
+
replacement: '明细每行只写已选发票业务 fid 和已绑定的相关流程,其余列由页面联动带出,不再查询或转换发票对象',
|
|
1233
1257
|
reference: REIM_REFERENCE,
|
|
1234
1258
|
},
|
|
1235
1259
|
{
|
|
1236
1260
|
name: 'invoice.reim.flow.create.prepare',
|
|
1237
|
-
replacement: '
|
|
1261
|
+
replacement: '普通报销改用 workflow.createRequestDirect 只读字段,再按 reim-workflow.md 输出页面填单指令,由用户核对保存,不自动保存或提交',
|
|
1238
1262
|
reference: REIM_REFERENCE,
|
|
1239
1263
|
},
|
|
1240
1264
|
{
|
|
1241
1265
|
name: 'invoice.reim.flow.create.apply',
|
|
1242
|
-
replacement: '
|
|
1266
|
+
replacement: '普通报销改用 workflow.createRequestDirect 只读字段,再按 reim-workflow.md 输出页面填单指令,由用户核对保存,不自动保存或提交',
|
|
1243
1267
|
reference: REIM_REFERENCE,
|
|
1244
1268
|
},
|
|
1245
1269
|
{
|
|
@@ -1254,12 +1278,12 @@ export const invoiceRetiredOperations = [
|
|
|
1254
1278
|
},
|
|
1255
1279
|
{
|
|
1256
1280
|
name: 'invoice.reim.template.build',
|
|
1257
|
-
replacement: '改为 invoice.reim.candidates.list
|
|
1281
|
+
replacement: '改为 invoice.reim.candidates.list 选票 → workflow.createRequestDirect 取字段 → 按 reim-workflow.md 的 Step 4~5 组装页面参数并输出填单指令,由用户核对保存',
|
|
1258
1282
|
reference: REIM_REFERENCE,
|
|
1259
1283
|
},
|
|
1260
1284
|
{
|
|
1261
1285
|
name: 'invoice.reim.flow.create.auto-prepare',
|
|
1262
|
-
replacement: '改为 invoice.reim.candidates.list
|
|
1286
|
+
replacement: '改为 invoice.reim.candidates.list 选票 → workflow.createRequestDirect 取字段 → 按 reim-workflow.md 的 Step 4~5 组装页面参数并输出填单指令,由用户核对保存',
|
|
1263
1287
|
reference: REIM_REFERENCE,
|
|
1264
1288
|
},
|
|
1265
1289
|
{
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { invoiceDetailRequest, invoiceDetailUrl } from './shared.js';
|
|
2
|
+
import { readInvoicesWithMetadata } from '../read-enrichment.js';
|
|
3
|
+
import { invoiceExtInfo } from '../invoice-record.js';
|
|
2
4
|
export class InvoiceGetOperation {
|
|
3
5
|
name = 'invoice.get';
|
|
4
6
|
async execute(input, { host }) {
|
|
7
|
+
const request = invoiceDetailRequest(input);
|
|
5
8
|
const session = await host.getSession();
|
|
6
|
-
const result = await
|
|
9
|
+
const { response: result, employeeInfo, preApprovals, warnings } = await readInvoicesWithMetadata(host, { ...request, operation: this.name }, { includePreApprovals: input.includePreApprovals });
|
|
7
10
|
const infos = Array.isArray(result?.infos) ? result.infos : [];
|
|
8
11
|
for (const item of infos) {
|
|
12
|
+
if (item?.info && typeof item.info === 'object' && !Array.isArray(item.info)) {
|
|
13
|
+
item.info.extInfo = invoiceExtInfo(item.info);
|
|
14
|
+
}
|
|
9
15
|
if (item?.info?.fid !== undefined)
|
|
10
16
|
item.info.id = item.info.fid;
|
|
11
17
|
const fid = item?.info?.fid ?? item?.info?.id;
|
|
12
18
|
if (fid)
|
|
13
19
|
item.detailUrl = invoiceDetailUrl(session.baseUrl, String(fid));
|
|
14
20
|
}
|
|
15
|
-
return { status: 'COMPLETE', data: result };
|
|
21
|
+
return { status: 'COMPLETE', data: { ...result, employeeInfo, preApprovals }, warnings };
|
|
16
22
|
}
|
|
17
23
|
}
|