feat: 封装飞书智能文档解析票据类接口 (DocumentAI invoice recognition)#21
Draft
feat: 封装飞书智能文档解析票据类接口 (DocumentAI invoice recognition)#21
Conversation
Copilot
AI
changed the title
[WIP] Wrap Feishu smart document parsing invoice API
feat: 封装飞书智能文档解析票据类接口 (DocumentAI invoice recognition)
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps four Feishu Document AI invoice recognition endpoints into a single
DocumentAIModelclass, mounted onLarkApp.New:
DocumentAIModelExtends
BaseModelfrommobx-restful. Each method accepts aFileand POSTs multipart form-data to the respective endpoint.recognizeVatInvoicedocument_ai/v1/vat_invoice/recognizerecognizeTaxiInvoicedocument_ai/v1/taxi_invoice/recognizerecognizeTrainInvoicedocument_ai/v1/train_invoice/recognizerecognizeVehicleInvoicedocument_ai/v1/vehicle_invoice/recognizeTypes (
src/module/DocumentAI/type.ts)InvoiceEntity—{ type, value, score }Invoice—{ entities: InvoiceEntity[] }— base for all four invoice type aliases (VatInvoice,TaxiInvoice,TrainInvoice,VehicleInvoice)LarkAppchangesdocumentAIStore: DocumentAIModelmounted in constructor alongside existing storesWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
open.feishu.cn/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/MobX-Lark/MobX-Lark/node_modules/.bin/ts-node test/index.spec.ts developer-actionversion(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.