@huaweicloud/huaweicloud-sdk-core 3.1.10 → 3.1.12

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/CHANGELOG_CN.md +125 -0
  3. package/ClientBuilder.d.ts +0 -0
  4. package/ClientBuilder.js +0 -0
  5. package/HcClient.d.ts +0 -0
  6. package/HcClient.js +14 -1
  7. package/LICENSE +0 -0
  8. package/README.md +0 -0
  9. package/README_CN.md +0 -0
  10. package/SdkResponse.d.ts +0 -0
  11. package/SdkResponse.js +0 -0
  12. package/UserOptions.d.ts +0 -0
  13. package/UserOptions.js +0 -0
  14. package/auth/AKSKSigner.d.ts +0 -0
  15. package/auth/AKSKSigner.js +6 -1
  16. package/auth/BasicCredentials.d.ts +0 -0
  17. package/auth/BasicCredentials.js +7 -0
  18. package/auth/GlobalCredentials.d.ts +0 -0
  19. package/auth/GlobalCredentials.js +7 -0
  20. package/auth/ICredential.d.ts +0 -0
  21. package/auth/ICredential.js +0 -0
  22. package/exception/ClientRequestException.d.ts +0 -0
  23. package/exception/ClientRequestException.js +0 -0
  24. package/exception/ExceptionResponse.d.ts +0 -0
  25. package/exception/ExceptionResponse.js +0 -0
  26. package/exception/ExceptionUtil.d.ts +0 -0
  27. package/exception/ExceptionUtil.js +0 -0
  28. package/exception/SdkException.d.ts +0 -0
  29. package/exception/SdkException.js +0 -0
  30. package/exception/ServerResponseException.d.ts +0 -0
  31. package/exception/ServerResponseException.js +0 -0
  32. package/exception/ServiceResponseException.d.ts +0 -0
  33. package/exception/ServiceResponseException.js +0 -0
  34. package/http/DefaultHttpClient.d.ts +0 -0
  35. package/http/DefaultHttpClient.js +0 -0
  36. package/http/DefaultHttpResponse.d.ts +0 -0
  37. package/http/DefaultHttpResponse.js +0 -0
  38. package/http/HttpClient.d.ts +0 -0
  39. package/http/HttpClient.js +0 -0
  40. package/http/IHttpRequest.d.ts +0 -0
  41. package/http/IHttpRequest.js +0 -0
  42. package/http/IHttpRequestBuilder.d.ts +0 -0
  43. package/http/IHttpRequestBuilder.js +0 -0
  44. package/huaweicloud-sdk-core.d.ts +0 -0
  45. package/huaweicloud-sdk-core.js +0 -0
  46. package/internal/model/AuthProjectResult.d.ts +0 -0
  47. package/internal/model/AuthProjectResult.js +0 -0
  48. package/internal/model/Domains.d.ts +0 -0
  49. package/internal/model/Domains.js +0 -0
  50. package/internal/model/KeystoneCreateProjectOption.d.ts +0 -0
  51. package/internal/model/KeystoneCreateProjectOption.js +0 -0
  52. package/internal/model/KeystoneCreateProjectRequest.d.ts +0 -0
  53. package/internal/model/KeystoneCreateProjectRequest.js +0 -0
  54. package/internal/model/KeystoneCreateProjectRequestBody.d.ts +0 -0
  55. package/internal/model/KeystoneCreateProjectRequestBody.js +0 -0
  56. package/internal/model/KeystoneCreateProjectResponse.d.ts +0 -0
  57. package/internal/model/KeystoneCreateProjectResponse.js +0 -0
  58. package/internal/model/KeystoneListAuthDomainsRequest.d.ts +0 -0
  59. package/internal/model/KeystoneListAuthDomainsRequest.js +0 -0
  60. package/internal/model/KeystoneListAuthDomainsResponse.d.ts +0 -0
  61. package/internal/model/KeystoneListAuthDomainsResponse.js +0 -0
  62. package/internal/model/KeystoneListProjectsRequest.d.ts +0 -0
  63. package/internal/model/KeystoneListProjectsRequest.js +0 -0
  64. package/internal/model/KeystoneListProjectsResponse.d.ts +0 -0
  65. package/internal/model/KeystoneListProjectsResponse.js +0 -0
  66. package/internal/model/KeystoneListRegionsRequest.d.ts +0 -0
  67. package/internal/model/KeystoneListRegionsRequest.js +0 -0
  68. package/internal/model/KeystoneListRegionsResponse.d.ts +0 -0
  69. package/internal/model/KeystoneListRegionsResponse.js +0 -0
  70. package/internal/model/Links.d.ts +0 -0
  71. package/internal/model/Links.js +0 -0
  72. package/internal/model/LinksSelf.d.ts +0 -0
  73. package/internal/model/LinksSelf.js +0 -0
  74. package/internal/model/ProjectResult.d.ts +0 -0
  75. package/internal/model/ProjectResult.js +0 -0
  76. package/internal/model/Region.d.ts +0 -0
  77. package/internal/model/Region.js +0 -0
  78. package/internal/services/authcache.d.ts +0 -0
  79. package/internal/services/authcache.js +0 -0
  80. package/internal/services/iam.service.d.ts +0 -0
  81. package/internal/services/iam.service.js +0 -0
  82. package/internal/services/region.servcie.d.ts +0 -0
  83. package/internal/services/region.servcie.js +0 -0
  84. package/logger/index.d.ts +0 -0
  85. package/logger/index.js +0 -0
  86. package/logger/log4jLogger.d.ts +0 -0
  87. package/logger/log4jLogger.js +0 -0
  88. package/package.json +1 -1
  89. package/public-api.d.ts +0 -0
  90. package/public-api.js +0 -0
  91. package/region/region.d.ts +0 -0
  92. package/region/region.js +0 -0
  93. package/utils/SignerUtil.d.ts +0 -0
  94. package/utils/SignerUtil.js +0 -0
  95. package/utils/constant.d.ts +0 -0
  96. package/utils/constant.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,128 @@
1
+ # 3.1.12 2022-11-30
2
+
3
+ ### HuaweiCloud SDK EIP
4
+
5
+ - _Features_
6
+ - Support the interfaces `DisassociatePublicips`, `AssociatePublicips`
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 request parameter `metric_type` to the interface `ShowTenantMetric`
20
+
21
+ ### HuaweiCloud SDK SIS
22
+
23
+ - _Features_
24
+ - None
25
+ - _Bug Fix_
26
+ - None
27
+ - _Change_
28
+ - Add the enum values `chinese_8k_general` to the request parameter `property` to the interface `PushTranscriberJobs`
29
+ - Add the enum values `chinese_huaxiaoru_common`, `chinese_huaxiaohan_common`, `chinese_huaxiaoning_common`, `chinese_huaxiaozhen_common`, `english_alvin_common`, `english_amy_common` to the request parameter `property` to the interface `RunTts`
30
+
31
+ # 3.1.11 2022-11-24
32
+
33
+ ### HuaweiCloud SDK AOS
34
+
35
+ - _Features_
36
+ - Support the interfaces `ListStackEvents`, `ListStackResources`, `DeleteStack`
37
+ - _Bug Fix_
38
+ - None
39
+ - _Change_
40
+ - None
41
+
42
+ ### HuaweiCloud SDK CFW
43
+
44
+ - _Features_
45
+ - Support the service `Cloud Firewall`
46
+ - _Bug Fix_
47
+ - None
48
+ - _Change_
49
+ - None
50
+
51
+ ### HuaweiCloud SDK CCE
52
+
53
+ - _Features_
54
+ - None
55
+ - _Bug Fix_
56
+ - None
57
+ - _Change_
58
+ - Add the request parameter `configurationsOverride` to the interface `CreateCluster`
59
+ - Add the response parameter `configurationsOverride` to the interface `ListClusters`
60
+ - Changes of the interface `UpdateCluster`:
61
+ - Add the request parameters `eniNetwork`, `hostNetwork`
62
+ - Add the response parameter `configurationsOverride`
63
+ - Changes of the interface `DeleteCluster`:
64
+ - Add the request parameter `delete_sfs30`
65
+ - Add the response parameter `configurationsOverride`
66
+ - Add the response parameter `configurationsOverride` to the interface `ShowCluster`
67
+ - Add the request parameter `initializedConditions` to the interface `CreateNode`
68
+ - Add the response parameter `initializedConditions` to the interface `ListNodes`
69
+ - Add the response parameter `initializedConditions` to the interface `UpdateNode`
70
+ - Add the response parameter `initializedConditions` to the interface `DeleteNode`
71
+ - Add the response parameter `initializedConditions` to the interface `ShowNode`
72
+ - Add the request parameter `initializedConditions` to the interface `AddNode`
73
+ - Add the request parameter `initializedConditions` to the interface `ResetNode`
74
+ - Add the request parameters `customSecurityGroups`, `initializedConditions` to the interface `CreateNodePool`
75
+ - Add the response parameters `customSecurityGroups`, `initializedConditions` to the interface `ListNodePools`
76
+ - Changes of the interface `UpdateNodePool`:
77
+ - Add the request parameter `initializedConditions`
78
+ - Add the response parameters `customSecurityGroups`, `initializedConditions`
79
+ - Add the response parameters `customSecurityGroups`, `initializedConditions` to the interface `DeleteNodePool`
80
+ - Add the response parameters `customSecurityGroups`, `initializedConditions` to the interface `ShowNodePool`
81
+
82
+ ### HuaweiCloud SDK CSE
83
+
84
+ - _Features_
85
+ - Support the interfaces `UpgradeEngine`, `RetryEngine`
86
+ - _Bug Fix_
87
+ - None
88
+ - _Change_
89
+ - None
90
+
91
+ ### HuaweiCloud SDK FunctionGraph
92
+
93
+ - _Features_
94
+ - Support the following interfaces:
95
+ - `CreateDependencyVersion`
96
+ - `ListDependencyVersion`
97
+ - `ShowDependencyVersion`
98
+ - `DeleteDependencyVersion`
99
+ - `ListReservedInstanceConfigs`
100
+ - `ListFunctionReservedInstances`
101
+ - `ListFunctionAsMetric`
102
+ - _Bug Fix_
103
+ - None
104
+ - _Change_
105
+ - Remove the interface `AsyncInvokeReservedFunction`
106
+ - Add the request parameter `custom_image` to the interface `UpdateFunctionConfig`
107
+
108
+ ### HuaweiCloud SDK OCR
109
+
110
+ - _Features_
111
+ - None
112
+ - _Bug Fix_
113
+ - None
114
+ - _Change_
115
+ - Add the response parameter `test_interval` to the interface `RecognizeHealthCode`
116
+
117
+ ### HuaweiCloud SDK WAF
118
+
119
+ - _Features_
120
+ - Support the interfaces `CreatePrepaidCloudWaf`, `ChangePrepaidCloudWaf`, `ShowSubscriptionInfo`
121
+ - _Bug Fix_
122
+ - None
123
+ - _Change_
124
+ - None
125
+
1
126
  # 3.1.10 2022-11-17
2
127
 
3
128
  ### HuaweiCloud SDK AOS
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,128 @@
1
+ # 3.1.12 2022-11-30
2
+
3
+ ### HuaweiCloud SDK EIP
4
+
5
+ - _新增特性_
6
+ - 支持接口`DisassociatePublicips`、`AssociatePublicips`
7
+ - _解决问题_
8
+ - 无
9
+ - _特性变更_
10
+ - 无
11
+
12
+ ### HuaweiCloud SDK FunctionGraph
13
+
14
+ - _新增特性_
15
+ - 无
16
+ - _解决问题_
17
+ - 无
18
+ - _特性变更_
19
+ - 接口`ShowTenantMetric`新增请求参数 `metric_type`
20
+
21
+ ### HuaweiCloud SDK SIS
22
+
23
+ - _新增特性_
24
+ - 无
25
+ - _解决问题_
26
+ - 无
27
+ - _特性变更_
28
+ - 接口`PushTranscriberJobs`请求参数`property`新增枚举值`chinese_8k_general`
29
+ - 接口`RunTts`请求参数`property`新增枚举值`chinese_huaxiaoru_common`、`chinese_huaxiaohan_common`、`chinese_huaxiaoning_common`、`chinese_huaxiaozhen_common`、`english_alvin_common`、`english_amy_common`
30
+
31
+ # 3.1.11 2022-11-24
32
+
33
+ ### HuaweiCloud SDK AOS
34
+
35
+ - _新增特性_
36
+ - 支持接口`ListStackEvents`、`ListStackResources`、`DeleteStack`
37
+ - _解决问题_
38
+ - 无
39
+ - _特性变更_
40
+ - 无
41
+
42
+ ### HuaweiCloud SDK CFW
43
+
44
+ - _新增特性_
45
+ - 支持云防火墙服务
46
+ - _解决问题_
47
+ - 无
48
+ - _特性变更_
49
+ - 无
50
+
51
+ ### HuaweiCloud SDK CCE
52
+
53
+ - _新增特性_
54
+ - 无
55
+ - _解决问题_
56
+ - 无
57
+ - _特性变更_
58
+ - 接口`CreateCluster`新增请求参数 `configurationsOverride`
59
+ - 接口`ListClusters`新增响应参数 `configurationsOverride`
60
+ - 接口`UpdateCluster`:
61
+ - 新增请求参数 `eniNetwork`、`hostNetwork`
62
+ - 新增响应参数 `configurationsOverride`
63
+ - 接口`DeleteCluster`:
64
+ - 新增请求参数 `delete_sfs30`
65
+ - 新增响应参数 `configurationsOverride`
66
+ - 接口`ShowCluster`新增响应参数 `configurationsOverride`
67
+ - 接口`CreateNode`新增请求参数 `initializedConditions`
68
+ - 接口`ListNodes`新增响应参数 `initializedConditions`
69
+ - 接口`UpdateNode`新增响应参数 `initializedConditions`
70
+ - 接口`DeleteNode`新增响应参数 `initializedConditions`
71
+ - 接口`ShowNode`新增响应参数 `initializedConditions`
72
+ - 接口`AddNode`新增请求参数 `initializedConditions`
73
+ - 接口`ResetNode`新增请求参数 `initializedConditions`
74
+ - 接口`CreateNodePool`新增请求参数 `customSecurityGroups`、`initializedConditions`
75
+ - 接口`ListNodePools`新增响应参数 `customSecurityGroups`、`initializedConditions`
76
+ - 接口`UpdateNodePool`:
77
+ - 新增请求参数 `initializedConditions`
78
+ - 新增响应参数 `customSecurityGroups`、`initializedConditions`
79
+ - 接口`DeleteNodePool`新增响应参数 `customSecurityGroups`、`initializedConditions`
80
+ - 接口`ShowNodePool`新增响应参数 `customSecurityGroups`、`initializedConditions`
81
+
82
+ ### HuaweiCloud SDK CSE
83
+
84
+ - _新增特性_
85
+ - 支持接口`UpgradeEngine`、`RetryEngine`
86
+ - _解决问题_
87
+ - 无
88
+ - _特性变更_
89
+ - 无
90
+
91
+ ### HuaweiCloud SDK FunctionGraph
92
+
93
+ - _新增特性_
94
+ - 支持以下接口:
95
+ - `CreateDependencyVersion`
96
+ - `ListDependencyVersion`
97
+ - `ShowDependencyVersion`
98
+ - `DeleteDependencyVersion`
99
+ - `ListReservedInstanceConfigs`
100
+ - `ListFunctionReservedInstances`
101
+ - `ListFunctionAsMetric`
102
+ - _解决问题_
103
+ - 无
104
+ - _特性变更_
105
+ - 移除接口`AsyncInvokeReservedFunction`
106
+ - 接口`UpdateFunctionConfig`新增请求参数 `custom_image`
107
+
108
+ ### HuaweiCloud SDK OCR
109
+
110
+ - _新增特性_
111
+ - 无
112
+ - _解决问题_
113
+ - 无
114
+ - _特性变更_
115
+ - 接口`RecognizeHealthCode`新增响应参数 `test_interval`
116
+
117
+ ### HuaweiCloud SDK WAF
118
+
119
+ - _新增特性_
120
+ - 支持接口`CreatePrepaidCloudWaf`、`ChangePrepaidCloudWaf`、`ShowSubscriptionInfo`
121
+ - _解决问题_
122
+ - 无
123
+ - _特性变更_
124
+ - 无
125
+
1
126
  # 3.1.10 2022-11-17
2
127
 
3
128
  ### HuaweiCloud SDK AOS
File without changes
package/ClientBuilder.js CHANGED
File without changes
package/HcClient.d.ts CHANGED
File without changes
package/HcClient.js CHANGED
@@ -124,12 +124,25 @@ var HcClient = /** @class */ (function () {
124
124
  Object.keys(pathParams).forEach(function (x) {
125
125
  url = url.replace("{" + x + "}", pathParams[x]);
126
126
  });
127
- if (options.method === 'DELETE' && (options.data && (Object.keys(options.data).length <= 0 || options.data.length <= 0))) {
127
+ if (options.method === 'DELETE'
128
+ && (options.data && (Object.keys(options.data).length <= 0 || options.data.length <= 0))) {
128
129
  delete options.data;
129
130
  }
130
131
  if (options.headers && Object.prototype.hasOwnProperty.call(options.headers, "Content-Type")) {
131
132
  delete options.headers['Content-Type'];
132
133
  }
134
+ if (options.contentType) {
135
+ if (!options.headers) {
136
+ options.headers = {};
137
+ }
138
+ if (options.contentType.toLowerCase().startsWith("application/json")) {
139
+ // remove charset
140
+ options.headers['content-type'] = "application/json";
141
+ }
142
+ else {
143
+ options.headers['content-type'] = options.contentType;
144
+ }
145
+ }
133
146
  builder = new IHttpRequestBuilder_1.HttpRequestBuilder();
134
147
  httpRequest = builder
135
148
  .withEndpoint(url)
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/README_CN.md CHANGED
File without changes
package/SdkResponse.d.ts CHANGED
File without changes
package/SdkResponse.js CHANGED
File without changes
package/UserOptions.d.ts CHANGED
File without changes
package/UserOptions.js CHANGED
File without changes
File without changes
@@ -96,7 +96,12 @@ var AKSKSigner = /** @class */ (function () {
96
96
  }
97
97
  Object.assign(authenticationHeaders, { "host": host });
98
98
  var allHeaders = {};
99
- Object.assign(allHeaders, request.headers, authenticationHeaders);
99
+ var current_headers = {};
100
+ Object.assign(current_headers, request.headers);
101
+ if (current_headers['content-type'].indexOf('multipart/form-data') !== -1) {
102
+ delete current_headers['content-type'];
103
+ }
104
+ Object.assign(allHeaders, current_headers, authenticationHeaders);
100
105
  var canonicalURI = this.CanonicalURI(parsedUrl.pathname);
101
106
  var canonicalQueryString = this.CanonicalQueryString(request);
102
107
  var sortedKeys = _.sortBy(Object.keys(allHeaders), function (x) {
File without changes
@@ -90,6 +90,13 @@ var BasicCredentials = /** @class */ (function () {
90
90
  if (this.securityToken) {
91
91
  builder.addHeaders("X-Security-Token", this.securityToken);
92
92
  }
93
+ if (httpRequest.headers
94
+ && ((Object.prototype.hasOwnProperty.call(httpRequest.headers, "content-type")
95
+ && httpRequest.headers["content-type"] !== "application/json") ||
96
+ (Object.prototype.hasOwnProperty.call(httpRequest.headers, "Content-Type")
97
+ && httpRequest.headers["Content-Type"] !== "application/json"))) {
98
+ builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
99
+ }
93
100
  builder.addAllHeaders(httpRequest.headers);
94
101
  Object.assign(httpRequest, builder.build());
95
102
  var headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
File without changes
@@ -97,6 +97,13 @@ var GlobalCredentials = /** @class */ (function () {
97
97
  if (this.securityToken) {
98
98
  builder.addHeaders("X-Security-Token", this.securityToken);
99
99
  }
100
+ if (httpRequest.headers
101
+ && ((Object.prototype.hasOwnProperty.call(httpRequest.headers, "content-type")
102
+ && httpRequest.headers["content-type"] !== "application/json") ||
103
+ (Object.prototype.hasOwnProperty.call(httpRequest.headers, "Content-Type")
104
+ && httpRequest.headers["Content-Type"] !== "application/json"))) {
105
+ builder.addHeaders("X-Sdk-Content-Sha256", "UNSIGNED-PAYLOAD");
106
+ }
100
107
  builder.addAllHeaders(httpRequest.headers);
101
108
  Object.assign(httpRequest, builder.build());
102
109
  var headers = AKSKSigner_1.AKSKSigner.sign(httpRequest, this);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/logger/index.d.ts CHANGED
File without changes
package/logger/index.js CHANGED
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huaweicloud/huaweicloud-sdk-core",
3
- "version": "3.1.10",
3
+ "version": "3.1.12",
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",
package/public-api.d.ts CHANGED
File without changes
package/public-api.js CHANGED
File without changes
File without changes
package/region/region.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/utils/constant.js CHANGED
File without changes