@satorijs/adapter-lark 3.10.6 → 3.11.1

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.
Files changed (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
@@ -1,257 +1,352 @@
1
- import { BankCard, BankInfo, BodyInfo, BusinessLicense, ChinesePassport, DrvingLicense, ExtractCopy, ExtractCurrency, ExtractPrice, ExtractTime, FoodManageLicense, FoodProduceLicense, HealthCertificate, HkmMainlandTravelPermit, IdCard, RecognizedEntities, Resume, TaxiInvoice, TrainInvoice, TwMainlandTravelPermit, VatInvoice, VehicleInvoice, VehicleLicense } from '.';
1
+ import * as Lark from '.';
2
2
  declare module '../internal' {
3
3
  interface Internal {
4
- /**
5
- * 识别文件中的简历信息
6
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/resume/parse
7
- */
8
- parseDocumentAiResume(form: ParseDocumentAiResumeForm): Promise<ParseDocumentAiResumeResponse>;
9
- /**
10
- * 识别文件中的机动车发票
11
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_invoice/recognize
12
- */
13
- recognizeDocumentAiVehicleInvoice(form: RecognizeDocumentAiVehicleInvoiceForm): Promise<RecognizeDocumentAiVehicleInvoiceResponse>;
14
- /**
15
- * 识别文件中的健康证
16
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/health_certificate/recognize
17
- */
18
- recognizeDocumentAiHealthCertificate(form: RecognizeDocumentAiHealthCertificateForm): Promise<RecognizeDocumentAiHealthCertificateResponse>;
19
- /**
20
- * 识别文件中的港澳居民来往内地通行证
21
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/hkm_mainland_travel_permit/recognize
22
- */
23
- recognizeDocumentAiHkmMainlandTravelPermit(form: RecognizeDocumentAiHkmMainlandTravelPermitForm): Promise<RecognizeDocumentAiHkmMainlandTravelPermitResponse>;
24
- /**
25
- * 识别文件中的台湾居民来往大陆通行证
26
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/tw_mainland_travel_permit/recognize
27
- */
28
- recognizeDocumentAiTwMainlandTravelPermit(form: RecognizeDocumentAiTwMainlandTravelPermitForm): Promise<RecognizeDocumentAiTwMainlandTravelPermitResponse>;
29
- /**
30
- * 识别文件中的中国护照
31
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/chinese_passport/recognize
32
- */
33
- recognizeDocumentAiChinesePassport(form: RecognizeDocumentAiChinesePassportForm): Promise<RecognizeDocumentAiChinesePassportResponse>;
34
- /**
35
- * 识别文件中的银行卡
36
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/bank_card/recognize
37
- */
38
- recognizeDocumentAiBankCard(form: RecognizeDocumentAiBankCardForm): Promise<RecognizeDocumentAiBankCardResponse>;
39
- /**
40
- * 识别文件中的行驶证
41
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_license/recognize
42
- */
43
- recognizeDocumentAiVehicleLicense(form: RecognizeDocumentAiVehicleLicenseForm): Promise<RecognizeDocumentAiVehicleLicenseResponse>;
44
- /**
45
- * 识别文件中的火车票
46
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/train_invoice/recognize
47
- */
48
- recognizeDocumentAiTrainInvoice(form: RecognizeDocumentAiTrainInvoiceForm): Promise<RecognizeDocumentAiTrainInvoiceResponse>;
49
- /**
50
- * 识别文件中的出租车发票
51
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/taxi_invoice/recognize
52
- */
53
- recognizeDocumentAiTaxiInvoice(form: RecognizeDocumentAiTaxiInvoiceForm): Promise<RecognizeDocumentAiTaxiInvoiceResponse>;
54
- /**
55
- * 识别文件中的身份证
56
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/id_card/recognize
57
- */
58
- recognizeDocumentAiIdCard(form: RecognizeDocumentAiIdCardForm): Promise<RecognizeDocumentAiIdCardResponse>;
59
- /**
60
- * 识别文件中的食品生产许可证
61
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_produce_license/recognize
62
- */
63
- recognizeDocumentAiFoodProduceLicense(form: RecognizeDocumentAiFoodProduceLicenseForm): Promise<RecognizeDocumentAiFoodProduceLicenseResponse>;
64
- /**
65
- * 识别文件中的食品经营许可证
66
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_manage_license/recognize
67
- */
68
- recognizeDocumentAiFoodManageLicense(form: RecognizeDocumentAiFoodManageLicenseForm): Promise<RecognizeDocumentAiFoodManageLicenseResponse>;
69
- /**
70
- * 识别文件中的驾驶证
71
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/driving_license/recognize
72
- */
73
- recognizeDocumentAiDrivingLicense(form: RecognizeDocumentAiDrivingLicenseForm): Promise<RecognizeDocumentAiDrivingLicenseResponse>;
74
- /**
75
- * 识别文件中的增值税发票
76
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vat_invoice/recognize
77
- */
78
- recognizeDocumentAiVatInvoice(form: RecognizeDocumentAiVatInvoiceForm): Promise<RecognizeDocumentAiVatInvoiceResponse>;
79
- /**
80
- * 识别文件中的营业执照
81
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_license/recognize
82
- */
83
- recognizeDocumentAiBusinessLicense(form: RecognizeDocumentAiBusinessLicenseForm): Promise<RecognizeDocumentAiBusinessLicenseResponse>;
84
- /**
85
- * 提取文件中的合同字段
86
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/contract/field_extraction
87
- */
88
- fieldExtractionDocumentAiContract(form: FieldExtractionDocumentAiContractForm): Promise<FieldExtractionDocumentAiContractResponse>;
89
- /**
90
- * 识别文件中的名片
91
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_card/recognize
92
- */
93
- recognizeDocumentAiBusinessCard(form: RecognizeDocumentAiBusinessCardForm): Promise<RecognizeDocumentAiBusinessCardResponse>;
4
+ documentAi: DocumentAi.Methods;
94
5
  }
95
6
  }
96
- export interface ParseDocumentAiResumeForm {
97
- /** 简历文件,支持 PDF / DOCX / PNG / JPG */
98
- file: Blob;
99
- }
100
- export interface ParseDocumentAiResumeResponse {
101
- /** 简历信息 */
102
- resumes?: Resume[];
103
- }
104
- export interface RecognizeDocumentAiVehicleInvoiceForm {
105
- /** 识别的机动车发票源文件 */
106
- file: Blob;
107
- }
108
- export interface RecognizeDocumentAiVehicleInvoiceResponse {
109
- /** 机动车发票信息 */
110
- vehicle_invoice?: VehicleInvoice;
111
- }
112
- export interface RecognizeDocumentAiHealthCertificateForm {
113
- /** 识别的健康证源文件 */
114
- file: Blob;
115
- }
116
- export interface RecognizeDocumentAiHealthCertificateResponse {
117
- /** 健康证信息 */
118
- health_certificate?: HealthCertificate;
119
- }
120
- export interface RecognizeDocumentAiHkmMainlandTravelPermitForm {
121
- /** 识别的港澳居民来往内地通行证源文件 */
122
- file: Blob;
123
- }
124
- export interface RecognizeDocumentAiHkmMainlandTravelPermitResponse {
125
- /** 港澳居民来往内地通行证信息 */
126
- hkm_mainland_travel_permit?: HkmMainlandTravelPermit;
127
- }
128
- export interface RecognizeDocumentAiTwMainlandTravelPermitForm {
129
- /** 识别的台湾居民来往大陆通行证源文件 */
130
- file?: Blob;
131
- }
132
- export interface RecognizeDocumentAiTwMainlandTravelPermitResponse {
133
- /** 台湾居民来往大陆通行证信息 */
134
- tw_mainland_travel_permit?: TwMainlandTravelPermit;
135
- }
136
- export interface RecognizeDocumentAiChinesePassportForm {
137
- /** 识别的中国护照源文件 */
138
- file: Blob;
139
- }
140
- export interface RecognizeDocumentAiChinesePassportResponse {
141
- /** 中国护照信息 */
142
- chinese_passport?: ChinesePassport;
143
- }
144
- export interface RecognizeDocumentAiBankCardForm {
145
- /** 识别的银行卡源文件 */
146
- file: Blob;
147
- }
148
- export interface RecognizeDocumentAiBankCardResponse {
149
- /** 银行卡信息 */
150
- bank_card?: BankCard;
151
- }
152
- export interface RecognizeDocumentAiVehicleLicenseForm {
153
- /** 识别的行驶证源文件 */
154
- file: Blob;
155
- }
156
- export interface RecognizeDocumentAiVehicleLicenseResponse {
157
- /** 行驶证信息 */
158
- vehicle_license?: VehicleLicense;
159
- }
160
- export interface RecognizeDocumentAiTrainInvoiceForm {
161
- /** 识别的火车票源文件 */
162
- file: Blob;
163
- }
164
- export interface RecognizeDocumentAiTrainInvoiceResponse {
165
- /** 火车票信息 */
166
- train_invoices?: TrainInvoice[];
167
- }
168
- export interface RecognizeDocumentAiTaxiInvoiceForm {
169
- /** 识别的出租车票源文件 */
170
- file: Blob;
171
- }
172
- export interface RecognizeDocumentAiTaxiInvoiceResponse {
173
- /** 出租车票信息 */
174
- taxi_invoices?: TaxiInvoice[];
175
- }
176
- export interface RecognizeDocumentAiIdCardForm {
177
- /** 识别身份证的源文件 */
178
- file: Blob;
179
- }
180
- export interface RecognizeDocumentAiIdCardResponse {
181
- /** 身份证信息 */
182
- id_card?: IdCard;
183
- }
184
- export interface RecognizeDocumentAiFoodProduceLicenseForm {
185
- /** 识别的食品生产许可证源文件 */
186
- file: Blob;
187
- }
188
- export interface RecognizeDocumentAiFoodProduceLicenseResponse {
189
- /** 食品生产许可证信息 */
190
- food_produce_license?: FoodProduceLicense;
191
- }
192
- export interface RecognizeDocumentAiFoodManageLicenseForm {
193
- /** 识别的食品经营许可证源文件 */
194
- file: Blob;
195
- }
196
- export interface RecognizeDocumentAiFoodManageLicenseResponse {
197
- /** 食品经营许可证信息 */
198
- food_manage_license?: FoodManageLicense;
199
- }
200
- export interface RecognizeDocumentAiDrivingLicenseForm {
201
- /** 识别的驾驶证源文件 */
202
- file: Blob;
203
- }
204
- export interface RecognizeDocumentAiDrivingLicenseResponse {
205
- /** 驾驶证信息 */
206
- driving_license?: DrvingLicense;
207
- }
208
- export interface RecognizeDocumentAiVatInvoiceForm {
209
- /** 识别的增值税发票文件 */
210
- file: Blob;
211
- }
212
- export interface RecognizeDocumentAiVatInvoiceResponse {
213
- /** 增值税发票信息 */
214
- vat_invoices?: VatInvoice[];
215
- }
216
- export interface RecognizeDocumentAiBusinessLicenseForm {
217
- /** 识别的营业执照源文件 */
218
- file: Blob;
219
- }
220
- export interface RecognizeDocumentAiBusinessLicenseResponse {
221
- /** 营业执照信息 */
222
- business_license?: BusinessLicense;
223
- }
224
- export interface FieldExtractionDocumentAiContractForm {
225
- /** 合同字段解析的源文件,当前只支持pdf, doc, docx三种类型的文件 */
226
- file: Blob;
227
- /** pdf页数限制,太长会导致latency增加,最大允许100页 */
228
- pdf_page_limit: number;
229
- /** ocr 参数,当前支持force, pdf, unused三种格式 */
230
- ocr_mode: 'force' | 'auto' | 'unused';
231
- }
232
- export interface FieldExtractionDocumentAiContractResponse {
233
- /** 文件的唯一id */
234
- file_id?: string;
235
- /** 总交易金额 */
236
- price?: ExtractPrice;
237
- /** 期限相关信息,包括开始日期、结束日期、有效时长 */
238
- time?: ExtractTime;
239
- /** 盖章份数 */
240
- copy?: ExtractCopy;
241
- /** 币种 */
242
- currency?: ExtractCurrency;
243
- /** 合同标题 */
244
- header?: string;
245
- /** 主体信息 */
246
- body_info?: BodyInfo[];
247
- /** 银行信息 */
248
- bank_info?: BankInfo[];
249
- }
250
- export interface RecognizeDocumentAiBusinessCardForm {
251
- /** 识别名片的源文件(支持 JPG / PNG / PDF) */
252
- file: Blob;
253
- }
254
- export interface RecognizeDocumentAiBusinessCardResponse {
255
- /** 名片信息 */
256
- business_cards?: RecognizedEntities[];
7
+ export declare namespace DocumentAi {
8
+ interface Methods {
9
+ resume: Resume.Methods;
10
+ vehicleInvoice: VehicleInvoice.Methods;
11
+ healthCertificate: HealthCertificate.Methods;
12
+ hkmMainlandTravelPermit: HkmMainlandTravelPermit.Methods;
13
+ twMainlandTravelPermit: TwMainlandTravelPermit.Methods;
14
+ chinesePassport: ChinesePassport.Methods;
15
+ bankCard: BankCard.Methods;
16
+ vehicleLicense: VehicleLicense.Methods;
17
+ trainInvoice: TrainInvoice.Methods;
18
+ taxiInvoice: TaxiInvoice.Methods;
19
+ idCard: IdCard.Methods;
20
+ foodProduceLicense: FoodProduceLicense.Methods;
21
+ foodManageLicense: FoodManageLicense.Methods;
22
+ drivingLicense: DrivingLicense.Methods;
23
+ vatInvoice: VatInvoice.Methods;
24
+ businessLicense: BusinessLicense.Methods;
25
+ contract: Contract.Methods;
26
+ businessCard: BusinessCard.Methods;
27
+ }
28
+ namespace Resume {
29
+ interface Methods {
30
+ /**
31
+ * 识别文件中的简历信息
32
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/resume/parse
33
+ */
34
+ parse(form: ParseForm): Promise<ParseResponse>;
35
+ }
36
+ interface ParseForm {
37
+ /** 简历文件,支持 PDF / DOCX / PNG / JPG */
38
+ file: Blob;
39
+ }
40
+ interface ParseResponse {
41
+ /** 简历信息 */
42
+ resumes?: Lark.Resume[];
43
+ }
44
+ }
45
+ namespace VehicleInvoice {
46
+ interface Methods {
47
+ /**
48
+ * 识别文件中的机动车发票
49
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_invoice/recognize
50
+ */
51
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
52
+ }
53
+ interface RecognizeForm {
54
+ /** 识别的机动车发票源文件 */
55
+ file: Blob;
56
+ }
57
+ interface RecognizeResponse {
58
+ /** 机动车发票信息 */
59
+ vehicle_invoice?: Lark.VehicleInvoice;
60
+ }
61
+ }
62
+ namespace HealthCertificate {
63
+ interface Methods {
64
+ /**
65
+ * 识别文件中的健康证
66
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/health_certificate/recognize
67
+ */
68
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
69
+ }
70
+ interface RecognizeForm {
71
+ /** 识别的健康证源文件 */
72
+ file: Blob;
73
+ }
74
+ interface RecognizeResponse {
75
+ /** 健康证信息 */
76
+ health_certificate?: Lark.HealthCertificate;
77
+ }
78
+ }
79
+ namespace HkmMainlandTravelPermit {
80
+ interface Methods {
81
+ /**
82
+ * 识别文件中的港澳居民来往内地通行证
83
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/hkm_mainland_travel_permit/recognize
84
+ */
85
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
86
+ }
87
+ interface RecognizeForm {
88
+ /** 识别的港澳居民来往内地通行证源文件 */
89
+ file: Blob;
90
+ }
91
+ interface RecognizeResponse {
92
+ /** 港澳居民来往内地通行证信息 */
93
+ hkm_mainland_travel_permit?: Lark.HkmMainlandTravelPermit;
94
+ }
95
+ }
96
+ namespace TwMainlandTravelPermit {
97
+ interface Methods {
98
+ /**
99
+ * 识别文件中的台湾居民来往大陆通行证
100
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/tw_mainland_travel_permit/recognize
101
+ */
102
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
103
+ }
104
+ interface RecognizeForm {
105
+ /** 识别的台湾居民来往大陆通行证源文件 */
106
+ file?: Blob;
107
+ }
108
+ interface RecognizeResponse {
109
+ /** 台湾居民来往大陆通行证信息 */
110
+ tw_mainland_travel_permit?: Lark.TwMainlandTravelPermit;
111
+ }
112
+ }
113
+ namespace ChinesePassport {
114
+ interface Methods {
115
+ /**
116
+ * 识别文件中的中国护照
117
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/chinese_passport/recognize
118
+ */
119
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
120
+ }
121
+ interface RecognizeForm {
122
+ /** 识别的中国护照源文件 */
123
+ file: Blob;
124
+ }
125
+ interface RecognizeResponse {
126
+ /** 中国护照信息 */
127
+ chinese_passport?: Lark.ChinesePassport;
128
+ }
129
+ }
130
+ namespace BankCard {
131
+ interface Methods {
132
+ /**
133
+ * 识别文件中的银行卡
134
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/bank_card/recognize
135
+ */
136
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
137
+ }
138
+ interface RecognizeForm {
139
+ /** 识别的银行卡源文件 */
140
+ file: Blob;
141
+ }
142
+ interface RecognizeResponse {
143
+ /** 银行卡信息 */
144
+ bank_card?: Lark.BankCard;
145
+ }
146
+ }
147
+ namespace VehicleLicense {
148
+ interface Methods {
149
+ /**
150
+ * 识别文件中的行驶证
151
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_license/recognize
152
+ */
153
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
154
+ }
155
+ interface RecognizeForm {
156
+ /** 识别的行驶证源文件 */
157
+ file: Blob;
158
+ }
159
+ interface RecognizeResponse {
160
+ /** 行驶证信息 */
161
+ vehicle_license?: Lark.VehicleLicense;
162
+ }
163
+ }
164
+ namespace TrainInvoice {
165
+ interface Methods {
166
+ /**
167
+ * 识别文件中的火车票
168
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/train_invoice/recognize
169
+ */
170
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
171
+ }
172
+ interface RecognizeForm {
173
+ /** 识别的火车票源文件 */
174
+ file: Blob;
175
+ }
176
+ interface RecognizeResponse {
177
+ /** 火车票信息 */
178
+ train_invoices?: Lark.TrainInvoice[];
179
+ }
180
+ }
181
+ namespace TaxiInvoice {
182
+ interface Methods {
183
+ /**
184
+ * 识别文件中的出租车发票
185
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/taxi_invoice/recognize
186
+ */
187
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
188
+ }
189
+ interface RecognizeForm {
190
+ /** 识别的出租车票源文件 */
191
+ file: Blob;
192
+ }
193
+ interface RecognizeResponse {
194
+ /** 出租车票信息 */
195
+ taxi_invoices?: Lark.TaxiInvoice[];
196
+ }
197
+ }
198
+ namespace IdCard {
199
+ interface Methods {
200
+ /**
201
+ * 识别文件中的身份证
202
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/id_card/recognize
203
+ */
204
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
205
+ }
206
+ interface RecognizeForm {
207
+ /** 识别身份证的源文件 */
208
+ file: Blob;
209
+ }
210
+ interface RecognizeResponse {
211
+ /** 身份证信息 */
212
+ id_card?: Lark.IdCard;
213
+ }
214
+ }
215
+ namespace FoodProduceLicense {
216
+ interface Methods {
217
+ /**
218
+ * 识别文件中的食品生产许可证
219
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_produce_license/recognize
220
+ */
221
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
222
+ }
223
+ interface RecognizeForm {
224
+ /** 识别的食品生产许可证源文件 */
225
+ file: Blob;
226
+ }
227
+ interface RecognizeResponse {
228
+ /** 食品生产许可证信息 */
229
+ food_produce_license?: Lark.FoodProduceLicense;
230
+ }
231
+ }
232
+ namespace FoodManageLicense {
233
+ interface Methods {
234
+ /**
235
+ * 识别文件中的食品经营许可证
236
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_manage_license/recognize
237
+ */
238
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
239
+ }
240
+ interface RecognizeForm {
241
+ /** 识别的食品经营许可证源文件 */
242
+ file: Blob;
243
+ }
244
+ interface RecognizeResponse {
245
+ /** 食品经营许可证信息 */
246
+ food_manage_license?: Lark.FoodManageLicense;
247
+ }
248
+ }
249
+ namespace DrivingLicense {
250
+ interface Methods {
251
+ /**
252
+ * 识别文件中的驾驶证
253
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/driving_license/recognize
254
+ */
255
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
256
+ }
257
+ interface RecognizeForm {
258
+ /** 识别的驾驶证源文件 */
259
+ file: Blob;
260
+ }
261
+ interface RecognizeResponse {
262
+ /** 驾驶证信息 */
263
+ driving_license?: Lark.DrvingLicense;
264
+ }
265
+ }
266
+ namespace VatInvoice {
267
+ interface Methods {
268
+ /**
269
+ * 识别文件中的增值税发票
270
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vat_invoice/recognize
271
+ */
272
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
273
+ }
274
+ interface RecognizeForm {
275
+ /** 识别的增值税发票文件 */
276
+ file: Blob;
277
+ }
278
+ interface RecognizeResponse {
279
+ /** 增值税发票信息 */
280
+ vat_invoices?: Lark.VatInvoice[];
281
+ }
282
+ }
283
+ namespace BusinessLicense {
284
+ interface Methods {
285
+ /**
286
+ * 识别文件中的营业执照
287
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_license/recognize
288
+ */
289
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
290
+ }
291
+ interface RecognizeForm {
292
+ /** 识别的营业执照源文件 */
293
+ file: Blob;
294
+ }
295
+ interface RecognizeResponse {
296
+ /** 营业执照信息 */
297
+ business_license?: Lark.BusinessLicense;
298
+ }
299
+ }
300
+ namespace Contract {
301
+ interface Methods {
302
+ /**
303
+ * 提取文件中的合同字段
304
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/contract/field_extraction
305
+ */
306
+ fieldExtraction(form: FieldExtractionForm): Promise<FieldExtractionResponse>;
307
+ }
308
+ interface FieldExtractionForm {
309
+ /** 合同字段解析的源文件,当前只支持pdf, doc, docx三种类型的文件 */
310
+ file: Blob;
311
+ /** pdf页数限制,太长会导致latency增加,最大允许100页 */
312
+ pdf_page_limit: number;
313
+ /** ocr 参数,当前支持force, pdf, unused三种格式 */
314
+ ocr_mode: 'force' | 'auto' | 'unused';
315
+ }
316
+ interface FieldExtractionResponse {
317
+ /** 文件的唯一id */
318
+ file_id?: string;
319
+ /** 总交易金额 */
320
+ price?: Lark.ExtractPrice;
321
+ /** 期限相关信息,包括开始日期、结束日期、有效时长 */
322
+ time?: Lark.ExtractTime;
323
+ /** 盖章份数 */
324
+ copy?: Lark.ExtractCopy;
325
+ /** 币种 */
326
+ currency?: Lark.ExtractCurrency;
327
+ /** 合同标题 */
328
+ header?: string;
329
+ /** 主体信息 */
330
+ body_info?: Lark.BodyInfo[];
331
+ /** 银行信息 */
332
+ bank_info?: Lark.BankInfo[];
333
+ }
334
+ }
335
+ namespace BusinessCard {
336
+ interface Methods {
337
+ /**
338
+ * 识别文件中的名片
339
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_card/recognize
340
+ */
341
+ recognize(form: RecognizeForm): Promise<RecognizeResponse>;
342
+ }
343
+ interface RecognizeForm {
344
+ /** 识别名片的源文件(支持 JPG / PNG / PDF) */
345
+ file: Blob;
346
+ }
347
+ interface RecognizeResponse {
348
+ /** 名片信息 */
349
+ business_cards?: Lark.RecognizedEntities[];
350
+ }
351
+ }
257
352
  }