@huaweicloud/huaweicloud-sdk-core 3.1.11 → 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 +30 -0
  2. package/CHANGELOG_CN.md +30 -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,33 @@
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
+
1
31
  # 3.1.11 2022-11-24
2
32
 
3
33
  ### HuaweiCloud SDK AOS
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,33 @@
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
+
1
31
  # 3.1.11 2022-11-24
2
32
 
3
33
  ### 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.11",
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