@huaweicloud/huaweicloud-sdk-core 3.1.43 → 3.1.44

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,146 @@
1
+ # 3.1.44 2023-06-29
2
+
3
+ ### HuaweiCloud SDK IdentityCenter
4
+
5
+ - _Features_
6
+ - Support `IdentityCenter`
7
+ - _Bug Fix_
8
+ - None
9
+ - _Change_
10
+ - None
11
+
12
+ ### HuaweiCloud SDK WorkspaceApp
13
+
14
+ - _Features_
15
+ - Support `WorkspaceApp`
16
+ - _Bug Fix_
17
+ - None
18
+ - _Change_
19
+ - None
20
+
21
+ ### HuaweiCloud SDK Config
22
+
23
+ - _Features_
24
+ - Support `Config`
25
+ - _Bug Fix_
26
+ - None
27
+ - _Change_
28
+ - None
29
+
30
+ ### HuaweiCloud SDK AOS
31
+
32
+ - _Features_
33
+ - Support the interface `ListTemplateVersions`
34
+ - _Bug Fix_
35
+ - None
36
+ - _Change_
37
+ - None
38
+
39
+ ### HuaweiCloud SDK DCS
40
+
41
+ - _Features_
42
+ - Support the interfaces `ExecuteClusterSwitchover`, `ShowJobInfo`
43
+ - _Bug Fix_
44
+ - None
45
+ - _Change_
46
+ - **ListConfigTemplates**
47
+ - changes of response param
48
+ - `+ config_templates.created_at`
49
+ - **CreateInstance**
50
+ - changes of request param
51
+ - `+ template_id`
52
+
53
+ ### HuaweiCloud SDK GA
54
+
55
+ - _Features_
56
+ - Support the following interfaces:
57
+ - `ListIpGroups`
58
+ - `CreateIpGroup`
59
+ - `ShowIpGroup`
60
+ - `UpdateIpGroup`
61
+ - `DeleteIpGroup`
62
+ - `AddIpGroupIp`
63
+ - `RemoveIpGroupIp`
64
+ - `AssociateListener`
65
+ - `DisassociateListener`
66
+ - _Bug Fix_
67
+ - None
68
+ - _Change_
69
+ - None
70
+
71
+ ### HuaweiCloud SDK IoTDA
72
+
73
+ - _Features_
74
+ - None
75
+ - _Bug Fix_
76
+ - None
77
+ - _Change_
78
+ - **CreateCommand**
79
+ - changes of response param
80
+ - `+ error_msg`
81
+ - `+ error_code`
82
+ - **ListProperties**
83
+ - changes of response param
84
+ - `+ error_msg`
85
+ - `+ error_code`
86
+ - **UpdateProperties**
87
+ - changes of response param
88
+ - `+ error_msg`
89
+ - `+ error_code`
90
+
91
+ ### HuaweiCloud SDK VPC
92
+
93
+ - _Features_
94
+ - None
95
+ - _Bug Fix_
96
+ - None
97
+ - _Change_
98
+ - **ShowAddressGroup**
99
+ - changes of response param
100
+ - `+ address_group.tags`
101
+ - **UpdateAddressGroup**
102
+ - changes of response param
103
+ - `+ address_group.tags`
104
+ - **ListAddressGroup**
105
+ - changes of response param
106
+ - `+ address_groups.tags`
107
+ - **CreateAddressGroup**
108
+ - changes of response param
109
+ - `+ address_group.tags`
110
+
111
+ ### HuaweiCloud SDK VPCEP
112
+
113
+ - _Features_
114
+ - None
115
+ - _Bug Fix_
116
+ - None
117
+ - _Change_
118
+ - **AddOrRemoveServicePermissions**
119
+ - changes of request param
120
+ - `+ permission_type`
121
+ - changes of response param
122
+ - `+ permission_type`
123
+ - **UpdateEndpointService**
124
+ - changes of response param
125
+ - `- cidr_type`
126
+ - **ListServicePermissionsDetails**
127
+ - changes of response param
128
+ - `+ permissions.permission_type`
129
+ - **BatchAddEndpointServicePermissions**
130
+ - changes of request param
131
+ - `+ permission_type`
132
+ - changes of response param
133
+ - `+ permissions.permission_type`
134
+ - **BatchRemoveEndpointServicePermissions**
135
+ - changes of response param
136
+ - `+ permissions.permission_type`
137
+ - **UpdateEndpointServicePermissionDesc**
138
+ - changes of response param
139
+ - `+ permissions.permission_type`
140
+ - **CreateEndpointService**
141
+ - changes of response param
142
+ - `- cidr_type`
143
+
1
144
  # 3.1.43 2023-06-21
2
145
 
3
146
  ### HuaweiCloud SDK CloudRTC
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,146 @@
1
+ # 3.1.44 2023-06-29
2
+
3
+ ### HuaweiCloud SDK IdentityCenter
4
+
5
+ - _新增特性_
6
+ - 支持IAM 身份中心服务
7
+ - _解决问题_
8
+ - 无
9
+ - _特性变更_
10
+ - 无
11
+
12
+ ### HuaweiCloud SDK WorkspaceApp
13
+
14
+ - _新增特性_
15
+ - 支持云应用服务
16
+ - _解决问题_
17
+ - 无
18
+ - _特性变更_
19
+ - 无
20
+
21
+ ### HuaweiCloud SDK Config
22
+
23
+ - _新增特性_
24
+ - 支持配置审计服务
25
+ - _解决问题_
26
+ - 无
27
+ - _特性变更_
28
+ - 无
29
+
30
+ ### HuaweiCloud SDK AOS
31
+
32
+ - _新增特性_
33
+ - 支持接口`ListTemplateVersions`
34
+ - _解决问题_
35
+ - 无
36
+ - _特性变更_
37
+ - 无
38
+
39
+ ### HuaweiCloud SDK DCS
40
+
41
+ - _新增特性_
42
+ - 支持接口`ExecuteClusterSwitchover`、`ShowJobInfo`
43
+ - _解决问题_
44
+ - 无
45
+ - _特性变更_
46
+ - **ListConfigTemplates**
47
+ - 响应参数变更
48
+ - `+ config_templates.created_at`
49
+ - **CreateInstance**
50
+ - 请求参数变更
51
+ - `+ template_id`
52
+
53
+ ### HuaweiCloud SDK GA
54
+
55
+ - _新增特性_
56
+ - 支持以下接口:
57
+ - `ListIpGroups`
58
+ - `CreateIpGroup`
59
+ - `ShowIpGroup`
60
+ - `UpdateIpGroup`
61
+ - `DeleteIpGroup`
62
+ - `AddIpGroupIp`
63
+ - `RemoveIpGroupIp`
64
+ - `AssociateListener`
65
+ - `DisassociateListener`
66
+ - _解决问题_
67
+ - 无
68
+ - _特性变更_
69
+ - 无
70
+
71
+ ### HuaweiCloud SDK IoTDA
72
+
73
+ - _新增特性_
74
+ - 无
75
+ - _解决问题_
76
+ - 无
77
+ - _特性变更_
78
+ - **CreateCommand**
79
+ - 响应参数变更
80
+ - `+ error_msg`
81
+ - `+ error_code`
82
+ - **ListProperties**
83
+ - 响应参数变更
84
+ - `+ error_msg`
85
+ - `+ error_code`
86
+ - **UpdateProperties**
87
+ - 响应参数变更
88
+ - `+ error_msg`
89
+ - `+ error_code`
90
+
91
+ ### HuaweiCloud SDK VPC
92
+
93
+ - _新增特性_
94
+ - 无
95
+ - _解决问题_
96
+ - 无
97
+ - _特性变更_
98
+ - **ShowAddressGroup**
99
+ - 响应参数变更
100
+ - `+ address_group.tags`
101
+ - **UpdateAddressGroup**
102
+ - 响应参数变更
103
+ - `+ address_group.tags`
104
+ - **ListAddressGroup**
105
+ - 响应参数变更
106
+ - `+ address_groups.tags`
107
+ - **CreateAddressGroup**
108
+ - 响应参数变更
109
+ - `+ address_group.tags`
110
+
111
+ ### HuaweiCloud SDK VPCEP
112
+
113
+ - _新增特性_
114
+ - 无
115
+ - _解决问题_
116
+ - 无
117
+ - _特性变更_
118
+ - **AddOrRemoveServicePermissions**
119
+ - 请求参数变更
120
+ - `+ permission_type`
121
+ - 响应参数变更
122
+ - `+ permission_type`
123
+ - **UpdateEndpointService**
124
+ - 响应参数变更
125
+ - `- cidr_type`
126
+ - **ListServicePermissionsDetails**
127
+ - 响应参数变更
128
+ - `+ permissions.permission_type`
129
+ - **BatchAddEndpointServicePermissions**
130
+ - 请求参数变更
131
+ - `+ permission_type`
132
+ - 响应参数变更
133
+ - `+ permissions.permission_type`
134
+ - **BatchRemoveEndpointServicePermissions**
135
+ - 响应参数变更
136
+ - `+ permissions.permission_type`
137
+ - **UpdateEndpointServicePermissionDesc**
138
+ - 响应参数变更
139
+ - `+ permissions.permission_type`
140
+ - **CreateEndpointService**
141
+ - 响应参数变更
142
+ - `- cidr_type`
143
+
1
144
  # 3.1.43 2023-06-21
2
145
 
3
146
  ### HuaweiCloud SDK CloudRTC
package/HcClient.js CHANGED
@@ -162,7 +162,9 @@ var HcClient = exports.HcClient = /** @class */ (function () {
162
162
  .withData(options.data)
163
163
  .withQueryParams(options.queryParams)
164
164
  .build();
165
- httpRequest = this.credential.processAuthRequest(httpRequest);
165
+ return [4 /*yield*/, this.credential.processAuthRequest(httpRequest)];
166
+ case 3:
167
+ httpRequest = _c.sent();
166
168
  if (options['responseHeaders']) {
167
169
  httpRequest['responseHeaders'] = options['responseHeaders'];
168
170
  }
@@ -17,7 +17,7 @@ export declare class BasicCredentials implements ICredential {
17
17
  getSk(): string | undefined;
18
18
  setProjectId(value: string): void;
19
19
  getPathParams(): {};
20
- processAuthRequest(httpRequest: IHttpRequest): IHttpRequest;
20
+ processAuthRequest(httpRequest: IHttpRequest): Promise<IHttpRequest>;
21
21
  processAuthParams(hcClient: HcClient, region: string): Promise<ICredential>;
22
22
  parsePath(path: string | undefined, params: any): string;
23
23
  }
@@ -107,35 +107,39 @@ var BasicCredentials = /** @class */ (function () {
107
107
  return pathParams;
108
108
  };
109
109
  BasicCredentials.prototype.processAuthRequest = function (httpRequest) {
110
- if (!this.ak) {
111
- throw new AKSKSigner_1.RequiredError('AK cannot be empty or undefined.');
112
- }
113
- if (!this.sk) {
114
- throw new AKSKSigner_1.RequiredError('SK cannot be empty or undefined.');
115
- }
116
- var builder = new IHttpRequestBuilder_1.HttpRequestBuilder();
117
- builder.addPathParams(this.getPathParams());
118
- // 替换所有的path参数
119
- var url = httpRequest.url;
120
- if (this.projectId) {
121
- url = this.parsePath(url, this.getPathParams());
122
- builder.withUrl(url);
123
- }
124
- builder.withEndpoint("".concat(httpRequest.endpoint).concat(url));
125
- if (this.projectId) {
126
- builder.addHeaders("X-Project-Id", this.projectId);
127
- }
128
- if (this.securityToken) {
129
- builder.addHeaders("X-Security-Token", this.securityToken);
130
- }
131
- if (!(0, ICredential_1.isJsonContentType)(httpRequest.headers)) {
132
- builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
133
- }
134
- builder.addAllHeaders(httpRequest.headers);
135
- Object.assign(httpRequest, builder.build());
136
- var headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
137
- builder.addAllHeaders(headers);
138
- return Object.assign(httpRequest, builder.build());
110
+ return __awaiter(this, void 0, void 0, function () {
111
+ var builder, url, headers;
112
+ return __generator(this, function (_a) {
113
+ if (!this.ak) {
114
+ throw new AKSKSigner_1.RequiredError('AK cannot be empty or undefined.');
115
+ }
116
+ if (!this.sk) {
117
+ throw new AKSKSigner_1.RequiredError('SK cannot be empty or undefined.');
118
+ }
119
+ builder = new IHttpRequestBuilder_1.HttpRequestBuilder();
120
+ builder.addPathParams(this.getPathParams());
121
+ url = httpRequest.url;
122
+ if (this.projectId) {
123
+ url = this.parsePath(url, this.getPathParams());
124
+ builder.withUrl(url);
125
+ }
126
+ builder.withEndpoint("".concat(httpRequest.endpoint).concat(url));
127
+ if (this.projectId) {
128
+ builder.addHeaders("X-Project-Id", this.projectId);
129
+ }
130
+ if (this.securityToken) {
131
+ builder.addHeaders("X-Security-Token", this.securityToken);
132
+ }
133
+ if (!(0, ICredential_1.isJsonContentType)(httpRequest.headers)) {
134
+ builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
135
+ }
136
+ builder.addAllHeaders(httpRequest.headers);
137
+ Object.assign(httpRequest, builder.build());
138
+ headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
139
+ builder.addAllHeaders(headers);
140
+ return [2 /*return*/, Object.assign(httpRequest, builder.build())];
141
+ });
142
+ });
139
143
  };
140
144
  BasicCredentials.prototype.processAuthParams = function (hcClient, region) {
141
145
  return __awaiter(this, void 0, void 0, function () {
@@ -17,6 +17,6 @@ export declare class GlobalCredentials implements ICredential {
17
17
  getSk(): string;
18
18
  setDomainId(value: string): void;
19
19
  getPathParams(): {};
20
- processAuthRequest(httpRequest: IHttpRequest): IHttpRequest;
20
+ processAuthRequest(httpRequest: IHttpRequest): Promise<IHttpRequest>;
21
21
  processAuthParams(hcClient: HcClient): Promise<this>;
22
22
  }
@@ -114,33 +114,37 @@ var GlobalCredentials = /** @class */ (function () {
114
114
  return pathParams;
115
115
  };
116
116
  GlobalCredentials.prototype.processAuthRequest = function (httpRequest) {
117
- if (!this.ak) {
118
- throw new AKSKSigner_1.RequiredError('AK cannot be empty or undefined.');
119
- }
120
- if (!this.sk) {
121
- throw new AKSKSigner_1.RequiredError('SK cannot be empty or undefined.');
122
- }
123
- var builder = new IHttpRequestBuilder_1.HttpRequestBuilder()
124
- .addPathParams(this.getPathParams());
125
- // 替换所有的path参数
126
- var url = httpRequest.url;
127
- if (this.domainId) {
128
- url = parsePath(url, this.getPathParams());
129
- builder.withUrl(url)
130
- .addHeaders("X-Domain-Id", this.domainId);
131
- }
132
- builder.withEndpoint("".concat(httpRequest.endpoint).concat(url));
133
- if (this.securityToken) {
134
- builder.addHeaders("X-Security-Token", this.securityToken);
135
- }
136
- if (!(0, ICredential_1.isJsonContentType)(httpRequest.headers)) {
137
- builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
138
- }
139
- builder.addAllHeaders(httpRequest.headers);
140
- Object.assign(httpRequest, builder.build());
141
- var headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
142
- builder.addAllHeaders(headers);
143
- return Object.assign(httpRequest, builder.build());
117
+ return __awaiter(this, void 0, void 0, function () {
118
+ var builder, url, headers;
119
+ return __generator(this, function (_a) {
120
+ if (!this.ak) {
121
+ throw new AKSKSigner_1.RequiredError('AK cannot be empty or undefined.');
122
+ }
123
+ if (!this.sk) {
124
+ throw new AKSKSigner_1.RequiredError('SK cannot be empty or undefined.');
125
+ }
126
+ builder = new IHttpRequestBuilder_1.HttpRequestBuilder()
127
+ .addPathParams(this.getPathParams());
128
+ url = httpRequest.url;
129
+ if (this.domainId) {
130
+ url = parsePath(url, this.getPathParams());
131
+ builder.withUrl(url)
132
+ .addHeaders("X-Domain-Id", this.domainId);
133
+ }
134
+ builder.withEndpoint("".concat(httpRequest.endpoint).concat(url));
135
+ if (this.securityToken) {
136
+ builder.addHeaders("X-Security-Token", this.securityToken);
137
+ }
138
+ if (!(0, ICredential_1.isJsonContentType)(httpRequest.headers)) {
139
+ builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
140
+ }
141
+ builder.addAllHeaders(httpRequest.headers);
142
+ Object.assign(httpRequest, builder.build());
143
+ headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
144
+ builder.addAllHeaders(headers);
145
+ return [2 /*return*/, Object.assign(httpRequest, builder.build())];
146
+ });
147
+ });
144
148
  };
145
149
  GlobalCredentials.prototype.processAuthParams = function (hcClient) {
146
150
  return __awaiter(this, void 0, void 0, function () {
@@ -3,7 +3,7 @@ import { IHttpRequest } from "../http/IHttpRequest";
3
3
  export interface ICredential {
4
4
  getAk: () => string | undefined;
5
5
  getSk: () => string | undefined;
6
- processAuthRequest: (httpRequest: IHttpRequest) => IHttpRequest;
6
+ processAuthRequest: (httpRequest: IHttpRequest) => Promise<IHttpRequest>;
7
7
  processAuthParams: (hcClient: HcClient, region: string) => Promise<ICredential>;
8
8
  }
9
9
  export declare function isJsonContentType(headers: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huaweicloud/huaweicloud-sdk-core",
3
- "version": "3.1.43",
3
+ "version": "3.1.44",
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",