Skip to content

feat: Add DocumentAI APIs for OCR, Bank Card, Resume & Contract (Bounty #27)#32

Open
sureshchouksey8 wants to merge 1 commit into
idea2app:mainfrom
sureshchouksey8:feat/bounty-27
Open

feat: Add DocumentAI APIs for OCR, Bank Card, Resume & Contract (Bounty #27)#32
sureshchouksey8 wants to merge 1 commit into
idea2app:mainfrom
sureshchouksey8:feat/bounty-27

Conversation

@sureshchouksey8
Copy link
Copy Markdown

@sureshchouksey8 sureshchouksey8 commented May 28, 2026

PR-32 PR-32 PR-32 Powered by Pull Request Badge

Summary

This PR implements intelligent document parsing wrappers in the DocumentAI module to resolve issue #27.

Changes

  1. OCR Basic Text Recognition: Added recognizeImageText(image) wrapping the optical_char_recognition/v1/image/basic_recognize endpoint.
  2. Bank Card Recognition: Added recognizeBankCard(file) wrapping the document_ai/v1/bank_card/recognize endpoint.
  3. Resume Parsing: Added parseResume(file) wrapping the document_ai/v1/resume/parse endpoint.
  4. Contract Field Extraction: Added extractContractFields(file, pdf_page_limit, ocr_mode) wrapping the document_ai/v1/contract/field_extraction endpoint.
  5. Types and Models: Exported all necessary TypeScript response type schemas for each API (e.g. BankCard, Resume, ContractField).
  6. VatInvoice Type Alignment: Adjusted VatInvoice.items type to match Feishu API response schema nested structure.

Validation:

  • Tested compilation: npm run build and tsc --noEmit compiled without errors.

Closes #27

- recognizeImageText: OCR basic text recognition (optical_char_recognition/v1)
- recognizeBankCard: bank card recognition (document_ai/v1/bank_card)
- parseResume: resume information parsing (document_ai/v1/resume)
- extractContractFields: contract field extraction (document_ai/v1/contract)

Closes idea2app#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

封装飞书【智能文档解析】非证照、票据类接口

2 participants