@huaweicloud/huaweicloud-sdk-core 3.1.22 → 3.1.23
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 +45 -0
- package/CHANGELOG_CN.md +45 -0
- package/ClientBuilder.js +4 -1
- package/HcClient.js +3 -0
- package/UserOptions.d.ts +2 -0
- package/http/DefaultHttpClient.d.ts +2 -0
- package/http/DefaultHttpClient.js +9 -2
- package/http/IHttpRequest.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
# 3.1.23 2023-02-09
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK CDN
|
|
4
|
+
|
|
5
|
+
- _Features_
|
|
6
|
+
- Support the service `Content Delivery Network`
|
|
7
|
+
- _Bug Fix_
|
|
8
|
+
- None
|
|
9
|
+
- _Change_
|
|
10
|
+
- None
|
|
11
|
+
|
|
12
|
+
### HuaweiCloud SDK FunctionGraph
|
|
13
|
+
|
|
14
|
+
- _Features_
|
|
15
|
+
- None
|
|
16
|
+
- _Bug Fix_
|
|
17
|
+
- None
|
|
18
|
+
- _Change_
|
|
19
|
+
- Add the response parameter `error_code` to the interface `ListAsyncInvocations`
|
|
20
|
+
|
|
21
|
+
### HuaweiCloud SDK IoTDA
|
|
22
|
+
|
|
23
|
+
- _Features_
|
|
24
|
+
- None
|
|
25
|
+
- _Bug Fix_
|
|
26
|
+
- None
|
|
27
|
+
- _Change_
|
|
28
|
+
- Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `ListRuleActions`
|
|
29
|
+
- Add the request parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `CreateRuleAction`
|
|
30
|
+
- Changes of the interface `UpdateRuleAction`:
|
|
31
|
+
- Add the request parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding`
|
|
32
|
+
- Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding`
|
|
33
|
+
- Add the response parameters `roma_forwarding`, `influxdb_forwarding`, `functiongraph_forwarding`, `mrs_kafka_forwarding`, `dms_rocketmq_forwarding` to the interface `ShowRuleAction`
|
|
34
|
+
|
|
35
|
+
### HuaweiCloud SDK OCR
|
|
36
|
+
|
|
37
|
+
- _Features_
|
|
38
|
+
- None
|
|
39
|
+
- _Bug Fix_
|
|
40
|
+
- None
|
|
41
|
+
- _Change_
|
|
42
|
+
- Changes of the interface `RecognizeTollInvoice`:
|
|
43
|
+
- Add the request parameter `return_text_location`
|
|
44
|
+
- Add the response parameter `text_location`
|
|
45
|
+
|
|
1
46
|
# 3.1.22 2023-02-02
|
|
2
47
|
|
|
3
48
|
### HuaweiCloud SDK AOS
|
package/CHANGELOG_CN.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
# 3.1.23 2023-02-09
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK CDN
|
|
4
|
+
|
|
5
|
+
- _新增特性_
|
|
6
|
+
- 支持内容分发网络服务
|
|
7
|
+
- _解决问题_
|
|
8
|
+
- 无
|
|
9
|
+
- _特性变更_
|
|
10
|
+
- 无
|
|
11
|
+
|
|
12
|
+
### HuaweiCloud SDK FunctionGraph
|
|
13
|
+
|
|
14
|
+
- _新增特性_
|
|
15
|
+
- 无
|
|
16
|
+
- _解决问题_
|
|
17
|
+
- 无
|
|
18
|
+
- _特性变更_
|
|
19
|
+
- 接口`ListAsyncInvocations`新增响应参数 `error_code`
|
|
20
|
+
|
|
21
|
+
### HuaweiCloud SDK IoTDA
|
|
22
|
+
|
|
23
|
+
- _新增特性_
|
|
24
|
+
- 无
|
|
25
|
+
- _解决问题_
|
|
26
|
+
- 无
|
|
27
|
+
- _特性变更_
|
|
28
|
+
- 接口`ListRuleActions`新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
|
|
29
|
+
- 接口`CreateRuleAction`新增请求参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
|
|
30
|
+
- 接口`UpdateRuleAction`:
|
|
31
|
+
- 新增请求参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
|
|
32
|
+
- 新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
|
|
33
|
+
- 接口`ShowRuleAction`新增响应参数 `roma_forwarding`、`influxdb_forwarding`、`functiongraph_forwarding`、`mrs_kafka_forwarding`、`dms_rocketmq_forwarding`
|
|
34
|
+
|
|
35
|
+
### HuaweiCloud SDK OCR
|
|
36
|
+
|
|
37
|
+
- _新增特性_
|
|
38
|
+
- 无
|
|
39
|
+
- _解决问题_
|
|
40
|
+
- 无
|
|
41
|
+
- _特性变更_
|
|
42
|
+
- 接口`RecognizeTollInvoice`:
|
|
43
|
+
- 新增请求参数 `return_text_location`
|
|
44
|
+
- 新增响应参数 `text_location`
|
|
45
|
+
|
|
1
46
|
# 3.1.22 2023-02-02
|
|
2
47
|
|
|
3
48
|
### 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,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
|
-
|
|
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, {
|
package/http/IHttpRequest.d.ts
CHANGED
|
@@ -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;
|