Skip to content

feat(document-ai): add ID card, business card, and business license recognition wrappers#40

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/mobx-lark-id-business-license-recognize
Draft

feat(document-ai): add ID card, business card, and business license recognition wrappers#40
Copilot wants to merge 5 commits into
mainfrom
copilot/mobx-lark-id-business-license-recognize

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR-40 PR-40 PR-40 Powered by Pull Request Badge

This PR extends the DocumentAI SDK surface to cover three missing Feishu OCR endpoints: personal ID card, business card, and business license recognition. It adds typed wrappers and response models so callers can use these APIs with the same conventions as existing DocumentAI methods.

  • DocumentAI endpoint wrappers

    • Added recognizeIDCard(file), recognizeBusinessCard(file), and recognizeBusinessLicense(file) to DocumentAIModel (resolve MobX-Lark 封装个人、企业身份识别 API #39)
    • Each method posts multipart file payloads to:
      • document_ai/v1/id_card/recognize
      • document_ai/v1/business_card/recognize
      • document_ai/v1/business_license/recognize
  • Typed response models

    • Added new types in src/module/DocumentAI/type.ts:
      • IDCardEntity, IDCard
      • BusinessCardEntity, BusinessCard
      • BusinessLicenseEntity, BusinessLicense
    • Entity type fields are constrained to documented enum-like string unions for stronger compile-time safety.
  • ID card coordinate compatibility

    • Normalized ID card coordinate output to corners in the wrapper return value while tolerating upstream payload variance.
const cards = await app.documentAIStore.recognizeBusinessCard(file);
// cards: BusinessCard[]

const idCard = await app.documentAIStore.recognizeIDCard(file);
// idCard.entities + normalized idCard.corners

Copilot AI changed the title [WIP] Add ID card, business card, and business license recognition APIs feat(document-ai): add ID card, business card, and business license recognition wrappers Jun 22, 2026
Copilot AI requested a review from TechQuery June 22, 2026 00:38
@TechQuery TechQuery added the enhancement Some improvements label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Some improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MobX-Lark 封装个人、企业身份识别 API

2 participants