tencentcloud-sdk-nodejs-ocr 4.1.256 → 4.1.258
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次/秒
|
|
@@ -2640,6 +2640,19 @@ export interface Encryption {
|
|
|
2640
2640
|
*/
|
|
2641
2641
|
EncryptList?: Array<string>;
|
|
2642
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
|
+
}
|
|
2643
2656
|
/**
|
|
2644
2657
|
* 混贴票据单张发票识别信息
|
|
2645
2658
|
*/
|
|
@@ -3424,36 +3437,36 @@ export interface ClassifyDetectOCRResponse {
|
|
|
3424
3437
|
RequestId?: string;
|
|
3425
3438
|
}
|
|
3426
3439
|
/**
|
|
3427
|
-
*
|
|
3440
|
+
* MultimodalDocParse返回参数结构体
|
|
3428
3441
|
*/
|
|
3429
|
-
export interface
|
|
3442
|
+
export interface MultimodalDocParseResponse {
|
|
3430
3443
|
/**
|
|
3431
|
-
*
|
|
3444
|
+
* <p>结果的临时下载地址。文件类型为zip压缩包,下载链接有效期30分钟。压缩包内包含*.md、*.json以及images文件夹。</p>
|
|
3432
3445
|
*/
|
|
3433
|
-
|
|
3446
|
+
ResultUrl?: string;
|
|
3434
3447
|
/**
|
|
3435
|
-
*
|
|
3448
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
3436
3449
|
*/
|
|
3437
|
-
|
|
3450
|
+
RequestId?: string;
|
|
3438
3451
|
}
|
|
3439
3452
|
/**
|
|
3440
3453
|
* ExtractDocAgent返回参数结构体
|
|
3441
3454
|
*/
|
|
3442
3455
|
export interface ExtractDocAgentResponse {
|
|
3443
3456
|
/**
|
|
3444
|
-
*
|
|
3457
|
+
* <p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
|
|
3445
3458
|
*/
|
|
3446
3459
|
Angle?: number;
|
|
3447
3460
|
/**
|
|
3448
|
-
*
|
|
3461
|
+
* <p>配置结构化文本信息。</p>
|
|
3449
3462
|
*/
|
|
3450
3463
|
StructuralList?: Array<GroupInfo>;
|
|
3451
3464
|
/**
|
|
3452
|
-
*
|
|
3465
|
+
* <p>任务执行错误码。当任务状态不为 FAIL 时,该值为""。</p>
|
|
3453
3466
|
*/
|
|
3454
3467
|
ErrorCode?: string;
|
|
3455
3468
|
/**
|
|
3456
|
-
*
|
|
3469
|
+
* <p>任务执行错误信息。当任务状态不为 FAIL 时,该值为""。</p>
|
|
3457
3470
|
*/
|
|
3458
3471
|
ErrorMessage?: string;
|
|
3459
3472
|
/**
|
|
@@ -3689,6 +3702,31 @@ export interface ClassifyDetectOCRRequest {
|
|
|
3689
3702
|
*/
|
|
3690
3703
|
DiscernType?: Array<string>;
|
|
3691
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
|
+
}
|
|
3692
3730
|
/**
|
|
3693
3731
|
* LicensePlateOCR返回参数结构体
|
|
3694
3732
|
*/
|
|
@@ -10267,21 +10305,29 @@ export interface SubmitExtractDocAgentJobRequest {
|
|
|
10267
10305
|
*/
|
|
10268
10306
|
export interface ExtractDocAgentRequest {
|
|
10269
10307
|
/**
|
|
10270
|
-
*
|
|
10308
|
+
* <p>图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
|
|
10271
10309
|
*/
|
|
10272
10310
|
ImageBase64?: string;
|
|
10273
10311
|
/**
|
|
10274
|
-
*
|
|
10312
|
+
* <p>图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
|
|
10275
10313
|
*/
|
|
10276
10314
|
ImageUrl?: string;
|
|
10277
10315
|
/**
|
|
10278
|
-
*
|
|
10316
|
+
* <p>自定义抽取需要的字段名称、字段类型、字段提示词。</p>
|
|
10279
10317
|
*/
|
|
10280
10318
|
ItemNames?: Array<ItemNames>;
|
|
10281
10319
|
/**
|
|
10282
|
-
*
|
|
10320
|
+
* <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF时有效。</p>
|
|
10283
10321
|
*/
|
|
10284
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;
|
|
10285
10331
|
}
|
|
10286
10332
|
/**
|
|
10287
10333
|
* AdvertiseOCR返回参数结构体
|