tencentcloud-sdk-nodejs-intl-en 3.0.1089 → 3.0.1090

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-intl-en",
3
- "version": "3.0.1089",
3
+ "version": "3.0.1090",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,2 +1,2 @@
1
- const sdkVersion = "3.0.1089";
1
+ const sdkVersion = "3.0.1090";
2
2
  module.exports = sdkVersion
@@ -1310,56 +1310,69 @@ class OtherInvoiceItem extends AbstractModel {
1310
1310
  }
1311
1311
 
1312
1312
  /**
1313
- * OCR result.
1313
+ * SmartStructuralPro request structure.
1314
1314
  * @class
1315
1315
  */
1316
- class TextDetection extends AbstractModel {
1316
+ class SmartStructuralProRequest extends AbstractModel {
1317
1317
  constructor(){
1318
1318
  super();
1319
1319
 
1320
1320
  /**
1321
- * Recognized text line content.
1321
+ * The URL of the image.
1322
+ Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
1323
+ Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
1324
+ We recommend that you store the image in Tencent Cloud for higher download speed and stability.
1325
+ The download speed and stability of non-Tencent Cloud URLs may be low.
1322
1326
  * @type {string || null}
1323
1327
  */
1324
- this.DetectedText = null;
1328
+ this.ImageUrl = null;
1325
1329
 
1326
1330
  /**
1327
- * Confidence. Value range: 0–100.
1328
- * @type {number || null}
1331
+ * The Base64-encoded value of the image.
1332
+ Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
1333
+ Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
1334
+ Either `ImageUrl` or `ImageBase64` of the image must be provided. If both are provided, only `ImageUrl` is used.
1335
+ * @type {string || null}
1329
1336
  */
1330
- this.Confidence = null;
1337
+ this.ImageBase64 = null;
1331
1338
 
1332
1339
  /**
1333
- * Text line coordinates, which are represented as 4 vertex coordinates.
1334
- Note: this field may return null, indicating that no valid values can be obtained.
1335
- * @type {Array.<Coord> || null}
1340
+ * The number of the PDF page that needs to be recognized. Only one single PDF page can be recognized. This parameter is valid if the uploaded file is a PDF `. Default value: `1`.
1341
+ * @type {number || null}
1336
1342
  */
1337
- this.Polygon = null;
1343
+ this.PdfPageNumber = null;
1338
1344
 
1339
1345
  /**
1340
- * Extended field.
1341
- The paragraph information `Parag` returned by the `GeneralBasicOcr` API contains `ParagNo`.
1342
- * @type {string || null}
1346
+ * The names of the fields you want to return for the structured information recognition.
1347
+ For example, if you want to return only the recognition result of the "Name" and "Gender" fields, set this parameter as follows:
1348
+ ItemNames=["Name","Gender"]
1349
+ * @type {Array.<string> || null}
1343
1350
  */
1344
- this.AdvancedInfo = null;
1351
+ this.ItemNames = null;
1345
1352
 
1346
1353
  /**
1347
- * Pixel coordinates of the text line in the image after rotation correction, which is in the format of `(X-coordinate of top-left point, Y-coordinate of top-left point, width, height)`.
1348
- * @type {ItemCoord || null}
1354
+ * Whether to enable recognition of all fields.
1355
+ * @type {boolean || null}
1349
1356
  */
1350
- this.ItemPolygon = null;
1357
+ this.ReturnFullText = null;
1351
1358
 
1352
1359
  /**
1353
- * Information about a character, including the character itself and its confidence. Supported APIs: `GeneralBasicOCR`, `GeneralAccurateOCR`
1354
- * @type {Array.<DetectedWords> || null}
1360
+ * Configuration ID support: General
1361
+ -- General scenarios; InvoiceEng
1362
+ -- Ocean bill of lading, international invoice template;
1363
+ -- Ocean shipment order template; WayBillEng
1364
+ -- CustomsDeclaration
1365
+ -- WeightNote
1366
+ -- MedicalMeter
1367
+ * @type {string || null}
1355
1368
  */
1356
- this.Words = null;
1369
+ this.ConfigId = null;
1357
1370
 
1358
1371
  /**
1359
- * Coordinates of a word’s four corners on the input image. Supported APIs: `GeneralBasicOCR`, `GeneralAccurateOCR`
1360
- * @type {Array.<DetectedWordCoordPoint> || null}
1372
+ * Enable recognition of coordinate values in full-text fields
1373
+ * @type {boolean || null}
1361
1374
  */
1362
- this.WordCoordPoint = null;
1375
+ this.EnableCoord = null;
1363
1376
 
1364
1377
  }
1365
1378
 
@@ -1370,42 +1383,13 @@ The paragraph information `Parag` returned by the `GeneralBasicOcr` API contains
1370
1383
  if (!params) {
1371
1384
  return;
1372
1385
  }
1373
- this.DetectedText = 'DetectedText' in params ? params.DetectedText : null;
1374
- this.Confidence = 'Confidence' in params ? params.Confidence : null;
1375
-
1376
- if (params.Polygon) {
1377
- this.Polygon = new Array();
1378
- for (let z in params.Polygon) {
1379
- let obj = new Coord();
1380
- obj.deserialize(params.Polygon[z]);
1381
- this.Polygon.push(obj);
1382
- }
1383
- }
1384
- this.AdvancedInfo = 'AdvancedInfo' in params ? params.AdvancedInfo : null;
1385
-
1386
- if (params.ItemPolygon) {
1387
- let obj = new ItemCoord();
1388
- obj.deserialize(params.ItemPolygon)
1389
- this.ItemPolygon = obj;
1390
- }
1391
-
1392
- if (params.Words) {
1393
- this.Words = new Array();
1394
- for (let z in params.Words) {
1395
- let obj = new DetectedWords();
1396
- obj.deserialize(params.Words[z]);
1397
- this.Words.push(obj);
1398
- }
1399
- }
1400
-
1401
- if (params.WordCoordPoint) {
1402
- this.WordCoordPoint = new Array();
1403
- for (let z in params.WordCoordPoint) {
1404
- let obj = new DetectedWordCoordPoint();
1405
- obj.deserialize(params.WordCoordPoint[z]);
1406
- this.WordCoordPoint.push(obj);
1407
- }
1408
- }
1386
+ this.ImageUrl = 'ImageUrl' in params ? params.ImageUrl : null;
1387
+ this.ImageBase64 = 'ImageBase64' in params ? params.ImageBase64 : null;
1388
+ this.PdfPageNumber = 'PdfPageNumber' in params ? params.PdfPageNumber : null;
1389
+ this.ItemNames = 'ItemNames' in params ? params.ItemNames : null;
1390
+ this.ReturnFullText = 'ReturnFullText' in params ? params.ReturnFullText : null;
1391
+ this.ConfigId = 'ConfigId' in params ? params.ConfigId : null;
1392
+ this.EnableCoord = 'EnableCoord' in params ? params.EnableCoord : null;
1409
1393
 
1410
1394
  }
1411
1395
  }
@@ -1564,6 +1548,107 @@ The download speed and stability of non-Tencent Cloud URLs may be low.
1564
1548
  }
1565
1549
  }
1566
1550
 
1551
+ /**
1552
+ * OCR result.
1553
+ * @class
1554
+ */
1555
+ class TextDetection extends AbstractModel {
1556
+ constructor(){
1557
+ super();
1558
+
1559
+ /**
1560
+ * Recognized text line content.
1561
+ * @type {string || null}
1562
+ */
1563
+ this.DetectedText = null;
1564
+
1565
+ /**
1566
+ * Confidence. Value range: 0–100.
1567
+ * @type {number || null}
1568
+ */
1569
+ this.Confidence = null;
1570
+
1571
+ /**
1572
+ * Text line coordinates, which are represented as 4 vertex coordinates.
1573
+ Note: this field may return null, indicating that no valid values can be obtained.
1574
+ * @type {Array.<Coord> || null}
1575
+ */
1576
+ this.Polygon = null;
1577
+
1578
+ /**
1579
+ * Extended field.
1580
+ The paragraph information `Parag` returned by the `GeneralBasicOcr` API contains `ParagNo`.
1581
+ * @type {string || null}
1582
+ */
1583
+ this.AdvancedInfo = null;
1584
+
1585
+ /**
1586
+ * Pixel coordinates of the text line in the image after rotation correction, which is in the format of `(X-coordinate of top-left point, Y-coordinate of top-left point, width, height)`.
1587
+ * @type {ItemCoord || null}
1588
+ */
1589
+ this.ItemPolygon = null;
1590
+
1591
+ /**
1592
+ * Information about a character, including the character itself and its confidence. Supported APIs: `GeneralBasicOCR`, `GeneralAccurateOCR`
1593
+ * @type {Array.<DetectedWords> || null}
1594
+ */
1595
+ this.Words = null;
1596
+
1597
+ /**
1598
+ * Coordinates of a word’s four corners on the input image. Supported APIs: `GeneralBasicOCR`, `GeneralAccurateOCR`
1599
+ * @type {Array.<DetectedWordCoordPoint> || null}
1600
+ */
1601
+ this.WordCoordPoint = null;
1602
+
1603
+ }
1604
+
1605
+ /**
1606
+ * @private
1607
+ */
1608
+ deserialize(params) {
1609
+ if (!params) {
1610
+ return;
1611
+ }
1612
+ this.DetectedText = 'DetectedText' in params ? params.DetectedText : null;
1613
+ this.Confidence = 'Confidence' in params ? params.Confidence : null;
1614
+
1615
+ if (params.Polygon) {
1616
+ this.Polygon = new Array();
1617
+ for (let z in params.Polygon) {
1618
+ let obj = new Coord();
1619
+ obj.deserialize(params.Polygon[z]);
1620
+ this.Polygon.push(obj);
1621
+ }
1622
+ }
1623
+ this.AdvancedInfo = 'AdvancedInfo' in params ? params.AdvancedInfo : null;
1624
+
1625
+ if (params.ItemPolygon) {
1626
+ let obj = new ItemCoord();
1627
+ obj.deserialize(params.ItemPolygon)
1628
+ this.ItemPolygon = obj;
1629
+ }
1630
+
1631
+ if (params.Words) {
1632
+ this.Words = new Array();
1633
+ for (let z in params.Words) {
1634
+ let obj = new DetectedWords();
1635
+ obj.deserialize(params.Words[z]);
1636
+ this.Words.push(obj);
1637
+ }
1638
+ }
1639
+
1640
+ if (params.WordCoordPoint) {
1641
+ this.WordCoordPoint = new Array();
1642
+ for (let z in params.WordCoordPoint) {
1643
+ let obj = new DetectedWordCoordPoint();
1644
+ obj.deserialize(params.WordCoordPoint[z]);
1645
+ this.WordCoordPoint.push(obj);
1646
+ }
1647
+ }
1648
+
1649
+ }
1650
+ }
1651
+
1567
1652
  /**
1568
1653
  * RecognizePhilippinesTinIDOCR response structure.
1569
1654
  * @class
@@ -9099,6 +9184,71 @@ class TollInvoice extends AbstractModel {
9099
9184
  }
9100
9185
  }
9101
9186
 
9187
+ /**
9188
+ * SmartStructuralPro response structure.
9189
+ * @class
9190
+ */
9191
+ class SmartStructuralProResponse extends AbstractModel {
9192
+ constructor(){
9193
+ super();
9194
+
9195
+ /**
9196
+ * The rotation angle (degrees) of the text on the image. 0: The text is horizontal. Positive value: The text is rotated clockwise. Negative value: The text is rotated counterclockwise.
9197
+ * @type {number || null}
9198
+ */
9199
+ this.Angle = null;
9200
+
9201
+ /**
9202
+ * The structural information (key-value).
9203
+ * @type {Array.<GroupInfo> || null}
9204
+ */
9205
+ this.StructuralList = null;
9206
+
9207
+ /**
9208
+ * The recognized text information.
9209
+ * @type {Array.<WordItem> || null}
9210
+ */
9211
+ this.WordList = null;
9212
+
9213
+ /**
9214
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
9215
+ * @type {string || null}
9216
+ */
9217
+ this.RequestId = null;
9218
+
9219
+ }
9220
+
9221
+ /**
9222
+ * @private
9223
+ */
9224
+ deserialize(params) {
9225
+ if (!params) {
9226
+ return;
9227
+ }
9228
+ this.Angle = 'Angle' in params ? params.Angle : null;
9229
+
9230
+ if (params.StructuralList) {
9231
+ this.StructuralList = new Array();
9232
+ for (let z in params.StructuralList) {
9233
+ let obj = new GroupInfo();
9234
+ obj.deserialize(params.StructuralList[z]);
9235
+ this.StructuralList.push(obj);
9236
+ }
9237
+ }
9238
+
9239
+ if (params.WordList) {
9240
+ this.WordList = new Array();
9241
+ for (let z in params.WordList) {
9242
+ let obj = new WordItem();
9243
+ obj.deserialize(params.WordList[z]);
9244
+ this.WordList.push(obj);
9245
+ }
9246
+ }
9247
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
9248
+
9249
+ }
9250
+ }
9251
+
9102
9252
  /**
9103
9253
  * TableOCR response structure.
9104
9254
  * @class
@@ -9685,9 +9835,10 @@ module.exports = {
9685
9835
  RecognizePhilippinesVoteIDOCRRequest: RecognizePhilippinesVoteIDOCRRequest,
9686
9836
  RecognizeKoreanDrivingLicenseOCRRequest: RecognizeKoreanDrivingLicenseOCRRequest,
9687
9837
  OtherInvoiceItem: OtherInvoiceItem,
9688
- TextDetection: TextDetection,
9838
+ SmartStructuralProRequest: SmartStructuralProRequest,
9689
9839
  VatInvoiceItemInfo: VatInvoiceItemInfo,
9690
9840
  MainlandPermitOCRRequest: MainlandPermitOCRRequest,
9841
+ TextDetection: TextDetection,
9691
9842
  RecognizePhilippinesTinIDOCRResponse: RecognizePhilippinesTinIDOCRResponse,
9692
9843
  DetectedWords: DetectedWords,
9693
9844
  TableCellInfo: TableCellInfo,
@@ -9760,6 +9911,7 @@ module.exports = {
9760
9911
  MainlandPermitOCRResponse: MainlandPermitOCRResponse,
9761
9912
  NonTaxItem: NonTaxItem,
9762
9913
  TollInvoice: TollInvoice,
9914
+ SmartStructuralProResponse: SmartStructuralProResponse,
9763
9915
  TableOCRResponse: TableOCRResponse,
9764
9916
  DetectedWordCoordPoint: DetectedWordCoordPoint,
9765
9917
  RecognizeKoreanIDCardOCRRequest: RecognizeKoreanIDCardOCRRequest,
@@ -36,9 +36,10 @@ const SealInfo = models.SealInfo;
36
36
  const RecognizePhilippinesVoteIDOCRRequest = models.RecognizePhilippinesVoteIDOCRRequest;
37
37
  const RecognizeKoreanDrivingLicenseOCRRequest = models.RecognizeKoreanDrivingLicenseOCRRequest;
38
38
  const OtherInvoiceItem = models.OtherInvoiceItem;
39
- const TextDetection = models.TextDetection;
39
+ const SmartStructuralProRequest = models.SmartStructuralProRequest;
40
40
  const VatInvoiceItemInfo = models.VatInvoiceItemInfo;
41
41
  const MainlandPermitOCRRequest = models.MainlandPermitOCRRequest;
42
+ const TextDetection = models.TextDetection;
42
43
  const RecognizePhilippinesTinIDOCRResponse = models.RecognizePhilippinesTinIDOCRResponse;
43
44
  const DetectedWords = models.DetectedWords;
44
45
  const TableCellInfo = models.TableCellInfo;
@@ -111,6 +112,7 @@ const RecognizeMainlandIDCardOCRResponse = models.RecognizeMainlandIDCardOCRResp
111
112
  const MainlandPermitOCRResponse = models.MainlandPermitOCRResponse;
112
113
  const NonTaxItem = models.NonTaxItem;
113
114
  const TollInvoice = models.TollInvoice;
115
+ const SmartStructuralProResponse = models.SmartStructuralProResponse;
114
116
  const TableOCRResponse = models.TableOCRResponse;
115
117
  const DetectedWordCoordPoint = models.DetectedWordCoordPoint;
116
118
  const RecognizeKoreanIDCardOCRRequest = models.RecognizeKoreanIDCardOCRRequest;
@@ -498,6 +500,19 @@ A maximum of 20 requests can be initiated per second for this API.
498
500
  this.request("RecognizePhilippinesDrivingLicenseOCR", req, resp, cb);
499
501
  }
500
502
 
503
+ /**
504
+ * This API is used to recognize fields from cards, documents, bills, forms, contracts, and other structured information. It is flexible and efficient to use, without any configuration required. This API is suitable for recognizing structured information.
505
+
506
+ A maximum of 10 requests can be initiated per second for this API.
507
+ * @param {SmartStructuralProRequest} req
508
+ * @param {function(string, SmartStructuralProResponse):void} cb
509
+ * @public
510
+ */
511
+ SmartStructuralPro(req, cb) {
512
+ let resp = new SmartStructuralProResponse();
513
+ this.request("SmartStructuralPro", req, resp, cb);
514
+ }
515
+
501
516
  /**
502
517
  * This API is used to recognize an Indonesian identity card.
503
518