@huaweicloud/huaweicloud-sdk-core 3.1.22 → 3.1.24

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/CHANGELOG.md CHANGED
@@ -1,3 +1,99 @@
1
+ # 3.1.24 2023-02-16
2
+
3
+ ### HuaweiCloud SDK DCS
4
+
5
+ - _Features_
6
+ - Support the interfaces `CreateCustomTemplate`, `CreateAutoExpireScanTask`
7
+ - _Bug Fix_
8
+ - None
9
+ - _Change_
10
+ - None
11
+
12
+ ### HuaweiCloud SDK FRS
13
+
14
+ - _Features_
15
+ - None
16
+ - _Bug Fix_
17
+ - None
18
+ - _Change_
19
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByUrl`
20
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByUrlIntl`
21
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByFile`
22
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByFileIntl`
23
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByBase64`
24
+ - Add the request parameter `nod_threshold` to the interface `DetectLiveByBase64Intl`
25
+
26
+ ### HuaweiCloud SDK Image
27
+
28
+ - _Features_
29
+ - Support the interfaces `RunImageSuperResolution`, `RunRecaptureDetect`
30
+ - _Bug Fix_
31
+ - None
32
+ - _Change_
33
+ - None
34
+
35
+ ### HuaweiCloud SDK WAF
36
+
37
+ - _Features_
38
+ - None
39
+ - _Bug Fix_
40
+ - None
41
+ - _Change_
42
+ - Changes of the interface `UpdateHost`:
43
+ - Remove the enum values `TLS v1.3` from the request parameter `tls`
44
+ - Remove the enum values `TLS v1.3` from the response parameter `tls`
45
+ - Remove the enum values `TLS v1.3` from the response parameter `tls` from the interface `ShowHost`
46
+ - Remove the enum values `TLS v1.3` from the response parameter `tls` from the interface `CreatePremiumHost`
47
+ - Remove the enum values `TLS v1.3` from the response parameter `tls` from the interface `ShowPremiumHost`
48
+ - Changes of the interface `UpdatePremiumHost`:
49
+ - Remove the enum values `TLS v1.3` from the request parameter `tls`
50
+ - Remove the enum values `TLS v1.3` from the response parameter `tls`
51
+
52
+ # 3.1.23 2023-02-09
53
+
54
+ ### HuaweiCloud SDK CDN
55
+
56
+ - _Features_
57
+ - Support the service `Content Delivery Network`
58
+ - _Bug Fix_
59
+ - None
60
+ - _Change_
61
+ - None
62
+
63
+ ### HuaweiCloud SDK FunctionGraph
64
+
65
+ - _Features_
66
+ - None
67
+ - _Bug Fix_
68
+ - None
69
+ - _Change_
70
+ - Add the response parameter `error_code` to the interface `ListAsyncInvocations`
71
+
72
+ ### HuaweiCloud SDK IoTDA
73
+
74
+ - _Features_
75
+ - None
76
+ - _Bug Fix_
77
+ - None
78
+ - _Change_
79
+ - Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `ListRuleActions`
80
+ - Add the request parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `CreateRuleAction`
81
+ - Changes of the interface `UpdateRuleAction`:
82
+ - Add the request parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding`
83
+ - Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding`
84
+ - Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `ShowRuleAction`
85
+
86
+ ### HuaweiCloud SDK OCR
87
+
88
+ - _Features_
89
+ - None
90
+ - _Bug Fix_
91
+ - None
92
+ - _Change_
93
+ - Changes of the interface `RecognizeTollInvoice`:
94
+ - Add the request parameter `return_text_location`
95
+ - Add the response parameter `text_location`
96
+
1
97
  # 3.1.22 2023-02-02
2
98
 
3
99
  ### HuaweiCloud SDK AOS
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,99 @@
1
+ # 3.1.24 2023-02-16
2
+
3
+ ### HuaweiCloud SDK DCS
4
+
5
+ - _新增特性_
6
+ - 支持接口`CreateCustomTemplate`、`CreateAutoExpireScanTask`
7
+ - _解决问题_
8
+ - 无
9
+ - _特性变更_
10
+ - 无
11
+
12
+ ### HuaweiCloud SDK FRS
13
+
14
+ - _新增特性_
15
+ - 无
16
+ - _解决问题_
17
+ - 无
18
+ - _特性变更_
19
+ - 接口`DetectLiveByUrl`新增请求参数 `nod_threshold`
20
+ - 接口`DetectLiveByUrlIntl`新增请求参数 `nod_threshold`
21
+ - 接口`DetectLiveByFile`新增请求参数 `nod_threshold`
22
+ - 接口`DetectLiveByFileIntl`新增请求参数 `nod_threshold`
23
+ - 接口`DetectLiveByBase64`新增请求参数 `nod_threshold`
24
+ - 接口`DetectLiveByBase64Intl`新增请求参数 `nod_threshold`
25
+
26
+ ### HuaweiCloud SDK Image
27
+
28
+ - _新增特性_
29
+ - 支持接口`RunImageSuperResolution`、`RunRecaptureDetect`
30
+ - _解决问题_
31
+ - 无
32
+ - _特性变更_
33
+ - 无
34
+
35
+ ### HuaweiCloud SDK WAF
36
+
37
+ - _新增特性_
38
+ - 无
39
+ - _解决问题_
40
+ - 无
41
+ - _特性变更_
42
+ - 接口`UpdateHost`:
43
+ - 请求参数`tls`移除枚举值`TLS v1.3`
44
+ - 响应参数`tls`移除枚举值`TLS v1.3`
45
+ - 接口`ShowHost`响应参数`tls`移除枚举值`TLS v1.3`
46
+ - 接口`CreatePremiumHost`响应参数`tls`移除枚举值`TLS v1.3`
47
+ - 接口`ShowPremiumHost`响应参数`tls`移除枚举值`TLS v1.3`
48
+ - 接口`UpdatePremiumHost`:
49
+ - 请求参数`tls`移除枚举值`TLS v1.3`
50
+ - 响应参数`tls`移除枚举值`TLS v1.3`
51
+
52
+ # 3.1.23 2023-02-09
53
+
54
+ ### HuaweiCloud SDK CDN
55
+
56
+ - _新增特性_
57
+ - 支持内容分发网络服务
58
+ - _解决问题_
59
+ - 无
60
+ - _特性变更_
61
+ - 无
62
+
63
+ ### HuaweiCloud SDK FunctionGraph
64
+
65
+ - _新增特性_
66
+ - 无
67
+ - _解决问题_
68
+ - 无
69
+ - _特性变更_
70
+ - 接口`ListAsyncInvocations`新增响应参数 `error_code`
71
+
72
+ ### HuaweiCloud SDK IoTDA
73
+
74
+ - _新增特性_
75
+ - 无
76
+ - _解决问题_
77
+ - 无
78
+ - _特性变更_
79
+ - 接口`ListRuleActions`新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
80
+ - 接口`CreateRuleAction`新增请求参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
81
+ - 接口`UpdateRuleAction`:
82
+ - 新增请求参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
83
+ - 新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
84
+ - 接口`ShowRuleAction`新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
85
+
86
+ ### HuaweiCloud SDK OCR
87
+
88
+ - _新增特性_
89
+ - 无
90
+ - _解决问题_
91
+ - 无
92
+ - _特性变更_
93
+ - 接口`RecognizeTollInvoice`:
94
+ - 新增请求参数 `return_text_location`
95
+ - 新增响应参数 `text_location`
96
+
1
97
  # 3.1.22 2023-02-02
2
98
 
3
99
  ### HuaweiCloud SDK AOS
package/ClientBuilder.js CHANGED
@@ -57,7 +57,7 @@ var ClientBuilder = /** @class */ (function () {
57
57
  return this;
58
58
  };
59
59
  ClientBuilder.prototype.build = function () {
60
- var _a;
60
+ var _a, _b;
61
61
  var axiosOptions = {
62
62
  disableSslVerification: true
63
63
  };
@@ -68,6 +68,9 @@ var ClientBuilder = /** @class */ (function () {
68
68
  axiosOptions.headers = axiosOptions.headers || {};
69
69
  axiosOptions.headers["User-Agent"] = this.userOptions.customUserAgent;
70
70
  }
71
+ if ((_b = this.userOptions) === null || _b === void 0 ? void 0 : _b.axiosRequestConfig) {
72
+ axiosOptions.axiosRequestConfig = this.userOptions.axiosRequestConfig;
73
+ }
71
74
  if (!this.credential) {
72
75
  this.credential = this.getCredentialFromEnvironment();
73
76
  }
package/HcClient.js CHANGED
@@ -159,6 +159,9 @@ var HcClient = /** @class */ (function () {
159
159
  httpRequest['responseHeaders'] = options['responseHeaders'];
160
160
  }
161
161
  httpRequest.proxy = this.proxyAgent;
162
+ if (options.axiosRequestConfig) {
163
+ httpRequest.axiosRequestConfig = options.axiosRequestConfig;
164
+ }
162
165
  return [2 /*return*/, httpRequest];
163
166
  }
164
167
  });
package/UserOptions.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { AxiosRequestConfig } from "axios";
1
2
  export declare class UserOptions {
2
3
  customUserAgent?: string;
4
+ axiosRequestConfig?: AxiosRequestConfig;
3
5
  }
@@ -1,3 +1,4 @@
1
+ import { AxiosRequestConfig } from 'axios';
1
2
  import { IHttpRequest } from './IHttpRequest';
2
3
  import { HttpClient } from './HttpClient';
3
4
  import { Logger, LogLevel } from '../logger';
@@ -24,4 +25,5 @@ export interface ClientOptions {
24
25
  headers?: any;
25
26
  logger?: Logger;
26
27
  logLevel?: LogLevel;
28
+ axiosRequestConfig?: AxiosRequestConfig;
27
29
  }
@@ -93,13 +93,17 @@ var DefaultHttpClient = /** @class */ (function () {
93
93
  if (this.defaultOption.proxy && this.defaultOption.proxy !== '') {
94
94
  proxyAgent = HttpsProxyAgent(this.defaultOption.proxy);
95
95
  }
96
- this.axiosInstance = axios_1.default.create({
96
+ var axiosRequestConfig = {
97
97
  maxContentLength: Infinity,
98
98
  headers: Object.assign(this.DEFAULT_HEADERS, this.defaultOption.headers),
99
99
  proxy: false,
100
100
  httpAgent: proxyAgent,
101
101
  httpsAgent: proxyAgent
102
- });
102
+ };
103
+ if (this.defaultOption.axiosRequestConfig) {
104
+ Object.assign(axiosRequestConfig, this.defaultOption.axiosRequestConfig);
105
+ }
106
+ this.axiosInstance = axios_1.default.create(axiosRequestConfig);
103
107
  this.axiosInstance.interceptors.request.use(function (request) {
104
108
  var url = request.url, method = request.method, data = request.data, headers = request.headers;
105
109
  _this.logger.debug("Request: ".concat(method.toUpperCase(), " ").concat(url, " ").concat(JSON.stringify(headers), " ").concat(JSON.stringify(data)));
@@ -174,6 +178,9 @@ var DefaultHttpClient = /** @class */ (function () {
174
178
  return (0, querystring_1.stringify)(params);
175
179
  },
176
180
  };
181
+ if (httpRequest.axiosRequestConfig) {
182
+ Object.assign(requestParams, httpRequest.axiosRequestConfig);
183
+ }
177
184
  methods = ['PUT', 'POST', 'PATCH', 'DELETE'];
178
185
  if (method && methods.indexOf(method.toUpperCase()) !== -1) {
179
186
  requestParams = Object.assign(requestParams, {
@@ -1,3 +1,4 @@
1
+ import { AxiosRequestConfig } from "axios";
1
2
  export interface IHttpRequest {
2
3
  params?: any;
3
4
  endpoint?: string | undefined;
@@ -10,8 +11,10 @@ export interface IHttpRequest {
10
11
  proxy?: any;
11
12
  getPathParams?: () => any;
12
13
  responseHeaders?: any;
14
+ axiosRequestConfig?: AxiosRequestConfig;
13
15
  }
14
16
  export declare class HttpRequestImpl implements IHttpRequest {
17
+ axiosRequestConfig?: AxiosRequestConfig;
15
18
  params: any;
16
19
  endpoint: string | undefined;
17
20
  contentType: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huaweicloud/huaweicloud-sdk-core",
3
- "version": "3.1.22",
3
+ "version": "3.1.24",
4
4
  "description": "Core code for Huaweicloud SDK for Node.js",
5
5
  "main": "huaweicloud-sdk-core.js",
6
6
  "typings": "huaweicloud-sdk-core.d.ts",