tencentcloud-sdk-nodejs-ocr 4.1.255 → 4.1.257
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.
|
@@ -159,6 +159,9 @@ export class Client extends TencentCloudCommon.AbstractClient {
|
|
|
159
159
|
async SealOCR(req, cb) {
|
|
160
160
|
return this.request("SealOCR", req, cb);
|
|
161
161
|
}
|
|
162
|
+
async MultimodalDocParse(req, cb) {
|
|
163
|
+
return this.request("MultimodalDocParse", req, cb);
|
|
164
|
+
}
|
|
162
165
|
async ClassifyStoreName(req, cb) {
|
|
163
166
|
return this.request("ClassifyStoreName", req, cb);
|
|
164
167
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
|
|
2
|
-
import { TableOCRRequest, HKIDCardOCRRequest, BankSlipOCRRequest, BusinessCardOCRResponse, VinOCRResponse, BankCardOCRRequest, VatInvoiceVerifyNewResponse, CarInvoiceOCRRequest, DescribeQuestionMarkAgentJobResponse, ExtractDocMultiRequest, QuestionSplitLayoutOCRRequest, DescribeMarkEssayAgentJobResponse, EstateCertOCRResponse, ExtractDocMultiProRequest, MLIDPassportOCRRequest, TextDetectResponse, GetOCRTokenResponse, DriverLicenseOCRResponse, WaybillOCRResponse, ClassifyStoreNameRequest, QuestionSplitOCRRequest, FlightInvoiceOCRRequest, MLIDCardOCRRequest, IDCardOCRResponse, EnterpriseLicenseOCRResponse, QuestionOCRResponse, DriverLicenseOCRRequest, VerifyBizLicenseEnterprise3Response, RecognizeTableOCRResponse, QrcodeOCRResponse, HKIDCardOCRResponse, MainlandPermitOCRRequest, EnglishOCRRequest, VehicleLicenseOCRRequest, QuestionSplitOCRResponse, TableOCRResponse, RecognizeStoreNameRequest, VerifyScenePhotoResponse, RecognizeAgentResponse, TrainTicketOCRResponse, RecognizeFormulaOCRResponse, ArithmeticOCRResponse, FormulaOCRResponse, RecognizeGeneralCardWarnRequest, SmartStructuralOCRRequest, ExtractDocMultiProResponse, GeneralHandwritingOCRRequest, BizLicenseOCRRequest, MixedInvoiceDetectResponse, RideHailingDriverLicenseOCRRequest, GeneralAccurateOCRResponse, QrcodeOCRRequest, RecognizeGeneralInvoiceRequest, GeneralBasicOCRResponse, RecognizeMedicalInvoiceOCRResponse, RecognizeValidIDCardOCRRequest, MixedInvoiceOCRResponse, ClassifyDetectOCRResponse,
|
|
2
|
+
import { TableOCRRequest, HKIDCardOCRRequest, BankSlipOCRRequest, BusinessCardOCRResponse, VinOCRResponse, BankCardOCRRequest, VatInvoiceVerifyNewResponse, CarInvoiceOCRRequest, DescribeQuestionMarkAgentJobResponse, ExtractDocMultiRequest, QuestionSplitLayoutOCRRequest, DescribeMarkEssayAgentJobResponse, EstateCertOCRResponse, ExtractDocMultiProRequest, MLIDPassportOCRRequest, TextDetectResponse, GetOCRTokenResponse, DriverLicenseOCRResponse, WaybillOCRResponse, ClassifyStoreNameRequest, QuestionSplitOCRRequest, FlightInvoiceOCRRequest, MLIDCardOCRRequest, IDCardOCRResponse, EnterpriseLicenseOCRResponse, QuestionOCRResponse, DriverLicenseOCRRequest, VerifyBizLicenseEnterprise3Response, RecognizeTableOCRResponse, QrcodeOCRResponse, HKIDCardOCRResponse, MainlandPermitOCRRequest, EnglishOCRRequest, VehicleLicenseOCRRequest, QuestionSplitOCRResponse, TableOCRResponse, RecognizeStoreNameRequest, VerifyScenePhotoResponse, RecognizeAgentResponse, TrainTicketOCRResponse, RecognizeFormulaOCRResponse, ArithmeticOCRResponse, FormulaOCRResponse, RecognizeGeneralCardWarnRequest, VinOCRRequest, SmartStructuralOCRRequest, ExtractDocMultiProResponse, GeneralHandwritingOCRRequest, BizLicenseOCRRequest, MixedInvoiceDetectResponse, RideHailingDriverLicenseOCRRequest, GeneralAccurateOCRResponse, QrcodeOCRRequest, RecognizeGeneralInvoiceRequest, GeneralBasicOCRResponse, RecognizeMedicalInvoiceOCRResponse, RecognizeValidIDCardOCRRequest, MixedInvoiceOCRResponse, ClassifyDetectOCRResponse, MultimodalDocParseResponse, ExtractDocAgentResponse, VehicleLicenseOCRResponse, VatInvoiceOCRRequest, ClassifyDetectOCRRequest, MultimodalDocParseRequest, LicensePlateOCRResponse, ExtractDocBasicRequest, RecognizeThaiIDCardOCRResponse, ExtractDocMultiResponse, TextDetectRequest, EduPaperOCRResponse, RecognizeThaiIDCardOCRRequest, RecognizeEncryptedIDCardOCRRequest, SubmitExtractDocAgentJobResponse, ImageEnhancementResponse, PassportOCRResponse, VehicleRegCertOCRRequest, QuestionSplitLayoutOCRResponse, SubmitMarkEssayAgentJobRequest, LicensePlateOCRRequest, GeneralBasicOCRRequest, SubmitMarkEssayAgentJobResponse, GeneralEfficientOCRRequest, AdvertiseOCRRequest, SubmitQuestionMarkAgentJobResponse, RideHailingDriverLicenseOCRResponse, ImageEnhancementRequest, ExtractDocBasicResponse, EnterpriseLicenseOCRRequest, GeneralAccurateOCRRequest, RecognizeFormulaOCRRequest, FlightInvoiceOCRResponse, VatInvoiceVerifyNewRequest, ArithmeticOCRRequest, VerifyOfdVatInvoiceOCRRequest, GetOCRTokenRequest, RecognizeGeneralCardWarnResponse, ClassifyStoreNameResponse, DescribeExtractDocAgentJobRequest, RecognizeTableAccurateOCRRequest, SealOCRResponse, VerifyBizLicenseEnterprise4Response, HandwritingEssayOCRRequest, BankSlipOCRResponse, EduPaperOCRRequest, FormulaOCRRequest, PassportOCRRequest, VerifyScenePhotoRequest, DescribeQuestionMarkAgentJobRequest, MixedInvoiceOCRRequest, DescribeExtractDocAgentJobResponse, ResidenceBookletOCRResponse, CarInvoiceOCRResponse, VehicleRegCertOCRResponse, GeneralFastOCRRequest, RecognizeGeneralInvoiceResponse, HandwritingEssayOCRResponse, VerifyBizLicenseEnterprise4Request, QuestionOCRRequest, RecognizeMedicalInvoiceOCRRequest, InsuranceBillOCRResponse, TrainTicketOCRRequest, GeneralEfficientOCRResponse, MLIDPassportOCRResponse, SealOCRRequest, VerifyOfdVatInvoiceOCRResponse, RecognizeTableAccurateOCRResponse, ResidenceBookletOCRRequest, GetOCRResultRequest, GetOCRResultResponse, MainlandPermitOCRResponse, PermitOCRRequest, EnglishOCRResponse, VerifyBizLicenseEnterprise3Request, RecognizeEncryptedIDCardOCRResponse, RideHailingTransportLicenseOCRResponse, PermitOCRResponse, InsuranceBillOCRRequest, GeneralHandwritingOCRResponse, SubmitExtractDocAgentJobRequest, ExtractDocAgentRequest, AdvertiseOCRResponse, RecognizeAgentRequest, SmartStructuralOCRResponse, IDCardOCRRequest, MixedInvoiceDetectRequest, WaybillOCRRequest, RecognizeStoreNameResponse, RideHailingTransportLicenseOCRRequest, MLIDCardOCRResponse, RecognizeTableOCRRequest, EstateCertOCRRequest, BizLicenseOCRResponse, VatInvoiceOCRResponse, BankCardOCRResponse, SubmitQuestionMarkAgentJobRequest, BusinessCardOCRRequest, RecognizeValidIDCardOCRResponse, DescribeMarkEssayAgentJobRequest, GeneralFastOCRResponse } from "./ocr_models";
|
|
3
3
|
/**
|
|
4
4
|
* ocr client
|
|
5
5
|
* @class
|
|
@@ -483,6 +483,14 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
|
|
|
483
483
|
默认接口请求频率限制:5次/秒。
|
|
484
484
|
*/
|
|
485
485
|
SealOCR(req: SealOCRRequest, cb?: (error: string, rep: SealOCRResponse) => void): Promise<SealOCRResponse>;
|
|
486
|
+
/**
|
|
487
|
+
* 本接口支持解析多种类型的文档文件(PDF、Word、PPT、Excel、Markdown、TXT、图片、WPS),返回解析后的结果文件下载地址(zip压缩包,包含markdown、json和图片)。
|
|
488
|
+
|
|
489
|
+
支持的文件大小:PDF/Word/PPT支持150M且300页以内、Excel支持10M以内、TXT支持10M以内、图片文件支持70M以内。
|
|
490
|
+
|
|
491
|
+
默认接口请求频率限制:5 并发。
|
|
492
|
+
*/
|
|
493
|
+
MultimodalDocParse(req: MultimodalDocParseRequest, cb?: (error: string, rep: MultimodalDocParseResponse) => void): Promise<MultimodalDocParseResponse>;
|
|
486
494
|
/**
|
|
487
495
|
* 本接口用于识别门头照分类标签信息
|
|
488
496
|
默认接口请求频率限制:1次/秒
|
|
@@ -609,6 +609,16 @@ class Client extends TencentCloudCommon.AbstractClient {
|
|
|
609
609
|
async SealOCR(req, cb) {
|
|
610
610
|
return this.request("SealOCR", req, cb);
|
|
611
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* 本接口支持解析多种类型的文档文件(PDF、Word、PPT、Excel、Markdown、TXT、图片、WPS),返回解析后的结果文件下载地址(zip压缩包,包含markdown、json和图片)。
|
|
614
|
+
|
|
615
|
+
支持的文件大小:PDF/Word/PPT支持150M且300页以内、Excel支持10M以内、TXT支持10M以内、图片文件支持70M以内。
|
|
616
|
+
|
|
617
|
+
默认接口请求频率限制:5 并发。
|
|
618
|
+
*/
|
|
619
|
+
async MultimodalDocParse(req, cb) {
|
|
620
|
+
return this.request("MultimodalDocParse", req, cb);
|
|
621
|
+
}
|
|
612
622
|
/**
|
|
613
623
|
* 本接口用于识别门头照分类标签信息
|
|
614
624
|
默认接口请求频率限制:1次/秒
|
|
@@ -755,15 +755,19 @@ export interface OverseasInvoice {
|
|
|
755
755
|
*/
|
|
756
756
|
export interface ItemInfo {
|
|
757
757
|
/**
|
|
758
|
-
* key
|
|
758
|
+
* <p>key信息组</p>
|
|
759
759
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
760
760
|
*/
|
|
761
761
|
Key?: Key;
|
|
762
762
|
/**
|
|
763
|
-
* Value
|
|
763
|
+
* <p>Value信息组</p>
|
|
764
764
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
765
765
|
*/
|
|
766
766
|
Value?: Value;
|
|
767
|
+
/**
|
|
768
|
+
* <p>返回这个字段是否比对审核通过</p><p>默认值:false</p>
|
|
769
|
+
*/
|
|
770
|
+
AuditResult?: boolean;
|
|
767
771
|
}
|
|
768
772
|
/**
|
|
769
773
|
* TextDetect返回参数结构体
|
|
@@ -2636,6 +2640,19 @@ export interface Encryption {
|
|
|
2636
2640
|
*/
|
|
2637
2641
|
EncryptList?: Array<string>;
|
|
2638
2642
|
}
|
|
2643
|
+
/**
|
|
2644
|
+
* VinOCR请求参数结构体
|
|
2645
|
+
*/
|
|
2646
|
+
export interface VinOCRRequest {
|
|
2647
|
+
/**
|
|
2648
|
+
* 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
2649
|
+
*/
|
|
2650
|
+
ImageBase64?: string;
|
|
2651
|
+
/**
|
|
2652
|
+
* 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
2653
|
+
*/
|
|
2654
|
+
ImageUrl?: string;
|
|
2655
|
+
}
|
|
2639
2656
|
/**
|
|
2640
2657
|
* 混贴票据单张发票识别信息
|
|
2641
2658
|
*/
|
|
@@ -3420,36 +3437,36 @@ export interface ClassifyDetectOCRResponse {
|
|
|
3420
3437
|
RequestId?: string;
|
|
3421
3438
|
}
|
|
3422
3439
|
/**
|
|
3423
|
-
*
|
|
3440
|
+
* MultimodalDocParse返回参数结构体
|
|
3424
3441
|
*/
|
|
3425
|
-
export interface
|
|
3442
|
+
export interface MultimodalDocParseResponse {
|
|
3426
3443
|
/**
|
|
3427
|
-
*
|
|
3444
|
+
* <p>结果的临时下载地址。文件类型为zip压缩包,下载链接有效期30分钟。压缩包内包含*.md、*.json以及images文件夹。</p>
|
|
3428
3445
|
*/
|
|
3429
|
-
|
|
3446
|
+
ResultUrl?: string;
|
|
3430
3447
|
/**
|
|
3431
|
-
*
|
|
3448
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
3432
3449
|
*/
|
|
3433
|
-
|
|
3450
|
+
RequestId?: string;
|
|
3434
3451
|
}
|
|
3435
3452
|
/**
|
|
3436
3453
|
* ExtractDocAgent返回参数结构体
|
|
3437
3454
|
*/
|
|
3438
3455
|
export interface ExtractDocAgentResponse {
|
|
3439
3456
|
/**
|
|
3440
|
-
*
|
|
3457
|
+
* <p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
|
|
3441
3458
|
*/
|
|
3442
3459
|
Angle?: number;
|
|
3443
3460
|
/**
|
|
3444
|
-
*
|
|
3461
|
+
* <p>配置结构化文本信息。</p>
|
|
3445
3462
|
*/
|
|
3446
3463
|
StructuralList?: Array<GroupInfo>;
|
|
3447
3464
|
/**
|
|
3448
|
-
*
|
|
3465
|
+
* <p>任务执行错误码。当任务状态不为 FAIL 时,该值为""。</p>
|
|
3449
3466
|
*/
|
|
3450
3467
|
ErrorCode?: string;
|
|
3451
3468
|
/**
|
|
3452
|
-
*
|
|
3469
|
+
* <p>任务执行错误信息。当任务状态不为 FAIL 时,该值为""。</p>
|
|
3453
3470
|
*/
|
|
3454
3471
|
ErrorMessage?: string;
|
|
3455
3472
|
/**
|
|
@@ -3685,6 +3702,31 @@ export interface ClassifyDetectOCRRequest {
|
|
|
3685
3702
|
*/
|
|
3686
3703
|
DiscernType?: Array<string>;
|
|
3687
3704
|
}
|
|
3705
|
+
/**
|
|
3706
|
+
* MultimodalDocParse请求参数结构体
|
|
3707
|
+
*/
|
|
3708
|
+
export interface MultimodalDocParseRequest {
|
|
3709
|
+
/**
|
|
3710
|
+
* <p>文件的 Url 地址,支持FileType参数对应的文件格式及大小。文件下载时间不超过3秒。文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
|
|
3711
|
+
*/
|
|
3712
|
+
FileUrl: string;
|
|
3713
|
+
/**
|
|
3714
|
+
* <p>支持解析的文件类型。</p><p>1:PDF 文档;</p><p>2:Word 文档(.doc / .docx);</p><p>3:PPT 演示文稿(.ppt / .pptx);</p><p>4:Excel 表格(.xls / .xlsx);</p><p>5:Markdown 文档(.md);</p><p>6:纯文本文件(.txt);</p><p>7:图片文件(.png / .jpg / .jpeg 等);</p><p>8:WPS 文档;</p><p>0:未知文件类型。</p><p></p><p>支持的文件大小:</p><p>PDF/WORD/PPT支持150M且300页以内、EXCEL支持10M以内、TXT支持10M以内、图片文件支持70M以内。</p><p></p><p>默认值:1</p>
|
|
3715
|
+
*/
|
|
3716
|
+
FileType: number;
|
|
3717
|
+
/**
|
|
3718
|
+
* <p>输出格式。</p><p>1:json格式</p><p>2:markdown格式</p><p>3:xml格式</p><p>9:json+markdown+xml格式</p><p></p><p>默认值:9</p>
|
|
3719
|
+
*/
|
|
3720
|
+
ResultType?: number;
|
|
3721
|
+
/**
|
|
3722
|
+
* <p>是否支持子图解析。</p><p></p><p>默认值:false</p>
|
|
3723
|
+
*/
|
|
3724
|
+
EnableSubImg?: boolean;
|
|
3725
|
+
/**
|
|
3726
|
+
* <p>需要识别的页码范围,单次调用最多支持300页。</p><p>参数格式:1-10</p>
|
|
3727
|
+
*/
|
|
3728
|
+
PageRange?: string;
|
|
3729
|
+
}
|
|
3688
3730
|
/**
|
|
3689
3731
|
* LicensePlateOCR返回参数结构体
|
|
3690
3732
|
*/
|
|
@@ -3977,19 +4019,25 @@ export interface QuotaInvoice {
|
|
|
3977
4019
|
*/
|
|
3978
4020
|
export interface ItemNames {
|
|
3979
4021
|
/**
|
|
3980
|
-
*
|
|
4022
|
+
* <p>自定义抽取功能需返回的字段名称。</p>
|
|
3981
4023
|
*/
|
|
3982
4024
|
KeyName?: string;
|
|
3983
4025
|
/**
|
|
3984
|
-
*
|
|
3985
|
-
|
|
4026
|
+
* <p>默认 0;0表示kv对 1表示 表格字段。</p>
|
|
3986
4027
|
*/
|
|
3987
4028
|
KeyType?: number;
|
|
3988
4029
|
/**
|
|
3989
|
-
*
|
|
3990
|
-
|
|
4030
|
+
* <p>抽取字段的描述内容。</p>
|
|
3991
4031
|
*/
|
|
3992
4032
|
KeyPrompt?: string;
|
|
4033
|
+
/**
|
|
4034
|
+
* <p>自定义字段对应期望的值内容(这个一般需要对字段审核比对才需要输入)。</p>
|
|
4035
|
+
*/
|
|
4036
|
+
KeyExpectedValue?: string;
|
|
4037
|
+
/**
|
|
4038
|
+
* <p>自定义字段审核比对的规则prompt。</p><p>比如keyname是姓名,KeyExpectedValue 张三,KeyAuditPrompt设置为“字符需要完全匹配则审核返回正确”/“字符匹配90%就审核返回正确”</p>
|
|
4039
|
+
*/
|
|
4040
|
+
KeyAuditPrompt?: string;
|
|
3993
4041
|
}
|
|
3994
4042
|
/**
|
|
3995
4043
|
* 混贴票据中单张发票的内容
|
|
@@ -10257,21 +10305,29 @@ export interface SubmitExtractDocAgentJobRequest {
|
|
|
10257
10305
|
*/
|
|
10258
10306
|
export interface ExtractDocAgentRequest {
|
|
10259
10307
|
/**
|
|
10260
|
-
*
|
|
10308
|
+
* <p>图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
|
|
10261
10309
|
*/
|
|
10262
10310
|
ImageBase64?: string;
|
|
10263
10311
|
/**
|
|
10264
|
-
*
|
|
10312
|
+
* <p>图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
|
|
10265
10313
|
*/
|
|
10266
10314
|
ImageUrl?: string;
|
|
10267
10315
|
/**
|
|
10268
|
-
*
|
|
10316
|
+
* <p>自定义抽取需要的字段名称、字段类型、字段提示词。</p>
|
|
10269
10317
|
*/
|
|
10270
10318
|
ItemNames?: Array<ItemNames>;
|
|
10271
10319
|
/**
|
|
10272
|
-
*
|
|
10320
|
+
* <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。</p>
|
|
10273
10321
|
*/
|
|
10274
10322
|
PdfPageNumber?: number;
|
|
10323
|
+
/**
|
|
10324
|
+
* <p>是否需要返回坐标</p><p>默认值:false</p>
|
|
10325
|
+
*/
|
|
10326
|
+
EnableCoord?: boolean;
|
|
10327
|
+
/**
|
|
10328
|
+
* <p>是否需要开启审核逻辑(支持对字段配置比对内容和比对的语意规则)</p><p>默认值:false</p>
|
|
10329
|
+
*/
|
|
10330
|
+
EnableAudit?: boolean;
|
|
10275
10331
|
}
|
|
10276
10332
|
/**
|
|
10277
10333
|
* AdvertiseOCR返回参数结构体
|