@huaweicloud/huaweicloud-sdk-ocr 3.1.26 → 3.1.28

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": "@huaweicloud/huaweicloud-sdk-ocr",
3
- "version": "3.1.26",
3
+ "version": "3.1.28",
4
4
  "description": "Huaweicloud SDK for ocr",
5
5
  "main": "huaweicloud-sdk-ocr.js",
6
6
  "typings": "huaweicloud-sdk-ocr.d.ts",
@@ -14,6 +14,6 @@
14
14
  "author": "HuaweiCloud_SDK",
15
15
  "license": "Apache-2.0",
16
16
  "dependencies": {
17
- "@huaweicloud/huaweicloud-sdk-core": "^3.1.26"
17
+ "@huaweicloud/huaweicloud-sdk-core": "^3.1.28"
18
18
  }
19
19
  }
package/v1/OcrRegion.d.ts CHANGED
@@ -8,7 +8,6 @@ export declare class OcrRegion {
8
8
  static AP_SOUTHEAST_3: any;
9
9
  static LA_SOUTH_2: any;
10
10
  static AF_SOUTH_1: any;
11
- private static STATIC_FIELDS;
12
- private static createStaticFields;
13
- static valueOf(regionId: String): any;
11
+ private static REGION_MAP;
12
+ static valueOf(regionId: string): any;
14
13
  }
package/v1/OcrRegion.js CHANGED
@@ -5,39 +5,36 @@ var region_1 = require("@huaweicloud/huaweicloud-sdk-core/region/region");
5
5
  var OcrRegion = /** @class */ (function () {
6
6
  function OcrRegion() {
7
7
  }
8
- OcrRegion.createStaticFields = function () {
9
- var map = new Map();
10
- map.set("cn-north-4", OcrRegion.CN_NORTH_4);
11
- map.set("cn-south-1", OcrRegion.CN_SOUTH_1);
12
- map.set("cn-east-3", OcrRegion.CN_EAST_3);
13
- map.set("cn-north-1", OcrRegion.CN_NORTH_1);
14
- map.set("ap-southeast-2", OcrRegion.AP_SOUTHEAST_2);
15
- map.set("ap-southeast-1", OcrRegion.AP_SOUTHEAST_1);
16
- map.set("ap-southeast-3", OcrRegion.AP_SOUTHEAST_3);
17
- map.set("la-south-2", OcrRegion.LA_SOUTH_2);
18
- map.set("af-south-1", OcrRegion.AF_SOUTH_1);
19
- return map;
20
- };
21
8
  OcrRegion.valueOf = function (regionId) {
22
9
  if (!regionId) {
23
10
  throw new Error("Unexpected empty parameter: regionId.");
24
11
  }
25
- var result = this.STATIC_FIELDS.get(regionId);
12
+ var result = this.REGION_MAP[regionId];
26
13
  if (result) {
27
14
  return result;
28
15
  }
29
16
  throw new Error("Unexpected regionId: ".concat(regionId, "."));
30
17
  };
31
- OcrRegion.CN_NORTH_4 = new region_1.Region("cn-north-4", "https://ocr.cn-north-4.myhuaweicloud.com");
32
- OcrRegion.CN_SOUTH_1 = new region_1.Region("cn-south-1", "https://ocr.cn-south-1.myhuaweicloud.com");
33
- OcrRegion.CN_EAST_3 = new region_1.Region("cn-east-3", "https://ocr.cn-east-3.myhuaweicloud.com");
34
- OcrRegion.CN_NORTH_1 = new region_1.Region("cn-north-1", "https://ocr.cn-north-1.myhuaweicloud.com");
35
- OcrRegion.AP_SOUTHEAST_2 = new region_1.Region("ap-southeast-2", "https://ocr.ap-southeast-2.myhuaweicloud.com");
36
- OcrRegion.AP_SOUTHEAST_1 = new region_1.Region("ap-southeast-1", "https://ocr.ap-southeast-1.myhuaweicloud.com");
37
- OcrRegion.AP_SOUTHEAST_3 = new region_1.Region("ap-southeast-3", "https://ocr.ap-southeast-3.myhuaweicloud.com");
38
- OcrRegion.LA_SOUTH_2 = new region_1.Region("la-south-2", "https://ocr.la-south-2.myhuaweicloud.com");
39
- OcrRegion.AF_SOUTH_1 = new region_1.Region("af-south-1", "https://ocr.af-south-1.myhuaweicloud.com");
40
- OcrRegion.STATIC_FIELDS = OcrRegion.createStaticFields();
18
+ OcrRegion.CN_NORTH_4 = new region_1.Region("cn-north-4", ["https://ocr.cn-north-4.myhuaweicloud.com"]);
19
+ OcrRegion.CN_SOUTH_1 = new region_1.Region("cn-south-1", ["https://ocr.cn-south-1.myhuaweicloud.com"]);
20
+ OcrRegion.CN_EAST_3 = new region_1.Region("cn-east-3", ["https://ocr.cn-east-3.myhuaweicloud.com"]);
21
+ OcrRegion.CN_NORTH_1 = new region_1.Region("cn-north-1", ["https://ocr.cn-north-1.myhuaweicloud.com"]);
22
+ OcrRegion.AP_SOUTHEAST_2 = new region_1.Region("ap-southeast-2", ["https://ocr.ap-southeast-2.myhuaweicloud.com"]);
23
+ OcrRegion.AP_SOUTHEAST_1 = new region_1.Region("ap-southeast-1", ["https://ocr.ap-southeast-1.myhuaweicloud.com"]);
24
+ OcrRegion.AP_SOUTHEAST_3 = new region_1.Region("ap-southeast-3", ["https://ocr.ap-southeast-3.myhuaweicloud.com"]);
25
+ OcrRegion.LA_SOUTH_2 = new region_1.Region("la-south-2", ["https://ocr.la-south-2.myhuaweicloud.com"]);
26
+ OcrRegion.AF_SOUTH_1 = new region_1.Region("af-south-1", ["https://ocr.af-south-1.myhuaweicloud.com"]);
27
+ OcrRegion.REGION_MAP = {
28
+ "cn-north-4": OcrRegion.CN_NORTH_4,
29
+ "cn-south-1": OcrRegion.CN_SOUTH_1,
30
+ "cn-east-3": OcrRegion.CN_EAST_3,
31
+ "cn-north-1": OcrRegion.CN_NORTH_1,
32
+ "ap-southeast-2": OcrRegion.AP_SOUTHEAST_2,
33
+ "ap-southeast-1": OcrRegion.AP_SOUTHEAST_1,
34
+ "ap-southeast-3": OcrRegion.AP_SOUTHEAST_3,
35
+ "la-south-2": OcrRegion.LA_SOUTH_2,
36
+ "af-south-1": OcrRegion.AF_SOUTH_1
37
+ };
41
38
  return OcrRegion;
42
39
  }());
43
40
  exports.OcrRegion = OcrRegion;
@@ -2,10 +2,14 @@ export declare class AutoClassificationRequestBody {
2
2
  image?: string;
3
3
  url?: string;
4
4
  private 'type_list'?;
5
+ private 'extended_parameters'?;
5
6
  constructor();
6
7
  withImage(image: string): AutoClassificationRequestBody;
7
8
  withUrl(url: string): AutoClassificationRequestBody;
8
9
  withTypeList(typeList: Array<string>): AutoClassificationRequestBody;
9
10
  set typeList(typeList: Array<string> | undefined);
10
11
  get typeList(): Array<string> | undefined;
12
+ withExtendedParameters(extendedParameters: object): AutoClassificationRequestBody;
13
+ set extendedParameters(extendedParameters: object | undefined);
14
+ get extendedParameters(): object | undefined;
11
15
  }
@@ -26,6 +26,20 @@ var AutoClassificationRequestBody = /** @class */ (function () {
26
26
  enumerable: false,
27
27
  configurable: true
28
28
  });
29
+ AutoClassificationRequestBody.prototype.withExtendedParameters = function (extendedParameters) {
30
+ this['extended_parameters'] = extendedParameters;
31
+ return this;
32
+ };
33
+ Object.defineProperty(AutoClassificationRequestBody.prototype, "extendedParameters", {
34
+ get: function () {
35
+ return this['extended_parameters'];
36
+ },
37
+ set: function (extendedParameters) {
38
+ this['extended_parameters'] = extendedParameters;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
29
43
  return AutoClassificationRequestBody;
30
44
  }());
31
45
  exports.AutoClassificationRequestBody = AutoClassificationRequestBody;